Changeset 1579
- Timestamp:
- 2010-06-29 12:13:52 (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/field.js
r1558 r1579 201 201 202 202 me.parseOptions(data); 203 } 203 }; 204 var errorcallback = function( data) { 205 206 me.clearOptions(data); 207 }; 208 204 209 $.ajax( { 205 210 // take async setting from setup … … 209 214 dataType :"json", 210 215 success :callback, 216 error :errorcallback, 211 217 beforeSend: function(xhr) { 212 218 // setting datatype to json should be enough, unfortunately … … 238 244 this.uriContext[key] = value; 239 245 } else { 240 var context = key; 241 for (var k in context) 242 changedContext = changedContext || this.putContext(k, context[k], true); 246 if(this.uriContext[key] != undefined) { 247 // delete from context 248 delete this.uriContext[key]; 249 changedContext = true; 250 } 243 251 } 244 252 … … 283 291 } 284 292 293 /** 294 * clear the options list 295 * <p> 296 * Note: Updating the HTML should not happen until "update" event triggers the various listeners (e.g. 297 * selection-control#updateOptions) 298 * </p> 299 * @param {Array} data 300 */ 301 Options.prototype.clearOptions = function( data) { 302 303 this.set([], []); 304 } 285 305 286 306
Note: See TracChangeset
for help on using the changeset viewer.