MediaWiki:Medhub.js

Revision as of 19:19, 5 June 2018 by Nate Michalak (talk | contribs) (Created page with "$("#menu").ready(function() { if($.inArray("2001user",mw.config.get('wgUserGroups'))>= 0){ if(mw.config.get('wgPageName') === "Main_Page"){ window.location.replace("https://cs...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
$("#menu").ready(function() {
if($.inArray("2001user",mw.config.get('wgUserGroups'))>= 0){
if(mw.config.get('wgPageName') === "Main_Page"){
window.location.replace("https://cslbehringwiki.bidmc.org/index.php?title=2001");
}
}
$("#menu").addClass("dropDownMenu");

$outString = '<li><a href="' + mw.config.get( 'wgScript' ) +'/Main_Page">Home</a></li>';
$outString += '	<li><a href="' + mw.config.get( 'wgScript' ) +'/Newsletter_Archive">News</a></li>';
$outString += '	<li><a href="' + mw.config.get( 'wgScript' ) +'/Enrollment_Updates">Enrollment</a></li>';
$outString += '	<li><a href="#">Tools</a>';
$outString += '		<ul> ';
$outString += '			<li><a href="' + mw.config.get( 'wgScript' ) +'/EGFR_Calculator">eGFR Calculator</a></li> ';
$outString += '		</ul>';
$outString += '       </li>	';
$outString += '<li><a href="' + mw.config.get( 'wgScript' ) +'/Trial_Videos">Videos</a></li>';
$outString += '	<li><a href="#">Documents</a>';
$outString += '		<ul> ';
$outString += '			<li><a href="' + mw.config.get( 'wgScript' ) +'/Protocol">Protocol</a></li> ';
$outString += '			<li><a href="' + mw.config.get( 'wgScript' ) +'/Manuals">Manuals</a></li>';
$outString += '			<li><a href="' + mw.config.get( 'wgScript' ) +'/Trial_Documents">Trial Documents</a></li>';
$outString += '			<li><a href="' + mw.config.get( 'wgScript' ) +'/Abstracts_&_Manuscripts">Abstracts & Manuscripts</a></li>';
$outString += '		</ul>';
$outString += '       </li>	';
$outString += '	<li><a href="' + mw.config.get( 'wgScript' ) +'/Trial_Slides">Slides</a></li>';
$outString += '	<li><a href="' + mw.config.get( 'wgScript' ) +'/Textbook">Textbook</a>';
$outString += '         <ul> ';
$outString += '                 <li><a href="' + mw.config.get( 'wgScript' ) +'/HDL">HDL</a></li>';
$outString += '                 <li><a href="' + mw.config.get( 'wgScript' ) +'/STEMI">STEMI</a></li>';
$outString += '                 <li><a href="' + mw.config.get( 'wgScript' ) +'/NSTEMI">NSTEMI</a></li>';
$outString += '                 <li><a href="' + mw.config.get( 'wgScript' ) +'/PCI">PCI</a></li>';
$outString += '                 <li><a href="' + mw.config.get( 'wgScript' ) +'/Atrial_Fibrillation">AFib</a></li>';
$outString += '                 <li><a href="' + mw.config.get( 'wgScript' ) +'/Bleeding">Bleeding</a></li>';
$outString += '		</ul>';
$outString += '	<li><a href="#">CONTACTS</a>';
$outString += '		<ul> ';
$outString += '			<li><a href="' + mw.config.get( 'wgScript' ) +'/Trial_Leadership">Leadership</a></li>';
$outString += '			<li><a href="' + mw.config.get( 'wgScript' ) +'/Clinical_Operations">Clinical Operations</a></li> ';
$outString += '		</ul>';
$outString += '       </li>	';
$outString += '	<li><a href="' + mw.config.get( 'wgScript' ) +'/Frequently_Asked_Questions">FAQs</a></li>';
$outString += ' <li><a href="' + mw.config.get( 'wgScript' ) +'/AEGIS-II_On_the_Road">AEGIS-II On the Road</a></li>';
$("#menu").html($outString);
                 $('.dropDownMenu > li').bind('mouseover', openSubMenu); 
                 $('.dropDownMenu > li').bind('mouseout', closeSubMenu);   
            function openSubMenu() { 
                     $(this).find('ul').css('visibility', 'visible'); 
                     }; 
            function closeSubMenu() { 
                     $(this).find('ul').css('visibility', 'hidden');
                     };

});