Ox.Editable/Ox.EditableContent: set placeholder class

This commit is contained in:
rolux 2013-02-27 08:28:52 +05:30
parent f915317240
commit 8ad1faff85
2 changed files with 4 additions and 0 deletions

View file

@ -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);
}

View file

@ -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);
}