Merge branch 'w42_MDL-29882_m22_overlib' of git://github.com/skodak/moodle
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,333 +0,0 @@
|
||||
//\/////
|
||||
//\ overLIB Anchor Plugin
|
||||
//\ This file requires overLIB 4.10 or later.
|
||||
//\
|
||||
//\ overLIB 4.10 - You may not remove or change this notice.
|
||||
//\ Copyright Erik Bosrup 1998-2004. All rights reserved.
|
||||
//\ Contributors are listed on the homepage.
|
||||
//\ See http://www.bosrup.com/web/overlib/ for details.
|
||||
// $Revision$ $Date$
|
||||
//\/////
|
||||
//\mini
|
||||
|
||||
|
||||
////////
|
||||
// PRE-INIT
|
||||
// Ignore these lines, configuration is below.
|
||||
////////
|
||||
if (typeof olInfo == 'undefined' || typeof olInfo.meets == 'undefined' || !olInfo.meets(4.10)) alert('overLIB 4.10 or later is required for the Anchor Plugin.');
|
||||
else {
|
||||
registerCommands('anchor,anchorx,anchory,noanchorwarn,anchoralign');
|
||||
|
||||
|
||||
|
||||
////////
|
||||
// DEFAULT CONFIGURATION
|
||||
// Settings you want everywhere are set here. All of this can also be
|
||||
// changed on your html page or through an overLIB call.
|
||||
////////
|
||||
if (typeof ol_anchor == 'undefined') var ol_anchor = '';
|
||||
if (typeof ol_anchorx == 'undefined') var ol_anchorx = 0;
|
||||
if (typeof ol_anchory == 'undefined') var ol_anchory = 0;
|
||||
if (typeof ol_noanchorwarn == 'undefined') var ol_noanchorwarn = 1;
|
||||
if (typeof ol_anchoralign == 'undefined') var ol_anchoralign = 'UL';
|
||||
|
||||
////////
|
||||
// END OF CONFIGURATION
|
||||
// Don't change anything below this line, all configuration is above.
|
||||
////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
////////
|
||||
// INIT
|
||||
////////
|
||||
// Runtime variables init. Don't change for config!
|
||||
var o3_anchor = "";
|
||||
var o3_anchorx = 0;
|
||||
var o3_anchory = 0;
|
||||
var o3_noanchorwarn = 1;
|
||||
var o3_anchoralign = 'UL';
|
||||
var mrkObj, rmrkPosition; //reference mark object, reference mark position, an array;
|
||||
|
||||
|
||||
////////
|
||||
// PLUGIN FUNCTIONS
|
||||
////////
|
||||
function setAnchorVariables() {
|
||||
o3_anchor = ol_anchor;
|
||||
o3_anchorx = ol_anchorx;
|
||||
o3_anchory = ol_anchory;
|
||||
o3_noanchorwarn = ol_noanchorwarn;
|
||||
o3_anchoralign = ol_anchoralign;
|
||||
mrkObj = null; // initialize this variable
|
||||
}
|
||||
|
||||
// Parses Reference Mark commands
|
||||
function parseAnchorExtras(pf,i,ar) {
|
||||
var v, k=i;
|
||||
|
||||
if (k < ar.length) {
|
||||
if (ar[k] == ANCHOR) { eval(pf + "anchor = '" + escSglQuote(ar[++k]) + "'"); return k; }
|
||||
if (ar[k] == ANCHORX) { eval(pf + 'anchorx = ' + ar[++k]); return k; }
|
||||
if (ar[k] == ANCHORY) { eval(pf + 'anchory = ' + ar[++k]); return k; }
|
||||
if (ar[k] == NOANCHORWARN) { eval(pf + 'noanchorwarn = (' + pf + 'noanchorwarn==1) ? 0 : 1'); return k; }
|
||||
if (ar[k] == ANCHORALIGN) { k = opt_MULTIPLEARGS(++k, ar, (pf + 'anchoralign')); return k; }
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
///////
|
||||
// FUNCTION WHICH CHECKS FOR THE EXISTENCE OF A REFERENCE MARKER
|
||||
///////
|
||||
function checkAnchorObject() {
|
||||
var w = o3_anchor;
|
||||
|
||||
if (w) {
|
||||
if (!(mrkObj = getAnchorObjectRef(w))) {
|
||||
if (o3_noanchorwarn) {
|
||||
alert('WARNING! Reference mark "' + w + '" not found.');
|
||||
return false;
|
||||
} else w = '';
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
///////
|
||||
// EXTERNAL SUPPORT FUNCTIONS TO HANDLE ANCHOR PROPERTIES
|
||||
///////
|
||||
|
||||
// Horizontal placement routine with anchors
|
||||
function anchorHorizontal(browserWidth, horizontalScrollAmount, widthFix) {
|
||||
var hasAnchor = (typeof o3_anchor != 'undefined' && o3_anchor);
|
||||
if (!hasAnchor) return void(0);
|
||||
|
||||
// set o3_relx for follow scroll if defined
|
||||
if (typeof o3_followscroll != 'undefined' && o3_followscroll && o3_sticky) o3_relx = rmrkPosition[0];
|
||||
|
||||
return rmrkPosition[0];
|
||||
}
|
||||
|
||||
// Vertical placement routine with anchors
|
||||
function anchorVertical(browserHeight,verticalScrollAmount) {
|
||||
var hasAnchor = (typeof o3_anchor != 'undefined' && o3_anchor);
|
||||
if (!hasAnchor) return void(0);
|
||||
|
||||
// set o3_rely for follow scroll if defined
|
||||
if (typeof o3_followscroll != 'undefined' && o3_followscroll && o3_sticky) o3_rely = rmrkPosition[1];
|
||||
|
||||
return rmrkPosition[1];
|
||||
}
|
||||
|
||||
// Stub function for the runHook routine
|
||||
function anchorPreface() {
|
||||
if (!mrkObj) return;
|
||||
rmrkPosition = getAnchorLocation(mrkObj);
|
||||
}
|
||||
|
||||
// Get Reference Mark object
|
||||
function getAnchorObjectRef(aObj) {
|
||||
return getRefById(aObj, o3_frame.document) || getRefByName(aObj, o3_frame.document)
|
||||
}
|
||||
|
||||
// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
|
||||
function getAnchorLocation(objRef){
|
||||
var mkObj, of, offsets, mlyr
|
||||
|
||||
mkObj = mlyr = objRef
|
||||
offsets = [o3_anchorx, o3_anchory]
|
||||
|
||||
if (document.layers){
|
||||
if (typeof mlyr.length != 'undefined' && mlyr.length > 1) {
|
||||
mkObj = mlyr[0]
|
||||
offsets[0] += mlyr[0].x + mlyr[1].pageX
|
||||
offsets[1] += mlyr[0].y + mlyr[1].pageY
|
||||
} else {
|
||||
if(mlyr.toString().indexOf('Image') != -1 || mlyr.toString().indexOf('Anchor') != -1){
|
||||
offsets[0] += mlyr.x
|
||||
offsets[1] += mlyr.y
|
||||
} else {
|
||||
offsets[0] += mlyr.pageX
|
||||
offsets[1] += mlyr.pageY
|
||||
}
|
||||
}
|
||||
} else {
|
||||
offsets[0] += pageLocation(mlyr, 'Left')
|
||||
offsets[1] += pageLocation(mlyr, 'Top')
|
||||
}
|
||||
|
||||
of = getAnchorOffsets(mkObj)
|
||||
|
||||
if (typeof o3_dragimg != 'undefined' && o3_dragimg) {
|
||||
olImgLeft = offsets[0];
|
||||
olImgTop = offsets[1];
|
||||
}
|
||||
|
||||
offsets[0] += of[0]
|
||||
offsets[1] += of[1]
|
||||
|
||||
if (typeof o3_dragimg != 'undefined' && o3_dragimg) {
|
||||
olImgRight = offsets[0];
|
||||
olImgBottom = offsets[1];
|
||||
return;
|
||||
}
|
||||
|
||||
return offsets;
|
||||
}
|
||||
|
||||
// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
|
||||
function getAnchorOffsets(mkObj){
|
||||
var fx = fy = 0, mp, puc, mkAry, sx = sy = 0, w = o3_anchoralign
|
||||
var mW = mH = pW = pH = 0
|
||||
var off = [0, 0]
|
||||
|
||||
mkAry = w.split(',');
|
||||
|
||||
if (mkAry.length < 3) {
|
||||
mp = mkAry[0].toUpperCase();
|
||||
puc = (mkAry.length == 1) ? mp : mkAry[1].toUpperCase();
|
||||
} else if (mkAry.length == 3) {
|
||||
if (!isNaN(mkAry[0])) {
|
||||
mp = mkAry.slice(0, 2);
|
||||
puc = mkAry[2].toUpperCase();
|
||||
} else {
|
||||
mp = mkAry[0].toUpperCase();
|
||||
puc = mkAry.slice(1);
|
||||
}
|
||||
} else {
|
||||
mp = mkAry.slice(0, 2);
|
||||
puc = mkAry.slice(2);
|
||||
}
|
||||
|
||||
var shdwPresent = typeof o3_shadow != 'undefined' && o3_shadow
|
||||
|
||||
if (shdwPresent) {
|
||||
sx = Math.abs(o3_shadowx);
|
||||
sy = Math.abs(o3_shadowy);
|
||||
}
|
||||
|
||||
pW = (shdwPresent ? parseInt(o3_width) : (olNs4 ? over.clip.width : over.offsetWidth))
|
||||
pH = (shdwPresent ? parseInt(o3_aboveheight) : (olNs4 ? over.clip.height : over.offsetHeight))
|
||||
|
||||
if (olOp && o3_wrap) {
|
||||
pW = (shdwPresent ? parseInt(o3_width) : (olNs4 ? over.clip.width : over.offsetWidth))
|
||||
pH = (shdwPresent ? parseInt(o3_aboveheight) : (olNs4 ? over.clip.height : over.offsetHeight))
|
||||
}
|
||||
|
||||
if (!olOp && mkObj.toString().indexOf('Image') != -1){
|
||||
mW = mkObj.width
|
||||
mH = mkObj.height
|
||||
} else if (!olOp && mkObj.toString().indexOf('Anchor') != -1) { // enforced only for NS4
|
||||
mp = 'UL'
|
||||
} else {
|
||||
mW = (olNs4) ? mkObj.clip.width : mkObj.offsetWidth
|
||||
mH = (olNs4) ? mkObj.clip.height : mkObj.offsetHeight
|
||||
}
|
||||
|
||||
if (!isNaN(mp) || typeof mp == 'object') {
|
||||
if (typeof mp == 'object') {
|
||||
fx = parseFloat(mp[0]);
|
||||
fy = parseFloat(mp[1]);
|
||||
} else
|
||||
fx = fy = parseFloat(mp);
|
||||
off = [Math.round(fx*mW), Math.round(fy*mH)];
|
||||
} else {
|
||||
if (mp == 'UR') off = [mW, 0]
|
||||
else if (mp == 'LL') off = [0, mH]
|
||||
else if (mp == 'LR') off = [mW, mH]
|
||||
}
|
||||
|
||||
if (typeof o3_dragimg != 'undefined' && o3_dragimg) return off;
|
||||
else {
|
||||
if (!isNaN(puc) || typeof puc == 'object' ) {
|
||||
if (typeof puc == 'object') {
|
||||
fx = parseFloat(puc[0]);
|
||||
fy = parseFloat(puc[1]);
|
||||
} else
|
||||
fx = fy = parseFloat(puc);
|
||||
off[0] -= Math.round(fx*(pW - sx));
|
||||
off[1] -= Math.round(fy*(pH - sy));
|
||||
} else {
|
||||
if (puc == 'UR') {
|
||||
off[0] -= (pW - sx);
|
||||
off[1] -= sy
|
||||
} else if (puc == 'LL') {
|
||||
off[0] -= sx;
|
||||
off[1] -= (pH - sy)
|
||||
} else if (puc == 'LR') {
|
||||
off[0] -= (pW-sx);
|
||||
off[1] -= (pH - sy)
|
||||
}
|
||||
}
|
||||
return off
|
||||
}
|
||||
}
|
||||
|
||||
// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
|
||||
function pageLocation(o, t){
|
||||
var x = 0
|
||||
|
||||
while(o.offsetParent){
|
||||
x += o['offset' + t]
|
||||
o = o.offsetParent
|
||||
}
|
||||
x += o['offset' + t]
|
||||
|
||||
return x
|
||||
}
|
||||
|
||||
// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
|
||||
function getRefById(l, d){
|
||||
var r = "", j
|
||||
|
||||
d = (d || document)
|
||||
if (d.all) return d.all[l]
|
||||
else if (d.getElementById) return d.getElementById(l)
|
||||
else if (d.layers && d.layers.length > 0) {
|
||||
if (d.layers[l]) return d.layers[l]
|
||||
|
||||
for (j=0; j < d.layers.length; j++) {
|
||||
r = getRefById(l, d.layers[j].document)
|
||||
if(r) return r
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
|
||||
function getRefByName(l, d) {
|
||||
var r = null, j
|
||||
|
||||
d = (d || document)
|
||||
|
||||
if (d.images[l]) return d.images[l]
|
||||
else if (d.anchors[l]) return d.anchors[l];
|
||||
else if (d.layers && d.layers.length > 0) {
|
||||
for (j=0; j < d.layers.length; j++) {
|
||||
r = getRefByName(l, d.layers[j].document)
|
||||
if (r && r.length > 0) return r
|
||||
else if (r) return [r, d.layers[j]]
|
||||
}
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
////////
|
||||
// PLUGIN REGISTRATIONS
|
||||
////////
|
||||
registerRunTimeFunction(setAnchorVariables);
|
||||
registerCmdLineFunction(parseAnchorExtras);
|
||||
registerPostParseFunction(checkAnchorObject);
|
||||
registerHook("createPopup", anchorPreface, FAFTER);
|
||||
registerHook("horizontalPlacement", anchorHorizontal, FCHAIN);
|
||||
registerHook("verticalPlacement", anchorVertical, FCHAIN);
|
||||
if(olInfo.meets(4.10)) registerNoParameterCommands('noanchorwarn');
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
//\/////
|
||||
//\ overLIB Center Popup Plugin
|
||||
//\ This file requires overLIB 4.10 or later.
|
||||
//\
|
||||
//\ overLIB 4.10 - You may not remove or change this notice.
|
||||
//\ Copyright Erik Bosrup 1998-2003. All rights reserved.
|
||||
//\ Contributors are listed on the homepage.
|
||||
//\ See http://www.bosrup.com/web/overlib/ for details.
|
||||
// $Revision$ $Date$
|
||||
//
|
||||
//\/////
|
||||
//\mini
|
||||
////////
|
||||
// PRE-INIT
|
||||
// Ignore these lines, configuration is below.
|
||||
////////
|
||||
if (typeof olInfo == 'undefined' || typeof olInfo.meets == 'undefined' || !olInfo.meets(4.10)) alert('overLIB 4.10 or later is required for the Center Popup Plugin.');
|
||||
else {
|
||||
registerCommands('centerpopup,centeroffset');
|
||||
////////
|
||||
// DEFAULT CONFIGURATION
|
||||
// You don't have to change anything here if you don't want to. All of this can be
|
||||
// changed on your html page or through an overLIB call.
|
||||
////////
|
||||
// Default value for centerpopup is to not center the popup
|
||||
if (typeof ol_centerpopup == 'undefined') var ol_centerpopup = 0;
|
||||
if (typeof ol_centeroffset == 'undefined') var ol_centeroffset = '0';
|
||||
////////
|
||||
// END OF CONFIGURATION
|
||||
// Don't change anything below this line, all configuration is above.
|
||||
////////
|
||||
////////
|
||||
// INIT
|
||||
////////
|
||||
// Runtime variables init. Don't change for config!
|
||||
var o3_centerpopup = 0;
|
||||
var o3_centeroffset = '0';
|
||||
////////
|
||||
// PLUGIN FUNCTIONS
|
||||
////////
|
||||
function setCenterPopupVariables() {
|
||||
o3_centerpopup = ol_centerpopup;
|
||||
o3_centeroffset = ol_centeroffset;
|
||||
}
|
||||
// Parses Shadow and Scroll commands
|
||||
function parseCenterPopupExtras(pf,i,ar) {
|
||||
var k = i,v;
|
||||
|
||||
if (k < ar.length) {
|
||||
if (ar[k] == CENTERPOPUP) { eval(pf + 'centerpopup = (' + pf + 'centerpopup == 0) ? 1 : 0'); return k; }
|
||||
if (ar[k] == CENTEROFFSET) { k = opt_MULTIPLEARGS(++k,ar,(pf + 'centeroffset')); return k; }
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
// Function which positions popup in Center of screen
|
||||
function centerPopupHorizontal(browserWidth, horizontalScrollAmount, widthFix) {
|
||||
if (!o3_centerpopup) return void(0);
|
||||
|
||||
var vdisp = o3_centeroffset.split(',');
|
||||
var placeX, iwidth = browserWidth, winoffset = horizontalScrollAmount;
|
||||
var pWd = parseInt(o3_width);
|
||||
|
||||
placeX = winoffset + Math.round((iwidth - widthFix - pWd)/2) + parseInt(vdisp[0]);
|
||||
if(typeof o3_followscroll != 'undefined' && o3_followscroll && o3_sticky) o3_relx = placeX;
|
||||
|
||||
return placeX;
|
||||
}
|
||||
function centerPopupVertical(browserHeight,verticalScrollAmount) {
|
||||
if (!o3_centerpopup) return void(0);
|
||||
|
||||
var placeY, iheight = browserHeight, scrolloffset = verticalScrollAmount;
|
||||
var vdisp = o3_centeroffset.split(',');
|
||||
var pHeight = (o3_aboveheight ? parseInt(o3_aboveheight) : (olNs4 ? over.clip.height : over.offsetHeight));
|
||||
|
||||
placeY = scrolloffset + Math.round((iheight - pHeight)/2) + (vdisp.length > 1 ? parseInt(vdisp[1]) : 0);
|
||||
if(typeof o3_followscroll != 'undefined' && o3_followscroll && o3_sticky) o3_rely = placeY;
|
||||
|
||||
return placeY;
|
||||
}
|
||||
////////
|
||||
// PLUGIN REGISTRATIONS
|
||||
////////
|
||||
registerRunTimeFunction(setCenterPopupVariables);
|
||||
registerCmdLineFunction(parseCenterPopupExtras);
|
||||
registerHook('horizontalPlacement',centerPopupHorizontal,FCHAIN);
|
||||
registerHook('verticalPlacement', centerPopupVertical, FCHAIN);
|
||||
if(olInfo.meets(4.10)) registerNoParameterCommands('centerpopup');
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
//\/////
|
||||
//\ overLIB Crossframe Support Plugin
|
||||
//\ This file requires overLIB 4.10 or later.
|
||||
//\
|
||||
//\ overLIB 4.05 - You may not remove or change this notice.
|
||||
//\ Copyright Erik Bosrup 1998-2004. All rights reserved.
|
||||
//\ Contributors are listed on the homepage.
|
||||
//\ See http://www.bosrup.com/web/overlib/ for details.
|
||||
// $Revision$ $Date$
|
||||
//\/////
|
||||
//\mini
|
||||
|
||||
////////
|
||||
// PRE-INIT
|
||||
// Ignore these lines, configuration is below.
|
||||
////////
|
||||
if (typeof olInfo == 'undefined' || typeof olInfo.meets == 'undefined' || !olInfo.meets(4.10)) alert('overLIB 4.10 or later is required for the Cross Frame Support Plugin.');
|
||||
else {
|
||||
registerCommands('frame');
|
||||
|
||||
|
||||
////////
|
||||
// PLUGIN FUNCTIONS
|
||||
///////
|
||||
|
||||
// Parses FRAME command
|
||||
function parseFrameExtras(pf,i,ar) {
|
||||
var k = i,v;
|
||||
|
||||
if (k < ar.length) {
|
||||
if (ar[k] == FRAME) { v = ar[++k]; if(pf == 'ol_') ol_frame = v; else opt_FRAME(v); return k; }
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
////////
|
||||
// SUPPORT FUNCTIONS
|
||||
////////
|
||||
|
||||
// Defines which frame we should point to.
|
||||
function opt_FRAME(frm) {
|
||||
o3_frame = frm;
|
||||
over = createDivContainer('overDiv');
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Get frame depth of nested frames
|
||||
function frmDepth(thisFrame,ofrm) {
|
||||
var retVal = '';
|
||||
|
||||
for (var i = 0; i<thisFrame.length; i++) {
|
||||
if (thisFrame[i].length > 0) {
|
||||
retVal = frmDepth(thisFrame[i],ofrm);
|
||||
if (retVal == '') continue;
|
||||
} else if (thisFrame[i] != ofrm) continue;
|
||||
retVal = '[' + i + ']' + retVal;
|
||||
break;
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
// Gets frame reference value relative to top frame
|
||||
function getFrmRef(srcFrm,tgetFrm) {
|
||||
var rtnVal = ''
|
||||
|
||||
if (tgetFrm != srcFrm) {
|
||||
var tFrm = frmDepth(top.frames,tgetFrm)
|
||||
var sFrm = frmDepth(top.frames,srcFrm)
|
||||
if (sFrm.length == tFrm.length) {
|
||||
l = tFrm.lastIndexOf('[')
|
||||
|
||||
if (l) {
|
||||
while ( sFrm.substring(0,l) != tFrm.substring(0,l) )
|
||||
l = tFrm.lastIndexOf('[',l-1)
|
||||
tFrm = tFrm.substr(l)
|
||||
sFrm = sFrm.substr(l)
|
||||
}
|
||||
}
|
||||
|
||||
var cnt = 0, p = '',str = tFrm
|
||||
while ((k = str.lastIndexOf('[')) != -1) {
|
||||
cnt++
|
||||
str = str.substring(0,k)
|
||||
}
|
||||
|
||||
for (var i = 0; i<cnt; i++) p = p + 'parent.'
|
||||
rtnVal = p + 'frames' + sFrm + '.'
|
||||
}
|
||||
|
||||
return rtnVal
|
||||
}
|
||||
|
||||
function chkForFrmRef() {
|
||||
if(o3_frame != ol_frame) fnRef = getFrmRef(ol_frame,o3_frame)
|
||||
return true;
|
||||
}
|
||||
|
||||
////////
|
||||
// PLUGIN REGISTRATIONS
|
||||
////////
|
||||
registerCmdLineFunction(parseFrameExtras);
|
||||
registerPostParseFunction(chkForFrmRef);
|
||||
}
|
||||
@@ -1,182 +0,0 @@
|
||||
//\/////
|
||||
//\ overLIB CSS Style Plugin
|
||||
//\ This file requires overLIB 4.10 or later.
|
||||
//\
|
||||
//\ overLIB 4.05 - You may not remove or change this notice.
|
||||
//\ Copyright Erik Bosrup 1998-2004. All rights reserved.
|
||||
//\ Contributors are listed on the homepage.
|
||||
//\ See http://www.bosrup.com/web/overlib/ for details.
|
||||
// $Revision$ $Date$
|
||||
//\/////
|
||||
//\mini
|
||||
|
||||
|
||||
////////
|
||||
// PRE-INIT
|
||||
// Ignore these lines, configuration is below.
|
||||
////////
|
||||
if (typeof olInfo == 'undefined' || typeof olInfo.meets == 'undefined' || !olInfo.meets(4.10)) alert('overLIB 4.10 or later is required for the CSS Style Plugin.');
|
||||
else {
|
||||
registerCommands('cssstyle,padunit,heightunit,widthunit,textsizeunit,textdecoration,textstyle,textweight,captionsizeunit,captiondecoration,captionstyle,captionweight,closesizeunit,closedecoration,closestyle,closeweight');
|
||||
|
||||
|
||||
////////
|
||||
// DEFAULT CONFIGURATION
|
||||
// Settings you want everywhere are set here. All of this can also be
|
||||
// changed on your html page or through an overLIB call.
|
||||
////////
|
||||
if (typeof ol_padunit=='undefined') var ol_padunit="px";
|
||||
if (typeof ol_heightunit=='undefined') var ol_heightunit="px";
|
||||
if (typeof ol_widthunit=='undefined') var ol_widthunit="px";
|
||||
if (typeof ol_textsizeunit=='undefined') var ol_textsizeunit="px";
|
||||
if (typeof ol_textdecoration=='undefined') var ol_textdecoration="none";
|
||||
if (typeof ol_textstyle=='undefined') var ol_textstyle="normal";
|
||||
if (typeof ol_textweight=='undefined') var ol_textweight="normal";
|
||||
if (typeof ol_captionsizeunit=='undefined') var ol_captionsizeunit="px";
|
||||
if (typeof ol_captiondecoration=='undefined') var ol_captiondecoration="none";
|
||||
if (typeof ol_captionstyle=='undefined') var ol_captionstyle="normal";
|
||||
if (typeof ol_captionweight=='undefined') var ol_captionweight="bold";
|
||||
if (typeof ol_closesizeunit=='undefined') var ol_closesizeunit="px";
|
||||
if (typeof ol_closedecoration=='undefined') var ol_closedecoration="none";
|
||||
if (typeof ol_closestyle=='undefined') var ol_closestyle="normal";
|
||||
if (typeof ol_closeweight=='undefined') var ol_closeweight="normal";
|
||||
|
||||
////////
|
||||
// END OF CONFIGURATION
|
||||
// Don't change anything below this line, all configuration is above.
|
||||
////////
|
||||
|
||||
|
||||
|
||||
////////
|
||||
// INIT
|
||||
////////
|
||||
// Runtime variables init. Don't change for config!
|
||||
var o3_padunit="px";
|
||||
var o3_heightunit="px";
|
||||
var o3_widthunit="px";
|
||||
var o3_textsizeunit="px";
|
||||
var o3_textdecoration="";
|
||||
var o3_textstyle="";
|
||||
var o3_textweight="";
|
||||
var o3_captionsizeunit="px";
|
||||
var o3_captiondecoration="";
|
||||
var o3_captionstyle="";
|
||||
var o3_captionweight="";
|
||||
var o3_closesizeunit="px";
|
||||
var o3_closedecoration="";
|
||||
var o3_closestyle="";
|
||||
var o3_closeweight="";
|
||||
|
||||
|
||||
////////
|
||||
// PLUGIN FUNCTIONS
|
||||
////////
|
||||
|
||||
// Function which sets runtime variables to their default values
|
||||
function setCSSStyleVariables() {
|
||||
o3_padunit=ol_padunit;
|
||||
o3_heightunit=ol_heightunit;
|
||||
o3_widthunit=ol_widthunit;
|
||||
o3_textsizeunit=ol_textsizeunit;
|
||||
o3_textdecoration=ol_textdecoration;
|
||||
o3_textstyle=ol_textstyle;
|
||||
o3_textweight=ol_textweight;
|
||||
o3_captionsizeunit=ol_captionsizeunit;
|
||||
o3_captiondecoration=ol_captiondecoration;
|
||||
o3_captionstyle=ol_captionstyle;
|
||||
o3_captionweight=ol_captionweight;
|
||||
o3_closesizeunit=ol_closesizeunit;
|
||||
o3_closedecoration=ol_closedecoration;
|
||||
o3_closestyle=ol_closestyle;
|
||||
o3_closeweight=ol_closeweight;
|
||||
}
|
||||
|
||||
// Parses CSS Style commands.
|
||||
function parseCSSStyleExtras(pf, i, ar) {
|
||||
var k = i;
|
||||
|
||||
if (k < ar.length) {
|
||||
if (ar[k]==CSSSTYLE) { eval(pf+'css='+ar[k]); return k; }
|
||||
if (ar[k]==PADUNIT) { eval(pf+'padunit="'+ar[++k]+'"'); return k; }
|
||||
if (ar[k]==HEIGHTUNIT) { eval(pf+'heightunit="'+ar[++k]+'"'); return k; }
|
||||
if (ar[k]==WIDTHUNIT) { eval(pf+'widthunit="'+ar[++k]+'"'); return k; }
|
||||
if (ar[k]==TEXTSIZEUNIT) { eval(pf+'textsizeunit="'+ar[++k]+'"'); return k; }
|
||||
if (ar[k]==TEXTDECORATION) { eval(pf+'textdecoration="'+ar[++k]+'"'); return k; }
|
||||
if (ar[k]==TEXTSTYLE) { eval(pf+'textstyle="'+ar[++k]+'"'); return k; }
|
||||
if (ar[k]==TEXTWEIGHT) { eval(pf+'textweight="'+ar[++k]+'"'); return k; }
|
||||
if (ar[k]==CAPTIONSIZEUNIT) { eval(pf+'captionsizeunit="'+ar[++k]+'"'); return k; }
|
||||
if (ar[k]==CAPTIONDECORATION) { eval(pf+'captiondecoration="'+ar[++k]+'"'); return k; }
|
||||
if (ar[k]==CAPTIONSTYLE) { eval(pf+'captionstyle="'+ar[++k]+'"'); return k; }
|
||||
if (ar[k]==CAPTIONWEIGHT) { eval(pf+'captionweight="'+ar[++k]+'"'); return k; }
|
||||
if (ar[k]==CLOSESIZEUNIT) { eval(pf+'closesizeunit="'+ar[++k]+'"'); return k; }
|
||||
if (ar[k]==CLOSEDECORATION) { eval(pf+'closedecoration="'+ar[++k]+'"'); return k; }
|
||||
if (ar[k]==CLOSESTYLE) { eval(pf+'closestyle="'+ar[++k]+'"'); return k; }
|
||||
if (ar[k]==CLOSEWEIGHT) { eval(pf+'closeweight="'+ar[++k]+'"'); return k; }
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
////////
|
||||
// LAYER GENERATION FUNCTIONS
|
||||
////////
|
||||
|
||||
// Makes simple table without caption
|
||||
function ol_content_simple_cssstyle(text) {
|
||||
txt = '<table width="'+o3_width+ '" border="0" cellpadding="'+o3_border+'" cellspacing="0" style="background-color: '+o3_bgcolor+'; height: '+o3_height+o3_heightunit+';"><tr><td><table width="100%" border="0" cellpadding="' + o3_cellpad + '" cellspacing="0" style="color: '+o3_fgcolor+'; background-color: '+o3_fgcolor+'; height: '+o3_height+o3_heightunit+';"><tr><td valign="TOP"><font style="font-family: '+o3_textfont+'; color: '+o3_textcolor+'; font-size: '+o3_textsize+o3_textsizeunit+'; text-decoration: '+o3_textdecoration+'; font-weight: '+o3_textweight+'; font-style:'+o3_textstyle+'">'+text+'</font></td></tr></table></td></tr></table>';
|
||||
set_background("");
|
||||
|
||||
return txt;
|
||||
}
|
||||
|
||||
// Makes table with caption and optional close link
|
||||
function ol_content_caption_cssstyle(text, title, close) {
|
||||
var nameId;
|
||||
closing = "";
|
||||
closeevent = "onMouseOver";
|
||||
|
||||
if (o3_closeclick == 1) closeevent= (o3_closetitle ? "title='" + o3_closetitle +"'" : "") + " onClick";
|
||||
|
||||
if (o3_capicon!="") {
|
||||
nameId=' hspace=\"5\"'+' align=\"middle\" alt=\"\"';
|
||||
if (typeof o3_dragimg != 'undefined' && o3_dragimg) nameId = ' hspace=\"5\"'+' name=\"'+o3_dragimg+'\" id=\"'+o3_dragimg+'\" align=\"middle\" alt=\"Drag Enabled\" title=\"Drag Enabled\"';
|
||||
o3_capicon = '<img src=\"'+o3_capicon+'\"'+nameId+' />';
|
||||
}
|
||||
|
||||
if (close != "") {
|
||||
closing = '<td align="RIGHT"><a href="javascript:return '+fnRef+'cClick();" '+closeevent+'="return '+fnRef+'cClick();" style="color: '+o3_closecolor+'; font-family: '+o3_closefont+'; font-size: '+o3_closesize+o3_closesizeunit+'; text-decoration: '+o3_closedecoration+'; font-weight: '+o3_closeweight+'; font-style:'+o3_closestyle+';">'+close+'</a></td>';
|
||||
}
|
||||
|
||||
txt = '<table width="'+o3_width+ '" border="0" cellpadding="'+o3_border+'" cellspacing="0" style="background-color: '+o3_bgcolor+'; background-image: url('+o3_bgbackground+'); height: '+o3_height+o3_heightunit+';"><tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td><font style="font-family: '+o3_captionfont+'; color: '+o3_capcolor+'; font-size: '+o3_captionsize+o3_captionsizeunit+'; font-weight: '+o3_captionweight+'; font-style: '+o3_captionstyle+'; text-decoration: '+o3_captiondecoration+';">'+o3_capicon+title+'</font></td>'+closing+'</tr></table><table width="100%" border="0" cellpadding="' + o3_cellpad + '" cellspacing="0" style="color: '+o3_fgcolor+'; background-color: '+o3_fgcolor+'; height: '+o3_height+o3_heightunit+';"><tr><td valign="TOP"><font style="font-family: '+o3_textfont+'; color: '+o3_textcolor+'; font-size: '+o3_textsize+o3_textsizeunit+'; text-decoration: '+o3_textdecoration+'; font-weight: '+o3_textweight+'; font-style:'+o3_textstyle+'">'+text+'</font></td></tr></table></td></tr></table>';
|
||||
set_background("");
|
||||
|
||||
return txt;
|
||||
}
|
||||
|
||||
// Sets the background picture, padding and lots more. :)
|
||||
function ol_content_background_cssstyle(text, picture, hasfullhtml) {
|
||||
if (hasfullhtml) {
|
||||
txt = text;
|
||||
} else {
|
||||
var pU, hU, wU;
|
||||
pU = (o3_padunit == '%' ? '%' : '');
|
||||
hU = (o3_heightunit == '%' ? '%' : '');
|
||||
wU = (o3_widthunit == '%' ? '%' : '');
|
||||
txt = '<table width="'+o3_width+wu+'" border="0" cellpadding="0" cellspacing="0" height="'+o3_height+hu+'"><tr><td colspan="3" height="'+o3_padyt+pu+'"></td></tr><tr><td width="'+o3_padxl+pu+'"></td><td valign="TOP" width="'+(o3_width-o3_padxl-o3_padxr)+pu+'"><font style="font-family: '+o3_textfont+'; color: '+o3_textcolor+'; font-size: '+o3_textsize+o3_textsizeunit+';">'+text+'</font></td><td width="'+o3_padxr+pu+'"></td></tr><tr><td colspan="3" height="'+o3_padyb+pu+'"></td></tr></table>';
|
||||
}
|
||||
|
||||
set_background(picture);
|
||||
|
||||
return txt;
|
||||
}
|
||||
|
||||
////////
|
||||
// PLUGIN REGISTRATIONS
|
||||
////////
|
||||
registerRunTimeFunction(setCSSStyleVariables);
|
||||
registerCmdLineFunction(parseCSSStyleExtras);
|
||||
registerHook("ol_content_simple", ol_content_simple_cssstyle, FALTERNATE, CSSSTYLE);
|
||||
registerHook("ol_content_caption", ol_content_caption_cssstyle, FALTERNATE, CSSSTYLE);
|
||||
registerHook("ol_content_background", ol_content_background_cssstyle, FALTERNATE, CSSSTYLE);
|
||||
}
|
||||
@@ -1,177 +0,0 @@
|
||||
//\/////
|
||||
//\ overLIB Debug Plugin
|
||||
//\ This file requires overLIB 4.10 or later.
|
||||
//\
|
||||
//\ overLIB 4.05 - You may not remove or change this notice.
|
||||
//\ Copyright Erik Bosrup 1998-2003. All rights reserved.
|
||||
//\ Contributors are listed on the homepage.
|
||||
//\ See http://www.bosrup.com/web/overlib/ for details.
|
||||
// $Revision$ $Date$
|
||||
//
|
||||
//\/////
|
||||
//\mini
|
||||
////////
|
||||
// PRE-INIT
|
||||
// Ignore these lines, configuration is below.
|
||||
////////
|
||||
if (typeof olInfo == 'undefined' || typeof olInfo.meets == 'undefined' || !olInfo.meets(4.10)) alert('overLIB 4.10 or later is required for the Debug Plugin.');
|
||||
else {
|
||||
var olZindex;
|
||||
registerCommands('allowdebug');
|
||||
////////
|
||||
// PLUGIN FUNCTIONS
|
||||
////////
|
||||
// Parses Debug Parameters
|
||||
function parseDebugExtras(pf, i, ar) {
|
||||
var k = i, v;
|
||||
|
||||
if (k < ar.length) {
|
||||
if (ar[k] == ALLOWDEBUG) { v = ar[k + 1]; if(typeof v == 'string') {v = ar[++k]; if (pf != 'ol_') setCanShowParm(v);} return k; }
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
// Debug main routine
|
||||
function showProperties() {
|
||||
var args = showProperties.arguments, sho, shoObj, vis, lvl = 0, istrt = 0, theDiv = 'showProps', txt = '';
|
||||
|
||||
if (args.length == 0) return;
|
||||
if (args.length % 2 && typeof args[0] == 'string') {
|
||||
istrt = 1;
|
||||
theDiv = args[0];
|
||||
}
|
||||
|
||||
sho = createDivContainer(theDiv);
|
||||
|
||||
if (olNs4) {
|
||||
shoObj = sho;
|
||||
txt += '<table cellpadding="1" cellspacing="0" border="0" bgcolor="#000000"><tr><td>';
|
||||
} else {
|
||||
with(sho.style) {
|
||||
backgroundColor = '#ffffcc';
|
||||
padding = '5px';
|
||||
border = '1px #000000 solid';
|
||||
}
|
||||
shoObj = sho.style;
|
||||
}
|
||||
|
||||
lvl = getLayerLevel(theDiv);
|
||||
|
||||
if(typeof sho.position == 'undefined') {
|
||||
sho.position = new Pagelocation(10 + lvl*20, 10, 1);
|
||||
if(typeof olZindex == 'undefined') olZindex = getDivZindex();
|
||||
shoObj.zIndex = olZindex + 1 + lvl;
|
||||
}
|
||||
|
||||
txt += '<table cellpadding="5" border="0" cellspacing="0"' + (olNs4 ? ' bgcolor="#ffffcc"' : '') + '>';
|
||||
txt += '<tr><td><strong><A HREF="javascript:moveToBack(\'' + theDiv + '\');" title="Move to back">' + theDiv + '</A></strong></td><td align="RIGHT"><strong><a href="javascript:closeLayer(\'' + theDiv + '\');" TITLE="Close Layer' + (!olNs4 ? '" style="background-color: #CCCCCC; border:2px #333369 outset; padding: 2px;' : '') + '">X</a></strong></td></tr>';
|
||||
txt += '<tr><td style="text-decoration: underline;"><strong>Item</strong></td><td style="text-decoration: underline;"><strong>Value</strong></td></tr>';
|
||||
for (var i = istrt; i<args.length-1; i++)
|
||||
txt += '<tr><td align="right"><strong>' + args[i] + ': </strong></td><td>' + args[++i] + '</td></tr>';
|
||||
txt += '</table>' + (olNs4 ? '</td></tr></table>' : '');
|
||||
|
||||
if (olNs4) {
|
||||
sho.document.open();
|
||||
sho.document.write(txt);
|
||||
sho.document.close();
|
||||
} else {
|
||||
if(olIe5&&isMac) sho.innerHTML = '';
|
||||
sho.innerHTML = txt;
|
||||
}
|
||||
|
||||
showAllVisibleLayers();
|
||||
}
|
||||
function getLayerLevel(lyr) {
|
||||
var i = 0;
|
||||
|
||||
if (typeof document.popups == 'undefined') {
|
||||
document.popups = new Array(lyr);
|
||||
} else {
|
||||
var l = document.popups;
|
||||
for (var i = 0; i<l.length; i++) if (lyr == l[i]) break;
|
||||
if(i == l.length) l[l.length++] = lyr;
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
function getDivZindex(id) {
|
||||
var obj;
|
||||
|
||||
if(id == '' || id == null) id = 'overDiv';
|
||||
|
||||
obj = layerReference(id);
|
||||
obj = (olNs4 ? obj : obj.style);
|
||||
|
||||
return obj.zIndex;
|
||||
}
|
||||
function setCanShowParm(debugID) {
|
||||
var lyr, pLyr;
|
||||
|
||||
if(typeof debugID != 'string') return;
|
||||
|
||||
pLyr = debugID.split(',');
|
||||
for(var i = 0; i<pLyr.length; i++) {
|
||||
lyr = layerReference(pLyr[i]);
|
||||
if(lyr != null && typeof lyr.position != 'undefined') lyr.position.canShow = 1;
|
||||
}
|
||||
}
|
||||
function Pagelocation(x, y, canShow) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.canShow = (canShow == null) ? 0 : canShow;
|
||||
}
|
||||
function showAllVisibleLayers(){
|
||||
var lyr, lyrObj, l = document.popups;
|
||||
|
||||
for (var i = 0; i<l.length; i++) {
|
||||
lyr = layerReference(l[i]);
|
||||
lyrObj = (olNs4 ? lyr : lyr.style);
|
||||
if(lyr.position.canShow) {
|
||||
positionLayer(lyrObj, lyr.position.x, lyr.position.y);
|
||||
lyrObj.visibility = 'visible';
|
||||
}
|
||||
}
|
||||
}
|
||||
function positionLayer(Obj, x, y) { // Obj is obj.style for IE/NS6+ but obj for NS4
|
||||
Obj.left = x + (olIe4 ? eval(docRoot + '.scrollLeft') : window.pageXOffset) + (olNs4 ? 0 : 'px');
|
||||
Obj.top = y + (olIe4 ? eval(docRoot + '.scrollTop') : window.pageYOffset) + (olNs4 ? 0 : 'px');
|
||||
}
|
||||
function closeLayer(lyrID) {
|
||||
var lyr = layerReference(lyrID);
|
||||
|
||||
lyr.position.canShow = 0;
|
||||
lyr = (olNs4 ? lyr : lyr.style);
|
||||
lyr.visibility = 'hidden';
|
||||
}
|
||||
function moveToBack(layer) {
|
||||
var l = document.popups, lyr, obj, i, x = 10, y = 10, dx = 20, z = olZindex + 1;
|
||||
|
||||
if(l.length == 1) return;
|
||||
|
||||
lyr = layerReference(layer);
|
||||
lyr.position.x = x;
|
||||
lyr.position.y = y;
|
||||
obj = (olNs4 ? lyr : lyr.style);
|
||||
obj.zIndex = z;
|
||||
|
||||
for (i = 0; i<l.length; i++) {
|
||||
if (layer == l[i]) continue;
|
||||
lyr = layerReference(l[i]);
|
||||
if(lyr.position.canShow == 0) continue;
|
||||
obj = (olNs4 ? lyr : lyr.style);
|
||||
obj.zIndex += 1;
|
||||
lyr.position.x += dx;
|
||||
lyr.position.y = y;
|
||||
}
|
||||
|
||||
showAllVisibleLayers();
|
||||
}
|
||||
function rawTxt(txt) {
|
||||
if (typeof txt != 'string') return;
|
||||
return txt.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""");
|
||||
}
|
||||
////////
|
||||
// PLUGIN REGISTRATIONS
|
||||
////////
|
||||
registerCmdLineFunction(parseDebugExtras);
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
//\/////
|
||||
//\ overLIB Exclusive Plugin
|
||||
//\ This file requires overLIB 4.10 or later.
|
||||
//\
|
||||
//\ overLIB 4.05 - You may not remove or change this notice.
|
||||
//\ Copyright Erik Bosrup 1998-2004. All rights reserved.
|
||||
//\ Contributors are listed on the homepage.
|
||||
//\ See http://www.bosrup.com/web/overlib/ for details.
|
||||
// $Revision$ $Date$
|
||||
//\/////
|
||||
//\mini
|
||||
////////
|
||||
// PRE-INIT
|
||||
// Ignore these lines, configuration is below.
|
||||
////////
|
||||
if (typeof olInfo == 'undefined' || typeof olInfo.meets == 'undefined' || !olInfo.meets(4.10)) alert('overLIB 4.10 or later is required for the Debug Plugin.');
|
||||
else {
|
||||
registerCommands('exclusive,exclusivestatus,exclusiveoverride');
|
||||
var olOverrideIsSet; // variable which tells if override is set
|
||||
|
||||
|
||||
////////
|
||||
// DEFAULT CONFIGURATION
|
||||
// Settings you want everywhere are set here. All of this can also be
|
||||
// changed on your html page or through an overLIB call.
|
||||
////////
|
||||
if (typeof ol_exclusive == 'undefined') var ol_exclusive = 0;
|
||||
if (typeof ol_exclusivestatus == 'undefined') var ol_exclusivestatus = 'Please close open popup first.';
|
||||
|
||||
////////
|
||||
// END OF CONFIGURATION
|
||||
// Don't change anything below this line, all configuration is above.
|
||||
////////
|
||||
|
||||
|
||||
////////
|
||||
// INIT
|
||||
////////
|
||||
// Runtime variables init. Don't change for config!
|
||||
var o3_exclusive = 0;
|
||||
var o3_exclusivestatus = '';
|
||||
|
||||
////////
|
||||
// PLUGIN FUNCTIONS
|
||||
////////
|
||||
|
||||
// Set runtime variables
|
||||
function setExclusiveVariables() {
|
||||
o3_exclusive = ol_exclusive;
|
||||
o3_exclusivestatus = ol_exclusivestatus;
|
||||
}
|
||||
|
||||
// Parses Exclusive Parameters
|
||||
function parseExclusiveExtras(pf,i,ar) {
|
||||
var k = i,v;
|
||||
|
||||
olOverrideIsSet = false; // a global variable
|
||||
|
||||
if (k < ar.length) {
|
||||
if (ar[k] == EXCLUSIVEOVERRIDE) { if(pf != 'ol_') olOverrideIsSet = true; return k; }
|
||||
if (ar[k] == EXCLUSIVE) { eval(pf + 'exclusive = (' + pf + 'exclusive == 0) ? 1 : 0'); return k; }
|
||||
if (ar[k] == EXCLUSIVESTATUS) { eval(pf + "exclusivestatus = '" + escSglQuote(ar[++k]) + "'"); return k; }
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
///////
|
||||
// HELPER FUNCTIONS
|
||||
///////
|
||||
// set status message and indicate whether popup is exclusive
|
||||
function isExclusive(args) {
|
||||
var rtnVal = false;
|
||||
|
||||
if(args != null) rtnVal = hasCommand(args, EXCLUSIVEOVERRIDE);
|
||||
|
||||
if(rtnVal) return false;
|
||||
else {
|
||||
self.status = (o3_exclusive) ? o3_exclusivestatus : '';
|
||||
return o3_exclusive;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// checks overlib argument list to see if it has a COMMAND argument
|
||||
function hasCommand(args, COMMAND) {
|
||||
var rtnFlag = false;
|
||||
|
||||
for (var i=0; i<args.length; i++) {
|
||||
if (typeof args[i] == 'number' && args[i] == COMMAND) {
|
||||
rtnFlag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return rtnFlag;
|
||||
}
|
||||
|
||||
// makes sure exclusive setting is off
|
||||
function clearExclusive() {
|
||||
o3_exclusive = 0;
|
||||
}
|
||||
|
||||
function setExclusive() {
|
||||
o3_exclusive = (o3_showingsticky && o3_exclusive);
|
||||
}
|
||||
|
||||
function chkForExclusive() {
|
||||
if (olOverrideIsSet) o3_exclusive = 0; // turn it off in case it's been set.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
////////
|
||||
// PLUGIN REGISTRATIONS
|
||||
////////
|
||||
registerRunTimeFunction(setExclusiveVariables);
|
||||
registerCmdLineFunction(parseExclusiveExtras);
|
||||
registerPostParseFunction(chkForExclusive);
|
||||
registerHook("createPopup",setExclusive,FBEFORE);
|
||||
registerHook("hideObject",clearExclusive,FAFTER);
|
||||
if (olInfo.meets(4.10)) registerNoParameterCommands('exclusive');
|
||||
}
|
||||
@@ -1,175 +0,0 @@
|
||||
//\/////
|
||||
//\ overLIB Follow Scroll Plugin
|
||||
//\ This file requires overLIB 4.10 or later.
|
||||
//\
|
||||
//\ overLIB 4.10 - You may not remove or change this notice.
|
||||
//\ Copyright Erik Bosrup 1998-2004. All rights reserved.
|
||||
//\ Contributors are listed on the homepage.
|
||||
//\ See http://www.bosrup.com/web/overlib/ for details.
|
||||
// $Revision$ $Date$
|
||||
//\/////
|
||||
//\mini
|
||||
|
||||
////////
|
||||
// PRE-INIT
|
||||
// Ignore these lines, configuration is below.
|
||||
////////
|
||||
if (typeof olInfo == 'undefined' || typeof olInfo.meets == 'undefined' || !olInfo.meets(4.10)) alert('overLIB 4.10 or later is required for the Follow Scroll Plugin.');
|
||||
else {
|
||||
registerCommands('followscroll,followscrollrefresh');
|
||||
|
||||
|
||||
////////
|
||||
// DEFAULT CONFIGURATION
|
||||
// You don't have to change anything here if you don't want to. All of this can be
|
||||
// changed on your html page or through an overLIB call.
|
||||
////////
|
||||
// Default value for scroll is not to scroll (0)
|
||||
if (typeof ol_followscroll=='undefined') var ol_followscroll=0;
|
||||
if (typeof ol_followscrollrefresh=='undefined') var ol_followscrollrefresh=100;
|
||||
|
||||
////////
|
||||
// END OF CONFIGURATION
|
||||
// Don't change anything below this line, all configuration is above.
|
||||
////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
////////
|
||||
// INIT
|
||||
////////
|
||||
// Runtime variables init. Don't change for config!
|
||||
var o3_followscroll=0;
|
||||
var o3_followscrollrefresh=100;
|
||||
|
||||
|
||||
////////
|
||||
// PLUGIN FUNCTIONS
|
||||
////////
|
||||
function setScrollVariables() {
|
||||
o3_followscroll=ol_followscroll;
|
||||
o3_followscrollrefresh=ol_followscrollrefresh;
|
||||
}
|
||||
|
||||
// Parses Shadow and Scroll commands
|
||||
function parseScrollExtras(pf,i,ar) {
|
||||
var k=i,v;
|
||||
if (k < ar.length) {
|
||||
if (ar[k]==FOLLOWSCROLL) { eval(pf +'followscroll=('+pf+'followscroll==0) ? 1 : 0'); return k; }
|
||||
if (ar[k]==FOLLOWSCROLLREFRESH) { eval(pf+'followscrollrefresh='+ar[++k]); return k; }
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Function to support scroll feature (overloads default)
|
||||
function scroll_placeLayer() {
|
||||
var placeX, placeY, widthFix = 0;
|
||||
|
||||
// HORIZONTAL PLACEMENT
|
||||
if (o3_frame.innerWidth) {
|
||||
widthFix=Math.ceil(1.2*(o3_frame.outerWidth - o3_frame.innerWidth));
|
||||
widthFix = (widthFix > 50) ? 20 : widthFix;
|
||||
iwidth=o3_frame.innerWidth;
|
||||
} else if (eval('o3_frame.'+docRoot)&&eval("typeof o3_frame."+docRoot+".clientWidth=='number'")&&eval('o3_frame.'+docRoot+'.clientWidth'))
|
||||
iwidth=eval('o3_frame.'+docRoot+'.clientWidth');
|
||||
|
||||
// Horizontal scroll offset
|
||||
winoffset=(olIe4) ? eval('o3_frame.'+docRoot+'.scrollLeft') : o3_frame.pageXOffset;
|
||||
|
||||
placeX = runHook('horizontalPlacement',FCHAIN,iwidth,winoffset,widthFix);
|
||||
|
||||
// VERTICAL PLACEMENT
|
||||
if (o3_frame.innerHeight) iheight=o3_frame.innerHeight;
|
||||
else if (eval('o3_frame.'+docRoot)&&eval("typeof o3_frame."+docRoot+".clientHeight=='number'")&&eval('o3_frame.'+docRoot+'.clientHeight'))
|
||||
iheight=eval('o3_frame.'+docRoot+'.clientHeight');
|
||||
|
||||
// Vertical scroll offset
|
||||
scrolloffset=(olIe4) ? eval('o3_frame.'+docRoot+'.scrollTop') : o3_frame.pageYOffset;
|
||||
|
||||
placeY = runHook('verticalPlacement',FCHAIN,iheight,scrolloffset);
|
||||
|
||||
// Actually move the object.
|
||||
repositionTo(over,placeX,placeY);
|
||||
|
||||
if (o3_followscroll && o3_sticky && (o3_relx || o3_rely) && (typeof o3_draggable == 'undefined' || !o3_draggable)) {
|
||||
if (typeof over.scroller=='undefined' || over.scroller.canScroll) over.scroller = new Scroller(placeX-winoffset,placeY-scrolloffset,o3_followscrollrefresh);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////
|
||||
// SUPPORT ROUTINES FOR SCROLL FEATURE
|
||||
///////
|
||||
|
||||
// Scroller constructor
|
||||
function Scroller(X,Y,refresh) {
|
||||
this.canScroll=0;
|
||||
this.refresh=refresh;
|
||||
this.x=X;
|
||||
this.y=Y;
|
||||
this.timer=setTimeout("repositionOver()",this.refresh);
|
||||
}
|
||||
|
||||
// Removes the timer to stop replacing the layer.
|
||||
function cancelScroll() {
|
||||
if (!o3_followscroll || typeof over.scroller == 'undefined') return;
|
||||
over.scroller.canScroll = 1;
|
||||
|
||||
if (over.scroller.timer) {
|
||||
clearTimeout(over.scroller.timer);
|
||||
over.scroller.timer=null;
|
||||
}
|
||||
}
|
||||
|
||||
// Find out how much we've scrolled.
|
||||
function getPageScrollY() {
|
||||
if (o3_frame.pageYOffset) return o3_frame.pageYOffset;
|
||||
if (eval(docRoot)) return eval('o3_frame.' + docRoot + '.scrollTop');
|
||||
return -1;
|
||||
}
|
||||
function getPageScrollX() {
|
||||
if (o3_frame.pageXOffset) return o3_frame.pageXOffset;
|
||||
if (eval(docRoot)) return eval('o3_frame.'+docRoot+'.scrollLeft');
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Find out where our layer is
|
||||
function getLayerTop(layer) {
|
||||
if (layer.pageY) return layer.pageY;
|
||||
if (layer.style.top) return parseInt(layer.style.top);
|
||||
return -1;
|
||||
}
|
||||
function getLayerLeft(layer) {
|
||||
if (layer.pageX) return layer.pageX;
|
||||
if (layer.style.left) return parseInt(layer.style.left);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Repositions the layer if needed
|
||||
function repositionOver() {
|
||||
var X, Y, pgLeft, pgTop;
|
||||
pgTop = getPageScrollY();
|
||||
pgLeft = getPageScrollX();
|
||||
X = getLayerLeft(over)-pgLeft;
|
||||
Y = getLayerTop(over)-pgTop;
|
||||
|
||||
if (X != over.scroller.x || Y != over.scroller.y) repositionTo(over, pgLeft+over.scroller.x, pgTop+over.scroller.y);
|
||||
over.scroller.timer = setTimeout("repositionOver()", over.scroller.refresh);
|
||||
}
|
||||
|
||||
////////
|
||||
// PLUGIN REGISTRATIONS
|
||||
////////
|
||||
registerRunTimeFunction(setScrollVariables);
|
||||
registerCmdLineFunction(parseScrollExtras);
|
||||
registerHook("hideObject",cancelScroll,FAFTER);
|
||||
registerHook("placeLayer",scroll_placeLayer,FREPLACE);
|
||||
if (olInfo.meets(4.10)) registerNoParameterCommands('followscroll');
|
||||
}
|
||||
@@ -1,135 +0,0 @@
|
||||
//\/////
|
||||
//\ overLIB Hide Form Plugin
|
||||
//\
|
||||
//\ Uses an iframe shim to mask system controls for IE v5.5 or higher as suggested in
|
||||
//\ http://dotnetjunkies.com/weblog/jking/posts/488.aspx
|
||||
//\ This file requires overLIB 4.10 or later.
|
||||
//\
|
||||
//\ overLIB 4.05 - You may not remove or change this notice.
|
||||
//\ Copyright Erik Bosrup 1998-2004. All rights reserved.
|
||||
//\ Contributors are listed on the homepage.
|
||||
//\ See http://www.bosrup.com/web/overlib/ for details.
|
||||
// $Revision$ $Date$
|
||||
//\/////
|
||||
//\mini
|
||||
if (typeof olInfo == 'undefined' || typeof olInfo.meets == 'undefined' || !olInfo.meets(4.10)) alert('overLIB 4.10 or later is required for the HideForm Plugin.');
|
||||
else {
|
||||
|
||||
// Function which generates the popup with an IFRAME shim
|
||||
function generatePopUp(content) {
|
||||
if(!olIe4||olOp||!olIe55||(typeof o3_shadow != 'undefined' && o3_shadow)||(typeof o3_bubble != 'undefined' && o3_bubble)) return;
|
||||
|
||||
var wd,ht,txt, zIdx = 0;
|
||||
|
||||
wd = parseInt(o3_width);
|
||||
ht = over.offsetHeight;
|
||||
txt = backDropSource(wd,ht,zIdx++);
|
||||
txt += '<div style="position: absolute; top: 0; left: 0; width: '+ wd+'px; z-index: ' + zIdx + ';">' + content + '</div>';
|
||||
layerWrite(txt);
|
||||
}
|
||||
|
||||
// Code for the IFRAME which is used in other places
|
||||
function backDropSource(width, height, Z) {
|
||||
return '<iframe frameborder="0" scrolling="no" src="javascript:false;" width="' + width + '" height="' + height + '" style="z-index: ' + Z + '; filter: Beta(Style=0,Opacity=0);"></iframe>';
|
||||
}
|
||||
|
||||
// Hides SELECT boxes that will be under the popup
|
||||
// Checking Gecko version number to try to include other browsers based on the Gecko engine
|
||||
function hideSelectBox() {
|
||||
if(olNs4 || olOp || olIe55) return;
|
||||
var px, py, pw, ph, sx, sw, sy, sh, selEl, v;
|
||||
|
||||
if(olIe4) v = 0;
|
||||
else {
|
||||
v = navigator.userAgent.match(/Gecko\/(\d{8})/i);
|
||||
if(!v) return; // return if no string match
|
||||
v = parseInt(v[1]);
|
||||
}
|
||||
|
||||
if (v < 20030624) { // versions less than June 24, 2003 were earlier Netscape browsers
|
||||
px = parseInt(over.style.left);
|
||||
py = parseInt(over.style.top);
|
||||
pw = o3_width;
|
||||
ph = (o3_aboveheight ? parseInt(o3_aboveheight) : over.offsetHeight);
|
||||
selEl = (olIe4) ? o3_frame.document.all.tags("SELECT") : o3_frame.document.getElementsByTagName("SELECT");
|
||||
for (var i=0; i<selEl.length; i++) {
|
||||
if(!olIe4 && selEl[i].size < 2) continue; // Not IE and SELECT size is 1 or not specified
|
||||
sx = pageLocation(selEl[i],'Left');
|
||||
sy = pageLocation(selEl[i],'Top');
|
||||
sw = selEl[i].offsetWidth;
|
||||
sh = selEl[i].offsetHeight;
|
||||
if((px+pw) < sx || px > (sx+sw) || (py+ph) < sy || py > (sy+sh)) continue;
|
||||
selEl[i].isHidden = 1;
|
||||
selEl[i].style.visibility = 'hidden';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Shows previously hidden SELECT Boxes
|
||||
function showSelectBox() {
|
||||
if(olNs4 || olOp || olIe55) return;
|
||||
var selEl, v;
|
||||
|
||||
if(olIe4) v = 0;
|
||||
else {
|
||||
v = navigator.userAgent.match(/Gecko\/(\d{8})/i);
|
||||
if(!v) return;
|
||||
v = parseInt(v[1]);
|
||||
}
|
||||
|
||||
if(v < 20030624) {
|
||||
selEl = (olIe4) ? o3_frame.document.all.tags("SELECT") : o3_frame.document.getElementsByTagName("SELECT");
|
||||
for (var i=0; i<selEl.length; i++) {
|
||||
if(typeof selEl[i].isHidden != 'undefined' && selEl[i].isHidden) {
|
||||
selEl[i].isHidden = 0;
|
||||
selEl[i].style.visibility = 'visible';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// function gets the total offset properties of an element
|
||||
// this same function occurs in overlib_mark.js.
|
||||
function pageLocation(o,t){
|
||||
var x = 0
|
||||
|
||||
while(o.offsetParent){
|
||||
x += o['offset'+t]
|
||||
o = o.offsetParent
|
||||
}
|
||||
|
||||
x += o['offset'+t]
|
||||
|
||||
return x
|
||||
}
|
||||
|
||||
// reset mouse move routine for NS7 but not NS7.1,Opera, or IE5.5+
|
||||
// It also bypasses Netscape 6 since the modifications mess up the display of popups
|
||||
// and don't work anyways.
|
||||
// Modify mouse move routine while loading so that hideSelectBox()
|
||||
// can be called from the correct location
|
||||
if (!(olNs4 || olOp || olIe55 || navigator.userAgent.indexOf('Netscape6') != -1)) {
|
||||
var MMStr = olMouseMove.toString();
|
||||
var strRe = /(if\s*\(o3_allowmove\s*==\s*1.*\)\s*)/;
|
||||
var f = MMStr.match(strRe);
|
||||
|
||||
if (f) {
|
||||
var ls = MMStr.search(strRe);
|
||||
ls += f[1].length;
|
||||
var le = MMStr.substring(ls).search(/[;|}]\n/);
|
||||
MMStr = MMStr.substring(0,ls) + ' { runHook("placeLayer",FREPLACE); if(olHideForm) hideSelectBox(); ' + MMStr.substring(ls + (le != -1 ? le+3 : 0));
|
||||
document.writeln('<script type="text/javascript">\n<!--\n' + MMStr + '\n//-->\n</' + 'script>');
|
||||
}
|
||||
|
||||
f = capExtent.onmousemove.toString().match(/function[ ]+(\w*)\(/);
|
||||
if (f&&f[1] != 'anonymous') capExtent.onmousemove = olMouseMove;
|
||||
}
|
||||
|
||||
|
||||
////////
|
||||
// PLUGIN REGISTRATIONS
|
||||
////////
|
||||
registerHook("createPopup",generatePopUp,FAFTER);
|
||||
registerHook("hideObject",showSelectBox,FAFTER);
|
||||
olHideForm=1;
|
||||
}
|
||||
@@ -1,101 +0,0 @@
|
||||
//\/////
|
||||
//\ overLIB Set On/Off Plugin
|
||||
//\ This file requires overLIB 4.10 or later.
|
||||
//\
|
||||
//\ overLIB 4.10 - You may not remove or change this notice.
|
||||
//\ Copyright Erik Bosrup 1998-2003. All rights reserved.
|
||||
//\ Contributors are listed on the homepage.
|
||||
//\ See http://www.bosrup.com/web/overlib/ for details.
|
||||
// $Revision$ $Date$
|
||||
//
|
||||
//\/////
|
||||
//\mini
|
||||
////////
|
||||
// PRE-INIT
|
||||
// Ignore these lines, configuration is below.
|
||||
////////
|
||||
if (typeof olInfo == 'undefined' || typeof olInfo.meets == 'undefined' || !olInfo.meets(4.10)) alert('overLIB 4.10 or later is required for the Set On/Off Plugin.');
|
||||
else {
|
||||
registerCommands('seton, setoff');
|
||||
var olSetType;
|
||||
// END OF CONFIGURATION
|
||||
// Don't change anything below this line, all configuration is above.
|
||||
////////
|
||||
// PLUGIN FUNCTIONS
|
||||
////////
|
||||
// Set runtime variables
|
||||
function setOnOffVariables() {
|
||||
olSetType = 0;
|
||||
}
|
||||
// Parses Set On/Off Parameters
|
||||
function parseOnOffExtras(pf, i, ar) {
|
||||
var k = i, v;
|
||||
|
||||
if (k < ar.length) {
|
||||
if (ar[k] == SETON||ar[k] == SETOFF) { olSetType = 1; k = opt_MULTICOMMANDS(++k, ar); return k; }
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
///////
|
||||
// HELPER FUNCTIONS
|
||||
///////
|
||||
// searches arg list for COMMAND;
|
||||
function hasCommand(istrt, args, COMMAND) {
|
||||
for (var i = istrt; i < args.length; i++) {
|
||||
if (typeof args[i] == 'number' && args[i] == COMMAND) return i;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
// scans for toggle like commands to be forced ON/OFF
|
||||
function scanCommandSet(pf, args) {
|
||||
var k = -1, j, je;
|
||||
|
||||
if (olSetType) {
|
||||
// search for SETON command
|
||||
while ((k = hasCommand(++k, args, SETON)) < args.length && k > -1) {
|
||||
je = opt_MULTICOMMANDS(k + 1, args);
|
||||
for (j = k + 1; j < (k + je); j++) setNoParamCommand(1, pf, args[j]);
|
||||
k += (je - 1);
|
||||
}
|
||||
// search for SETOFF command
|
||||
k = -1;
|
||||
while ((k = hasCommand(++k, args, SETOFF)) < args.length && k > -1) {
|
||||
je = opt_MULTICOMMANDS(k + 1, args);
|
||||
for (j = k + 1; j < (k + je); j++) setNoParamCommand(0, pf, args[j]);
|
||||
k += (je - 1);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
var olRe;
|
||||
// set command according to whichType (0 or 1)
|
||||
function setNoParamCommand(whichType, pf, COMMAND) {
|
||||
var v = pms[COMMAND - 1 - pmStart];
|
||||
|
||||
if(pmt && !olRe) olRe = eval('/' + pmt.split(',').join('|') + '/');
|
||||
if (pf != 'ol_' && /capturefirst/.test(v)) return; // no o3_capturefirst variable
|
||||
if (pf != 'ol_' && /wrap/.test(v) && eval(pf + 'wrap') && (whichType == 0)) {
|
||||
nbspCleanup(); // undo wrap effects since checked after all parsing
|
||||
o3_width = ol_width;
|
||||
}
|
||||
|
||||
if (olRe.test(v)) eval(pf + v + '=' + ((whichType && COMMAND == AUTOSTATUSCAP) ? whichType++ : whichType));
|
||||
}
|
||||
function opt_MULTICOMMANDS(i, ar) {
|
||||
var k = i;
|
||||
|
||||
while (k < ar.length && typeof ar[k] == 'number' && ar[k] > pmStart) {k++; if (ar[k - 1] == 'SETON'||ar[k - 1] == 'SETOFF') break;}
|
||||
k -= (k < ar.length ? 2 : 1);
|
||||
|
||||
return k;
|
||||
}
|
||||
////////
|
||||
// PLUGIN REGISTRATIONS
|
||||
////////
|
||||
registerRunTimeFunction(setOnOffVariables);
|
||||
registerCmdLineFunction(parseOnOffExtras);
|
||||
registerPostParseFunction(scanCommandSet);
|
||||
}
|
||||
@@ -1,270 +0,0 @@
|
||||
//\/////
|
||||
//\ overLIB Shadow Plugin
|
||||
//\ This file requires overLIB 4.10 or later.
|
||||
//\
|
||||
//\ overLIB 4.05 - You may not remove or change this notice.
|
||||
//\ Copyright Erik Bosrup 1998-2003. All rights reserved.
|
||||
//\ Contributors are listed on the homepage.
|
||||
//\ See http://www.bosrup.com/web/overlib/ for details.
|
||||
// $Revision$ $Date$
|
||||
//\/////
|
||||
//\mini
|
||||
|
||||
////////
|
||||
// PRE-INIT
|
||||
// Ignore these lines, configuration is below.
|
||||
////////
|
||||
if (typeof olInfo == 'undefined' || typeof olInfo.meets == 'undefined' || !olInfo.meets(4.10)) alert('overLIB 4.10 or later is required for the Shadow Plugin.');
|
||||
else {
|
||||
registerCommands('shadow,shadowcolor,shadowimage,shadowopacity,shadowx,shadowy');
|
||||
|
||||
|
||||
////////
|
||||
// DEFAULT CONFIGURATION
|
||||
// You don't have to change anything here if you don't want to. All of this can be
|
||||
// changed on your html page or through an overLIB call.
|
||||
////////
|
||||
if (typeof ol_shadowadjust=='undefined') var ol_shadowadjust=2; // for Ns4.x only
|
||||
if (typeof ol_shadow=='undefined') var ol_shadow=0;
|
||||
if (typeof ol_shadowcolor=='undefined') var ol_shadowcolor='#CCCCCC';
|
||||
if (typeof ol_shadowimage=='undefined') var ol_shadowimage='';
|
||||
if (typeof ol_shadowopacity=='undefined') var ol_shadowopacity=0;
|
||||
if (typeof ol_shadowx=='undefined') var ol_shadowx=5;
|
||||
if (typeof ol_shadowy=='undefined') var ol_shadowy=5;
|
||||
|
||||
////////
|
||||
// END OF CONFIGURATION
|
||||
// Don't change anything below this line, all configuration is above.
|
||||
////////
|
||||
|
||||
|
||||
|
||||
|
||||
////////
|
||||
// INIT
|
||||
////////
|
||||
// Runtime variables init. Don't change for config!
|
||||
var o3_shadow=0;
|
||||
var o3_shadowcolor="#cccccc";
|
||||
var o3_shadowimage='';
|
||||
var o3_shadowopacity=0;
|
||||
var o3_shadowx=5;
|
||||
var o3_shadowy=5;
|
||||
var bkSet=0; // Needed for this effect in NS4
|
||||
|
||||
|
||||
|
||||
// Function which sets runtime variables to their default values
|
||||
function setShadowVariables() {
|
||||
o3_shadow=ol_shadow;
|
||||
o3_shadowcolor=ol_shadowcolor;
|
||||
o3_shadowimage=ol_shadowimage;
|
||||
o3_shadowopacity=ol_shadowopacity;
|
||||
o3_shadowx=ol_shadowx;
|
||||
o3_shadowy=ol_shadowy;
|
||||
}
|
||||
|
||||
|
||||
// Parses shadow commands
|
||||
function parseShadowExtras(pf,i,ar) {
|
||||
var k = i, v;
|
||||
|
||||
if (k < ar.length) {
|
||||
if (ar[k]==SHADOW) { eval(pf +'shadow=('+pf+'shadow==0) ? 1 : 0'); return k; }
|
||||
if (ar[k]==SHADOWCOLOR) { eval(pf+'shadowcolor="'+ar[++k]+'"'); return k; }
|
||||
if (ar[k]==SHADOWOPACITY) {v=ar[++k]; eval(pf+'shadowopacity='+(olOp ? 0 : v)); return k; }
|
||||
if (ar[k]==SHADOWIMAGE) { eval(pf+'shadowimage="'+ar[++k]+'"'); return k; }
|
||||
if (ar[k]==SHADOWX) { eval(pf+'shadowx='+ar[++k]); return k; }
|
||||
if (ar[k]==SHADOWY) { eval(pf+'shadowy='+ar[++k]); return k; }
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
// Function for MOUSEOUT/MOUSEOFF feature with shadow
|
||||
function shadow_cursorOff() {
|
||||
var left= parseInt(over.style.left);
|
||||
var top=parseInt(over.style.top);
|
||||
var right=left+(o3_shadow ? o3_width : over.offsetWidth);
|
||||
var bottom=top+(o3_shadow ? o3_aboveheight : over.offsetHeight);
|
||||
|
||||
if (o3_x < left || o3_x > right || o3_y < top || o3_y > bottom) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Pre-hide processing to clean-up.
|
||||
function checkShadowPreHide() {
|
||||
if (o3_shadow && o3_shadowopacity) cleanUpShadowEffects();
|
||||
if (o3_shadow && (olIe4 && isMac) ) over.style.pixelWidth=over.style.pixelHeight = 0;
|
||||
}
|
||||
|
||||
|
||||
// Funciton that creates the actual shadow
|
||||
function generateShadow(content) {
|
||||
var wd, ht, X = 0, Y = 0, zIdx = 0, txt, dpObj, puObj, bS= '', aPos, posStr=new Array();
|
||||
|
||||
if (!o3_shadow || (o3_shadowx == 0 && o3_shadowy == 0)) return;
|
||||
|
||||
X = Math.abs(o3_shadowx);
|
||||
Y = Math.abs(o3_shadowy);
|
||||
wd = parseInt(o3_width);
|
||||
ht = (olNs4) ? over.clip.height : over.offsetHeight;
|
||||
|
||||
if (o3_shadowx == 0) {
|
||||
if (o3_shadowy < 0) {
|
||||
posStr[0]=' left:0; top: 0';
|
||||
posStr[1]=' left:0; top: '+Y+'px';
|
||||
} else if (o3_shadowy > 0) {
|
||||
posStr[0]=' left:0; top: '+Y+'px';
|
||||
posStr[1]=' left:0; top:0';
|
||||
}
|
||||
} else if (o3_shadowy == 0) {
|
||||
if (o3_shadowx < 0) {
|
||||
posStr[0]=' left:0; top: 0';
|
||||
posStr[1]=' left: '+X+'px';
|
||||
} else if (o3_shadowx > 0) {
|
||||
posStr[0]=' left: '+ X+'px; top: 0';
|
||||
posStr[1]=' left:0; top:0';
|
||||
}
|
||||
} else if (o3_shadowx > 0) {
|
||||
if (o3_shadowy > 0) {
|
||||
posStr[0]=' left:'+ X+'px; top:'+Y+'px';
|
||||
posStr[1]=' left:0; top:0';
|
||||
} else if (o3_shadowy < 0) {
|
||||
posStr[0]=' left:'+X+'px; top:0';
|
||||
posStr[1]=' left:0; top: '+Y+'px';
|
||||
}
|
||||
} else if (o3_shadowx < 0) {
|
||||
if (o3_shadowy > 0) {
|
||||
posStr[0]=' left:0; top:'+Y+'px';
|
||||
posStr[1]=' left:'+X+'px; top:0';
|
||||
} else if (o3_shadowy < 0) {
|
||||
posStr[0]=' left:0; top:0';
|
||||
posStr[1]=' left:'+X+'px; top:'+Y+'px';
|
||||
}
|
||||
}
|
||||
|
||||
txt = (olNs4) ? '<div id="backdrop"></div>' : ((olIe55&&olHideForm) ? backDropSource(wd+X,ht+Y,zIdx++) : '') + '<div id="backdrop" style="position: absolute;'+posStr[0]+'; width: '+wd+'px; height: '+ht+'px; z-index: ' + (zIdx++) + '; ';
|
||||
|
||||
if (o3_shadowimage) {
|
||||
bS='background-image: url('+o3_shadowimage+');';
|
||||
if (olNs4) bkSet=1;
|
||||
} else {
|
||||
bS='background-color: '+o3_shadowcolor +';';
|
||||
if (olNs4) bkSet=2;
|
||||
}
|
||||
|
||||
if (olNs4) {
|
||||
txt += '<div id="PUContent">'+content+'</div>';
|
||||
} else {
|
||||
txt += bS+'"></div><div id="PUContent" style="position: absolute;'+posStr[1]+'; width: '+ wd+'px; z-index: '+(zIdx++)+';">'+content+'</div>';
|
||||
}
|
||||
|
||||
layerWrite(txt);
|
||||
|
||||
if (olNs4 && bkSet) {
|
||||
dpObj = over.document.layers['backdrop'];
|
||||
if (typeof dpObj == 'undefined') return; // if shadow layer not found, then content layer won't be either
|
||||
|
||||
puObj = over.document.layers['PUContent'];
|
||||
wd = puObj.clip.width;
|
||||
ht = puObj.clip.height;
|
||||
aPos = posStr[0].split(';');
|
||||
|
||||
dpObj.clip.width = wd;
|
||||
dpObj.clip.height = ht;
|
||||
dpObj.left = parseInt(aPos[0].split(':')[1]);
|
||||
dpObj.top = parseInt(aPos[1].split(':')[1]);
|
||||
|
||||
dpObj.bgColor = (bkSet == 1) ? null : o3_shadowcolor;
|
||||
dpObj.background.src = (bkSet==2) ? null : o3_shadowimage;
|
||||
dpObj.zIndex = 0;
|
||||
|
||||
aPos = posStr[1].split(';');
|
||||
puObj.left = parseInt(aPos[0].split(':')[1]);
|
||||
puObj.top = parseInt(aPos[1].split(':')[1]);
|
||||
puObj.zIndex = 1;
|
||||
|
||||
} else {
|
||||
puObj = (olIe4 ? o3_frame.document.all['PUContent'] : o3_frame.document.getElementById('PUContent'));
|
||||
dpObj = (olIe4 ? o3_frame.document.all['backdrop'] : o3_frame.document.getElementById('backdrop'));
|
||||
ht = puObj.offsetHeight;
|
||||
dpObj.style.height = ht + 'px';
|
||||
|
||||
if (o3_shadowopacity) {
|
||||
var op = o3_shadowopacity;
|
||||
op = (op <= 100 ? op : 100);
|
||||
|
||||
setBrowserOpacity(op,dpObj);
|
||||
}
|
||||
}
|
||||
|
||||
// Set popup's new width and height values here so they are available in placeLayer()
|
||||
o3_width = wd+X;
|
||||
o3_aboveheight = ht+Y;
|
||||
}
|
||||
|
||||
|
||||
////////
|
||||
// SUPPORT FUNCTIONS
|
||||
////////
|
||||
|
||||
// Cleans up opacity settings if any.
|
||||
function cleanUpShadowEffects() {
|
||||
if (olNs4 || olOp) return;
|
||||
var dpObj=(olIe4 ? o3_frame.document.all['backdrop'] : o3_frame.document.getElementById('backdrop'));
|
||||
cleanUpBrowserOpacity(dpObj);
|
||||
}
|
||||
|
||||
// multi browser opacity support
|
||||
function setBrowserOpacity(op,lyr){
|
||||
if (olNs4||!op) return; // if Ns4.x or opacity not given return;
|
||||
lyr=(lyr) ? lyr : over;
|
||||
if (olIe4&&typeof lyr.filters != 'undefined') {
|
||||
lyr.style.filter='Alpha(Opacity='+op+')';
|
||||
lyr.filters.alpha.enabled=true;
|
||||
} else {
|
||||
var sOp=(typeof(lyr.style.MozOpacity)!='undefined') ? 'MozOpacity' : (typeof(lyr.style.KhtmlOpacity)!='undefined' ? 'KhtmlOpacity' : (typeof(lyr.style.opacity)!='undefined' ? 'opacity' : ''));
|
||||
if (sOp) eval('lyr.style.'+sOp+'=op/100');
|
||||
}
|
||||
}
|
||||
|
||||
// multi-browser Opacity cleanup
|
||||
function cleanUpBrowserOpacity(lyr) {
|
||||
if (olNs4) return;
|
||||
lyr=(lyr) ? lyr : over;
|
||||
if (olIe4&&(typeof lyr.filters != 'undefined'&&lyr.filters.alpha.enabled)) {
|
||||
lyr.style.filter='Alpha(Opacity=100)';
|
||||
lyr.filters.alpha.enabled=false;
|
||||
} else {
|
||||
var sOp=(typeof(lyr.style.MozOpacity)!='undefined') ? 'MozOpacity' : (typeof(lyr.style.KhtmlOpacity)!='undefined' ? 'KhtmlOpacity' : (typeof(lyr.style.opacity)!='undefined' ? 'opacity' : ''));
|
||||
if (sOp) eval('lyr.style.'+sOp+'=1.0');
|
||||
}
|
||||
}
|
||||
|
||||
// This routine is needed only for Ns4.x to allow use of popups with dropshadows and CSSCLASS at the same time on a page
|
||||
function shadowAdjust() {
|
||||
if (!olNs4) return;
|
||||
var fac = ol_shadowadjust;
|
||||
if (olNs4) {
|
||||
document.write('<style type="text/css">\n<!--\n');
|
||||
document.write('#backdrop, #PUContent {position: absolute; left: '+fac*o3_shadowx+'px; top: '+fac*o3_shadowy+'px; }\n');
|
||||
document.write('-->\n<' + '\/style>');
|
||||
}
|
||||
}
|
||||
|
||||
////////
|
||||
// PLUGIN REGISTRATIONS
|
||||
////////
|
||||
var before = (typeof rmrkPreface!='undefined' ? rmrkPreface : null);
|
||||
|
||||
registerRunTimeFunction(setShadowVariables);
|
||||
registerCmdLineFunction(parseShadowExtras);
|
||||
registerHook("cursorOff",shadow_cursorOff,FREPLACE);
|
||||
registerHook("hideObject",checkShadowPreHide,FBEFORE);
|
||||
registerHook("createPopup",generateShadow,FAFTER,before);
|
||||
if (olInfo.meets(4.10)) registerNoParameterCommands('shadow');
|
||||
|
||||
if (olNs4) shadowAdjust(); // write style rules for proper support of Ns4.x
|
||||
}
|
||||
@@ -91,13 +91,6 @@
|
||||
<version>3.2.7</version>
|
||||
<licenseversion>3</licenseversion>
|
||||
</library>
|
||||
<library>
|
||||
<location>overlib</location>
|
||||
<name>Overlib</name>
|
||||
<license>http://www.bosrup.com/web/overlib/?License</license>
|
||||
<version>4.21</version>
|
||||
<licenseversion></licenseversion>
|
||||
</library>
|
||||
<library>
|
||||
<location>pear/Auth/RADIUS.php</location>
|
||||
<name>Pear_Auth_Radius</name>
|
||||
|
||||
Reference in New Issue
Block a user