Merge branch 'master' of git@github.com:easysoft/zentaopms
Conflicts: module/my/view/todo.html.php module/my/view/todolist.html.php
This commit is contained in:
@@ -27,3 +27,35 @@ $(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');
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<?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>
|
||||
@@ -41,8 +43,8 @@ var browseType = '<?php echo $browseType;?>';
|
||||
</div>
|
||||
</td>
|
||||
<td class='divider'></td>
|
||||
<td>
|
||||
<table class='table-1 fixed colored tablesorter datatable'>
|
||||
<td id='docbox'>
|
||||
<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,7 +72,7 @@ var browseType = '<?php echo $browseType;?>';
|
||||
<?php
|
||||
$vars = "doc={$doc->id}";
|
||||
common::printIcon('doc', 'edit', $vars, '', 'list');
|
||||
common::printIcon('doc', 'delete', $vars, '', 'list', '', 'hiddenwin');
|
||||
echo html::a("javascript:deleteDoc($doc->id)", ' ', '', "class='icon-green-common-delete' title='{$lang->doc->delete}'");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -20,4 +20,37 @@ function changeAction(formName, actionName, actionLink)
|
||||
$('#' + formName).attr('action', actionLink).submit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete todo.
|
||||
*
|
||||
* @param int todoID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function deleteTodo(todoID)
|
||||
{
|
||||
if(confirm(confirmDelete))
|
||||
{
|
||||
url = createLink('todo', 'delete','todoID=' + todoID + '&confrim=yes');
|
||||
$.ajax(
|
||||
{
|
||||
type: 'GET',
|
||||
url: url,
|
||||
dataType: 'json',
|
||||
success: function(data)
|
||||
{
|
||||
if(data.result == 'success')
|
||||
{
|
||||
url = createLink('my', 'todo');
|
||||
$('#todo').load(url + ' #todoList', function()
|
||||
{
|
||||
$('.colored').colorize();
|
||||
$('tfoot td').css('background', 'white').unbind('click').unbind('hover');
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(".colorbox").colorbox({width:960, height:550, iframe:true, transition:'none'});
|
||||
|
||||
@@ -13,40 +13,41 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/colorize.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<div id='featurebar'>
|
||||
<div class='f-left'>
|
||||
<?php
|
||||
foreach($lang->todo->periods as $period => $label)
|
||||
{
|
||||
$vars = "date=$period";
|
||||
if($period == 'before') $vars .= "&account={$app->user->account}&status=undone";
|
||||
echo "<span id='$period'>" . html::a(inlink('todo', $vars), $label) . '</span>';
|
||||
}
|
||||
echo "<span id='byDate'>" . html::input('date', $date,"class='w-date date' onchange='changeDate(this.value)'") . '</span>';
|
||||
|
||||
if($type == 'bydate')
|
||||
{
|
||||
if($date == date('Y-m-d'))
|
||||
{
|
||||
$type = 'today';
|
||||
}
|
||||
else if($date == date('Y-m-d', strtotime('-1 day')))
|
||||
{
|
||||
$type = 'yesterday';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script>$('#<?php echo $type;?>').addClass('active')</script>
|
||||
</div>
|
||||
<div class='f-right'>
|
||||
<?php
|
||||
common::printIcon('todo', 'export', "account=$account&orderBy=id_desc");
|
||||
common::printIcon('todo', 'batchCreate');
|
||||
common::printIcon('todo', 'create', "date=" . str_replace('-', '', $date));
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('confirmDelete', $lang->todo->confirmDelete)?>
|
||||
<form method='post' id='todoform'>
|
||||
<div id='featurebar'>
|
||||
<div class='f-left'>
|
||||
<?php
|
||||
foreach($lang->todo->periods as $period => $label)
|
||||
{
|
||||
$vars = "date=$period";
|
||||
if($period == 'before') $vars .= "&account={$app->user->account}&status=undone";
|
||||
echo "<span id='$period'>" . html::a(inlink('todo', $vars), $label) . '</span>';
|
||||
}
|
||||
echo "<span id='byDate'>" . html::input('date', $date,"class='w-date date' onchange='changeDate(this.value)'") . '</span>';
|
||||
|
||||
if($type == 'bydate')
|
||||
{
|
||||
if($date == date('Y-m-d'))
|
||||
{
|
||||
$type = 'today';
|
||||
}
|
||||
else if($date == date('Y-m-d', strtotime('-1 day')))
|
||||
{
|
||||
$type = 'yesterday';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script>$('#<?php echo $type;?>').addClass('active')</script>
|
||||
</div>
|
||||
<div class='f-right'>
|
||||
<?php
|
||||
common::printIcon('todo', 'export', "account=$account&orderBy=id_desc");
|
||||
common::printIcon('todo', 'batchCreate');
|
||||
common::printIcon('todo', 'create', "date=" . str_replace('-', '', $date));
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<table class='table-1 tablesorter colored' id='todoList'>
|
||||
<?php $vars = "type=$type&account=$account&status=$status&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
|
||||
<thead>
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* 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')
|
||||
{
|
||||
url = createLink('product', 'doc', 'productID=' + productID);
|
||||
$('.outer').load(url + ' #doclist', function(){sortTable();});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -13,9 +13,11 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/tablesorter.html.php';?>
|
||||
<?php include '../../common/view/colorize.html.php';?>
|
||||
<?php js::set('confirmDelete', $lang->doc->confirmDelete)?>
|
||||
<?php js::set('productID', $product->id)?>
|
||||
<div class='yui-d0'>
|
||||
|
||||
<table class='table-1 fixed colored tablesorter' align='center'>
|
||||
<table class='table-1 fixed colored tablesorter' align='center' id='doclist'>
|
||||
<caption class='caption-tr'><?php common::printIcon('doc', 'create', "libID=product&moduleID=0&productID={$product->id}&projectID=0&from=product");?></caption>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
@@ -41,9 +43,8 @@
|
||||
<td><?php echo $doc->addedDate;?></td>
|
||||
<td>
|
||||
<?php
|
||||
$vars = "doc={$doc->id}";
|
||||
common::printIcon('doc', 'edit', $vars);
|
||||
common::printIcon('doc', 'delete', $vars, '', 'button', '', 'hiddenwin');
|
||||
common::printIcon('doc', 'edit', "doc={$doc->id}");
|
||||
echo html::a("javascript:deleteDoc($doc->id)", ' ', '', "class='icon-green-common-delete' title='{$lang->doc->delete}'");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -177,8 +177,16 @@ class release extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = '';
|
||||
|
||||
$this->release->delete(TABLE_RELEASE, $releaseID);
|
||||
die(js::locate($this->session->releaseList, 'parent'));
|
||||
if(dao::isError())
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = dao::getError();
|
||||
}
|
||||
$this->send($response);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* Delete release.
|
||||
*
|
||||
* @param int releaseID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function deleteRelease(releaseID)
|
||||
{
|
||||
if(confirm(confirmDelete))
|
||||
{
|
||||
url = createLink('release', 'delete','releaseID=' + releaseID + '&confrim=yes');
|
||||
$.ajax(
|
||||
{
|
||||
type: 'GET',
|
||||
url: url,
|
||||
dataType: 'json',
|
||||
success: function(data)
|
||||
{
|
||||
if(data.result == 'success')
|
||||
{
|
||||
url = createLink('release', 'browse', 'productID=' + productID);
|
||||
$('.outer').load(url + ' #releaselist', function(){sortTable();});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,9 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/tablesorter.html.php';?>
|
||||
<table align='center' class='table-6 tablesorter'>
|
||||
<?php js::set('productID', $product->id)?>
|
||||
<?php js::set('confirmDelete', $lang->release->confirmDelete)?>
|
||||
<table align='center' class='table-6 tablesorter' id='releaselist'>
|
||||
<caption class='caption-tl'>
|
||||
<div class='f-left'><?php echo $lang->release->browse;?></div>
|
||||
<div class='f-right'><?php common::printIcon('release', 'create', "product=$product->id");?></div>
|
||||
@@ -36,7 +38,7 @@
|
||||
<td class='a-center'>
|
||||
<?php
|
||||
common::printIcon('release', 'edit', "release=$release->id", '', 'list');
|
||||
common::printIcon('release', 'delete', "release=$release->id", '', 'list', '', 'hiddenwin');
|
||||
echo html::a("javascript:deleteRelease($release->id)", ' ', '', "class='icon-green-common-delete' title='{$lang->release->delete}'");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
+10
-1
@@ -278,9 +278,18 @@ class todo extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = '';
|
||||
|
||||
$this->dao->delete()->from(TABLE_TODO)->where('id')->eq($todoID)->exec();
|
||||
if(dao::isError())
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = dao::getError();
|
||||
}
|
||||
|
||||
$this->loadModel('action')->create('todo', $todoID, 'erased');
|
||||
die(js::locate($this->session->todoList, 'parent'));
|
||||
$this->send($response);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user