Blame view
app/partials/scheduler/scheduler.controller.js
1.61 KB
feacde5ff
|
1 |
'use strict'; |
a55ef20b5
![]() |
2 3 |
//Load controller angular.module('acufuel') |
feacde5ff
|
4 |
|
03cf7c388
![]() |
5 |
.controller('schedulerController', ['$scope','$compile', 'uiCalendarConfig', function($scope, $compile, uiCalendarConfig) { |
feacde5ff
|
6 7 |
$scope.test = "Testing..."; |
03cf7c388
![]() |
8 9 10 11 12 13 |
var date = new Date(); var d = date.getDate(); var m = date.getMonth(); var y = date.getFullYear(); |
e95d89b77
![]() |
14 |
|
03cf7c388
![]() |
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
$scope.eventList=[ {title:'Event 1'}, {title:'Event 2'}, {title:'Event 3'}, {title:'Event 4'} ]; $scope.eventSources=[]; $scope.events = [ {title: 'All Day Event', start: new Date(y, m, 1)}, {title: 'Birthday Party', start: new Date(y, m, d + 1, 19, 0), end: new Date(y, m, d + 1, 22, 30), allDay: false}, {title: 'Click for Google', start: new Date(y, m, 28), end: new Date(y, m, 29)} ]; $scope.uiConfig = { calendar:{ height: 450, editable: true, droppable: true, drop: function (date, allDay, jsEvent, ui) { console.log('Here ,but where is the object?'); }, header:{ left: 'title', center: '', right: 'today prev,next' }, eventResize: true, |
a55ef20b5
![]() |
44 |
} |
03cf7c388
![]() |
45 |
}; |
a55ef20b5
![]() |
46 |
|
03cf7c388
![]() |
47 48 49 50 51 52 53 54 55 56 57 |
$scope.eventSources = [$scope.events]; //$scope.eventSources = []; //$scope.eventSources.push($scope.events); $scope.addEvent = function(index) { console.log('INDEX', index); console.log('EVENTS', $scope.eventSources); //$scope.events.push($scope.eventList[index]); } console.log($scope.eventSources); |
feacde5ff
|
58 |
|
a55ef20b5
![]() |
59 |
}]); |
feacde5ff
|
60 |