1 rng.modules.skelton = function(sandbox) {
\r
3 var view = $(sandbox.getTemplate('main')());
\r
5 view.find('#rng-skelton-menu button').click(function(e) {
\r
7 sandbox.publish('cmd.' + $(e.target).attr('data-cmd'));
\r
12 sandbox.getDOM().append(view);
\r
13 sandbox.publish('ready');
\r
15 setMainView: function(mainView) {
\r
16 view.find('#rng-skelton-mainView').html(mainView);
\r
18 showMessage: function(message) {
\r
19 view.find('#rng-skelton-messages').html('<span>'+message+'</span>').show();
\r
21 clearMessage: function() {
\r
22 view.find('#rng-skelton-messages').empty().hide();
\r
24 deactivateCommand: function(cmd) {
\r
25 view.find('[data-cmd='+cmd+']').addClass('disabled');
\r
27 activateCommand: function(cmd) {
\r
28 view.find('[data-cmd='+cmd+']').removeClass('disabled');
\r