Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix for JENKINS-18867 : when jquery is already loaded by another plug…
…in, st:bind call was producing js syntax error
  • Loading branch information
fcamblor committed Jul 23, 2013
1 parent b1e767f commit ce82b4b
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -55,15 +55,16 @@
<j:set var="msg" value="&lt;br/&gt;${fail}&lt;br/&gt;To remove this message, please &lt;a href='#' onclick='javascript:removeLog();'&gt;click here&lt;/a&gt;" />
</j:if>

<st:bind var="scmSyncConfigPageDecorator" value="${it}"/>
<script type="text/javascript">
function removeLog() {
<j:if test="${it.getScmSyncConfigPlugin().currentUserCannotPurgeFailLogs()}">
alert("Only administrators can purge logs !");
return;
</j:if>
var plugin = <st:bind value="${it}"/>;
plugin.purgeScmSyncConfigLogs();
alert("SCM Sync Config errors purged ! You can refresh the page.");
scmSyncConfigPageDecorator.purgeScmSyncConfigLogs();
alert("SCM Sync Config errors purged !");
document.location.reload(true);
}
</script>

Expand Down

0 comments on commit ce82b4b

Please sign in to comment.