projects
/
angular-mojolicious.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d0e0b80
)
use Angular's . instead of console. so it works in IE
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 13 Oct 2011 12:25:06 +0000
(14:25 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 13 Oct 2011 12:25:06 +0000
(14:25 +0200)
public/app/reservations/calendar.html
patch
|
blob
|
history
diff --git
a/public/app/reservations/calendar.html
b/public/app/reservations/calendar.html
index
f947f21
..
a7c13b7
100644
(file)
--- a/
public/app/reservations/calendar.html
+++ b/
public/app/reservations/calendar.html
@@
-9,15
+9,15
@@
ng:autobind></script>
<script>
ng:autobind></script>
<script>
-Calendar.$inject = ['$xhr', '$resource'
];
+Calendar.$inject = ['$xhr', '$resource'
,'$log'];
-function Calendar($xhr,$resource){
-
console
.info('Calendar');
+function Calendar($xhr,$resource
,$log
){
+
$log
.info('Calendar');
var self = this;
$xhr("GET"
, "/reservations/get/www.google.com/calendar/ical/8tg8ecg285qshtp75813jktqa0%40group.calendar.google.com/private-b9d68b530fde2c6060979f8a05aa0865/basic.ics"
, function(code, response){
var self = this;
$xhr("GET"
, "/reservations/get/www.google.com/calendar/ical/8tg8ecg285qshtp75813jktqa0%40group.calendar.google.com/private-b9d68b530fde2c6060979f8a05aa0865/basic.ics"
, function(code, response){
-
console
.log('xhr calendar', code, response);
+
$log
.log('xhr calendar', code, response);
self.data = response;
}
);
self.data = response;
}
);
@@
-29,7
+29,7
@@
function Calendar($xhr,$resource){
$xhr("GET"
, "/reservations/events/submited"
, function(code, response){
$xhr("GET"
, "/reservations/events/submited"
, function(code, response){
-
console
.log('xhr submited', code, response);
+
$log
.log('xhr submited', code, response);
self.submited = response;
}
);
self.submited = response;
}
);
@@
-39,7
+39,7
@@
function Calendar($xhr,$resource){
self.reservation.status = 'event';
this.select_event = function(c) {
self.reservation.status = 'event';
this.select_event = function(c) {
-
console
.info('select_event', c);
+
$log
.info('select_event', c);
self.reservation.event = c;
self.reservation.status = 'changed';
if (self.submited) self.reservation.slot_nr = ++self.submited[c.UID];
self.reservation.event = c;
self.reservation.status = 'changed';
if (self.submited) self.reservation.slot_nr = ++self.submited[c.UID];
@@
-53,12
+53,12
@@
function Calendar($xhr,$resource){
this.save_submission = function() {
if ( self.reservation && self.reservation.event ) {
this.save_submission = function() {
if ( self.reservation && self.reservation.event ) {
-
console
.info('submit save');
+
$log
.info('submit save');
self.reservation.status = 'saved';
self.reservation.$save();
self.load_submited();
} else {
self.reservation.status = 'saved';
self.reservation.$save();
self.load_submited();
} else {
-
console
.info('submit ignored');
+
$log
.info('submit ignored');
}
}
}
}