X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/1aba836313d1513bbe0ca947e01176806c900233..8867ca067b8cd6d88eee386f00f15a031c297a79:/modules/skelton.js?ds=sidebyside diff --git a/modules/skelton.js b/modules/skelton.js index 0e6749a..3141459 100644 --- a/modules/skelton.js +++ b/modules/skelton.js @@ -2,7 +2,7 @@ rng.modules.skelton = function(sandbox) { var view = $(sandbox.getTemplate('main')()); - view.find('#rng-skelton-menu a').click(function(e) { + view.find('#rng-skelton-menu button').click(function(e) { e.preventDefault(); sandbox.publish('cmd.' + $(e.target).attr('data-cmd')); }); @@ -14,6 +14,18 @@ rng.modules.skelton = function(sandbox) { }, setMainView: function(mainView) { view.find('#rng-skelton-mainView').html(mainView); + }, + showMessage: function(message) { + view.find('#rng-skelton-messages').html(''+message+'').show(); + }, + clearMessage: function() { + view.find('#rng-skelton-messages').empty().hide(); + }, + deactivateCommand: function(cmd) { + view.find('[data-cmd='+cmd+']').addClass('disabled'); + }, + activateCommand: function(cmd) { + view.find('[data-cmd='+cmd+']').removeClass('disabled'); } } }; \ No newline at end of file