Lines 12-18
function addItem( node, unique_item_fields ) {
Link Here
|
12 |
if ( current_qty < max_qty - 1 ) |
12 |
if ( current_qty < max_qty - 1 ) |
13 |
cloneItemBlock(index, unique_item_fields); |
13 |
cloneItemBlock(index, unique_item_fields); |
14 |
addItemInList(index, unique_item_fields); |
14 |
addItemInList(index, unique_item_fields); |
15 |
$("#" + index).find("input[name='buttonPlus']").val("Update"); |
15 |
$("#" + index).find("input[name='buttonPlus']").val( (window.MSG_ADDITEM_JS_UPDATEITEM || "Update item") ); |
16 |
$("#quantity").val(current_qty + 1).change(); |
16 |
$("#quantity").val(current_qty + 1).change(); |
17 |
} else if ( current_qty >= max_qty ) { |
17 |
} else if ( current_qty >= max_qty ) { |
18 |
alert(window.MSG_ADDITEM_JS_CANT_RECEIVE_MORE_ITEMS |
18 |
alert(window.MSG_ADDITEM_JS_CANT_RECEIVE_MORE_ITEMS |
Lines 135-142
function cloneItemBlock(index, unique_item_fields) {
Link Here
|
135 |
}); |
135 |
}); |
136 |
/* Add buttons + and Clear */ |
136 |
/* Add buttons + and Clear */ |
137 |
var buttonPlus = "<fieldset class=\"action\">"; |
137 |
var buttonPlus = "<fieldset class=\"action\">"; |
138 |
var buttonPlusText = _("Add item"); |
138 |
buttonPlus += '<input type="button" class="addItemControl" name="buttonPlus" style="cursor:pointer; margin:0 1em;" onclick="addItem(this,\'' + unique_item_fields + '\')" value="' + (window.MSG_ADDITEM_JS_ADDITEM || 'Add item')+ '" />'; |
139 |
buttonPlus += '<input type="button" class="addItemControl" name="buttonPlus" style="cursor:pointer; margin:0 1em;" onclick="addItem(this,\'' + unique_item_fields + '\')" value="' + buttonPlusText + '" />'; |
|
|
140 |
buttonPlus += '<a class="addItemControl cancel" name="buttonClear" style="cursor:pointer;" onclick="clearItemBlock(this)">' + (window.MSG_ADDITEM_JS_CLEAR || 'Clear') + '</a>'; |
139 |
buttonPlus += '<a class="addItemControl cancel" name="buttonClear" style="cursor:pointer;" onclick="clearItemBlock(this)">' + (window.MSG_ADDITEM_JS_CLEAR || 'Clear') + '</a>'; |
141 |
buttonPlus += "</fieldset>"; |
140 |
buttonPlus += "</fieldset>"; |
142 |
$(clone).append(buttonPlus); |
141 |
$(clone).append(buttonPlus); |
143 |
- |
|
|