diff --git a/phpgwapi/templates/prisma/js/pngfix.js b/phpgwapi/templates/prisma/js/pngfix.js new file mode 100644 index 0000000000..44b1056701 --- /dev/null +++ b/phpgwapi/templates/prisma/js/pngfix.js @@ -0,0 +1,33 @@ +function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher. +{ + for(var i=0; i" + img.outerHTML = strNewHTML + i = i-1 + } + } +} +window.attachEvent("onload", correctPNG); diff --git a/phpgwapi/templates/prisma/js/simple_show_hide.js b/phpgwapi/templates/prisma/js/simple_show_hide.js new file mode 100644 index 0000000000..8615b9175f --- /dev/null +++ b/phpgwapi/templates/prisma/js/simple_show_hide.js @@ -0,0 +1,187 @@ +/***************************************************** + * ypSlideOutMenu + * 3/04/2001 + * + * a nice little script to create exclusive, slide-out + * menus for ns4, ns6, mozilla, opera, ie4, ie5 on + * mac and win32. I've got no linux or unix to test on but + * it should(?) work... + * + * --youngpup-- + *****************************************************/ + +//var isIE = false; +//var isOther = false; +//var isNS4 = false; +//var isNS6 = false; +// constructor + +var IEzindexworkaround=false; // set this true to enable the IE z-index bugfix + +function ypSlideOutMenu(id, dir, left, top, width, height,pos) +{ + + this.ie = document.all ? 1 : 0 + this.ns4 = document.layers ? 1 : 0 + this.dom = document.getElementById ? 1 : 0 + + if (this.ie || this.ns4 || this.dom) { + this.id = id + this.dir = dir + this.orientation = dir == "left" || dir == "right" ? "h" : "v" + this.dirType = dir == "right" || dir == "down" ? "-" : "+" + this.dim = this.orientation == "h" ? width : height + //this.hideTimer = false + //this.aniTimer = false + this.open = false + this.over = false + //this.startTime = 0 + + // global reference to this object + //this.gRef = "ypSlideOutMenu_"+id + //eval(this.gRef+"=this") + + // add this menu object to an internal list of all menus + //ypSlideOutMenu.Registry[id] = this + + var d = document + + var strCSS = ''; + + d.write(strCSS); + // alert(strCSS); +// this.load() + + } + } + + ypSlideOutMenu.aLs = function(layerID) + { + + this.isIE = false; + this.isOther = false; + this.isNS4 = false; + this.isNS6 = false; + if(document.getElementById) + { + if(!document.all) + { + this.isNS6=true; + } + if(document.all) + { + this.isIE=true; + } + } + else + { + if(document.layers) + { + this.isNS4=true; + } + else + { + this.isOther=true; + } + } + + var returnLayer; + if(this.isIE) + { + returnLayer = eval("document.all." + layerID + ".style"); + } + if(this.isNS6) + { + returnLayer = eval("document.getElementById('" + layerID + "').style"); + } + if(this.isNS4) + { + returnLayer = eval("document." + layerID); + } + if(this.isOther) + { + returnLayer = "null"; + alert("Error:\nDue to your browser you will probably not\nbe able to view all of the following page\nas it was designed to be viewed. We regret\nthis error sincerely."); + } + return returnLayer; + } + // HideShow 1.0 Jim Cummins - http://www.conxiondesigns.com + + ypSlideOutMenu.ShowL = function(ID) + { + ypSlideOutMenu.aLs(ID).visibility = "visible"; + } + + ypSlideOutMenu.HideL =function(ID) + { + ypSlideOutMenu.aLs(ID).visibility = "hidden"; + } + + ypSlideOutMenu.HideShow = function(ID) + { + + if((ypSlideOutMenu.aLs(ID).visibility == "visible") || (ypSlideOutMenu.aLs(ID).visibility == "")) + { + ypSlideOutMenu.aLs(ID).visibility = "hidden"; + } + else if(ypSlideOutMenu.aLs(ID).visibility == "hidden") + { + ypSlideOutMenu.aLs(ID).visibility = "visible"; + } + } + + + ypSlideOutMenu.showMenu = function(id) + { + //temporarly hide all selectboxes to fix IE bug with z-index + if(IEzindexworkaround && document.all) + { + for (var i=0; i ms, which + // gives the user time to cancel the action if they accidentally moused out + var obj = ypSlideOutMenu.Registry[id] + if (obj.container) { + if (obj.hideTimer) window.clearTimeout(obj.hideTimer) + obj.hideTimer = window.setTimeout("ypSlideOutMenu.hide('" + id + "')", ypSlideOutMenu.hideDelay); + } + } + + ypSlideOutMenu.hide = function(id) + { + var obj = ypSlideOutMenu.Registry[id] + obj.over = false + + if (obj.hideTimer) window.clearTimeout(obj.hideTimer) + + // flag that this scheduled event has occured. + obj.hideTimer = 0 + + // if this menu is open, close it. + if (obj.open && !obj.aniTimer) obj.startSlide(false) + + //show all selectboxes again to fix IE bug with z-index + if(document.all) + { + for (var i=0; i ypSlideOutMenu.aniLen) this.endSlide() + else { + var d = Math.round(Math.pow(ypSlideOutMenu.aniLen-elapsed, 2) * this.accelConst) + if (this.open && this.dirType == "-") d = -d + else if (this.open && this.dirType == "+") d = -d + else if (!this.open && this.dirType == "-") d = -this.dim + d + else d = this.dim + d + + this.moveTo(d) + } +} + +ypSlideOutMenu.prototype.endSlide = function() { + this.aniTimer = window.clearTimeout(this.aniTimer) + this.moveTo(this.open ? this.outPos : this.homePos) + if (!this.open) this.setVisibility(false) + if ((this.open && !this.over) || (!this.open && this.over)) { + this.startSlide(this.over) + } +} + +ypSlideOutMenu.prototype.setVisibility = function(bShow) { + var s = this.ns4 ? this.container : this.container.style + s.visibility = bShow ? "visible" : "hidden" +} +ypSlideOutMenu.prototype.moveTo = function(p) { + this.style[this.orientation == "h" ? "left" : "top"] = this.ns4 ? p : p + "px" +} +ypSlideOutMenu.prototype.getPos = function(c) { + return parseInt(this.style[c]) +} + +// events +ypSlideOutMenu.prototype.onactivate = function() { } +ypSlideOutMenu.prototype.ondeactivate = function() { }