Skip to content

Commit

Permalink
[216] Allow sorting in characters search results page
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadez committed May 28, 2010
1 parent 0a7911d commit 464bf74
Showing 1 changed file with 26 additions and 14 deletions.
40 changes: 26 additions & 14 deletions _js/items/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ function cloneDelete(theSource, theTarget) {
theSourceId.parentNode.removeChild(theSourceId);
document.getElementById(theTarget).appendChild(theClone);
} else {
if(document.getElementById(theSource)){
document.getElementById(theTarget).appendChild(document.getElementById(theSource));
}
}
}

function createOption(whichNode, theValue, theDisplay) {
Expand Down Expand Up @@ -455,7 +457,11 @@ function toggleAllComplex(theInput){


function changetype(whichSelected){
document.getElementById('showHideError').style.display = "none";
try{
document.getElementById('showHideError').style.display = "none";
} catch(e) {
return;
}
currentAdvOpt = "";

childrenToPhantom('parentSingle');
Expand Down Expand Up @@ -505,6 +511,8 @@ function toggleAllComplex(theInput){

} else if (whichSelected == "containers") {
cloneDelete('childContainers', 'parentSingle');
cloneDelete('childRarity', 'parentSingle');
document.getElementById('childRarityClass').className = "sub-label-top";
} else if (whichSelected == "projectiles") {
cloneDelete('childProjectiles', 'parentSingle');
} else if (whichSelected == "quivers") {
Expand All @@ -531,6 +539,12 @@ function toggleAllComplex(theInput){
} else if (whichSelected == "consumables") {
cloneDelete('childRarity', 'parentSingle');
document.getElementById('childRarityClass').className = "sub-label-top";
} else if (whichSelected == "mounts") {
cloneDelete('childRarity', 'parentSingle');
document.getElementById('childRarityClass').className = "sub-label-top";
} else if (whichSelected == "smallpets") {
cloneDelete('childRarity', 'parentSingle');
document.getElementById('childRarityClass').className = "sub-label-top";
} else if (whichSelected == "reagents") {
cloneDelete('childRarity', 'parentSingle');
document.getElementById('childRarityClass').className = "sub-label-top";
Expand Down Expand Up @@ -713,7 +727,7 @@ function roleMeleeDps() {
}

function roleCasterDps() {
addPredefinedAdvOpt('spellCritRating');
addPredefinedAdvOpt('critRating');
addPredefinedAdvOpt('spellPower');
deleteRest();
setOr();
Expand All @@ -739,7 +753,7 @@ function roleMeleeDpsPvP() {

function roleCasterDpsPvP() {
addPredefinedAdvOpt('spellPower');
addPredefinedAdvOpt('spellCritRating');
addPredefinedAdvOpt('critRating');
addPredefinedAdvOpt('resilience');
deleteRest();
setOr();
Expand Down Expand Up @@ -768,15 +782,14 @@ function roleMeleeDpsDruid() {
addPredefinedAdvOpt('strength');
addPredefinedAdvOpt('agility');
addPredefinedAdvOpt('critRating');
addPredefinedAdvOpt('feralAttackPower');
addPredefinedAdvOpt('attackPower');
deleteRest();
setOr();
}

function roleCasterDpsDruid() {
addPredefinedAdvOpt('spellPower');
addPredefinedAdvOpt('spellCritRating');
addPredefinedAdvOpt('critRating');
deleteRest();
setOr();
}
Expand All @@ -794,7 +807,6 @@ function roleMeleeDpsDruidPvP() {
addPredefinedAdvOpt('strength');
addPredefinedAdvOpt('agility');
addPredefinedAdvOpt('critRating');
addPredefinedAdvOpt('feralAttackPower');
addPredefinedAdvOpt('attackPower');
addPredefinedAdvOpt('resilience');
deleteRest();
Expand All @@ -803,7 +815,7 @@ function roleMeleeDpsDruidPvP() {

function roleCasterDpsDruidPvP() {
addPredefinedAdvOpt('spellPower');
addPredefinedAdvOpt('spellCritRating');
addPredefinedAdvOpt('critRating');
addPredefinedAdvOpt('resilience');
deleteRest();
setOr();
Expand Down Expand Up @@ -841,7 +853,7 @@ function roleRangedDpsHunterPvP() {

//Mage
function roleCasterDpsMage() {
addPredefinedAdvOpt('spellCritRating');
addPredefinedAdvOpt('critRating');
addPredefinedAdvOpt('spellPower');
addPredefinedAdvOpt('spellPowerArcane');
addPredefinedAdvOpt('spellPowerFire');
Expand All @@ -853,7 +865,7 @@ function roleCasterDpsMage() {


function roleCasterDpsMagePvP() {
addPredefinedAdvOpt('spellCritRating');
addPredefinedAdvOpt('critRating');
addPredefinedAdvOpt('spellPower');
addPredefinedAdvOpt('resilience');
deleteRest();
Expand Down Expand Up @@ -889,7 +901,7 @@ function roleCasterDpsPaladin() {
}

function roleHealerPaladin() {
addPredefinedAdvOpt('spellCritRating');
addPredefinedAdvOpt('critRating');
addPredefinedAdvOpt('spellPower');
deleteRest();
setOr();
Expand All @@ -914,7 +926,7 @@ function roleCasterDpsPaladinPvP() {
}

function roleHealerPaladinPvP() {
addPredefinedAdvOpt('spellCritRating');
addPredefinedAdvOpt('critRating');
addPredefinedAdvOpt('spellPower');
addPredefinedAdvOpt('resilience');
deleteRest();
Expand All @@ -924,7 +936,7 @@ function roleHealerPaladinPvP() {


function roleCasterDpsPriest() {
addPredefinedAdvOpt('spellCritRating');
addPredefinedAdvOpt('critRating');
addPredefinedAdvOpt('spellPower');
addPredefinedAdvOpt('spellPowerShadow');
deleteRest();
Expand Down Expand Up @@ -999,7 +1011,7 @@ function roleMeleeDpsShaman() {
}

function roleCasterDpsShaman() {
addPredefinedAdvOpt('spellCritRating');
addPredefinedAdvOpt('critRating');
addPredefinedAdvOpt('spellPower');
addPredefinedAdvOpt('spellPowerNature');
deleteRest();
Expand Down Expand Up @@ -1029,7 +1041,7 @@ function roleMeleeDpsShamanPvP() {
}

function roleCasterDpsShamanPvP() {
addPredefinedAdvOpt('spellCritRating');
addPredefinedAdvOpt('critRating');
addPredefinedAdvOpt('spellPower');
addPredefinedAdvOpt('resilience');
deleteRest();
Expand Down

0 comments on commit 464bf74

Please sign in to comment.