|
6 | 6 | <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script> |
7 | 7 |
|
8 | 8 | <script src="lib/bootstrap/docs/assets/js/bootstrap.min.js"></script> |
9 | | - <script src="http://code.angularjs.org/1.0.1/angular-1.0.1.min.js"></script> |
| 9 | + <script src="http://code.angularjs.org/1.0.3/angular.js"></script> |
10 | 10 | <script src="angular-ui/build/angular-ui.js"></script> |
11 | 11 | <script src="js/prettify.js"></script> |
12 | 12 | <script src="lib/maskedinput/jquery.maskedinput.js"></script> |
|
16 | 16 | <script src="http://fiddle.tinymce.com/tinymce/3.5.4.1/jquery.tinymce.js"></script> |
17 | 17 | <script src="http://fiddle.tinymce.com/tinymce/3.5.4.1/tiny_mce_jquery_src.js"></script> |
18 | 18 | <script src="http://maps.googleapis.com/maps/api/js?sensor=false"></script> |
| 19 | + <script src="lib/calendar/fullcalendar.js"></script> |
19 | 20 | <script src="js/app.js"></script> |
20 | 21 |
|
21 | 22 | <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css"> |
|
25 | 26 | <link rel="stylesheet" href="lib/select2/select2.css" > |
26 | 27 | <link rel="stylesheet" href="lib/CodeMirror/lib/codemirror.css" > |
27 | 28 | <link rel="stylesheet" href="lib/CodeMirror/theme/monokai.css" > |
| 29 | + <link rel="stylesheet" href="lib/calendar/fullcalendar.css" > |
28 | 30 | <link rel="stylesheet" href="css/app.css" > |
29 | 31 | </head> |
30 | 32 | <body data-spy="scroll"> |
31 | 33 | <header class="navbar navbar-fixed-top"> |
32 | 34 | <div class="navbar-inner"> |
33 | 35 | <div class="container"> |
34 | 36 | <div class="dropdown"> |
35 | | - <a class="brand dropdown-toggle" role="button" data-toggle="dropdown"> |
| 37 | + <a class="brand dropdown-toggle" role="button" data-toggle="dropdown"> |
36 | 38 | AngularUI |
37 | 39 | <b class="caret"></b> |
38 | 40 | </a> |
|
60 | 62 | <li><a scrollto href="#directives-codemirror">CodeMirror IDE</a></li> |
61 | 63 | <li><a scrollto href="#directives-event">Event Binder</a></li> |
62 | 64 | <li><a scrollto href="#directives-map">Google Maps</a></li> |
| 65 | + <li><a scrollto href="#directives-calendar">Calendar</a></li> |
63 | 66 | <li><a scrollto href="#directives-date">Date</a></li> |
64 | 67 | <li><a scrollto href="#directives-keypress">Keypress</a></li> |
65 | 68 | <li><a scrollto href="#directives-mask">Mask</a></li> |
@@ -263,6 +266,68 @@ <h3>How?</h3> |
263 | 266 | </div> |
264 | 267 | </section> |
265 | 268 |
|
| 269 | + <section id="directives-calendar" ng-controller="CalendarCtrl"> |
| 270 | + <div class="page-header"> |
| 271 | + <h1>Calendar</h1> |
| 272 | + </div> |
| 273 | + <div class="well"> |
| 274 | + <div class="row"> |
| 275 | + <div class="span3"> |
| 276 | + <h3>What?</h3> |
| 277 | + <p>Attach Angular objects to a calendar.</p> |
| 278 | + <h3>Why?</h3> |
| 279 | + <p>For easy integration with scope objects.</p> |
| 280 | + <h4>Click to add an Event!</h4> |
| 281 | + </b> |
| 282 | + <button style="margin-bottom: 3px;" class="btn btn-primary" ng-click="addChild()">Add Child</button> |
| 283 | + <ul> |
| 284 | + <li ng-repeat="e in events"> |
| 285 | + <p class="alert alert-info"> |
| 286 | + {{e.title}} |
| 287 | + <a style="float: right; margin-top: -5px;" class="btn btn-danger" ng-click="remove($index)">x</a> |
| 288 | + </p> |
| 289 | + </li> |
| 290 | + </ul> |
| 291 | + |
| 292 | + </div> |
| 293 | + |
| 294 | + <div ui-calendar="{height: 450,editable: true}" class="span8 calendar" ng-model="events"></div> |
| 295 | + </div> |
| 296 | + </div> |
| 297 | + <h3>How?</h3> |
| 298 | + <pre class="prettyprint linenums"> |
| 299 | +<div ui-calendar="{height: 450,editable: true}" class="span8 calendar" ng-model="events"></div> |
| 300 | + |
| 301 | +function CalendarCtrl($scope) { |
| 302 | + var date = new Date(); |
| 303 | + var d = date.getDate(); |
| 304 | + var m = date.getMonth(); |
| 305 | + var y = date.getFullYear(); |
| 306 | + |
| 307 | + $scope.events = [ |
| 308 | + {title: 'All Day Event',start: new Date(y, m, 1)}, |
| 309 | + {title: 'Long Event',start: new Date(y, m, d - 5),end: new Date(y, m, d - 2)}, |
| 310 | + {id: 999,title: 'Repeating Event',start: new Date(y, m, d - 3, 16, 0),allDay: false}, |
| 311 | + {id: 999,title: 'Repeating Event',start: new Date(y, m, d + 4, 16, 0),allDay: false}, |
| 312 | + {title: 'Birthday Party',start: new Date(y, m, d + 1, 19, 0),end: new Date(y, m, d + 1, 22, 30),allDay: false}, |
| 313 | + {title: 'Click for Google',start: new Date(y, m, 28),end: new Date(y, m, 29),url: 'http://google.com/'} |
| 314 | + ] |
| 315 | + |
| 316 | + $scope.addChild = function() { |
| 317 | + $scope.events.push({ |
| 318 | + title: 'Open Sesame', |
| 319 | + start: new Date(y, m, 28), |
| 320 | + end: new Date(y, m, 29) |
| 321 | + }); |
| 322 | + } |
| 323 | + |
| 324 | + $scope.remove = function(index) { |
| 325 | + $scope.events.splice(index,1); |
| 326 | + } |
| 327 | +} |
| 328 | +</pre> |
| 329 | + </section> |
| 330 | + |
266 | 331 | <section id="directives-map" ng-controller="MapCtrl"> |
267 | 332 | <div class="page-header"> |
268 | 333 | <h1>Google Maps</h1> |
|
0 commit comments