X-Git-Url: http://git.rot13.org/?p=angular-mojolicious.git;a=blobdiff_plain;f=public%2Fapp%2Fconference%2Fregistration.js;h=a4f93b3b54b83735ad72fd45f3b3cb72f5af9128;hp=1551a9512ca45705603a9122cd186960728c66f0;hb=HEAD;hpb=44d7eda441beeed6c049531dee2b752bd920852e diff --git a/public/app/conference/registration.js b/public/app/conference/registration.js index 1551a95..a4f93b3 100644 --- a/public/app/conference/registration.js +++ b/public/app/conference/registration.js @@ -10,14 +10,19 @@ function Registration($resource,$xhr){ work: { title: '', abstract: '', - authors:[ { name:'', surname:'', inst:'', email:'' } ] + authors:[ { name:'', surname:'', inst:'', email:'' } ], + organizers: [] }, - symposium: { organizers: [ {name:'', surname:'', inst:'', email:'' } ], work_nr: 1 } + symposium: { + organizers: [], + work_nr: 1 + } }; - this.Registration = $resource( '/data/conference/Registration/:id', { id:'' } ); + this.Registration = $resource( '/data/:database/Registration/:id', { id:'', database: database } ); this.reset(); this.$watch('$location.hashPath', this.hash_change); this.$xhr = $xhr; + console.debug( 'database', database ); } Registration.$inject=['$resource','$xhr']; @@ -97,7 +102,7 @@ console.debug( 'load_symposium ', s_id, self.symposium ); console.debug( self.$xhr ); self.$xhr("JSON" - , "/conference/_design/symposium/_view/works?callback=JSON_CALLBACK;key=" + s_id + , "/" + database + "/_design/symposium/_view/works?callback=JSON_CALLBACK;key=" + s_id , function(code, response){ console.log('symposium/_view/works', code, response); angular.foreach( response.rows, function(row) {