From 9dfc42533dc136d2465c66c2b90331753c61c8dc Mon Sep 17 00:00:00 2001 From: Arnelyo Date: Wed, 14 Sep 2016 14:23:34 +0300 Subject: [PATCH 1/2] Update bower.json --- bower.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/bower.json b/bower.json index 91d5ec3..ad76de8 100644 --- a/bower.json +++ b/bower.json @@ -1,10 +1,6 @@ { - "name": "angular-ui-calendar", - "version": "1.0.2", - "description": "A complete AngularJS directive for the Arshaw FullCalendar.", - "author": "https://github.com/angular-ui/ui-calendar/graphs/contributors", - "license": "MIT", - "homepage": "http://angular-ui.github.com", + "name": "cmps-angular-ui-calendar", + "version": "0.0.1", "main": "./src/calendar.js", "ignore": [ "**/.*", From d28e3d606341cba6eff6a25d38993fccc4170a3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B0=D0=B2=D0=B5=D0=BB=20=D0=91=D0=BB=D0=BE=D1=85?= =?UTF-8?q?=D0=B8=D0=BD?= Date: Thu, 15 Sep 2016 11:18:55 +0300 Subject: [PATCH 2/2] Calendar: changed directive name, and names of all controllers associeted --- bower.json | 2 +- src/calendar.js | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/bower.json b/bower.json index ad76de8..b5b67c2 100644 --- a/bower.json +++ b/bower.json @@ -1,5 +1,5 @@ { - "name": "cmps-angular-ui-calendar", + "name": "cmps-ui-calendar", "version": "0.0.1", "main": "./src/calendar.js", "ignore": [ diff --git a/src/calendar.js b/src/calendar.js index b7ae3a0..6c8a957 100644 --- a/src/calendar.js +++ b/src/calendar.js @@ -10,10 +10,10 @@ angular.module('ui.calendar', []) - .constant('uiCalendarConfig', { + .constant('cmpsUiCalendarConfig', { calendars : {} }) - .controller('uiCalendarCtrl', ['$scope', '$locale', + .controller('cmpsUiCalendarCtrl', ['$scope', '$locale', function ($scope, $locale) { var sources = $scope.eventSources; @@ -187,10 +187,10 @@ angular.module('ui.calendar', []) return self; }; - this.getFullCalendarConfig = function (calendarSettings, uiCalendarConfig) { + this.getFullCalendarConfig = function (calendarSettings, cmpsUiCalendarConfig) { var config = {}; - angular.extend(config, uiCalendarConfig); + angular.extend(config, cmpsUiCalendarConfig); angular.extend(config, calendarSettings); angular.forEach(config, function (value, key) { @@ -229,8 +229,8 @@ angular.module('ui.calendar', []) }; } ]) - .directive('uiCalendar', ['uiCalendarConfig', - function (uiCalendarConfig) { + .directive('cmpscmpsUiCalendar', ['cmpsUiCalendarConfig', + function (cmpsUiCalendarConfig) { return { restrict : 'A', @@ -238,7 +238,7 @@ angular.module('ui.calendar', []) eventSources : '=ngModel', calendarWatchEvent : '&' }, - controller : 'uiCalendarCtrl', + controller : 'cmpsUiCalendarCtrl', link : function (scope, elm, attrs, controller) { var sources = scope.eventSources; var sourcesChanged = false; @@ -248,8 +248,8 @@ angular.module('ui.calendar', []) var options = null; function getOptions () { - var calendarSettings = attrs.uiCalendar ? scope.$parent.$eval(attrs.uiCalendar) : {}; - var fullCalendarConfig = controller.getFullCalendarConfig(calendarSettings, uiCalendarConfig); + var calendarSettings = attrs.cmpsUiCalendar ? scope.$parent.$eval(attrs.cmpsUiCalendar) : {}; + var fullCalendarConfig = controller.getFullCalendarConfig(calendarSettings, cmpsUiCalendarConfig); var localeFullCalendarConfig = controller.getLocaleConfig(fullCalendarConfig); angular.extend(localeFullCalendarConfig, fullCalendarConfig); options = { @@ -273,7 +273,7 @@ angular.module('ui.calendar', []) calendar.fullCalendar('destroy'); } if (attrs.calendar) { - calendar = uiCalendarConfig.calendars[attrs.calendar] = angular.element(elm).html(''); + calendar = cmpsUiCalendarConfig.calendars[attrs.calendar] = angular.element(elm).html(''); } else { calendar = angular.element(elm).html(''); } @@ -285,7 +285,7 @@ angular.module('ui.calendar', []) } calendar.fullCalendar(options); if (attrs.calendar) { - uiCalendarConfig.calendars[attrs.calendar] = calendar; + cmpsUiCalendarConfig.calendars[attrs.calendar] = calendar; } }; @@ -297,7 +297,7 @@ angular.module('ui.calendar', []) if (calendar && calendar.fullCalendar) { calendar.fullCalendar(options); if (attrs.calendar) { - uiCalendarConfig.calendars[attrs.calendar] = calendar; + cmpsUiCalendarConfig.calendars[attrs.calendar] = calendar; } calendar.fullCalendar('addEventSource', source); sourcesChanged = true;