Fixed new entry cleaning and edit cancel.

This commit is contained in:
Alexis Lahouze 2013-01-25 23:40:47 +01:00
parent 2dd63339f3
commit e4e74eea9f
2 changed files with 2 additions and 0 deletions

BIN
src/html/js/.entries.js.swp Normal file

Binary file not shown.

View File

@ -351,6 +351,7 @@ var ListViewModel = function() {
self.newEntry().label(null); self.newEntry().label(null);
self.newEntry().value(null); self.newEntry().value(null);
self.newEntry().account_id(self.account().id()); // account_id should not change, but just in case... self.newEntry().account_id(self.account().id()); // account_id should not change, but just in case...
self.newEntry().category(null);
}; };
// Function to cancel current editing. // Function to cancel current editing.
@ -363,6 +364,7 @@ var ListViewModel = function() {
self.selectedItem().label(self.savedItem.label); self.selectedItem().label(self.savedItem.label);
self.selectedItem().value(self.savedItem.value); self.selectedItem().value(self.savedItem.value);
self.selectedItem().account_id(self.savedItem.account_id); // account_id should not change, but just in case... self.selectedItem().account_id(self.savedItem.account_id); // account_id should not change, but just in case...
self.selectedItem().category(self.savedItem.category);
} }
// We are cancelling the new entry, just reset it. // We are cancelling the new entry, just reset it.