From 3a61903e7f1e8c73e81f6da916e8ea91545cafa8 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 28 Sep 2016 12:02:49 -0400 Subject: [PATCH] (js) Add sg-category-stylesheet directive Fixes #3816 --- UI/Templates/SchedulerUI/UIxCalMainView.wox | 2 +- .../sgCategoryStylesheet.directive.js | 44 +++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 UI/WebServerResources/js/Scheduler/sgCategoryStylesheet.directive.js diff --git a/UI/Templates/SchedulerUI/UIxCalMainView.wox b/UI/Templates/SchedulerUI/UIxCalMainView.wox index dfe2e8a90..691577e5a 100644 --- a/UI/Templates/SchedulerUI/UIxCalMainView.wox +++ b/UI/Templates/SchedulerUI/UIxCalMainView.wox @@ -27,7 +27,7 @@ - + diff --git a/UI/WebServerResources/js/Scheduler/sgCategoryStylesheet.directive.js b/UI/WebServerResources/js/Scheduler/sgCategoryStylesheet.directive.js new file mode 100644 index 000000000..1e652dfb0 --- /dev/null +++ b/UI/WebServerResources/js/Scheduler/sgCategoryStylesheet.directive.js @@ -0,0 +1,44 @@ +/* -*- Mode: javascript; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ + +(function() { + /* jshint validthis: true */ + 'use strict'; + + /* + * sgCategoryStylesheet - Add CSS stylesheet for a category's color + * @memberof SOGo.SchedulerUI + * @restrict attribute + * @param {object} ngModel - the object literal describing the category + * @example: + + + */ + function sgCategoryStylesheet() { + return { + restrict: 'E', + require: 'ngModel', + scope: { + ngModel: '=' + }, + replace: true, + template: [ + '' + ].join('') + }; + } + + angular + .module('SOGo.SchedulerUI') + .directive('sgCategoryStylesheet', sgCategoryStylesheet); +})();