3 return function(sandbox) {
\r
5 var view = $(sandbox.getTemplate('main')());
\r
7 view.find('#rng-skelton-menu button').click(function(e) {
\r
9 sandbox.publish('cmd.' + $(e.target).attr('data-cmd'));
\r
14 sandbox.getDOM().append(view);
\r
15 sandbox.publish('ready');
\r
17 setMainView: function(mainView) {
\r
18 view.find('#rng-skelton-mainView').html(mainView);
\r
20 showMessage: function(message) {
\r
21 view.find('#rng-skelton-messages').html('<span>'+message+'</span>').show();
\r
23 clearMessage: function() {
\r
24 view.find('#rng-skelton-messages').empty().hide();
\r
26 deactivateCommand: function(cmd) {
\r
27 view.find('[data-cmd='+cmd+']').addClass('disabled');
\r
29 activateCommand: function(cmd) {
\r
30 view.find('[data-cmd='+cmd+']').removeClass('disabled');
\r