Most base libraries now loaded from googleapis. Changes to the way LiveGridForms...
[infodrom/rico3] / ricoClient / js / ricoUI.js
index 50416a8..83c5691 100644 (file)
@@ -133,6 +133,7 @@ Rico.Popup.prototype = {
     }
     this.content=this.contentCell.appendChild(document.createElement('div'));
     this.content.className='RicoPopupContent';
+    this.content.style.position='relative';
 
     while (this.container.firstChild) {
       this.content.appendChild(this.container.firstChild);
@@ -252,7 +253,7 @@ Rico.Popup.prototype = {
     var msgHeight=this.container.offsetHeight;
     var divwi=this.container.parentNode.offsetWidth;
     var divht=this.container.parentNode.offsetHeight;
-    this.move(parseInt((divwi-msgWidth)/2,10), parseInt((divht-msgHeight)/2,10));
+    this.move(parseInt(Math.max((divwi-msgWidth)/2,0),10), parseInt(Math.max((divht-msgHeight)/2,0),10));
   },
   
   visible: function() {