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 226: Line 226:
/** Eve University New Fitting Template *******************
/** Eve University New Fitting Template *******************
*
*
* Description: Allows showing and hiding of EFT and recommended skills section
* Description: Allows showing and hiding of EFT, recommended skills, and notes section
* Allows viewing of fit and module info in game
* Allows viewing of fit and module info in game
* Adds titles to modules for viewing when hovering over picture
* Adds titles to modules for viewing when hovering over picture
Line 238: Line 238:


$(function() {
$(function() {
$('.shipFitting .button.eft').bind('click', toggleEFT);
$('.shipFitting .button.eve').on('click', showFitInGame);
$('.shipFitting .button.skills').bind('click', toggleSkills);
$('.shipFitting .button.eft').on('click', toggleEFT);
$('.shipFitting .button.eve').bind('click', showFitInGame);
$('.shipFitting .button.skills').on('click', toggleSkills);
$('.shipFitting .module').not('.open, .inactive').bind('click', showItemInfoInGame);
$('.shipFitting .button.notes').on('click', toggleNotes);
$('.shipFitting .subMod').not('.open, .inactive').bind('click', showItemInfoInGame);
 
$('.shipFitting .module').not('.open, .inactive').on('click', showItemInfoInGame);
$('.shipFitting .subMod').not('.open, .inactive').on('click', showItemInfoInGame);
$('.shipFitting .shipInfo').on('click', showItemInfoInGame);
 
$('.shipFitting .module:not(.open, .inactive) img').each(addTitle);
$('.shipFitting .module:not(.open, .inactive) img').each(addTitle);
$('.shipFitting .subMod:not(.open, .inactive) img').each(addTitle);
$('.shipFitting .subMod:not(.open, .inactive) img').each(addTitle);
});
});
function showFitInGame() {
var dna = $(this).attr("data-shipdna");
console.log(dna);
CCPEVE.showFitting(dna);
}


function toggleEFT() {
function toggleEFT() {
$(this).parents('.shipFitting').toggleClass('showEft');
$(this).toggleClass('active');
$(this).parents('.shipFitting').find('.moreInfo.eftData').toggleClass('show');
}
}


function toggleSkills() {
function toggleSkills() {
$(this).parents('.shipFitting').toggleClass('showSkills');
$(this).toggleClass('active');
$(this).parents('.shipFitting').find('.moreInfo.skills').toggleClass('show');
}
}


function showFitInGame() {
function toggleNotes() {
var dna = $(this).attr("data-shipdna");
$(this).toggleClass('active');
console.log(dna);
$(this).parents('.shipFitting').find('.moreInfo.notes').toggleClass('show');
CCPEVE.showFitting(dna);
}
}


Line 274: Line 285:
})(jQuery);
})(jQuery);
}catch(e){console.log("Joel screwed up! Contact Miranda McLaughlin.", e);}
}catch(e){console.log("Joel screwed up! Contact Miranda McLaughlin.", e);}
/**********************************************************/