Renamed Activity to History in episode details modal

Closes #624
pull/2/head
Mark McDowall 10 years ago
parent 6983f36f4d
commit 08714f79da

@ -129,7 +129,7 @@ td.episode-status-cell, td.quality-cell, td.history-quality-cell, td.progress-ce
}
}
.episode-activity-details-cell {
.episode-history-details-cell {
width : 18px;
}

@ -1 +0,0 @@
<div class="activity-table table-responsive"></div>

@ -1,3 +0,0 @@
<p class="text-warning">
No activity for this episode.
</p>

@ -1,7 +1,7 @@
var Marionette = require('marionette');
var SummaryLayout = require('./Summary/EpisodeSummaryLayout');
var SearchLayout = require('./Search/EpisodeSearchLayout');
var EpisodeActivityLayout = require('./Activity/EpisodeActivityLayout');
var EpisodeHistoryLayout = require('./History/EpisodeHistoryLayout');
var SeriesCollection = require('../Series/SeriesCollection');
var Messenger = require('../Shared/Messenger');
@ -10,14 +10,14 @@ module.exports = Marionette.Layout.extend({
template : 'Episode/EpisodeDetailsLayoutTemplate',
regions : {
summary : '#episode-summary',
activity : '#episode-activity',
search : '#episode-search'
summary : '#episode-summary',
history : '#episode-history',
search : '#episode-search'
},
ui : {
summary : '.x-episode-summary',
activity : '.x-episode-activity',
history : '.x-episode-history',
search : '.x-episode-search',
monitored : '.x-episode-monitored'
},
@ -25,7 +25,7 @@ module.exports = Marionette.Layout.extend({
events : {
'click .x-episode-summary' : '_showSummary',
'click .x-episode-activity' : '_showActivity',
'click .x-episode-history' : '_showHistory',
'click .x-episode-search' : '_showSearch',
'click .x-episode-monitored' : '_toggleMonitored'
},
@ -77,13 +77,13 @@ module.exports = Marionette.Layout.extend({
}));
},
_showActivity : function(e) {
_showHistory : function(e) {
if (e) {
e.preventDefault();
}
this.ui.activity.tab('show');
this.activity.show(new EpisodeActivityLayout({
this.ui.history.tab('show');
this.history.show(new EpisodeHistoryLayout({
model : this.model,
series : this.series
}));

@ -13,12 +13,12 @@
<div class="modal-body">
<ul class="nav nav-tabs" id="myTab">
<li><a href="#episode-summary" class="x-episode-summary">Summary</a></li>
<li><a href="#episode-activity" class="x-episode-activity">Activity</a></li>
<li><a href="#episode-history" class="x-episode-history">History</a></li>
<li><a href="#episode-search" class="x-episode-search">Search</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane" id="episode-summary"/>
<div class="tab-pane" id="episode-activity"/>
<div class="tab-pane" id="episode-history"/>
<div class="tab-pane" id="episode-search"/>
</div>
</div>

@ -6,7 +6,7 @@ var HistoryDetailsView = require('../../Activity/History/Details/HistoryDetailsV
require('bootstrap');
module.exports = NzbDroneCell.extend({
className : 'episode-activity-details-cell',
className : 'episode-history-details-cell',
render : function() {
this.$el.empty();

@ -4,16 +4,16 @@ var HistoryCollection = require('../../Activity/History/HistoryCollection');
var EventTypeCell = require('../../Cells/EventTypeCell');
var QualityCell = require('../../Cells/QualityCell');
var RelativeDateCell = require('../../Cells/RelativeDateCell');
var EpisodeActivityActionsCell = require('./EpisodeActivityActionsCell');
var EpisodeActivityDetailsCell = require('./EpisodeActivityDetailsCell');
var NoActivityView = require('./NoActivityView');
var EpisodeHistoryActionsCell = require('./EpisodeHistoryActionsCell');
var EpisodeHistoryDetailsCell = require('./EpisodeHistoryDetailsCell');
var NoHistoryView = require('./NoHistoryView');
var LoadingView = require('../../Shared/LoadingView');
module.exports = Marionette.Layout.extend({
template : 'Episode/Activity/EpisodeActivityLayoutTemplate',
template : 'Episode/History/EpisodeHistoryLayoutTemplate',
regions : {
activityTable : '.activity-table'
historyTable : '.history-table'
},
columns : [
@ -41,13 +41,13 @@ module.exports = Marionette.Layout.extend({
{
name : 'this',
label : '',
cell : EpisodeActivityDetailsCell,
cell : EpisodeHistoryDetailsCell,
sortable : false
},
{
name : 'this',
label : '',
cell : EpisodeActivityActionsCell,
cell : EpisodeHistoryActionsCell,
sortable : false
}
],
@ -58,19 +58,19 @@ module.exports = Marionette.Layout.extend({
this.collection = new HistoryCollection({
episodeId : this.model.id,
tableName : 'episodeActivity'
tableName : 'episodeHistory'
});
this.collection.fetch();
this.listenTo(this.collection, 'sync', this._showTable);
},
onRender : function() {
this.activityTable.show(new LoadingView());
this.historyTable.show(new LoadingView());
},
_showTable : function() {
if (this.collection.any()) {
this.activityTable.show(new Backgrid.Grid({
this.historyTable.show(new Backgrid.Grid({
collection : this.collection,
columns : this.columns,
className : 'table table-hover table-condensed'
@ -78,7 +78,7 @@ module.exports = Marionette.Layout.extend({
}
else {
this.activityTable.show(new NoActivityView());
this.historyTable.show(new NoHistoryView());
}
}
});

@ -0,0 +1 @@
<div class="history-table table-responsive"></div>

@ -1,5 +1,5 @@
var Marionette = require('marionette');
module.exports = Marionette.ItemView.extend({
template : 'Episode/Activity/NoActivityViewTemplate'
template : 'Episode/History/NoHistoryViewTemplate'
});

@ -0,0 +1,3 @@
<p class="text-warning">
No history for this episode.
</p>

@ -287,7 +287,7 @@
font-size : 12px;
}
.episode-activity-details-cell .popover {
.episode-history-details-cell .popover {
max-width: 800px;
}

Loading…
Cancel
Save