Fixed issue 221, scroll to the preview if exists.

This commit is contained in:
Mehdi Kabab
2009-05-26 11:48:02 +02:00
committed by Loic d'Anterroches
parent 2c9cf96245
commit 3476541bf4
6 changed files with 22 additions and 16 deletions

View File

@@ -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>