fix enable/disable button in ACP manage navigation page

v1.18.x
pichalite 9 years ago
parent 0368280e52
commit 7010364e7e

@ -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');
@ -140,4 +140,4 @@ define('admin/general/navigation', ['translator', 'iconSelect'], function(transl
} }
return navigation; return navigation;
}); });

Loading…
Cancel
Save