Viewing File: /usr/local/cpanel/base/cjt/scaler-min.js
if(typeof CPANEL==="undefined"||!CPANEL){alert("You must include the CPANEL global object before including scaler.js!")}else{YAHOO.util.Event.onDOMReady((function(){if(document.styleSheets){CPANEL.scaleRes=function(ev,forceWidth){var curRes=forceWidth||YAHOO.util.Dom.getViewportWidth();for(var group=0;group<grouped_sheets_length;group++){var useStyleSheet=-1;var current_group=grouped_sheets[group];var group_length=current_group.length;for(var i=0;i<group_length;i++){if(curRes>=current_group[i].res){useStyleSheet=i}}if(current_group.lastActive!=useStyleSheet){if(current_group.lastActive>=0){current_group[current_group.lastActive].obj.disabled=true}if(useStyleSheet>=0){current_group[useStyleSheet].obj.disabled=false}current_group.lastActive=useStyleSheet}}};var sheets=document.styleSheets.length;var grouped_sheets=[];var scratch_groups={};var grouped_sheets_length=0;for(var i=0;i<sheets;i++){var current_sheet=document.styleSheets[i];if(current_sheet.ownerNode.id){var sheetId=current_sheet.ownerNode.id.split("--");var group_name=sheetId[0];var sheet_range=sheetId[1];if(/^\d+$/i.test(sheet_range)){if(group_name in scratch_groups){group_index=scratch_groups[group_name].id}else{group_index=grouped_sheets_length++;scratch_groups[group_name]={id:group_index};grouped_sheets[group_index]=[];grouped_sheets[group_index].lastActive=-999}grouped_sheets[group_index].push({res:sheet_range,obj:document.styleSheets[i]})}}}if(grouped_sheets_length){for(var group=0;group<grouped_sheets_length;group++){grouped_sheets[group].sort((function(a,b){return a.res-b.res}))}var curRes=YAHOO.util.Dom.getViewportWidth();for(var group=0;group<grouped_sheets_length;group++){var current_group=grouped_sheets[group];var group_length=current_group.length;var useStyleSheet=-1;for(var i=0;i<group_length;i++){if(curRes>=current_group[i].res){useStyleSheet=i}}for(var i=0;i<group_length;i++){current_group[i].obj.disabled=!(i==useStyleSheet)}if(useStyleSheet>=0){current_group.lastActive=useStyleSheet}}YAHOO.util.Event.addListener(window,"resize",CPANEL.scaleRes)}}}))}
Back to Directory
File Manager