Permalink
Browse files

Issue 19453: Added fields for advanced search. Fixed bug with QuoteSt…

…atus
  • Loading branch information...
1 parent c59e618 commit b5a5533123122541bfae36d616a41ba8989653b9 Linda Nichols committed Mar 19, 2013
@@ -414,6 +414,7 @@ var lang = XT.stringsFor("en_US", {
"_shippingNotes": "Shipping Notes",
"_site": "Site",
"_siteCode": "Site Code",
+ "_showClosed": "Show Closed",
"_showCompleted": "Show Complete",
"_showCompletedOnly": "Show Complete Only",
"_showExpired": "Show Expired",
@@ -1746,7 +1746,7 @@ white:true*/
@returns {String}
*/
getQuoteStatusString: function () {
- var K = this.getClass(),
+ var K = XM.Quote,
status = this.get("status");
return status === K.OPEN_STATUS ? "_open".loc() : "_closed".loc();
}
@@ -145,20 +145,4 @@ white:true*/
XM.characteristicTypes.add(characteristicType);
}
- // Quote Status
- var quoteStatusJson = [
- { id: "O", name: "_open".loc() },
- { id: "C", name: "_closed".loc() }
- ];
- XM.QuoteStatusModel = Backbone.Model.extend({
- });
- XM.QuoteStatusCollection = Backbone.Collection.extend({
- model: XM.QuoteStatusModel
- });
- XM.quoteStatuses = new XM.QuoteStatusCollection();
- for (i = 0; i < quoteStatusJson.length; i++) {
- var quoteStatus = new XM.QuoteStatusModel(quoteStatusJson[i]);
- XM.quoteStatuses.add(quoteStatus);
- }
-
}());
@@ -558,8 +558,20 @@ trailing:true white:true*/
return param;
}
},
+ {name: "showClosed", label: "_showClosed".loc(), attr: "status", defaultKind: "XV.CheckboxWidget",
+ getParameter: function () {
+ var param;
+ if (!this.getValue()) {
+ param = {
+ attribute: this.getAttr(),
+ operator: '!=',
+ value: 'C'
+ };
+ }
+ return param;
+ }
+ },
{name: "number", label: "_number".loc(), attr: "number"},
- {name: "status", attr: "status", label: "_status".loc(), defaultKind: "XV.QuoteStatusPicker"},
{name: "salesRep", attr: "salesRep", label: "_salesRep".loc(), defaultKind: "XV.SalesRepPicker"},
{kind: "onyx.GroupboxHeader", content: "_customer".loc()},
{name: "customer", attr: "customer", label: "_customer".loc(), defaultKind: "XV.CustomerProspectWidget"},
@@ -266,16 +266,6 @@ regexp:true, undef:true, trailing:true, white:true */
});
// ..........................................................
- // TAX TYPE
- //
-
- enyo.kind({
- name: "XV.QuoteStatusPicker",
- kind: "XV.PickerWidget",
- collection: "XM.quoteStatuses"
- });
-
- // ..........................................................
// SALES REP
//

0 comments on commit b5a5533

Please sign in to comment.