From 8ad1faff8507722d5f5ec87809fd5a06ad0f0f74 Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 27 Feb 2013 08:28:52 +0530 Subject: [PATCH] Ox.Editable/Ox.EditableContent: set placeholder class --- source/Ox.UI/js/Form/Editable.js | 2 ++ source/Ox.UI/js/Form/EditableContent.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/source/Ox.UI/js/Form/Editable.js b/source/Ox.UI/js/Form/Editable.js index c0086351..1438f1b3 100644 --- a/source/Ox.UI/js/Form/Editable.js +++ b/source/Ox.UI/js/Form/Editable.js @@ -205,8 +205,10 @@ Ox.Editable = function(options, self) { function formatValue() { var value = self.options.value; + that.removeClass('OxPlaceholder'); if (self.options.value === '' && self.options.placeholder) { value = self.options.placeholder; + that.addClass('OxPlaceholder'); } else if (self.options.format) { value = self.options.format(self.options.value); } diff --git a/source/Ox.UI/js/Form/EditableContent.js b/source/Ox.UI/js/Form/EditableContent.js index c238e43a..901d0027 100644 --- a/source/Ox.UI/js/Form/EditableContent.js +++ b/source/Ox.UI/js/Form/EditableContent.js @@ -113,8 +113,10 @@ Ox.EditableContent = function(options, self) { function formatValue() { var value = self.options.value; + that.removeClass('OxPlaceholder'); if (self.options.value === '' && self.options.placeholder) { value = self.options.placeholder; + that.addClass('OxPlaceholder'); } else if (self.options.format) { value = self.options.format(self.options.value); }