2015-05-22 12:16:14 -07:00
|
|
|
|
(function () {
|
2015-05-16 12:09:02 -07:00
|
|
|
|
|
2015-05-22 12:16:14 -07:00
|
|
|
|
function validatePlayback(deferred) {
|
2015-05-17 18:27:48 -07:00
|
|
|
|
|
2015-05-22 12:16:14 -07:00
|
|
|
|
var platform = (device.platform || '').toLowerCase();
|
2015-05-16 12:09:02 -07:00
|
|
|
|
|
2015-05-22 13:15:29 -07:00
|
|
|
|
// Don't require validation on android
|
2015-05-22 12:16:14 -07:00
|
|
|
|
if (platform.indexOf('android') != -1) {
|
|
|
|
|
deferred.resolve();
|
|
|
|
|
return;
|
|
|
|
|
}
|
2015-05-16 12:09:02 -07:00
|
|
|
|
|
2015-05-22 12:16:14 -07:00
|
|
|
|
deferred.resolve();
|
|
|
|
|
}
|
2015-05-16 12:09:02 -07:00
|
|
|
|
|
2015-05-22 12:16:14 -07:00
|
|
|
|
function validateLiveTV(deferred) {
|
2015-05-17 18:27:48 -07:00
|
|
|
|
|
2015-05-22 13:15:29 -07:00
|
|
|
|
var platform = (device.platform || '').toLowerCase();
|
|
|
|
|
|
|
|
|
|
// Don't require validation if not android
|
|
|
|
|
if (platform.indexOf('android') == -1) {
|
|
|
|
|
deferred.resolve();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2015-05-22 12:16:14 -07:00
|
|
|
|
deferred.resolve();
|
2015-05-17 18:27:48 -07:00
|
|
|
|
}
|
2015-05-22 12:16:14 -07:00
|
|
|
|
|
|
|
|
|
window.RegistrationServices = {
|
|
|
|
|
|
|
|
|
|
renderPluginInfo: function (page, pkg, pluginSecurityInfo) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
addRecurringFields: function (page, period) {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
initSupporterForm: function (page) {
|
|
|
|
|
|
|
|
|
|
$('.recurringSubscriptionCancellationHelp', page).html('');
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
validateFeature: function (name) {
|
|
|
|
|
var deferred = DeferredBuilder.Deferred();
|
|
|
|
|
|
|
|
|
|
if (name == 'playback') {
|
2015-05-23 13:44:15 -07:00
|
|
|
|
validatePlayback(deferred);
|
2015-05-22 12:16:14 -07:00
|
|
|
|
} else if (name == 'livetv') {
|
2015-05-23 13:44:15 -07:00
|
|
|
|
validateLiveTV(deferred);
|
2015-05-22 12:16:14 -07:00
|
|
|
|
} else {
|
|
|
|
|
deferred.resolve();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return deferred.promise();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
})();
|