RSS

trunk : 3610

lpsolit%gmail.com
2005-08-21 22:05:39
Revision ID: cvs-1:lpsolitgmail.com-20050822030539-f7ogqjykg9mk4gbu
Bug 290366: JavaScript error in productmenu.js from editflagtypes.cgi and request.cgi when only one product defined - Patch by Teemu Mannermaa <wicked@etlicon.fi> r/a=myk

collapse all collapse all

added added

removed removed

181
        return;
181
        return;
182
    }
182
    }
183
 
183
 
 
 
184
    // Do nothing if no products are defined (this avoids the
 
 
185
    // "a has no properties" error from merge_arrays function)
 
 
186
    if (f[productfield].length == blank ? 1 : 0) {
 
 
187
        return;
 
 
188
    }
 
 
189
 
184
    // if this is the first load and nothing is selected, no need to
190
    // if this is the first load and nothing is selected, no need to
185
    // merge and sort all components; perl gives it to us sorted.
191
    // merge and sort all components; perl gives it to us sorted.
186
 
192
 
219
        for ( var i = blank ? 1 : 0 ; i < f[productfield].length ; i++ ) {
225
        for ( var i = blank ? 1 : 0 ; i < f[productfield].length ; i++ ) {
220
            sel[sel.length] = f[productfield].options[i].value;
226
            sel[sel.length] = f[productfield].options[i].value;
221
        }
227
        }
222
        single = 0;
228
        // If there is only one product, then only one product can be selected
 
 
229
        single = ( sel.length == 1 );
223
    } else {
230
    } else {
224
 
231
 
225
        for ( i = blank ? 1 : 0 ; i < f[productfield].length ; i++ ) {
232
        for ( i = blank ? 1 : 0 ; i < f[productfield].length ; i++ ) {

Loggerhead runs on Bazaar branches