Series Index can now be filtered and no longer fetches twice when starting.

This commit is contained in:
Taloth Saldono
2014-02-01 23:09:19 +01:00
parent 953e59d7e3
commit af4c351428
7 changed files with 183 additions and 45 deletions

View File

@@ -12,11 +12,9 @@ define(
return Marionette.Layout.extend({
template: 'Shared/Toolbar/ToolbarLayoutTemplate',
regions: {
left_1 : '.x-toolbar-left-1',
left_2 : '.x-toolbar-left-2',
right_1: '.x-toolbar-right-1',
right_2: '.x-toolbar-right-2'
ui: {
left_x : '.x-toolbar-left',
right_x: '.x-toolbar-right'
},
initialize: function (options) {
@@ -97,8 +95,17 @@ define(
break;
}
}
this[position + '_' + (index + 1).toString()].show(buttonGroupView);
var regionId = position + "_" + (index + 1);
var region = this[regionId];
if (!region) {
var regionClassName = "x-toolbar-" + position + "-" + (index + 1);
this.ui[position + '_x'].append('<div class="toolbar-group '+regionClassName+'" />\r\n');
region = this.addRegion(regionId, "." + regionClassName);
}
region.show(buttonGroupView);
}
});
});