Changeset 322 for trunk/web-app


Ignore:
Timestamp:
Feb 8, 2010, 2:51:23 AM (15 years ago)
Author:
gav
Message:

Move JavascriptService to JsUtilService.
Consolidate similar JsUtilService methods.
Create JsUtilTagLib?.
Disable pulsing of asset tree loading image.

Location:
trunk/web-app/js
Files:
1 edited
1 moved

Legend:

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

    r316 r322  
    44    Effect.Appear(paneDivId,{duration:0.4});
    55
    6     // Pulsing loadingImg blocks the default grails animated gif till complete.
    7     // After which the default will show as normal.
    8     new Effect.Pulsate($(loadingImg), { pulses: 200, duration: 133 });
     6    // Disabled since pulsing effect blocks other javascript till complete.
     7    // The effect may be stopped with e.cancel() but we will use the default Grails spinner for now.
     8    // def e = new Effect.Pulsate($(loadingImg), { pulses: 200, duration: 133 });
    99
    10     // The updater is only called once per page refresh.
    1110    new Ajax.Updater({ success: paneDivId }, url, {asynchronous:true,evalScripts:true});
    1211}
     
    3433    new Ajax.Request(saveUrl, {parameters: params, asynchronous: false});
    3534}
    36 
    37 function toggleBranch(divId, imageId, openImgUrl, closedImgUrl) {
    38 
    39     $(divId).toggle();
    40 
    41     if( $(divId).visible() ) {
    42         $(imageId).src= openImgUrl;
    43     }
    44     else {
    45         $(imageId).src= closedImgUrl;
    46     }
    47 
    48 }
  • trunk/web-app/js/jsUtil.js

    r314 r322  
    22function toggleUtil(id) {
    33    $(id).toggle();
     4}
     5
     6function toggleWithImgUtil(id, imageId, openImgUrl, closedImgUrl) {
     7
     8    $(id).toggle();
     9
     10    if( $(id).visible() ) {
     11        $(imageId).src= openImgUrl;
     12    }
     13    else {
     14        $(imageId).src= closedImgUrl;
     15    }
    416}
    517
Note: See TracChangeset for help on using the changeset viewer.