DisTract-0.2.5: html/templates/bugView.html
<!-- BEGIN page -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- ##title## -->
<!-- BEGIN header -->
<head>
<meta http-equiv="Content-Type" content="text/html">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">
<title>Viewing bug ##bugId##</title>
<base href="file://##base##">
<link rel="stylesheet" href="html/lib/style.css" type="text/css" media="screen, projection">
<script type="text/javascript" src="html/lib/json.js"></script>
<script type="text/javascript" src="html/lib/markdown.js"></script>
<script type="text/javascript" src="html/lib/prototype.js"></script>
<script type="text/javascript" src="html/lib/DisTractBug.js"></script>
<script type="text/javascript" src="html/lib/DisTractRun.js"></script>
<script type="text/javascript">
var updatePreviewFunc = updateCommentPreviewFunc('comment-preview');
var appendToReply = appendToReplyFunc('comment-textarea',
'comment-inReplyTo',
updatePreviewFunc);
var basePath = '##base##';
var bugId = '##bugId##';
var modifyBugFunc = runModifyBugFunc(basePath);
var rebuildBugFunc = runRebuildBugFunc(basePath);
var rebuildAllFunc = runRebuildAllFunc(basePath);
function rebuild (bugId) {
rebuildBugFunc(bugId, 'True');
reloadThisBug();
}
function rebuildAll () {
rebuildAllFunc();
reloadThisBug();
}
function reloadThisBug () {
var url = 'file://' + basePath + 'html/' + bugId + '.html';
window.location.replace(url);
return true;
}
function modifyBug () {
var obj = new Object();
obj.bugId = bugId;
obj.fields = makeFieldsObject();
obj.comment = makeCommentsObject();
var jsonString = obj.toJSONString();
writeToTempFile(jsonString, modifyBugFunc);
rebuild(bugId);
return true;
}
</script>
</head>
<body>
<div id="navcontainer">
<ul id="navlist">
<li id="active"><a href="html/list.html" id="current">List Bugs</a></li>
<li><a href="html/newBug.html">Enter New Bug</a></li>
<li><a href="#" onclick="rebuild(bugId); return false;">Rebuild This Bug</a></li>
<li><a href="#" onclick="rebuildAll(); return false;">Rebuild All Bugs</a></li>
</ul>
</div>
<h1>##bugId##</h1>
<!-- END -->
<div class="comments">
<table style="margin-left: auto; margin-right: auto;">
<!-- ##summary## -->
</table>
<!-- ##comments## -->
<!-- BEGIN comment -->
<div class="##class##"><a name="##id##"></a>
<div class="commentMeta">Comment ##id## by ##author## at ##date##</div>
<div class="comment" id="##id##"></div>
<script type="text/javascript">
registerComment('##id##', ##textJson##, '##date##', '##author##');
</script>
<div class="commentMeta"><a href="html/##bugFile###replyAnchor"
onclick="appendToReply('##id##');">Reply to this comment</a></div>
##replies##
<!-- BEGIN commentReplies -->
<div class="replies">Replies</div>
##replies##
<!-- END -->
</div>
<!-- END -->
<form>
<div class="replies">Reply Preview</div>
<input type="hidden" value="root"
name="comment-inReplyTo" id="comment-inReplyTo">
<div class="commentReply" id="comment-preview"></div>
<a name="replyAnchor"></a><textarea class="commentReply" name="comment-textarea"
rows="20" id="comment-textarea" style="background: white;"
onkeyup="updatePreviewFunc(this.value);"
></textarea>
<table style="margin-left: auto; margin-right: auto;">
##fields##
</table>
<input type="button" onclick="modifyBug();"
value="Commit Changes" class="rightAlign">
</form>
</div>
<div class="replies">Page generated at ##generation_time## by ##version##</div>
</body>
</html>
<!-- END -->