(refs #84)Add jquery.elastic and apply to issue and comment textarea.

This commit is contained in:
takezoe
2013-10-04 09:32:32 +09:00
parent 380cdbcf75
commit 17bc422e7a
6 changed files with 173 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
@(repository: service.RepositoryService.RepositoryInfo, content: String, enableWikiLink: Boolean, enableRefsLink: Boolean,
style: String = "", placeholder: String = "Leave a comment")(implicit context: app.Context)
style: String = "", placeholder: String = "Leave a comment", elastic: Boolean = false)(implicit context: app.Context)
@import context._
@import view.helpers._
<div class="tabbable">
@@ -27,6 +27,10 @@
<script src="@assets/google-code-prettify/prettify.js"></script>
<script>
$(function(){
@if(elastic){
$('#content').elastic();
}
$('#preview').click(function(){
$('#preview-area').html('<img src="@assets/common/images/indicator.gif"> Previewing...');
$.post('@url(repository)/_preview', {