Skip to content

Commit

Permalink
Merge pull request #478 from soberstadt/master
Browse files Browse the repository at this point in the history
use css class to identify placeholder text - closes #461
  • Loading branch information
seuros committed Dec 1, 2015
2 parents f6f108e + 7140bf4 commit f841960
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/assets/javascripts/best_in_place.js
Expand Up @@ -223,6 +223,7 @@ BestInPlaceEditor.prototype = {
'use strict';
// TODO add placeholder for select and checkbox
if (this.element.html() === "") {
this.element.addClass('bip-placeholder');
this.element.html(this.placeHolder);
}
},
Expand Down Expand Up @@ -289,6 +290,7 @@ BestInPlaceEditor.prototype = {
this.element.html(response.display_as);
}
}
this.element.toggleClass('bip-placeholder', this.isPlaceHolder());

this.element.trigger(jQuery.Event("best_in_place:success"), [data, status, xhr]);
this.element.trigger(jQuery.Event("ajax:success"), [data, status, xhr]);
Expand Down

0 comments on commit f841960

Please sign in to comment.