8
8
< link rel ="stylesheet " href ="calendarDemo.css " />
9
9
10
10
< script src ="../bower_components/jquery/jquery.js "> </ script >
11
+ < script src ="../bower_components/jquery-ui/ui/jquery-ui.js "> </ script >
11
12
12
- < script src ="../bower_components/jquery-ui/ui/jquery.ui.core.js "> </ script >
13
- < script src ="../bower_components/jquery-ui/ui/jquery.ui.widget.js "> </ script >
14
- < script src ="../bower_components/jquery-ui/ui/jquery.ui.mouse.js "> </ script >
15
- < script src ="../bower_components/jquery-ui/ui/jquery.ui.draggable.js "> </ script >
16
- < script src ="../bower_components/jquery-ui/ui/jquery.ui.droppable.js "> </ script >
17
13
< script src ="../bower_components/angular/angular.js "> </ script >
18
14
< script src ="http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.9.0.js "> </ script >
19
15
< script src ="../bower_components/fullcalendar/fullcalendar.js "> </ script >
36
32
< li > < a href ="http://angular-ui.github.com/bootstrap/ "> Bootstrap</ a > </ li >
37
33
< li > < a href ="http://angular-ui.github.com/ng-grid/ "> Grid</ a > </ li >
38
34
< li > < a href ="https://github.com/angular-ui/AngularJs.tmbundle "> AngularJS.tmbundle</ a > </ li >
39
- < li > < a href ="http://angular-ui.github.com /ui-router/ "> Router < span
35
+ < li > < a href ="http://angular-ui.github.io /ui-router/sample / "> Router < span
40
36
class ="label label-success "> New!</ span > </ a > </ li >
41
37
< li > < a href ="http://angular-ui.github.com/Tips-n-Tricks/ "> Tips-n-Tricks < span
42
38
class ="label "> WIP</ span > </ a > </ li >
45
41
</ div >
46
42
</ div >
47
43
</ header >
44
+ < div class ="hero-unit ">
45
+ < div class ="container ">
46
+ < h1 > UI Calendar</ h1 >
47
+ < p > A complete AngularJS directive for the < a href ="http://arshaw.com/fullcalendar/ "> Arshaw FullCalendar</ a > .</ p >
48
+ < p class ="btn-group ">
49
+ < a href ="https://github.com/angular-ui/ui-calendar " class ='btn '> < i class ='icon-github '> </ i > Code on Github</ a >
50
+ < a href ="https://github.com/angular-ui/ui-calendar/archive/master.zip " class ='btn btn-primary '> < i class ="icon-download-alt icon-white "> </ i > Download < small > (0.1.3)</ small > </ a >
51
+ </ p >
52
+ </ div >
53
+ < div class ="bs-docs-social ">
54
+ < div class ="container ">
55
+ < ul class ="bs-docs-social-buttons ">
56
+ < li >
57
+ < iframe src ="http://ghbtns.com/github-btn.html?user=angular-ui&repo=ui-calendar&type=watch&count=true " allowtransparency ="true " frameborder ="0 " scrolling ="0 " width ="110 " height ="20 "> </ iframe >
58
+ </ li >
59
+ < li >
60
+ < iframe src ="http://ghbtns.com/github-btn.html?user=angular-ui&repo=ui-calendar&type=fork&count=true " allowtransparency ="true " frameborder ="0 " scrolling ="0 " width ="95 " height ="20 "> </ iframe >
61
+ </ li >
62
+ < li >
63
+ < div class ="g-plusone " data-size ="medium "> </ div >
64
+ <!-- Place this tag after the last +1 button tag. -->
65
+ < script type ="text/javascript ">
66
+ ( function ( ) {
67
+ var po = document . createElement ( 'script' ) ;
68
+ po . type = 'text/javascript' ;
69
+ po . async = true ;
70
+ po . src = 'https://apis.google.com/js/plusone.js' ;
71
+ var s = document . getElementsByTagName ( 'script' ) [ 0 ] ;
72
+ s . parentNode . insertBefore ( po , s ) ;
73
+ } ) ( ) ;
74
+ </ script >
75
+ </ li >
76
+ </ ul >
77
+ </ div >
78
+ </ div >
79
+ </ div >
48
80
< div role ="main ">
49
-
50
81
< div class ="container ">
51
-
52
82
< section id ="directives-calendar " ng-controller ="CalendarCtrl ">
53
83
< div class ="page-header ">
54
84
< h1 > UI-Calendar</ h1 >
@@ -81,7 +111,8 @@ <h3>Why?</h3>
81
111
< li ng-repeat ="e in events ">
82
112
< div class ="alert alert-info ">
83
113
< a class ="close " ng-click ="remove($index) "> < i class ="icon-remove "> </ i > </ a >
84
- < b > < input ng-model ="e.title "> </ b > - {{e.start | date:"MMM dd"}}
114
+ < b > < input ng-model ="e.title "> </ b >
115
+ {{e.start | date:"MMM dd"}} - {{e.end | date:"MMM dd"}}
85
116
</ div >
86
117
</ li >
87
118
</ ul >
@@ -115,7 +146,7 @@ <h4>{{alertMessage}}</h4>
115
146
< h4 > {{alertMessage}}</ h4 >
116
147
</ div >
117
148
< div class ="btn-toolbar ">
118
- < p class ="pull-right lead "> Calendar One View Options</ p >
149
+ < p class ="pull-right lead "> Calendar Two View Options</ p >
119
150
< div class ="btn-group ">
120
151
< button class ="btn btn-success " ng-click ="changeView('agendaDay', myCalendar2) "> AgendaDay</ button >
121
152
< button class ="btn btn-success " ng-click ="changeView('agendaWeek', myCalendar2) "> AgendaWeek</ button >
@@ -132,7 +163,7 @@ <h4>{{alertMessage}}</h4>
132
163
< h4 > This calendar uses the extended form</ h4 >
133
164
</ div >
134
165
< div class ="btn-toolbar ">
135
- < p class ="pull-right lead "> Calendar One View Options</ p >
166
+ < p class ="pull-right lead "> Calendar Three View Options</ p >
136
167
< div class ="btn-group ">
137
168
< button class ="btn btn-success " ng-click ="changeView('agendaDay', myCalendar3) "> AgendaDay</ button >
138
169
< button class ="btn btn-success " ng-click ="changeView('agendaWeek', myCalendar3) "> AgendaWeek</ button >
@@ -146,10 +177,13 @@ <h4>This calendar uses the extended form</h4>
146
177
</ div >
147
178
</ div >
148
179
< h3 > How?</ h3 >
149
- < pre class ="prettyprint linenums ">
180
+ < pre class ="prettyprint linenums ">
150
181
<div ui-calendar="uiConfig.calendar" class="span8 calendar" ng-model="eventSources"></div>
151
182
152
- angular.module('calendarDemoApp', ['ui.calendar']);
183
+ /**
184
+ * calendarDemoApp - 0.1.3
185
+ */
186
+ angular.module('calendarDemoApp', ['ui.calendar', 'ui.bootstrap']);
153
187
154
188
function CalendarCtrl($scope) {
155
189
var date = new Date();
@@ -179,6 +213,16 @@ <h3>How?</h3>
179
213
var events = [{title: 'Feed Me ' + m,start: s + (50000),end: s + (100000),allDay: false, className: ['customFeed']}];
180
214
callback(events);
181
215
};
216
+
217
+ $scope.calEventsExt = {
218
+ color: '#f00',
219
+ textColor: 'yellow',
220
+ events: [
221
+ {type:'party',title: 'Lunch',start: new Date(y, m, d, 12, 0),end: new Date(y, m, d, 14, 0),allDay: false},
222
+ {type:'party',title: 'Lunch 2',start: new Date(y, m, d, 12, 0),end: new Date(y, m, d, 14, 0),allDay: false},
223
+ {type:'party',title: 'Click for Google',start: new Date(y, m, 28),end: new Date(y, m, 29),url: 'http://google.com/'}
224
+ ]
225
+ };
182
226
/* alert on eventClick */
183
227
$scope.alertEventOnClick = function( date, allDay, jsEvent, view ){
184
228
$scope.$apply(function(){
@@ -224,17 +268,21 @@ <h3>How?</h3>
224
268
$scope.events.splice(index,1);
225
269
};
226
270
/* Change View */
227
- $scope.changeView = function(view, calendar) {
271
+ $scope.changeView = function(view,calendar) {
228
272
calendar.fullCalendar('changeView',view);
229
273
};
274
+ /* Change View */
275
+ $scope.renderCalender = function(calendar) {
276
+ calendar.fullCalendar('render');
277
+ };
230
278
/* config object */
231
279
$scope.uiConfig = {
232
280
calendar:{
233
281
height: 450,
234
282
editable: true,
235
283
header:{
236
- left: 'month basicWeek basicDay agendaWeek agendaDay ',
237
- center: 'title ',
284
+ left: 'title ',
285
+ center: '',
238
286
right: 'today prev,next'
239
287
},
240
288
dayClick: $scope.alertEventOnClick,
@@ -244,28 +292,29 @@ <h3>How?</h3>
244
292
};
245
293
/* event sources array*/
246
294
$scope.eventSources = [$scope.events, $scope.eventSource, $scope.eventsF];
295
+ $scope.eventSources2 = [$scope.calEventsExt, $scope.eventsF, $scope.events];
247
296
}
248
- </ pre >
297
+ /* EOF */
298
+
299
+ </ pre >
249
300
</ section >
250
301
</ div >
251
302
</ div >
303
+ < script type ="text/javascript ">
252
304
253
- < script type ="text/javascript ">
254
-
255
- var _gaq = _gaq || [ ] ;
256
- _gaq . push ( [ '_setAccount' , 'UA-17352735-3' ] ) ;
257
- _gaq . push ( [ '_trackPageview' ] ) ;
258
-
259
- ( function ( ) {
260
- var ga = document . createElement ( 'script' ) ;
261
- ga . type = 'text/javascript' ;
262
- ga . async = true ;
263
- ga . src = ( 'https:' == document . location . protocol ? 'https://ssl' : 'http://www' ) + '.google-analytics.com/ga.js' ;
264
- var s = document . getElementsByTagName ( 'script' ) [ 0 ] ;
265
- s . parentNode . insertBefore ( ga , s ) ;
266
- } ) ( ) ;
305
+ var _gaq = _gaq || [ ] ;
306
+ _gaq . push ( [ '_setAccount' , 'UA-17352735-3' ] ) ;
307
+ _gaq . push ( [ '_trackPageview' ] ) ;
267
308
268
- </ script >
309
+ ( function ( ) {
310
+ var ga = document . createElement ( 'script' ) ;
311
+ ga . type = 'text/javascript' ;
312
+ ga . async = true ;
313
+ ga . src = ( 'https:' == document . location . protocol ? 'https://ssl' : 'http://www' ) + '.google-analytics.com/ga.js' ;
314
+ var s = document . getElementsByTagName ( 'script' ) [ 0 ] ;
315
+ s . parentNode . insertBefore ( ga , s ) ;
316
+ } ) ( ) ;
269
317
270
- </ body >
271
- </ html >
318
+ </ script >
319
+ </ body >
320
+ </ html >
0 commit comments