2 'libs/jquery-1.9.1.min',
\r
3 'libs/underscore-min',
\r
4 'libs/text!./template.html'], function($, _, template) {
\r
8 return function(sandbox) {
\r
10 var view = $(_.template(template)());
\r
11 view.find('button').click(function(e) {
\r
13 sandbox.publish('cmd.' + $(e.target).attr('data-cmd'));
\r
17 start: function() { sandbox.publish('ready'); },
\r
18 getView: function() {return view;},
\r
19 setCommandEnabled: function(cmd, enabled) {
\r
20 view.find('[data-cmd='+cmd+']').toggleClass('disabled', !enabled);
\r