1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

implemented shutdown button

This commit is contained in:
Luke Pulverenti 2013-10-01 11:16:38 -04:00
parent 5124b240f0
commit cb5da9caca
6 changed files with 31 additions and 4 deletions

View file

@ -700,6 +700,19 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
});
};
/**
* Instructs the server to perform a shutdown.
*/
self.shutdownServer = function () {
var url = self.getUrl("System/Shutdown");
return self.ajax({
type: "POST",
url: url
});
};
/**
* Gets information about an installable package
*/

View file

@ -15,7 +15,7 @@
<input type="checkbox" id="chkRunAtStartup" name="chkRunAtStartup" />
<label for="chkRunAtStartup">Run server at startup</label>
<div id="windowsStartupDescription" class="fieldDescription warningFieldDescription" style="display: none;">
This will start the tray icon on windows startup. If you'd prefer to start the windows service instead, disable this and configure the service from the control panel.
This will start the tray icon on windows startup. If you'd prefer to start the windows service instead, disable this and configure the service from the windows control panel.
</div>
</li>
<li>

View file

@ -514,9 +514,23 @@
if (result) {
$('#btnRestartServer').button('disable');
$('#btnShutdown').button('disable');
Dashboard.restartServer();
}
});
},
shutdown: function () {
Dashboard.confirm("Are you sure you wish to shutdown Media Browser Server?", "Shutdown", function (result) {
if (result) {
$('#btnRestartServer').button('disable');
$('#btnShutdown').button('disable');
ApiClient.shutdownServer();
}
});
}
};

View file

@ -203,7 +203,7 @@
}
else if (item.Type == "Game") {
html += '<p class="itemMiscInfo">' + (item.DisplayMediaType || item.GameSystem) + '</p>';
html += '<p class="itemMiscInfo">' + (item.GameSystem) + '</p>';
}
else if (item.Type == "Episode") {

View file

@ -177,7 +177,7 @@
}
else {
html += '<div class="searchHintSecondaryText">' + (hint.DisplayMediaType || hint.Type) + '</div>';
html += '<div class="searchHintSecondaryText">' + (hint.Type) + '</div>';
}
var text;

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.177" targetFramework="net45" />
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.178" targetFramework="net45" />
<package id="ServiceStack.Common" version="3.9.62" targetFramework="net45" />
<package id="ServiceStack.Text" version="3.9.62" targetFramework="net45" />
</packages>