570 console.error(e); |
570 console.error(e); |
571 } |
571 } |
572 }); |
572 }); |
573 } |
573 } |
574 |
574 |
|
575 /** |
|
576 * Identical to whiteOutElement(), but safe to call on miniPrompt divs. |
|
577 */ |
|
578 |
|
579 function whiteOutMiniPrompt(el) |
|
580 { |
|
581 var top = getScrollOffset(); |
|
582 var left = ( getWidth() / 2 ) - ( 320 / 2); |
|
583 var width = 320; |
|
584 var height = $dynano(el).Height() - 58; |
|
585 |
|
586 var blackout = document.createElement('div'); |
|
587 // using fixed here allows modal windows to be blacked out |
|
588 blackout.style.position = ( el.style.position == 'fixed' ) ? 'fixed' : 'absolute'; |
|
589 blackout.style.top = top + 'px'; |
|
590 blackout.style.left = left + 'px'; |
|
591 blackout.style.width = width + 'px'; |
|
592 blackout.style.height = height + 'px'; |
|
593 |
|
594 blackout.style.backgroundColor = '#FFFFFF'; |
|
595 domObjChangeOpac(60, blackout); |
|
596 var background = ( $dynano(el).Height() < 48 ) ? 'url(' + scriptPath + '/images/loading.gif)' : 'url(' + scriptPath + '/includes/clientside/tinymce/themes/advanced/skins/default/img/progress.gif)'; |
|
597 blackout.style.backgroundImage = background; |
|
598 blackout.style.backgroundPosition = 'center center'; |
|
599 blackout.style.backgroundRepeat = 'no-repeat'; |
|
600 blackout.style.zIndex = '1000'; |
|
601 |
|
602 var body = document.getElementsByTagName('body')[0]; |
|
603 body.appendChild(blackout); |
|
604 |
|
605 return blackout; |
|
606 } |
|
607 |
575 function testMPMessageBox() |
608 function testMPMessageBox() |
576 { |
609 { |
577 miniPromptMessage({ |
610 miniPromptMessage({ |
578 title: 'The Game of LIFE question #73', |
611 title: 'The Game of LIFE question #73', |
579 message: 'You just got your girlfriend pregnant. Please select an option:', |
612 message: 'You just got your girlfriend pregnant. Please select an option:', |