address code review comments and jshint the test
[xtuple] / lib / enyo-x / source / views / workspace.js
index 849c58a..862278f 100644 (file)
@@ -1055,14 +1055,17 @@ trailing:true, white:true, strict: false*/
     },
 
     exportAttr: function (inSender, inEvent) {
-      this.openExportTab('export', inEvent.recordType, inEvent.uuid, inEvent.attr);
+      this.openExportTab('export', inEvent.attr);
       return true;
     },
 
     // export just one attribute of the model displayed by the workspace
-    openExportTab: function (routeName, recordType, id, attr) {
-      var query = { parameters: [{ attribute: "uuid", value: id }],
-                    details: { attr: attr }
+    openExportTab: function (routeName, attr) {
+      var recordType = this.$.workspace.value.recordType,
+          id         = this.$.workspace.value.id,
+          idAttr     = this.$.workspace.value.idAttribute,
+          query = { parameters: [{ attribute: idAttr, value: id }],
+                    details: { attr: attr, id: id }
       };
       // sending the locale information back over the wire saves a call to the db
       window.open(XT.getOrganizationPath() +