Add bugLinkHook to allow customisation of clone links
parent
cb0f6d025c
commit
5e83139625
|
@ -94,8 +94,10 @@ function addCollapseLink(id)
|
||||||
function addReplyLink(num, id)
|
function addReplyLink(num, id)
|
||||||
{
|
{
|
||||||
var e = document.getElementById('comment_act_'+id);
|
var e = document.getElementById('comment_act_'+id);
|
||||||
|
|
||||||
if (!e)
|
if (!e)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var s = '[';
|
var s = '[';
|
||||||
if (user_settings.quote_replies != 'off')
|
if (user_settings.quote_replies != 'off')
|
||||||
{
|
{
|
||||||
|
@ -104,11 +106,16 @@ function addReplyLink(num, id)
|
||||||
}
|
}
|
||||||
s += ', clone to <a href="enter_bug.cgi?cloned_bug_id='+bug_info.id+'&cloned_comment='+num+'">other</a>';
|
s += ', clone to <a href="enter_bug.cgi?cloned_bug_id='+bug_info.id+'&cloned_comment='+num+'">other</a>';
|
||||||
s += '/<a href="enter_bug.cgi?cloned_bug_id='+bug_info.id+'&product='+encodeURIComponent(bug_info.product)+'&cloned_comment='+num+'">same</a>';
|
s += '/<a href="enter_bug.cgi?cloned_bug_id='+bug_info.id+'&product='+encodeURIComponent(bug_info.product)+'&cloned_comment='+num+'">same</a>';
|
||||||
|
|
||||||
// 4Intranet Bug 69514 - Clone to external product button
|
// 4Intranet Bug 69514 - Clone to external product button
|
||||||
if (bug_info.extprod)
|
if (bug_info.extprod)
|
||||||
s += '/<a href="enter_bug.cgi?cloned_bug_id='+bug_info.id+'&product='+encodeURIComponent(bug_info.extprod)+'&cloned_comment='+num+'">ext</a>';
|
s += '/<a href="enter_bug.cgi?cloned_bug_id='+bug_info.id+'&product='+encodeURIComponent(bug_info.extprod)+'&cloned_comment='+num+'">ext</a>';
|
||||||
else if (bug_info.intprod)
|
else if (bug_info.intprod)
|
||||||
s += '/<a href="enter_bug.cgi?cloned_bug_id='+bug_info.id+'&product='+encodeURIComponent(bug_info.intprod)+'&cloned_comment='+num+'">int</a>';
|
s += '/<a href="enter_bug.cgi?cloned_bug_id='+bug_info.id+'&product='+encodeURIComponent(bug_info.intprod)+'&cloned_comment='+num+'">int</a>';
|
||||||
|
|
||||||
|
if (window.bugLinkHook)
|
||||||
|
s += bugLinkHook(num, id);
|
||||||
|
|
||||||
s += ' product]';
|
s += ' product]';
|
||||||
e.innerHTML += s;
|
e.innerHTML += s;
|
||||||
}
|
}
|
||||||
|
|
10
js/util.js
10
js/util.js
|
@ -33,6 +33,16 @@ function htmlspecialchars(s)
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.http_build_query = function(data)
|
||||||
|
{
|
||||||
|
var encoded = '';
|
||||||
|
for (var i in data)
|
||||||
|
{
|
||||||
|
encoded = encoded+'&'+encodeURIComponent(i)+'='+(data[i] === false || data[i] === null ? '' : encodeURIComponent(data[i]));
|
||||||
|
}
|
||||||
|
return encoded.substr(1);
|
||||||
|
};
|
||||||
|
|
||||||
// Checks if a specified value 'val' is in the specified array 'arr'
|
// Checks if a specified value 'val' is in the specified array 'arr'
|
||||||
function bz_isValueInArray(arr, val)
|
function bz_isValueInArray(arr, val)
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
|
|
||||||
[% PROCESS "bug/show-header.html.tmpl" %]
|
[% PROCESS "bug/show-header.html.tmpl" %]
|
||||||
|
|
||||||
|
[% Hook.process('bug_link_hook') %]
|
||||||
|
|
||||||
[% PROCESS bug/navigate.html.tmpl %]
|
[% PROCESS bug/navigate.html.tmpl %]
|
||||||
|
|
||||||
[% PROCESS bug/edit.html.tmpl %]
|
[% PROCESS bug/edit.html.tmpl %]
|
||||||
|
|
Loading…
Reference in New Issue