- Timestamp:
- 06/10/13 01:07:16 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/src/client/qed-client/widgets/_ComplexValueMixin.js
r443 r461 3 3 "dijit/form/_FormMixin", 4 4 "dojo/_base/array", 5 "dojo/_base/declare" 6 ], function(_Container, _FormMixin, array, declare) { 5 "dojo/_base/declare", 6 "dojo/_base/event" 7 ], function(_Container, _FormMixin, array, declare, event) { 7 8 return declare([_Container,_FormMixin],{ 8 9 name: "", … … 10 11 disabled: false, 11 12 readOnly: false, 13 postCreate: function() { 14 this.inherited(arguments); 15 if ( this.domNode.tagName.toLowerCase() !== "form" ) { 16 console.warn("Not scoping a _ComplexValueMixin in a form element can cause name clashes. E.g. radio buttons might stop working correctly. It is recommended to use <form> as the root element in your template for "+this.declaredClass+"."); 17 } 18 }, 12 19 _setDisabledAttr: function(value) { 13 20 this._set("disabled", value); … … 27 34 children[0].focus(); 28 35 } 36 }, 37 onSubmit: function(e) { 38 // since this widget is used to create more complex 39 // widgets within other forms, the onSubmit must either be 40 // ignored or propagated, but not handled here. 41 if ( e ) { event.stop(e); } 42 return false; 43 }, 44 _onSubmit: function(e) { 45 // since this widget is used to create more complex 46 // widgets within other forms, the onSubmit must either be 47 // ignored or propagated, but not handled here. 48 if ( e ) { event.stop(e); } 49 return false; 29 50 } 30 51 });
Note: See TracChangeset
for help on using the changeset viewer.