From: Dobrica Pavlinusic Date: Mon, 17 Oct 2011 21:40:58 +0000 (+0200) Subject: extract event_full and use parseInt X-Git-Url: http://git.rot13.org/?p=angular-mojolicious.git;a=commitdiff_plain;h=1572f9626f456ec5400299670e56879fd7a6dc88 extract event_full and use parseInt --- diff --git a/public/app/reservations/calendar.html b/public/app/reservations/calendar.html index 5dec238..9ede1c4 100644 --- a/public/app/reservations/calendar.html +++ b/public/app/reservations/calendar.html @@ -62,6 +62,14 @@ function Calendar($xhr,$resource,$log){ } } + this.event_full = function(e) { + if ( ! self.submited ) return 0; + + var count = self.submited[e.UID]; + if ( count === undefined ) return 0; + if ( parseInt(count) < parseInt(e.slots) ) return 0; + return 1; + } } // http://groups.google.com/group/angular/browse_thread/thread/af68afb22fd2d2ab/18fc5e3216a77e53?show_docid=18fc5e3216a77e53 @@ -88,13 +96,13 @@ li {
  • {{c.DTSTART}} - {{c.DTEND}} - + {{c.SUMMARY}} prijava: {{submited[c.UID]}} mjesta: {{c.slots}} - + {{c.SUMMARY}} popunjena sva mjesta: {{c.slots}}