Ox.Editable/Ox.EditableContent: set placeholder class
This commit is contained in:
parent
f915317240
commit
8ad1faff85
2 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue