##// END OF EJS Templates
Show new posts count title only if there are new posts. But show an asterisk...
Show new posts count title only if there are new posts. But show an asterisk in title if any posts are updated (even with 0 new ones)

File last commit:

r1007:17f2694e default
r1127:b9ff48e5 default
Show More
form.js
26 lines | 760 B | application/javascript | JavascriptLexer
neko259
Updated form to a new style. Fixed mark manel
r680 $('input[name=image]').wrap($('<div class="file_wrap"></div>'));
neko259
Added a compact form to the thread.
r676
$('body').on('change', 'input[name=image]', function(event) {
neko259
Added image preview in the forms
r673 var file = event.target.files[0];
if(file.type.match('image.*')) {
var fileReader = new FileReader();
fileReader.addEventListener("load", function(event) {
neko259
Updated form to a new style. Fixed mark manel
r680 var wrapper = $('.file_wrap');
wrapper.find('.file-thumb').remove();
wrapper.append(
$('<div class="file-thumb" style="background-image: url('+event.target.result+')"></div>')
neko259
Added image preview in the forms
r673 );
});
fileReader.readAsDataURL(file);
}
neko259
Post message by ctrl-enter on the text field
r1005 });
var form = $('#form');
$('textarea').keypress(function(event) {
neko259
Submit form only on ctrl-enter, not every enter
r1007 if (event.which == 13 && event.ctrlKey) {
neko259
Post message by ctrl-enter on the text field
r1005 form.submit();
}
neko259
Removed compact form
r970 });