Widget:SandboxNew: Difference between revisions

Jump to navigation Jump to search
Matt Pijoan (talk | contribs)
No edit summary
Matt Pijoan (talk | contribs)
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 88: Line 88:


function loginCheck(exam) {
function loginCheck(exam) {
var form = "<div id='Pat' class='noSelect WBRButton'><br />Patient History</div><div id='Flash' class='noSelect WBRButton'><br />Flash Cards</div>";
var form = "<div id='Pat' class='noSelect WBRButton'><br />USMLE Format</div><div id='Flash' class='noSelect WBRButton'><br />Flash Cards</div>";
$("#question").html(form);
$("#question").html(form);
$(".WBRButton").click(function () {
$(".WBRButton").click(function () {
Line 100: Line 100:
$("#question").html(form);
$("#question").html(form);
$(".WBRButton").click(function () {
$(".WBRButton").click(function () {
                                         alert($(this).attr('id'));
                                         alert($(this).parent.attr('id'));
countdownCurrent = parseInt($(this).attr('id')) * 6000;
countdownCurrent = parseInt($(this).attr('id')) * 6000;


Line 119: Line 119:
}
}
function examHandler(exam) {
function examHandler(exam) {
         if (arg === 'Queue') {
         if (exam === 'Queue') {
             queueExam();
             queueExam();
} else if (arg === 'Random') {
} else {
selectExam(exam);
selectExam(exam);
} else {
alert("Wat.");
}
}


Line 225: Line 223:
$xml = $(xmlDoc),
$xml = $(xmlDoc),
$title = $xml.find("text");
$title = $xml.find("text");
if ($title.text().indexOf('Placeholder,') == -1) {
if ($title.text().indexOf('Placeholder,') ==r-1) {
addNewSection("User:" + mw.user.name() + "/WBRQueue", 'Placeholder,', mw.user.tokens.get('editToken'));
addNewSection("User:" + mw.user.name() + "/WBRQueue", 'Placeholder,', mw.user.tokens.get('editToken'));
alert('First Timah!');
alert('First Timah!');

Latest revision as of 14:18, 1 July 2013