2 angular.service('conference', function($resource){
3 this.Work = $resource( '/data/conference/Work/' );
4 }, {$inject:['$resource'],$creation:'eager'});
11 authors:[ { name:'', surname:'', inst:'', 'email':'' } ],
15 WorkForm.prototype = {
17 this.work = angular.copy(this.master);
21 this.saved = new this.Work( this.work );
22 console.debug( 'new', this.saved, 'from', this.work );
23 this.work = this.saved;
27 console.debug( 'work', this.work );
32 <div ng:controller="WorkForm">
38 <label>Vrsta rada:</label><br/>
39 <input type="radio" name="work.type" value="simp"> Simpozij <br/>
40 <input type="radio" name="work.type" value="pred"> Predavanje <br/>
41 <input type="radio" name="work.type" value="poster"> Poster <br/>
42 <input type="radio" name="work.type" value="round"> Okrugli stol <br/>
45 <div ng:repeat="author in work.authors">
46 [<a href="#" ng:click="work.authors.$remove(author)">X</a>]
47 <input name="author.name" ng:required>
48 <input name="author.surname" ng:required>
49 <input name="author.inst" >
50 <input name="author.email" ng:required>
52 [<a href="#" ng:click="work.authors.$add()">Add another author</a>]
63 <tr ng:repeat="author in work.authors">
64 <td>[<a href="#" ng:click="work.authors.$remove(author)">X</a>]</td>
65 <td><input name="author.name" ng:required></td>
66 <td><input name="author.surname" ng:required></td>
67 <td><input name="author.inst" ></td>
68 <td><input name="author.email" ng:required></td>
72 <td>[<a href="" ng:click="work.authors.$add()">Add another author</a>]</td>
83 Naslov: <input name="work.title" size="60"><br/>
86 <textarea name="work.abstract" cols="50" rows="5"></textarea> <br/>
87 <input type="submit" value="Save" ng:click="save()" disabled="{{$invalidWidgets}}">
94 {{$window.location.href}}
95 <pre>work = {{work}}</pre>
96 <pre>master = {{master}}</pre>