X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/5e64f92aabe77137fde16fa8aab604fe1fce5f62..ab1a529433f11e19769abf9bb1aa2c8c3194abeb:/modules/mainBar/mainBar.js 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