codecamp

_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});

};

_start.appLinkTo创建应用快捷方式
_sound.play播放声音
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

Dzz系统框架

输入数据处理

数据DB层

安全相关

上传组件

评论组件

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }