Changeset 7347


Ignore:
Timestamp:
Apr 28, 2017, 9:51:14 AM (6 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #2081: Improve visibility of child items in the "Item overview"

I have made two changes.

  • A light gray background color is used to indicate all sub-child elements. This is applied both to the selected element and when hovering (using a slight darker gray).
  • First-level child elements to the selected element are displayed in bold text.
Location:
trunk/www
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/common/overview/ajax.jsp

    r7316 r7347  
    146146        jsonNode.put("icon", folderIcon);
    147147        jsonNode.put("isLazy", numChildren == 0 ? 0 : 1);
     148        jsonNode.put("className", n.getNodeType().name());
    148149        jsonChildNodes.add(jsonNode);
    149150      }
  • trunk/www/common/overview/tree.jsp

    r7316 r7347  
    188188    JSONObject jsonChild = newJoustEntry(jsonParent, folderIcon, text, child.getId());
    189189    jsonChild.put("tooltip", tooltip);
    190    
     190    jsonChild.put("className", child.getNodeType().name());
    191191    if (!child.isChildrenLoaded())
    192192    {
     
    273273  {
    274274    color: #E8E8E8;
     275  }
     276
     277  /* The selected item and all children get a gray background */
     278  .selected, .selected + .children
     279  {
     280    background-color: #F8F8F8;
     281  }
     282 
     283  /* A slighly darker background when hovering */
     284  .joustitem:hover, .joustitem:hover + .children .joustitem
     285  {
     286    background-color: #F0F0F0;
     287  }
     288 
     289  /* First-level child items to the selected item get bold text */
     290  .selected + .children > .joustitem, .selected + .children > .children.FOLDER > .joustitem
     291  {
     292    font-weight: bold;
    275293  }
    276294  </style>
  • trunk/www/include/scripts/joust-2.js

    r6613 r7347  
    207207    // Create child <div> container
    208208    var childElements = internal.makeDiv(menuItem.id+'-children', 'children ' + (menuItem.isOpen ? 'open' : 'closed'));
     209    if (menuItem.className) childElements.className += ' ' + menuItem.className;
    209210 
    210211    var tree = menuItem.tree;
Note: See TracChangeset for help on using the changeset viewer.