summaryrefslogtreecommitdiff
path: root/templates/html_head_inc.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/html_head_inc.tpl')
-rwxr-xr-xtemplates/html_head_inc.tpl15
1 files changed, 7 insertions, 8 deletions
diff --git a/templates/html_head_inc.tpl b/templates/html_head_inc.tpl
index 1cac695..3ff90f4 100755
--- a/templates/html_head_inc.tpl
+++ b/templates/html_head_inc.tpl
@@ -1,7 +1,6 @@
{if $gBitSystem->getActivePackage() == 'boards'}
<script>/* <![CDATA[ */
{literal}
- /* DEPENDENCIES: MochiKit Base Async, BitAjax */
BitBoards = {
/* this is called from flipswitch.tpl */
"flipName": function( url, elm ){
@@ -11,14 +10,14 @@
},
/* this is called from post_display.tpl */
- "warn":function( elmid, caller ){
- var oldonclick = caller.onclick;
- document.getElementById( elmid ).style['display']='inline';
- caller.onclick = function() {
- document.getElementById( elmid ).style['display']='none';
- caller.onclick = oldonclick;
- return false;
+ "warn": function( elmid, url, caller ) {
+ var $elm = $( '#' + elmid );
+ if( !$.trim( $elm.html() ) ) {
+ $.get( url ).done( function( html ) { $elm.html( html ); } );
}
+ $elm.show();
+ var prev = caller.onclick;
+ caller.onclick = function() { $elm.hide(); caller.onclick = prev; return false; };
return false;
},