Fixed indenting

This commit is contained in:
Karl Cordes 2014-04-21 15:30:09 +10:00
parent a50ec14b5d
commit 38499864a9

View file

@ -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();
});