X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/5e64f92aabe77137fde16fa8aab604fe1fce5f62..1d8d7b5fad1547bc2356f2e69e18ca597c969d9b:/modules/mainBar/mainBar.js?ds=sidebyside diff --git a/modules/mainBar/mainBar.js b/modules/mainBar/mainBar.js index 084f675..85551fc 100644 --- a/modules/mainBar/mainBar.js +++ b/modules/mainBar/mainBar.js @@ -1,29 +1,29 @@ -define([ -'libs/jquery-1.9.1.min', -'libs/underscore-min', -'libs/text!./template.html'], function($, _, template) { - -'use strict'; - -return function(sandbox) { - - var view = $(_.template(template)()); - view.find('button').click(function(e) { - e.preventDefault(); - sandbox.publish('cmd.' + $(e.target).attr('data-cmd')); - }) - - return { - start: function() { sandbox.publish('ready'); }, - getView: function() {return view;}, - setCommandEnabled: function(cmd, enabled) { - view.find('[data-cmd='+cmd+']').toggleClass('disabled', !enabled); - }, - setVersion: function(version) { - view.find('.version').text(version); - } - } - -}; - +define([ +'libs/jquery-1.9.1.min', +'libs/underscore-min', +'libs/text!./template.html'], function($, _, template) { + +'use strict'; + +return function(sandbox) { + + var view = $(_.template(template)()); + view.find('button').click(function(e) { + e.preventDefault(); + sandbox.publish('cmd.' + $(e.target).attr('data-cmd')); + }); + + return { + start: function() { sandbox.publish('ready'); }, + getView: function() {return view;}, + setCommandEnabled: function(cmd, enabled) { + view.find('[data-cmd='+cmd+']').toggleClass('disabled', !enabled); + }, + setVersion: function(version) { + view.find('.version').text(version); + } + }; + +}; + }); \ No newline at end of file