147:af2c69b87882
Anton Shestakov <av6@dwimlabs.net>, Sun, 30 Jul 2017 22:54:22 +0800
workspaces: use this.$() shortcut instead of this.$el.find()

previous change 43:d1ff547fa61d

static/js/framework/views/workspaces.js

Permissions: -rw-r--r--

Other formats: Feeds:
var WorkspaceTabsView = CollectionView.extend({
initialize: function(options) {
this.compileTemplates(options.templates);
this.bindCollection();
},
clear: function() {
this.$el.empty();
},
renderItem: function(workspace) {
return $(this.templates.tab(workspace.toJSON()));
},
appendItem: function(workspace) {
var $item = this.renderItem(workspace);
this.$el.append($item);
},
activate: function(workspace) {
this.$('[data-workspace]').removeClass('active');
this.$('[data-workspace="' + workspace + '"]').addClass('active');
}
});