From b4f9b9095dfc00ad8266cb9ef943c3a5dd392f55 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Mon, 15 Jun 2015 09:53:10 -0400 Subject: [PATCH] (feat) first pass at the calendar properties dialog --- .../ContactsUI/UIxContactFoldersView.wox | 23 +- UI/Templates/SchedulerUI/UIxCalMainView.wox | 72 ++- .../SchedulerUI/UIxCalendarProperties.wox | 412 +++++++----------- .../js/Contacts/AddressBooksController.js | 2 +- .../js/Scheduler/CalendarsController.js | 33 +- 5 files changed, 276 insertions(+), 266 deletions(-) diff --git a/UI/Templates/ContactsUI/UIxContactFoldersView.wox b/UI/Templates/ContactsUI/UIxContactFoldersView.wox index 1cd0f9630..af09ac8fa 100644 --- a/UI/Templates/ContactsUI/UIxContactFoldersView.wox +++ b/UI/Templates/ContactsUI/UIxContactFoldersView.wox @@ -161,7 +161,7 @@ sg-escape="app.revertEditing(folder)"/> - + @@ -231,11 +231,22 @@ sg-enter="app.save(folder)" sg-escape="app.revertEditing(folder)"/> - - - + + + + + + + + + + + + + + diff --git a/UI/Templates/SchedulerUI/UIxCalMainView.wox b/UI/Templates/SchedulerUI/UIxCalMainView.wox index 09d41c26e..916f4301a 100644 --- a/UI/Templates/SchedulerUI/UIxCalMainView.wox +++ b/UI/Templates/SchedulerUI/UIxCalMainView.wox @@ -204,6 +204,12 @@ + + + + + + @@ -232,10 +238,35 @@ ng-false-value="0" label:aria-label="Enable">

{{calendar.name}}

- - - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -259,10 +290,35 @@ ng-false-value="0" label:aria-label="Enable">

{{calendar.name}}

- - - + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UI/Templates/SchedulerUI/UIxCalendarProperties.wox b/UI/Templates/SchedulerUI/UIxCalendarProperties.wox index cc27e7df0..30171851b 100644 --- a/UI/Templates/SchedulerUI/UIxCalendarProperties.wox +++ b/UI/Templates/SchedulerUI/UIxCalendarProperties.wox @@ -1,253 +1,165 @@ - - - - - - -
- -
-
    -
  • -
  • -
  • -
  • -
-
-
- - -
- -
-
-
-
-
- - -
- -
-
- -
- -
-
-
-
- - - -
- -
-
-
-
-
-
-
-
- -
-
- -
- -
-
-
- - - - - - + + + + + + + + +

- {{properties.calendar.name}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + +
-
- - - - -
-
- - + + + + diff --git a/UI/WebServerResources/js/Contacts/AddressBooksController.js b/UI/WebServerResources/js/Contacts/AddressBooksController.js index 62f06395c..9f7ad529c 100644 --- a/UI/WebServerResources/js/Contacts/AddressBooksController.js +++ b/UI/WebServerResources/js/Contacts/AddressBooksController.js @@ -125,7 +125,7 @@ */ LinksDialogController.$inject = ['scope', '$mdDialog']; function LinksDialogController(scope, $mdDialog) { - scope.close = function(type) { + scope.close = function() { $mdDialog.hide(); } } diff --git a/UI/WebServerResources/js/Scheduler/CalendarsController.js b/UI/WebServerResources/js/Scheduler/CalendarsController.js index e7bae8a4a..ffbdbaf0f 100644 --- a/UI/WebServerResources/js/Scheduler/CalendarsController.js +++ b/UI/WebServerResources/js/Scheduler/CalendarsController.js @@ -17,6 +17,7 @@ vm.confirmDelete = confirmDelete; vm.share = share; vm.showLinks = showLinks; + vm.showProperties = showProperties; vm.subscribeToFolder = subscribeToFolder; // Dispatch the event named 'calendars:list' when a calendar is activated or deactivated or @@ -108,9 +109,39 @@ */ LinksDialogController.$inject = ['scope', '$mdDialog']; function LinksDialogController(scope, $mdDialog) { - scope.close = function(type) { + scope.close = function() { $mdDialog.hide(); + }; + } + } + + function showProperties(calendar) { + $mdDialog.show({ + templateUrl: calendar.id + '/properties', + controller: PropertiesDialogController, + controllerAs: 'properties', + clickOutsideToClose: true, + escapeToClose: true, + locals: { + calendar: calendar } + }); + + /** + * @ngInject + */ + PropertiesDialogController.$inject = ['$mdDialog', 'calendar']; + function PropertiesDialogController($mdDialog, calendar) { + var vm = this; + vm.calendar = calendar; + + vm.close = function() { + $mdDialog.hide(); + }; + + vm.saveProperties = function() { + vm.calendar.$save(); + }; } }