Show
Ignore:
Timestamp:
11/15/07 13:13:27 (6 years ago)
Author:
cho45
Message:

websites/coderepos.org/trac/share/styles/ass-ari.css,
websites/coderepos.org/trac/share/js/TracAuthorIcon.js:

Comitters/* のページにもアイコンつけるように

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • websites/coderepos.org/trac/share/js/TracAuthorIcon.js

    r1548 r1554  
    9292                break; 
    9393            case 'wiki': 
    94                 // This is for committer list of CodeRepos. 
    95                 authors = TracAuthorIcon.$X("id('Committers')/following-sibling::ul[1]//a[contains(@href, '/share/wiki/Committers/')]", Array); 
    96                 if (authors.length) { 
    97                     authors[0].parentNode.parentNode.className = "committer-list"; 
     94                if (/\/share\/wiki\/Committers\/([^\/]+)/.test(location.pathname)) { 
     95                    var author = RegExp.$1; 
     96                    var content = $X("id('content')")[0]; 
     97                    var iconurl = TracAuthorIcon.getIconByAuthor(author); 
     98                    if (!iconurl) break; 
     99                    var img = document.createElement('img'); 
     100                    img.src    = iconurl; 
     101                    img.alt    = ''; 
     102                    img.width  = '16'; 
     103                    img.height = '16'; 
     104                    img.className = "committer-icon"; 
     105                    var h1 = $X("id('searchable')/h1[1]")[0]; 
     106                    if (h1) { 
     107                        h1.appendChild(img); 
     108                    } else { 
     109                        content.insertBefore(img, content.firstChild); 
     110                    } 
     111                } else 
     112                if (location.pathname == "/share/wiki") { 
     113                    // This is for committer list of CodeRepos. 
     114                    authors = TracAuthorIcon.$X("id('Committers')/following-sibling::ul[1]//a[contains(@href, '/share/wiki/Committers/')]", Array); 
     115                    if (authors.length) { 
     116                        authors[0].parentNode.parentNode.className = "committer-list"; 
     117                    } 
    98118                } 
    99119                break;