From d8adee70f714e0bd9c8c87c2dcff11559b3b56d5 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 20 Jan 2012 23:41:07 +0530 Subject: [PATCH] set value of Ox.Editable --- source/Ox.UI/css/Ox.UI.css | 1 + source/Ox.UI/js/Form/Ox.Editable.js | 2 ++ source/Ox.UI/js/Video/Ox.AnnotationFolder.js | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source/Ox.UI/css/Ox.UI.css b/source/Ox.UI/css/Ox.UI.css index 89901013..2afd596b 100644 --- a/source/Ox.UI/css/Ox.UI.css +++ b/source/Ox.UI/css/Ox.UI.css @@ -783,6 +783,7 @@ OxEditable .OxEditableElement > .OxValue { //cursor: pointer; padding: 0 0 0 1px; + word-wrap: break-word; } .OxEditableElement div.OxInput { padding: 0 1px 0 0; diff --git a/source/Ox.UI/js/Form/Ox.Editable.js b/source/Ox.UI/js/Form/Ox.Editable.js index 4ede15a6..181748f3 100644 --- a/source/Ox.UI/js/Form/Ox.Editable.js +++ b/source/Ox.UI/js/Form/Ox.Editable.js @@ -233,6 +233,8 @@ Ox.Editable = function(options, self) { self.$test && self.$test.css(css); self.$input && self.$input.css(css); self.$input && self.$input.find(self.options.type).css(css); + } else if (key == 'value') { + self.$value.html(formatValue()); } }; diff --git a/source/Ox.UI/js/Video/Ox.AnnotationFolder.js b/source/Ox.UI/js/Video/Ox.AnnotationFolder.js index a586c968..6db524a9 100644 --- a/source/Ox.UI/js/Video/Ox.AnnotationFolder.js +++ b/source/Ox.UI/js/Video/Ox.AnnotationFolder.js @@ -160,7 +160,7 @@ Ox.AnnotationFolder = function(options, self) { // only deselect annotation if the place deselect was not // caused by switching to an annotation without place self.$annotations.options({selected: ''}); - } else if (data.annotationIds.indexOf(self.options.selected) == -1) { + } else if (data.annotationIds && data.annotationIds.indexOf(self.options.selected) == -1) { // only select a new annotation if the currently selected // annotation does not match the selected place self.$annotations.options({selected: data.annotationIds[0]});