* finish task *2467.
This commit is contained in:
@@ -78,6 +78,19 @@ class search extends control
|
||||
public function deleteQuery($queryID)
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_USERQUERY)->where('id')->eq($queryID)->andWhere('account')->eq($this->app->user->account)->exec();
|
||||
die(js::reload('parent'));
|
||||
$this->ajaxGetQuery();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax get query.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetQuery()
|
||||
{
|
||||
$module = $this->session->searchParams['module'];
|
||||
$queries = $this->search->getQueryPairs($module);
|
||||
die(html::select('queryID', $queries, '', 'onchange=executeQuery(this.value) class=form-control'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ function saveQuery()
|
||||
saveQueryLink = createLink('search', 'saveQuery');
|
||||
$.post(saveQueryLink, {title: r, module: module}, function(data)
|
||||
{
|
||||
if(data == 'success') location.reload();
|
||||
if(data == 'success') $('#queryBox').load(createLink('search', 'ajaxGetQuery'));
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -273,7 +273,8 @@ function deleteQuery()
|
||||
{
|
||||
queryID = $('#queryID').val();
|
||||
if(!queryID) return;
|
||||
hiddenwin.location.href = createLink('search', 'deleteQuery', 'queryID=' + queryID);
|
||||
deleteLink = createLink('search', 'deleteQuery', 'queryID=' + queryID);
|
||||
$('#queryBox').load(deleteLink);
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -413,10 +414,8 @@ foreach($fieldParams as $fieldName => $param)
|
||||
<?php if($style != 'simple'):?>
|
||||
<td class='w-120px'>
|
||||
<div class='input-group'>
|
||||
<?php
|
||||
echo html::select('queryID', $queries, $queryID, 'onchange=executeQuery(this.value) class=form-control');
|
||||
if(common::hasPriv('search', 'deleteQuery')) echo "<span class='input-group-btn'>" . html::a('javascript:deleteQuery()', '<i class="icon-remove"></i>', '', 'class=btn') . '</span>';
|
||||
?>
|
||||
<span id='queryBox'><?php echo html::select('queryID', $queries, $queryID, 'onchange=executeQuery(this.value) class=form-control');?></span>
|
||||
<?php if(common::hasPriv('search', 'deleteQuery')) echo "<span class='input-group-btn'>" . html::a('javascript:deleteQuery()', '<i class="icon-remove"></i>', '', 'class=btn') . '</span>';?>
|
||||
</div>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<td class='text-center'>
|
||||
<?php
|
||||
common::printIcon('testtask', 'cases', "taskID=$task->id", 'play', 'list', 'smile');
|
||||
common::printIcon('testtask', 'view', "taskID=$task->id", '', 'list', 'file');
|
||||
common::printIcon('testtask', 'view', "taskID=$task->id", '', 'list', 'file');
|
||||
common::printIcon('testtask', 'linkCase', "taskID=$task->id", '', 'list', 'link');
|
||||
common::printIcon('testtask', 'edit', "taskID=$task->id", '', 'list');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user