summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorFuXiaoHei <fuxiaohei@hexiaz.com>2014-03-29 21:16:06 +0800
committerFuXiaoHei <fuxiaohei@hexiaz.com>2014-03-29 21:16:06 +0800
commitecce694d77756264864b03e6b06077592ed1676a (patch)
treee5bf86b7be0cacc065e940fb5dfcffac2242b347 /templates
parent035facc5641e879b693982f6f4ada1d82915da82 (diff)
downloadgitea-ecce694d77756264864b03e6b06077592ed1676a.tar.gz
gitea-ecce694d77756264864b03e6b06077592ed1676a.zip
issue content ajax preview
Diffstat (limited to 'templates')
-rw-r--r--templates/issue/create.tmpl8
-rw-r--r--templates/issue/view.tmpl8
2 files changed, 8 insertions, 8 deletions
diff --git a/templates/issue/create.tmpl b/templates/issue/create.tmpl
index cbc21f6ce0..b8a533a198 100644
--- a/templates/issue/create.tmpl
+++ b/templates/issue/create.tmpl
@@ -18,16 +18,16 @@
Content with <a href="#">Markdown</a>
</div>
<ul class="nav nav-tabs" data-init="tabs">
- <li class="active"><a href="#issue-textarea" data-toggle="tab">Write</a></li>
- <li><a href="#issue-preview" data-toggle="tab">Preview</a></li>
+ <li class="active issue-write"><a href="#issue-textarea" data-toggle="tab">Write</a></li>
+ <li class="issue-preview"><a href="#issue-preview" data-toggle="tab" data-ajax="/preview?repo=repo_id&issue=new" data-ajax-name="issue-preview" data-ajax-method="post" data-preview="#issue-preview">Preview</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane" id="issue-textarea">
<div class="form-group">
- <textarea class="form-control" name="content" id="issue-content" rows="10" placeholder="Write some content">{{.content}}</textarea>
+ <textarea class="form-control" name="content" id="issue-content" rows="10" placeholder="Write some content" data-ajax-rel="issue-preview" data-ajax-val="val" data-ajax-field="content">{{.content}}</textarea>
</div>
</div>
- <div class="tab-pane" id="issue-preview">preview</div>
+ <div class="tab-pane issue-preview-content" id="issue-preview">loading...</div>
</div>
</div>
<div class="text-right panel-body">
diff --git a/templates/issue/view.tmpl b/templates/issue/view.tmpl
index 4266bcbf44..431b1d1042 100644
--- a/templates/issue/view.tmpl
+++ b/templates/issue/view.tmpl
@@ -72,17 +72,17 @@
Content with <a href="#">Markdown</a>
</div>
<ul class="nav nav-tabs" data-init="tabs">
- <li class="active"><a href="#issue-textarea" data-toggle="tab">Write</a></li>
- <li><a href="#issue-preview" data-toggle="tab">Preview</a></li>
+ <li class="active issue-write"><a href="#issue-textarea" data-toggle="tab">Write</a></li>
+ <li class="issue-preview"><a href="#issue-preview" data-toggle="tab" data-ajax="/preview?repo=repo_id&issue=issue_id&comment=new" data-ajax-name="issue-preview" data-ajax-method="post" data-preview="#issue-preview">Preview</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane" id="issue-textarea">
<div class="form-group">
<input type="hidden" value="{{.Issue.Index}}" name="issueIndex"/>
- <textarea class="form-control" name="content" id="issue-reply-content" rows="10" placeholder="Write some content">{{.content}}</textarea>
+ <textarea class="form-control" name="content" id="issue-content" rows="10" placeholder="Write some content" data-ajax-rel="issue-preview" data-ajax-val="val" data-ajax-field="content">{{.content}}</textarea>
</div>
</div>
- <div class="tab-pane" id="issue-preview">preview</div>
+ <div class="tab-pane issue-preview-content" id="issue-preview">loading...</div>
</div>
</div>
<div class="text-right">