Header

From Ibstudy

(Difference between revisions)
(working on Study Helper. this should work with Firefox)
 
(2 intermediate revisions not shown)
Line 163: Line 163:
-
</script></head>
+
</script><meta name="verify-v1" content="ePVH76/bzS4qy88EbdN1d6X90nnx/s43ZB5BZ7JkyhI=" /><meta name="verify-v1" content="ePVH76/bzS4qy88EbdN1d6X90nnx/s43ZB5BZ7JkyhI=" /></head>
 +
 
<body>
<body>
-
<div id="studyHelper" class="drsElement" style="background: rgb(204, 221, 255) none repeat scroll 0%; position: absolute; left: 645px; top: 19px; width: 300px; height: 50px; z-index:1; text-align: center; visibility:visible;">
+
<div id="studyHelper" class="drsElement" style="background: rgb(204, 221, 255) none repeat scroll 0%; position: absolute; left: 655px; top: 19px; width: 300px; height: 50px; z-index:1; text-align: center; visibility:visible;">
  <div class="drsMoveHandle">Study Helper (Firefox only)</div>
  <div class="drsMoveHandle">Study Helper (Firefox only)</div>
You can use this box to cover text that you don't want to see.  
You can use this box to cover text that you don't want to see.  

Current revision as of 11:10, 7 January 2008

<style type="text/css">
  /*
     Notes: 
      -You must log as admin to edit this page
      -Whatever you enter in this page will be added to the html in the header after the standard style sheet, so you can override styles. 
      -if you want your code to look nice on this page, put a space at the beginning of each line
      -This is the default style sheet that you can override : http://editthis.info/wiki/skins/monobook/main.css 
      
      For example uncomment this next section to turn all the text green:
  */
 /*
body {
   color: green;
}
 */ 
</style>
<script type="text/javascript">

