move exe button to edit citask page, add request success tips

This commit is contained in:
aaronchen2k
2020-01-14 17:33:41 +08:00
parent 0b2e26085f
commit af258f8fdf
6 changed files with 23 additions and 2 deletions
+1
View File
@@ -0,0 +1 @@
+4
View File
@@ -0,0 +1,4 @@
$(function()
{
})
+14
View File
@@ -3,6 +3,20 @@ $(function()
triggerTypeChanged(triggerType);
});
function exeCitask(id) {
var link = createLink('ci', 'exeCitask', 'id=' + id);
console.log(link);
$.ajax({
type:"POST",
url: link,
data: {},
datatype: "json",
success:function(str){
$('.exe-citask-button').tooltip('show', '发送执行请求成功!');
}
});
}
function triggerTypeChanged(type) {
if(type == 'tag') {
$('.tag-fields').removeClass('hidden');
+1
View File
@@ -59,6 +59,7 @@ $lang->citask->common = '构建任务';
$lang->citask->browse = '浏览构建任务';
$lang->citask->create = '添加构建任务';
$lang->citask->edit = '编辑构建任务';
$lang->citask->exeNow = '立即执行';
$lang->citask->delete = '删除构建任务';
$lang->citask->confirmDelete = '确认删除该构建任务吗?';
-1
View File
@@ -54,7 +54,6 @@
<td class='c-actions text-right'>
<?php
common::printIcon('ci', 'exeCitask', "citaskID=$id", '', 'list', 'play');
common::printIcon('ci', 'editCitask', "citaskID=$id", '', 'list', 'edit');
if (common::hasPriv('ci', 'deleteCitask')) {
+3 -1
View File
@@ -106,9 +106,11 @@
</tr>
<tr>
<th></th>
<td class='text-center form-actions'>
<td colspan="2" class='text-center form-actions'>
<?php echo html::submitButton(); ?>
<?php echo html::backButton(); ?>
&nbsp;
<?php echo html::commonButton($lang->citask->exeNow, "onclick=exeCitask($citask->id) data-tip-class='tooltip-success'", "btn btn-info exe-citask-button"); ?>
</td>
</tr>
</table>