From 1d52be415fc33a33b00da92a3ce698e164aae15f Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Fri, 31 Jul 2015 11:18:29 -0400 Subject: [PATCH] (html) Improve Calendar properties dialog --- .../SchedulerUI/UIxCalendarProperties.wox | 128 ++++-------------- .../js/Scheduler/CalendarsController.js | 17 ++- 2 files changed, 36 insertions(+), 109 deletions(-) diff --git a/UI/Templates/SchedulerUI/UIxCalendarProperties.wox b/UI/Templates/SchedulerUI/UIxCalendarProperties.wox index 72866086d..25fbbbac7 100644 --- a/UI/Templates/SchedulerUI/UIxCalendarProperties.wox +++ b/UI/Templates/SchedulerUI/UIxCalendarProperties.wox @@ -7,119 +7,43 @@ xmlns:label="OGo:label" > - -
- -
{{properties.calendar.name}}
+ + +
+ + + + + + + + + close +
+ - - - - - - - - - - - - - - - - -
+ - - - + - - + + +
-
- +
diff --git a/UI/WebServerResources/js/Scheduler/CalendarsController.js b/UI/WebServerResources/js/Scheduler/CalendarsController.js index 67f6ec6f7..4ccc37db6 100644 --- a/UI/WebServerResources/js/Scheduler/CalendarsController.js +++ b/UI/WebServerResources/js/Scheduler/CalendarsController.js @@ -133,16 +133,21 @@ PropertiesDialogController.$inject = ['$mdDialog', 'calendar']; function PropertiesDialogController($mdDialog, calendar) { var vm = this; - vm.calendar = calendar; - vm.close = function() { - $mdDialog.hide(); - }; + vm.calendar = new Calendar(calendar.$omit()); + vm.saveProperties = saveProperties; + vm.close = close; - vm.saveProperties = function() { + function saveProperties() { vm.calendar.$save(); + // Refresh list instance + calendar.init(vm.calendar.$omit()); $mdDialog.hide(); - }; + } + + function close() { + $mdDialog.hide(); + } } }