Changeset 740 for trunk


Ignore:
Timestamp:
02/15/07 21:04:51 (13 years ago)
Author:
ray
Message:

Ticket #603 Popop Dialog Height

Location:
trunk
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/InsertImage/insert_image.html

    r734 r740  
    1 <html> 
    2  
    3 <head> 
     1<!DOCTYPE html 
     2     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
     3    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
     4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
    45  <title>Insert Image</title> 
    56 
     
    910<script type="text/javascript"> 
    1011 
    11 window.resizeTo(400, 100); 
    1212 
    1313Xinha = window.opener.Xinha; 
     
    1818function Init() { 
    1919  __dlg_translate('Xinha'); 
    20   __dlg_init(); 
     20  __dlg_init(null,{width:410,height:400}); 
    2121  // Make sure the translated string appears in the drop down. (for gecko) 
    2222  document.getElementById("f_align").selectedIndex = 1; 
     
    110110</table> 
    111111 
    112 <p /> 
     112<br /> 
    113113 
    114114<fieldset style="float: left; margin-left: 5px;"> 
     
    132132</select> 
    133133 
    134 <p /> 
     134<br /> 
    135135 
    136136<div class="fl">Border thickness:</div> 
     
    142142</fieldset> 
    143143 
    144 <fieldset style="float:right; margin-right: 5px;"> 
     144<fieldset> 
    145145<legend>Spacing</legend> 
    146146 
     
    151151title="Horizontal padding" /> 
    152152 
    153 <p /> 
     153<br /> 
    154154 
    155155<div class="fr">Vertical:</div> 
     
    160160 
    161161</fieldset> 
    162 <br clear="all" /> 
    163 <table width="100%" style="margin-bottom: 0.2em"> 
    164  <tr> 
    165   <td valign="bottom"> 
    166     <div class="fr">Image Preview:</div> 
     162<br style="clear:all"/> 
     163<div> 
     164Image Preview:<br /> 
    167165    <iframe name="ipreview" id="ipreview" frameborder="0" style="border : 1px solid gray;"  
    168         height="200" width="300" src="../../popups/blank.html"></iframe> 
    169   </td> 
    170   <td valign="bottom" style="text-align: right"> 
    171     <button type="button" name="ok" onclick="return onOK();">OK</button><br> 
    172     <button type="button" name="cancel" onclick="return onCancel();">Cancel</button> 
    173   </td> 
    174  </tr> 
    175 </table> 
     166        height="200" width="100%" src="../../popups/blank.html"></iframe> 
     167</div> 
     168<div id="buttons"> 
     169<button type="button" name="ok" onclick="return onOK();">OK</button> 
     170<button type="button" name="cancel" onclick="return onCancel();">Cancel</button> 
     171</div> 
    176172</form> 
    177173</body> 
  • trunk/plugins/Abbreviation/popups/abbreviation.html

    r677 r740  
    6565<body class="dialog" onload="Init()"> 
    6666<div class="title">Abbreviation</div> 
    67 <form name="form"> 
     67<form name="form" action=""> 
    6868<table border="0" style="width: 100%;"> 
    6969  <tr> 
  • trunk/plugins/BackgroundImage/popups/bgimage.html

    r677 r740  
    66<script type="text/javascript" src="../../../popups/popup.js"></script> 
    77<script language='JavaScript' type='text/javascript'> 
    8    
     8window.resizeTo(350, 195); 
    99function Init() { 
     10         
    1011  __dlg_translate("BackgroundImage"); 
    1112  __dlg_init(); 
    12   window.resizeTo(300, 195); 
     13 
    1314} 
    1415 
  • trunk/plugins/CharacterMap/popups/select_character.html

    r419 r740  
    77<link rel="stylesheet" type="text/css" href="../../../popups/popup.css" /> 
    88<script type="text/javascript"> 
     9  window.resizeTo(480, 300); 
    910// HTMLSource based on HTMLArea XTD 1.5 modified by Holger Hees 
    1011// Original Author - Bernhard Pfeifer novocaine@gmx.net 
     
    1415  __dlg_translate('CharacterMap'); 
    1516  __dlg_init(); 
    16   window.resizeTo(480, 300); 
     17 
    1718  var character = ''; // set default input to empty 
    1819  View( null, character ); 
  • trunk/plugins/EditTag/popups/edit_tag.html

    r677 r740  
    66  <script type="text/javascript" src="../../../popups/popup.js"></script> 
    77<script language="javascript"> 
    8  
     8  window.resizeTo(600, 450); 
    99function Init() { 
    1010  __dlg_translate("EditTag"); 
    1111  __dlg_init(); 
    12   window.resizeTo(600, 450); 
     12 
    1313  var param = window.dialogArguments; 
    1414  document.getElementById("TAG").value = param["content"]; 
  • trunk/plugins/ExtendedFileManager/assets/manager.js

    r710 r740  
    5050if (manager_mode == "link") 
    5151{ 
    52     var offsetForInputs = (Xinha.is_ie) ? 155 : 140; 
     52    var offsetForInputs = (Xinha.is_ie) ? 165 : 150; 
    5353} 
    5454else 
    5555{ 
    56     var offsetForInputs = (Xinha.is_ie) ? 220 : 200; 
     56    var offsetForInputs = (Xinha.is_ie) ? 230 : 210; 
    5757}     
    5858init = function () 
     
    543543{ 
    544544        var win = Xinha.viewportSize(window); 
    545         document.getElementById('imgManager').style.height = parseInt( win.y - 150 - offsetForInputs, 10 ) + 'px'; 
     545        document.getElementById('imgManager').style.height = parseInt( win.y - 130 - offsetForInputs, 10 ) + 'px'; 
    546546         
    547547        return true; 
    548548} 
     549addEvent(window, 'resize', resize); 
    549550addEvent(window, 'load', init); 
    550 addEvent(window, 'resize', resize); 
  • trunk/plugins/ExtendedFileManager/manager.php

    r705 r740  
    7878  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    7979 <link href="<?php print $IMConfig['base_url'];?>assets/manager.css" rel="stylesheet" type="text/css" /> 
     80 <link href="../../popups/popup.css" rel="stylesheet" type="text/css" /> 
    8081<script type="text/javascript" src="../../popups/popup.js"></script> 
    8182<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/popup.js"></script> 
  • trunk/plugins/FindReplace/popups/find_replace.html

    r677 r740  
    103103  </head> 
    104104  <body class="dialog" onload="Init()"> 
    105 <form action="" method="get"> 
    106   <div class="title" style="width: 310px">Find and Replace</div> 
     105  <div class="title">Find and Replace</div> 
     106  <form action="" method="get"> 
    107107  <table border="0" style="width: 100%; padding: 2px;"><!----> 
    108108    <tbody> 
  • trunk/plugins/InsertAnchor/popups/insert_anchor.html

    r677 r740  
    55  <script type="text/javascript" src="../../../popups/popup.js"></script> 
    66  <script type="text/javascript"> 
    7  
     7  window.resizeTo(400, 150); 
    88function Init() { 
    99  __dlg_translate("InsertAnchor"); 
    1010  __dlg_init(); 
    11   window.resizeTo(400, 150); 
     11 
    1212  var param = window.dialogArguments; 
    1313  if (param) { 
  • trunk/plugins/InsertPicture/InsertPicture.php

    r686 r740  
    5353 
    5454<script type="text/javascript"> 
    55  
     55  window.resizeTo(500, 490); 
    5656var Xinha = window.opener.Xinha; 
    5757function i18n(str) { 
     
    6262  __dlg_translate("InsertPicture"); 
    6363  __dlg_init(); 
    64   window.resizeTo(500, 490); 
     64 
    6565  // Make sure the translated string appears in the drop down. (for gecko) 
    6666  document.getElementById("f_align").selectedIndex = 0; 
  • trunk/plugins/InsertSmiley/popups/insertsmiley.html

    r677 r740  
    55<script type="text/javascript" src="../../../popups/popup.js"></script> 
    66<script type="text/javascript"> 
    7  
     7  window.resizeTo(400, 300); 
    88var InsertSmiley = window.opener.InsertSmiley; 
    99var editor = null; 
     
    1616  param = window.dialogArguments; 
    1717  editor = param['editor']; 
    18   window.resizeTo(400, 300); 
     18 
    1919  var tbody = document.getElementById("smileytable"); 
    2020  var inum; 
  • trunk/plugins/QuickTag/popups/quicktag.html

    r677 r740  
    2020  editor = param['editor']; 
    2121  var selectext = param['selectedText']; // sem uso... 
    22  
    23   if(!document.all) window.resizeTo(400, 180); // i don't undertand why... 
    2422 
    2523  createDropdown("tags"); 
  • trunk/plugins/SetId/popups/set_id.html

    r677 r740  
    55  <script type="text/javascript" src="../../../popups/popup.js"></script> 
    66  <script type="text/javascript"> 
    7  
     7window.resizeTo(350, 100); 
    88function Init() { 
    99  __dlg_translate("SetId"); 
  • trunk/plugins/SmartReplace/popups/dialog.html

    r681 r740  
    4646<body class="dialog" onload="Init()"> 
    4747<div class="title">SmartReplace Settings</div> 
    48 <form> 
     48<form action=""> 
    4949<table style="width: 100%;border:none"> 
    5050  <tr> 
  • trunk/popups/editor_help.html

    r649 r740  
    66 
    77<script type="text/javascript"> 
     8  window.resizeTo(400, 480); 
    89Xinha = window.opener.Xinha; 
    910function Init() { 
    1011  __dlg_translate('Xinha'); 
    1112  __dlg_init(); 
    12   window.resizeTo(400, 480); 
     13 
    1314} 
    1415 
  • trunk/popups/popup.css

    r700 r740  
    3333} 
    3434#buttons { 
    35       margin-top: 1em; border-top: 1px solid #999; 
    36       padding: 2px; text-align: right; 
     35      margin-top: 1em;  
     36      border-top: 1px solid #999; 
     37      padding: 1em;  
     38      text-align: right; 
    3739} 
  • trunk/popups/popup.js

    r721 r740  
    3737        opener.Dialog._return(null); 
    3838} 
     39// ray: I mark this on deprecated, because bottom is never used 
     40function __dlg_init( bottom, win_dim ) { 
     41  __xinha_dlg_init(win_dim); 
     42} 
    3943 
    40 function __dlg_init(bottom, win_dim) { 
     44function __xinha_dlg_init( win_dim ) { 
    4145  if(window.__dlg_init_done) return true; 
    4246   
     
    5155        window.dialogArguments = opener.Dialog._arguments; 
    5256 
    53   var body        = document.body; 
    54    
    55   if(win_dim) 
     57  var body = document.body; 
     58  if ( !win_dim ) 
    5659  { 
    57     window.resizeTo(win_dim.width, win_dim.height); 
    58     if(win_dim.top && win_dim.left) 
     60   var dim = Xinha.viewportSize(window); 
     61    win_dim = {width:dim.x, height: body.scrollHeight}; 
     62  } 
     63  window.resizeTo(win_dim.width, win_dim.height); 
     64 
     65  var dim = Xinha.viewportSize(window); 
     66  window.resizeBy(0, body.scrollHeight - dim.y); 
     67 
     68  if(win_dim.top && win_dim.left) 
     69  { 
     70    window.moveTo(win_dim.left,win_dim.top); 
     71  } 
     72  else 
     73  { 
     74    if (!Xinha.is_ie) 
    5975    { 
    60       window.moveTo(win_dim.left,win_dim.top); 
     76      var x = opener.screenX + (opener.outerWidth - win_dim.width) / 2; 
     77      var y = opener.screenY + (opener.outerHeight - win_dim.height) / 2; 
    6178    } 
    6279    else 
    63     { 
    64       if (!Xinha.is_ie) 
    65       { 
    66         var x = opener.screenX + (opener.outerWidth - win_dim.width) / 2; 
    67         var y = opener.screenY + (opener.outerHeight - win_dim.height) / 2; 
    68       } 
    69       else 
    70       {//IE does not have window.outer... , so center it on the screen at least 
    71         var x =  (self.screen.availWidth - win_dim.width) / 2; 
    72         var y =  (self.screen.availHeight - win_dim.height) / 2;         
    73       } 
    74       window.moveTo(x,y); 
     80    {//IE does not have window.outer... , so center it on the screen at least 
     81      var x =  (self.screen.availWidth - win_dim.width) / 2; 
     82      var y =  (self.screen.availHeight - win_dim.height) / 2;   
    7583    } 
     84    window.moveTo(x,y); 
    7685  } 
    77   else if (window.sizeToContent) { 
    78                 window.sizeToContent(); 
    79                 window.sizeToContent(); // for reasons beyond understanding, 
    80                                         // only if we call it twice we get the 
    81                                         // correct size. 
    82                 window.addEventListener("unload", __dlg_onclose, true); 
    83                 window.innerWidth = body.offsetWidth + 5; 
    84                 window.innerHeight = body.scrollHeight + 2; 
    85                 // center on parent 
    86                 var x = opener.screenX + (opener.outerWidth - window.outerWidth) / 2; 
    87                 var y = opener.screenY + (opener.outerHeight - window.outerHeight) / 2; 
    88                 window.moveTo(x, y); 
    89         } else { 
    90                 var docElm      = document.documentElement ? document.documentElement : null;     
    91                 var body_height = docElm && docElm.scrollTop ? docElm.scrollHeight : body.scrollHeight; 
    92      
    93                 window.resizeTo(body.scrollWidth, body_height); 
    94                 var ch = docElm && docElm.clientHeight ? docElm.clientHeight : body.clientHeight; 
    95                 var cw = docElm && docElm.clientWidth  ? docElm.clientWidth  : body.clientWidth; 
    96                  
    97                 window.resizeBy(body.offsetWidth - cw, body_height - ch); 
    98                 var W = body.offsetWidth; 
    99                 var H = 2 * body_height - ch; 
    100                 var x = (screen.availWidth - W) / 2; 
    101                 var y = (screen.availHeight - H) / 2; 
    102                 window.moveTo(x, y); 
    103         } 
    104         Xinha.addDom0Event(document.body, 'keypress', __dlg_close_on_esc); 
     86   
     87  Xinha.addDom0Event(document.body, 'keypress', __dlg_close_on_esc); 
    10588  window.__dlg_init_done = true; 
    10689} 
Note: See TracChangeset for help on using the changeset viewer.