Changeset 2158


Ignore:
Timestamp:
Apr 7, 2006, 3:58:21 PM (18 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #187: Add a New directory button to "Select directory" dialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/filemanager/directories/list_directories.jsp

    r2115 r2158  
    103103  %>
    104104  <base:page title="<%=requestTitle != null ? requestTitle : ""%>" type="popup">
    105   <base:head scripts="newjoust.js" styles="newjoust.css">
     105  <base:head scripts="newjoust.js,table.js" styles="newjoust.css,toolbar.css">
    106106  <script language="JavaScript">
    107107  function initialise()
     
    141141  {
    142142    %>
     143    var lastDirectoryId;
    143144    function directoryOnClick(directoryId, path)
    144145    {
     
    146147      frm.directory_id.value = directoryId;
    147148      frm.path.value = path;
     149      lastDirectoryId = directoryId;
    148150    }
    149151    function returnSelected()
     
    152154      top.window.opener.<%=callback%>(frm.directory_id.value, frm.path.value);
    153155      top.window.close();
     156    }
     157    function newDirectory()
     158    {
     159      Main.openPopup('../directories/index.jsp?ID=<%=ID%>&cmd=NewItem&parent_id='+lastDirectoryId, 'NewDirectory', 450, 340);
    154160    }
    155161    <%
     
    184190      <div id="main" class="joust" style="width:100%;">
    185191        <h3 class="docked"><%=requestTitle == null ? "Select one directory" : requestTitle%></h3>
    186         <div id="joust" class="boxed" style="height: <%=(int)(scale*360)%>px; overflow:auto; background: #E0E0E0;">
     192        <tbl:toolbar>
     193          <tbl:button
     194            image="new.gif"
     195            onclick="newDirectory()"
     196            title="New&hellip;"
     197            tooltip="Create a new directory"
     198          />
     199        </tbl:toolbar>
     200        <div id="joust" class="boxedbottom" style="height: <%=(int)(scale*340)%>px; overflow:auto; background: #E0E0E0;">
    187201        </div>
    188202      </div>
Note: See TracChangeset for help on using the changeset viewer.