Skip to content

Commit

Permalink
Merge pull request #15 from anazarenko/master
Browse files Browse the repository at this point in the history
added publish class toggle
  • Loading branch information
vitalyiegorov committed Mar 10, 2016
2 parents 9fa90f4 + f8dd56f commit 862c0e5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions www/bool.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ SamsonCMS_InputBool = function(fields) {
form.ajaxForm(function() {
checkbox.show();
loader.hide();

// Toggle publish class in entity if this is publish switcher
if (checkbox.parent().parent().hasClass('publish')) {
checkbox.parent().parent().parent().toggleClass('not-published');
}
});
});
};
Expand Down

0 comments on commit 862c0e5

Please sign in to comment.