1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-22 21:40:08 +00:00

Verify that $chatVersion is set

This commit is contained in:
Tim Düsterhus 2012-11-23 20:34:09 +01:00
parent 2f6354acdb
commit b061992193
2 changed files with 5 additions and 2 deletions

View File

@ -167,11 +167,11 @@
$('#timsChatInput').enable().jCounter().focus(); $('#timsChatInput').enable().jCounter().focus();
$('#timsChatCopyright').click(function (event) { $('#timsChatCopyright').click(function (event) {
event.preventDefault(); event.preventDefault();
if ($.wcfIsset('timsChatCopyrightDialog')) return WCF.showDialog('timsChatCopyrightDialog', { title: 'Tims Chat{if CHAT_SHOW_VERSION} {$chatVersion}{/if}' }); if ($.wcfIsset('timsChatCopyrightDialog')) return WCF.showDialog('timsChatCopyrightDialog', { title: 'Tims Chat{if CHAT_SHOW_VERSION && $chatVersion|isset} {$chatVersion}{/if}' });
var container = $('<fieldset id="timsChatCopyrightDialog"></fieldset>'); var container = $('<fieldset id="timsChatCopyrightDialog"></fieldset>');
container.load('{link controller='Chat' action='Copyright'}{/link}', function() { container.load('{link controller='Chat' action='Copyright'}{/link}', function() {
$('body').append(container); $('body').append(container);
WCF.showDialog('timsChatCopyrightDialog', { title: 'Tims Chat{if CHAT_SHOW_VERSION} {$chatVersion}{/if}' }); WCF.showDialog('timsChatCopyrightDialog', { title: 'Tims Chat{if CHAT_SHOW_VERSION && $chatVersion|isset} {$chatVersion}{/if}' });
}); });
}); });
})(jQuery, this) })(jQuery, this)

View File

@ -1,4 +1,7 @@
<script type="text/javascript" src="{@$__wcf->getPath('wcf')}js/be.bastelstu.WCF.Chat.js{if $chatVersion|isset}?version={$chatVersion|urlencode}{/if}"></script> <script type="text/javascript" src="{@$__wcf->getPath('wcf')}js/be.bastelstu.WCF.Chat.js{if $chatVersion|isset}?version={$chatVersion|urlencode}{/if}"></script>
<script type="text/javascript" src="{@$__wcf->getPath('wcf')}js/jCounter.jQuery.js"></script> <script type="text/javascript" src="{@$__wcf->getPath('wcf')}js/jCounter.jQuery.js"></script>
{if CHAT_SOCKET_IO_PATH}<script type="text/javascript" src="{CHAT_SOCKET_IO_PATH}/socket.io/socket.io.js"></script>{/if} {if CHAT_SOCKET_IO_PATH}<script type="text/javascript" src="{CHAT_SOCKET_IO_PATH}/socket.io/socket.io.js"></script>{/if}
{if $templateName == 'chatLog'}
<script type="text/javascript" src="{@$__wcf->getPath('wcf')}js/be.bastelstu.WCF.Chat.Log.js{if $chatVersion|isset}?version={$chatVersion|urlencode}{/if}"></script>
{/if}
{event name='javascript'} {event name='javascript'}