From c3a309585e0ee0b554c9a414f1b08803a469200c Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 17 Dec 2014 19:36:13 +0000 Subject: [PATCH] tentatively add public updateItem method to ArrayEditable --- source/UI/js/Form/ArrayEditable.js | 6 ++++++ source/UI/js/Video/AnnotationFolder.js | 3 +++ 2 files changed, 9 insertions(+) diff --git a/source/UI/js/Form/ArrayEditable.js b/source/UI/js/Form/ArrayEditable.js index 4e776983..73ea6614 100644 --- a/source/UI/js/Form/ArrayEditable.js +++ b/source/UI/js/Form/ArrayEditable.js @@ -451,6 +451,12 @@ Ox.ArrayEditable = function(options, self) { } */ + that.updateItem = function(value) { + if (self.options.selected) { + self.$items[self.selected].options({value: value}); + } + }; + return that; }; diff --git a/source/UI/js/Video/AnnotationFolder.js b/source/UI/js/Video/AnnotationFolder.js index 5138091d..51cf64c8 100644 --- a/source/UI/js/Video/AnnotationFolder.js +++ b/source/UI/js/Video/AnnotationFolder.js @@ -719,6 +719,9 @@ Ox.AnnotationFolder = function(options, self) { }); self.options.selected = item.id; } + if (self.options.type == 'entity' && Ox.isEmpty(data)) { + self.$annotations.updateItem(''); + } if (self.$widget) { // update may have made the item match, // or no longer match, an event or place