4 'libs/text!./template.html'], function($, _, template) {
8 return function(sandbox) {
10 var view = $(_.template(template)());
11 view.find('[data-cmd]').click(function(e) {
13 sandbox.publish('cmd.' + $(e.target).attr('data-cmd'));
17 start: function() { sandbox.publish('ready'); },
18 getView: function() {return view;},
19 setCommandEnabled: function(cmd, enabled) {
20 view.find('[data-cmd='+cmd+']').toggleClass('disabled', !enabled);
22 setVersion: function(version) {
23 view.find('.version').text(version);