[Edit Mode] Canceling edit mode with unsaved changes now shows confirmation dialog to user. Fixes #664

This commit is contained in:
Henry
2016-06-15 17:10:29 -07:00
parent 717ceff02c
commit c2517c1670
8 changed files with 121 additions and 55 deletions

View File

@ -72,10 +72,10 @@ define(
* Maintain a configuration object on scope that stores column
* configuration. On change, synchronize with object model.
*/
$scope.$watchCollection('configuration.table.columns', function (columns) {
if (columns) {
$scope.$watchCollection('configuration.table.columns', function (newColumns, oldColumns) {
if (newColumns !== oldColumns) {
self.domainObject.useCapability('mutation', function (model) {
model.configuration.table.columns = columns;
model.configuration.table.columns = newColumns;
});
self.domainObject.getCapability('persistence').persist();
}