Changeset 5158


Ignore:
Timestamp:
Oct 23, 2009, 11:33:36 AM (14 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1413: Make the directory icon clickable in the Files and directories view

Also included the fix for #1415 in the trunk. This was needed to be able to test the click function in IE.

Location:
trunk/www
Files:
3 edited

Legend:

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

    r4964 r5158  
    266266  }
    267267  %>
     268  function synchronizeTo(directoryId, parentId)
     269  {
     270    var item = JoustMenu.menuItems['D'+directoryId];
     271    if (!item)
     272    {
     273      if (!parentId) parentId = parent.lastOpenDirectoryId;
     274      if (parentId)
     275      {
     276        var parentDir = JoustMenu.menuItems['D'+parentId];
     277        if (parentDir.lazyInit)
     278        {
     279          JoustMenu.toggle(parentDir.index);
     280          item = JoustMenu.menuItems['D'+directoryId];
     281        }
     282      }
     283    }
     284    if (item) JoustMenu.select(item.index);
     285  }
    268286  function refresh()
    269287  {
  • trunk/www/filemanager/files/list_files.jsp

    r4889 r5158  
    316316      frm.submit();
    317317    }
     318    function selectDirectory(subDirId)
     319    {
     320      parent.frames.directories.synchronizeTo(subDirId, <%=directoryId%>);
     321    }
    318322    </script>
    319323  </base:head>
     
    707711              boolean sharePermission = item.hasPermission(Permission.SET_PERMISSION);
    708712              String name = HTML.encodeTags(item.getName());
    709               String path = HTML.encodeTags(item.getPath().toString());
     713              String path = item.getPath().toString();
     714              String tagPath = HTML.encodeTags(path);
    710715              String icon = item.getAutoCompress() ? "directory_compressed.gif" : "directory.gif";
    711716              %>
     
    715720                  ><base:icon
    716721                    image="<%=icon%>"
    717                     tooltip="<%=path%>"
     722                    tooltip="<%=tagPath%>"
     723                    onclick="<%="selectDirectory(" + itemId + ")"%>"
    718724                  /></tbl:header>
    719725                <tbl:header
     
    796802              String name = HTML.encodeTags(item.getName());
    797803              String path = item.getPath().toString();
    798               String urlPath = HTML.urlEncode(path);
    799804              String tagPath = HTML.encodeTags(path);
    800805              String icon = item.isCompressed() ? "file_compressed.gif" : "file.gif";
     
    827832                    name="item_id"
    828833                    value="<%=itemId%>"
    829                     title="<%=path%>"
     834                    title="<%=tagPath%>"
    830835                    <%=selectedItemId == itemId ? "checked" : ""%>
    831836                    onclick="updateSelected(this)"
  • trunk/www/include/scripts/ajax.js

    r4967 r5158  
    6666  this.parseResponse = function(responseText)
    6767  {
    68     var lines = responseText.split(/\n/);
     68    var lines = responseText.split('\n');
    6969    var elements = new Array();
    7070    var status = null;
Note: See TracChangeset for help on using the changeset viewer.