* finish task #2932
This commit is contained in:
+16
-2
@@ -75,8 +75,22 @@ function setTemplate(templateID)
|
||||
function deleteTemplate(templateID)
|
||||
{
|
||||
if(!templateID) return;
|
||||
hiddenwin.location.href = createLink('bug', 'deleteTemplate', 'templateID=' + templateID);
|
||||
$('#tplBox' + templateID).addClass('hidden');
|
||||
if (confirm("您确认要删除该模板吗?")){
|
||||
hiddenwin.location.href = createLink('bug', 'deleteTemplate', 'templateID=' + templateID);
|
||||
$('#tplBox' + templateID).addClass('hidden');
|
||||
}
|
||||
}
|
||||
|
||||
/*visbile template x icon*/
|
||||
function mouseOver(delTempID)
|
||||
{
|
||||
$('#delTemp'+delTempID).removeClass('hidden');
|
||||
}
|
||||
|
||||
/*hidden template x icon*/
|
||||
function mouseOut(delTempID)
|
||||
{
|
||||
$('#delTemp'+delTempID).addClass('hidden');
|
||||
}
|
||||
|
||||
$(function()
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
foreach($templates as $key => $template)
|
||||
{
|
||||
echo "<li id='tplBox$template->id'>";
|
||||
echo "<li id='tplBox$template->id' onmouseover='mouseOver($template->id)' onmouseout='mouseOut($template->id)'>";
|
||||
echo "<a title='{$lang->bug->applyTemplate}' class='tpl-name' id='tplTitleBox$template->id' href='javascript:setTemplate($template->id)'>";
|
||||
if($template->public) echo "<span class='label label-info label-badge'>{$lang->public}</span> ";
|
||||
echo $template->title . "</a>";
|
||||
if(empty($template->public) or $template->account == $app->user->account)echo "<a href='###' onclick='deleteTemplate($template->id)' class='btn-delete'><i class='icon-remove'></i></a>";
|
||||
if(empty($template->public) or $template->account == $app->user->account)echo "<a href='###' onclick='deleteTemplate($template->id)' id='delTemp$template->id' class='btn-delete hidden'><i class='icon-remove'></i></a>";
|
||||
echo "<span id='template$template->id' class='hidden'>$template->content</span>";
|
||||
echo '</li>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user