client/skr/screens/customer-maint/CustomerMaint.coffee in stockor-0.1.5 vs client/skr/screens/customer-maint/CustomerMaint.coffee in stockor-0.1.7

- old
+ new

@@ -1,25 +1,14 @@ class Skr.Screens.CustomerMaint extends Skr.Screens.Base - FILE: FILE + mixins:[ + Skr.Screens.Mixins.Editing + ] - constructor: -> - super - this.reset() - useFormBindings: true - domEvents: - 'click .btn.save': 'save' - 'click .btn.reset': 'reset' - 'display-record': 'onRecordTrigger' - subviews: - finder: - component: 'RecordFinder' - options: 'finderOptions' - model: 'model' terms: component: 'SelectField' model: 'model' options: { association: 'terms', mappings: { title: 'code' } } billaddr: @@ -35,15 +24,5 @@ modelClass: Skr.Models.Customer title: 'Find Customer', invalid_chars: Skr.Models.Mixins.CodeField.invalidChars withAssociations: ['billing_address', 'shipping_address', 'terms'] fields: [ 'code', 'name', 'notes', 'credit_limit' ] - - reset: -> - this.model = new Skr.Models.Customer - - save: -> - Lanes.Views.SaveNotify(this, include:['billing_address','shipping_address','terms']) - - onRecordTrigger: (ev, model)-> - this.model = model - window.c = model