Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.js: Difference between revisions

MediaWiki interface page
No edit summary
No edit summary
Line 223: Line 223:
addOnloadHook(checkElementByClassComp);
addOnloadHook(checkElementByClassComp);
addOnloadHook(createTooltipTrigger);
addOnloadHook(createTooltipTrigger);
/** Eve University New Fitting Template *******************
*
* Description: Allows showing and hiding of EFT, recommended skills, and notes section
* Allows viewing of fit and module info in game
* Adds titles to modules for viewing when hovering over picture
*
* Maintainers: Miranda McLaughlin
**********************************************************/


/** Eve University New Fitting Template *******************
/** Eve University New Fitting Template *******************
Line 247: Line 256:
$('.shipFitting .shipInfo').on('click', showItemInfoInGame);
$('.shipFitting .shipInfo').on('click', showItemInfoInGame);


$('.shipFitting .module:not(.open, .inactive) img').each(addTitle);
$('.shipFitting .module:not(.open, .inactive)').each(addTitle);
$('.shipFitting .subMod:not(.open, .inactive) img').each(addTitle);
$('.shipFitting .subMod:not(.open, .inactive)').each(addTitle);
});
});


function showFitInGame() {
function showFitInGame() {
var dna = $(this).attr("data-shipdna");
var dna = $(this).attr("data-shipdna");
console.log(dna);
CCPEVE.showFitting(dna);
CCPEVE.showFitting(dna);
}
}
Line 260: Line 268:
$(this).toggleClass('active');
$(this).toggleClass('active');
$(this).parents('.shipFitting').find('.moreInfo.eftData').toggleClass('show');
$(this).parents('.shipFitting').find('.moreInfo.eftData').toggleClass('show');
$(this).parents('.shipFitting').toggleClass('showEFT');
}
}


Line 265: Line 274:
$(this).toggleClass('active');
$(this).toggleClass('active');
$(this).parents('.shipFitting').find('.moreInfo.skills').toggleClass('show');
$(this).parents('.shipFitting').find('.moreInfo.skills').toggleClass('show');
$(this).parents('.shipFitting').toggleClass('showSkills');
}
}


Line 270: Line 280:
$(this).toggleClass('active');
$(this).toggleClass('active');
$(this).parents('.shipFitting').find('.moreInfo.notes').toggleClass('show');
$(this).parents('.shipFitting').find('.moreInfo.notes').toggleClass('show');
$(this).parents('.shipFitting').toggleClass('showNotes');
}
}


function showItemInfoInGame() {
function showItemInfoInGame() {
var typeID = $(this).attr('data-typeid');
var typeID = $(this).attr('data-typeid');
console.log(typeID);
CCPEVE.showInfo(typeID);
CCPEVE.showInfo(typeID);
}
}


function addTitle(index, element) {
function addTitle(index, element) {
var name = $(element).attr('alt');
var name = $(element).attr('data-name');
$(element).attr('title', name);
$(element).find('img').attr('title', name);
}
}
});
});
})(jQuery);
})(jQuery);
}catch(e){console.log("Joel screwed up! Contact Miranda McLaughlin.", e);}
}catch(e){console.log("Joel screwed up! Contact Miranda McLaughlin.", e);}