a:25:{s:9:"#provides";s:29:"dojox.form.manager._FormMixin";s:9:"#resource";s:26:"form/manager/_FormMixin.js";s:9:"#requires";a:1:{i:0;a:2:{i:0;s:6:"common";i:1;s:25:"dojox.form.manager._Mixin";}}s:29:"dojox.form.manager._FormMixin";a:3:{s:4:"type";s:8:"Function";s:7:"summary";s:53:"Form manager's mixin for form-specific functionality.";s:9:"classlike";b:1;}s:34:"dojox.form.manager._FormMixin.name";a:2:{s:9:"prototype";s:29:"dojox.form.manager._FormMixin";s:7:"summary";s:0:"";}s:36:"dojox.form.manager._FormMixin.action";a:2:{s:9:"prototype";s:29:"dojox.form.manager._FormMixin";s:7:"summary";s:0:"";}s:36:"dojox.form.manager._FormMixin.method";a:2:{s:9:"prototype";s:29:"dojox.form.manager._FormMixin";s:7:"summary";s:0:"";}s:37:"dojox.form.manager._FormMixin.encType";a:2:{s:9:"prototype";s:29:"dojox.form.manager._FormMixin";s:7:"summary";s:0:"";}s:44:"dojox.form.manager._FormMixin.accept-charset";a:2:{s:9:"prototype";s:29:"dojox.form.manager._FormMixin";s:7:"summary";s:0:"";}s:36:"dojox.form.manager._FormMixin.accept";a:2:{s:9:"prototype";s:29:"dojox.form.manager._FormMixin";s:7:"summary";s:0:"";}s:36:"dojox.form.manager._FormMixin.target";a:2:{s:9:"prototype";s:29:"dojox.form.manager._FormMixin";s:7:"summary";s:0:"";}s:37:"dojox.form.manager._FormMixin.startup";a:4:{s:9:"prototype";s:29:"dojox.form.manager._FormMixin";s:4:"type";s:8:"Function";s:6:"source";s:229:" this.isForm = this.domNode.tagName.toLowerCase() == "form"; if(this.isForm){ this.connect(this.domNode, "onreset", "_onReset"); this.connect(this.domNode, "onsubmit", "_onSubmit"); } this.inherited(arguments);";s:7:"summary";s:0:"";}s:38:"dojox.form.manager._FormMixin._onReset";a:7:{s:9:"prototype";s:29:"dojox.form.manager._FormMixin";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"evt";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:1706:"dojo.provide("dojox.form.manager._FormMixin"); dojo.require("dojox.form.manager._Mixin"); (function(){ var fm = dojox.form.manager, aa = fm.actionAdapter; dojo.declare("dojox.form.manager._FormMixin", null, { // summary: // Form manager's mixin for form-specific functionality. // description: // This mixin adds automated "onreset", and "onsubmit" event processing // if we are based on a form node, defines onReset(), onSubmit(), // reset(), submit(), and isValid() methods like dijit.form.Form. // It should be used together with dojox.form.manager.Mixin. // HTML
attributes (if we are based on the form element) name: "", action: "", method: "", encType: "", "accept-charset": "", accept: "", target: "", startup: function(){ this.isForm = this.domNode.tagName.toLowerCase() == "form"; if(this.isForm){ this.connect(this.domNode, "onreset", "_onReset"); this.connect(this.domNode, "onsubmit", "_onSubmit"); } this.inherited(arguments); }, // form-specific functionality _onReset: function(evt){ // NOTE: this function is taken from dijit.formForm, it works only // for form-based managers. // create fake event so we can know if preventDefault() is called var faux = { returnValue: true, // the IE way preventDefault: function(){ // not IE this.returnValue = false; }, stopPropagation: function(){}, currentTarget: evt.currentTarget, target: evt.target }; // if return value is not exactly false, and haven't called preventDefault(), then reset if(!(this.onReset(faux) === false) && faux.returnValue){ this.reset(); } dojo.stopEvent(evt); return false;";s:7:"returns";s:10:"the IE way";s:7:"private";b:1;s:7:"summary";s:0:"";}s:37:"dojox.form.manager._FormMixin.onReset";a:5:{s:9:"prototype";s:29:"dojox.form.manager._FormMixin";s:4:"type";s:8:"Function";s:6:"source";s:26:" return true; // Boolean";s:7:"summary";s:221:"Callback when user resets the form. This method is intended to be over-ridden. When the `reset` method is called programmatically, the return value from `onReset` is used to compute whether or not resetting should proceed";s:7:"returns";s:7:"Boolean";}s:35:"dojox.form.manager._FormMixin.reset";a:4:{s:9:"prototype";s:29:"dojox.form.manager._FormMixin";s:4:"type";s:8:"Function";s:6:"source";s:174:" this.inspectFormWidgets(aa(function(_, widget){ if(widget.reset){ widget.reset(); } })); if(this.isForm){ this.domNode.reset(); } return this;";s:7:"summary";s:26:"Resets form widget values.";}s:39:"dojox.form.manager._FormMixin._onSubmit";a:7:{s:9:"prototype";s:29:"dojox.form.manager._FormMixin";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"evt";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:2520:"dojo.provide("dojox.form.manager._FormMixin"); dojo.require("dojox.form.manager._Mixin"); (function(){ var fm = dojox.form.manager, aa = fm.actionAdapter; dojo.declare("dojox.form.manager._FormMixin", null, { // summary: // Form manager's mixin for form-specific functionality. // description: // This mixin adds automated "onreset", and "onsubmit" event processing // if we are based on a form node, defines onReset(), onSubmit(), // reset(), submit(), and isValid() methods like dijit.form.Form. // It should be used together with dojox.form.manager.Mixin. // HTML attributes (if we are based on the form element) name: "", action: "", method: "", encType: "", "accept-charset": "", accept: "", target: "", startup: function(){ this.isForm = this.domNode.tagName.toLowerCase() == "form"; if(this.isForm){ this.connect(this.domNode, "onreset", "_onReset"); this.connect(this.domNode, "onsubmit", "_onSubmit"); } this.inherited(arguments); }, // form-specific functionality _onReset: function(evt){ // NOTE: this function is taken from dijit.formForm, it works only // for form-based managers. // create fake event so we can know if preventDefault() is called var faux = { returnValue: true, // the IE way preventDefault: function(){ // not IE this.returnValue = false; }, stopPropagation: function(){}, currentTarget: evt.currentTarget, target: evt.target }; // if return value is not exactly false, and haven't called preventDefault(), then reset if(!(this.onReset(faux) === false) && faux.returnValue){ this.reset(); } dojo.stopEvent(evt); return false; }, onReset: function(){ // summary: // Callback when user resets the form. This method is intended // to be over-ridden. When the `reset` method is called // programmatically, the return value from `onReset` is used // to compute whether or not resetting should proceed return true; // Boolean }, reset: function(){ // summary: // Resets form widget values. this.inspectFormWidgets(aa(function(_, widget){ if(widget.reset){ widget.reset(); } })); if(this.isForm){ this.domNode.reset(); } return this; }, _onSubmit: function(evt){ // NOTE: this function is taken from dijit.formForm, it works only // for form-based managers. if(this.onSubmit(evt) === false){ // only exactly false stops submit dojo.stopEvent(evt); }";s:7:"returns";s:18:"the IE way|Boolean";s:7:"private";b:1;s:7:"summary";s:0:"";}s:38:"dojox.form.manager._FormMixin.onSubmit";a:5:{s:9:"prototype";s:29:"dojox.form.manager._FormMixin";s:4:"type";s:8:"Function";s:6:"source";s:36:" return this.isValid(); // Boolean";s:7:"summary";s:293:"Callback when user submits the form. This method is intended to be over-ridden, but by default it checks and returns the validity of form elements. When the `submit` method is called programmatically, the return value from `onSubmit` is used to compute whether or not submission should proceed";s:7:"returns";s:7:"Boolean";}s:36:"dojox.form.manager._FormMixin.submit";a:4:{s:9:"prototype";s:29:"dojox.form.manager._FormMixin";s:4:"type";s:8:"Function";s:6:"source";s:96:" if(this.isForm){ if(!(this.onSubmit() === false)){ this.domNode.submit(); } }";s:7:"summary";s:71:"programmatically submit form if and only if the `onSubmit` returns true";}s:37:"dojox.form.manager._FormMixin.isValid";a:4:{s:9:"prototype";s:29:"dojox.form.manager._FormMixin";s:4:"type";s:8:"Function";s:6:"source";s:303:" for(var name in this.formWidgets){ var stop = false; aa(function(_, widget){ if(!widget.attr("disabled") && widget.isValid && !widget.isValid()){ stop = true; } }).call(this, null, this.formWidgets[name].widget); if(stop){ return false; } } return true;";s:7:"summary";s:71:"Make sure that every widget that has a validator function returns true.";}s:36:"dojox.form.manager._FormMixin.isForm";a:2:{s:8:"instance";s:29:"dojox.form.manager._FormMixin";s:7:"summary";s:0:"";}s:41:"dojox.form.manager._FormMixin.returnValue";a:2:{s:8:"instance";s:29:"dojox.form.manager._FormMixin";s:7:"summary";s:0:"";}s:2:"aa";a:1:{s:7:"summary";s:0:"";}s:18:"dojox.form.manager";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:10:"dojox.form";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}