diff --git a/src/UI/Mixins/jquery.ajax.js b/src/UI/Mixins/jquery.ajax.js index 0a932e6c2..0fe0b047f 100644 --- a/src/UI/Mixins/jquery.ajax.js +++ b/src/UI/Mixins/jquery.ajax.js @@ -22,7 +22,7 @@ define( delete xhr.data; } - + if (xhr) { xhr.headers = xhr.headers || {}; xhr.headers.Authorization = window.NzbDrone.ApiKey; diff --git a/src/UI/System/About/AboutViewTemplate.html b/src/UI/System/About/AboutViewTemplate.html deleted file mode 100644 index efe394569..000000000 --- a/src/UI/System/About/AboutViewTemplate.html +++ /dev/null @@ -1,8 +0,0 @@ -
-
Version
-
{{version}}
-
AppData directory
-
{{appData}}
-
Startup directory
-
{{startupPath}}
-
diff --git a/src/UI/System/DiskSpace/DiskSpaceTemplate.html b/src/UI/System/DiskSpace/DiskSpaceTemplate.html deleted file mode 100644 index f640d03e9..000000000 --- a/src/UI/System/DiskSpace/DiskSpaceTemplate.html +++ /dev/null @@ -1,5 +0,0 @@ -
-
-
-
-
\ No newline at end of file diff --git a/src/UI/System/About/AboutView.js b/src/UI/System/Info/About/AboutView.js similarity index 82% rename from src/UI/System/About/AboutView.js rename to src/UI/System/Info/About/AboutView.js index f87b8758e..b1133db1a 100644 --- a/src/UI/System/About/AboutView.js +++ b/src/UI/System/Info/About/AboutView.js @@ -5,7 +5,7 @@ define( 'System/StatusModel' ], function (Marionette, StatusModel) { return Marionette.ItemView.extend({ - template: 'System/About/AboutViewTemplate', + template: 'System/Info/About/AboutViewTemplate', initialize: function () { this.model = StatusModel; diff --git a/src/UI/System/Info/About/AboutViewTemplate.html b/src/UI/System/Info/About/AboutViewTemplate.html new file mode 100644 index 000000000..57c32bc4e --- /dev/null +++ b/src/UI/System/Info/About/AboutViewTemplate.html @@ -0,0 +1,13 @@ +
+ About + +
+
Version
+
{{version}}
+
AppData directory
+
{{appData}}
+
Startup directory
+
{{startupPath}}
+
+
+ diff --git a/src/UI/System/DiskSpace/DiskSpaceCollection.js b/src/UI/System/Info/DiskSpace/DiskSpaceCollection.js similarity index 74% rename from src/UI/System/DiskSpace/DiskSpaceCollection.js rename to src/UI/System/Info/DiskSpace/DiskSpaceCollection.js index 27fb20225..b65238704 100644 --- a/src/UI/System/DiskSpace/DiskSpaceCollection.js +++ b/src/UI/System/Info/DiskSpace/DiskSpaceCollection.js @@ -1,5 +1,5 @@ 'use strict'; -define(['backbone', 'System/DiskSpace/DiskSpaceModel'], +define(['backbone', 'System/Info/DiskSpace/DiskSpaceModel'], function(Backbone, DiskSpaceModel) { return Backbone.Collection.extend({ url:window.NzbDrone.ApiRoot +'/diskspace', diff --git a/src/UI/System/DiskSpace/DiskSpaceLayout.js b/src/UI/System/Info/DiskSpace/DiskSpaceLayout.js similarity index 92% rename from src/UI/System/DiskSpace/DiskSpaceLayout.js rename to src/UI/System/Info/DiskSpace/DiskSpaceLayout.js index 63c03aa43..9a8ef6026 100644 --- a/src/UI/System/DiskSpace/DiskSpaceLayout.js +++ b/src/UI/System/Info/DiskSpace/DiskSpaceLayout.js @@ -3,12 +3,12 @@ define([ 'vent', 'marionette', 'backgrid', - 'System/DiskSpace/DiskSpaceCollection', + 'System/Info/DiskSpace/DiskSpaceCollection', 'Shared/LoadingView', 'Cells/FileSizeCell' ], function (vent,Marionette,Backgrid,DiskSpaceCollection,LoadingView,FileSizeCell) { return Marionette.Layout.extend({ - template: 'System/DiskSpace/DiskSpaceTemplate', + template: 'System/Info/DiskSpace/DiskSpaceLayoutTemplate', regions: { grid: '#x-grid' diff --git a/src/UI/System/Info/DiskSpace/DiskSpaceLayoutTemplate.html b/src/UI/System/Info/DiskSpace/DiskSpaceLayoutTemplate.html new file mode 100644 index 000000000..6cf4d34e3 --- /dev/null +++ b/src/UI/System/Info/DiskSpace/DiskSpaceLayoutTemplate.html @@ -0,0 +1,5 @@ +
+ Disk Space + +
+
\ No newline at end of file diff --git a/src/UI/System/DiskSpace/DiskSpaceModel.js b/src/UI/System/Info/DiskSpace/DiskSpaceModel.js similarity index 100% rename from src/UI/System/DiskSpace/DiskSpaceModel.js rename to src/UI/System/Info/DiskSpace/DiskSpaceModel.js diff --git a/src/UI/System/Info/SystemInfoLayout.js b/src/UI/System/Info/SystemInfoLayout.js new file mode 100644 index 000000000..e415c6d8d --- /dev/null +++ b/src/UI/System/Info/SystemInfoLayout.js @@ -0,0 +1,26 @@ +'use strict'; +define( + [ + 'backbone', + 'marionette', + 'System/Info/About/AboutView', + 'System/Info/DiskSpace/DiskSpaceLayout' + ], function (Backbone, + Marionette, + AboutView, + DiskSpaceLayout) { + return Marionette.Layout.extend({ + template: 'System/Info/SystemInfoLayoutTemplate', + + regions: { + about : '#about', + diskSpace: '#diskspace' + }, + + onRender: function () { + this.about.show(new AboutView()); + this.diskSpace.show(new DiskSpaceLayout()); + } + }); + }); + diff --git a/src/UI/System/Info/SystemInfoLayoutTemplate.html b/src/UI/System/Info/SystemInfoLayoutTemplate.html new file mode 100644 index 000000000..74ba09bf2 --- /dev/null +++ b/src/UI/System/Info/SystemInfoLayoutTemplate.html @@ -0,0 +1,7 @@ +
+
+
+ +
+
+
\ No newline at end of file diff --git a/src/UI/System/SystemLayout.js b/src/UI/System/SystemLayout.js index 431f55e3b..29c06d43b 100644 --- a/src/UI/System/SystemLayout.js +++ b/src/UI/System/SystemLayout.js @@ -3,38 +3,33 @@ define( [ 'backbone', 'marionette', - 'System/About/AboutView', + 'System/Info/SystemInfoLayout', 'System/Logs/LogsLayout', - 'System/Update/UpdateLayout', - 'System/DiskSpace/DiskSpaceLayout' + 'System/Update/UpdateLayout' ], function (Backbone, Marionette, - AboutView, + SystemInfoLayout, LogsLayout, - UpdateLayout, - DiskSpaceLayout) { + UpdateLayout) { return Marionette.Layout.extend({ template: 'System/SystemLayoutTemplate', regions: { - about : '#about', + info : '#info', logs : '#logs', - updates: '#updates', - diskSpace: '#diskspace' + updates: '#updates' }, ui: { - aboutTab : '.x-about-tab', + infoTab : '.x-info-tab', logsTab : '.x-logs-tab', - updatesTab: '.x-updates-tab', - diskSpaceTab: '.x-diskspace-tab' + updatesTab: '.x-updates-tab' }, events: { - 'click .x-about-tab' : '_showAbout', + 'click .x-info-tab' : '_showInfo', 'click .x-logs-tab' : '_showLogs', - 'click .x-updates-tab': '_showUpdates', - 'click .x-diskspace-tab':'_showDiskSpace' + 'click .x-updates-tab': '_showUpdates' }, initialize: function (options) { @@ -51,10 +46,8 @@ define( case 'updates': this._showUpdates(); break; - case 'diskspace': - this._showDiskSpace(); default: - this._showAbout(); + this._showInfo(); } }, @@ -62,14 +55,14 @@ define( Backbone.history.navigate(route); }, - _showAbout: function (e) { + _showInfo: function (e) { if (e) { e.preventDefault(); } - this.about.show(new AboutView()); - this.ui.aboutTab.tab('show'); - this._navigate('system/about'); + this.info.show(new SystemInfoLayout()); + this.ui.infoTab.tab('show'); + this._navigate('system/info'); }, _showLogs: function (e) { @@ -90,14 +83,6 @@ define( this.updates.show(new UpdateLayout()); this.ui.updatesTab.tab('show'); this._navigate('system/updates'); - }, - _showDiskSpace: function (e) { - if (e) { - e.preventDefault(); - } - this.diskSpace.show(new DiskSpaceLayout()); - this.ui.diskSpaceTab.tab('show'); - this._navigate("system/diskspace"); } }); }); diff --git a/src/UI/System/SystemLayoutTemplate.html b/src/UI/System/SystemLayoutTemplate.html index 3eb712314..d95a3996b 100644 --- a/src/UI/System/SystemLayoutTemplate.html +++ b/src/UI/System/SystemLayoutTemplate.html @@ -1,13 +1,11 @@ 
-
+
-
\ No newline at end of file