+ complete task #240, #241 and #242:add xheditor to bug steps.

This commit is contained in:
fujia
2010-07-28 06:34:38 +00:00
parent ac7b3f2051
commit 937fbb8f70
121 changed files with 1817 additions and 23 deletions
+1 -20
View File
@@ -10,22 +10,6 @@ function setTemplate(templateID)
$("#steps").val(steps);
}
/* 保存bug模板。*/
function saveTemplate()
{
content = $("#steps").val();
jPrompt(setTemplateTitle, '','', function(r)
{
if(!r || !content) return;
saveTemplateLink = createLink('bug', 'saveTemplate');
steps = $("#steps").val();
$.post(saveTemplateLink, {title:r, content:content}, function(data)
{
$('#tplBox').html(data);
});
});
}
/* 删除bug模板。*/
function deleteTemplate(templateID)
{
@@ -33,16 +17,13 @@ function deleteTemplate(templateID)
hiddenwin.location.href = createLink('bug', 'deleteTemplate', 'templateID=' + templateID);
$('#tplBox' + templateID).addClass('hidden');
}
var setTemplateTitle = '<?php echo $lang->bug->setTemplateTitle;?>';
</script>
<?php
foreach($templates as $key => $template)
{
echo "<span id='tplBox$template->id'>";
echo ($key + 1) . ". <span id='tplTitleBox$template->id' onclick='setTemplate($template->id)' style='text-decoration:underline; color:blue' class='hand'>$template->title</span>";
echo $lang->arrow. "<span id='tplTitleBox$template->id' onclick='setTemplate($template->id)' style='text-decoration:underline; color:blue' class='hand'>$template->title</span>";
echo html::commonButton('x', "onclick=deleteTemplate($template->id)");
echo "<span id='template$template->id' class='hidden'>$template->content</span>";
echo '<br /></span>';
}
echo html::commonButton($lang->save, 'onclick=saveTemplate()');
+3 -2
View File
@@ -25,6 +25,7 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/autocomplete.html.php';?>
<?php include '../../common/view/alert.html.php';?>
<?php include '../../common/view/xheditor.html.php';?>
<style>
#project, #product {width:200px}
#module, #task {width:400px}
@@ -153,7 +154,7 @@ $(function() {
<tr>
<th class='rowhead'><?php echo $lang->bug->openedBuild;?></th>
<td>
<span id='buildBox'><?php echo html::select('openedBuild[]', $builds, $buildID, 'size=4 multiple=multiple class=select-3');?></span>
<span id='buildBox'><?php echo html::select('openedBuild[]', $builds, $buildID, 'size=3 multiple=multiple class=select-3');?></span>
</td>
</tr>
<tr>
@@ -187,7 +188,7 @@ $(function() {
<td>
<table class='w-p100 bd-none'>
<tr class='bd-none' valign='top'>
<td class='w-p85 bd-none padding-zero'><?php echo html::textarea('steps', $steps, "class='w-p100' rows='6'");?></td>
<td class='w-p85 bd-none padding-zero'><?php echo html::textarea('steps', $steps, "class='xhe' rows='9'");?></td>
<td class='bd-none pl-10px' id='tplBox'><?php echo $this->fetch('bug', 'buildTemplates');?></td>
</tr>
</table>
+3 -1
View File
@@ -24,6 +24,8 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/autocomplete.html.php';?>
<?php include '../../common/view/alert.html.php';?>
<?php include '../../common/view/xheditor.html.php';?>
<style>
#product, #module, #project, #story, #task, #resolvedBuild{width:230px}
.select-3 {width:230px}
@@ -161,7 +163,7 @@ $(function() {
<tr class='bd-none'><td class='bd-none'>
<fieldset>
<legend><?php echo $lang->bug->legendSteps;?></legend>
<?php echo html::textarea('steps', $bug->steps, "rows='8' class='area-1'");?>
<legend class='w-p90'><?php echo html::textarea('steps', $bug->steps, "rows='8' class='xhe'");?></legend>
</fieldset>
<fieldset>
<legend><?php echo $lang->bug->legendComment;?></legend>