X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=templates%2Fconference%2FWork.html.ep;h=ad11d37566726d4672ebdcf308a56f31bf60a367;hb=f9728e6d8d8b79006b1b37ca99c25ea175b0ff30;hp=351ec419286c0cd52be237eca5f07b447272441e;hpb=748900d4c520bd9b1bf2ec902019cd30a839e74e;p=angular-mojolicious.git diff --git a/templates/conference/Work.html.ep b/templates/conference/Work.html.ep index 351ec41..ad11d37 100644 --- a/templates/conference/Work.html.ep +++ b/templates/conference/Work.html.ep @@ -8,7 +8,7 @@ function Work($resource){ title: '', abstract: '', authors:[ { name:'', surname:'', inst:'', email:'' } ], - symposium: { authors: [ {name:''} ] }, + symposium: { authors: [ {name:'', surname:'', inst:'', email:'' } ], work_nr: 1, }, }; this.Work = $resource( '/data/conference/Work/:_id', { _id:'' } ); this.reset(); @@ -28,7 +28,12 @@ console.debug( 'hash_change', id, this.work._id ); reset: function() { console.debug( this.Work ); var symposium = null; - if ( this.work && this.work.type == 'symposium' ) symposium = this.work.symposium; + if ( this.work && this.work.type == 'symposium' ) { + symposium = this.work.symposium; + if ( this.work._id ) symposium.work_nr++; + // if is required because reset is called twice -- once with saved records and once with new empty one +console.debug( 'symposium', symposium, this.work ) + } this.work = new this.Work( this.master ); if ( symposium ) { this.work.symposium = symposium; @@ -87,7 +92,7 @@ Organizator:
-

Autori rada

+

Autori {{work.symposium.work_nr}}. rada

[X] @@ -133,9 +138,12 @@ Organizator: Sazetak:

- - {{$invalidWidgets.visible()}} errors to fix in submission form + + + + + {{$invalidWidgets.visible()}} errors to fix in submission form
permalink to {{work.title}}