better xhtml compliance

better admin console
some bug fixes
This commit is contained in:
JT Smith 2006-04-20 02:32:50 +00:00
parent c6065852aa
commit f27d8d16be
10 changed files with 144 additions and 194 deletions

View file

@ -107,6 +107,10 @@
- added [ 1205807 ] ability to report file size in File template - added [ 1205807 ] ability to report file size in File template
- added [ 1201811 ] resizable textAreas - added [ 1201811 ] resizable textAreas
- added [ 1376374 ] WebGUI should return a Last-Modified http/1.x header - added [ 1376374 ] WebGUI should return a Last-Modified http/1.x header
- added [ 1216059 ] Admin Bar Made Sticky
- fix [ 1463411 ] Denied content not getting expired or trashed
- fix [ 1461522 ] 6.8.7 Linking items in the page tree (PDF and other files)
- fix [ 1465280 ] BR Tag in Outlook
- fix [ 1178981 ] IE is in "quirks mode" - multi-column layout templates - fix [ 1178981 ] IE is in "quirks mode" - multi-column layout templates
break break
- fix [ 999590 ] Rating - fix [ 999590 ] Rating

View file

@ -51,7 +51,9 @@ save you many hours of grief.
* You no longer need the cron job for runHourly.pl. Instead, you * You no longer need the cron job for runHourly.pl. Instead, you
must start sbin/spectre.pl when your server starts up. must start sbin/spectre.pl when your server starts up.
Spectre is WebGUI's offline execution engine. It triggers Spectre is WebGUI's offline execution engine. It triggers
scheduled events and executes workflow tasks. scheduled events and executes workflow tasks. Be sure to
edit each of your WebGUI config files to set the
spectreSubnet setting to match your IP address or IP range.
* If you wish to run the full test suite, you'll need to install * If you wish to run the full test suite, you'll need to install
these optional modules: these optional modules:

View file

