diff --git a/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs index 987917d9c..5652f3b6c 100644 --- a/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs @@ -22,6 +22,9 @@ namespace NzbDrone.Core.Test.ParserTests * [TestCase("Desparate Housewives - S07E22 - 7x23 - And Lots of Security.. [HDTV-720p].mkv", "Desparate Housewives", 7, new[] { 22, 23 }, 2)] * [TestCase("S07E22 - 7x23 - And Lots of Security.. [HDTV-720p].mkv", "", 7, new[] { 22, 23 }, 2)] * (Game of Thrones s03 e - "Game of Thrones Season 3 Episode 10" + * The.Man.of.Steel.1994-05.33.hybrid.DreamGirl-Novus-HD + * Superman.-.The.Man.of.Steel.1994-06.34.hybrid.DreamGirl-Novus-HD + * Superman.-.The.Man.of.Steel.1994-05.33.hybrid.DreamGirl-Novus-HD */ [TestCase("Sonny.With.a.Chance.S02E15", "Sonny.With.a.Chance", 2, 15)] diff --git a/src/UI/History/Table/ControlsColumnTemplate.html b/src/UI/History/Table/ControlsColumnTemplate.html deleted file mode 100644 index 869b7b965..000000000 --- a/src/UI/History/Table/ControlsColumnTemplate.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/src/UI/History/Table/HistoryDetailsCell.js b/src/UI/History/Table/HistoryDetailsCell.js index 5f29097c3..64c268508 100644 --- a/src/UI/History/Table/HistoryDetailsCell.js +++ b/src/UI/History/Table/HistoryDetailsCell.js @@ -21,7 +21,7 @@ define( }, _showDetails: function () { - vent.trigger(vent.Commands.ShowHistoryDetails, { history: this.model }); + vent.trigger(vent.Commands.ShowHistoryDetails, { model: this.model }); } }); }); diff --git a/src/UI/Shared/Modal/Controller.js b/src/UI/Shared/Modal/Controller.js index 465119a0f..349db691d 100644 --- a/src/UI/Shared/Modal/Controller.js +++ b/src/UI/Shared/Modal/Controller.js @@ -7,8 +7,9 @@ define( 'Series/Edit/EditSeriesView', 'Series/Delete/DeleteSeriesView', 'Episode/EpisodeDetailsLayout', - 'History/Details/HistoryDetailsView' - ], function (vent, AppLayout, Marionette, EditSeriesView, DeleteSeriesView, EpisodeDetailsLayout, HistoryDetailsView) { + 'History/Details/HistoryDetailsView', + 'System/Logs/Table/Details/LogDetailsView' + ], function (vent, AppLayout, Marionette, EditSeriesView, DeleteSeriesView, EpisodeDetailsLayout, HistoryDetailsView, LogDetailsView) { return Marionette.AppRouter.extend({ @@ -18,6 +19,7 @@ define( vent.on(vent.Commands.DeleteSeriesCommand, this._deleteSeries, this); vent.on(vent.Commands.ShowEpisodeDetails, this._showEpisode, this); vent.on(vent.Commands.ShowHistoryDetails, this._showHistory, this); + vent.on(vent.Commands.ShowLogDetails, this._showLogDetails, this); }, _closeModal: function () { @@ -40,7 +42,12 @@ define( }, _showHistory: function (options) { - var view = new HistoryDetailsView({ model: options.history }); + var view = new HistoryDetailsView({ model: options.model }); + AppLayout.modalRegion.show(view); + }, + + _showLogDetails: function (options) { + var view = new LogDetailsView({ model: options.model }); AppLayout.modalRegion.show(view); } }); diff --git a/src/UI/System/Logs/Files/LogFileLayout.js b/src/UI/System/Logs/Files/LogFileLayout.js index e4c272dfe..f8de17828 100644 --- a/src/UI/System/Logs/Files/LogFileLayout.js +++ b/src/UI/System/Logs/Files/LogFileLayout.js @@ -130,12 +130,12 @@ define( filename: filename }); - this.listenToOnce(contentsModel, 'sync', this._showContents); + this.listenToOnce(contentsModel, 'sync', this._showDetails); contentsModel.fetch({ dataType: 'text' }); }, - _showContents: function (model) { + _showDetails: function (model) { this.contents.show(new ContentsView({ model: model })); }, diff --git a/src/UI/System/Logs/Files/Row.js b/src/UI/System/Logs/Files/Row.js index 543893b00..926869008 100644 --- a/src/UI/System/Logs/Files/Row.js +++ b/src/UI/System/Logs/Files/Row.js @@ -9,10 +9,10 @@ define( className: 'log-file-row', events: { - 'click': '_showContents' + 'click': '_showDetails' }, - _showContents: function () { + _showDetails: function () { vent.trigger(vent.Commands.ShowLogFile, { model: this.model }); } }); diff --git a/src/UI/System/Logs/Logs.less b/src/UI/System/Logs/Logs.less index c61c3a135..f5deaf3c5 100644 --- a/src/UI/System/Logs/Logs.less +++ b/src/UI/System/Logs/Logs.less @@ -18,4 +18,8 @@ .log-file-row { .clickable; +} + +.log-row { + .clickable; } \ No newline at end of file diff --git a/src/UI/System/Logs/Table/Details/LogDetailsView.js b/src/UI/System/Logs/Table/Details/LogDetailsView.js new file mode 100644 index 000000000..eba74360e --- /dev/null +++ b/src/UI/System/Logs/Table/Details/LogDetailsView.js @@ -0,0 +1,11 @@ +'use strict'; +define( + [ + 'vent', + 'marionette' + ], function (vent, Marionette) { + + return Marionette.ItemView.extend({ + template: 'System/Logs/Table/Details/LogDetailsViewTemplate' + }); + }); diff --git a/src/UI/System/Logs/Table/Details/LogDetailsViewTemplate.html b/src/UI/System/Logs/Table/Details/LogDetailsViewTemplate.html new file mode 100644 index 000000000..5ad8f7594 --- /dev/null +++ b/src/UI/System/Logs/Table/Details/LogDetailsViewTemplate.html @@ -0,0 +1,22 @@ +
+ + + +
+ diff --git a/src/UI/System/Logs/Table/LogRow.js b/src/UI/System/Logs/Table/LogRow.js new file mode 100644 index 000000000..1507f6ff3 --- /dev/null +++ b/src/UI/System/Logs/Table/LogRow.js @@ -0,0 +1,19 @@ +'use strict'; +define( + [ + 'vent', + 'backgrid' + ], function (vent, Backgrid) { + + return Backgrid.Row.extend({ + className: 'log-row', + + events: { + 'click': '_showDetails' + }, + + _showDetails: function () { + vent.trigger(vent.Commands.ShowLogDetails, { model: this.model }); + } + }); + }); diff --git a/src/UI/System/Logs/Table/LogsTableLayout.js b/src/UI/System/Logs/Table/LogsTableLayout.js index 9288474c3..95a59851a 100644 --- a/src/UI/System/Logs/Table/LogsTableLayout.js +++ b/src/UI/System/Logs/Table/LogsTableLayout.js @@ -6,11 +6,12 @@ define( 'backgrid', 'System/Logs/Table/LogTimeCell', 'System/Logs/Table/LogLevelCell', + 'System/Logs/Table/LogRow', 'Shared/Grid/Pager', 'System/Logs/LogsCollection', 'Shared/Toolbar/ToolbarLayout', 'Shared/LoadingView' - ], function (vent, Marionette, Backgrid, LogTimeCell, LogLevelCell, GridPager, LogCollection, ToolbarLayout, LoadingView) { + ], function (vent, Marionette, Backgrid, LogTimeCell, LogLevelCell, LogRow, GridPager, LogCollection, ToolbarLayout, LoadingView) { return Marionette.Layout.extend({ template: 'System/Logs/Table/LogsTableLayoutTemplate', @@ -77,7 +78,7 @@ define( _showTable: function () { this.grid.show(new Backgrid.Grid({ - row : Backgrid.Row, + row : LogRow, columns : this.columns, collection: this.collection, className : 'table table-hover' diff --git a/src/UI/vent.js b/src/UI/vent.js index b8b7eff51..4170ac72b 100644 --- a/src/UI/vent.js +++ b/src/UI/vent.js @@ -20,6 +20,7 @@ define( CloseModalCommand : 'CloseModalCommand', ShowEpisodeDetails : 'ShowEpisodeDetails', ShowHistoryDetails : 'ShowHistoryDetails', + ShowLogDetails : 'ShowLogDetails', SaveSettings : 'saveSettings', ShowLogFile : 'showLogFile' };