Ignore:
Timestamp:
Feb 10, 2012, 2:35:22 PM (10 years ago)
Author:
Nicklas Nordborg
Message:

References #1655: GUI improvements

Select file/directory and "save as" dialogs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/filemanager/save_as.jsp

    r5426 r5953  
    4343<base:head >
    4444  <script language="JavaScript">
    45   var timer = 0;
    46   var inCall = false;
    4745  var defaultFileName = '<%=HTML.javaScriptEncode(fileName)%>';
    48   function adjustIFrameSize()
    49   {
    50     if (inCall) return;
    51     inCall = true;
    52     var iframeElement = document.getElementById("idManager");
    53     // Find the top coordinate of the IFrame
    54     var offsetTop = 1;
    55     var offsetTrail = iframeElement;
    56     while (offsetTrail)
    57     {
    58       offsetTop += offsetTrail.offsetTop;
    59       offsetTrail = offsetTrail.offsetParent;
    60     }
    6146
    62     // Find the browser window height
    63     var windowHeight = Main.getWindowHeight();
    64     iframeElement.height = windowHeight-offsetTop-120;
    65 
    66     // Adjust the height of the frames
    67     var iframe = window.frames['manager'];
    68     var directories = iframe.frames['directories'].document.getElementById('main');
    69     if (directories) directories.style.height = (iframeElement.height-1)+'px';
    70     var joust = iframe.frames['directories'].document.getElementById('joust');
    71     if (joust) joust.style.height = (iframeElement.height-1-30)+'px';
    72     var files = iframe.frames['files'].document.getElementById('main');
    73     if (files) files.style.height = iframeElement.height+'px';
    74     inCall = false;
    75   }
    76   function setTimer()
    77   {
    78     if (inCall) return;
    79     if (timer) clearTimeout(timer);
    80     timer = setTimeout('adjustIFrameSize()', 150);
    81   }
    8247  function setSelected(fileId, path)
    8348  {
     
    11176  </script>
    11277</base:head>
    113 <base:body attributes="onresize='setTimer();'">
    114   <h3>Save as</h3>
    115   <iframe name="manager" id="idManager" src="frameset.jsp?ID=<%=ID%>&mode=selectone" width="100%"
    116     frameborder="0" vspace="0" hspace="0"
    117     marginwidth="0" marginheight="0" scrolling="no" style="overflow: visible"></iframe>
    118 
    119   <div style="border-top: 1px solid #666666" >
     78<base:body>
     79  <h1>Save as</h1>
    12080  <form name="file">
    12181  <input type="hidden" name="file_id" value="">
     82
     83  <div class="content bottomborder">
     84    <div id="f1" class="absolutefull" style="bottom: 3em;"><iframe name="manager" id="idManager"
     85      src="frameset.jsp?ID=<%=ID%>&mode=selectone"
     86      style="width: 100%; height: 100%;"></iframe></div>
     87     
     88    <div class="absolutefull topborder" style="top: auto; height: 3em;">
     89      <table class="fullform input100">
     90        <tr>
     91          <th>Save as</th>
     92          <td><input type="text" class="text" name="path" value=""></td>
     93        </tr>
     94      </table>
     95    </div>
     96  </div>
     97  </form>
     98
     99  <base:buttongroup subclass="dialogbuttons">
     100    <base:button onclick="returnSelected();" title="Ok"  />
     101    <base:button onclick="window.top.close();" title="Cancel" />
     102  </base:buttongroup>
    122103 
    123   <p>
    124   <table class="form" align="center">
    125   <tr>
    126     <td class="prompt">Save as</td>
    127     <td><input type="text" class="text" name="path" size="100" value=""></td>
    128   </tr>
    129   </table>
    130   </form>
    131   </div>
    132  
    133   <table align="center">
    134   <tr>
    135     <td width="50%"><base:button onclick="returnSelected();" title="Ok"  /></td>
    136     <td width="50%"><base:button onclick="window.top.close();" title="Cancel" /></td>
    137   </tr>
    138   </table>
    139104</base:body>
    140105</base:page>
Note: See TracChangeset for help on using the changeset viewer.