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

Fixed event '_id' assignment. #171

Open
wants to merge 4 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
50 changes: 25 additions & 25 deletions bower.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
4 changes: 2 additions & 2 deletions src/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) || '';
};

Expand Down