1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-17 21:26:22 -04:00

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

@@ -9,6 +9,10 @@ define(
template : 'Shared/Toolbar/ButtonTemplate',
className: 'btn',
ui: {
icon: 'i'
},
events: {
'click': 'onClick'
},
@@ -49,7 +53,7 @@ define(
var callback = this.model.get('callback');
if (callback) {
callback.call(this.model.ownerContext);
callback.call(this.model.ownerContext, this);
}
}
});

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);
}
});
});

View File

@@ -1,8 +1,2 @@
<div class="pull-left page-toolbar">
<div class="toolbar-group x-toolbar-left-1"/>
<div class="toolbar-group x-toolbar-left-2"/>
</div>
<div class="pull-right page-toolbar">
<div class="toolbar-group x-toolbar-right-1"/>
<div class="toolbar-group x-toolbar-right-2"/>
</div>
<div class="pull-left page-toolbar x-toolbar-left" />
<div class="pull-right page-toolbar x-toolbar-right" />