From 4038b40e7430781437b43cd99d775799a1041a88 Mon Sep 17 00:00:00 2001 From: wyd621 Date: Thu, 18 Jul 2013 08:30:14 +0800 Subject: [PATCH] * finish task #1576. --- lib/front/front.class.php | 8 ++- module/bug/view/activate.html.php | 6 +- module/bug/view/browse.html.php | 2 +- module/bug/view/buglist.custom.html.php | 7 +-- module/bug/view/buglist.html.php | 1 - module/bug/view/close.html.php | 6 +- module/bug/view/confirmbug.html.php | 6 +- module/bug/view/resolve.html.php | 6 +- module/bug/view/view.html.php | 2 +- module/common/control.php | 5 ++ module/my/js/common.js | 3 +- module/my/view/bug.html.php | 58 +----------------- module/my/view/buglist.html.php | 54 +++++++++++++++++ module/my/view/story.html.php | 2 +- module/my/view/task.html.php | 76 +----------------------- module/my/view/tasklist.html.php | 73 +++++++++++++++++++++++ module/my/view/todo.html.php | 79 +------------------------ module/my/view/todolist.html.php | 76 ++++++++++++++++++++++++ module/product/view/browse.html.php | 2 +- module/product/view/storylist.html.php | 3 +- module/project/js/bug.js | 2 +- module/project/js/story.js | 1 - module/project/view/bug.html.php | 2 +- module/project/view/buglist.html.php | 1 - module/project/view/story.html.php | 2 +- module/project/view/task.html.php | 2 +- module/project/view/tasklist.html.php | 1 - module/story/view/view.html.php | 4 +- module/task/control.php | 2 +- module/task/view/view.html.php | 2 +- module/testcase/js/browse.js | 2 +- module/testcase/view/browse.html.php | 2 +- module/testcase/view/caselist.html.php | 1 - module/todo/control.php | 1 + module/todo/view/view.html.php | 2 +- www/js/my.full.js | 10 +++- 36 files changed, 255 insertions(+), 257 deletions(-) create mode 100644 module/my/view/buglist.html.php create mode 100644 module/my/view/tasklist.html.php create mode 100644 module/my/view/todolist.html.php diff --git a/lib/front/front.class.php b/lib/front/front.class.php index 0223657db2..9dd44200be 100644 --- a/lib/front/front.class.php +++ b/lib/front/front.class.php @@ -444,6 +444,7 @@ EOT; public static function backButton($misc = '') { global $lang; + if(isonlybody()) return false; return ""; } @@ -474,7 +475,9 @@ EOT; */ public static function linkButton($label = '', $link = '', $target = 'self', $misc = '') { - global $config; + global $config, $lang; + + if(isonlybody() and $lang->goback == $label) return false; /* if page has onlybody param then add this param in all link. the param hide header and footer. */ if(strpos($link, 'onlybody=') === false and isonlybody()) @@ -737,7 +740,8 @@ EOT; static public function closeColorbox($window = 'self') { $js = self::start(); - $js .= "$window.$.colorbox.close()"; + $js .= "if($window.location.href == self.location.href){ $window.window.close();}"; + $js .= "else{ $window.$.cookie('selfClose', 1);$window.$.colorbox.close();}"; $js .= self::end(); return $js; } diff --git a/module/bug/view/activate.html.php b/module/bug/view/activate.html.php index 23bbaa1a2a..30585ec00b 100644 --- a/module/bug/view/activate.html.php +++ b/module/bug/view/activate.html.php @@ -32,11 +32,7 @@ fetch('file', 'buildform');?> - - - - + goback, $this->session->bugList);?> diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index fc534e5b40..d5768492b1 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -11,7 +11,7 @@ */ ?> recTotal}&recPerPage={$pager->recPerPage}"; ?> @@ -45,9 +44,9 @@ diff --git a/module/bug/view/buglist.html.php b/module/bug/view/buglist.html.php index 87cdfc563d..3a99b44e3e 100644 --- a/module/bug/view/buglist.html.php +++ b/module/bug/view/buglist.html.php @@ -1,4 +1,3 @@ -
id"; - common::printIcon('bug', 'resolve', $params, '', 'list'); - common::printIcon('bug', 'close', $params, '', 'list'); - common::printIcon('bug', 'edit', $params, '', 'list'); + 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'); ?>
recTotal}&recPerPage={$pager->recPerPage}"; ?> diff --git a/module/bug/view/close.html.php b/module/bug/view/close.html.php index 4001a50f78..e1a2b9d268 100644 --- a/module/bug/view/close.html.php +++ b/module/bug/view/close.html.php @@ -20,11 +20,7 @@ - +
- - - goback, $this->session->bugList);?>
diff --git a/module/bug/view/confirmbug.html.php b/module/bug/view/confirmbug.html.php index 49cd4ed029..dd46c2ba65 100755 --- a/module/bug/view/confirmbug.html.php +++ b/module/bug/view/confirmbug.html.php @@ -35,11 +35,7 @@ js::set('page', 'confirmbug'); - - bug->buttonConfirm);?> - - + goback, $this->server->http_referer);?> diff --git a/module/bug/view/resolve.html.php b/module/bug/view/resolve.html.php index b6b6f3837c..491d3e8f3f 100644 --- a/module/bug/view/resolve.html.php +++ b/module/bug/view/resolve.html.php @@ -40,11 +40,7 @@ - - - - + goback, $this->session->bugList);?> diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php index 0fa7730f07..14b0538182 100644 --- a/module/bug/view/view.html.php +++ b/module/bug/view/view.html.php @@ -25,7 +25,7 @@ ob_start(); common::printIcon('bug', 'confirmBug', $params, $bug, 'button', '', '', 'iframe', true); common::printIcon('bug', 'assignTo', $params, '', 'button', '', '', 'iframe', true); - common::printIcon('bug', 'resolve', $params, $bug, 'button', '', '', 'iframe', true); + common::printIcon('bug', 'resolve', $params, $bug, 'button', '', '', 'iframe showinonlybody', true); common::printIcon('bug', 'close', $params, $bug, 'button', '', '', 'iframe', true); common::printIcon('bug', 'activate', $params, $bug, 'button', '', '', 'iframe', true); diff --git a/module/common/control.php b/module/common/control.php index c865e5aa6b..87ffcce780 100644 --- a/module/common/control.php +++ b/module/common/control.php @@ -231,6 +231,8 @@ class common extends control */ public static function printCommentIcon($module) { + if(isonlybody()) return false; + global $lang; if(!common::hasPriv($module, 'edit')) return false; @@ -255,6 +257,8 @@ class common extends control */ public static function printIcon($module, $method, $vars = '', $object = '', $type = 'button', $icon = '', $target = '', $extraClass = '', $onlyBody = false) { + if(isonlybody() and strpos($extraClass, 'showinonlybody') === false) return false; + global $app, $lang; /* Judge the $method of $module clickable or not, default is clickable. */ @@ -339,6 +343,7 @@ class common extends control public function printRPN($backLink, $preAndNext = '') { global $lang; + if(isonlybody()) return false; echo ""; echo html::a($backLink, ' ', '', "class='icon-goback' title={$lang->goback}"); diff --git a/module/my/js/common.js b/module/my/js/common.js index 09fc83f01a..5be5272b2d 100644 --- a/module/my/js/common.js +++ b/module/my/js/common.js @@ -1,7 +1,6 @@ $(function() { - //$("#submenuchangePassword").colorbox({width:600, height:400, iframe:true, transition:'none', scrolling:false}); - $(function(){$('.iframe').colorbox({width:900, height:500, iframe:true, transition:'none', onCleanup:function(){parent.location.href=parent.location.href;}});}) + if(typeof(listName) != 'undefined') setModal4List('iframe', listName, function(){$(".colorbox").colorbox({width:960, height:550, iframe:true, transition:'none'});}); }); function changeAction(formName, actionName, actionLink) diff --git a/module/my/view/bug.html.php b/module/my/view/bug.html.php index 5aca34293a..ed0665daa7 100644 --- a/module/my/view/bug.html.php +++ b/module/my/view/bug.html.php @@ -10,6 +10,7 @@ * @link http://www.zentao.net */ ?> +
@@ -22,62 +23,9 @@ ?>
-recTotal}&recPerPage={$pager->recPerPage}"; ?>
'> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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 new file mode 100644 index 0000000000..36728068b9 --- /dev/null +++ b/module/my/view/buglist.html.php @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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/story.html.php b/module/my/view/story.html.php index ce519c18a4..2375a5e64b 100644 --- a/module/my/view/story.html.php +++ b/module/my/view/story.html.php @@ -65,7 +65,7 @@ id", $story, 'list'); common::printIcon('story', 'review', "storyID=$story->id", $story, 'list'); - common::printIcon('story', 'close', "storyID=$story->id", $story, 'list', '', '', 'iframe', true); + common::printIcon('story', 'close', "storyID=$story->id", $story, 'list'); common::printIcon('story', 'edit', "storyID=$story->id", $story, 'list'); common::printIcon('story', 'createCase', "productID=$story->product&moduleID=0&from=¶m=0&storyID=$story->id", '', 'list', 'createCase'); ?> diff --git a/module/my/view/task.html.php b/module/my/view/task.html.php index a970d809e3..5df9859f9b 100644 --- a/module/my/view/task.html.php +++ b/module/my/view/task.html.php @@ -10,6 +10,7 @@ * @link http://www.zentao.net */ ?> + @@ -25,78 +26,7 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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 new file mode 100644 index 0000000000..8f09c1578e --- /dev/null +++ b/module/my/view/tasklist.html.php @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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/todo.html.php b/module/my/view/todo.html.php index 757c81c5bd..b09db9ac73 100644 --- a/module/my/view/todo.html.php +++ b/module/my/view/todo.html.php @@ -10,6 +10,7 @@ * @link http://www.zentao.net */ ?> + @@ -47,81 +48,7 @@ ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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'); - 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->import2Today, "onclick=\"changeAction('todoform', 'import2Today', '$actionLink')\""); - } - ?> -
- show();?> -
+ + diff --git a/module/my/view/todolist.html.php b/module/my/view/todolist.html.php new file mode 100644 index 0000000000..7b956343c0 --- /dev/null +++ b/module/my/view/todolist.html.php @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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->import2Today, "onclick=\"changeAction('todoform', 'import2Today', '$actionLink')\""); + } + ?> +
+ show();?> +
diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index 84e4d5d0b5..ab9c6d2be0 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -10,7 +10,7 @@ * @link http://www.zentao.net */ ?> - + diff --git a/module/product/view/storylist.html.php b/module/product/view/storylist.html.php index 03ee5210e4..23ef22db4a 100644 --- a/module/product/view/storylist.html.php +++ b/module/product/view/storylist.html.php @@ -1,4 +1,3 @@ - @@ -41,7 +40,7 @@ $vars = "story={$story->id}"; common::printIcon('story', 'change', $vars, $story, 'list'); common::printIcon('story', 'review', $vars, $story, 'list'); - common::printIcon('story', 'close', $vars, $story, 'list', '', '', 'iframe', true); + 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'); ?> diff --git a/module/project/js/bug.js b/module/project/js/bug.js index 02c0a37884..e46b1e5912 100644 --- a/module/project/js/bug.js +++ b/module/project/js/bug.js @@ -13,7 +13,7 @@ function setModal4List(colorboxClass, replaceID) saveWindowSize(); var link = self.location.href; - $.get(link, {onlybody: "yes"}, function(data) + $.get(link, {ajax: "yes"}, function(data) { $('#' + replaceID).replaceWith(data) setModal4List(colorboxClass, replaceID) diff --git a/module/project/js/story.js b/module/project/js/story.js index 03543ab01a..3eee9acf9b 100644 --- a/module/project/js/story.js +++ b/module/project/js/story.js @@ -1,7 +1,6 @@ $(document).ready(function() { $("a.iframe").colorbox({width:640, height:480, iframe:true, transition:'none'}); - $("a.batchWBS").colorbox({width:1024, height:580, iframe:true, transition:'none'}); }); /** diff --git a/module/project/view/bug.html.php b/module/project/view/bug.html.php index ef1b99c9a8..55a98d5b53 100644 --- a/module/project/view/bug.html.php +++ b/module/project/view/bug.html.php @@ -10,7 +10,7 @@ * @link http://www.zentao.net */ ?> - + diff --git a/module/project/view/buglist.html.php b/module/project/view/buglist.html.php index 9a1a94996c..fe00c40c51 100644 --- a/module/project/view/buglist.html.php +++ b/module/project/view/buglist.html.php @@ -1,4 +1,3 @@ -
diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php index a8823c8fea..409e419ad9 100644 --- a/module/project/view/story.html.php +++ b/module/project/view/story.html.php @@ -81,7 +81,7 @@ common::printIcon('task', 'create', $param, '', 'list'); $lang->task->batchCreate = $lang->project->batchWBS; - common::printIcon('task', 'batchCreate', $param . "&iframe=1", '', 'list', '', '', 'batchWBS', true); + common::printIcon('task', 'batchCreate', "projectID={$project->id}&story={$story->id}", '', 'list'); $lang->project->unlinkStory = $lang->unlink; common::printIcon('project', 'unlinkStory', $param, '', 'list', '', 'hiddenwin'); diff --git a/module/project/view/task.html.php b/module/project/view/task.html.php index eac895a0cf..221a27df08 100644 --- a/module/project/view/task.html.php +++ b/module/project/view/task.html.php @@ -10,7 +10,7 @@ * @link http://www.zentao.net */ ?> - + diff --git a/module/project/view/tasklist.html.php b/module/project/view/tasklist.html.php index bbd1c9bdeb..a7deaa192b 100644 --- a/module/project/view/tasklist.html.php +++ b/module/project/view/tasklist.html.php @@ -1,4 +1,3 @@ - id&status=$status&parma=$param&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage"; ?> diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php index 982bb55f7d..67af5ac0dd 100644 --- a/module/story/view/view.html.php +++ b/module/story/view/view.html.php @@ -38,8 +38,8 @@ common::printIcon('story', 'change', "storyID=$story->id", $story); common::printIcon('story', 'review', "storyID=$story->id", $story); - common::printIcon('story', 'close', "storyID=$story->id", $story, 'button', '', '', 'iframe', true); - common::printIcon('story', 'activate', "storyID=$story->id", $story, 'button', '', '', 'iframe', true); + common::printIcon('story', 'close', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true); + common::printIcon('story', 'activate', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true); common::printIcon('story', 'createCase', "productID=$story->product&moduleID=0&from=¶m=0&storyID=$story->id", '', 'button', 'createCase'); common::printDivider(); diff --git a/module/task/control.php b/module/task/control.php index 1158a08832..849246e65c 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -157,7 +157,7 @@ class task extends control /* Locate the browser. */ if($iframe) die(js::reload('parent.parent')); - die(js::locate($taskLink, 'parent')); + die(js::locate($storyLink, 'parent')); } $stories = $this->story->getProjectStoryPairs($projectID); diff --git a/module/task/view/view.html.php b/module/task/view/view.html.php index 39833cacdb..5027c9463a 100644 --- a/module/task/view/view.html.php +++ b/module/task/view/view.html.php @@ -28,7 +28,7 @@ common::printIcon('task', 'assignTo', "projectID=$task->project&taskID=$task->id", $task, 'button', '', '', 'iframe', true); common::printIcon('task', 'start', "taskID=$task->id", $task, 'button', '', '', 'iframe', true); common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'button', '', '', 'iframe', true); - common::printIcon('task', 'finish', "taskID=$task->id", $task, 'button', '', '', 'iframe', true); + common::printIcon('task', 'finish', "taskID=$task->id", $task, 'button', '', '', 'iframe showinonlybody', true); common::printIcon('task', 'close', "taskID=$task->id", $task, 'button', '', '', 'iframe', true); common::printIcon('task', 'activate', "taskID=$task->id", $task, 'button', '', '', 'iframe', true); common::printIcon('task', 'cancel', "taskID=$task->id", $task, 'button', '', '', 'iframe', true); diff --git a/module/testcase/js/browse.js b/module/testcase/js/browse.js index 8ea24e95be..4501bab2e9 100644 --- a/module/testcase/js/browse.js +++ b/module/testcase/js/browse.js @@ -27,7 +27,7 @@ function changeAction(url) $(document).ready(function() { - setModal4List('runCase', 'caseList'); + setModal4List('runCase', 'caseList', function(){$(".results").colorbox({width:900, height:550, iframe:true, transition:'none'});}); $('#' + browseType + 'Tab').addClass('active'); $('#module' + moduleID).addClass('active'); if(browseType == 'bysearch') ajaxGetSearchForm(); diff --git a/module/testcase/view/browse.html.php b/module/testcase/view/browse.html.php index 0afb78fd5b..90654f6f78 100644 --- a/module/testcase/view/browse.html.php +++ b/module/testcase/view/browse.html.php @@ -10,7 +10,7 @@ * @link http://www.zentao.net */ ?> - +
recTotal}&recPerPage={$pager->recPerPage}"; ?> diff --git a/module/todo/control.php b/module/todo/control.php index 3a6088e42b..818a4e9137 100644 --- a/module/todo/control.php +++ b/module/todo/control.php @@ -125,6 +125,7 @@ class todo extends control $actionID = $this->loadModel('action')->create('todo', $todoID, 'edited'); $this->action->logHistory($actionID, $changes); } + if(isonlybody())die(js::closeColorbox('parent.parent')); die(js::locate(inlink('view', "todoID=$todoID"), 'parent')); } diff --git a/module/todo/view/view.html.php b/module/todo/view/view.html.php index c96edd90c6..f3400f2ab7 100644 --- a/module/todo/view/view.html.php +++ b/module/todo/view/view.html.php @@ -73,7 +73,7 @@ $browseLink = $this->createLink('user', 'todo', "account=$todo->account"); } - common::printIcon('todo', 'finish', "id=$todo->id", $todo, 'list', '', 'hiddenwin'); + common::printIcon('todo', 'finish', "id=$todo->id", $todo, 'list', '', 'hiddenwin', 'showinonlybody'); if($todo->account == $app->user->account) { common::printIcon('todo', 'edit', "todoID=$todo->id"); diff --git a/www/js/my.full.js b/www/js/my.full.js index ea756ad55c..fbdd0a4cf4 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -749,7 +749,7 @@ function selectItem(SelectID) * @access public * @return void */ -function setModal4List(colorboxClass, replaceID) +function setModal4List(colorboxClass, replaceID, callback) { $('.' + colorboxClass).colorbox( { @@ -760,16 +760,20 @@ function setModal4List(colorboxClass, replaceID) onCleanup:function() { + var selfClose = $.cookie('selfClose'); + if(selfClose != 1) return; saveWindowSize(); var link = self.location.href; - $.get(link, {onlybody:"yes"}, function(data) + $.get(link, {ajax:"yes"}, function(data) { $('#' + replaceID).replaceWith(data); - setModal4List(colorboxClass, replaceID); + setModal4List(colorboxClass, replaceID, callback); $('.colored').colorize(); $('tfoot td').css('background', 'white').unbind('click').unbind('hover'); + if(typeof(callback) == 'function') callback(); + $.cookie('selfClose', 0); }); } });