/* DragResize v1.0 (c) 2005-2006 Angus Turnbull, TwinHelix Designs http://www.twinhelix.com

Licensed under the CC-GNU LGPL, version 2.1 or later: http://creativecommons.org/licenses/LGPL/2.1/ This is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  • /


var isIE=document.all; var winW = isIE ? document.body.offsetWidth-20 : window.innerWidth-16; var winH = isIE ? document.body.offsetHeight-20 : window.innerHeight-16;

if(typeof addEvent!='function'){var addEvent=function(o,t,f,l){var d='addEventListener',n='on'+t,rO=o,rT=t,rF=f,rL=l;if(o[d]&&!l)return o[d](t,f,false);if(!o._evts)o._evts={};if(!o._evts[t]){o._evts[t]=o[n]?{b:o[n]}:{};o[n]=new Function('e','var r=true,o=this,a=o._evts["'+t+'"],i;for(i in a){o._f=a[i];r=o._f(e||window.event)!=false&&r;o._f=null}return r');if(t!='unload')addEvent(window,'unload',function(){removeEvent(rO,rT,rF,rL)})}if(!f._i)f._i=addEvent._i++;o._evts[t][f._i]=f};addEvent._i=1;var removeEvent=function(o,t,f,l){var d='removeEventListener';if(o[d]&&!l)return o[d](t,f,false);if(o._evts&&o._evts[t]&&f._i)delete o._evts[t][f._i]}}function cancelEvent(e,c){e.returnValue=false;if(e.preventDefault)e.preventDefault();if(c){e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation()}};function DragResize(myName,config){var props={myName:myName,enabled:true,handles:['tl','tm','tr','ml','mr','bl','bm','br'],isElement:null,isHandle:null,element:null,handle:null,minWidth:10,minHeight:10,minLeft:0,maxLeft:9999,minTop:0,maxTop:9999,zIndex:5,mouseX:0,mouseY:0,lastMouseX:0,lastMouseY:0,mOffX:0,mOffY:0,elmX:0,elmY:0,elmW:0,elmH:0,allowBlur:true,ondragfocus:null,ondragstart:null,ondragmove:null,ondragend:null,ondragblur:null};for(var p in props)this[p]=(typeof config[p]=='undefined')?props[p]:config[p]};DragResize.prototype.apply=function(node){var obj=this;addEvent(node,'mousedown',function(e){obj.mouseDown(e)});addEvent(node,'mousemove',function(e){obj.mouseMove(e)});addEvent(node,'mouseup',function(e){obj.mouseUp(e)})};DragResize.prototype.select=function(newElement){with(this){if(!document.getElementById||!enabled)return;if(newElement&&(newElement!=element)&&enabled){element=newElement;element.style.zIndex=++zIndex;if(this.resizeHandleSet)this.resizeHandleSet(element,true);elmX=parseInt(element.style.left);elmY=parseInt(element.style.top);elmW=element.offsetWidth;elmH=element.offsetHeight;if(ondragfocus)this.ondragfocus()}}};DragResize.prototype.deselect=function(delHandles){with(this){if(!document.getElementById||!enabled)return;if(delHandles){if(ondragblur)this.ondragblur();if(this.resizeHandleSet)this.resizeHandleSet(element,false);element=null}handle=null;mOffX=0;mOffY=0}};DragResize.prototype.mouseDown=function(e){with(this){if(!document.getElementById||!enabled)return true;var elm=e.target||e.srcElement,newElement=null,newHandle=null,hRE=new RegExp(myName+'-([trmbl]{2})',);while(elm){if(elm.className){if(!newHandle&&(hRE.test(elm.className)||isHandle(elm)))newHandle=elm;if(isElement(elm)){newElement=elm;break}}elm=elm.parentNode}if(element&&(element!=newElement)&&allowBlur)deselect(true);if(newElement&&(!element||(newElement==element))){if(newHandle)cancelEvent(e);select(newElement,newHandle);handle=newHandle;if(handle&&ondragstart)this.ondragstart(hRE.test(handle.className))}}};DragResize.prototype.mouseMove=function(e){with(this){if(!document.getElementById||!enabled)return true;mouseX=e.pageX||e.clientX+document.documentElement.scrollLeft;mouseY=e.pageY||e.clientY+document.documentElement.scrollTop;var diffX=mouseX-lastMouseX+mOffX;var diffY=mouseY-lastMouseY+mOffY;mOffX=mOffY=0;lastMouseX=mouseX;lastMouseY=mouseY;if(!handle)return true;var isResize=false;if(this.resizeHandleDrag&&this.resizeHandleDrag(diffX,diffY)){isResize=true}else{var dX=diffX,dY=diffY;if(elmX+dX<minLeft)mOffX=(dX-(diffX=minLeft-elmX));else if(elmX+elmW+dX>maxLeft)mOffX=(dX-(diffX=maxLeft-elmX-elmW));if(elmY+dY<minTop)mOffY=(dY-(diffY=minTop-elmY));else if(elmY+elmH+dY>maxTop)mOffY=(dY-(diffY=maxTop-elmY-elmH));elmX+=diffX;elmY+=diffY}with(element.style){left=elmX+'px';width=elmW+'px';top=elmY+'px';height=elmH+'px'}if(window.opera&&document.documentElement){var oDF=document.getElementById('op-drag-fix');if(!oDF){var oDF=document.createElement('input');oDF.id='op-drag-fix';oDF.style.display='none';document.body.appendChild(oDF)}oDF.focus()}if(ondragmove)this.ondragmove(isResize);cancelEvent(e)}};DragResize.prototype.mouseUp=function(e){with(this){if(!document.getElementById||!enabled)return;var hRE=new RegExp(myName+'-([trmbl]{2})',);if(handle&&ondragend)this.ondragend(hRE.test(handle.className));deselect(false)}};DragResize.prototype.resizeHandleSet=function(elm,show){with(this){if(!elm._handle_tr){for(var h=0;h<handles.length;h++){var hDiv=document.createElement('div');hDiv.className=myName+' '+myName+'-'+handles[h];elm['_handle_'+handles[h]]=elm.appendChild(hDiv)}}for(var h=0;h<handles.length;h++){elm['_handle_'+handles[h]].style.visibility=show?'inherit':'hidden'}}};DragResize.prototype.resizeHandleDrag=function(diffX,diffY){with(this){var hClass=handle&&handle.className&&handle.className.match(new RegExp(myName+'-([tmblr]{2})'))?RegExp.$1:;var dY=diffY,dX=diffX,processed=false;if(hClass.indexOf('t')>=0){rs=1;if(elmH-dY<minHeight)mOffY=(dY-(diffY=elmH-minHeight));else if(elmY+dY<minTop)mOffY=(dY-(diffY=minTop-elmY));elmY+=diffY;elmH-=diffY;processed=true}if(hClass.indexOf('b')>=0){rs=1;if(elmH+dY<minHeight)mOffY=(dY-(diffY=minHeight-elmH));else if(elmY+elmH+dY>maxTop)mOffY=(dY-(diffY=maxTop-elmY-elmH));elmH+=diffY;processed=true}if(hClass.indexOf('l')>=0){rs=1;if(elmW-dX<minWidth)mOffX=(dX-(diffX=elmW-minWidth));else if(elmX+dX<minLeft)mOffX=(dX-(diffX=minLeft-elmX));elmX+=diffX;elmW-=diffX;processed=true}if(hClass.indexOf('r')>=0){rs=1;if(elmW+dX<minWidth)mOffX=(dX-(diffX=minWidth-elmW));else if(elmX+elmW+dX>maxLeft)mOffX=(dX-(diffX=maxLeft-elmX-elmW));elmW+=diffX;processed=true}return processed}};function setIt(){};

function hideMe(){ document.all.studyHelper.style.visibility=hidden; document.getElementById('studyHelper').style.visibility=hidden; //document.getElementById('studyHelper').style.left=645; //document.getElementById('studyHelper').style.zindex=document.getElementById('studyHelper').style.zindex-5; //document.getElementById('studyHelper').style.top=19px; //whichDog=isIE ? document.all.studyHelper : document.getElementById("studyHelper"); //whichDog.style.left = winW-400; //whichDog.style.top = winH-50; } </script>

<style type="text/css">

/* Required CSS classes: must be included in all pages using this script */

