##// END OF EJS Templates
Changed tag style in the tag list in MD theme
Changed tag style in the tag list in MD theme

File last commit:

r1007:17f2694e default
r1071:49dc9783 default
Show More
form.js
26 lines | 760 B | application/javascript | JavascriptLexer
$('input[name=image]').wrap($('<div class="file_wrap"></div>'));
$('body').on('change', 'input[name=image]', function(event) {
var file = event.target.files[0];
if(file.type.match('image.*')) {
var fileReader = new FileReader();
fileReader.addEventListener("load", function(event) {
var wrapper = $('.file_wrap');
wrapper.find('.file-thumb').remove();
wrapper.append(
$('<div class="file-thumb" style="background-image: url('+event.target.result+')"></div>')
);
});
fileReader.readAsDataURL(file);
}
});
var form = $('#form');
$('textarea').keypress(function(event) {
if (event.which == 13 && event.ctrlKey) {
form.submit();
}
});