3 if (typeof (console) === 'undefined') console = { debug: function() {} }; // mock console.debug
5 function Registration($resource){
8 name: '', surname: '', inst: '', email: ''
14 authors:[ { name:'', surname:'', inst:'', email:'' } ],
18 //organizers: [ {name:'', surname:'', inst:'', email:'' } ],
23 this.Registration = $resource( '/data/conference/Registration/:id', { id:'' } );
24 this.Symposium = $resource( '/data/conference/Symposium/:id', { id:'' } );
26 this.$watch('$location.hashPath', this.hash_change);
28 Registration.$inject=['$resource'];
30 Registration.prototype = {
31 hash_change: function() {
32 var id = this.$location.hashPath;
33 console.debug( 'hash_change', id, this.registration.$id );
34 if ( id != this.registration.$id ) {
37 this.registration = this.Registration.get({ id: id }, function(registration) {
38 self.last_saved = angular.copy(registration);
39 if ( registration.type == 'symposium' ) {
40 var s_id = registration.symposium.$id || registration.$id;
41 // first registration doesn't have symposium.$id, but we used same $id
42 console.debug( 'load symposium ', s_id );
43 self.symposium = self.Symposium.get({ id: s_id });
51 console.debug( this.Registration );
52 var last = this.registration;
53 if ( last && last.type == 'symposium' ) {
54 if ( last.$id ) last.symposium.work_nr++; // only if saved
56 this.registration = new this.Registration( this.master );
58 this.registration.type = last.type;
59 this.registration.person = last.person;
61 if ( last.type == 'symposium' )
62 this.registration.symposium = last.symposium;
64 this.last_saved = angular.copy( this.registration ); // FIXME was: {};
65 console.debug( 'reset', this.registration, this.$location.hashPath, last );
69 this.registration.$save(function(registration){
70 self.$location.hashPath = registration.$id;
72 // save symposium to separate resource
73 if ( registration.type == 'symposium' ) {
74 if ( ! self.symposium ) {
75 self.registration.symposium.$id = registration.$id; // reuse $id of first work for symposium
76 self.symposium = new self.Symposium( registration.symposium );
77 self.symposium.works = [];
79 registration.work.$id = registration.$id; // preserve $id
80 self.symposium.works[ registration.symposium.work_nr - 1 ] = registration.work;
81 console.debug('save_symposium', self.symposium );
82 self.symposium.$save();
85 self.last_saved = angular.copy(registration);
90 angular.validator.max_length = function(input, len) {
91 var ok = input.length <= len;
92 console.debug( 'max_length', ok, input.length, len );
93 return ok ? '' : 'must be shorter than '+len+' characters';
99 <style type="text/css">
121 /* margin-bottom: 6px; */
125 text-decoration: none;
127 background: url(http://mjesec.ffzg.hr/drzb2011/images/kvadrat.gif) no-repeat left;
128 border-bottom: 1px solid #CCC;
134 border-bottom: 2px solid #D74F25;
135 border-bottom: 1px solid #46d0fe;
203 border: solid 1px #dedede;
208 input:focus, textarea:focus
214 /* border: 1px solid #46d0fe; */
217 .ng-validation-error {
218 border: 1px solid #FF6666;
219 border: 1px solid #EDC8BC;
220 border: 1px solid #FF9966;
221 border: 1px solid #EAB3A2;
222 border: 1px solid #D74F25;
223 border: 1px solid #DC6844;
224 border: 1px solid #DE7F61;
243 text-decoration: none;
247 .button input:hover, .gohome:hover {
248 /* background: #dc6844; */
254 border: 1px solid #d74f25;
262 border: 1px solid #d74f25;
263 text-decoration: none;
268 border: solid 1px #dedede;
269 border: solid 1px #f6f6f6;
276 text-decoration: none;
317 border: 1px solid #ccc;
323 <h1>Registracija i prijavljivanje izlaganja</h1>
328 <div class="root" ng:controller="Registration" ng:init="$window.$root = this;">
331 <div ng:show="! registration.$id && ! symposium.$id">
333 Svi sudionici skupa, bez obzira na to jesu li izlagači, suautori ili slušači, moraju se registrirati kroz sustav elektroničke prijave.
337 Sažetak izlaganja/postera prijavljuje samo prvi autor, odnosno onaj autor koji će rad izložiti. Ostali suautori ne trebaju prijaviti sažetak, nego se samo registrirati.
341 Organizatori simpozija prijavljuju i sažetak simpozija i sažetak svakog pripadajućeg rada (mora ih biti četiri). Autori pojedinih radova unutar simpozija NE prijavljuju pojedinačno svoje sažetke, nego se u sustav registriraju kao sudionici simpozija.
345 Organizatori okruglog stola prijavljuju samo sažetak okruglog stola, a sudionici se registriraju kao sudionici okruglog stola.
349 Duljina sažetka treba biti između 1800 i 2000 znakova (uključujući razmake).
353 Jedna osoba može biti autor u najviše tri rada, pri čemu na samo jednom može biti prvi ili jedini autor ili autor koji će izlagati.
361 <a name="{{$location.hash}}" >bla</a>
364 <div style="margin-bottom: 40px" ng:show="registration.$id && last_saved.$equals(registration)">
368 <div ng:show="registration.$id || symposium">
369 <h2>{{registration.person.name}} {{registration.person.surname}}</h2>
371 <label>Institution: {{registration.person.inst}}</label>
372 <label>Address: {{registration.person.address1}}, {{registration.person.city}}, {{registration.person.zip}}, {{registration.person.country}}</label>
374 <label ng:show="registration.type == 'participant'">Tip registracije: Samo registracija</label>
375 <label ng:show="registration.type == 'accomp'">Tip registracije: Osoba u pratnji</label>
376 <label ng:show="registration.type == 'student'">Tip registracije: Student</label>
377 <label ng:show="registration.type == 'sparticipant'">Tip registracije: Sudionik simpozija/okriglog stola<span ng:show="registration.student == true">, student</span></label>
378 <label ng:show="registration.type == 'round'">Tip registracije: Organizator okruglog stola<span ng:show="registration.student == true">, student</span></label>
379 <label ng:show="registration.type == 'lecture'">Tip registracije: Usmeno priopćenje<span ng:show="registration.student == true">, student</span></label>
380 <label ng:show="registration.type == 'poster'">Tip registracije: Prezentacija postera<span ng:show="registration.student == true">, student</span></label>
381 <label ng:show="registration.type == 'poster' || registration.type == 'lecture'"><b>Title: </b>{{registration.work.title}}</label>
382 <div ng:show="registration.type == 'symposium'">
383 <p>Tip registracije: Organizator simpozija</p>
384 <label><b>Tema simpozija: </b><i>{{registration.symposium.title}}</i></label>
386 <label>Summary:</label> {{registration.symposium.abstract}}
390 <label>Prijavljeni radovi:</label>
392 <li ng:repeat="w in symposium.works">
394 <a ng:show="registration.$id != w.$id" href="#{{w.$id}}" >{{w.title}}</a>
396 <span ng:show="registration.$id != w.$id">{{w.title}}</span>
397 <b ng:show="registration.$id == w.$id">{{w.title}}</b>
404 <div ng:show="registration.$id || symposium">
405 <h2>Contact Information</h2>
406 <label>{{registration.person.name}} {{registration.person.surname}}</label>
407 <label>{{registration.person.inst}}</label>
408 <label>{{registration.person.address1}}</label>
409 <label>{{registration.person.city}}, {{registration.person.zip}}, {{registration.person.country}}</label>
410 <label ng:show="registration.type == 'participant'"><h3>Registration type</h3> no paper</label>
411 <div ng:show="registration.type == 'symposium'">
412 <p>Symposium organizer</p>
414 <label>Topic:</label><i>{{registration.symposium.title}}</i>
415 <label>Summary:</label> {{registration.symposium.abstract}}
417 <label>Submitted papers for this symposium:</label>
419 <li ng:repeat="w in symposium.works">
420 <a ng:show="registration.$id != w.$id" href="#{{w.$id}}" >{{w.title}}</a>
421 <span ng:show="registration.$id != w.$id">{{w.title}}</span>
422 <b ng:show="registration.$id == w.$id">{{w.title}}</b>
430 <div id="submission" ng:show="! registration.$id && ! symposium.$id">
432 <h2>Tip registracije</h2>
433 <label><input type="radio" name="registration.type" value="participant" ng:required>Samo registracija</label>
434 <label><input type="radio" name="registration.type" value="sparticipant" ng:required>Sudionik simpozija/okruglog stola</label>
435 <label><input type="radio" name="registration.type" value="symposium" ng:required>Organizator simpozija</label>
436 <label><input type="radio" name="registration.type" value="round" ng:required>Organizator okruglog stola</label>
437 <label><input type="radio" name="registration.type" value="lecture" ng:required>Usmeno priopćenje</label>
438 <label><input type="radio" name="registration.type" value="poster" ng:required>Prezentacija postera</label>
440 <label><input type="radio" name="registration.type" value="student" ng:required ng:change="registration.dinner = 'no'">Student - samo registracija</label>
441 <label><input type="radio" name="registration.type" value="accomp" ng:required>Osoba u pratnji</label>
444 <div id="participant" ng:show="! registration.$id && ! symposium.$id">
447 <h2>Podaci za kontakt</h2>
448 <div class="labelTop">
449 <div class="input input4">Ime</div>
450 <div class="input input4">Prezime</div>
452 <div style="clear: both">
453 <input class="input4" name="registration.person.name" ng:required>
454 <input class="input4" name="registration.person.surname" ng:required>
456 <div class="labelTop">
457 <div class="input input5">Ustanova</div>
459 <div style="clear: both">
460 <input class="input5" name="registration.person.inst">
462 <div class="labelTop">
463 <div class="input input5">Adresa</div>
465 <div style="clear: both">
466 <input class="input5" name="registration.person.address1" ng:required>
468 <div class="labelTop">
469 <div class="input input6">Grad</div>
470 <div class="input input6">Poštanski br.</div>
471 <div class="input input6">Zemlja</div>
473 <div style="clear: both">
474 <input class="input6" name="registration.person.city" ng:required>
475 <input class="input6" name="registration.person.zip">
476 <input class="input6" name="registration.person.country">
478 <div class="labelTop">
479 <div class="input input4">E-pošta</div>
480 <div class="input input4">Tel. broj</div>
482 <div style="clear: both">
483 <input class="input4" name="registration.person.email" ng:validate="email" ng:required>
484 <input class="input4" name="registration.person.phone">
486 <div ng:show="registration.type == 'lecture' || registration.type == 'poster' || registration.type == 'sparticipant' || registration.type == 'symposium' || registration.type == 'round'">
487 <br><input type="checkbox" name="registration.student">Označite ako ste student.
489 <div style="clear: both; margin-top: 20px;">
490 Hoćete li biti na domjenku dobrodošlice u četvrtak u 20 sati?<br/>
491 <input type="radio" name="registration.reception" value="yes">Da
492 <input type="radio" name="registration.reception" value="no">Ne
494 <div ng:show="registration.type != 'student'" style="clear: both; margin-top: 20px;">
495 Hoćete li biti na zajedničkoj večeri u petak u 20 sati? (Večera je uključena u kotizaciju.)<br/>
496 <input type="radio" name="registration.dinner" value="yes">Da
497 <input type="radio" name="registration.dinner" value="no">Ne
504 <div ng:show="registration.type == 'sparticipant' && ! last_saved.$id">
505 <h2>Tema simpozija/okruglog stola</h2>
506 <input class="input1" name="registration.sympattend" ng:required>
510 <div id="work" ng:show="registration.type != 'participant' && registration.type != 'sparticipant' && registration.type != 'student' && registration.type != 'accomp'">
511 <div ng:show="registration.type == 'symposium' && registration.symposium.work_nr < 4 && ! symposium.$id">
514 <label for="registration.symposium.title">Tema:</label>
515 <input class="input1" name="registration.symposium.title" ng:required>
516 <label>Organizator(i):</label>
518 <div class="input input2">First name</div><div class="input input2">Surname</div><div class="input input3">Institution</div><div class="input input2">E-mail</div>
520 <div class="inputOrg"><span ng:show="registration.person.name">{{registration.person.name}} {{registration.person.surname}}</span><span ng:show="registration.person.inst">, {{registration.person.inst}}</span><span ng:show="registration.person.email">, {{registration.person.email}}</span></div>
521 <div class="clear" ng:repeat="organizer in registration.symposium.organizers">
522 <input class="input2" name="organizer.name" ng:required>
523 <input class="input2" name="organizer.surname" ng:required>
524 <input class="input3" name="organizer.inst" >
525 <input class="input2" name="organizer.email" ng:required ng:validate="email">
526 <a href="" ng:click="registration.symposium.organizers.$remove(organizer)">X</a>
528 <div class="clear"><a class="addPerson" href="" ng:click="registration.symposium.organizers.$add()">Dodaj drugog organizatora</a></div>
529 <label>Sažetak (maksimalno 2000 znakova)</label>
530 <textarea class="input1" name="registration.symposium.abstract" rows="10" ng:validate="max_length:2000" ng:required></textarea>
532 <div ng:show="symposium">
533 <b>Simpozij:</b> {{registration.symposium.title}}
535 <label>Prijavljeni radovi za ovaj simpozij:</label>
537 <li ng:repeat="w in symposium.works">
539 <a ng:show="registration.$id != w.$id" href="#{{w.$id}}" >{{w.title}}</a>
541 <span ng:show="registration.$id != w.$id">{{w.title}}</span>
542 <b ng:show="registration.$id == w.$id">{{w.title}}</b>
549 <div ng:show="registration.type && ! last_saved.$id">
552 <div ng:show="symposium">
553 <b>Symposium:</b> {{registration.symposium.title}}
555 <label>Submitted papers for this symposium:</label>
557 <li ng:repeat="w in symposium.works">
558 <a ng:show="registration.$id != w.$id" href="#{{w.$id}}" >{{w.title}}</a>
559 <b ng:show="registration.$id == w.$id">{{w.title}}</b>
565 <h3 ng:show="registration.type == 'symposium'">Prijava rada unutar simpizija ({{registration.symposium.work_nr}})</h3>
566 <h2 ng:show="registration.type == 'lecture'">Prijava usmenog priopćenja</h2>
567 <h2 ng:show="registration.type == 'poster'">Prijava postera</h2>
568 <h2 ng:show="registration.type == 'round'">Prijava teme okruglog stola</h2>
571 <label>Naslov:</label>
572 <input class="input1" name="registration.work.title" ng:required>
573 <div ng:show="registration.type != 'round'">
574 <label>Autori:</label>
576 <div class="input input2">Ime</div><div class="input input2">Prezime</div><div class="input input3">Ustanova</div><div class="input input2">E-pošta</div>
578 <div class="clear" ng:repeat="author in registration.work.authors">
579 <input class="input2" name="author.name" ng:required>
580 <input class="input2" name="author.surname" ng:required>
581 <input class="input3" name="author.inst" >
582 <input class="input2" name="author.email" ng:required ng:validate="email">
583 <a href="" ng:click="registration.work.authors.$remove(author)">X</a>
585 <a class="addPerson" href="" ng:click="registration.work.authors.$add()">Dodaj još jednog autora</a>
587 <div ng:show="registration.type == 'round'">
588 <label>Organizator:</label>
590 <div class="input input2">First name</div><div class="input input2">Surname</div><div class="input input3">Institution</div><div class="input input2">E-mail</div>
592 <div class="inputOrg"><span ng:show="registration.person.name">{{registration.person.name}} {{registration.person.surname}}</span><span ng:show="registration.person.inst">, {{registration.person.inst}}</span><span ng:show="registration.person.email">, {{registration.person.email}}</span></div>
593 <div class="clear" ng:repeat="organizer in registration.work.organizers">
594 <input class="input2" name="organizer.name" ng:required>
595 <input class="input2" name="organizer.surname" ng:required>
596 <input class="input3" name="organizer.inst" >
597 <input class="input2" name="organizer.email" ng:required ng:validate="email">
598 <a href="" ng:click="registration.work.organizers.$remove(organizer)">X</a>
600 <div class="clear"><a class="addPerson" href="" ng:click="registration.work.organizers.$add()">Add another organizer</a></div>
603 <label>Sažetak (maksimalno 2000 znakova):</label>
604 <textarea class="input1" name="registration.work.abstract" rows="10" ng:validate="max_length:2000" ng:required></textarea>
607 </div> <!-- ng:show="registration.type" -->
610 <div class="button" ng:show="! last_saved.$equals(registration) && $invalidWidgets.visible() == 0 && (symposium.$id || (registration.reception != null && registration.dinner != null))">
611 <input type="submit" value="Snimi" ng:click="save();" ng:show="! last_saved.$equals(registration) && $invalidWidgets.visible() == 0" >
614 <div ng:show="$invalidWidgets.visible() > 0 || (! symposium.$id && (registration.dinner == null || registration.reception == null))" style="color:red; margin-top: 20px">Molimo ispunite sva tražena polja.
615 <span ng:show="$invalidWidgets.visible() > 0">Obratite pažnju na polja s narančastim okvirom. <!-- - {{$invalidWidgets.visible()}} left. --></span>
616 <span ng:show="(registration.reception == null || registration.dinner == null) && ! symposium.$id && registration.type != 'student'">
617 Odlučite o dolasku na domjenak i večeru.</span>
618 <span ng:show="(registration.reception == null || registration.dinner == null) && ! symposium.$id && registration.type == 'student'">
619 Odlučite o dolasku na domjenak.</span>
623 <div style="margin-bottom: 40px" ng:show="registration.$id && last_saved.$equals(registration)">
625 <div class="saved" ng:show="registration.type == 'participant' || registration.type == 'sparticipant' || registration.type == 'student' || registration.type == 'accomp' && ! symposium">
626 <span class="saved2">Hvala! Vaša registracija je uspješno predana!</span>
627 <div class="gohome"><a href="http://psihologija.ffzg.hr/drzb2011/registracija/kotizacija">Molimo pročitajte upute za plaćanje kotizacije</a></div>
628 <div class="gohome" ng:show="registration.type == 'student' || registration.student == true">
629 Dokaz o studentskom statusu treba poslati na adresu<a href="mailto:drzb@ffzg.hr">drzb@ffzg.hr</a>.
633 <div class="saved" ng:show="registration.type != 'participant' && registration.type != 'sparticipant' && registration.type != 'student' && registration.type != 'accomp' && registration.symposium.work_nr == 4 && last_saved.$id">
634 <span class="saved2">Hvala! Vaš prijedlog je uspješno predan. <br></span>
635 <span class="gohome"><a href="http://psihologija.ffzg.hr/drzb2011/registracija/kotizacija">Molimo pročitajte upute za plaćanje kotizacije.</a></span>
638 <div class="button button2" ng:show="registration.type != 'participant' && registration.type != 'sparticipant' && registration.type != 'student' && registration.type != 'accomp' && last_saved.$id && ! symposium">
639 <span class="saved2">Hvala! Vaš prijedlog je uspješno predan. <br></span>
640 <div class="gohome"><a href="http://psihologija.ffzg.hr/drzb2011/registracija/kotizacija">Molimo pročitajte upute za plaćanje kotizacije.</a></div>
641 <div class="gohome" ng:show="registration.type == 'student' || registration.student == true">
642 Dokaz o studentskom statusu treba poslati na adresu<a href="mailto:drzb@ffzg.hr">drzb@ffzg.hr</a>.
647 <div class="button button2" ng:show="last_saved.$id && symposium && registration.symposium.work_nr < 4">
648 <input type="reset" value="Dodavanje sljedećeg rada" ng:click="reset()">
651 <div class="button2" ng:show="registration.$id && registration.type != 'participant' && registration.type != 'sparticipant' && last_saved.$equals(registration)">
652 <input type="reset" value="Submit another paper" ng:click="reset()">
653 <div class="gohome"><a href="http://psihologija.ffzg.hr/drzb2011/">Go to conference home page</a></div>
657 <div class="footer"></div>
660 <div ng:show="registration.$id">
661 Permalink to <a href="#{{registration.$id}}">DRZB2011 registration</a> which you can bookmark
665 <input type=checkbox name=debug style="float: right; clear: both">
666 <pre ng:show="debug">
668 dirty={{! last_saved.$equals(registration)}} invalid={{$invalidWidgets.visible()}}
670 registration = {{registration}}
672 last_saved = {{last_saved}}
676 symposium = {{symposium}}
679 registration.$id={{registration.$id}}