From 1572f9626f456ec5400299670e56879fd7a6dc88 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Mon, 17 Oct 2011 23:40:58 +0200 Subject: [PATCH] extract event_full and use parseInt --- public/app/reservations/calendar.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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}} -- 2.20.1