[ Index ]
 

Code source de eGroupWare 1.2.106-2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/phpgwapi/js/htmlarea/plugins/UploadImage/popups/ -> popup.js (source)

   1  function __dlg_onclose() {
   2      if (!document.all) {
   3          opener.Dialog._return(null);
   4      }
   5  };
   6  
   7  function __dlg_init() 
   8  {
   9  
  10      if (!document.all) {
  11          // init dialogArguments, as IE gets it
  12          window.dialogArguments = opener.Dialog._arguments;
  13          window.sizeToContent();
  14          window.sizeToContent();    
  15          // for reasons beyond understanding,
  16                      // only if we call it twice we get the
  17                      // correct size.
  18          window.addEventListener("unload", __dlg_onclose, true);
  19          /*
  20          // center on parent
  21          var px1 = opener.screenX;
  22          var px2 = opener.screenX + opener.outerWidth;
  23          var py1 = opener.screenY;
  24          var py2 = opener.screenY + opener.outerHeight;
  25          var x = (px2 - px1 - window.outerWidth) / 2;
  26          var y = (py2 - py1 - window.outerHeight) / 2; */
  27  
  28          //centre on screen instead
  29  
  30          var x = (screen.width - window.outerWidth) / 2;
  31          var y = (screen.height - window.outerHeight) / 2;
  32  
  33          window.moveTo(x, y);
  34          var body = document.body;
  35          window.innerHeight = body.offsetHeight;
  36          window.innerWidth = body.offsetWidth;
  37      } else {
  38          //var body = document.body;
  39          window.resizeBy(500, 350)
  40          //window.dialogHeight = body.offsetHeight + 50 + "px";
  41          //window.dialogWidth = body.offsetWidth + "px";
  42      }
  43  };
  44  
  45  // closes the dialog and passes the return info upper.
  46  function __dlg_close(val) {
  47      if (document.all) 
  48      {    // IE
  49          //alert(val);
  50          opener.Dialog._return(val);
  51          //window.returnValue = val;
  52      } else {
  53          opener.Dialog._return(val);
  54      }
  55      window.close();
  56  };


Généré le : Sun Feb 25 17:20:01 2007 par Balluche grâce à PHPXref 0.7