[Vtigercrm-commits] [vtiger development] #6372: Picklist Editor Add Fails when its BIG

vtiger development vtiger-tickets at trac.vtiger.com
Tue Oct 27 10:00:19 EDT 2009


#6372: Picklist Editor Add Fails when its BIG
------------------------+---------------------------------------------------
  Reporter:  prasad     |       Owner:  developer
      Type:  defect     |      Status:  new      
  Priority:  major      |   Milestone:  5.2.0    
 Component:  vtigercrm  |     Version:  5.1.0    
Resolution:             |    Keywords:           
------------------------+---------------------------------------------------
Comment (by prasad):

 placeAtCenter - javascript function seems to be calculating the top value
 wrong in such case. I have attached a work-round to retain the form within
 window with the following:

 {{{
 function placeAtCenter(node){
         var centerPixel = getViewPortCenter();
         node.style.position = "absolute";
         var point = getDimension(node);

         // CHANGE STARTS --------------------------
         // Ensure we don't go negative
         var topvalue = (centerPixel.y - point.y/2);
         var rightvalue = (centerPixel.x - point.x/2);
         if(topvalue < 0) topvalue = 0;
         if(rightvalue < 0) rightvalue = 0;

         node.style.top = topvalue +"px";
         node.style.right = rightvalue + "px";
         // CHANGE ENDS ----------------------------
 }
 }}}

-- 
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/6372#comment:1>
vtiger development <http://trac.vtiger.com/>
vtigerCRM




More information about the vtigercrm-commits mailing list