<script type="text/javascript"> $(document).ready(function(){ /* Replace "Rank #" with rank names */ var replaceRanks = true; var ranks = { 0 : "Guild Leader", 1 : "Council", 2 : "Officer", 3 : "Raider", 4 : "Member", 5 : "Alt", 6 : "New Recruit", 7 : "Probation" }; // *************************** // Don't Change Anything Below // *************************** var n, t, roster = $('#wowroster'); if (replaceRanks) { roster.find('.wowRank').each(function(){ n = parseInt( $(this).find('span').text().replace(/Rank /,''), 10); $(this).find('span').hide().after( ranks[n] ); }) } }); // CODE TO RESORT THE ROSTER $(window).load(function(){ $('#wowroster').trigger('sorton', [[ [3,1], [0,0] ]] ); }); </script>
[ [columnIndex, sortDirection], ... ]
<link type="text/css" href="http://www.axiomfiles.com/Files/258012/wow-roster.css" rel="stylesheet" />
/******************** WoW Roster XSL ********************/ /* Center text in achievement, level and rank columns */ td.wowAch, td.wowLevel, td.wowRank { text-align: center; } /* Right align xp columns */ td.wowWeekly, td.wowLifeTime { text-align: right; } /* Add icons images to class and race columns */ .wowClass span, .wowRace span { background-image: url(http://www.axiomfiles.com/Files/278466/icon-wowroster.gif); background-repeat: no-repeat; height: 18px; display: block; white-space: nowrap; } /* no image in header row */ #wowroster th.wowClass, #wowroster th.wowRace { background-image: url(); max-width: 130px; } /* Shift class and race text (to right side of icon) - Add "text-indent: -99999em;" to hide text */ td.wowClass span, td.wowRace span { margin-top: 2px; padding-left: 40px; } /* class color */ .wowName.wowClassColor-1, .wowName.wowClassColor-1 a { color: #c79c6e; } /* Warrior */ .wowName.wowClassColor-2, .wowName.wowClassColor-2 a { color: #f58cba; } /* Paladin */ .wowName.wowClassColor-3, .wowName.wowClassColor-3 a { color: #abd473; } /* Hunter */ .wowName.wowClassColor-4, .wowName.wowClassColor-4 a { color: #fff569; } /* Rogue */ .wowName.wowClassColor-5, .wowName.wowClassColor-5 a { color: #ffffff; } /* Priest */ .wowName.wowClassColor-6, .wowName.wowClassColor-6 a { color: #c41e3b; } /* DK */ .wowName.wowClassColor-7, .wowName.wowClassColor-7 a { color: #2459ff; } /* Shaman */ .wowName.wowClassColor-8, .wowName.wowClassColor-8 a { color: #69ccf0; } /* Mage */ .wowName.wowClassColor-9, .wowName.wowClassColor-9 a { color: #9482ca; } /* Warlock */ .wowName.wowClassColor-11, .wowName.wowClassColor-11 a { color: #ff7d0a; } /* Druid */ /* roster class icons */ .wowClass-1 { background-position: 20px 0; } /* Warrior */ .wowClass-2 { background-position: 20px -100px; } /* Paladin */ .wowClass-3 { background-position: 20px -150px; } /* Hunter */ .wowClass-4 { background-position: 20px -200px; } /* Rogue */ .wowClass-5 { background-position: 20px -250px; } /* Priest */ .wowClass-6 { background-position: 20px -300px; } /* DK */ .wowClass-7 { background-position: 20px -350px; } /* Shaman */ .wowClass-8 { background-position: 20px -400px; } /* Mage */ .wowClass-9 { background-position: 20px -450px; } /* Warlock */ .wowClass-11 { background-position: 20px -50px; } /* Druid */ /* roster race icons */ .wowRace1-0 { background-position: 20px -500px; } /* Human M */ .wowRace1-1 { background-position: 20px -550px; } /* Human F */ .wowRace2-0 { background-position: 20px -800px; } /* Orc M */ .wowRace2-1 { background-position: 20px -850px; } /* Orc F */ .wowRace3-0 { background-position: 20px -900px; } /* Dwarf M */ .wowRace3-1 { background-position: 20px -950px; } /* Dwarf F */ .wowRace4-0 { background-position: 20px -1000px; } /* NE M */ .wowRace4-1 { background-position: 20px -1050px; } /* NE F */ .wowRace5-0 { background-position: 20px -1100px; } /* Undead M */ .wowRace5-1 { background-position: 20px -1150px; } /* Undead F */ .wowRace6-0 { background-position: 20px -1200px; } /* Tauren M */ .wowRace6-1 { background-position: 20px -1250px; } /* Tauren F */ .wowRace7-0 { background-position: 20px -1300px; } /* Gnome M */ .wowRace7-1 { background-position: 20px -1350px; } /* Gnome F */ .wowRace8-0 { background-position: 20px -1400px; } /* Troll M */ .wowRace8-1 { background-position: 20px -1450px; } /* Troll F */ .wowRace9-0 { background-position: 20px -1600px; } /* Goblin M */ .wowRace9-1 { background-position: 20px -1650px; } /* Goblin F */ .wowRace10-0 { background-position: 20px -600px; } /* BE M */ .wowRace10-1 { background-position: 20px -650px; } /* BE F */ .wowRace11-0 { background-position: 20px -700px; } /* Draenei M */ .wowRace11-1 { background-position: 20px -750px; } /* Draenei F */ .wowRace22-0 { background-position: 20px -1500px; } /* Worgen M */ .wowRace22-1 { background-position: 20px -1550px; } /* Worgen F */ /* roster table sort arrows */ th.header { background: #222222 url(http://www.axiomfiles.com/Files/278466/sort-white.gif) left center no-repeat; cursor: pointer; font-weight: bold; text-align:center; padding-left: 10px; border-right: 1px solid #00000; } th.headerSortUp { background: #400000 url(http://www.axiomfiles.com/Files/278466/asc-white.gif) left center no-repeat; } th.headerSortDown { background: #804000 url(http://www.axiomfiles.com/Files/278466/desc-white.gif) left center no-repeat; }
<link type="text/css" href="http://www.axiomfiles.com/Files/258012/wow-roster.css" rel="stylesheet" /> <style type="text/css"> /* Custom CSS goes here */ /* level breakdown ruler */ .wowLevelRuler td, .wowLevelDivider td { border-color: #fff; } .wowLevelRuler span { background: #f00; } /* Hide the WoW Auto Roster & Default GP Roster */ .gpWidget-gpwowautoroster, .gpWidget-rosterlrg { display: none; } </style>
<
script
type
=
"text/javascript"
> $(document).ready(function(){ /* Show Statistics block if true */ var showStatistics = true; var wowMaxLevel = 80; /* Replace "Rank #" with rank names */ var replaceRanks = true; var ranks = { 0 : "Guild Leader", 1 : "Council", 2 : "Officer", 3 : "Raider", 4 : "Member", 5 : "Alt", 6 : "New Recruit", 7 : "Probation" }; // *************************** // Don't Change Anything Below // *************************** var n, t, roster = $('#wowroster'); if (replaceRanks) { roster.find('.wowRank').each(function(){ n = parseInt( $(this).find('span').text().replace(/Rank /,''), 10); $(this).find('span').hide().after( ranks[n] ); }); } /* Script to calculate guild statistics */ if (showStatistics) { var stats = $('#wowStats'), info = $('#wowGuildHeader'), total = roster.find('td.wowName').length, nr, nm, nc; /* Race breakdown */ var hideFaction = (info.attr('data-faction') == '0') ? 'Horde' : 'Alliance', shownFaction = (info.attr('data-faction') == '0') ? 'Alliance' : 'Horde'; stats.find('.wow' + hideFaction).hide(); stats.find('td.wow' + shownFaction).each(function(){ t = roster.find('span[class*=wowRace' + $(this).attr('data-raceid') + '-]' ); nr = t.length; // get number of race $(this).prepend(nr + '/' + total + ' (' + Math.round(nr/total*100) + '%)' ); // calculate race % nm = t.filter('[class$="-0"]').length; // number of males $(this).find('span:eq(0)').text(nm).next().text(nr-nm); }); /* Class breakdown */ stats.find('td.wowClass').each(function(){ t = roster.find('span[class$="wowClass-' + $(this).attr('data-classid') + '"]' ); nc = t.length; // number of this class $(this).append(nc + '/' + total + '
(' + Math.round(nc/total*100) + '%)' ); // calculate class % }); /* Level breakdown */ var p, px, st, tt, w = 100/wowMaxLevel, // width of each table cell wsl = stats.find('div.wowStatsLevel'), t1 = '', t2 = ''; for (i=10; i<=wowMaxLevel; i++){ t = roster.find('.wowLevel' + i).length; p = Math.round(t/total*100); px = (p == "1") ? 1 : 0; // graph is 1/2 size, so 1% won't show, so make it 2% st = ( i % 2 === 0 ) ? 'AltGridRow' : 'NormGridRow'; tt = 'Level ' + i + 's: ' + t + ' (' + p + '%)'; t2 += ( i % 5 === 0 && i != wowMaxLevel ) ? '' : ''; t1 += ''; if ( i == wowMaxLevel ) { $('.statLevel').find('.wowhdrlvl').text(tt); } } wsl.append(t1 + '' + t2 + '
' + i + '
'); wsl.find('.NormGridRow,.AltGridRow').hover(function(){ $('.statLevel').find('.wowhdrlvl').text( $(this).attr('rel') ); $(this).addClass('MoGridRow'); }, function(){ $(this).removeClass('MoGridRow'); }); stats.show(); } else { /* hide the whole widget show statistics is false */ $('#wowStats').closest('.gpWidget').hide(); } });
is wat comes out when i add it into rawr/script
< script -> <script
.wowLevelRuler td { padding: 0; margin: 0 }