Ignore:
Timestamp:
Feb 1, 2010, 7:56:41 AM (14 years ago)
Author:
gav
Message:

Asset tree taglib now saves it's status in the http session along with some improvement to the button css.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web-app/js/overlayPane.js

    r306 r307  
    11function toggleDiv(id) {
    2             $(divId).toggle();
     2    $(divId).toggle();
    33}
    44
    55function showDiv(id) {
    6             Effect.Appear(id,{duration:0.4,queue:'end'});
     6    Effect.Appear(id,{duration:0.4,queue:'end'});
     7}
     8
     9function hideAssetTreePane(paneDivId, tableDivId, saveUrl) {
     10
     11    // Hide the pane.
     12    $(paneDivId).toggle();
     13
     14    var visibleDivs = $(tableDivId).select('div').findAll(function(el) { return el.visible(); })
     15    var params = "assetTreeVisibleBranches=";
     16
     17    // Add the id of each visible div.
     18    visibleDivs.each(function(it) {
     19        params += it.identify();
     20        params += ","
     21    });
     22
     23    // Remove the trailing comma.
     24    params = params.slice(0,params.length-1);
     25
     26    // Post the id's of all visible divs.
     27    new Ajax.Request(saveUrl, {parameters: params});
    728}
    829
    930function toggleBranch(divId, imageId, openImgUrl, closedImgUrl) {
    1031
    11         $(divId).toggle();
     32    $(divId).toggle();
    1233
    13         if( $(divId).visible() ) {
    14             $(imageId).src= openImgUrl;
    15         }
    16         else {
    17             $(imageId).src= closedImgUrl;
    18         }
     34    if( $(divId).visible() ) {
     35        $(imageId).src= openImgUrl;
     36    }
     37    else {
     38        $(imageId).src= closedImgUrl;
     39    }
    1940
    20 //         return false;
    2141}
    2242
Note: See TracChangeset for help on using the changeset viewer.