User:Jts1882/taxonomybrowser.js: Difference between revisions

Content deleted Content added
move prototype taxonomy browser from common.js
 
add second element
Line 22:
messages = {
'en': {
'quickchanges-title': 'HelloTaxonomy there!template browser',
'quickchanges-greeting': 'Welcome, $1!',
'quickchanges-intro': 'The following templates are children of this taxon taxonomy template:',
Line 97:
);
}
function myFunctiongetChildren2(taxon) {
//alert("hello from my test function: " + taxon)
Line 139:
}
function getTree(taxon) {
 
}
$(document).ready( function() {
Line 153 ⟶ 154:
'/',
'#t-whatlinkshere'
);
var link2 = mw.util.addPortletLink(
'p-tb',
'#',
mw.message('quickchanges-link').plain(),
't-prettylinkwidget',
mw.message('quickchanges-tooltip').plain(),
'/',
'#t-quickchanges'
);
 
Line 159 ⟶ 169:
// and methods like e.preventDefault();
$(link).click( function( e ) {
// Avoid the browser going to '#'
e.preventDefault();
 
// Initiate quickRC!
// quickRC();
e.preventDefault(); // Avoid the browser going to '#'
// quickRC();// Initiate quickRC!
myFunction("Felidae"); // my function to do something else
getChildren("Felidae"); // get children for prompted taxon
});
$(link2).click( function( e ) {
e.preventDefault();// Avoid the browser going to '#'
getTree("Felidae"); // get more than one level of tree
});
 
});