@ -509,15 +509,8 @@ Creates and returns a tabform to edit parameters of an Asset.
sub getEditForm { sub getEditForm {
my $self = shift; my $self = shift;
my $i18n = WebGUI::International->new($self->session, "Asset"); my $i18n = WebGUI::International->new($self->session, "Asset");
my $ac = $self->getAdminConsole;
my $ago = $i18n->get("ago"); my $ago = $i18n->get("ago");
my $rs = $self->session->db->read("select revisionDate from assetData where assetId=? order by revisionDate desc limit 5", [$self->getId]); my $rs = $self->session->db->read("select revisionDate from assetData where assetId=? order by revisionDate desc limit 5", [$self->getId]);
$ac->addSubmenuItem($self->getUrl("func=manageRevisions"),$i18n->get("revisions").":");
while (my ($version) = $rs->array) {
my ($interval, $units) = $self->session->datetime->secondsToInterval(time() - $version);
$ac->addSubmenuItem($self->getUrl("func=edit;revision=".$version), $interval." ".$units." ".$ago);
}
$ac->addSubmenuItem();
my $uiLevelOverride = $self->get("className"); my $uiLevelOverride = $self->get("className");
$uiLevelOverride =~ s/\:\:/_/g; $uiLevelOverride =~ s/\:\:/_/g;
my $tabform = WebGUI::TabForm->new($self->session,undef,undef,$self->getUrl(),$uiLevelOverride); my $tabform = WebGUI::TabForm->new($self->session,undef,undef,$self->getUrl(),$uiLevelOverride);
@ -534,6 +527,13 @@ sub getEditForm {
name=>"class", name=>"class",
value=>$self->session->form->process("class") value=>$self->session->form->process("class")
}); });
} else {
my $ac = $self->getAdminConsole;
$ac->addSubmenuItem($self->getUrl("func=manageRevisions"),$i18n->get("revisions").":");
while (my ($version) = $rs->array) {
my ($interval, $units) = $self->session->datetime->secondsToInterval(time() - $version);
$ac->addSubmenuItem($self->getUrl("func=edit;revision=".$version), $interval." ".$units." ".$ago);
}
} }
if ($self->session->form->process("proceed")) { if ($self->session->form->process("proceed")) {
$tabform->hidden({ $tabform->hidden({

View file

@ -47,12 +47,13 @@ th {
.adminConsoleWorkArea { .adminConsoleWorkArea {
border: 1px solid #D7D7D7; border: 1px solid #D7D7D7;
margin: 65px 190px 50px 10px; margin: 65px 170px 10px 9px;
padding: 15px; padding: 15px;
-moz-border-radius: 10px; -moz-border-radius: 10px;
background-color: #fafafa; background-color: #fafafa;
min-height: 400px; min-height: 400px;
width: 75%; width: 78%;
z-index: 10;
} }
/* Hides from non-ie: the holly hack \*/ /* Hides from non-ie: the holly hack \*/
* html .adminConsoleWorkArea { * html .adminConsoleWorkArea {
@ -63,44 +64,59 @@ th {
.adminConsoleMenu { .adminConsoleMenu {
z-index: 0;
position: absolute; position: absolute;
top: 65px; top: 65px;
right: 10px; left: 78%;
margin-top: 10px;
margin-left: 31px;
width: 180px; width: 180px;
font-family: helvetica, arial; font-family: helvetica, arial;
font-size: 12px; font-size: 12px;
z-index: 1000;
} }
.adminConsoleMainMenu:hover, .adminConsoleUtilityMenu:hover { .adminConsoleMainMenu:hover, .adminConsoleUtilityMenu:hover {
opacity: 1.0; opacity: 1.0;
z-index: 10;
background-color: #fafafa; background-color: #fafafa;
} }
.adminConsoleMainMenu { .adminConsoleMainMenu {
border: 1px solid #D7D7D7; z-index: 1;
border-top: 1px solid #D7D7D7;
border-bottom: 1px solid #D7D7D7;
border-right: 1px solid #D7D7D7;
padding: 5px; padding: 5px;
padding-left: 10px;
margin: 5px; margin: 5px;
-moz-border-radius: 5px; -moz-border-radius: 5px;
background-color: #bbbbbb; background-color: #fafafa;
opacity: 0.7; opacity: 0.7;
} }
.adminConsoleSubmenu { .adminConsoleSubmenu {
border: 1px solid #D7D7D7; z-index: 10;
border-top: 1px solid #D7D7D7;
border-bottom: 1px solid #D7D7D7;
border-right: 1px solid #D7D7D7;
padding: 5px; padding: 5px;
padding-left: 10px;
margin: 5px; margin: 5px;
-moz-border-radius: 5px; -moz-border-radius: 5px;
background-color: #fafafa; background-color: #fafafa;
} }
.adminConsoleUtilityMenu { .adminConsoleUtilityMenu {
z-index: 1;
opacity: 0.6; opacity: 0.6;
border: 1px solid #D7D7D7; border-top: 1px solid #D7D7D7;
border-bottom: 1px solid #D7D7D7;
border-right: 1px solid #D7D7D7;
padding: 5px; padding: 5px;
padding-left: 10px;
margin: 5px; margin: 5px;
-moz-border-radius: 5px; -moz-border-radius: 5px;
background-color: #bbbbbb; background-color: #fafafa;
} }
.adminConsoleHidden { .adminConsoleHidden {

View file

@ -1,16 +1,14 @@
var adminConsoleIsOn = true; var adminConsoleIsOn = true;
var adminConsoleApplicationSubmenu = false;
function initAdminConsole (viewAnApplication,hasSubmenu) { function initAdminConsole (viewAnApplication,hasSubmenu) {
adminConsoleApplicationSubmenu = hasSubmenu;
if (viewAnApplication) { if (viewAnApplication) {
switchToApplication(); switchToApplication();
} else { } else {
switchToAdminConsole(); switchToAdminConsole();
document.getElementById("adminConsoleMainMenu").className = "adminConsoleHidden"; document.getElementById("adminConsoleMainMenu").className = "adminConsoleHidden";
} }
if (!hasSubmenu) {
document.getElementById("adminConsoleApplicationSubmenu").className = "adminConsoleHidden";
}
} }
function switchToApplication () { function switchToApplication () {
@ -21,7 +19,9 @@ function switchToApplication () {
document.getElementById("application_help").className = "adminConsoleHelpIcon"; document.getElementById("application_help").className = "adminConsoleHelpIcon";
document.getElementById("application_icon").className = "adminConsoleTitleIcon"; document.getElementById("application_icon").className = "adminConsoleTitleIcon";
document.getElementById("application_title").className = "adminConsoleTitle"; document.getElementById("application_title").className = "adminConsoleTitle";
document.getElementById("adminConsoleApplicationSubmenu").className = "adminConsoleSubmenu"; if (adminConsoleApplicationSubmenu) {
document.getElementById("adminConsoleApplicationSubmenu").className = "adminConsoleSubmenu";
}
document.getElementById("application_workarea").className = "adminConsoleWorkArea"; document.getElementById("application_workarea").className = "adminConsoleWorkArea";
document.getElementById("console_toggle_off").className = "adminConsoleHidden"; document.getElementById("console_toggle_off").className = "adminConsoleHidden";
document.getElementById("console_toggle_on").className = "adminConsoleToggle"; document.getElementById("console_toggle_on").className = "adminConsoleToggle";

View file

@ -48,7 +48,8 @@
position:absolute; position:absolute;
display: none; display: none;
border: 1px dashed #405F6E; border: 1px dashed #405F6E;
font-size: 12;} font-size: 12px;
}
.dragImage { .dragImage {
position:absolute; position:absolute;

View file

@ -33,8 +33,8 @@ var firedobj = ie5?e.srcElement:e.target;
var el = document.documentElement; var el = document.documentElement;
posx = e.clientX - xoffset + (ie5? el.scrollLeft : window.pageXOffset); posx = e.clientX - xoffset + (ie5? el.scrollLeft : window.pageXOffset);
posy = e.clientY - yoffset + (ie5? el.scrollTop : window.pageYOffset); posy = e.clientY - yoffset + (ie5? el.scrollTop : window.pageYOffset);
menuobj.style.left=posx; menuobj.style.left=posx + "px";
menuobj.style.top=posy; menuobj.style.top=posy + "px";
menuobj.style.visibility="visible" menuobj.style.visibility="visible"
return false return false
} }

View file

@ -16,7 +16,7 @@ div.dragable:hover {
opacity:0.6; opacity:0.6;
-moz-opacity:0.6; -moz-opacity:0.6;
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=60); filter:progid:DXImageTransform.Microsoft.Alpha(opacity=60);
cursor: hand; cursor: pointer;
z-index: 2000; z-index: 2000;
} }
.draggedOverTop{ .draggedOverTop{
@ -34,12 +34,12 @@ div.dragable:hover {
} }
.blank { .blank {
position: relative; position: relative;
cursor: hand; cursor: pointer;
background-color: white; background-color: white;
} }
.blankOver { .blankOver {
position: relative; position: relative;
cursor: hand; cursor: pointer;
background-color: black; background-color: black;
} }
.empty { .empty {

View file

@ -1,24 +1,18 @@
#slidePanelBar { #slidePanel {
position:absolute; position:absolute;
font:bold 12px Verdana; font: bold 12px sans-serif;
line-height:20px; line-height:20px;
text-align: left; text-align: left;
left:0px;
top:0px;
} }
#slidePanelBarHandle { .slidePanelButton {
z-index: 100000;
position: absolute;
top: 0px;
right: 3px;
line-height: 100px;
}
.panelButton {
width:300px; width:300px;
text-align:center; text-align:center;
font-family:arial; font-family: sans-serif;
font-size:11px; font-size:11px;
cursor:hand; cursor: pointer;
border-width:1px; border-width:1px;
border-color: #ACACAC; border-color: #ACACAC;
background-color:#dddddd; background-color:#dddddd;
@ -29,14 +23,14 @@
border-style: solid; border-style: solid;
} }
.panelButton A, .panelButton A:visited, .panelButton A:link { .slidePanelButton A, .slidePanelButton A:visited, .slidePanelButton A:link {
text-decoration: none; text-decoration: none;
color: black; color: black;
} }
.scrollPanelUp { .scrollPanelUp {
position:absolute; position:absolute;
top:40px; top: 40px;
} }
.scrollPanelDown { .scrollPanelDown {
@ -59,24 +53,27 @@
} }
.panelLinkOut { .panelLinkOut {
position:absolute; position: absolute;
overflow: hidden; overflow: hidden;
height: 20px; height: 20px;
cursor: hand; cursor: pointer;
left:0px; left: 0px;
font-size: 11px; font-size: 11px;
font-family: helvetica, arial, sans; color: black;
font-family: sans-serif;
} }
.panelLinkIn { .panelLinkIn {
position:absolute; position:absolute;
cursor: pointer; cursor: pointer;
height: 20px; height: 20px;
overflow: hidden; overflow: hidden;
cursor: hand; cursor: pointer;
left:0px; left:0px;
border: 1px solid #DEDCDC; border: 1px solid #DEDCDC;
font-size: 11px; font-size: 11px;
font-family: helvetica, arial, sans; font-family: sans-serif;
color: black;
background-color: #F5F5F5; background-color: #F5F5F5;
} }

View file

@ -1,53 +1,8 @@
var panelButtonHeight = 23; var slidePanelButtonHeight = 23;
var panelLinkTop = 25; var slidePanelLinkTop = slidePanelButtonHeight+2;
//create a crossbrowser layer object
function createLayerObject(name) {
this.name=name;
this.obj=document.getElementById(name);
this.cssobj.style;
this.x=parseInt(this.css.left);
this.y=parseInt(this.css.top);
this.show=b_show;
this.hide=b_hide;
this.moveTo=b_moveTo;
this.moveBy=b_moveBy;
this.writeText=b_writeText;
return this;
}
//crossbrowser show
function b_show(){
this.css.visibility='visible';
}
//crossbrowser hide
function b_hide(){
this.css.visibility='hidden';
}
//crossbrowser move absolute
function b_moveTo(x,y){
this.x = x;
this.y = y;
this.css.left=x;
this.css.top=y;
}
//crossbrowser move relative
function b_moveBy(x,y){
this.moveTo(this.x+x, this.y+y)
}
//write text into a layer
function b_writeText(text) {
this.obj.innerHTML=text;
}
//add one button to a panel //add one button to a panel
function b_addLink(img, label, action) { function sp_addLink(img, label, action) {
this.img[this.img.length]=img; this.img[this.img.length]=img;
this.lbl[this.lbl.length]=label; this.lbl[this.lbl.length]=label;
this.act[this.act.length]=action; this.act[this.act.length]=action;
@ -56,11 +11,11 @@ function b_addLink(img, label, action) {
} }
//test if scroll buttons should be visible //test if scroll buttons should be visible
function b_testScroll() { function sp_testScroll() {
var i=parseInt(this.obj.style.height); var i=parseInt(this.obj.style.height);
var j=parseInt(this.objf.style.height); var j=parseInt(this.objf.style.height);
var k=parseInt(this.objf.style.top); var k=parseInt(this.objf.style.top);
if (k==panelLinkTop) if (k==slidePanelLinkTop)
this.objm1.style.visibility='hidden'; this.objm1.style.visibility='hidden';
else else
this.objm1.style.visibility='visible'; this.objm1.style.visibility='visible';
@ -71,9 +26,7 @@ function b_testScroll() {
} }
//scroll the panel content up //scroll the panel content up
function b_up(nr) { function sp_up(nr) {
this.ftop = this.ftop - 5; this.ftop = this.ftop - 5;
this.objf.style.top=(this.ftop+'px'); this.objf.style.top=(this.ftop+'px');
//this.objf.style.zIndex=1; //this.objf.style.zIndex=1;
@ -84,13 +37,11 @@ function b_up(nr) {
this.testScroll(); this.testScroll();
} }
//scroll the panel content down //scroll the panel content down
function b_down(nr) { function sp_down(nr) {
this.ftop = this.ftop + 5; this.ftop = this.ftop + 5;
if (this.ftop>=panelLinkTop) { if (this.ftop>=slidePanelLinkTop) {
this.ftop=panelLinkTop; this.ftop=slidePanelLinkTop;
nr=0; nr=0;
} }
this.objf.style.top=(this.ftop+'px'); this.objf.style.top=(this.ftop+'px');
@ -104,7 +55,7 @@ function b_down(nr) {
//create one panel //create one panel
function createPanel(name,caption) { function createPanel(name,caption) {
this.name=name; // panel layer ID this.name=name; // panel layer ID
this.ftop=panelLinkTop; // actual panel scroll position this.ftop=slidePanelLinkTop; // actual panel scroll position
this.obj=null; // panel layer object this.obj=null; // panel layer object
this.objc=null; // caption layer object this.objc=null; // caption layer object
this.objf=null; // panel field layer object this.objf=null; // panel field layer object
@ -115,45 +66,38 @@ function createPanel(name,caption) {
this.lbl=new Array(); // button labels this.lbl=new Array(); // button labels
this.act=new Array(); // button actions this.act=new Array(); // button actions
this.sta=new Array(); // button status (internal) this.sta=new Array(); // button status (internal)
this.addLink=b_addLink; // add one button to panel this.addLink=sp_addLink; // add one button to panel
this.testScroll=b_testScroll; // test if scroll buttons should be visible this.testScroll=sp_testScroll; // test if scroll buttons should be visible
this.up=b_up; // scroll panel buttons up this.up=sp_up; // scroll panel buttons up
this.down=b_down; // scroll panel buttons down this.down=sp_down; // scroll panel buttons down
this.v = this.name + "var"; // global var of 'this' this.v = this.name + "var"; // global var of 'this'
eval(this.v + "=this"); eval(this.v + "=this");
return this return this
} }
//add one panel to the slider //add one panel to the slider
function b_addPanel(panel) { function sp_addPanel(panel) {
panel.name=this.name+'_panel'+this.panels.length panel.name=this.name+'_panel'+this.panels.length
this.panels[this.panels.length] = panel; this.panels[this.panels.length] = panel;
} }
// Draw the slider // Draw the slider
function b_draw() { function sp_draw() {
document.body.style.marginLeft = '160px'; document.body.style.marginLeft = this.width+'px';
var i; var i;
var j; var j;
var t=0; var t=0;
var h; var h;
var c=3; var c=3;
//slide panel bar //slide panel
var slidemenu_width='160px' //specify width of menu (in pixels) document.write('<div id="slidePanel" style="width:'+this.width+'px">');
var slidemenu_reveal='15px' //specify amount that menu should protrude initially
var slidemenu_top='0px' //specify vertical offset of menu on page
//document.write('<div id="slidePanelBar" style="left:'+((parseInt(slidemenu_width)-parseInt(slidemenu_reveal))*-1)+'px; top:'+slidemenu_top+'px; width:'+slidemenu_width+'px;" onmouseover="pullSlidePanelBar()" onmouseout="pushSlidePanelBar()">');
document.write('<div id="slidePanelBar" style="left:0px; top:'+slidemenu_top+'px; width:'+slidemenu_width+'px"/ >');
//document.write('<div id="slidePanelBarHandle">&raquo;<br />&raquo;<br />&raquo;<br />&raquo;<br />&raquo;<br /></div>');
//slide panel .
document.write('<div class="slidePanel" id="'+this.name+'" style="left:'); document.write('<div class="slidePanel" id="'+this.name+'" style="left:');
document.write(this.xpos+'px; top:'+this.ypos+'px; width:'+this.width); document.write(this.xpos+'px; top:'+this.ypos+'px; width:'+this.width);
document.write('px; height:'+this.height+'px; ') document.write('px; height:'+this.height+'px; ')
document.write('; clip:rect(0px,'+this.width+'px,'+this.height+'px,0px)">'); document.write('; clip:rect(0px,'+this.width+'px,'+this.height+'px,0px)">');
h=this.height-((this.panels.length-1)*panelButtonHeight) h=this.height-((this.panels.length-1)*slidePanelButtonHeight)
//one layer for every panel... //one layer for every panel...
for (i=0;i<this.panels.length;i++) { for (i=0;i<this.panels.length;i++) {
@ -161,29 +105,29 @@ function b_draw() {
document.write('" style="top:'+t); document.write('" style="top:'+t);
document.write('px; width:'+this.width+'px; height:'+h+'px; clip:rect(0px, '); document.write('px; width:'+this.width+'px; height:'+h+'px; clip:rect(0px, ');
document.write(this.width+'px, '+h+'px, 0px);">'); document.write(this.width+'px, '+h+'px, 0px);">');
t=t+panelButtonHeight; t=t+slidePanelButtonHeight;
//one layer to host the panel links //one layer to host the panel links
document.write('<div class="panelLinkHolder" id="'+this.name+'_panel'+i); document.write('<div class="panelLinkHolder" id="'+this.name+'_panel'+i);
document.write('_f" style="top:'+panelLinkTop+'px; width:'); document.write('_f" style="top:'+slidePanelLinkTop+'px; width:');
document.write(this.width+'px; height:'); document.write(this.width+'px; height:');
document.write((this.panels[i].img.length*this.buttonspace)+'px;">'); document.write((this.panels[i].img.length*this.buttonspace)+'px;">');
mtop=0 mtop=0
for (j=0;j<this.panels[i].img.length;j++) { for (j=0;j<this.panels[i].img.length;j++) {
document.write('<div id="'+this.name+'_panel'+i+'_b'+j+'" class="panelLinkOut" style="top:'+mtop+'px;width:'+this.width+'px;" onmouseover="this.className=\'panelLinkIn\';" onmouseup="document.location=\''+this.panels[i].act[j]+'\';" onmouseout="this.className=\'panelLinkOut\';">'); document.write('<div id="'+this.name+'_panel'+i+'_b'+j+'" class="panelLinkOut" style="top:'+mtop+'px;width:'+this.width+'px;" onmouseover="this.className=\'panelLinkIn\';" onmouseup="document.location=\''+this.panels[i].act[j]+'\';" onmouseout="this.className=\'panelLinkOut\';">');
document.write('<img src="'+this.panels[i].img[j]+'" align="middle" border="0px" alt="icon" />'); document.write('<p style="display:inline;vertical-align:middle;"><img src="'+this.panels[i].img[j]+'" style="border: 0px; vertical-align: middle;" alt="icon" />');
document.write(' '+this.panels[i].lbl[j]); document.write(' '+this.panels[i].lbl[j]);
document.write('</div>'); document.write('</p></div>');
mtop=mtop+this.buttonspace; mtop=mtop+this.buttonspace;
} }
document.write('</div>'); document.write('</div>');
document.write('<div id="'+this.name+'_panel'+i+'_c" class="panelButton" '); document.write('<div id="'+this.name+'_panel'+i+'_c" class="slidePanelButton" ');
document.write('onClick="javascript:'+this.v+'.showPanel('+i); document.write('onClick="javascript:'+this.v+'.showPanel('+i);
document.write(');" style="width:'); document.write(');" style="width:');
document.write((this.width-c)+'px; height:'+(panelButtonHeight-c)+'px;"><a href="#" '); document.write((this.width-c)+'px; height:'+(slidePanelButtonHeight-c)+'px;"><a href="#" ');
document.write('onClick="'+this.v+'.showPanel('+i+');this.blur();'); document.write('onClick="'+this.v+'.showPanel('+i+');this.blur();');
document.write('return false;">'); document.write('return false;">');
document.write(this.panels[i].caption); document.write(this.panels[i].caption);
@ -194,22 +138,22 @@ function b_draw() {
document.write('_m1" class="scrollPanelUp" style="left:'); document.write('_m1" class="scrollPanelUp" style="left:');
document.write((this.width-20)+'px;"><a href="#" onclick="'); document.write((this.width-20)+'px;"><a href="#" onclick="');
document.write(this.panels[i].v+'.down(16);this.blur();return false;" >'); document.write(this.panels[i].v+'.down(16);this.blur();return false;" >');
document.write('<img src="'+getWebguiProperty("extrasURL")+'/slidePanel/arrowup.gif" border="0px" alt="scroll up" />'); document.write('<img src="'+getWebguiProperty("extrasURL")+'/slidePanel/arrowup.gif" style="border: 0px;" alt="scroll up" />');
document.write('</a></div>'); document.write('</a></div>');
// scroll-down // scroll-down
document.write('<div class="scrollPanelDown" id="'+this.name+'_panel'+i); document.write('<div class="scrollPanelDown" id="'+this.name+'_panel'+i);
document.write('_m2" style="top:'); document.write('_m2" style="top:');
document.write((this.height-(this.panels.length)*panelButtonHeight)+'px; left:'); document.write((this.height-(this.panels.length)*slidePanelButtonHeight)+'px; left:');
document.write((this.width-20)+'px;"><a href="#" onclick="'); document.write((this.width-20)+'px;"><a href="#" onclick="');
document.write(this.panels[i].v+'.up(16);this.blur();return false">'); document.write(this.panels[i].v+'.up(16);this.blur();return false">');
document.write('<img src="'+getWebguiProperty("extrasURL")+'/slidePanel/arrowdown.gif" border="0px" alt="scroll down" />'); document.write('<img src="'+getWebguiProperty("extrasURL")+'/slidePanel/arrowdown.gif" style="border: 0px;" alt="scroll down" />');
document.write('</a></div>'); document.write('</a></div>');
document.write('</div>') document.write('</div>')
} }
document.write('</div>'); document.write('</div></div>')
for (i=0;i<this.panels.length;i++) { for (i=0;i<this.panels.length;i++) {
this.panels[i].obj=document.getElementById(this.name+'_panel'+i); this.panels[i].obj=document.getElementById(this.name+'_panel'+i);
@ -220,65 +164,57 @@ function b_draw() {
this.panels[i].objm2=document.getElementById(this.name+'_panel'+i+'_m2'); this.panels[i].objm2=document.getElementById(this.name+'_panel'+i+'_m2');
this.panels[i].testScroll(); this.panels[i].testScroll();
} }
rightboundary=0
leftboundary=(parseInt(slidemenu_width)-parseInt(slidemenu_reveal))*-1
document.write('</div>')
themenu=document.getElementById("slidePanelBar").style;
//activate last panel //activate last panel
//actual panel is saved in a cookie //actual panel is saved in a cookie
if (document.cookie) var cookie = sp_readCookie("slidePanel");
this.showPanel(document.cookie); if (cookie)
this.showPanel(cookie);
else else
this.showPanel(0); this.showPanel(0);
//float the panel as someone scrolls //float the panel as someone scrolls
startY = 0; startY = 0;
var d = document; var d = document;
function ml(id) function ml(id) {
{
var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id]; var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
if(d.layers)el.style=el; if(d.layers)el.style=el;
el.sP=function(y){this.style.top=y;}; el.sP=function(y){this.style.top=y+"px";};
el.y = startY; el.y = startY;
return el; return el;
} }
window.floatBarWithScroll=function() window.floatSlidePanelWithScroll=function() {
{
//Added to allow support for xhtml transitional //Added to allow support for xhtml transitional
var docElement = document.documentElement; var docElement = document.documentElement;
if (document.compatMode && document.compatMode == "BackCompat") { if (document.compatMode && document.compatMode == "BackCompat") {
docElement = document.body; docElement = document.body;
} }
//var pY = document.body.scrollTop; //var pY = document.body.scrollTop;
var pY = docElement.scrollTop; var pY = docElement.scrollTop;
ftlObj.y += (pY + startY - ftlObj.y)/8; ftlObj.y += (pY + startY - ftlObj.y)/8;
if (ftlObj.y < 0) {
ftlObj.y = 0
}
ftlObj.sP(ftlObj.y); ftlObj.sP(ftlObj.y);
setTimeout("floatBarWithScroll()", 10); setTimeout("floatSlidePanelWithScroll()", 10);
} }
ftlObj = ml("slidePanelBar"); ftlObj = ml("slidePanel");
floatBarWithScroll(); floatSlidePanelWithScroll();
} }
function b_showPanel(nr) { function sp_showPanel(nr) {
var i var i
var l var l
var o var o
// document.cookie=nr; sp_createCookie("slidePanel",nr,1);
this.aktPanel=nr; this.aktPanel=nr;
l = this.panels.length; l = this.panels.length;
for (i=0;i<l;i++) { for (i=0;i<l;i++) {
//alert(nr); //alert(nr);
if (i>nr) { if (i>nr) {
this.panels[i].obj.style.top=this.height-((l-i)*panelButtonHeight)+"px"; this.panels[i].obj.style.top=this.height-((l-i)*slidePanelButtonHeight)+"px";
} else { } else {
this.panels[i].obj.style.top=i*panelButtonHeight+"px"; this.panels[i].obj.style.top=i*slidePanelButtonHeight+"px";
} }
} }
} }
@ -286,58 +222,52 @@ function b_showPanel(nr) {
function createSlidePanelBar(name) { function createSlidePanelBar(name) {
//Added to allow support for xhtml transitional //Added to allow support for xhtml transitional
var docElement = document.documentElement; var docElement = document.documentElement;
if (document.compatMode && document.compatMode == "BackCompat") { if (document.compatMode && document.compatMode == "BackCompat") {
docElement = document.body; docElement = document.body;
} }
this.aktPanel=0; // last open panel this.aktPanel=0; // last open panel
this.name=name // name this.name=name; // name
this.xpos=0; // bar x-pos this.xpos=0; // bar x-pos
this.ypos=0; // bar y-pos this.ypos=0; // bar y-pos
this.width=160; // bar width this.width=160; // bar width
//this.height=((navigator.appVersion.indexOf("MSIE ") == -1)?innerHeight:document.body.offsetHeight)-10; // bar height //this.height=((navigator.appVersion.indexOf("MSIE ") == -1)?innerHeight:document.body.offsetHeight)-10; // bar height
this.height=((navigator.appVersion.indexOf("MSIE ") == -1)?innerHeight:docElement.offsetHeight)-10; // bar height this.height=((navigator.appVersion.indexOf("MSIE ") == -1)?innerHeight:docElement.offsetHeight)-10; // bar height
this.buttonspace=22 // distance of panel buttons this.buttonspace=slidePanelButtonHeight-1; // distance of panel buttons
this.panels=new Array() // panels this.panels=new Array(); // panels
this.addPanel=b_addPanel; // add new panel to bar this.addPanel=sp_addPanel; // add new panel to bar
this.draw=b_draw; // write HTML code of bar this.draw=sp_draw; // write HTML code of bar
this.showPanel=b_showPanel; // make a panel visible this.showPanel=sp_showPanel; // make a panel visible
this.v = name + "var"; // global var of 'this' this.v = name + "var"; // global var of 'this'
eval(this.v + "=this"); eval(this.v + "=this");
return this return this;
} }
function pullSlidePanelBar(){ function sp_createCookie(name,value,days) {
if (window.drawit) if (days)
clearInterval(drawit); {
pullit=setInterval("pullengine()",10); var date = new Date();
document.getElementById("slidePanelBarHandle").innerHTML=""; date.setTime(date.getTime()+(days*24*60*60*1000));
} var expires = "; expires="+date.toGMTString();
function pushSlidePanelBar(){
clearInterval(pullit);
drawit=setInterval("drawengine()",10);
document.getElementById("slidePanelBarHandle").innerHTML="&raquo;<br />&raquo;<br />&raquo;<br />&raquo;<br />&raquo;<br />";
}
function pullengine(){
if (parseInt(themenu.left)<rightboundary)
themenu.left=parseInt(themenu.left)+10+"px";
else if (window.pullit){
themenu.left=0;
clearInterval(pullit);
} }
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
} }
function drawengine(){ function sp_readCookie(name) {
if (parseInt(themenu.left)>leftboundary) var nameEQ = name + "=";
themenu.left=parseInt(themenu.left)-10+"px"; var ca = document.cookie.split(';');
else if (window.drawit){ for(var i=0;i < ca.length;i++)
themenu.left=leftboundary; {
clearInterval(drawit); var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
} }
return null;
} }
function sp_eraseCookie(name) {
sp_createCookie(name,"",-1);
}