update to latest js api client

This commit is contained in:
LukePulverenti 2013-03-21 16:20:00 -04:00
parent 3de31da5c3
commit db20e9e3ea
4 changed files with 1429 additions and 1281 deletions

File diff suppressed because it is too large Load Diff

View File

@ -114,31 +114,37 @@
getClientType: function (connection) {
if (connection.Client.toLowerCase() == "dashboard") {
var clientLowered = connection.Client.toLowerCase();
if (clientLowered == "dashboard") {
return "<img src='css/images/clients/html5.png' alt='Dashboard' title='Dashboard' />";
}
if (connection.Client.toLowerCase() == "mediabrowsertheater") {
if (clientLowered == "media browser classic") {
return "<img src='css/images/clients/mb.png' alt='Media Browser Classic' title='Media Browser Classic' />";
}
if (clientLowered == "media browser theater") {
return "<img src='css/images/clients/mb.png' alt='Media Browser Theater' title='Media Browser Theater' />";
}
if (connection.Client.toLowerCase() == "android") {
if (clientLowered == "android") {
return "<img src='css/images/clients/android.png' alt='Android' title='Android' />";
}
if (connection.Client.toLowerCase() == "ios") {
if (clientLowered == "ios") {
return "<img src='css/images/clients/ios.png' alt='iOS' title='iOS' />";
}
if (connection.Client.toLowerCase() == "windowsrt") {
if (clientLowered == "windows rt") {
return "<img src='css/images/clients/windowsrt.png' alt='Windows RT' title='Windows RT' />";
}
if (connection.Client.toLowerCase() == "windowsphone") {
if (clientLowered == "windows phone") {
return "<img src='css/images/clients/windowsphone.png' alt='Windows Phone' title='Windows Phone' />";
}
if (connection.Client.toLowerCase() == "dlna") {
if (clientLowered == "dlna") {
return "<img src='css/images/clients/dlna.png' alt='Dlna' title='Dlna' />";
}

View File

@ -81,14 +81,14 @@ var Dashboard = {
setCurrentUser: function (userId) {
localStorage.setItem("userId", userId);
ApiClient.currentUserId = userId;
ApiClient.currentUserId(userId);
Dashboard.getUserPromise = null;
},
logout: function () {
localStorage.removeItem("userId");
Dashboard.getUserPromise = null;
ApiClient.currentUserId = null;
ApiClient.currentUserId(null);
window.location = "login.html";
},
@ -857,7 +857,7 @@ var Dashboard = {
systemInfo = systemInfo || Dashboard.lastSystemInfo;
var url = "ws://" + ApiClient.serverHostName + ":" + systemInfo.WebSocketPortNumber + "/mediabrowser";
var url = "ws://" + ApiClient.serverHostName() + ":" + systemInfo.WebSocketPortNumber + "/mediabrowser";
var ws = new WebSocket(url);
@ -1171,6 +1171,8 @@ var Dashboard = {
};
var ApiClient = MediaBrowser.ApiClient.create("Dashboard");
$(function () {
var footerHtml = '<div id="footer" class="ui-bar-a">';
@ -1211,7 +1213,7 @@ $(document).on('pagebeforeshow', ".page", function () {
var page = $(this);
var userId = Dashboard.getCurrentUserId();
ApiClient.currentUserId = userId;
ApiClient.currentUserId(userId);
if (!userId) {

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.48" targetFramework="net45" />
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.49" targetFramework="net45" />
<package id="ServiceStack" version="3.9.40" targetFramework="net45" />
<package id="ServiceStack.Common" version="3.9.40" targetFramework="net45" />
<package id="ServiceStack.OrmLite.SqlServer" version="3.9.41" targetFramework="net45" />