netzkeBulkExecute does not work properly on IE8

41 views
Skip to first unread message

Daniel David

unread,
Apr 11, 2014, 1:33:01 AM4/11/14
to net...@googlegroups.com
This solves the issue with empty arguments passed to apply function.

/netzke-core-0.10.0.rc2/javascripts/base.js

  netzkeBulkExecute : function(instructions){
    if (Ext.isArray(instructions)) {
      Ext.each(instructions, function(instruction){ this.netzkeBulkExecute(instruction)}, this);
    } else {
      for (var instr in instructions) {
        var args = instructions[instr];
        if(args instanceof Object && (Ext.Object.getSize(args)==0))
          args = [];

        if (Ext.isFunction(this[instr])) {
          // Executing the method.
          this[instr].apply(this, args);
        } else {
          var childComponent = this.netzkeGetComponent(instr);
          if (childComponent) {
            childComponent.netzkeBulkExecute(args);
          } else if (Ext.isArray(args)) { // only consider those calls that have arguments wrapped in an array; the only (probably) case when they are not, is with 'success' property set to true in a non-ajax form submit - silently ignore that
            throw "Netzke: Unknown method or child component '" + instr + "' in component '" + this.id + "'"
          }
        }
      }
    }
  }
Reply all
Reply to author
Forward
0 new messages