Initial drag'n'drop support in Calendar module

TODO:
- drag'n'drop in month's view;
- drag to create an all-day event;
- drag'n'drop to a calendar in the sidenav;
- touchscreen gestures support.
This commit is contained in:
Francis Lachapelle
2015-11-06 15:12:24 -05:00
parent fc16d6ad90
commit 2e02380a93
18 changed files with 1187 additions and 108 deletions
@@ -23,7 +23,7 @@
// Load all attributes of component
if (angular.isUndefined(vm.component.$futureComponentData)) {
component = Calendar.$get(vm.component.c_folder).$getComponent(vm.component.c_name, vm.component.c_recurrence_id);
component = Calendar.$get(vm.component.pid).$getComponent(vm.component.id, vm.component.occurrenceId);
component.$futureComponentData.then(function() {
vm.component = component;
vm.organizer = [vm.component.organizer];
@@ -72,7 +72,7 @@
var c = component || vm.component;
c.$reply().then(function() {
$rootScope.$broadcast('calendars:list');
$rootScope.$emit('calendars:list');
$mdDialog.hide();
Alarm.getAlarms();
});
@@ -94,14 +94,14 @@
function deleteOccurrence() {
vm.component.remove(true).then(function() {
$rootScope.$broadcast('calendars:list');
$rootScope.$emit('calendars:list');
$mdDialog.hide();
});
}
function deleteAllOccurrences() {
vm.component.remove().then(function() {
$rootScope.$broadcast('calendars:list');
$rootScope.$emit('calendars:list');
$mdDialog.hide();
});
}
@@ -222,7 +222,7 @@
if (form.$valid) {
vm.component.$save()
.then(function(data) {
$rootScope.$broadcast('calendars:list');
$rootScope.$emit('calendars:list');
$mdDialog.hide();
Alarm.getAlarms();
}, function(data, status) {
@@ -237,7 +237,7 @@
// Cancelling the creation of a component
vm.component = null;
}
$mdDialog.hide();
$mdDialog.cancel();
}
function getDays() {