diff --git a/bower.json b/bower.json index 21193ee..6c82ed7 100644 --- a/bower.json +++ b/bower.json @@ -1,27 +1,27 @@ { - "name": "angular-ui-calendar", - "version": "0.9.0-beta.1", - "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", - "main": "./src/calendar.js", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test*", - "demo*", - "gruntFile.js", - "package.json" - ], - "dependencies": { - "angular": "~1.2.x", - "fullcalendar": "~2.x" - }, - "devDependencies": { - "angular-mocks": "~1.x", - "bootstrap-css": "2.3.1", - "jquery-ui": "~1.10.3" - } + "name" : "angular-ui-calendar", + "version" : "0.9.0-beta.1", + "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", + "main" : "./src/calendar.js", + "ignore" : [ + "**/.*", + "node_modules", + "bower_components", + "test*", + "demo*", + "gruntFile.js", + "package.json" + ], + "dependencies" : { + "angular" : "~1.3.x", + "fullcalendar" : "~2.x" + }, + "devDependencies" : { + "angular-mocks" : "~1.x", + "bootstrap-css" : "2.3.1", + "jquery-ui" : "~1.10.3" + } } diff --git a/src/calendar.js b/src/calendar.js index 89abc17..6baf384 100644 --- a/src/calendar.js +++ b/src/calendar.js @@ -38,10 +38,10 @@ angular.module('ui.calendar', []) this.eventsFingerprint = function(e) { if (!e._id) { - e._id = eventSerialId++; + e._id = e.id ? e.id : ('ui-calendar' + ( eventSerialId++ ));//Search for event 'id' in the passed event object and assign if defined else assign generated id. } // This extracts all the information we need from the event. http://jsperf.com/angular-calendar-events-fingerprint/3 - return "" + e._id + (e.id || '') + (e.title || '') + (e.url || '') + (+e.start || '') + (+e.end || '') + + return "" + e._id + (e.id || '') + (e.title || '') + (e.url || '') + (e.start?(e.start._i||e.start): '') + (e.end?(e.end._i||e.end) : '') + (e.allDay || '') + (e.className || '') + extraEventSignature(e) || ''; };