* rewrite the ui.
This commit is contained in:
@@ -4,3 +4,7 @@
|
||||
#story {width:605px}
|
||||
#steps {width:100%}
|
||||
.text-1 {width: 85%}
|
||||
|
||||
/* The build template setting. */
|
||||
.button-c {padding:2px}
|
||||
.ke-icon-savetemplate {background-image: url(theme/default/images/kindeditor/save.gif); background-position: center; width: 56px; height: 20px;}
|
||||
|
||||
@@ -149,3 +149,34 @@ $(function() {
|
||||
$("#mailto").autocomplete(userList, { multiple: true, mustMatch: true});
|
||||
setAssignedTo();
|
||||
})
|
||||
|
||||
/* Save template. */
|
||||
KE.plugin.savetemplate = {
|
||||
click: function(id) {
|
||||
content = KE.html('steps');
|
||||
jPrompt(setTemplateTitle, '','', function(r)
|
||||
{
|
||||
if(!r || !content) return;
|
||||
saveTemplateLink = createLink('bug', 'saveTemplate');
|
||||
$.post(saveTemplateLink, {title:r, content:content}, function(data)
|
||||
{
|
||||
$('#tplBox').html(data);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
/* Set template. */
|
||||
function setTemplate(templateID)
|
||||
{
|
||||
$('#tplTitleBox' + templateID).attr('style', 'text-decoration:underline; color:#8B008B');
|
||||
steps = $('#template' + templateID).html();
|
||||
KE.html('steps', steps);
|
||||
}
|
||||
|
||||
/* Delete template. */
|
||||
function deleteTemplate(templateID)
|
||||
{
|
||||
if(!templateID) return;
|
||||
hiddenwin.location.href = createLink('bug', 'deleteTemplate', 'templateID=' + templateID);
|
||||
$('#tplBox' + templateID).addClass('hidden');
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
|
||||
<div class='yui-d0'>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $bug->title;?></caption>
|
||||
<tr>
|
||||
@@ -40,5 +39,5 @@
|
||||
</tr>
|
||||
</table>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
</div>
|
||||
</form>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,46 +1,6 @@
|
||||
<style>
|
||||
.button-c {padding:1px}
|
||||
.ke-icon-savetemplate {
|
||||
background-image: url(theme/default/images/kindeditor/save.gif);
|
||||
background-position: center;
|
||||
width: 56px;
|
||||
height: 20px;
|
||||
}
|
||||
</style>
|
||||
<script language='Javascript'>
|
||||
var setTemplateTitle = '<?php echo $lang->bug->setTemplateTitle;?>';
|
||||
|
||||
/* Save template. */
|
||||
setTemplateTitle = '<?php echo $lang->bug->setTemplateTitle;?>';
|
||||
KE.lang.savetemplate = '<?php echo $lang->bug->saveTemplate;?>';
|
||||
KE.plugin.savetemplate = {
|
||||
click: function(id) {
|
||||
content = KE.html('steps');
|
||||
jPrompt(setTemplateTitle, '','', function(r)
|
||||
{
|
||||
if(!r || !content) return;
|
||||
saveTemplateLink = createLink('bug', 'saveTemplate');
|
||||
$.post(saveTemplateLink, {title:r, content:content}, function(data)
|
||||
{
|
||||
$('#tplBox').html(data);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
/* Set template. */
|
||||
function setTemplate(templateID)
|
||||
{
|
||||
$('#tplTitleBox' + templateID).attr('style', 'text-decoration:underline; color:#8B008B');
|
||||
steps = $('#template' + templateID).html();
|
||||
KE.html('steps', steps);
|
||||
}
|
||||
|
||||
/* Delete template. */
|
||||
function deleteTemplate(templateID)
|
||||
{
|
||||
if(!templateID) return;
|
||||
hiddenwin.location.href = createLink('bug', 'deleteTemplate', 'templateID=' + templateID);
|
||||
$('#tplBox' + templateID).addClass('hidden');
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
foreach($templates as $key => $template)
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
<?php include '../../common/view/autocomplete.html.php';?>
|
||||
<?php include '../../common/view/alert.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<script language='Javascript'>
|
||||
userList = "<?php echo join(',', array_keys($users));?>".split(',');
|
||||
</script>
|
||||
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->bug->create;?></caption>
|
||||
|
||||
Reference in New Issue
Block a user