Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Updating bower.json #451

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions bower.json
Original file line number Diff line number Diff line change
@@ -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-ui-calendar",
"version": "0.0.1",
"main": "./src/calendar.js",
"ignore": [
"**/.*",
Expand Down
24 changes: 12 additions & 12 deletions src/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -229,16 +229,16 @@ angular.module('ui.calendar', [])
};
}
])
.directive('uiCalendar', ['uiCalendarConfig',
function (uiCalendarConfig) {
.directive('cmpscmpsUiCalendar', ['cmpsUiCalendarConfig',
function (cmpsUiCalendarConfig) {

return {
restrict : 'A',
scope : {
eventSources : '=ngModel',
calendarWatchEvent : '&'
},
controller : 'uiCalendarCtrl',
controller : 'cmpsUiCalendarCtrl',
link : function (scope, elm, attrs, controller) {
var sources = scope.eventSources;
var sourcesChanged = false;
Expand All @@ -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 = {
Expand All @@ -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('');
}
Expand All @@ -285,7 +285,7 @@ angular.module('ui.calendar', [])
}
calendar.fullCalendar(options);
if (attrs.calendar) {
uiCalendarConfig.calendars[attrs.calendar] = calendar;
cmpsUiCalendarConfig.calendars[attrs.calendar] = calendar;
}
};

Expand All @@ -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;
Expand Down