[Vtigercrm-commits] [vtiger-commits] r6706 - /vtigercrm/trunk/include/js/general.js
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon May 29 15:41:27 EDT 2006
Author: richie
Date: Mon May 29 13:41:23 2006
New Revision: 6706
Log:
new function posLay added to position a layer
Modified:
vtigercrm/trunk/include/js/general.js
Modified: vtigercrm/trunk/include/js/general.js
==============================================================================
--- vtigercrm/trunk/include/js/general.js (original)
+++ vtigercrm/trunk/include/js/general.js Mon May 29 13:41:23 2006
@@ -1371,6 +1371,22 @@
tagName.style.visibility = "visible";
}
+function posLay(obj,Lay){
+ var tagName = document.getElementById(Lay);
+ var leftSide = findPosX(obj);
+ var topSide = findPosY(obj);
+ var maxW = tagName.style.width;
+ var widthM = maxW.substring(0,maxW.length-2);
+ var getVal = eval(leftSide) + eval(widthM);
+ if(getVal > window.innerWidth ){
+ leftSide = eval(leftSide) - eval(widthM);
+ tagName.style.left = leftSide + 'px';
+ }
+ else
+ tagName.style.left= leftSide + 'px';
+ tagName.style.top= topSide + 'px';
+}
+
function fninvsh(Lay){
var tagName = document.getElementById(Lay);
tagName.style.visibility = 'hidden';
More information about the vtigercrm-commits
mailing list