Fixed indenting
This commit is contained in:
parent
a50ec14b5d
commit
38499864a9
|
|
@ -13,7 +13,7 @@ $(function() {
|
|||
/**
|
||||
* A more generic way of handling the HABTM <ul> <li>[REMOVE BUTTON] NAME [HIDDEN INPUT]</li> </ul>
|
||||
* Copypasta'd from add_edit_shipment.js.
|
||||
*/
|
||||
*/
|
||||
function addToList(modelName, id, value, ULelement) {
|
||||
var thisLI = $('<li></li>');
|
||||
var thisButton = $('<button>X</button>');
|
||||
|
|
@ -24,25 +24,25 @@ $(function() {
|
|||
|
||||
var modelString = '['+modelName+']';
|
||||
|
||||
thisHiddenInput.attr('name', 'data[PurchaseOrder]'+modelString+'[]');
|
||||
thisHiddenInput.attr('name', 'data[PurchaseOrder]'+modelString+'[]');
|
||||
|
||||
thisHiddenInput.attr('value', id);
|
||||
thisHiddenInput.attr('value', id);
|
||||
|
||||
thisLI.attr('id', modelName+'ID_'+id);
|
||||
thisLI.html(value);
|
||||
thisLI.prepend(thisButton);
|
||||
thisLI.append(thisHiddenInput);
|
||||
ULelement.append(thisLI);
|
||||
thisLI.attr('id', modelName+'ID_'+id);
|
||||
thisLI.html(value);
|
||||
thisLI.prepend(thisButton);
|
||||
thisLI.append(thisHiddenInput);
|
||||
ULelement.append(thisLI);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Remove X button clicked.
|
||||
$('.removeFromList').live('click', function() {
|
||||
$(this).parent().remove();
|
||||
});
|
||||
//Remove X button clicked.
|
||||
$('.removeFromList').live('click', function() {
|
||||
$(this).parent().remove();
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue