MediaWiki:Common.js: Difference between revisions

Eran Hodis (talk | contribs)
No edit summary
m Resaved by maintenance script
Tag: content model change
 
(40 intermediate revisions by 3 users not shown)
Line 1: Line 1:
function getElementsByClassName( fromElm, elmName, className){
return $(fromElm).find(elmName + '.' + className);
}
/* Any JavaScript here will be loaded for all users on every page load. */
/* Any JavaScript here will be loaded for all users on every page load. */


Line 191: Line 195:
     }
     }
   
   
     var Rows = Table.getElementsByTagName( "tr" );  
     var Rows = Table.getElementsByTagName( "tr" );
   
   
     if ( Button.firstChild.data == collapseCaption ) {
     if ( Button.firstChild.data == collapseCaption ) {
Line 199: Line 203:
         Button.firstChild.data = expandCaption;
         Button.firstChild.data = expandCaption;
     } else {
     } else {
        if ( hasClass( Tables[i], "ConSurf")) {
              jmolScript("select all;color blue;");
        }
         for ( var i = 1; i < Rows.length; i++ ) {
         for ( var i = 1; i < Rows.length; i++ ) {
             Rows[i].style.display = Rows[0].style.display;
             Rows[i].style.display = Rows[0].style.display;
Line 449: Line 450:
  }
  }
}
}
 
JSconfig.readCookies();
JSconfig.readCookies();
addOnloadHook(JSconfig.setUpForm);
addOnloadHook(JSconfig.setUpForm);
if ("undefined"!= typeof mwCustomEditButtons) {
  mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "/wiki/extensions/Proteopedia/img/button_appletJmol.png",
    "speedTip": "3D structure",
    "tagOpen": "<Structure load='",
    "tagClose": "' size='350' frame='true' align='right' caption='Insert caption here' scene='Insert optional scene name here' />",
    "sampleText": "Insert PDB code or filename here"
  };
  mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "/wiki/extensions/Proteopedia/img/button_scrolling.png",
    "speedTip": "Scrolling text next to 3D structure",
    "tagOpen": "==Your Heading Here (maybe something like 'Structure')==\n<StructureSection load='3rec' size='350' side='right' caption='Escherichia coli reca protein-bound DNA (PDB entry [[3rec]])' scene=''>",
    "tagClose": "</StructureSection>",
    "sampleText": "\n\nAnything in this section will appear adjacent to the 3D structure and will be scrollable.\n\n"
  };
}


/*</source>*/
/*</source>*/