Subversion Repositories SmartDukaan

Rev

Rev 23989 | Rev 24033 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 23989 Rev 23990
Line 62... Line 62...
62
        $.ajax({
62
        $.ajax({
63
            type      : 'POST',
63
            type      : 'POST',
64
            url       : '/Support/bulk-order',
64
            url       : '/Support/bulk-order',
65
            data      : $('form#bulk-order').serialize(),
65
            data      : $('form#bulk-order').serialize(),
66
            success   : function(response) {
66
            success   : function(response) {
-
 
67
            	$('table#bulk-order-items tbody>tr').each(function(rowIndex, rowElement) {
-
 
68
                    // Skipping first sample row
-
 
69
                    if (rowIndex != 0) {
-
 
70
                        $(rowElement).find('input').each(function(inputIndex, inputElement) {
-
 
71
                            if ($(inputElement).attr('name').indexOf('.') >= 0) {
-
 
72
                                $(inputElement).attr('name', $(inputElement).attr('name').split('.')[1]);
-
 
73
                            }
-
 
74
                        });
-
 
75
                    }
-
 
76
                });
67
                if ($(response).attr('id') == 'error') {
77
                if ($(response).attr('id') == 'error') {
68
                    $('div#error').html(response);
78
                    $('div#error').html(response);
69
                    $('table#bulk-order-items tbody>tr').each(function(rowIndex, rowElement) {
-
 
70
                        // Skipping first sample row
-
 
71
                        if (rowIndex != 0) {
-
 
72
                            $(rowElement).find('input').each(function(inputIndex, inputElement) {
-
 
73
                                if ($(inputElement).attr('name').indexOf('.') > 0) {
-
 
74
                                    $(inputElement).attr('name', $(inputElement).attr('name').split('.')[1]);
-
 
75
                                }
-
 
76
                            });
-
 
77
                        }
-
 
78
                    });
-
 
79
                }
79
                }
80
                else {
80
                else {
81
                    document.write(response);
81
                    document.write(response);
82
                }
82
                }
83
            }
83
            }