Changeset 3433 for SMC


Ignore:
Timestamp:
08/20/13 11:24:54 (11 years ago)
Author:
vronk
Message:

genLink function, returns the a-element with bound functionality

File:
1 edited

Legend:

Unmodified
Added
Removed
  • SMC/trunk/SMC/src/web/scripts/js/query_input/qi.js

    r2486 r3433  
    119119    }
    120120   
    121     /** accept a function reference from opts (.onmousedown)
    122     if not specified, generate a link based on the settings
     121    /**
     122    generate a link to current state  based on the settings
     123   PLANNED?: accept a function reference from opts (.onmousedown)
    123124    */
    124125    function genLink(key, param_settings) {
     
    127128        a.attr("href", generateLink());
    128129       
    129        return a;
     130            $(a).mousedown(function(e) {
     131                    $(this).attr("target", "_blank");
     132                    $(this).attr("href", generateLink());
     133             });
     134        return a;
    130135    }
    131136   
Note: See TracChangeset for help on using the changeset viewer.