?? outbar.js
字號:
// Title: COOLjsOutlookBarPRO FOR INTERNAL USE ON JAVASCRIPT.COOLDEV.COM
// YOU MAY NOT USE THIS SCRIPT
// URL: http://javascript.cooldev.com/scripts/outlookpro/
// Version: 1.0.1.internal
// Last Modify: 05 Feb 2003
// Notes: Registration needed to use this script on your web site.
// Author: Helena Nikitina
// Copyright (c) 2003 by CoolDev.Com
panel_obj=[];it_obj=[];arr_dn=[];arr_up=[];
var check_click=0;var show_n=-1;var down_p=1;
var clip_var=0;var clip_var1=0;var count_panel=0;var plus=0;
var widthscreen=0;var last_visible=0;y2=0;y_mov=0;no_pan=0;perez=0;
function COOLjsOutlookBar(id){
this.id=id; this.name=id;
this.init=function(){
height_panel=this.id.format.heightpanel;
height_img=this.id.format.imageheight;
width_img=this.id.format.imagewidth;
height_cell=this.id.format.heightcell;
height_arr=this.id.format.arrowheight;
color_outlook=this.id.format.coloroutlook;
rollback_allowed=this.id.format.rollback;
textclass_item_def=this.id.format.textCSS_item;
arrows=[]; panel_bar=[]; arrows[0]=this.id.format.img_arrows_up;
arrows[1]=this.id.format.img_arrows_dn;
arrange=this.id.format.arrange_text;
this.kol_count=this.id.panels.length;
for(l=0;l<this.kol_count;l++){
Items(0,height_panel*l+l,l);
}
sho(0);
};
this.init();
}
function Items(px,py,pn){ len_item=OutlookBar.panels[pn].items.length; text_pan=OutlookBar.panels[pn].text; class_pan=OutlookBar.panels[pn].panelCSS; textclass_pan=OutlookBar.panels[pn].textCSS; arrangement=(arrange=="top"||arrange=="bottom")?"center":(arrange=="left")?"left":"right"; panel=!bw.ns4? '<table id='+"pan"+pn+' width="100%" cellpading=0 cellspacing=0 class='+class_pan+' align=center height='+height_panel+' onclick="sho('+pn+')" onmousedown="change_stpan_md(this.id)" onmouseup="change_stpan_mout(this.id)" onmouseout="change_stpan_mout(this.id)">'+'<tr><td align=center>'+'<a onclick="this.blur()" href="#" class='+textclass_pan+' target="_self">'+text_pan+'</a></td></tr></table>': '<table width="100%" border="1" class='+class_pan+' align=center height='+height_panel+'>'+'<tr><td align=center><a onclick="this.blur()" target="_self" href="javascript:'+'sho('+pn+')"><font class='+textclass_pan+'>'+text_pan+'</font></a></tr></td></table>'; objimg=[];objank=[];it=[]; for (i=0;i<len_item;i++){ name_img='it'+pn+i; name_aimg='ita'+pn+i; var item = OutlookBar.panels[pn].items[i]; textclass_item = item.textCSS||textclass_item_def; img_class=item.classCSS; img_item=item.image; url_item=item.url; text_item=item.text; arrange_item=(arrange=="left")?"left":(arrange=="right")?"absmiddle":''; text_arrange_bl=(arrange=="left"||arrange=="bottom")?(bw.ie||bw.ns6)?(arrange!="bottom")?'<br />'+text_item:text_item:text_item:''; text_arrange_tr=(arrange=="right"||arrange=="top")?(arrange!="top")?text_item:text_item+'<br />':''; objimg[i]=bw.ns4? '<span><a onclick="this.blur()" href="'+url_item+'" class='+textclass_item+' onmouseover="change_style_ns('+name_img+',\''+img_item+'\')" onmouseout="change_style_ns1('+name_img+',\''+img_item+'\')" name='+name_aimg+' id='+name_aimg+'>'+text_arrange_tr+'<img border="0" src="'+img_item+'" name='+name_img+' id='+name_img+' align='+arrange_item+' hspace=3 vspace=10 height='+height_img+' width='+width_img+'><br />'+text_arrange_bl+'</a></span>': bw.operaOld? '<a onclick="this.blur()" href="'+url_item+'" class='+textclass_item+'>'+text_arrange_tr+' <img border="0" src="'+img_item+'" class='+img_class+' name="'+name_img+'" id="'+name_img+'" onmouseover=change_style_opmd("'+name_img+'","'+img_item+'") onmouseout=change_style_opmout("'+name_img+'","'+img_item+'") onmousedown=change_style_opmd("'+name_img+'","'+img_item+'") onmouseup=change_style_opmout("'+name_img+'","'+img_item+'") align='+arrange_item+' hspace=0 vspace=0 height='+height_img+' width='+width_img+'><br />'+text_arrange_bl+'</a>': '<a onclick="this.blur()" href="'+url_item+'" class='+textclass_item+' onmouseover=change_style_md("'+name_img+'","'+img_item+'") onmouseout=change_style_mout("'+name_img+'","'+img_item+'") onmousedown=change_style_md("'+name_img+'","'+img_item+'") onmouseup=change_style_mout("'+name_img+'","'+img_item+'")>'+text_arrange_tr+' <img border="0" src="'+img_item+'" class='+img_class+' name="'+name_img+'" id="'+name_img+'" align='+arrange_item+' hspace=1 vspace=8 height='+height_img+' width='+width_img+'><br />'+text_arrange_bl+'</a>'; it[i]='<table width="100%" align='+arrangement+' border=0 cellpading=0 cellspacing=0><tr><td align='+arrangement+' valign=top>'+objimg[i]+'</td></tr></table>'; } var name_ard="arrdn"+pn; var name_aru="arrup"+pn; arrow_dn=bw.ns4?'<a onclick="this.blur()" href="javascript:show_last('+pn+')" target="_self"><img border="0" src="'+arrows[1]+'" name="arrdn" id="arrdn" height='+height_arr+'></a>': '<a onclick="this.blur()" href="#" target="_self" onmousedown=chang_arrd("'+name_ard+'") onmouseup=chang_arru("'+name_ard+'")><img border="0" src="'+arrows[1]+'" name="'+name_ard+'" id="'+name_ard+'" onclick="show_last('+pn+');" height='+height_arr+'></a>'; arrow_up=bw.ns4?'<a onclick="this.blur()" href="javascript:show_prev('+pn+')" target="_self"><img border="0" src="'+arrows[0]+'" name="arrup" id="arrup" height='+height_arr+'></a>': '<a onclick="this.blur()" href="#" target="_self"><img border="0" onmousedown=chang_arrd("'+name_aru+'") onmouseup=chang_arru("'+name_aru+'") src="'+arrows[0]+'" name="'+name_aru+'" id="'+name_aru+'" onclick="show_prev('+pn+')" height='+height_arr+'></a>'; panel_obj[pn]=new DHTMLObject('p_o'+pn); panel_obj[pn].draw(px,py,height_panel,color_outlook,1,3,class_pan,panel); panel_obj[pn].init(); it_obj[pn]=[]; ppy=py+height_panel+pn; for (i=0;i<len_item;i++){ img_class=OutlookBar.panels[pn].items[i].classCSS; it_obj[pn][i]=new DHTMLObject('it_o'+pn+i); it_obj[pn][i].draw(px,ppy,height_cell,color_outlook,0,1,'',it[i]); it_obj[pn][i].init(); ppy+=height_cell+6; } arr_dn[pn]=new DHTMLObject('arr_obj_dn'+pn); arr_dn[pn].draw(px,py+height_cell,height_arr,color_outlook,0,1,'',arrow_dn); arr_dn[pn].init(); arr_up[pn]=new DHTMLObject('arrup'+pn); arr_up[pn].draw(px,py,height_arr,color_outlook,0,1,'',arrow_up); arr_up[pn].init(); count_panel++;}
function sho(ppn){ var razmer=new ScreenSize(); var myheight=razmer.height; var mywidth=razmer.width; check_click=rollback_allowed?(check_click>0&&show_n==ppn)?0:1:1; if ( check_click==1){ if(show_n!=-1) arr_dn[show_n].hide(); for(ii=ppn;ii>=0;ii--){ u=(ii==0)?0:ii; panel_obj[ii].slide(panel_obj[ii].x,u*height_panel+ii,200,10,1); pp_y=u*height_panel+height_panel+6; for (k=0;k<it_obj[ii].length;k++){ it_obj[ii][k].slide(it_obj[ii][k].x,pp_y,500, 1,1); pp_y+=height_cell; } } nextppn=ppn+1; down_p=nextppn; yy=height_panel+1; kol_mov_p=count_panel-ppn-1; no_pan=ppn; counter=1; for(i=count_panel-1;i>=nextppn;i--){ ypan=myheight-height_panel*counter-counter; panel_obj[i].slide(panel_obj[i].x,ypan,200,10,1); counter++; plus+=3; } if(nextppn<count_panel) y2=ypan; else{ hscreen=new ScreenSize(); y2=hscreen.height; } if(show_n!=-1) for(i=0;i<it_obj[show_n].length;i++) it_obj[show_n][i].hide(); for(i=0;i<it_obj[ppn].length;i++){ it_obj[ppn][i].show(); clip_var=(it_obj[ppn][i].y+height_cell)<=y2?0:i; } if(clip_var!=0){ arr_dn[ppn].slide(mywidth-height_arr-4,y2-height_arr-4,1000,1000,1); arr_dn[ppn].show(); } else arr_dn[ppn].hide(); if(show_n!=-1) arr_up[show_n].hide(); }else{ for(i=0;i<it_obj[ppn].length;i++) it_obj[ppn][i].hide(); for(kk=ppn;kk<count_panel;kk++){ if(kk<=count_panel){ u=kk; panel_obj[kk].slide(panel_obj[kk].x,u*height_panel+kk, 200,10,1); } } arr_dn[ppn].hide(); arr_up[ppn].hide(); } show_n=ppn; opend_visible=0;}
function show_last(porn){ var razmer=new ScreenSize(); var myheight=razmer.height; var mywidth=razmer.width; for(i=0;i<it_obj[porn].length;i++){ y_obj=it_obj[porn][i].y; y_up=y_obj-height_cell; it_obj[porn][i].slide(it_obj[porn][i].x ,y_up-2,height_panel,100, 1); it_obj[porn][i].show(); yyy=it_obj[porn][i].y+height_cell-height_panel; if(yyy<=y2&&it_obj[porn][i].y<=panel_obj[porn].y+height_cell){ arr_up[porn].slide(mywidth-height_arr-4,panel_obj[porn].y+height_panel+3,200,1,1); arr_up[porn].show(); } last=it_obj[porn].length-1; if(it_obj[porn][last].y+height_cell-height_panel*2<=y2)arr_dn[porn].hide(); }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -