equal
deleted
inserted
replaced
29 }) |
29 }) |
30 .controller('homeCtrl', function($scope, $location, dataModel, context, $interval){ |
30 .controller('homeCtrl', function($scope, $location, dataModel, context, $interval){ |
31 |
31 |
32 function getURLParameter(name) { |
32 function getURLParameter(name) { |
33 return decodeURI( |
33 return decodeURI( |
34 (new RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1] |
34 (new RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[null,])[1] |
35 ); |
35 ); |
36 } |
36 } |
37 |
37 |
38 function colorToHex(c) { |
38 function colorToHex(c) { |
39 var m = /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/.exec(c); |
39 var m = /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/.exec(c); |
212 } |
212 } |
213 |
213 |
214 |
214 |
215 var new_annot = { |
215 var new_annot = { |
216 category: {code: code, label: label}, |
216 category: {code: code, label: label}, |
|
217 keyword: freeLabel, |
217 text: freetext, |
218 text: freetext, |
218 color: hexc, |
219 color: hexc, |
219 user : $scope.username |
220 user : $scope.username |
220 }; |
221 }; |
221 sock.send(JSON.stringify(new_annot)); |
222 sock.send(JSON.stringify(new_annot)); |