2 angular.service('conference', function($resource){
3 this.Work = $resource( '/data/conference/Work/' );
4 }, {$inject:['$resource'],$creation:'eager'});
11 authors:[ { name:'', surname:'', inst:'', 'email':'' } ],
14 this.work = new this.Work( this.master );
16 WorkForm.prototype = {
18 this.work = angular.copy(this.master);
19 console.info('reset');
23 // console.debug( 'work', this.work );
28 <div ng:controller="WorkForm">
35 <label>Vrsta rada:</label><br/>
36 <input type="radio" name="work.type" value="simp"> Simpozij <br/>
37 <input type="radio" name="work.type" value="pred"> Predavanje <br/>
38 <input type="radio" name="work.type" value="poster"> Poster <br/>
39 <input type="radio" name="work.type" value="round"> Okrugli stol <br/>
42 <div ng:repeat="author in work.authors">
43 [<a href="#" ng:click="work.authors.$remove(author)">X</a>]
44 <input name="author.name" ng:required>
45 <input name="author.surname" ng:required>
46 <input name="author.inst" >
47 <input name="author.email" ng:required>
49 [<a href="#" ng:click="work.authors.$add()">Add another author</a>]
60 <tr ng:repeat="author in work.authors">
61 <td>[<a href="#" ng:click="work.authors.$remove(author)">X</a>]</td>
62 <td><input name="author.name" ng:required></td>
63 <td><input name="author.surname" ng:required></td>
64 <td><input name="author.inst" ></td>
65 <td><input name="author.email" ng:required></td>
69 <td>[<a href="" ng:click="work.authors.$add()">Add another author</a>]</td>
80 Naslov: <input name="work.title" size="60"><br/>
83 <textarea name="work.abstract" cols="50" rows="5"></textarea> <br/>
84 <input type="submit" value="Save" ng:click="work.$save()" disabled="{{$invalidWidgets}}">
85 <input type="submit" value="Save" ng:click="save()" disabled="{{$invalidWidgets}}">
86 <input type="reset" value="Reset" ng:click="reset()">
90 {{$window.location.href}}
91 <pre>work = {{work}}</pre>
92 <pre>master = {{master}}</pre>