Bug 40933
Dem0 ideas: find attachment comment git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@190 6955db30-a419-402b-8a0d-67ecbb4d7f56custis
parent
49ce3216c9
commit
b61d09372e
|
@ -0,0 +1,15 @@
|
|||
<script language="JavaScript">
|
||||
<!--
|
||||
function findattachment(id)
|
||||
{
|
||||
i = document.evaluate('//div[starts-with(@class,"bz_comment")]/pre[@class="bz_comment_text"]/span[1]/a[contains(.,"Created an attachment (id='+id+')")]', document, null, XPathResult.ANY_TYPE, null);
|
||||
if (!i)
|
||||
return false;
|
||||
if (e = i.iterateNext())
|
||||
scrollDocTo(e.parentElement.parentElement.parentElement);
|
||||
return true;
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<br />
|
||||
<a href="javascript:void findattachment([% attachment.id %])">Comment</a>
|
|
@ -309,7 +309,8 @@
|
|||
/*<!--*/
|
||||
function hidepreview() { document.getElementById('wrapcommentpreview').style.display='none' }
|
||||
function findPos(obj) { var curtop = 0; if (obj.offsetParent) { do { curtop += obj.offsetTop; } while (obj = obj.offsetParent); return [curtop]; } }
|
||||
function scrTo(id) { window.scroll(0,findPos(document.getElementById(id))); }
|
||||
function scrollDocTo(obj) { window.scroll(0,findPos(obj)); }
|
||||
function scrTo(id) { scrollDocTo(document.getElementById(id)); }
|
||||
//-->
|
||||
</script>
|
||||
<p style="text-align: right"><a href="javascript:void hidepreview()">Hide preview</a></p>
|
||||
|
|
Loading…
Reference in New Issue