CC-2701: Separate Support Settings from Preference page

- done.
This commit is contained in:
James 2011-08-18 18:58:59 -04:00
parent 91df62a3dd
commit d83f9f1b96
9 changed files with 149 additions and 98 deletions

View file

@ -4,39 +4,9 @@ function showErrorSections() {
$("#soundcloud-settings").show();
$(window).scrollTop($("soundcloud-settings .errors").position().top);
}
if($("#support-settings .errors").length > 0) {
$("#support-settings").show();
$(window).scrollTop($("#support-settings .errors").position().top);
}
}
function resizeImg(ele){
var img = $(ele);
var width = ele.width;
var height = ele.height;
// resize img proportionaly
if( width > height && width > 450){
var ratio = 450/width;
img.css("width", "450px");
var newHeight = height * ratio;
img.css("height", newHeight );
}else if( width < height && height > 450){
var ratio = 450/height;
img.css("height", "450px");
var newWidth = width * ratio;
img.css("width", newWidth );
}else if( width == height && width > 450){
img.css("height", "450px");
img.css("width", "450px" );
}
}
$(document).ready(function() {
var form = $("form");
$('.collapsible-header').live('click',function() {
$(this).next().toggle('fast');
@ -44,36 +14,5 @@ $(document).ready(function() {
return false;
}).next().hide();
$("#SupportFeedback").click( function(){
var pub = $("#Publicise");
if( !$(this).is(':checked') ){
pub.removeAttr("checked");
pub.attr("disabled", true);
}else{
pub.removeAttr("disabled");
}
});
var promote = $("#Publicise");
if(!$("#SupportFeedback").is(':checked')){
promote.removeAttr("checked");
promote.attr("disabled", true);
}
promote.live('click', function(){
if($(this).is(':checked')){
$("#public-info").show();
}else{
$("#public-info").hide();
}
});
if( promote.is(":checked")){
$("#public-info").show();
}
showErrorSections();
$('.toggle legend').click(function() {
$('.toggle').toggleClass('closed');
return false;
});
});