Changeset 1916


Ignore:
Timestamp:
2011-07-25 13:28:42 (10 months ago)
Author:
jgou
Message:

fix incomplete patch of r1913 (see #464)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/kauri-forms/kauri-forms-framework/src/main/kauri/static-{build}.key/kauri.forms/field.js

    r1913 r1916  
    160160    Options.prototype.set = function( values, labels) { 
    161161        values = $.extend([], values); //clone to avoid issue #464 
    162         labels = labels ? $.extend([], labels) : null;  
     162        labels = labels ? $.extend([], labels) : null; 
     163         
    163164        if (this.type) { 
    164165            this.userValues = new Array(); 
    165             var last = this.values ? this.values.length : 0; 
     166            var last = values ? values.length : 0; 
    166167            for(var i = 0; i< last; i++) 
    167                 if (typeof this.values[i] == 'string' ) 
     168                if (typeof values[i] == 'string' ) 
    168169                    this.userValues[i] = values[i]; 
    169170                else 
     
    180181            for (var i = values.length; i>0; i--) { 
    181182                values[i] = values[i-1]; 
    182                 labels[i] = labels[i-1];  
     183                labels[i] = labels[i-1]; 
    183184                this.userValues[i] = this.userValues[i-1]; 
    184185            } 
Note: See TracChangeset for help on using the changeset viewer.