equal
deleted
inserted
replaced
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 |