mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-23 06:45:19 -07:00
Add first steps of paging to movie editor.
This commit is contained in:
parent
d22d5fcfc3
commit
fe4e11d9c1
2 changed files with 27 additions and 2 deletions
|
@ -9,6 +9,7 @@ var ProfileCell = require('../../Cells/ProfileCell');
|
||||||
var SelectAllCell = require('../../Cells/SelectAllCell');
|
var SelectAllCell = require('../../Cells/SelectAllCell');
|
||||||
var ToolbarLayout = require('../../Shared/Toolbar/ToolbarLayout');
|
var ToolbarLayout = require('../../Shared/Toolbar/ToolbarLayout');
|
||||||
var FooterView = require('./MovieEditorFooterView');
|
var FooterView = require('./MovieEditorFooterView');
|
||||||
|
var GridPager = require('../../Shared/Grid/Pager');
|
||||||
require('../../Mixins/backbone.signalr.mixin');
|
require('../../Mixins/backbone.signalr.mixin');
|
||||||
|
|
||||||
module.exports = Marionette.Layout.extend({
|
module.exports = Marionette.Layout.extend({
|
||||||
|
@ -16,7 +17,9 @@ module.exports = Marionette.Layout.extend({
|
||||||
|
|
||||||
regions : {
|
regions : {
|
||||||
seriesRegion : '#x-series-editor',
|
seriesRegion : '#x-series-editor',
|
||||||
toolbar : '#x-toolbar'
|
toolbar : '#x-toolbar',
|
||||||
|
pagerTop : "#x-movie-pager-top",
|
||||||
|
pager : "#x-movie-pager"
|
||||||
},
|
},
|
||||||
|
|
||||||
ui : {
|
ui : {
|
||||||
|
@ -77,7 +80,9 @@ module.exports = Marionette.Layout.extend({
|
||||||
|
|
||||||
initialize : function() {
|
initialize : function() {
|
||||||
this.movieCollection = MoviesCollection.clone();
|
this.movieCollection = MoviesCollection.clone();
|
||||||
|
this.movieCollection.state = MoviesCollection.state;
|
||||||
this.movieCollection.bindSignalR();
|
this.movieCollection.bindSignalR();
|
||||||
|
//debugger;
|
||||||
this.listenTo(this.movieCollection, 'save', this.render);
|
this.listenTo(this.movieCollection, 'save', this.render);
|
||||||
|
|
||||||
this.filteringOptions = {
|
this.filteringOptions = {
|
||||||
|
@ -107,12 +112,26 @@ module.exports = Marionette.Layout.extend({
|
||||||
onRender : function() {
|
onRender : function() {
|
||||||
this._showToolbar();
|
this._showToolbar();
|
||||||
this._showTable();
|
this._showTable();
|
||||||
|
this._showPager();
|
||||||
},
|
},
|
||||||
|
|
||||||
onClose : function() {
|
onClose : function() {
|
||||||
vent.trigger(vent.Commands.CloseControlPanelCommand);
|
vent.trigger(vent.Commands.CloseControlPanelCommand);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_showPager : function(){
|
||||||
|
var pager = new GridPager({
|
||||||
|
columns : this.columns,
|
||||||
|
collection : this.movieCollection,
|
||||||
|
});
|
||||||
|
var pagerTop = new GridPager({
|
||||||
|
columns : this.columns,
|
||||||
|
collection : this.movieCollection,
|
||||||
|
});
|
||||||
|
this.pager.show(pager);
|
||||||
|
this.pagerTop.show(pagerTop);
|
||||||
|
},
|
||||||
|
|
||||||
_showTable : function() {
|
_showTable : function() {
|
||||||
if (this.movieCollection.length === 0) {
|
if (this.movieCollection.length === 0) {
|
||||||
this.seriesRegion.show(new EmptyView());
|
this.seriesRegion.show(new EmptyView());
|
||||||
|
|
|
@ -1,7 +1,13 @@
|
||||||
<div id="x-toolbar"></div>
|
<div id="x-toolbar"></div>
|
||||||
|
|
||||||
|
<div id="x-movie-pager-top">
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div id="x-series-editor" class="table-responsive"></div>
|
<div id="x-series-editor" class="table-responsive"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="x-movie-pager">
|
||||||
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue