From 5709bd9b7401d4795132a6c2507078502889de29 Mon Sep 17 00:00:00 2001 From: xia0ta0 Date: Tue, 30 Jul 2013 10:45:06 +0800 Subject: [PATCH 01/21] * code for task#1657. --- module/project/control.php | 11 +++++++++-- module/project/js/story.js | 29 +++++++++++++++++++++++++++++ module/project/view/story.html.php | 5 +++-- 3 files changed, 41 insertions(+), 4 deletions(-) diff --git a/module/project/control.php b/module/project/control.php index 92ccbfeb0a..b953561f5d 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1441,9 +1441,16 @@ class project extends control } else { + $response['result'] = 'success'; + $response['message'] = ''; + $this->project->unlinkStory($projectID, $storyID); - echo js::locate($this->app->session->storyList, 'parent'); - exit; + if(dao::isError()) + { + $response['result'] = 'fail'; + $response['message'] = dao::getError(); + } + $this->send($response); } } diff --git a/module/project/js/story.js b/module/project/js/story.js index 3eee9acf9b..7a8b9f207c 100644 --- a/module/project/js/story.js +++ b/module/project/js/story.js @@ -16,3 +16,32 @@ function changeAction(formName, actionName, actionLink) { $('#' + formName).attr('action', actionLink).submit(); } + +/** + * unlink story. + * + * @param int $projectID + * @param int $storyID + * @access public + * @return void + */ +function unlink(projectID, storyID) +{ + if(confirm(confirmUnlinkStory)) + { + url = createLink('project', 'unlinkStory','projectID=' + projectID + '&storyID=' + storyID + '&confrim=yes'); + $.ajax( + { + type: 'GET', + url: url, + dataType: 'json', + success: function(data) + { + if(data.result == 'success') + { + $('#story' + storyID).remove(); + } + } + }); + } +} diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php index dc2707f599..c1580d0c57 100644 --- a/module/project/view/story.html.php +++ b/module/project/view/story.html.php @@ -12,6 +12,7 @@ ?> +project->confirmUnlinkStory)?>
+ From 8f6c964b1a63eb950271fdd22a220c4418a24be6 Mon Sep 17 00:00:00 2001 From: xia0ta0 Date: Tue, 30 Jul 2013 14:46:42 +0800 Subject: [PATCH 02/21] * code for task#1657. --- module/common/view/tablesorter.html.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/module/common/view/tablesorter.html.php b/module/common/view/tablesorter.html.php index 2f68b1e1b6..ffdbc37e1b 100644 --- a/module/common/view/tablesorter.html.php +++ b/module/common/view/tablesorter.html.php @@ -4,8 +4,12 @@ js::import($jsRoot . 'jquery/tablesorter/min.js'); js::import($jsRoot . 'jquery/tablesorter/metadata.js'); ?> From fb2200d6b00c2c0c55552a5eed1368c451308610 Mon Sep 17 00:00:00 2001 From: xia0ta0 Date: Tue, 30 Jul 2013 14:54:02 +0800 Subject: [PATCH 03/21] * code for task#1657. --- module/project/js/story.js | 3 ++- module/project/view/story.html.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/module/project/js/story.js b/module/project/js/story.js index 7a8b9f207c..dae22c74ba 100644 --- a/module/project/js/story.js +++ b/module/project/js/story.js @@ -39,7 +39,8 @@ function unlink(projectID, storyID) { if(data.result == 'success') { - $('#story' + storyID).remove(); + url = createLink('project', 'story', 'projectID=' + projectID); + $('#projectStoryForm').load(url + ' #storyList', function(){sortTable();}); } } }); diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php index c1580d0c57..70c86e2207 100644 --- a/module/project/view/story.html.php +++ b/module/project/view/story.html.php @@ -14,7 +14,7 @@ project->confirmUnlinkStory)?> -
@@ -53,7 +54,7 @@ $storyLink = $this->createLink('story', 'view', "storyID=$story->id"); $totalEstimate += $story->estimate; ?> -
@@ -87,7 +88,7 @@ if($productID) common::printIcon('testcase', 'batchCreate', "productID=$story->product&moduleID=$story->module&storyID=$story->id", '', 'list'); $lang->project->unlinkStory = $lang->unlink; - common::printIcon('project', 'unlinkStory', $param, '', 'list', '', 'hiddenwin'); + echo html::a('javascript:void(0)', ' ', '', "class='icon-green-project-unlinkStory' title='$lang->unlink' onclick='unlink($project->id,$story->id)'"); ?>
+
project->story;?>
@@ -88,7 +88,7 @@ if($productID) common::printIcon('testcase', 'batchCreate', "productID=$story->product&moduleID=$story->module&storyID=$story->id", '', 'list'); $lang->project->unlinkStory = $lang->unlink; - echo html::a('javascript:void(0)', ' ', '', "class='icon-green-project-unlinkStory' title='$lang->unlink' onclick='unlink($project->id,$story->id)'"); + echo html::a("javascript:unlink($project->id,$story->id)", ' ', '', "class='icon-green-project-unlinkStory' title='$lang->unlink''"); ?> From 67df14b2f1145fba888b0971cd95510797aa6772 Mon Sep 17 00:00:00 2001 From: xia0ta0 Date: Tue, 30 Jul 2013 15:26:08 +0800 Subject: [PATCH 04/21] * code for task#1657. --- module/productplan/control.php | 10 +++++++++- module/productplan/js/browse.js | 21 +++++++++++++++++++++ module/productplan/view/browse.html.php | 4 +++- 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 module/productplan/js/browse.js diff --git a/module/productplan/control.php b/module/productplan/control.php index ed356dbc7b..b1750059d5 100644 --- a/module/productplan/control.php +++ b/module/productplan/control.php @@ -94,9 +94,17 @@ class productplan extends control } else { + $response['result'] = 'success'; + $response['message'] = ''; + $plan = $this->productplan->getById($planID); $this->productplan->delete(TABLE_PRODUCTPLAN, $planID); - die(js::locate(inlink('browse', "productID=$plan->product"), 'parent')); + if(dao::isError()) + { + $response['result'] = 'fail'; + $response['message'] = dao::getError(); + } + $this->send($response); } } diff --git a/module/productplan/js/browse.js b/module/productplan/js/browse.js new file mode 100644 index 0000000000..7f00434452 --- /dev/null +++ b/module/productplan/js/browse.js @@ -0,0 +1,21 @@ +function deletePlan(planID) +{ + if(confirm(confirmDelete)) + { + url = createLink('productplan', 'delete','planID=' + planID + '&confrim=yes'); + $.ajax( + { + type: 'GET', + url: url, + dataType: 'json', + success: function(data) + { + if(data.result == 'success') + { + url = createLink('productplan', 'browse', 'productID=' + productID); + $('.outer').load(url + ' #productplan'); + } + } + }); + } +} diff --git a/module/productplan/view/browse.html.php b/module/productplan/view/browse.html.php index bf0858418c..b7a1066347 100644 --- a/module/productplan/view/browse.html.php +++ b/module/productplan/view/browse.html.php @@ -11,6 +11,8 @@ */ ?> +productplan->confirmDelete)?> +
productplan->browse;?>
@@ -40,7 +42,7 @@ common::printIcon('productplan', 'linkStory', "planID=$plan->id", '', 'list'); common::printIcon('productplan', 'linkBug', "planID=$plan->id", '', 'list'); common::printIcon('productplan', 'edit', "planID=$plan->id", '', 'list'); - common::printIcon('productplan', 'delete', "planID=$plan->id", '', 'list', '', 'hiddenwin'); + echo html::a("javascript:deletePlan($plan->id)", ' ', '', "class='icon-green-common-delete' title='{$lang->productplan->delete}'"); ?> From 5e00f938e67465289019655483367e9d85564894 Mon Sep 17 00:00:00 2001 From: xia0ta0 Date: Tue, 30 Jul 2013 16:10:28 +0800 Subject: [PATCH 05/21] * code for task#1657. --- module/project/control.php | 10 +++++++++- module/project/js/build.js | 21 +++++++++++++++++++++ module/project/view/build.html.php | 6 ++++-- module/project/view/story.html.php | 2 +- 4 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 module/project/js/build.js diff --git a/module/project/control.php b/module/project/control.php index b953561f5d..5973c5bb3f 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1349,8 +1349,16 @@ class project extends control } else { + $response['result'] = 'success'; + $response['message'] = ''; + $this->project->unlinkMember($projectID, $account); - die(js::locate($this->inlink('team', "projectID=$projectID"), 'parent')); + if(dao::isError()) + { + $response['result'] = 'fail'; + $response['message'] = dao::getError(); + } + $this->send($response); } } diff --git a/module/project/js/build.js b/module/project/js/build.js new file mode 100644 index 0000000000..d287eedaaf --- /dev/null +++ b/module/project/js/build.js @@ -0,0 +1,21 @@ +function deleteBuild(buildID) +{ + if(confirm(confirmDelete)) + { + url = createLink('build', 'delete','buildID=' + buildID + '&confrim=yes'); + $.ajax( + { + type: 'GET', + url: url, + dataType: 'json', + success: function(data) + { + if(data.result == 'success') + { + url = createLink('project', 'build', 'projectID=' + projectID); + $('.outer').load(url + ' #buildlist', function(){sortTable();}); + } + } + }); + } +} diff --git a/module/project/view/build.html.php b/module/project/view/build.html.php index d59b83fe10..f9af1a6c9e 100644 --- a/module/project/view/build.html.php +++ b/module/project/view/build.html.php @@ -12,7 +12,9 @@ ?> - +build->confirmDelete)?> +id)?> +
project->build;?>
id");?>
@@ -45,7 +47,7 @@ $lang->project->bug = $lang->project->viewBug; common::printIcon('project', 'bug', "project=$project->id&orderBy=status&build=$build->id", '', 'list'); common::printIcon('build', 'edit', "buildID=$build->id"); - common::printIcon('build', 'delete', "buildID=$build->id", '', 'list', '', 'hiddenwin'); + echo html::a("javascript:deleteBuild($build->id)", ' ', '', "class='icon-green-common-delete' title='{$lang->build->delete}'"); ?> diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php index 70c86e2207..d251cd3d4f 100644 --- a/module/project/view/story.html.php +++ b/module/project/view/story.html.php @@ -88,7 +88,7 @@ if($productID) common::printIcon('testcase', 'batchCreate', "productID=$story->product&moduleID=$story->module&storyID=$story->id", '', 'list'); $lang->project->unlinkStory = $lang->unlink; - echo html::a("javascript:unlink($project->id,$story->id)", ' ', '', "class='icon-green-project-unlinkStory' title='$lang->unlink''"); + echo html::a("javascript:unlink($project->id,$story->id)", ' ', '', "class='icon-green-project-unlinkStory' title='$lang->unlink'"); ?> From c8e274ce0302f531d101708b1efd3897e878692d Mon Sep 17 00:00:00 2001 From: xia0ta0 Date: Tue, 30 Jul 2013 16:33:27 +0800 Subject: [PATCH 06/21] * code for task#1657. --- module/project/js/build.js | 7 +++++++ module/project/view/build.html.php | 2 +- module/project/view/team.html.php | 10 ++++++++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/module/project/js/build.js b/module/project/js/build.js index d287eedaaf..3eb813f637 100644 --- a/module/project/js/build.js +++ b/module/project/js/build.js @@ -1,3 +1,10 @@ +/** + * Delete build. + * + * @param int buildID + * @access public + * @return void + */ function deleteBuild(buildID) { if(confirm(confirmDelete)) diff --git a/module/project/view/build.html.php b/module/project/view/build.html.php index f9af1a6c9e..bc066c1293 100644 --- a/module/project/view/build.html.php +++ b/module/project/view/build.html.php @@ -13,7 +13,7 @@ build->confirmDelete)?> -id)?> + -
project->build;?>
diff --git a/module/project/view/team.html.php b/module/project/view/team.html.php index edd1bc93bc..dada0708a8 100644 --- a/module/project/view/team.html.php +++ b/module/project/view/team.html.php @@ -12,7 +12,9 @@ ?> - +project->confirmUnlinkMember)?> +id)?> +
@@ -40,7 +42,11 @@ - + From 32ee5bc3469cbd1a138eb0a941beddd56745d9bc Mon Sep 17 00:00:00 2001 From: xia0ta0 Date: Tue, 30 Jul 2013 16:34:41 +0800 Subject: [PATCH 07/21] * code for task#1657. --- module/build/control.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/module/build/control.php b/module/build/control.php index 944ede73ed..c6dc5970d0 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -153,9 +153,17 @@ class build extends control } else { + $response['result'] = 'success'; + $response['message'] = ''; + $build = $this->build->getById($buildID); $this->build->delete(TABLE_BUILD, $buildID); - die(js::locate($this->createLink('project', 'build', "projectID=$build->project"), 'parent')); + if(dao::isError()) + { + $response['result'] = 'fail'; + $response['message'] = dao::getError(); + } + $this->send($response); } } From aad33ebc2a75b848d48362323d52b174f71ca76a Mon Sep 17 00:00:00 2001 From: xia0ta0 Date: Tue, 30 Jul 2013 16:35:27 +0800 Subject: [PATCH 08/21] * code for task#1657. --- module/project/js/team.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 module/project/js/team.js diff --git a/module/project/js/team.js b/module/project/js/team.js new file mode 100644 index 0000000000..a9bb828a7a --- /dev/null +++ b/module/project/js/team.js @@ -0,0 +1,29 @@ +/** + * unlink member. + * + * @param int projectID + * @param string account + * @access public + * @return void + */ +function unlinkMember(projectID, account) +{ + if(confirm(confirmUnlinkMember)) + { + url = createLink('project', 'unlinkMember','projectID=' + projectID + '&account=' + account + '&confrim=yes'); + $.ajax( + { + type: 'GET', + url: url, + dataType: 'json', + success: function(data) + { + if(data.result == 'success') + { + url = createLink('project', 'team', 'projectID=' + projectID); + $('.outer').load(url + ' #memberlist', function(){sortTable();}); + } + } + }); + } +} From 12b6de8187080696357c67cced8e9f6534679d47 Mon Sep 17 00:00:00 2001 From: xia0ta0 Date: Tue, 30 Jul 2013 16:59:38 +0800 Subject: [PATCH 09/21] * code for task#1657. --- module/project/js/doc.js | 28 ++++++++++++++++++++++++++++ module/project/view/doc.html.php | 9 +++++---- 2 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 module/project/js/doc.js diff --git a/module/project/js/doc.js b/module/project/js/doc.js new file mode 100644 index 0000000000..ff602015bb --- /dev/null +++ b/module/project/js/doc.js @@ -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('project', 'doc', 'projectID=' + projectID); + $('.outer').load(url + ' #doclist', function(){sortTable();}); + } + } + }); + } +} diff --git a/module/project/view/doc.html.php b/module/project/view/doc.html.php index 742396fb68..a71ffadb29 100644 --- a/module/project/view/doc.html.php +++ b/module/project/view/doc.html.php @@ -13,7 +13,9 @@ -
team->account;?>days;?> hours;?> id&account=$member->account", '', 'list', '', 'hiddenwin');?> + id, \"$member->account\")", ' ', '', "class='icon-green-project-unlinkMember' title='{$lang->project->unlinkMember}'"); + ?> +
+doc->confirmDelete)?> +id)?> +
From 29331ccb934de12397d209f45c75f0f2dc728135 Mon Sep 17 00:00:00 2001 From: xia0ta0 Date: Tue, 30 Jul 2013 17:00:35 +0800 Subject: [PATCH 10/21] * code for task#1657. --- module/doc/control.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/module/doc/control.php b/module/doc/control.php index 8b55c04b76..841c6f8ae8 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -417,8 +417,16 @@ class doc extends control } else { + $response['result'] = 'success'; + $response['message'] = ''; + $this->doc->delete(TABLE_DOC, $docID); - die(js::locate($this->session->docList, 'parent')); + if(dao::isError()) + { + $response['result'] = 'fail'; + $response['message'] = dao::getError(); + } + $this->send($response); } } } From 22de2ae12e381f7c5f1fe5af9a798e793e13ed2a Mon Sep 17 00:00:00 2001 From: wyd621 Date: Tue, 30 Jul 2013 17:10:45 +0800 Subject: [PATCH 11/21] * finish task #1616. --- module/webapp/control.php | 2 +- module/webapp/js/common.js | 11 ++++++++++- module/webapp/view/obtain.html.php | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/module/webapp/control.php b/module/webapp/control.php index 7d445d70bf..ac65b8a0de 100644 --- a/module/webapp/control.php +++ b/module/webapp/control.php @@ -156,7 +156,7 @@ class webapp extends control die(js::reload('parent')); } echo js::alert($this->lang->webapp->successInstall); - die(js::reload('parent.parent')); + die(js::closeColorbox('parent.parent')); } $this->view->title = $this->lang->webapp->common . $this->lang->colon . $this->lang->webapp->install; diff --git a/module/webapp/js/common.js b/module/webapp/js/common.js index 75c009218d..e28b91ab2c 100644 --- a/module/webapp/js/common.js +++ b/module/webapp/js/common.js @@ -1,4 +1,13 @@ -if($('a.iframe').size()) $("a.iframe").colorbox({width:450, height:190, iframe:true, transition:'none', scrolling:true}); +if($('a.iframe').size()) +{ + $("a.iframe").colorbox({width:450, height:190, iframe:true, transition:'none', scrolling:true, onCleanup:function() + { + var selfClose = $.cookie('selfClose'); + if(selfClose != 1) return; + $(this).replaceWith(""); + $.cookie('selfClose', 0); + }}); +} if($('a.webapp').size()) $("a.webapp").colorbox({width:700, height:400, iframe:true, transition:'none', scrolling:true}); if($('a.apiapp').size()) $("a.apiapp").colorbox({width:700, height:330, iframe:true, transition:'none', scrolling:true}); if($('a.popup').size()) $("a.popup").colorbox({width:900, height:600, iframe:true, transition:'none', scrolling:true}); diff --git a/module/webapp/view/obtain.html.php b/module/webapp/view/obtain.html.php index 7f33ebc0b1..53e9b47d67 100644 --- a/module/webapp/view/obtain.html.php +++ b/module/webapp/view/obtain.html.php @@ -84,6 +84,7 @@
project->doc;?>
id&from=project");?>
@@ -42,9 +44,8 @@
addedDate;?> id}"; - common::printIcon('doc', 'edit', $vars); - common::printIcon('doc', 'delete', $vars, '', 'list', '','hiddenwin'); + common::printIcon('doc', 'edit', "doc=$doc->id"); + echo html::a("javascript:deleteDoc($doc->id)", ' ', '', "class='icon-green-common-delete' title='{$lang->doc->delete}'"); ?>
+webapp->installed)?> @@ -41,8 +43,8 @@ var browseType = '';
- +
+ recTotal}&recPerPage={$pager->recPerPage}";?> @@ -70,7 +72,7 @@ var browseType = ''; 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}'"); ?> From 60efdc517478c7f28b3c8f9fb347d1880cb5f008 Mon Sep 17 00:00:00 2001 From: xia0ta0 Date: Wed, 31 Jul 2013 09:40:02 +0800 Subject: [PATCH 13/21] * code for task#1657. --- module/release/control.php | 10 +++++++++- module/release/js/browse.js | 28 ++++++++++++++++++++++++++++ module/release/view/browse.html.php | 6 ++++-- 3 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 module/release/js/browse.js diff --git a/module/release/control.php b/module/release/control.php index a3190c3b35..253b3dcc8a 100644 --- a/module/release/control.php +++ b/module/release/control.php @@ -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); } } diff --git a/module/release/js/browse.js b/module/release/js/browse.js new file mode 100644 index 0000000000..595558edc3 --- /dev/null +++ b/module/release/js/browse.js @@ -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();}); + } + } + }); + } +} diff --git a/module/release/view/browse.html.php b/module/release/view/browse.html.php index 1f43d44520..6a4681ca06 100644 --- a/module/release/view/browse.html.php +++ b/module/release/view/browse.html.php @@ -12,7 +12,9 @@ ?> -
+id)?> +release->confirmDelete)?> +
From 00586a2b395f2cd473a7aecd9d86054b256b024c Mon Sep 17 00:00:00 2001 From: xia0ta0 Date: Wed, 31 Jul 2013 10:13:35 +0800 Subject: [PATCH 14/21] * code for task#1657. --- module/product/js/doc.js | 28 ++++++++++++++++++++++++++++ module/product/view/doc.html.php | 9 +++++---- 2 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 module/product/js/doc.js diff --git a/module/product/js/doc.js b/module/product/js/doc.js new file mode 100644 index 0000000000..e9df54bd07 --- /dev/null +++ b/module/product/js/doc.js @@ -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();}); + } + } + }); + } +} diff --git a/module/product/view/doc.html.php b/module/product/view/doc.html.php index b197c81106..6a59a7d046 100644 --- a/module/product/view/doc.html.php +++ b/module/product/view/doc.html.php @@ -13,9 +13,11 @@ +doc->confirmDelete)?> +id)?>
-
release->browse;?>
id");?>
@@ -36,7 +38,7 @@
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}'"); ?>
+
@@ -41,9 +43,8 @@ From 44376ef1d1eb60dfc60fcf6ca554149e4b2ff856 Mon Sep 17 00:00:00 2001 From: xia0ta0 Date: Wed, 31 Jul 2013 10:28:37 +0800 Subject: [PATCH 15/21] * code for task#1657. --- module/my/js/todo.js | 33 ++++++++++++++++++++++++++++++++ module/my/view/todo.html.php | 5 ++++- module/my/view/todolist.html.php | 2 +- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/module/my/js/todo.js b/module/my/js/todo.js index a3a789eb21..9ce579181e 100644 --- a/module/my/js/todo.js +++ b/module/my/js/todo.js @@ -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'}); diff --git a/module/my/view/todo.html.php b/module/my/view/todo.html.php index b09db9ac73..754c9c8f10 100644 --- a/module/my/view/todo.html.php +++ b/module/my/view/todo.html.php @@ -14,6 +14,7 @@ +todo->confirmDelete)?>
@@ -48,7 +49,9 @@ ?>
- +
+ +
diff --git a/module/my/view/todolist.html.php b/module/my/view/todolist.html.php index 3c4881f51b..d7fcc5bafb 100644 --- a/module/my/view/todolist.html.php +++ b/module/my/view/todolist.html.php @@ -33,7 +33,7 @@ id", $todo, 'list', '', 'hiddenwin'); common::printIcon('todo', 'edit', "id=$todo->id", '', 'list', '', '', 'iframe', true); - common::printIcon('todo', 'delete', "id=$todo->id", '', 'list', '', 'hiddenwin'); + echo html::a("javascript:deleteTodo($todo->id)", ' ', '', "class='icon-green-common-delete' title='{$lang->todo->delete}'"); ?> From 8a7f3b5bcdbdb9f7cd357e6418c7123be12df9cc Mon Sep 17 00:00:00 2001 From: xia0ta0 Date: Wed, 31 Jul 2013 10:29:00 +0800 Subject: [PATCH 16/21] * code for task#1657. --- module/todo/control.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/module/todo/control.php b/module/todo/control.php index eb80abf7ba..2221c9d4ee 100644 --- a/module/todo/control.php +++ b/module/todo/control.php @@ -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); } } From 52df5c700332a1dab6a428ac892663651784a67d Mon Sep 17 00:00:00 2001 From: wyd621 Date: Wed, 31 Jul 2013 10:49:27 +0800 Subject: [PATCH 17/21] * adjust setModal4List. --- module/bug/view/browse.custom.html.php | 72 +++++++++- module/bug/view/browse.html.php | 118 ++++++++++++++-- module/bug/view/buglist.custom.html.php | 71 ---------- module/bug/view/buglist.html.php | 110 --------------- module/my/view/bug.html.php | 56 +++++++- module/my/view/buglist.html.php | 54 -------- module/my/view/caselist.html.php | 76 ----------- module/my/view/task.html.php | 75 ++++++++++- module/my/view/tasklist.html.php | 73 ---------- module/my/view/testcase.html.php | 78 ++++++++++- module/my/view/todo.html.php | 143 +++++++++++++++----- module/my/view/todolist.html.php | 77 ----------- module/product/js/browse.js | 1 - module/product/view/browse.html.php | 171 +++++++++++++++++++++++- module/product/view/storylist.html.php | 169 ----------------------- module/project/js/bug.js | 26 ---- module/project/js/common.js | 2 +- module/project/view/bug.html.php | 54 +++++++- module/project/view/buglist.html.php | 51 ------- module/project/view/task.html.php | 133 +++++++++++++++++- module/project/view/tasklist.html.php | 130 ------------------ module/testcase/view/browse.html.php | 79 ++++++++++- module/testcase/view/caselist.html.php | 77 ----------- www/js/my.full.js | 5 +- 24 files changed, 926 insertions(+), 975 deletions(-) delete mode 100644 module/bug/view/buglist.custom.html.php delete mode 100644 module/bug/view/buglist.html.php delete mode 100644 module/my/view/buglist.html.php delete mode 100644 module/my/view/caselist.html.php delete mode 100644 module/my/view/tasklist.html.php delete mode 100644 module/my/view/todolist.html.php delete mode 100644 module/product/view/storylist.html.php delete mode 100644 module/project/view/buglist.html.php delete mode 100644 module/project/view/tasklist.html.php delete mode 100644 module/testcase/view/caselist.html.php diff --git a/module/bug/view/browse.custom.html.php b/module/bug/view/browse.custom.html.php index b1f3177b41..9c54c6195c 100644 --- a/module/bug/view/browse.custom.html.php +++ b/module/bug/view/browse.custom.html.php @@ -12,7 +12,77 @@
diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index 52a45dfa96..fe8e63aafc 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -11,13 +11,6 @@ */ ?> -
id}&projectID=0&from=product");?>
addedDate;?> 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}'"); ?>
'> - + + recTotal}&recPerPage={$pager->recPerPage}"; ?> + + + + + + + + + + + id");?> + + + + + + + + + + + + + + + +
bug->$fieldName);?>actions;?>
+ + + + $fieldName); + } + elseif(preg_match('/assignedTo|by/i', $fieldName)) + { + echo $users[$bug->$fieldName]; + } + elseif(preg_match('/^(severity|pri|resolution|os|type|browse|status|confirmed)$/i', $fieldName)) + { + $key = $fieldName . 'List'; + $list = $lang->bug->$key; + echo $list[$bug->$fieldName]; + } + else + { + echo !($bug->$fieldName == '0') ? $bug->$fieldName : ''; + } + ?> + + id"; + common::printIcon('bug', 'resolve', $params, $bug, 'list', '', '', 'iframe', true); + common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true); + common::printIcon('bug', 'edit', $params, $bug, 'list'); + ?> + +
+ +
+ edit); + ?> +
+ +
show();?>
+
- + + recTotal}&recPerPage={$pager->recPerPage}"; ?> + + + + + + + + + cookie->windowWidth >= $this->config->wideSize):?> + + + + + + + + + + cookie->windowWidth >= $this->config->wideSize):?> + + + + + + + + cookie->windowWidth >= $this->config->wideSize):?> + + + + + + + + + + + id");?> + + + + + + confirmed;?> + + + cookie->windowWidth >= $this->config->wideSize):?> + + + + + + + + + + cookie->windowWidth >= $this->config->wideSize):?> + + + + + + + + cookie->windowWidth >= $this->config->wideSize):?> + + + + + + + + + + + cookie->windowWidth >= $this->config->wideSize ? 12 : 9; + if($browseType == 'needconfirm') $columns = $this->cookie->windowWidth >= $this->config->wideSize ? 7 : 6; + ?> + + + +
idAB);?> bug->severityAB);?> priAB);?> bug->title);?>bug->statusAB);?>bug->story);?>actions;?>openedByAB);?>bug->openedDateAB);?>assignedToAB);?>bug->resolvedByAB);?>bug->resolutionAB);?>bug->resolvedDateAB);?>actions;?>
+ + + + id));?> + severity;?>'>severity;?>bug->priList[$bug->pri];?>'>bug->priList[$bug->pri];?>[{$lang->bug->confirmedList[$bug->confirmed]}] " . html::a($bugLink, $bug->title);?>bug->statusList[$bug->status];?>createLink('story', 'view', "stoyID=$bug->story"), $bug->storyTitle, '_blank');?>bug->confirmStoryChange = $lang->confirm; common::printIcon('bug', 'confirmStoryChange', "bugID=$bug->id", '', 'list', '', 'hiddenwin')?>openedBy];?>openedDate, 5, 11)?>assignedTo == $this->app->user->account) echo 'class="red"';?>>assignedTo];?>resolvedBy];?>bug->resolutionList[$bug->resolution];?>resolvedDate, 5, 11)?> + id"; + common::printIcon('bug', 'confirmBug', $params, $bug, 'list', '', '', 'iframe', true); + common::printIcon('bug', 'assignTo', $params, '', 'list', '', '', 'iframe', true); + common::printIcon('bug', 'resolve', $params, $bug, 'list', '', '', 'iframe', true); + common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true); + common::printIcon('bug', 'edit', $params, $bug, 'list'); + common::printIcon('bug', 'create', "product=$bug->product&extra=bugID=$bug->id", $bug, 'list', 'copy'); + ?> +
+ +
+ edit); + ?> +
+ +
show();?>
+
diff --git a/module/bug/view/buglist.custom.html.php b/module/bug/view/buglist.custom.html.php deleted file mode 100644 index c07c6b86ed..0000000000 --- a/module/bug/view/buglist.custom.html.php +++ /dev/null @@ -1,71 +0,0 @@ - - recTotal}&recPerPage={$pager->recPerPage}"; ?> - - - - - - - - - - - id");?> - - - - - - - - - - - - - - - -
bug->$fieldName);?>actions;?>
- - - - $fieldName); - } - elseif(preg_match('/assignedTo|by/i', $fieldName)) - { - echo $users[$bug->$fieldName]; - } - elseif(preg_match('/^(severity|pri|resolution|os|type|browse|status|confirmed)$/i', $fieldName)) - { - $key = $fieldName . 'List'; - $list = $lang->bug->$key; - echo $list[$bug->$fieldName]; - } - else - { - echo !($bug->$fieldName == '0') ? $bug->$fieldName : ''; - } - ?> - - id"; - common::printIcon('bug', 'resolve', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'edit', $params, $bug, 'list'); - ?> - -
- -
- edit); - ?> -
- -
show();?>
-
diff --git a/module/bug/view/buglist.html.php b/module/bug/view/buglist.html.php deleted file mode 100644 index 3a99b44e3e..0000000000 --- a/module/bug/view/buglist.html.php +++ /dev/null @@ -1,110 +0,0 @@ - - recTotal}&recPerPage={$pager->recPerPage}"; ?> - - - - - - - - - cookie->windowWidth >= $this->config->wideSize):?> - - - - - - - - - - cookie->windowWidth >= $this->config->wideSize):?> - - - - - - - - cookie->windowWidth >= $this->config->wideSize):?> - - - - - - - - - - - id");?> - - - - - - confirmed;?> - - - cookie->windowWidth >= $this->config->wideSize):?> - - - - - - - - - - cookie->windowWidth >= $this->config->wideSize):?> - - - - - - - - cookie->windowWidth >= $this->config->wideSize):?> - - - - - - - - - - - cookie->windowWidth >= $this->config->wideSize ? 12 : 9; - if($browseType == 'needconfirm') $columns = $this->cookie->windowWidth >= $this->config->wideSize ? 7 : 6; - ?> - - - -
idAB);?> bug->severityAB);?> priAB);?> bug->title);?>bug->statusAB);?>bug->story);?>actions;?>openedByAB);?>bug->openedDateAB);?>assignedToAB);?>bug->resolvedByAB);?>bug->resolutionAB);?>bug->resolvedDateAB);?>actions;?>
- - - - id));?> - severity;?>'>severity;?>bug->priList[$bug->pri];?>'>bug->priList[$bug->pri];?>[{$lang->bug->confirmedList[$bug->confirmed]}] " . html::a($bugLink, $bug->title);?>bug->statusList[$bug->status];?>createLink('story', 'view', "stoyID=$bug->story"), $bug->storyTitle, '_blank');?>bug->confirmStoryChange = $lang->confirm; common::printIcon('bug', 'confirmStoryChange', "bugID=$bug->id", '', 'list', '', 'hiddenwin')?>openedBy];?>openedDate, 5, 11)?>assignedTo == $this->app->user->account) echo 'class="red"';?>>assignedTo];?>resolvedBy];?>bug->resolutionList[$bug->resolution];?>resolvedDate, 5, 11)?> - id"; - common::printIcon('bug', 'confirmBug', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'assignTo', $params, '', 'list', '', '', 'iframe', true); - common::printIcon('bug', 'resolve', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'edit', $params, $bug, 'list'); - common::printIcon('bug', 'create', "product=$bug->product&extra=bugID=$bug->id", $bug, 'list', 'copy'); - ?> -
- -
- edit); - ?> -
- -
show();?>
-
diff --git a/module/my/view/bug.html.php b/module/my/view/bug.html.php index ed0665daa7..cc65a51666 100644 --- a/module/my/view/bug.html.php +++ b/module/my/view/bug.html.php @@ -10,7 +10,6 @@ * @link http://www.zentao.net */ ?> -
@@ -24,7 +23,60 @@
'> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
idAB);?> bug->severityAB);?> priAB);?> typeAB);?> bug->title);?> openedByAB);?> bug->resolvedByAB);?>bug->resolutionAB);?>actions;?>
+ + createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id), '_blank');?> + bug->severityList[$bug->severity]?>'>bug->severityList[$bug->severity]) ? $lang->bug->severityList[$bug->severity] : $bug->severity;?>bug->priList[$bug->pri]?>'>bug->priList[$bug->pri]) ? $lang->bug->priList[$bug->pri] : $bug->pri?>bug->typeList[$bug->type]?>createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?>openedBy];?>resolvedBy];?>bug->resolutionList[$bug->resolution];?> + id"; + common::printIcon('bug', 'confirmBug', $params, $bug, 'list', '', '', 'iframe', true); + common::printIcon('bug', 'assignTo', $params, '', 'list', '', '', 'iframe', true); + common::printIcon('bug', 'resolve', $params, $bug, 'list', '', '', 'iframe', true); + common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true); + common::printIcon('bug', 'edit', $params, '', 'list'); + ?> +
+ +
+ edit);?> +
+ + show();?> +
diff --git a/module/my/view/buglist.html.php b/module/my/view/buglist.html.php deleted file mode 100644 index 36728068b9..0000000000 --- a/module/my/view/buglist.html.php +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
idAB);?> bug->severityAB);?> priAB);?> typeAB);?> bug->title);?> openedByAB);?> bug->resolvedByAB);?>bug->resolutionAB);?>actions;?>
- - createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id), '_blank');?> - bug->severityList[$bug->severity]?>'>bug->severityList[$bug->severity]) ? $lang->bug->severityList[$bug->severity] : $bug->severity;?>bug->priList[$bug->pri]?>'>bug->priList[$bug->pri]) ? $lang->bug->priList[$bug->pri] : $bug->pri?>bug->typeList[$bug->type]?>createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?>openedBy];?>resolvedBy];?>bug->resolutionList[$bug->resolution];?> - id"; - common::printIcon('bug', 'confirmBug', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'assignTo', $params, '', 'list', '', '', 'iframe', true); - common::printIcon('bug', 'resolve', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'edit', $params, '', 'list'); - ?> -
- -
- edit);?> -
- - show();?> -
diff --git a/module/my/view/caselist.html.php b/module/my/view/caselist.html.php deleted file mode 100644 index c01e1eac45..0000000000 --- a/module/my/view/caselist.html.php +++ /dev/null @@ -1,76 +0,0 @@ - - app->loadLang('testtask'); - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
idAB);?> priAB);?> testcase->title);?> typeAB);?> openedByAB);?> testtask->lastRunAccount);?> testtask->lastRunTime);?> testtask->lastRunResult);?>statusAB);?>actions;?>
- - createLink('testcase', 'view', "testcaseID=$case->id"), sprintf('%03d', $case->id));?> - pri?>'>pri?> - createLink('testcase', 'view', "testcaseID=$case->id"), $case->title);?>testcase->typeList[$case->type];?>openedBy];?>lastRunner];?>lastRunDate)) echo date(DT_MONTHTIME1, strtotime($case->lastRunDate));?>lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?>testcase->statusList[$case->status];?> - id&version=$case->version", '', 'list', '', '', 'iframe'); - common::printIcon('testtask', 'results', "runID=0&caseID=$case->id", '', 'list', '', '', 'iframe'); - common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list'); - common::printIcon('testcase', 'create', "productID=$case->product&moduleID=$case->module&from=testcase¶m=$case->id", $case, 'list', 'copy'); - common::printIcon('testcase', 'delete', "caseID=$case->id", '', 'list', '', 'hiddenwin'); - common::printIcon('testcase', 'createBug', "product=$case->product&extra=caseID=$case->id,version=$case->version,runID=", $case, 'list', 'createBug'); - ?> -
- -
- createLink('testcase', 'batchEdit'); - echo html::submitButton($lang->edit, "onclick=changeAction('myCaseForm','batchEdit','$actionLink')"); - } - if($canBatchRun) - { - $actionLink = $this->createLink('testtask', 'batchRun', "productID=0&orderBy=$orderBy&from=testcase"); - echo html::submitButton($lang->testtask->runCase, "onclick=changeAction('myCaseForm','batchEdit','$actionLink')"); - } - ?> -
- - show();?> -
diff --git a/module/my/view/task.html.php b/module/my/view/task.html.php index 5df9859f9b..06b02715a9 100644 --- a/module/my/view/task.html.php +++ b/module/my/view/task.html.php @@ -10,7 +10,6 @@ * @link http://www.zentao.net */ ?> - @@ -26,7 +25,79 @@
- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
idAB);?> priAB);?> task->project);?> task->name);?> task->estimateAB);?> task->consumedAB);?> task->leftAB);?> task->deadlineAB);?>statusAB);?> openedByAB);?> actions;?>
+ + createLink('task', 'view', "taskID=$task->id"), sprintf('%03d', $task->id));?> + task->priList[$task->pri];?>'>task->priList[$task->pri]) ? $lang->task->priList[$task->pri] : $task->pri;?>createLink('project', 'browse', "projectid=$task->projectID"), $task->projectName);?> + createLink('task', 'view', "taskID=$task->id"), $task->name);?>estimate;?>consumed;?>left;?>delay)) echo 'delayed';?>>deadline, 0, 4) > 0) echo $task->deadline;?>task->statusList[$task->status];?>openedBy];?> + project&taskID=$task->id", $task, 'list', '', '', 'iframe', true); + common::printIcon('task', 'start', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); + common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); + common::printIcon('task', 'finish', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); + common::printIcon('task', 'close', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); + common::printIcon('task', 'edit', "taskID=$task->id", '', 'list'); + ?> +
+ +
+ createLink('task', 'batchEdit', "projectID=0&orderBy=$orderBy"); + echo html::commonButton($lang->edit, "onclick=\"changeAction('myTaskForm', 'batchEdit', '$actionLink')\""); + } + if($canBatchClose) + { + $actionLink = $this->createLink('task', 'batchClose'); + echo html::commonButton($lang->close, "onclick=\"changeAction('myTaskForm', 'batchClose', '$actionLink')\""); + } + ?> +
+ + show();?> +
diff --git a/module/my/view/tasklist.html.php b/module/my/view/tasklist.html.php deleted file mode 100644 index 8f09c1578e..0000000000 --- a/module/my/view/tasklist.html.php +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
idAB);?> priAB);?> task->project);?> task->name);?> task->estimateAB);?> task->consumedAB);?> task->leftAB);?> task->deadlineAB);?>statusAB);?> openedByAB);?> actions;?>
- - createLink('task', 'view', "taskID=$task->id"), sprintf('%03d', $task->id));?> - task->priList[$task->pri];?>'>task->priList[$task->pri]) ? $lang->task->priList[$task->pri] : $task->pri;?>createLink('project', 'browse', "projectid=$task->projectID"), $task->projectName);?> - createLink('task', 'view', "taskID=$task->id"), $task->name);?>estimate;?>consumed;?>left;?>delay)) echo 'delayed';?>>deadline, 0, 4) > 0) echo $task->deadline;?>task->statusList[$task->status];?>openedBy];?> - project&taskID=$task->id", $task, 'list', '', '', 'iframe', true); - common::printIcon('task', 'start', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); - common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); - common::printIcon('task', 'finish', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); - common::printIcon('task', 'close', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); - common::printIcon('task', 'edit', "taskID=$task->id", '', 'list'); - ?> -
- -
- createLink('task', 'batchEdit', "projectID=0&orderBy=$orderBy"); - echo html::commonButton($lang->edit, "onclick=\"changeAction('myTaskForm', 'batchEdit', '$actionLink')\""); - } - if($canBatchClose) - { - $actionLink = $this->createLink('task', 'batchClose'); - echo html::commonButton($lang->close, "onclick=\"changeAction('myTaskForm', 'batchClose', '$actionLink')\""); - } - ?> -
- - show();?> -
diff --git a/module/my/view/testcase.html.php b/module/my/view/testcase.html.php index 538eada6c9..ef75d92a12 100644 --- a/module/my/view/testcase.html.php +++ b/module/my/view/testcase.html.php @@ -10,7 +10,6 @@ * @link http://www.zentao.net */ ?> -
@@ -25,7 +24,82 @@
- + + app->loadLang('testtask'); + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
idAB);?> priAB);?> testcase->title);?> typeAB);?> openedByAB);?> testtask->lastRunAccount);?> testtask->lastRunTime);?> testtask->lastRunResult);?>statusAB);?>actions;?>
+ + createLink('testcase', 'view', "testcaseID=$case->id"), sprintf('%03d', $case->id));?> + pri?>'>pri?> + createLink('testcase', 'view', "testcaseID=$case->id"), $case->title);?>testcase->typeList[$case->type];?>openedBy];?>lastRunner];?>lastRunDate)) echo date(DT_MONTHTIME1, strtotime($case->lastRunDate));?>lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?>testcase->statusList[$case->status];?> + id&version=$case->version", '', 'list', '', '', 'iframe'); + common::printIcon('testtask', 'results', "runID=0&caseID=$case->id", '', 'list', '', '', 'iframe'); + common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list'); + common::printIcon('testcase', 'create', "productID=$case->product&moduleID=$case->module&from=testcase¶m=$case->id", $case, 'list', 'copy'); + common::printIcon('testcase', 'delete', "caseID=$case->id", '', 'list', '', 'hiddenwin'); + common::printIcon('testcase', 'createBug', "product=$case->product&extra=caseID=$case->id,version=$case->version,runID=", $case, 'list', 'createBug'); + ?> +
+ +
+ createLink('testcase', 'batchEdit'); + echo html::submitButton($lang->edit, "onclick=changeAction('myCaseForm','batchEdit','$actionLink')"); + } + if($canBatchRun) + { + $actionLink = $this->createLink('testtask', 'batchRun', "productID=0&orderBy=$orderBy&from=testcase"); + echo html::submitButton($lang->testtask->runCase, "onclick=changeAction('myCaseForm','batchEdit','$actionLink')"); + } + ?> +
+ + show();?> +
diff --git a/module/my/view/todo.html.php b/module/my/view/todo.html.php index b09db9ac73..e6774881ef 100644 --- a/module/my/view/todo.html.php +++ b/module/my/view/todo.html.php @@ -10,45 +10,120 @@ * @link http://www.zentao.net */ ?> - -
-
-
- todo->periods as $period => $label) - { - $vars = "date=$period"; - if($period == 'before') $vars .= "&account={$app->user->account}&status=undone"; - echo "" . html::a(inlink('todo', $vars), $label) . ''; - } - echo "" . html::input('date', $date,"class='w-date date' onchange='changeDate(this.value)'") . ''; +
+
+ todo->periods as $period => $label) + { + $vars = "date=$period"; + if($period == 'before') $vars .= "&account={$app->user->account}&status=undone"; + echo "" . html::a(inlink('todo', $vars), $label) . ''; + } + echo "" . html::input('date', $date,"class='w-date date' onchange='changeDate(this.value)'") . ''; - if($type == 'bydate') - { - if($date == date('Y-m-d')) - { - $type = 'today'; - } - else if($date == date('Y-m-d', strtotime('-1 day'))) - { - $type = 'yesterday'; - } - } - ?> - -
-
- -
+ if($type == 'bydate') + { + if($date == date('Y-m-d')) + { + $type = 'today'; + } + else if($date == date('Y-m-d', strtotime('-1 day'))) + { + $type = 'yesterday'; + } + } + ?> +
- +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
idAB);?> todo->date);?> todo->type);?> priAB);?> todo->name);?> todo->beginAB);?> todo->endAB);?>todo->status);?>actions;?>
+ + + + id; ?> + date == '2030-01-01' ? $lang->todo->periods['future'] : $todo->date;?>todo->typeList[$todo->type];?>pri;?>'>pri?>createLink('todo', 'view', "id=$todo->id&from=my", '', true), $todo->name, '', "class='colorbox'");?>begin;?>end;?>todo->statusList[$todo->status];?> + id", $todo, 'list', '', 'hiddenwin'); + common::printIcon('todo', 'edit', "id=$todo->id", '', 'list', '', '', 'iframe', true); + common::printIcon('todo', 'delete', "id=$todo->id", '', 'list', '', 'hiddenwin'); + ?> +
+
+ createLink('todo', 'batchEdit', "from=myTodo&type=$type&account=$account&status=$status"); + echo html::commonButton($lang->edit, "onclick=\"changeAction('todoform', 'batchEdit', '$actionLink')\""); + + } + if(common::hasPriv('todo', 'batchFinish')) + { + $actionLink = $this->createLink('todo', 'batchFinish'); + echo html::commonButton($lang->todo->finish, "onclick=\"changeAction('todoform', 'batchFinish', '$actionLink')\""); + + } + if(common::hasPriv('todo', 'import2Today') and $importFuture) + { + $actionLink = $this->createLink('todo', 'import2Today'); + echo html::commonButton($lang->todo->import, "onclick=\"changeAction('todoform', 'import2Today', '$actionLink')\""); + echo html::input('date', date('Y-m-d'), "class='date w-80px'"); + } + ?> +
+ show();?> +
diff --git a/module/my/view/todolist.html.php b/module/my/view/todolist.html.php deleted file mode 100644 index 3c4881f51b..0000000000 --- a/module/my/view/todolist.html.php +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
idAB);?> todo->date);?> todo->type);?> priAB);?> todo->name);?> todo->beginAB);?> todo->endAB);?>todo->status);?>actions;?>
- - - - id; ?> - date == '2030-01-01' ? $lang->todo->periods['future'] : $todo->date;?>todo->typeList[$todo->type];?>pri;?>'>pri?>createLink('todo', 'view', "id=$todo->id&from=my", '', true), $todo->name, '', "class='colorbox'");?>begin;?>end;?>todo->statusList[$todo->status];?> - id", $todo, 'list', '', 'hiddenwin'); - common::printIcon('todo', 'edit', "id=$todo->id", '', 'list', '', '', 'iframe', true); - common::printIcon('todo', 'delete', "id=$todo->id", '', 'list', '', 'hiddenwin'); - ?> -
-
- createLink('todo', 'batchEdit', "from=myTodo&type=$type&account=$account&status=$status"); - echo html::commonButton($lang->edit, "onclick=\"changeAction('todoform', 'batchEdit', '$actionLink')\""); - - } - if(common::hasPriv('todo', 'batchFinish')) - { - $actionLink = $this->createLink('todo', 'batchFinish'); - echo html::commonButton($lang->todo->finish, "onclick=\"changeAction('todoform', 'batchFinish', '$actionLink')\""); - - } - if(common::hasPriv('todo', 'import2Today') and $importFuture) - { - $actionLink = $this->createLink('todo', 'import2Today'); - echo html::commonButton($lang->todo->import, "onclick=\"changeAction('todoform', 'import2Today', '$actionLink')\""); - echo html::input('date', date('Y-m-d'), "class='date w-80px'"); - } - ?> -
- show();?> -
diff --git a/module/product/js/browse.js b/module/product/js/browse.js index c6881fa941..6e4d9fba04 100644 --- a/module/product/js/browse.js +++ b/module/product/js/browse.js @@ -87,5 +87,4 @@ function toggleSubMenu(currentID, position, menuIndex) $(function() { if(browseType == 'bysearch') ajaxGetSearchForm(); - setModal4List('iframe', 'storyList'); }) diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index ab9c6d2be0..fe9e23f701 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -10,7 +10,6 @@ * @link http://www.zentao.net */ ?> - @@ -54,7 +53,175 @@ var browseType = '';
- + + + + recTotal}&recPerPage={$pager->recPerPage}";?> + + + + + + + + + + + + + + + $story):?> + createLink('story', 'view', "storyID=$story->id"); + $canView = common::hasPriv('story', 'view'); + ?> + + + + + + + + + + + + + + + + + + + + +
idAB);?> priAB);?> story->title);?> story->planAB);?> story->source);?> openedByAB);?> assignedToAB);?>story->estimateAB);?> statusAB);?> story->stageAB);?>actions;?>
+ + id)); else printf('%03d', $story->id);?> + story->priList[$story->pri];?>'>story->priList[$story->pri]?>title);?>planTitle;?>story->sourceList[$story->source];?>openedBy];?>assignedTo];?>estimate;?>story->statusList[$story->status];?>story->stageList[$story->stage];?> + id}"; + common::printIcon('story', 'change', $vars, $story, 'list'); + common::printIcon('story', 'review', $vars, $story, 'list'); + common::printIcon('story', 'close', $vars, $story, 'list'); + common::printIcon('story', 'edit', $vars, $story, 'list'); + common::printIcon('story', 'createCase', "productID=$story->product&module=0&from=¶m=0&$vars", $story, 'list', 'createCase'); + ?> +
+
+ "; + echo html::selectAll() . html::selectReverse(); + echo "
"; + + $canBatchEdit = common::hasPriv('story', 'batchEdit'); + $disabled = $canBatchEdit ? '' : "disabled='disabled'"; + $actionLink = $this->createLink('story', 'batchEdit', "productID=$productID&projectID=0"); + + echo "
"; + echo html::commonButton($lang->edit, "onclick=\"changeAction('$actionLink')\" $disabled"); + echo ""; + echo "
"; + } + + echo $summary; + ?> + + show();?> +
+ + + + + + + + + +
diff --git a/module/product/view/storylist.html.php b/module/product/view/storylist.html.php deleted file mode 100644 index 7c51aa6a0c..0000000000 --- a/module/product/view/storylist.html.php +++ /dev/null @@ -1,169 +0,0 @@ - - - - recTotal}&recPerPage={$pager->recPerPage}";?> - - - - - - - - - - - - - - - $story):?> - createLink('story', 'view', "storyID=$story->id"); - $canView = common::hasPriv('story', 'view'); - ?> - - - - - - - - - - - - - - - - - - - - -
idAB);?> priAB);?> story->title);?> story->planAB);?> story->source);?> openedByAB);?> assignedToAB);?>story->estimateAB);?> statusAB);?> story->stageAB);?>actions;?>
- - id)); else printf('%03d', $story->id);?> - story->priList[$story->pri];?>'>story->priList[$story->pri]?>title);?>planTitle;?>story->sourceList[$story->source];?>openedBy];?>assignedTo];?>estimate;?>story->statusList[$story->status];?>story->stageList[$story->stage];?> - id}"; - common::printIcon('story', 'change', $vars, $story, 'list'); - common::printIcon('story', 'review', $vars, $story, 'list'); - common::printIcon('story', 'close', $vars, $story, 'list'); - common::printIcon('story', 'edit', $vars, $story, 'list'); - common::printIcon('story', 'createCase', "productID=$story->product&module=0&from=¶m=0&$vars", $story, 'list', 'createCase'); - ?> -
-
- "; - echo html::selectAll() . html::selectReverse(); - echo "
"; - - $canBatchEdit = common::hasPriv('story', 'batchEdit'); - $disabled = $canBatchEdit ? '' : "disabled='disabled'"; - $actionLink = $this->createLink('story', 'batchEdit', "productID=$productID&projectID=0"); - - echo "
"; - echo html::commonButton($lang->edit, "onclick=\"changeAction('$actionLink')\" $disabled"); - echo ""; - echo "
"; - } - - echo $summary; - ?> - - show();?> -
- - - - - - - - - - diff --git a/module/project/js/bug.js b/module/project/js/bug.js index e46b1e5912..e69de29bb2 100644 --- a/module/project/js/bug.js +++ b/module/project/js/bug.js @@ -1,26 +0,0 @@ -function setModal4List(colorboxClass, replaceID) -{ - replaceID = 'bugList'; - $('.' + colorboxClass).colorbox( - { - width:900, - height:500, - iframe:true, - transition:'none', - - onCleanup:function() - { - saveWindowSize(); - - var link = self.location.href; - $.get(link, {ajax: "yes"}, function(data) - { - $('#' + replaceID).replaceWith(data) - setModal4List(colorboxClass, replaceID) - - $('.colored').colorize(); - $('tfoot td').css('background', 'white').unbind('click').unbind('hover'); - }); - } - }); -} diff --git a/module/project/js/common.js b/module/project/js/common.js index e0bcf39255..53723c0cfc 100644 --- a/module/project/js/common.js +++ b/module/project/js/common.js @@ -113,7 +113,7 @@ function computeEndDate(delta) $(function() { $(".chosenBox select").chosen({no_results_text: noResultsMatch}); - setModal4List('iframe', 'taskList'); + if(typeof(replaceID) != 'undefined') setModal4List('iframe', replaceID); $(".date").bind('dateSelected', function() { computeWorkDays(this.id); diff --git a/module/project/view/bug.html.php b/module/project/view/bug.html.php index 55a98d5b53..e1af1bab9d 100644 --- a/module/project/view/bug.html.php +++ b/module/project/view/bug.html.php @@ -10,8 +10,58 @@ * @link http://www.zentao.net */ ?> - - + + + + + id}&orderBy=%s&build=$buildID&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?> + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ project->bug; + if($build) echo '(Build:' . $build->name . ')'; + ?> +
+
id");?>
+
idAB);?>bug->severityAB);?> priAB);?> bug->title);?> openedByAB);?> assignedToAB);?> bug->resolvedBy);?>bug->resolutionAB);?>actions;?>
createLink('bug', 'view', "bugID=$bug->id"), $bug->id, '_blank');?>bug->severityList[$bug->severity]?>'>bug->severityList[$bug->severity]?>bug->priList[$bug->pri]?>'>bug->priList[$bug->pri]?>createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?>openedBy];?>assignedTo];?>resolvedBy];?>bug->resolutionList[$bug->resolution];?> + id"; + common::printIcon('bug', 'confirmBug', $params, $bug, 'list', '', '', 'iframe', true); + common::printIcon('bug', 'assignTo', $params, '', 'list', '', '', 'iframe', true); + common::printIcon('bug', 'resolve', $params, $bug, 'list', '', '', 'iframe', true); + common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true); + common::printIcon('bug', 'edit', $params, $bug, 'list'); + common::printIcon('bug', 'create', "product=$bug->product&extra=bugID=$bug->id", $bug, 'list', 'copy'); + ?> +
show();?>
+
+ diff --git a/module/project/view/buglist.html.php b/module/project/view/buglist.html.php deleted file mode 100644 index fe00c40c51..0000000000 --- a/module/project/view/buglist.html.php +++ /dev/null @@ -1,51 +0,0 @@ - - - - - id}&orderBy=%s&build=$buildID&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?> - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- project->bug; - if($build) echo '(Build:' . $build->name . ')'; - ?> -
-
id");?>
-
idAB);?>bug->severityAB);?> priAB);?> bug->title);?> openedByAB);?> assignedToAB);?> bug->resolvedBy);?>bug->resolutionAB);?>actions;?>
createLink('bug', 'view', "bugID=$bug->id"), $bug->id, '_blank');?>bug->severityList[$bug->severity]?>'>bug->severityList[$bug->severity]?>bug->priList[$bug->pri]?>'>bug->priList[$bug->pri]?>createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?>openedBy];?>assignedTo];?>resolvedBy];?>bug->resolutionList[$bug->resolution];?> - id"; - common::printIcon('bug', 'confirmBug', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'assignTo', $params, '', 'list', '', '', 'iframe', true); - common::printIcon('bug', 'resolve', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'edit', $params, $bug, 'list'); - common::printIcon('bug', 'create', "product=$bug->product&extra=bugID=$bug->id", $bug, 'list', 'copy'); - ?> -
show();?>
-
diff --git a/module/project/view/task.html.php b/module/project/view/task.html.php index 3c75e58323..6c587fc3f7 100644 --- a/module/project/view/task.html.php +++ b/module/project/view/task.html.php @@ -10,7 +10,6 @@ * @link http://www.zentao.net */ ?> - @@ -39,11 +38,141 @@ var browseType = '';
- + + id&status=$status&parma=$param&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage"; ?> + + + + + + + + + cookie->windowWidth > $this->config->wideSize):?> + + + + + + + cookie->windowWidth > $this->config->wideSize):?> + + + + + + + type == 'sprint') print '';?> + + + + + + + assignedTo == $app->user->account ? 'style=color:red' : ''; ?> + + + + + + + + cookie->windowWidth > $this->config->wideSize):?> + + + + cookie->windowWidth > $this->config->wideSize):?> + + + + type == 'sprint') + { + echo ''; + } + ?> + + + + + + + cookie->windowWidth > $this->config->wideSize ? 14 : 12) - ($project->type == 'sprint' ? 0 : 1);?> + + + +
idAB);?> priAB);?> task->name);?>statusAB);?> task->deadlineAB);?> task->openedDateAB);?> task->assignedToAB);?> task->finishedByAB);?> task->finishedDateAB);?> task->estimateAB);?> task->consumedAB);?> task->leftAB);?>' and common::printOrderLink('story', $orderBy, $vars, $lang->task->story) and print 'actions;?>
+ + + + id", sprintf('%03d', $task->id))) printf('%03d', $task->id);?> + task->priList[$task->pri]?>'>task->priList[$task->pri];?> + id", $task->name)) echo $task->name; + if($task->fromBug) echo html::a($this->createLink('bug', 'view', "id=$task->fromBug"), "[BUG#$task->fromBug]", '_blank', "class='bug'"); + ?> + status;?> > + storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion); + $storyChanged ? print("{$lang->story->changed} ") : print($lang->task->statusList[$task->status]); + ?> + delay)) echo 'delayed';?>>deadline, 0, 4) > 0) echo substr($task->deadline, 5, 6);?>openedDate, 5, 6);?> + + + >assignedTo == 'closed' ? 'Closed' : $task->assignedToRealName;?>finishedBy];?>finishedDate, 5, 6);?> + + + estimate;?>consumed;?>left;?>storyID) + { + if(!common::printLink('story', 'view', "storyid=$task->storyID", $task->storyTitle)) print $task->storyTitle; + } + echo ' + project&taskID=$task->id", $task, 'list', '', '', 'iframe', true); + common::printIcon('task', 'start', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); + + common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); + if($browseType == 'needconfirm') + { + $lang->task->confirmStoryChange = $lang->confirm; + common::printIcon('task', 'confirmStoryChange', "taskid=$task->id", '', 'list', '', 'hiddenwin'); + } + common::printIcon('task', 'finish', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); + common::printIcon('task', 'close', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); + common::printIcon('task', 'edit',"taskID=$task->id", '', 'list'); + ?> +
+
+ createLink('task', 'batchEdit', "projectID=$projectID"); + echo html::commonButton($lang->edit, "onclick=\"changeAction('projectTaskForm', 'batchEdit', '$actionLink')\""); + } + if($canBatchClose) + { + $actionLink = $this->createLink('task', 'batchClose'); + echo html::commonButton($lang->close, "onclick=\"changeAction('projectTaskForm', 'batchClose', '$actionLink')\""); + } + } + echo $summary; + ?> +
+ show();?> +
+