/* Apply the element you want to drag/resize */ .drsElement {

position: absolute;
border: 1px solid #333;

}

/*

The main mouse handle that moves the whole element.
You can apply to the same tag as drsElement if you want.
  • /

.drsMoveHandle {

height: 15px;
background-color: #CCC;
border-bottom: 1px solid #666;
cursor: move;

}

/*

The DragResize object name is automatically applied to all generated
corner resize handles, as well as one of the individual classes below.
  • /

.dragresize {

position: absolute;
width: 5px;
height: 5px;
font-size: 1px;
background: #EEE;
border: 1px solid #333;

}

/*

Individual corner classes - required for resize support.
These are based on the object name plus the handle ID.
  • /

.dragresize-tl {

top: -8px;
left: -8px;
cursor: nw-resize;

} .dragresize-tm {

top: -8px;
left: 50%;
margin-left: -4px;
cursor: n-resize;

} .dragresize-tr {

top: -8px;
right: -8px;
cursor: ne-resize;

}

.dragresize-ml {

top: 50%;
margin-top: -4px;
left: -8px;
cursor: w-resize;

} .dragresize-mr {

top: 50%;
margin-top: -4px;
right: -8px;
cursor: e-resize;

}

.dragresize-bl {

bottom: -8px;
left: -8px;
cursor: sw-resize;

} .dragresize-bm {

bottom: -8px;
left: 50%;
margin-left: -4px;
cursor: s-resize;

} .dragresize-br {

bottom: -8px;
right: -8px;
cursor: se-resize;

}

  1. content { z-index:4; }

</style>

<script type="text/javascript"> //<![CDATA[


var dragresize = new DragResize('dragresize',

{ minWidth: 300, minHeight: 50});

dragresize.isElement = function(elm) {

if (elm.className && elm.className.indexOf('drsElement') > -1) return true;

}; dragresize.isHandle = function(elm) {

if (elm.className && elm.className.indexOf('drsMoveHandle') > -1) return true;

};

dragresize.ondragfocus = function() { }; dragresize.ondragstart = function(isResize) { }; dragresize.ondragmove = function(isResize) { }; dragresize.ondragend = function(isResize) { }; dragresize.ondragblur = function() { };

// Finally, you must apply() your DragResize object to a DOM node; all children of this // node will then be made draggable. Here, I'm applying to the entire document. dragresize.apply(document);

//]]>


</script><meta name="verify-v1" content="ePVH76/bzS4qy88EbdN1d6X90nnx/s43ZB5BZ7JkyhI=" /><meta name="verify-v1" content="ePVH76/bzS4qy88EbdN1d6X90nnx/s43ZB5BZ7JkyhI=" /></head>

<body>

Study Helper (Firefox only)

You can use this box to cover text that you don't want to see.
Resize or move me as much as you want! Or <a href="javascript:window.location.reload();">Hide Me</a>

</body>

Personal tools