2 <html xmlns:ng="http://angularjs.org">
6 <script src="angular.js" ng:autobind></script>
8 <script src="http://code.angularjs.org/0.9.15/angular-0.9.15.min.js"
12 Calendar.$inject = ['$xhr', '$resource'];
14 function Calendar($xhr,$resource){
15 console.info('Calendar');
18 , "/reservations/get/www.google.com/calendar/ical/8tg8ecg285qshtp75813jktqa0%40group.calendar.google.com/private-b9d68b530fde2c6060979f8a05aa0865/basic.ics"
19 , function(code, response){
20 console.log('xhr JSON', code, response);
24 var Reservation = $resource('/data/reservations/prijava/:id');
25 this.reservation = new Reservation();
29 // http://groups.google.com/group/angular/browse_thread/thread/af68afb22fd2d2ab/18fc5e3216a77e53?show_docid=18fc5e3216a77e53
32 <title>Reservations</title>
40 <div ng:controller="Calendar">
42 <h1>{{data.cal['X-WR-CALNAME']}}</h1>
44 <div>{{data.cal['X-WR-CALDESC'] | html}}</div>
47 <li ng:repeat="c in data.events" ng:show="! reservation.UID || reservation.UID == c.UID">
48 {{c.DTSTART}} - {{c.DTEND}}
49 <a href="" ng:click="reservation.UID = c.UID ; reservation.event = c">
52 <div>{{c.LOCATION}}</div>
53 <div ng:show="c.DESCRIPTION">
60 <form ng:show="reservation.UID">
62 <div ng:show="! reservation._id">
63 Popunite vašu prijavu za
64 <b>{{reservation.event.SUMMARY}}</b>
65 <input type=button ng:click="reservation.UID = null" value="Odustani od prijave">
68 <div ng:show="reservation._id && reservation.UID" style="background: #ff8">
70 <b>{{reservation.event.SUMMARY}}</b>
71 <input type=button ng:click="reservation.UID = null" value="Promjeni termin">
75 ime: <input name="reservation.name" ng:required>
77 prezime: <input name="reservation.surname" ng:required>
79 e-mail: <input name="reservation.email" ng:required>
81 odsjek: <input name="reservation.odsjek" ng:required>
83 zvanje: <input name="reservation.zvanje">
85 područke/tema zaninimanja: <input name="reservation.porducje">
87 <input type=button ng:click="reservation.$save()" value="Prijavi me">
88 <pre>{{reservation}}</pre>
91 <input name=debug type=checkbox>
94 reservation={{reservation}}