issue #23982: ui feedback from ben
authorSteve Hackbarth <stephenhackbarth@gmail.com>
Tue, 24 Jun 2014 19:01:38 +0000 (15:01 -0400)
committerSteve Hackbarth <stephenhackbarth@gmail.com>
Tue, 24 Jun 2014 19:01:38 +0000 (15:01 -0400)
enyo-client/application/source/en/strings.js
enyo-client/application/source/views/list_relations_box.js
enyo-client/application/source/views/workspace.js

index e22a865..84fc03a 100644 (file)
     "_thisWeek": "This Week",
     "_thisMonth": "This Month",
     "_thisYear": "This Year",
+    "_transactionKey": "Transaction Key",
     "_twoYears": "Two Years",
     "_to": "To",
     "_toDate": "To Date",
index cc2cb7b..afddf54 100644 (file)
@@ -65,7 +65,7 @@ trailing:true, white:true*/
       this.$.buttonsPanel.createComponent({
         kind: "onyx.Button",
         name: "processButton",
-        showing: false,
+        disabled: true,
         ontap: "processCreditCard",
         classes: "onyx-affirmative",
         content: "_process".loc()
@@ -73,7 +73,7 @@ trailing:true, white:true*/
       this.$.buttonsPanel.createComponent({
         kind: "onyx.Button",
         name: "authorizeButton",
-        showing: false,
+        disabled: true,
         ontap: "processCreditCard",
         content: "_authorize".loc()
       }, {owner: this});
@@ -84,7 +84,7 @@ trailing:true, white:true*/
     newItem: function (options) {
       options = options || {};
       var that = this,
-        // XXX #refactor 
+        // XXX #refactor
         customer = that.parent.parent.getValue().getValue("customer"),
         creditCardCollection = customer.get("creditCards"),
         creditCardModel = new XM.CreditCard(),
@@ -201,8 +201,8 @@ trailing:true, white:true*/
           // XXX #refactor
           payload.orderNumber = that.parent.parent.getValue().id;
           payload.customerNumber = that.parent.parent.getValue().getValue("customer.id");
-          that.$.authorizeButton.setShowing(false);
-          that.$.processButton.setShowing(false);
+          that.$.authorizeButton.setDisabled(true);
+          that.$.processButton.setDisabled(true);
           XT.dataSource.callRoute("credit-card", payload, {success: success, error: error});
         };
 
@@ -226,10 +226,11 @@ trailing:true, white:true*/
       var list = this.$.list,
         creditCard = list.getModel(list.getFirstSelected()),
         ccv = this.$.ccv.value,
-        amount = this.$.creditCardAmount.value;
+        amount = this.$.creditCardAmount.value,
+        disable = !creditCard || !amount || (!ccv && !!XT.session.settings.get("CCRequireCCV"));
 
-      this.$.processButton.setShowing(creditCard && amount && (ccv || !XT.session.settings.get("CCRequireCCV")));
-      this.$.authorizeButton.setShowing(creditCard && amount && (ccv || !XT.session.settings.get("CCRequireCCV")));
+      this.$.processButton.setDisabled(disable);
+      this.$.authorizeButton.setDisabled(disable);
       return true;
     }
   });
index 64c7a96..f49c790 100644 (file)
@@ -455,7 +455,7 @@ strict: false*/
             {kind: "XV.InputWidget", attr: "CCLogin",
               label: "_login".loc()},
             {kind: "XV.InputWidget", attr: "CCPassword",
-                label: "_password".loc()},
+                label: "_transactionKey".loc()},
             {kind: "XV.ToggleButtonWidget", attr: "CCTest",
                 label: "_testMode".loc()},
             {kind: "XV.ToggleButtonWidget", attr: "CCRequireCCV",