X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/a5871ab5512d87a33e7e95451d26ee7d3e789742..70fd8f6118a3e8bf298dd9c48c310f3309b780c3:/modules/skelton.js?ds=inline diff --git a/modules/skelton.js b/modules/skelton.js index 2dbd948..0e6749a 100644 --- a/modules/skelton.js +++ b/modules/skelton.js @@ -1,10 +1,19 @@ rng.modules.skelton = function(sandbox) { + + var view = $(sandbox.getTemplate('main')()); + + view.find('#rng-skelton-menu a').click(function(e) { + e.preventDefault(); + sandbox.publish('cmd.' + $(e.target).attr('data-cmd')); + }); + return { start: function() { + sandbox.getDOM().append(view); sandbox.publish('ready'); }, - setMainView: function(view) { - sandbox.getDOM().html(view); + setMainView: function(mainView) { + view.find('#rng-skelton-mainView').html(mainView); } } }; \ No newline at end of file