From fb9d13856b2d20d01d7117910b9525c961fe16a0 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Thu, 22 Jul 2021 11:01:23 +0800 Subject: [PATCH 01/13] * Finish task #40495. --- module/doc/view/content.html.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module/doc/view/content.html.php b/module/doc/view/content.html.php index b6be52c8f4..763f99ed87 100644 --- a/module/doc/view/content.html.php +++ b/module/doc/view/content.html.php @@ -1,3 +1,6 @@ + doc->confirmDelete);?> requestType == 'PATH_INFO' ? '?' : '&'; From 90c3ce0e81e85777594c16f8f42d230a6a98769e Mon Sep 17 00:00:00 2001 From: holan20180123 Date: Thu, 22 Jul 2021 11:33:29 +0800 Subject: [PATCH 02/13] * Finish task #40503. --- module/doc/js/objectlibs.js | 37 ++++++++++++++++++++++++++++++++ module/doc/view/content.html.php | 3 ++- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/module/doc/js/objectlibs.js b/module/doc/js/objectlibs.js index f2b03fc66a..db5256d142 100644 --- a/module/doc/js/objectlibs.js +++ b/module/doc/js/objectlibs.js @@ -30,3 +30,40 @@ function deleteFile(fileID) if(!fileID) return; hiddenwin.location.href = createLink('file', 'delete', 'fileID=' + fileID); } + +/** + * Display the document in full screen. + * + * @access public + * @return void + */ +function fullScreen() +{ + var element = document.getElementById("content"); + var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullScreen; + if(requestMethod) + { + $('#content .actions').addClass('hidden'); + requestMethod.call(element); + } +} + +document.addEventListener("fullscreenchange", function (e) +{ + if(!document.fullscreenElement) $('#content .actions').removeClass('hidden'); +}) + +document.addEventListener("webkitfullscreenchange", function (e) +{ + if(!document.webkitFullscreenElement) $('#content .actions').removeClass('hidden'); +}) + +document.addEventListener("mozfullscreenchange", function (e) +{ + if(!document.mozFullScreenElement) $('#content .actions').removeClass('hidden'); +}) + +document.addEventListener("msfullscreenChange", function (e) +{ + if(!document.msfullscreenElement) $('#content .actions').removeClass('hidden'); +}) diff --git a/module/doc/view/content.html.php b/module/doc/view/content.html.php index b6be52c8f4..6f72c14f0b 100644 --- a/module/doc/view/content.html.php +++ b/module/doc/view/content.html.php @@ -5,7 +5,7 @@ $sessionString .= session_name() . '=' . session_id(); ?>
-
+
title;?>
@@ -31,6 +31,7 @@ $sessionString .= session_name() . '=' . session_id();
', '', "title='{$lang->fullscreen}' class='btn btn-link fullscreen-btn'"); if(common::hasPriv('doc', 'edit')) echo html::a(inlink('edit', "docID=$doc->id&comment=false&objectType=$objectType&objectID=$object->id&libID=$libID"), '', '', "title='{$lang->doc->edit}' class='btn btn-link' data-app='{$this->app->openApp}'"); if(common::hasPriv('doc', 'delete')) { From 599e51660bea3758391cc888201e3c1e85215288 Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Thu, 22 Jul 2021 13:39:34 +0800 Subject: [PATCH 03/13] * Finish task#40489. --- module/program/control.php | 1 + module/program/css/browse.css | 1 + module/program/view/browsebylist.html.php | 10 ++++++++-- module/user/model.php | 19 +++++++++++++++++-- 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/module/program/control.php b/module/program/control.php index e544b5b0e6..3d69cd47b1 100644 --- a/module/program/control.php +++ b/module/program/control.php @@ -59,6 +59,7 @@ class program extends control $this->view->status = $status; $this->view->orderBy = $orderBy; $this->view->users = $this->user->getPairs('noletter'); + $this->view->usersAvatar = $this->user->getAvatarPairs(); $this->view->programType = $programType; $this->view->PMList = $PMList; diff --git a/module/program/css/browse.css b/module/program/css/browse.css index 61b2befe5e..25b84ab23f 100644 --- a/module/program/css/browse.css +++ b/module/program/css/browse.css @@ -2,3 +2,4 @@ .main-table tbody>tr>td:first-child, .main-table thead>tr>th:first-child {padding-left: 8px;} .table tbody>tr>td .dropdown {display: inline-block; line-height: 1;} tbody.sortable > tr > td.sort-handler .table-nest-toggle:before {cursor: pointer !important;} +.avatar {display: inline-block; width: 20px; height: 20px; line-height: 20px; top: 5px;} diff --git a/module/program/view/browsebylist.html.php b/module/program/view/browsebylist.html.php index 4cf5139d66..55738d6d15 100644 --- a/module/program/view/browsebylist.html.php +++ b/module/program/view/browsebylist.html.php @@ -55,8 +55,14 @@ project->statusList, $program->status, '');?> - PM]) ? $PMList[$program->PM]->id : ''?> - PM)) echo html::a($this->createLink('user', 'profile', "userID=$userID", '', true), zget($users, $program->PM), '', "data-toggle='modal' data-type='iframe' data-width='600'");?> + PM)):?> +
+ PM, '')) ? html::image(zget($usersAvatar, $program->PM)) : strtoupper($program->PM[0]);?> +
+ PM]) ? $PMList[$program->PM]->id : '';?> + PM);?> + createLink('user', 'profile', "userID=$userID", '', true), $userName, '', "title='{$userName}' data-toggle='modal' data-type='iframe' data-width='600'");?> + app->getClientLang(), ['zh-cn','zh-tw']) ? round((float)$program->budget / 10000, 2) . $lang->project->tenThousand : round((float)$program->budget, 2);?> budget != 0 ? zget($lang->project->currencySymbol, $program->budgetUnit) . ' ' . $programBudget : $lang->project->future;?> diff --git a/module/user/model.php b/module/user/model.php index 51ed604609..a329c97d46 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -132,6 +132,21 @@ class userModel extends model return $users; } + /** + * Get user's avatar pairs. + * + * @access public + * @return array + */ + public function getAvatarPairs() + { + $avatarPairs = array(); + $userList = $this->getList(); + foreach($userList as $user) $avatarPairs[$user->account] = $user->avatar; + + return $avatarPairs; + } + /** * Get commiters from the user table. * @@ -1887,7 +1902,7 @@ class userModel extends model { $stakeholders = zget($stakeholderGroup, $program->id, array()); $whiteList = zget($whiteListGroup, $program->id, array()); - if($program->acl == 'program') + if($program->acl == 'program') { $stakeholders += zget($parentStakeholderGroup, $program->id, array()); $stakeholders += zget($parentPMGroup, $program->id, array()); @@ -1911,7 +1926,7 @@ class userModel extends model { $stakeholders = zget($stakeholderGroup, $program->id, array()); $whiteList = zget($whiteListGroup, $program->id, array()); - if($program->acl == 'program') + if($program->acl == 'program') { $stakeholders += zget($parentStakeholderGroup, $program->id, array()); $stakeholders += zget($parentPMGroup, $program->id, array()); From 7d2733396d5c6bb550865b380b79f29944875b6e Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Thu, 22 Jul 2021 13:53:11 +0800 Subject: [PATCH 04/13] * Fix bug #13766. --- module/todo/js/view.js | 2 +- module/todo/view/view.html.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/module/todo/js/view.js b/module/todo/js/view.js index f5919b9bbf..4bd5d4aaa2 100644 --- a/module/todo/js/view.js +++ b/module/todo/js/view.js @@ -78,7 +78,7 @@ function createProject() var onlybody = config.onlybody; config.onlybody = 'no'; - var link = createLink('project', 'create'); + var link = systemMode == 'new' ? createLink('project', 'create') : createLink('execution', 'create'); config.onlybody = onlybody; parent.location.href = link; diff --git a/module/todo/view/view.html.php b/module/todo/view/view.html.php index 7f1a2f0e9d..91285bdde2 100644 --- a/module/todo/view/view.html.php +++ b/module/todo/view/view.html.php @@ -12,6 +12,7 @@ ?> +systemMode);?> private or ($todo->private and $todo->account == $app->user->account)):?>