Dotclear

Changeset 1700:46ec5d1c6f0d


Ignore:
Timestamp:
09/03/13 16:54:05 (11 years ago)
Author:
kevin@…
Branch:
Ticket #1452
Children:
1701:81665c0f2d15, 1702:15ef8101c7c7
Message:

Ticket #1452
Permet d'utiliser les ancres pour afficher les onglets dans l'administration.
Les onglets modifie l'url comme les ancres ( C'est des ancres, en fait... )
script suplémentaire pour les vieux ie 6..7

Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • admin/js/jquery/jquery.pageTabs.js

    r1223 r1700  
    1616     this.createList(); 
    1717     this.showDiv(index); 
     18     var pageTabs = this; 
     19      
     20     window.onhashchange = function (event) { 
     21          pageTabs.showDiv(document.location.hash.split('#').join('')); 
     22    } 
    1823}; 
    1924 
     
    4146                    $(a).html(this.title); 
    4247                    this.title = ''; 
    43                     a.href = '#'; 
    4448                    a.fn = This.showDiv; 
    4549                    a.index = this.id || i; 
     50                    a.href = '#'+a.index; 
    4651                    li.id = "part-tabs-"+a.index; 
    4752                    a.obj = This; 
    48                     jQuery(a).click(function() { this.fn.call(this.obj,this.index); return false; }); 
    4953                    li.appendChild(a); 
    5054                    This.list.appendChild(li); 
  • inc/admin/lib.dc.page.php

    r1462 r1700  
    528528          "//<![CDATA[\n". 
    529529          "\$(function() {\n". 
    530                "    \$.pageTabs(".$default.");\n". 
     530               "    pagetabs = \$.pageTabs(".$default.");\n". 
    531531               "});\n". 
    532532"\n//]]>\n". 
    533 "</script>\n"; 
     533"</script>\n". 
     534          "<!--[if lt IE 8]>\n". 
     535          self::jsLoad('js/ie7/ie7-hashchange.js'). 
     536          '<script type="text/javascript">'."\n". 
     537          "//<![CDATA[\n". 
     538          "\$(function() {". 
     539               "\$(window).hashchange( function(){". 
     540                    "pagetabs.showDiv(document.location.hash.split('#').join(''));". 
     541               "});". 
     542          "});". 
     543          "\n//]]>\n". 
     544          "</script>\n". 
     545          "<![endif]-->\n"; 
    534546} 
    535547 
Note: See TracChangeset for help on using the changeset viewer.

Sites map