mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Alert smiley-code on click.
Will be replaced with inserting into input lateron.
This commit is contained in:
parent
3314249c44
commit
c28b0a3067
@ -11,10 +11,11 @@ if (typeof TimWolla.WCF == 'undefined') TimWolla.WCF = {};
|
|||||||
|
|
||||||
|
|
||||||
(function ($, document) {
|
(function ($, document) {
|
||||||
TimWolla.WCF.Chat = function(roomID, messageID) { this.init(roomID, messageID); };
|
TimWolla.WCF.Chat = {
|
||||||
TimWolla.WCF.Chat.prototype = {
|
|
||||||
init: function(roomID, messageID) {
|
init: function(roomID, messageID) {
|
||||||
history.replaceState({}, '', 'index.php/Chat/'+roomID);
|
$('.smiley').click(function(event) {
|
||||||
|
alert($(event.target).attr('alt'));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})(jQuery, document);
|
})(jQuery, document);
|
@ -4,11 +4,6 @@
|
|||||||
<title>{lang}wcf.chat.title{/lang} - {PAGE_TITLE|language}</title>
|
<title>{lang}wcf.chat.title{/lang} - {PAGE_TITLE|language}</title>
|
||||||
|
|
||||||
{include file='headInclude' sandbox=false}
|
{include file='headInclude' sandbox=false}
|
||||||
<script type="text/javascript">
|
|
||||||
//<![CDATA[
|
|
||||||
new TimWolla.WCF.Chat({$roomID},1);
|
|
||||||
//]]>
|
|
||||||
</script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body id="tpl{$templateName|ucfirst}">
|
<body id="tpl{$templateName|ucfirst}">
|
||||||
@ -21,6 +16,15 @@
|
|||||||
</hgroup>
|
</hgroup>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
{foreach from=$smilies item='smiley'}
|
||||||
|
<img src="{$smiley->getURL()}" alt="{$smiley->smileyCode}" class="smiley" /><br />
|
||||||
|
{/foreach}
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
//<![CDATA[
|
||||||
|
TimWolla.WCF.Chat.init({$room->roomID}, 1);
|
||||||
|
//]]>
|
||||||
|
</script>
|
||||||
|
|
||||||
{include file='footer' sandbox=false}
|
{include file='footer' sandbox=false}
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
Reference in New Issue
Block a user