[Vtigercrm-commits] [vtiger-commits] r4042 - in /vtigercrm/trunk: Smarty/templates/SettingsMenu.tpl include/js/menu.js themes/blue/style.css
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Fri Mar 3 01:17:59 EST 2006
Author: saraj
Date: Thu Mar 2 23:17:51 2006
New Revision: 4042
Log:
slide menu integrated for settings
Modified:
vtigercrm/trunk/Smarty/templates/SettingsMenu.tpl
vtigercrm/trunk/include/js/menu.js
vtigercrm/trunk/themes/blue/style.css
Modified: vtigercrm/trunk/Smarty/templates/SettingsMenu.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/SettingsMenu.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/SettingsMenu.tpl Thu Mar 2 23:17:51 2006
@@ -3,12 +3,12 @@
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
-<td width="24%" class="lftMnuTab" valign="top" id="slideMnu" >
+<td width="24%" valign="top" id="slideMnu" >
<div id="one">
<table cellspacing="0" cellpadding="0" class="lftMnuHdr" >
<tr>
<td>
-<table class="lftMnuHdr" cellpadding="0" cellspacing="0" onclick="just();">
+<table class="lftMnuHdr" cellpadding="0" cellspacing="0" onclick="fnWipe('top','user');">
<tr><td width="95%"><a href="#" class="lftMnuHdr">{$MOD.LBL_USER_MANAGEMENT}</a></td>
<td width="5%"><a href="#" class="lftMnuHdr"><img src="{$IMAGE_PATH}/downArrow.gif" border="0" /></a></td>
@@ -26,7 +26,7 @@
<a href="index.php?module=Users&action=Announcements&parenttab=Settings" class="lftSubMnu" class="lftSubMnu">{$MOD.LBL_ANNOUNCEMENT}</a>
</div></div>
-<table class="lftMnuHdr" cellpadding="0" cellspacing="0" onclick="just1();">
+<table class="lftMnuHdr" cellpadding="0" cellspacing="0" onclick="fnWipe('top2','studio');">
<tr><td width="95%"><a href="#" class="lftMnuHdr" >{$MOD.LBL_STUDIO}</a></td>
<td width="5%"><a href="#" class="lftMnuHdr"><img src="{$IMAGE_PATH}downArrow.gif" border="0" /></a></td>
</tr></table>
@@ -36,7 +36,7 @@
<a href="index.php?module=Settings&action=SettingsSubMenu&type=PickList&parenttab=Settings" class="lftSubMnu" onmouseover="fnvsh(this,'subMnuPickList')" onmouseout="fninvsh('subMnuPickList')">{$MOD.LBL_PICKLIST_SETTINGS}</a>
<a href="index.php?module=Settings&action=SettingsSubMenu&type=FieldOrder&parenttab=Settings" class="lftSubMnu" onmouseover="fnvsh(this,'subMnuEditFld')" onmouseout="fninvsh('subMnuEditFld')">{$MOD.LBL_FIELD_ORDERING}</a>
</div></div>
-<table class="lftMnuHdr" cellpadding="0" cellspacing="0" onclick="just2()">
+<table class="lftMnuHdr" cellpadding="0" cellspacing="0" onclick="fnWipe('top3','comm')" >
<tr><td width="95%"><a href="#" class="lftMnuHdr" >{$MOD.LBL_COMMUNICATION_TEMPLATES}</a></td>
<td width="5%"><a href="#" class="lftMnuHdr"><img src="{$IMAGE_PATH}downArrow.gif" border="0" /></a></td>
</tr></table>
@@ -50,7 +50,7 @@
</div>
</div>
-<table class="lftMnuHdr" cellpadding="0" cellspacing="0" onclick="just3()">
+<table class="lftMnuHdr" cellpadding="0" cellspacing="0" onclick="fnWipe('top4','config')">
<tr><td width="95%"><a href="#" class="lftMnuHdr" >{$MOD.LBL_CONFIGURATION}</a></td>
<td width="5%"><a href="#" class="lftMnuHdr"><img src="{$IMAGE_PATH}downArrow.gif" border="0" /></a></td>
</tr></table>
@@ -70,14 +70,4 @@
</table>
</div>
</td>
-<td width="1%" class="dock"><img src="{$IMAGE_PATH}/rhtArrow.gif" class="imgDoc" onclick="fnDown('slideMnu')" /></td>
-<script>
-ScrollEffect.limit = 191;
-ScrollEffect.closelimit= 190;
-ScrollEffect1.limit1 = 81;
-ScrollEffect1.closelimit1= 80;
-ScrollEffect2.limit2 = 121;
-ScrollEffect2.closelimit2= 120;
-ScrollEffect3.limit3 = 161;
-ScrollEffect3.closelimit3= 160;
-</script>
+<td width="1%" class="dock"><img src="{$IMAGE_PATH}/rhtArrow.gif" class="imgDoc" alt="Expand/Close Menu" title="Expand/Close Menu" onclick="fnSlide('slideMnu','one')" /></td>
Modified: vtigercrm/trunk/include/js/menu.js
==============================================================================
--- vtigercrm/trunk/include/js/menu.js (original)
+++ vtigercrm/trunk/include/js/menu.js Thu Mar 2 23:17:51 2006
@@ -1,175 +1,89 @@
// JavaScript Document
//Layer Function
+/* NEW SCRIPT FOR MENU SLIDE */
-if (document.all) var browser_ie=true
-else if (document.layers) var browser_nn4=true
-else if (document.layers || (!document.all && document.getElementById)) var browser_nn6=true
+var menu_i;
+var menu_max;
+var closeLimit;
+var openLimit = 0;
-function getObj(n,d) {
- var p,i,x;
- if(!d)d=document;
- if((p=n.indexOf("?"))>0&&parent.frames.length) {d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
- if(!(x=d[n])&&d.all)x=d.all[n];
- for(i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
- for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=getObj(n,d.layers[i].document);
- if(!x && d.getElementById) x=d.getElementById(n);
- return x;
-}
-
-
-function findPosX(obj) {
- var curleft = 0;
- if (document.getElementById || document.all) {
- while (obj.offsetParent) { curleft += obj.offsetLeft; obj = obj.offsetParent;}
- }
- else if (document.layers) { curleft += obj.x; }
- return curleft;
+function fnSlide(obj,inner)
+{
+ var buff = document.getElementById(obj).width;
+ closeLimit = buff.substring(0,buff.length-1);
+ menu_max = eval(closeLimit);
+ var tagName = document.getElementById(inner);
+ document.getElementById(obj).style.width=0 + "%"; menu_i=0;
+ if (tagName.style.display == 'none')
+ fnexpanLay(obj,inner);
+ else
+ fncloseLay(obj,inner);
}
-
-function findPosY(obj) {
- var curtop = 0;
- if (document.getElementById || document.all) {
- while (obj.offsetParent) { curtop += obj.offsetTop; obj = obj.offsetParent; }
+function fnexpanLay(obj,inner)
+{
+ var setText = eval(closeLimit) - 1;
+ if (menu_i<=eval(closeLimit))
+ {
+ if (menu_i>setText){document.getElementById(inner).style.display='block';}
+ document.getElementById(obj).style.width=menu_i+"%";
+ setTimeout(function() { fnexpanLay(obj,inner); },5);
+ menu_i=menu_i+1;
}
- else if (document.layers) {curtop += obj.y;}
- return curtop;
}
-function openPopUp(winInst,currObj,baseURL,winName,width,height,features) {
- var left=parseInt(findPosX(currObj))
- var top=parseInt(findPosY(currObj))
-
- if (window.navigator.appName!="Opera") top+=parseInt(currObj.offsetHeight)
- else top+=(parseInt(currObj.offsetHeight)*2)+10
- if (browser_ie) {
- top+=window.screenTop-document.body.scrollTop
- left-=document.body.scrollLeft
- if (top+height+30>window.screen.height)
- top=findPosY(currObj)+window.screenTop-height-30
- if (left+width>window.screen.width)
- left=findPosX(currObj)+window.screenLeft-width
- } else if (browser_nn4 || browser_nn6) {
- top+=(scrY-pgeY)
- left+=(scrX-pgeX)
- if (top+height+30>window.screen.height)
- top=findPosY(currObj)+(scrY-pgeY)-height-30
- if (left+width>window.screen.width)
- left=findPosX(currObj)+(scrX-pgeX)-width
+function fncloseLay(obj,inner)
+{
+ if (menu_max >= eval(openLimit))
+ {
+ if (menu_max<eval(closeLimit)){document.getElementById(inner).style.display='none';}
+ document.getElementById(obj).style.width=menu_max +"%";
+ setTimeout(function() { fncloseLay(obj,inner); }, 5);
+ menu_max = menu_max -1;
}
-
- features="width="+width+",height="+height+",top="+top+",left="+left+";"+features
- eval(winInst+'=window.open("'+baseURL+'","'+winName+'","'+features+'")')
}
-var scrX=0,scrY=0,pgeX=0,pgeY=0;
+/* NEW SCRIPT FOR MENU WIPE */
-if (browser_nn4 || browser_nn6) {
- document.addEventListener("click",popUpListener,true)
+var wipe_i;
+var wipe_max;
+var closeLimit;
+var openLimit = 0;
+
+function fnWipe(obj,inner)
+{
+ var buff = document.getElementById(inner).style.height;
+ closeLimit = buff.substring(0,buff.length-2);
+ wipe_max = eval(closeLimit);
+ var tagName = document.getElementById(inner);
+ document.getElementById(obj).style.height=0 + "px"; wipe_i=0;
+ if (tagName.style.display == 'none')
+ fnWipeLay(obj,inner);
+ else
+ fnUnWipeLay(obj,inner);
}
-function popUpListener(ev) {
- if (browser_nn4 || browser_nn6) {
- scrX=ev.screenX
- scrY=ev.screenY
- pgeX=ev.pageX
- pgeY=ev.pageY
+function fnWipeLay(obj,inner)
+{
+ var setText = eval(closeLimit) - 1;
+ if (wipe_i<=eval(closeLimit))
+ {
+ if (wipe_i>setText){document.getElementById(inner).style.display='block';}
+ document.getElementById(obj).style.height=wipe_i+"px";
+ setTimeout(function() { fnWipeLay(obj,inner); },5);
+ wipe_i = wipe_i + 5;
+ }
+}
+
+function fnUnWipeLay(obj,inner)
+{
+ if (wipe_max >= eval(openLimit))
+ {
+ if (wipe_max<eval(closeLimit)){document.getElementById(inner).style.display='none';}
+ document.getElementById(obj).style.height = wipe_max + "px";
+ setTimeout(function() { fnUnWipeLay(obj,inner); }, 5);
+ wipe_max = wipe_max - 5;
}
}
-ScrollEffect = function(){ };
-ScrollEffect.lengthcount=0;
-ScrollEffect.closelimit=0;
-ScrollEffect.limit=0;
-
-ScrollEffect1 = function(){ };
-ScrollEffect1.lengthcount=0;
-ScrollEffect1.closelimit=0;
-ScrollEffect1.limit=0;
-
-ScrollEffect2 = function(){ };
-ScrollEffect2.lengthcount=0;
-ScrollEffect2.closelimit=0;
-ScrollEffect2.limit=0;
-
-ScrollEffect3 = function(){ };
-ScrollEffect3.lengthcount=0;
-ScrollEffect3.closelimit=0;
-ScrollEffect3.limit=0;
-
-function just(){
- ig=getObj("top");
- if(ScrollEffect.lengthcount > ScrollEffect.closelimit ){closet();return;}
- ig.style.display="block";
- ig.style.height=ScrollEffect.lengthcount+'px';
- ScrollEffect.lengthcount=ScrollEffect.lengthcount+10;
- if(ScrollEffect.lengthcount < ScrollEffect.limit){setTimeout("just()",25);}
- else{ getObj("user").style.display="block";return;}
-}
-
-function closet(){
- ig=getObj("top");
- getObj("user").style.display="none";
- ScrollEffect.lengthcount=ScrollEffect.lengthcount-10;
- ig.style.height=ScrollEffect.lengthcount+'px';
- if(ScrollEffect.lengthcount<20){ig.style.display="none";return;}
- else{setTimeout("closet()", 25);}
-}
-
-function just1(){
- ig=getObj("top2");
- if(ScrollEffect1.lengthcount > ScrollEffect1.closelimit1 ){closet1();return;}
- ig.style.display="block";
- ig.style.height=ScrollEffect1.lengthcount+'px';
- ScrollEffect1.lengthcount=ScrollEffect1.lengthcount+10;
- if(ScrollEffect1.lengthcount < ScrollEffect1.limit1){setTimeout("just1()",25);}
- else{ getObj("studio").style.display="block";return;}
-}
-
-function closet1(){
- ig=getObj("top2");
- getObj("studio").style.display="none";
- ScrollEffect1.lengthcount=ScrollEffect1.lengthcount-10;
- ig.style.height=ScrollEffect1.lengthcount+'px';
- if(ScrollEffect1.lengthcount<20){ig.style.display="none";return;}
- else{setTimeout("closet1()", 25);}
-}
-
-function just2(){
- ig=getObj("top3");
- if(ScrollEffect2.lengthcount > ScrollEffect2.closelimit2 ){closet2();return;}
- ig.style.display="block";
- ig.style.height=ScrollEffect2.lengthcount+'px';
- ScrollEffect2.lengthcount=ScrollEffect2.lengthcount+10;
- if(ScrollEffect2.lengthcount < ScrollEffect2.limit2){setTimeout("just2()",25);}
- else{ getObj("comm").style.display="block";return;}
-}
-
-function closet2(){
- ig=getObj("top3");
- getObj("comm").style.display="none";
- ScrollEffect2.lengthcount=ScrollEffect2.lengthcount-10;
- ig.style.height=ScrollEffect2.lengthcount+'px';
- if(ScrollEffect2.lengthcount<20){ig.style.display="none";return;}
- else{setTimeout("closet2()", 25);}
-}
-
-function just3(){
- ig=getObj("top4");
- if(ScrollEffect3.lengthcount > ScrollEffect3.closelimit3 ){closet3();return;}
- ig.style.display="block";
- ig.style.height=ScrollEffect3.lengthcount+'px';
- ScrollEffect3.lengthcount=ScrollEffect3.lengthcount+10;
- if(ScrollEffect3.lengthcount < ScrollEffect3.limit3){setTimeout("just3()",25);}
- else{ getObj("config").style.display="block";return;}
-}
-
-function closet3(){
- ig=getObj("top4");
- getObj("config").style.display="none";
- ScrollEffect3.lengthcount=ScrollEffect3.lengthcount-10;
- ig.style.height=ScrollEffect3.lengthcount+'px';
- if(ScrollEffect3.lengthcount<20){ig.style.display="none";return;}
- else{setTimeout("closet3()", 25);}
-}
Modified: vtigercrm/trunk/themes/blue/style.css
==============================================================================
--- vtigercrm/trunk/themes/blue/style.css (original)
+++ vtigercrm/trunk/themes/blue/style.css Thu Mar 2 23:17:51 2006
@@ -723,10 +723,10 @@
}
-#user{position:relative;left:0px;top:0px;width:100%;display:none;}
-#studio{position:relative;left:0px;top:0px;width:100%;display:none;}
-#comm{position:relative;left:0px;top:0px;width:100%;display:none;}
-#config{position:relative;left:0px;top:0px;width:100%;display:none;}
+#user{position:relative;left:0px;top:0px;width:100%;display:block;}
+#studio{position:relative;left:0px;top:0px;width:100%;display:block;}
+#comm{position:relative;left:0px;top:0px;width:100%;display:block;}
+#config{position:relative;left:0px;top:0px;width:100%;display:block;}
#userTab{position:relative;left:0px;top:0px;width:100%;display:none;}
#studioTab{position:relative;left:0px;top:0px;width:100%;display:none;}
@@ -842,6 +842,11 @@
border:0px;
}
+#slideMnu{
+ background-color:#BBBBBB;
+ vertical-align:top;
+}
+
#one{
position:relative;
display:block;
More information about the vtigercrm-commits
mailing list