From 0e15ad41b6ce238a822b7f97035fb512903a837a Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Fri, 25 Feb 2022 16:17:40 +0800 Subject: [PATCH 1/3] * Finish task #49696. --- module/execution/control.php | 14 ++++++++++++++ module/execution/view/importbug.html.php | 15 ++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index d212039839..a34d5c9f6a 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -515,6 +515,20 @@ class execution extends control $mails = $this->execution->importBug($executionID); if(dao::isError()) return print(js::error(dao::getError())); + /* If link from no head then reload. */ + if(isonlybody()) + { + $kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $this->session->execLaneType ? $this->session->execLaneType : 'all'); + $kanbanData = json_encode($kanbanData); + + return print(js::reload('parent', '', "parent.parent.updateKanban($kanbanData)")); + // return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)")); + } + else + { + return print(js::reload('parent.parent')); + } + if(isonlybody()) return print(js::reload('parent.parent')); return print(js::locate($this->createLink('execution', 'importBug', "executionID=$executionID"), 'parent')); } diff --git a/module/execution/view/importbug.html.php b/module/execution/view/importbug.html.php index 4eaf81a875..3c8dba8c91 100755 --- a/module/execution/view/importbug.html.php +++ b/module/execution/view/importbug.html.php @@ -70,18 +70,27 @@ var browseType = ''; - - + From 06af0ff6c4031deb64c72f2099f3eb566fa8c2a8 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Tue, 1 Mar 2022 17:28:57 +0800 Subject: [PATCH 2/3] * Code for task#49696. --- module/execution/control.php | 11 ++--------- module/execution/js/importbug.js | 14 ++++++++++++++ module/execution/js/kanban.js | 3 ++- module/execution/view/importbug.html.php | 13 ++----------- module/execution/view/kanban.html.php | 2 +- 5 files changed, 21 insertions(+), 22 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index a34d5c9f6a..c06d4666ca 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -519,16 +519,9 @@ class execution extends control if(isonlybody()) { $kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $this->session->execLaneType ? $this->session->execLaneType : 'all'); - $kanbanData = json_encode($kanbanData); - - return print(js::reload('parent', '', "parent.parent.updateKanban($kanbanData)")); - // return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)")); + return print(js::reload('parent')); } - else - { - return print(js::reload('parent.parent')); - } - if(isonlybody()) return print(js::reload('parent.parent')); + return print(js::locate($this->createLink('execution', 'importBug', "executionID=$executionID"), 'parent')); } diff --git a/module/execution/js/importbug.js b/module/execution/js/importbug.js index cdaccc8e08..3eb40fb373 100644 --- a/module/execution/js/importbug.js +++ b/module/execution/js/importbug.js @@ -1,4 +1,18 @@ $(function() { + $(".preview").modalTrigger({width:1000, type:'iframe'}); $('#' + browseType + 'Tab').addClass('active'); + + if(isonlybody == true) parent.$('#triggerModal .modal-content .modal-header .close').hide(); }); + +/** + * Go back. + * + * @access public + * @return void + */ +function goback() +{ + parent.location.reload(); +} diff --git a/module/execution/js/kanban.js b/module/execution/js/kanban.js index 25ec3382c3..f6b1e02de0 100644 --- a/module/execution/js/kanban.js +++ b/module/execution/js/kanban.js @@ -966,6 +966,7 @@ function changeCardColType(cardID, fromColID, toColID, fromLaneID, toLaneID, car */ function updateKanban(kanbanData, regionID = 0) { + console.log('1111'); setTimeout(function() { if(regionID) @@ -1049,7 +1050,7 @@ function createStoryMenu(options) var items = []; var showAction = story.$col.type == 'backlog' || story.$col.type == 'ready' || story.$col.type == 'developing' || story.$col.type == 'developed' || story.$col.type == 'testing' || story.$col.type == 'tested' || story.$col.type == 'verified' || story.$col.type == 'released'; - + if(priv.canEditStory) items.push({label: storyLang.edit, icon: 'edit', url: createLink('story', 'edit', 'storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); if(priv.canChangeStory && showAction) items.push({label: storyLang.change, icon: 'change', url: createLink('story', 'change', 'storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); if(priv.canCreateTask && showAction) items.push({label: executionLang.wbs, icon: 'plus', url: createLink('task', 'create', 'executionID=' + execution.id + '&storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); diff --git a/module/execution/view/importbug.html.php b/module/execution/view/importbug.html.php index 3c8dba8c91..f033affd9b 100755 --- a/module/execution/view/importbug.html.php +++ b/module/execution/view/importbug.html.php @@ -13,10 +13,8 @@ - + + - diff --git a/module/execution/view/kanban.html.php b/module/execution/view/kanban.html.php index 99873cc289..03c044b153 100644 --- a/module/execution/view/kanban.html.php +++ b/module/execution/view/kanban.html.php @@ -171,7 +171,7 @@ js::set('hasTaskButton', $hasTaskButton); ' . html::a(helper::createLink('bug', 'batchCreate', "productID=$productID&branch=$branchID&executionID=$execution->id", '', true), $lang->bug->batchCreate, '', "class='iframe'") . '';?> ';?> ' . html::a(helper::createLink('task', 'create', "execution=$execution->id", '', true), $lang->task->create, '', "class='iframe'") . '';?> - ' . html::a(helper::createLink('execution', 'importBug', "executionID=$execution->id", '', true), $lang->execution->importBug, '', "class='ifram'") . '';?> + ' . html::a(helper::createLink('execution', 'importBug', "executionID=$execution->id", '', true), $lang->execution->importBug, '', "class='iframe'") . '';?> ' . html::a(helper::createLink('task', 'batchCreate', "execution=$execution->id", '', true), $lang->execution->batchCreateTask, '', "class='iframe'") . '';?> From daefe27bf5c4b600edef9d0ca3cfb2076843c13c Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Tue, 1 Mar 2022 17:33:45 +0800 Subject: [PATCH 3/3] * Delete unused code. --- module/execution/js/kanban.js | 1 - 1 file changed, 1 deletion(-) diff --git a/module/execution/js/kanban.js b/module/execution/js/kanban.js index f6b1e02de0..64a60d76b1 100644 --- a/module/execution/js/kanban.js +++ b/module/execution/js/kanban.js @@ -966,7 +966,6 @@ function changeCardColType(cardID, fromColID, toColID, fromLaneID, toLaneID, car */ function updateKanban(kanbanData, regionID = 0) { - console.log('1111'); setTimeout(function() { if(regionID)