Changeset 3549


Ignore:
Timestamp:
Jul 4, 2007, 2:59:34 PM (16 years ago)
Author:
Martin Svensson
Message:

References #611. Added new icon and text on the delete button in trashcan-listpage.
Added item-is-used-icon for those child items which are deleted but not possible to delete from trashcan.

Location:
trunk/www
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/views/trashcan/list_trash.jsp

    r3190 r3549  
    201201        />
    202202        <tbl:button
    203           image="<%=totalCount > 0 ? "delete.gif" : "delete_disabled.gif"%>"
     203          image="<%=totalCount > 0 ? "delete_permanently.png" : "delete_permanently_disabled.png"%>"
    204204          onclick="deleteItems()"
    205           title="Delete&hellip;"
    206           tooltip="Delete the selected items"
     205          title="Delete permanently&hellip;"
     206          tooltip="Delete the selected items permanently"
    207207          disabled="<%=totalCount <= 0%>"
    208208        />
  • trunk/www/views/trashcan/view_item.jsp

    r3548 r3549  
    166166      frm.submit();
    167167    }
     168    function showUsingItems(itemType, itemId)
     169    {
     170      var url = 'index.jsp?ID=<%=ID%>&cmd=ViewUsingItems&item_type='+itemType+'&item_id='+itemId;
     171      location.href = url;
     172    }
    168173   
    169174  </script>
     
    323328            boolean usedByIsRemoved = false;
    324329            boolean usedByRemovable = false;
     330            boolean usedByIsUsed = false;
    325331            BasicItem usedBy = null;
    326332            String usedByName = String.valueOf(proxy.getId());
     
    330336              usedBy = proxy.getItem(dc);
    331337              writePermissionOnUsedBy = usedBy.hasPermission(Permission.WRITE);
     338              usedByIsUsed = usedBy.isUsed();
    332339              if (usedBy instanceof Removable)
    333340              {
     
    385392                  tooltip="This item has been scheduled for deletion"
    386393                  visible="<%=usedByIsRemoved%>"
     394                />
     395                <base:icon
     396                  image="used.gif"
     397                  tooltip="This item is used by other items"
     398                  visible="<%=usedByIsRemoved &&  usedByIsUsed%>"
     399                  onclick="<%="showUsingItems('" + usedBy.getType().name() + "', " +  usedBy.getId() + ")"%>"
    387400                />&nbsp;</tbl:header>
    388401              <tbl:cell column="name"><%=Base.getLink(ID, HTML.encodeTags(usedByName), proxy.getType(), proxy.getId(), writePermissionOnUsedBy)%></tbl:cell>
Note: See TracChangeset for help on using the changeset viewer.