Changeset 1481
- Timestamp:
- 2010-04-01 13:59:29 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/kauri-forms/kauri-forms-framework/src/main/kauri/static-{build}.key/kauri.forms/control.js
r1479 r1481 208 208 store.addTypeAndControl(index, $this.attr(ControlElements.ATTR_TYPE), $this.attr(ControlElements.ATTR_CONTROL)); 209 209 210 var valueAttr = $this.attr("value"); 211 var disabledAttr = $this.attr("disabled"); 212 var typeAttr = $this.attr("type"); 213 214 if(valueAttr || disabledAttr || typeAttr) { 215 var initial = {}; 216 initial.value = valueAttr; 217 initial.disabled = disabledAttr; 218 initial.type = typeAttr; 219 store.addInitialProperties(index, initial); 210 if(!forceReIndexing) { 211 var valueAttr = $this.attr("value"); 212 var disabledAttr = $this.attr("disabled"); 213 var typeAttr = $this.attr("type"); 214 215 if(valueAttr || disabledAttr || typeAttr) { 216 var initial = {}; 217 initial.value = valueAttr; 218 initial.disabled = disabledAttr; 219 initial.type = typeAttr; 220 store.addInitialProperties(index, initial); 221 } 220 222 } 221 223 }; … … 341 343 if (this.elementIndex[index].initial){ 342 344 type['control'] = type['control'] || {}; 345 343 346 if(!type['control'].base){ 344 347 // if base type of control is not filled in : default to control of fieldtype 345 348 var fieldtype = this.fieldTypes.get(type['base']); 346 var control = (new fieldtype).control;347 type['control'].base = control ;349 var controlType = (new fieldtype).control; 350 type['control'].base = controlType; 348 351 } 349 352 type['control']['initial'] = this.elementIndex[index].initial;
Note: See TracChangeset
for help on using the changeset viewer.