BOM: applying ofnLineItemUpdAttr directive to quantity field, tracks changes with update-pending class

This commit is contained in:
Rob H
2014-01-31 11:17:27 +08:00
parent a5ffdbb1ba
commit 7dbb7a5c2c
3 changed files with 23 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ orderManagementModule.directive "ofnLineItemUpdAttr", [
element: element
attrName: attrName
url: "/api/orders/#{scope.line_item.order.number}/line_items/#{scope.line_item.id}?line_item[#{attrName}]=#{value}"
pendingChanges.addItem(scope.line_item.id, attrName, changeObj)
pendingChanges.add(scope.line_item.id, attrName, changeObj)
switchClass( element, "update-pending", ["update-error", "update-success"], false )
]