src/p4l/static/p4l/js/semantictree.js
changeset 58 32591d23cb4b
parent 57 3a8a55131180
child 61 305f9fcd409b
equal deleted inserted replaced
57:3a8a55131180 58:32591d23cb4b
   172 	                        }
   172 	                        }
   173 	                        else{
   173 	                        else{
   174 	                        	// First we update the uri/label dict
   174 	                        	// First we update the uri/label dict
   175 	                        	uri = selected_node.data('uri');
   175 	                        	uri = selected_node.data('uri');
   176 	                        	// We remove the <> from the uri
   176 	                        	// We remove the <> from the uri
   177 	                        	uri = uri.substring(1);
   177 	                        	uri = uri.slice(1,-1);
   178 	                        	uri = uri.substring(0, uri.length - 1);
       
   179 	                        	label = selected_node.data('label');
   178 	                        	label = selected_node.data('label');
   180 	                        	angular.element($('#id_'+input_name)[0]).scope().updateUriLabelDict(uri, label);
   179 	                        	angular.element($('#id_'+input_name)[0]).scope().updateUriLabelDict(uri, label);
   181 	                        	// Angular does not listen to val() event so we update the model value manually:
   180 	                        	// Angular does not listen to val() event so we update the model value manually:
   182 	                            angular.element($('#id_'+input_name)[0]).controller('ngModel').$setViewValue(uri);
   181 	                            angular.element($('#id_'+input_name)[0]).controller('ngModel').$setViewValue(uri);
   183 	                            // And update the text field val
   182 	                            // And update the text field val