* code for task#1657.
This commit is contained in:
@@ -27,35 +27,3 @@ $(function(){
|
||||
browseBySearch();
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Delete doc.
|
||||
*
|
||||
* @param int $docID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function deleteDoc(docID)
|
||||
{
|
||||
if(confirm(confirmDelete))
|
||||
{
|
||||
url = createLink('doc', 'delete','docID=' + docID + '&confrim=yes');
|
||||
$.ajax(
|
||||
{
|
||||
type: 'GET',
|
||||
url: url,
|
||||
dataType: 'json',
|
||||
success: function(data)
|
||||
{
|
||||
if(data.result == 'success')
|
||||
{
|
||||
$('#docbox').load(request + ' #doclist', function()
|
||||
{
|
||||
$('.colored').colorize();
|
||||
$('tfoot td').css('background', 'white').unbind('click').unbind('hover');
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
<?php include '../../common/view/treeview.html.php';?>
|
||||
<?php include '../../common/view/colorize.html.php';?>
|
||||
<?php js::set('confirmDelete', $lang->doc->confirmDelete)?>
|
||||
<?php js::set('request', $this->app->getURI(true))?>
|
||||
<script language='Javascript'>
|
||||
var browseType = '<?php echo $browseType;?>';
|
||||
</script>
|
||||
@@ -43,8 +42,8 @@ var browseType = '<?php echo $browseType;?>';
|
||||
</div>
|
||||
</td>
|
||||
<td class='divider'></td>
|
||||
<td id='docbox'>
|
||||
<table class='table-1 fixed colored tablesorter datatable' id='doclist'>
|
||||
<td>
|
||||
<table class='table-1 fixed colored tablesorter datatable' id='docList'>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<?php $vars = "libID=$libID&module=$moduleID&productID=$productID&projectID=$projectID&browseType=$browseType¶m=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
|
||||
@@ -70,9 +69,9 @@ var browseType = '<?php echo $browseType;?>';
|
||||
<td><?php echo date("m-d H:i", strtotime($doc->addedDate));?></td>
|
||||
<td>
|
||||
<?php
|
||||
$vars = "doc={$doc->id}";
|
||||
common::printIcon('doc', 'edit', $vars, '', 'list');
|
||||
echo html::a("javascript:deleteDoc($doc->id)", ' ', '', "class='icon-green-common-delete' title='{$lang->doc->delete}'");
|
||||
common::printIcon('doc', 'edit', "doc={$doc->id}", '', 'list');
|
||||
$deleteURL = $this->createLink('doc', 'delete', "docID=$doc->id&confirm=yes");
|
||||
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"docList\",confirmDelete)", ' ', '', "class='icon-green-common-delete' title='{$lang->doc->delete}'");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user