CC-6046, CC-6045, CC-6047 - New SoundCloud implementation

This commit is contained in:
Duncan Sommerville 2015-06-03 16:57:17 -04:00
parent 51a3f19f43
commit b0b6e037ac
62 changed files with 4009 additions and 2491 deletions

View file

@ -82,6 +82,20 @@ function setTuneInSettingsReadonly() {
}
}
function setSoundCloudSettingsListener() {
var connect = $("#SoundCloudConnect"),
disconnect = $("#SoundCloudDisconnect");
connect.click(function(e){
e.preventDefault();
window.location.replace(baseUrl + "soundcloud/authorize");
});
disconnect.click(function(e){
e.preventDefault();
window.location.replace(baseUrl + "soundcloud/deauthorize");
});
}
/*
* Enable/disable mail server authentication fields
*/
@ -118,21 +132,21 @@ function setCollapsibleWidgetJsCode() {
$('#thirdPartyApi-element input').click(x);
}
function setSoundCloudCheckBoxListener() {
var subCheckBox= $("#UseSoundCloud,#SoundCloudDownloadbleOption");
var mainCheckBox= $("#UploadToSoundcloudOption");
subCheckBox.change(function(e){
if (subCheckBox.is(':checked')) {
mainCheckBox.attr("checked", true);
}
});
mainCheckBox.change(function(e){
if (!mainCheckBox.is(':checked')) {
$("#UseSoundCloud,#SoundCloudDownloadbleOption").attr("checked", false);
}
});
}
//function setSoundCloudCheckBoxListener() {
// var subCheckBox= $("#UseSoundCloud,#SoundCloudDownloadbleOption");
// var mainCheckBox= $("#UploadToSoundcloudOption");
// subCheckBox.change(function(e){
// if (subCheckBox.is(':checked')) {
// mainCheckBox.attr("checked", true);
// }
// });
//
// mainCheckBox.change(function(e){
// if (!mainCheckBox.is(':checked')) {
// $("#UseSoundCloud,#SoundCloudDownloadbleOption").attr("checked", false);
// }
// });
//}
function removeLogo() {
$.post(baseUrl+'Preference/remove-logo', function(json){});
@ -176,7 +190,7 @@ $(document).ready(function() {
showErrorSections();
setSoundCloudCheckBoxListener();
//setSoundCloudCheckBoxListener();
setMailServerInputReadonly();
setSystemFromEmailReadonly();
setConfigureMailServerListener();
@ -184,4 +198,5 @@ $(document).ready(function() {
setCollapsibleWidgetJsCode();
setTuneInSettingsReadonly();
setTuneInSettingsListener();
setSoundCloudSettingsListener();
});