fix symposium $resource
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 7 Nov 2010 20:55:08 +0000 (21:55 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 7 Nov 2010 20:55:08 +0000 (21:55 +0100)
templates/conference/Registration.html.ep

index 8511e62..ac1e31b 100644 (file)
@@ -69,12 +69,12 @@ console.debug( 'reset', current_symposium, this.registration, this.$location.has
 
                        // save symposium to separate resource
                        if ( registration.type == 'symposium' ) {
-                               if ( ! self.symposium ) { 
+                               if ( ! self.symposium.works ) { 
                                        self.registration.symposium.$id = registration.$id; // reuse $id of first work for symposium
                                        self.symposium = new self.Symposium( registration.symposium );
                                        self.symposium.works = [];
                                }
-                               self.symposium.works[ work.symposium.work_nr - 1 ] = registration.work;
+                               self.symposium.works[ registration.symposium.work_nr - 1 ] = registration.work;
 console.debug('save_symposium', self.symposium );
                                self.symposium.$save();
                        }
@@ -328,6 +328,8 @@ last_saved = {{last_saved}}
 
 master = {{master}}
 
+symposium = {{symposium}}
+
 $id={{$id}}
 registration.$id={{registration.$id}}
 </pre>