Merge pull request #4090 from pichalite/master

fix enable/disable button in ACP manage navigation page
v1.18.x
Julian Lam 9 years ago
commit a213daf2e3

@ -132,7 +132,7 @@ define('admin/general/navigation', ['translator', 'iconSelect'], function(transl
function toggle() { function toggle() {
var btn = $(this), var btn = $(this),
disabled = btn.html() === 'Enable'; disabled = btn.hasClass('btn-success');
btn.toggleClass('btn-warning').toggleClass('btn-success').html(!disabled ? 'Enable' : 'Disable'); btn.toggleClass('btn-warning').toggleClass('btn-success').html(!disabled ? 'Enable' : 'Disable');
btn.parents('li').find('[name="enabled"]').val(!disabled ? '' : 'on'); btn.parents('li').find('[name="enabled"]').val(!disabled ? '' : 'on');

Loading…
Cancel
Save