_layout.setTaskbarPosition设置任务栏位置
函数原型
/* 设置任务栏位置
* @string p 任务栏位置
*/
_layout.setTaskbarPosition=function(p){
if(p==_config.space.taskbar) return;
var taskbar=document.getElementById('taskbar');
taskbar.className='taskbar taskbar-'+p;
document.getElementById('startmenu').className='startmenu fade in '+p;
document.getElementById('noticeContainer').className='noticeContainer fade in '+p;
document.getElementById('copyrightmenu').className='copyrightmenu fade in '+p;
document.body.className=p;
_config.space.taskbar=p;
_layout._body_margintop=0;
_layout._body_marginright=0;
_layout._body_marginbottom=0;
_layout._body_marginleft=0;
switch(p){
case 'bottom':
_layout._body_marginbottom+=jQuery('#taskbar').height();
_layout.taskbar_direction=1;
break;
case 'left':
_layout._body_marginleft+=jQuery('#taskbar').width();
_layout.taskbar_direction=2;
break;
case 'top':
_layout._body_margintop+=jQuery('#taskbar').height();
_layout.taskbar_direction=1;
break;
case 'right':
_layout._body_marginright+=jQuery('#taskbar').width();
_layout.taskbar_direction=2;
break;
}
_layout.resize();
jQuery.post(_config.saveurl+'&do=userfield&datename=taskbar',{taskbar:p});
};
更多建议: