Rev 10350 | Rev 11980 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 10350 | Rev 10587 | ||
---|---|---|---|
Line -... | Line 1... | ||
- | 1 | !! tabscript |
|
- | 2 | !! Adds a javascript to activate tabs and memorize last selcted tab in user browser. |
|
- | 3 | !! INPUT : name of tag ID (it must be like #widget_$INPUT ) |
|
- | 4 | ||
- | 5 | !! NB : You must be sure your ID is unique in the whole site to avoid activating wrong previously selected tag. |
|
- | 6 | ||
- | 7 | !! Put this in your .phtml to use it (sample): |
|
- | 8 | !! |
|
- | 9 | !! <div id="widget_ID"> |
|
- | 10 | !! <ul class="wims_summary"> |
|
- | 11 | !! <li><a href="#wims_user_doc">$wims_name_Docs</a></li> |
|
- | 12 | !! <li><a href="#wims_user_sheet">$wims_name_Sheets</a></li> |
|
- | 13 | !! </ul> |
|
- | 14 | !! <div id="wims_user_doc">user docs</div> |
|
- | 15 | !! <div id="wims_user_sheet">user sheets</div> |
|
- | 16 | !! </div> |
|
- | 17 | !! |
|
- | 18 | !! !if $jquery_defined=yes |
|
- | 19 | !! !read adm/tabscript ID |
|
- | 20 | !! !endif |
|
- | 21 | ||
1 | !set tmp=!word 1 of $wims_read_parm |
22 | !set tmp=!word 1 of $wims_read_parm |
2 | <script type="text/javascript"> |
23 | <script type="text/javascript"> |
3 | /*<![CDATA[*/ |
24 | /*<![CDATA[*/ |
4 | jQuery(function($$) { |
25 | jQuery(function($$) { |
5 | // Get in sessionStorage if a tab was previously selected, and activate it. |
26 | // Get in sessionStorage if a tab was previously selected, and activate it. |