diff --git a/source/Ox.UI/js/Form/Ox.Editable.js b/source/Ox.UI/js/Form/Ox.Editable.js index fe568f69..4ede15a6 100644 --- a/source/Ox.UI/js/Form/Ox.Editable.js +++ b/source/Ox.UI/js/Form/Ox.Editable.js @@ -110,7 +110,6 @@ Ox.Editable = function(options, self) { self.options.editing = true; that.addClass('OxEditing'); self.originalValue = self.options.value; - self.$value.hide(); if (!self.$input) { self.$input = Ox.Input({ changeOnKeypress: true, @@ -141,6 +140,7 @@ Ox.Editable = function(options, self) { ? self.minHeight : self.options.maxHeight || that.parent().height(); setSizes(); + self.$value.hide(); self.$input.show(); if (!self.options.blurred) { setTimeout(function() { @@ -194,14 +194,14 @@ Ox.Editable = function(options, self) { function setSizes() { var height, width; - self.$test.show(); + self.$test.css({display: 'inline-block'}); height = self.options.height || Ox.limit(self.$test.height(), self.minHeight, self.maxHeight); width = self.options.width || Ox.limit(self.$test.width(), self.minWidth, self.maxWidth); - self.$test.hide(); + self.$test.css({display: 'none'}); self.$input.options({ - width: width, - height: height - }); + width: width, + height: height + }); self.$input.find(self.options.type).css({ height: height + 'px', width: width + 'px' diff --git a/source/Ox.UI/js/Video/Ox.AnnotationFolder.js b/source/Ox.UI/js/Video/Ox.AnnotationFolder.js index 9107e751..a586c968 100644 --- a/source/Ox.UI/js/Video/Ox.AnnotationFolder.js +++ b/source/Ox.UI/js/Video/Ox.AnnotationFolder.js @@ -397,9 +397,14 @@ Ox.AnnotationFolder = function(options, self) { if (self.widget && self.options.items.length) { self.$annotations.find('.OxEditableElement').each(function() { var $element = $(this); - if (!Ox.getObjectById( - self.options.items, $element.data('id') - )[self.options.type]) { + // We don't want to catch an eventual placeholder, + // which is an EditableElement without .data('id') + if ( + $element.data('id') + && !Ox.getObjectById( + self.options.items, $element.data('id') + )[self.options.type] + ) { $element.addClass('OxWarning'); } }); diff --git a/source/Ox/js/HTML.js b/source/Ox/js/HTML.js index 6c5683e9..e151dec1 100644 --- a/source/Ox/js/HTML.js +++ b/source/Ox/js/HTML.js @@ -8,24 +8,24 @@ Ox.parseEmailAddresses Takes HTML and turns e-mail addresses into links Ox.parseEmailAddresses = function(html) { return html.replace( /\b([0-9A-Z\.\+\-_]+@(?:[0-9A-Z\-]+\.)+[A-Z]{2,6})\b/gi, - '$1' + '$1' ); }; /*@ Ox.parseHTML Takes HTML from an untrusted source and returns something sane > Ox.parseHTML('http://foo.com, bar') - 'foo.com, bar' + 'foo.com, bar' > Ox.parseHTML('(see: www.foo.com)') - '(see: www.foo.com)' + '(see: www.foo.com)' > Ox.parseHTML('foo@bar.com') - 'foo@bar.com' + 'foo@bar.com' > Ox.parseHTML('foo') - 'foo' + 'foo' > Ox.parseHTML('foo') '<a href="javascript:alert()">foo' > Ox.parseHTML('[http://foo.com foo]') - 'foo' + 'foo' > Ox.parseHTML('foo') '
foo
' > Ox.parseHTML('') @@ -55,7 +55,7 @@ Ox.parseHTML = (function() { ], parse = { a: { - ']*?href="((https?:\/\/|\/).+?)".*?>': '', + ']*?href="((https?:\/\/|\/).+?)".*?>': '', '<\/a>': '' }, img: {