Fixed issue 221, scroll to the preview if exists.
This commit is contained in:
parent
2c9cf96245
commit
3476541bf4
@ -73,15 +73,18 @@
|
||||
{include 'idf/js-hotkeys.html'}
|
||||
{block javascript}{/block}
|
||||
{if $project}
|
||||
<script type="text/javascript">{literal}
|
||||
<!-- //
|
||||
$(document).ready(function(){
|
||||
<script type="text/javascript" charset="utf-8">{literal}
|
||||
//<![CDATA[
|
||||
$(document).ready(function(){
|
||||
var frag = location.hash;
|
||||
if (frag.length > 3 && frag.substring(0, 3) == '#ic') {
|
||||
if ($('#preview').length) {
|
||||
location.hash = '#preview';
|
||||
}
|
||||
else if (frag.length > 3 && frag.substring(0, 3) == '#ic') {
|
||||
$(frag).addClass("issue-comment-focus");
|
||||
}
|
||||
});
|
||||
// -->{/literal}
|
||||
//]]>{/literal}
|
||||
</script>{/if}
|
||||
</body>
|
||||
</html>
|
||||
|
@ -75,15 +75,18 @@
|
||||
{include 'idf/js-hotkeys.html'}
|
||||
{block javascript}{/block}
|
||||
{if $project}
|
||||
<script type="text/javascript">{literal}
|
||||
<!-- //
|
||||
$(document).ready(function(){
|
||||
<script type="text/javascript" charset="utf-8">{literal}
|
||||
//<![CDATA[
|
||||
$(document).ready(function(){
|
||||
var frag = location.hash;
|
||||
if (frag.length > 3 && frag.substring(0, 3) == '#ic') {
|
||||
if ($('#preview').length) {
|
||||
location.hash = '#preview';
|
||||
}
|
||||
else if (frag.length > 3 && frag.substring(0, 3) == '#ic') {
|
||||
$(frag).addClass("issue-comment-focus");
|
||||
}
|
||||
});
|
||||
// -->{/literal}
|
||||
//]]>{/literal}
|
||||
</script>{/if}
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
@ -11,14 +11,14 @@
|
||||
{/if}
|
||||
|
||||
{if $preview}
|
||||
<h2 class="top">{trans 'Preview'}</h2>
|
||||
<h2 id="preview" class="top">{trans 'Preview'}</h2>
|
||||
<div class="issue-comment issue-comment-first issue-comment-last">
|
||||
<br /><pre class="issue-comment-text">{issuetext $preview, $request}</pre>
|
||||
</div>
|
||||
<hr />
|
||||
{/if}
|
||||
|
||||
<form method="post" enctype="multipart/form-data" action="{url 'IDF_Views_Issue::create', array($project.shortname)}" >
|
||||
<form method="post" enctype="multipart/form-data" action="{url 'IDF_Views_Issue::create', array($project.shortname)}#preview" >
|
||||
<table class="form" summary="">
|
||||
<tr>
|
||||
<th><strong>{$form.f.summary.labelTag}:</strong></th>
|
||||
|
@ -53,7 +53,7 @@
|
||||
{/if}
|
||||
|
||||
{if $preview}
|
||||
<h2>{trans 'Preview'}</h2>
|
||||
<h2 id="preview">{trans 'Preview'}</h2>
|
||||
<div class="issue-comment issue-comment-first issue-comment-last">
|
||||
<br /><pre class="issue-comment-text">{issuetext $preview, $request}</pre>
|
||||
</div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
{block body}
|
||||
|
||||
{if $preview}
|
||||
<h2 class="top">{trans 'Preview of the Page'}</h2>
|
||||
<h2 id="preview" class="top">{trans 'Preview of the Page'}</h2>
|
||||
|
||||
{markdown $preview, $request}
|
||||
{/if}
|
||||
|
@ -3,7 +3,7 @@
|
||||
{block body}
|
||||
|
||||
{if $preview}
|
||||
<h2 class="top">{trans 'Preview of the Page'}</h2>
|
||||
<h2 id="preview" class="top">{trans 'Preview of the Page'}</h2>
|
||||
|
||||
{markdown $preview, $request}
|
||||
{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user