mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Made every button functional
This commit is contained in:
parent
9a8663155b
commit
94870c557e
@ -58,11 +58,26 @@ if (typeof TimWolla.WCF == 'undefined') TimWolla.WCF = {};
|
|||||||
this.submit($(event.target));
|
this.submit($(event.target));
|
||||||
}, this));
|
}, this));
|
||||||
|
|
||||||
$('#chatClear').click(function () {
|
$('#chatClear').click(function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
$('.chatMessage').remove();
|
$('.chatMessage').remove();
|
||||||
$('#chatInput').focus();
|
$('#chatInput').focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.chatToggle').click(function (event) {
|
||||||
|
var element = $(event.target).parent();
|
||||||
|
var icon = $('img', element);
|
||||||
|
if (element.data('status') == '1') {
|
||||||
|
element.data('status', 0);
|
||||||
|
icon.attr('src', icon.attr('src').replace(/enabled(\d?).([a-z]{3})$/, 'disabled$1.$2'));
|
||||||
|
element.attr('title', element.data('enableMessage'));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
element.data('status', 1);
|
||||||
|
icon.attr('src', icon.attr('src').replace(/disabled(\d?).([a-z]{3})$/, 'enabled$1.$2'));
|
||||||
|
element.attr('title', element.data('disableMessage'));
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Changes the chat-room.
|
* Changes the chat-room.
|
||||||
|
@ -201,22 +201,22 @@
|
|||||||
<div class="smallButtons">
|
<div class="smallButtons">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a class="chatToggle" data-status="1" href="javascript:;">
|
<a id="chatAutoscroll" href="javascript:;" class="chatToggle balloonTooltip" title="{lang}wcf.global.button.disable{/lang}" data-disable-message="{lang}wcf.global.button.disable{/lang}" data-enable-message="{lang}wcf.global.button.enable{/lang}" data-status="1">
|
||||||
<img alt="" src="{icon}enabled1{/icon}" /> <span>Scroll</span>
|
<img alt="" src="{icon}enabled1{/icon}" /> <span>Scroll</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="chatToggle" data-status="0" href="javascript:;">
|
<a id="chatNotify" href="javascript:;" class="chatToggle balloonTooltip" title="{lang}wcf.global.button.enable{/lang}" data-disable-message="{lang}wcf.global.button.disable{/lang}" data-enable-message="{lang}wcf.global.button.enable{/lang}" data-status="0">
|
||||||
<img alt="" src="{icon}disabled1{/icon}" /> <span>Notify</span>
|
<img alt="" src="{icon}disabled1{/icon}" /> <span>Notify</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a id="chatClear" href="javascript:;">
|
<a id="chatClear" href="javascript:;" class="balloonTooltip" title="Clear the chat">
|
||||||
<img alt="" src="{icon}delete1{/icon}" /> <span>Clear</span>
|
<img alt="" src="{icon}delete1{/icon}" /> <span>Clear</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a id="chatMark" href="javascript:;">
|
<a id="chatMark" href="javascript:;" class="balloonTooltip" title="Show checkboxes">
|
||||||
<img alt="" src="{icon}check1{/icon}" /> <span>Mark</span>
|
<img alt="" src="{icon}check1{/icon}" /> <span>Mark</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
Reference in New Issue
Block a user