stub out xml tv class

This commit is contained in:
Luke Pulverenti 2015-07-24 17:44:25 -04:00
parent 256b44764f
commit 3226bd017c
4 changed files with 31 additions and 13 deletions

View File

@ -2617,8 +2617,9 @@
*/
self.authenticateUserByName = function (name, password) {
var deferred = DeferredBuilder.Deferred();
if (!name) {
var deferred = DeferredBuilder.Deferred();
deferred.reject();
return deferred.promise();
}
@ -2630,7 +2631,7 @@
Username: name
};
return self.ajax({
self.ajax({
type: "POST",
url: url,
data: JSON.stringify(postData),
@ -2639,8 +2640,18 @@
}).done(function (result) {
Events.trigger(self, 'authenticated', [result]);
if (self.onAuthenticated) {
self.onAuthenticated(self, result);
}
deferred.resolveWith(null, [result]);
}).fail(function () {
deferred.reject();
});
return deferred.promise();
};
/**

View File

@ -176,9 +176,9 @@
existingServer.ManualAddress = apiClient.serverAddress();
apiClient.serverInfo(existingServer);
Events.on(apiClient, 'authenticated', function (e, result) {
onAuthenticated(this, result, {}, true);
});
apiClient.onAuthenticated = function (instance, result) {
onAuthenticated(instance, result, {}, true);
};
if (!existingServers.length) {
var credentials = credentialProvider.credentials();
@ -235,9 +235,9 @@
apiClient.serverInfo(server);
Events.on(apiClient, 'authenticated', function (e, result) {
onAuthenticated(this, result, {}, true);
});
apiClient.onAuthenticated = function (instance, result) {
onAuthenticated(instance, result, {}, true);
};
Events.trigger(self, 'apiclientcreated', [apiClient]);
}

View File

@ -18,9 +18,7 @@
Logger.log('credentials initialized with: ' + json);
credentials = JSON.parse(json);
credentials.Servers = credentials.Servers || credentials.servers || [];
credentials.servers = null;
credentials.Servers = credentials.Servers || [];
}
}

View File

@ -56,6 +56,15 @@
function submitListingsForm(page) {
var selectedListingsId = $('#selectListing', page).val();
if (!selectedListingsId) {
Dashboard.alert({
message: Globalize.translate('ErrorPleaseSelectLineup')
});
return;
}
Dashboard.showLoadingMsg();
var id = providerId;
@ -68,7 +77,7 @@
info.ZipCode = $('#txtZipCode', page).val();
info.Country = $('#selectCountry', page).val();
info.ListingsId = $('#selectListing', page).val();
info.ListingsId = selectedListingsId;
ApiClient.ajax({
type: "POST",