diff --git a/Makefile b/Makefile index 4e40ef2186..fd0e6b30f1 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,6 @@ clean: rm -fr zentaotest rm -fr *.tar.gz rm -fr *.zip - rm -fr api* rm -fr build/linux/lampp rm -fr lampp common: diff --git a/db/zentao.sql b/db/zentao.sql index 1fb5be86d2..c5a8495397 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -1345,7 +1345,7 @@ INSERT INTO `zt_group` (`id`, `name`, `role`, `desc`) VALUES (10, 'OTHERS', 'others', 'for others.'), (11, 'guest', 'guest', 'For guest'), (12, 'LIMITED', 'limited', 'For limited user'), -(13, 'Project Admin', 'projectAdmin', 'Project Admins manage project privileges'); +(13, 'PROJECTADMIN', 'projectAdmin', 'Project Admins manage project privileges'); INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (1,'action','comment'), diff --git a/module/build/model.php b/module/build/model.php index e90b602967..20fe9ca0dd 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -388,6 +388,7 @@ class buildModel extends model $oldBuild = $this->dao->select('*')->from(TABLE_BUILD)->where('id')->eq($buildID)->fetch(); $build = fixer::input('post')->stripTags($this->config->build->editor->edit['id'], $this->config->allowedTags) ->setDefault('product', $oldBuild->product) + ->setDefault('branch', $oldBuild->branch) ->cleanInt('product,branch,execution') ->remove('allchecker,resolvedBy,files,labels,uid') ->get(); diff --git a/module/doc/control.php b/module/doc/control.php index bbd0fb42b4..5db8a6ec9e 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -322,8 +322,8 @@ class doc extends control $this->app->rawMethod = $objectType; unset($this->lang->doc->menu->product['subMenu']); unset($this->lang->doc->menu->custom['subMenu']); + unset($this->lang->doc->menu->execution['subMenu']); if($this->config->systemMode == 'new') unset($this->lang->doc->menu->project['subMenu']); - if($this->config->systemMode == 'classic') unset($this->lang->doc->menu->execution['subMenu']); } /* Get libs and the default lib id. */ diff --git a/module/doc/model.php b/module/doc/model.php index 488deb7a90..599957a458 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1271,7 +1271,7 @@ class docModel extends model $orderedExecutions = array(); foreach($executions as $id => $execution) { - $execution->name = zget($projectPairs, $execution->project) . ' / ' . $execution->name; + $execution->name = $this->config->systemMode == 'new' ? zget($projectPairs, $execution->project) . ' / ' . $execution->name : $execution->name; if($execution->status != 'done' and $execution->status != 'closed' and $execution->PM == $this->app->user->account) { @@ -2004,7 +2004,7 @@ class docModel extends model if($this->app->tab == 'doc' and $type != 'custom' and $type != 'book') { - $objectTitle = $type == 'execution' ? substr($objects[$objectID], strpos($objects[$objectID], '/') + 1) : $objects[$objectID]; + $objectTitle = ($this->config->systemMode == 'new' and $type == 'execution') ? substr($objects[$objectID], strpos($objects[$objectID], '/') + 1) : $objects[$objectID]; $output = << diff --git a/module/execution/control.php b/module/execution/control.php index 44e9d9622c..bdec90fbd6 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -3122,9 +3122,12 @@ class execution extends control } $planProducts[$story->id] = $story->product; } + + $projectID = $this->dao->findByID($executionID)->from(TABLE_EXECUTION)->fetch('project'); $planStories = array_keys($planStory); + $this->execution->linkStory($executionID, $planStories, $planProducts); - if($executionID != $this->session->project) $this->execution->linkStory($this->session->project, $planStories, $planProducts); + if($this->config->systemMode == 'new' and $executionID != $projectID) $this->execution->linkStory($projectID, $planStories, $planProducts); } $moduleName = 'execution'; diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index c395805005..0993e0dfd9 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -295,12 +295,11 @@ $lang->execution->doneExecutions = 'Finished'; $lang->execution->selectDept = 'Select Department'; $lang->execution->selectDeptTitle = 'Select User'; $lang->execution->copyTeam = 'Copy Team'; -$lang->execution->copyFromTeam = "Copy from {$lang->executionCommon} Team: %s"; -$lang->execution->noMatched = "No $lang->executionCommon including '%s'can be found."; -$lang->execution->copyTitle = "Choose a {$lang->executionCommon} to copy."; -$lang->execution->copyTeamTitle = "Choose a {$lang->projectCommon} or {$lang->executionCommon} Team to copy."; -$lang->execution->copyNoExecution = "No {$lang->executionCommon} can be copied."; -$lang->execution->copyFromExecution = "Copy from {$lang->executionCommon} %s"; +$lang->execution->copyFromTeam = "Copy from {$lang->execution->common} Team: %s"; +$lang->execution->noMatched = "No {$lang->execution->common} including '%s'can be found."; +$lang->execution->copyTitle = "Choose a {$lang->execution->common} to copy."; +$lang->execution->copyNoExecution = "No {$lang->execution->common} can be copied."; +$lang->execution->copyFromExecution = "Copy from {$lang->execution->common} %s"; $lang->execution->cancelCopy = 'Cancel Copy'; $lang->execution->byPeriod = 'By Time'; $lang->execution->byUser = 'By User'; @@ -310,6 +309,8 @@ $lang->execution->noMembers = 'No team members yet. '; $lang->execution->workloadTotal = "The cumulative workload ratio should not exceed 100, and the total workload under the current product is: %s"; // $lang->execution->linkProjectStoryTip = "(Link {$lang->SRCommon} comes from {$lang->SRCommon} linked under the execution)"; $lang->execution->linkAllStoryTip = "({$lang->SRCommon} has never been linked under the execution, and can be directly linked with {$lang->SRCommon} of the product linked with the sprint/stage)"; +if($config->systemMode == 'classic') $lang->execution->copyTeamTitle = "Choose a {$lang->execution->common} Team to copy."; +if($config->systemMode == 'new') $lang->execution->copyTeamTitle = "Choose a {$lang->projectCommon} or {$lang->execution->common} Team to copy."; /* Interactive prompts. */ $lang->execution->confirmDelete = "Do you want to delete the {$lang->executionCommon}[%s]?"; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index b0b406b2b5..38c05d356a 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -295,12 +295,11 @@ $lang->execution->doneExecutions = '已结束'; $lang->execution->selectDept = '选择部门'; $lang->execution->selectDeptTitle = '选择一个部门的成员'; $lang->execution->copyTeam = '复制团队'; -$lang->execution->copyFromTeam = "复制自{$lang->executionCommon}团队: %s"; -$lang->execution->noMatched = "找不到包含'%s'的$lang->executionCommon"; -$lang->execution->copyTitle = "请选择一个{$lang->executionCommon}来复制"; -$lang->execution->copyTeamTitle = "选择一个{$lang->projectCommon}或{$lang->executionCommon}团队来复制"; -$lang->execution->copyNoExecution = "没有可用的{$lang->executionCommon}来复制"; -$lang->execution->copyFromExecution = "复制自{$lang->executionCommon} %s"; +$lang->execution->copyFromTeam = "复制自{$lang->execution->common}团队: %s"; +$lang->execution->noMatched = "找不到包含'%s'的{$lang->execution->common}"; +$lang->execution->copyTitle = "请选择一个{$lang->execution->common}来复制"; +$lang->execution->copyNoExecution = "没有可用的{$lang->execution->common}来复制"; +$lang->execution->copyFromExecution = "复制自{$lang->execution->common} %s"; $lang->execution->cancelCopy = '取消复制'; $lang->execution->byPeriod = '按时间段'; $lang->execution->byUser = '按用户'; @@ -310,6 +309,8 @@ $lang->execution->noMembers = '暂时没有团队成员。'; $lang->execution->workloadTotal = "工作量占比累计不应当超过100, 当前产品下的工作量之和为%s"; // $lang->execution->linkProjectStoryTip = "(关联{$lang->SRCommon}来源于项目下所关联的{$lang->SRCommon})"; $lang->execution->linkAllStoryTip = "(项目下还未关联{$lang->SRCommon},可直接关联该{$lang->execution->common}所关联产品的{$lang->SRCommon})"; +if($config->systemMode == 'classic') $lang->execution->copyTeamTitle = "选择一个{$lang->execution->common}团队来复制"; +if($config->systemMode == 'new') $lang->execution->copyTeamTitle = "选择一个{$lang->projectCommon}或{$lang->execution->common}团队来复制"; /* 交互提示。*/ $lang->execution->confirmDelete = "您确定删除{$lang->executionCommon}[%s]吗?"; diff --git a/module/execution/lang/zh-tw.php b/module/execution/lang/zh-tw.php index 523c627e5d..2265891409 100644 --- a/module/execution/lang/zh-tw.php +++ b/module/execution/lang/zh-tw.php @@ -295,12 +295,11 @@ $lang->execution->doneExecutions = '已結束'; $lang->execution->selectDept = '選擇部門'; $lang->execution->selectDeptTitle = '選擇一個部門的成員'; $lang->execution->copyTeam = '複製團隊'; -$lang->execution->copyFromTeam = "複製自{$lang->executionCommon}團隊: %s"; -$lang->execution->noMatched = "找不到包含'%s'的$lang->executionCommon"; -$lang->execution->copyTitle = "請選擇一個{$lang->executionCommon}來複制"; -$lang->execution->copyTeamTitle = "選擇一個{$lang->projectCommon}或{$lang->executionCommon}團隊來複制"; -$lang->execution->copyNoExecution = "沒有可用的{$lang->executionCommon}來複制"; -$lang->execution->copyFromExecution = "複製自{$lang->executionCommon} %s"; +$lang->execution->copyFromTeam = "複製自{$lang->execution->common}團隊: %s"; +$lang->execution->noMatched = "找不到包含'%s'的{$lang->execution->common}"; +$lang->execution->copyTitle = "請選擇一個{$lang->execution->common}來複制"; +$lang->execution->copyNoExecution = "沒有可用的{$lang->execution->common}來複制"; +$lang->execution->copyFromExecution = "複製自{$lang->execution->common} %s"; $lang->execution->cancelCopy = '取消複製'; $lang->execution->byPeriod = '按時間段'; $lang->execution->byUser = '按用戶'; @@ -310,6 +309,8 @@ $lang->execution->noMembers = '暫時沒有團隊成員。'; $lang->execution->workloadTotal = "工作量占比累計不應當超過100, 當前產品下的工作量之和為%s"; // $lang->execution->linkProjectStoryTip = "(關聯{$lang->SRCommon}來源於項目下所關聯的{$lang->SRCommon})"; $lang->execution->linkAllStoryTip = "(項目下還未關聯{$lang->SRCommon},可直接關聯該{$lang->execution->common}所關聯產品的{$lang->SRCommon})"; +if($config->systemMode == 'classic') $lang->execution->copyTeamTitle = "選擇一個{$lang->execution->common}團隊來複制"; +if($config->systemMode == 'new') $lang->execution->copyTeamTitle = "選擇一個{$lang->projectCommon}或{$lang->execution->common}團隊來複制"; /* 交互提示。*/ $lang->execution->confirmDelete = "您確定刪除{$lang->executionCommon}[%s]嗎?"; diff --git a/module/execution/model.php b/module/execution/model.php index 4d412450aa..91bf9aba47 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -386,7 +386,7 @@ class executionModel extends model /* Set team of execution. */ $members = isset($_POST['teamMembers']) ? $_POST['teamMembers'] : array(); - $roles = $this->loadModel('user')->getUserRoles(array_keys($members)); + $roles = $this->loadModel('user')->getUserRoles(array_values($members)); foreach($members as $account) { if(empty($account)) continue; diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index fb03774f19..cb710a4757 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -16,7 +16,7 @@ execution->featureBar['all'] as $key => $label):?> createLink($this->app->rawModule, $this->app->rawMethod, "status=$key&projectID=$projectID&orderBy=$orderBy&productID=$productID"), "{$label}", '', "class='btn btn-link' id='{$key}Tab' data-app='$from'");?> - + config->systemMode == 'new'):?>
execution->selectProject}'");?>
diff --git a/module/gitlab/model.php b/module/gitlab/model.php index c16d1c1af8..d9d32ee23f 100644 --- a/module/gitlab/model.php +++ b/module/gitlab/model.php @@ -413,8 +413,10 @@ class gitlabModel extends model $allResults = array(); for($page = 1; true; $page ++) { - $results = json_decode(commonModel::http($host . "?private_token={$gitlab->token}&simple=true&page={$page}&per_page=100")); + $results = json_decode(commonModel::http($host . "?private_token={$gitlab->token}&simple=true&membership=true&page={$page}&per_page=100")); + if(isset($results->error)) break; if(empty($results) or $page > 10) break; + $allResults = array_merge($allResults, $results); } diff --git a/module/gitlab/view/browse.html.php b/module/gitlab/view/browse.html.php index bd21d2e159..1fc67219a1 100644 --- a/module/gitlab/view/browse.html.php +++ b/module/gitlab/view/browse.html.php @@ -46,7 +46,7 @@ url;?> isAdminToken ? 'disabled' : ''; + $disabled = !empty($gitlab->isAdminToken) ? '' : 'disabled'; common::printLink('gitlab', 'edit', "gitlabID=$id", " ", '',"title={$lang->gitlab->edit} class='btn btn-primary'"); common::printLink('gitlab', 'bindUser', "id=$id", " ", '', "title={$lang->gitlab->bindUser} class='btn btn-primary {$disabled}' ,'disabled'"); if(common::hasPriv('gitlab', 'delete')) echo html::a($this->createLink('gitlab', 'delete', "gitlabID=$id"), '', 'hiddenwin', "title='{$lang->gitlab->delete}' class='btn'"); diff --git a/module/install/lang/en.php b/module/install/lang/en.php index c5edb71c8e..469a539bab 100644 --- a/module/install/lang/en.php +++ b/module/install/lang/en.php @@ -162,28 +162,30 @@ $lang->install->errorEmptyPassword = 'Password should not be blank.'; $lang->install->selectedMode = 'Selection mode'; $lang->install->selectedModeTips = 'You can go to the Admin - Custom - Mode to set it later.'; -$lang->install->groupList['ADMIN']['name'] = 'Admin'; -$lang->install->groupList['ADMIN']['desc'] = 'System Admin'; -$lang->install->groupList['DEV']['name'] = 'Dev'; -$lang->install->groupList['DEV']['desc'] = 'Developer'; -$lang->install->groupList['QA']['name'] = 'Test'; -$lang->install->groupList['QA']['desc'] = 'Tester'; -$lang->install->groupList['PM']['name'] = 'PM'; -$lang->install->groupList['PM']['desc'] = 'Project Manager'; -$lang->install->groupList['PO']['name'] = 'PO'; -$lang->install->groupList['PO']['desc'] = 'Product Owner'; -$lang->install->groupList['TD']['name'] = 'Dev Manager'; -$lang->install->groupList['TD']['desc'] = 'Development Manager'; -$lang->install->groupList['PD']['name'] = 'PD'; -$lang->install->groupList['PD']['desc'] = 'Product Director'; -$lang->install->groupList['QD']['name'] = 'QD'; -$lang->install->groupList['QD']['desc'] = 'Test Director'; -$lang->install->groupList['TOP']['name'] = 'Senior'; -$lang->install->groupList['TOP']['desc'] = 'Senior Manager'; -$lang->install->groupList['OTHERS']['name'] = 'Others'; -$lang->install->groupList['OTHERS']['desc'] = 'other users'; -$lang->install->groupList['LIMITED']['name'] = 'Limited User'; -$lang->install->groupList['LIMITED']['desc'] = 'Users can only edit contents related to themselves.'; +$lang->install->groupList['ADMIN']['name'] = 'Admin'; +$lang->install->groupList['ADMIN']['desc'] = 'System Admin'; +$lang->install->groupList['DEV']['name'] = 'Dev'; +$lang->install->groupList['DEV']['desc'] = 'Developer'; +$lang->install->groupList['QA']['name'] = 'Test'; +$lang->install->groupList['QA']['desc'] = 'Tester'; +$lang->install->groupList['PM']['name'] = 'PM'; +$lang->install->groupList['PM']['desc'] = 'Project Manager'; +$lang->install->groupList['PO']['name'] = 'PO'; +$lang->install->groupList['PO']['desc'] = 'Product Owner'; +$lang->install->groupList['TD']['name'] = 'Dev Manager'; +$lang->install->groupList['TD']['desc'] = 'Development Manager'; +$lang->install->groupList['PD']['name'] = 'PD'; +$lang->install->groupList['PD']['desc'] = 'Product Director'; +$lang->install->groupList['QD']['name'] = 'QD'; +$lang->install->groupList['QD']['desc'] = 'Test Director'; +$lang->install->groupList['TOP']['name'] = 'Senior'; +$lang->install->groupList['TOP']['desc'] = 'Senior Manager'; +$lang->install->groupList['OTHERS']['name'] = 'Others'; +$lang->install->groupList['OTHERS']['desc'] = 'other users'; +$lang->install->groupList['LIMITED']['name'] = 'Limited User'; +$lang->install->groupList['LIMITED']['desc'] = 'Users can only edit contents related to themselves.'; +$lang->install->groupList['PROJECTADMIN']['name'] = 'Project Admin'; +$lang->install->groupList['PROJECTADMIN']['desc'] = 'Project Admins manage project privileges'; $lang->install->cronList[''] = 'Monitor Cron'; $lang->install->cronList['moduleName=execution&methodName=computeBurn'] = 'Update Burndown Chart'; diff --git a/module/install/lang/zh-cn.php b/module/install/lang/zh-cn.php index ba3fbce15e..ae52720b4a 100644 --- a/module/install/lang/zh-cn.php +++ b/module/install/lang/zh-cn.php @@ -162,28 +162,30 @@ $lang->install->errorEmptyPassword = '密码不能为空'; $lang->install->selectedMode = '选择模式'; $lang->install->selectedModeTips = '后续您还可以去后台-自定义-模式中进行调整'; -$lang->install->groupList['ADMIN']['name'] = '管理员'; -$lang->install->groupList['ADMIN']['desc'] = '系统管理员'; -$lang->install->groupList['DEV']['name'] = '研发'; -$lang->install->groupList['DEV']['desc'] = '研发人员'; -$lang->install->groupList['QA']['name'] = '测试'; -$lang->install->groupList['QA']['desc'] = '测试人员'; -$lang->install->groupList['PM']['name'] = '项目经理'; -$lang->install->groupList['PM']['desc'] = '项目经理'; -$lang->install->groupList['PO']['name'] = '产品经理'; -$lang->install->groupList['PO']['desc'] = '产品经理'; -$lang->install->groupList['TD']['name'] = '研发主管'; -$lang->install->groupList['TD']['desc'] = '研发主管'; -$lang->install->groupList['PD']['name'] = '产品主管'; -$lang->install->groupList['PD']['desc'] = '产品主管'; -$lang->install->groupList['QD']['name'] = '测试主管'; -$lang->install->groupList['QD']['desc'] = '测试主管'; -$lang->install->groupList['TOP']['name'] = '高层管理'; -$lang->install->groupList['TOP']['desc'] = '高层管理'; -$lang->install->groupList['OTHERS']['name'] = '其他'; -$lang->install->groupList['OTHERS']['desc'] = '其他'; -$lang->install->groupList['LIMITED']['name'] = '受限用户'; -$lang->install->groupList['LIMITED']['desc'] = '受限用户分组(只能编辑与自己相关的内容)'; +$lang->install->groupList['ADMIN']['name'] = '管理员'; +$lang->install->groupList['ADMIN']['desc'] = '系统管理员'; +$lang->install->groupList['DEV']['name'] = '研发'; +$lang->install->groupList['DEV']['desc'] = '研发人员'; +$lang->install->groupList['QA']['name'] = '测试'; +$lang->install->groupList['QA']['desc'] = '测试人员'; +$lang->install->groupList['PM']['name'] = '项目经理'; +$lang->install->groupList['PM']['desc'] = '项目经理'; +$lang->install->groupList['PO']['name'] = '产品经理'; +$lang->install->groupList['PO']['desc'] = '产品经理'; +$lang->install->groupList['TD']['name'] = '研发主管'; +$lang->install->groupList['TD']['desc'] = '研发主管'; +$lang->install->groupList['PD']['name'] = '产品主管'; +$lang->install->groupList['PD']['desc'] = '产品主管'; +$lang->install->groupList['QD']['name'] = '测试主管'; +$lang->install->groupList['QD']['desc'] = '测试主管'; +$lang->install->groupList['TOP']['name'] = '高层管理'; +$lang->install->groupList['TOP']['desc'] = '高层管理'; +$lang->install->groupList['OTHERS']['name'] = '其他'; +$lang->install->groupList['OTHERS']['desc'] = '其他'; +$lang->install->groupList['LIMITED']['name'] = '受限用户'; +$lang->install->groupList['LIMITED']['desc'] = '受限用户分组(只能编辑与自己相关的内容)'; +$lang->install->groupList['PROJECTADMIN']['name'] = '项目管理员'; +$lang->install->groupList['PROJECTADMIN']['desc'] = '项目管理员可以维护项目的权限'; $lang->install->cronList[''] = '监控定时任务'; $lang->install->cronList['moduleName=execution&methodName=computeBurn'] = '更新燃尽图'; diff --git a/module/install/lang/zh-tw.php b/module/install/lang/zh-tw.php index 1d44dc3e30..e49d561c57 100644 --- a/module/install/lang/zh-tw.php +++ b/module/install/lang/zh-tw.php @@ -46,7 +46,7 @@ $lang->install->howToUse = "請問您計劃如何使用禪道的新 $lang->install->introductionContent = <<

尊敬的用戶您好,歡迎您使用禪道%s。

-

禪道%s提供了兩種使用模式, 一種是精典管理模式,功能較為精簡,提供了產品和項目兩個核心功能;另一種是全新項目集管理模式,具備所有核心功能。如下是相關功能介紹,您可以根據需要選擇使用的模式。

+

禪道%s提供了兩種使用模式, 一種是經典管理模式,功能較為精簡,提供了產品和項目兩個核心功能;另一種是全新項目集管理模式,具備所有核心功能。如下是相關功能介紹,您可以根據需要選擇使用的模式。

項目集

項目集是一組相互關聯,且被協調管理的項目集合,可以進行多層級管理,屬於戰略層面的管理。

@@ -63,8 +63,8 @@ $lang->install->introductionContent = <<
EOT; @@ -162,28 +162,30 @@ $lang->install->errorEmptyPassword = '密碼不能為空'; $lang->install->selectedMode = '選擇模式'; $lang->install->selectedModeTips = '後續您還可以去後台-自定義-模式中進行調整'; -$lang->install->groupList['ADMIN']['name'] = '管理員'; -$lang->install->groupList['ADMIN']['desc'] = '系統管理員'; -$lang->install->groupList['DEV']['name'] = '研發'; -$lang->install->groupList['DEV']['desc'] = '研發人員'; -$lang->install->groupList['QA']['name'] = '測試'; -$lang->install->groupList['QA']['desc'] = '測試人員'; -$lang->install->groupList['PM']['name'] = '項目經理'; -$lang->install->groupList['PM']['desc'] = '項目經理'; -$lang->install->groupList['PO']['name'] = '產品經理'; -$lang->install->groupList['PO']['desc'] = '產品經理'; -$lang->install->groupList['TD']['name'] = '研發主管'; -$lang->install->groupList['TD']['desc'] = '研發主管'; -$lang->install->groupList['PD']['name'] = '產品主管'; -$lang->install->groupList['PD']['desc'] = '產品主管'; -$lang->install->groupList['QD']['name'] = '測試主管'; -$lang->install->groupList['QD']['desc'] = '測試主管'; -$lang->install->groupList['TOP']['name'] = '高層管理'; -$lang->install->groupList['TOP']['desc'] = '高層管理'; -$lang->install->groupList['OTHERS']['name'] = '其他'; -$lang->install->groupList['OTHERS']['desc'] = '其他'; -$lang->install->groupList['LIMITED']['name'] = '受限用戶'; -$lang->install->groupList['LIMITED']['desc'] = '受限用戶分組(只能編輯與自己相關的內容)'; +$lang->install->groupList['ADMIN']['name'] = '管理員'; +$lang->install->groupList['ADMIN']['desc'] = '系統管理員'; +$lang->install->groupList['DEV']['name'] = '研發'; +$lang->install->groupList['DEV']['desc'] = '研發人員'; +$lang->install->groupList['QA']['name'] = '測試'; +$lang->install->groupList['QA']['desc'] = '測試人員'; +$lang->install->groupList['PM']['name'] = '項目經理'; +$lang->install->groupList['PM']['desc'] = '項目經理'; +$lang->install->groupList['PO']['name'] = '產品經理'; +$lang->install->groupList['PO']['desc'] = '產品經理'; +$lang->install->groupList['TD']['name'] = '研發主管'; +$lang->install->groupList['TD']['desc'] = '研發主管'; +$lang->install->groupList['PD']['name'] = '產品主管'; +$lang->install->groupList['PD']['desc'] = '產品主管'; +$lang->install->groupList['QD']['name'] = '測試主管'; +$lang->install->groupList['QD']['desc'] = '測試主管'; +$lang->install->groupList['TOP']['name'] = '高層管理'; +$lang->install->groupList['TOP']['desc'] = '高層管理'; +$lang->install->groupList['OTHERS']['name'] = '其他'; +$lang->install->groupList['OTHERS']['desc'] = '其他'; +$lang->install->groupList['LIMITED']['name'] = '受限用戶'; +$lang->install->groupList['LIMITED']['desc'] = '受限用戶分組(只能編輯與自己相關的內容)'; +$lang->install->groupList['PROJECTADMIN']['name'] = '項目管理員'; +$lang->install->groupList['PROJECTADMIN']['desc'] = '項目管理員可以維護項目的權限'; $lang->install->cronList[''] = '監控定時任務'; $lang->install->cronList['moduleName=execution&methodName=computeBurn'] = '更新燃盡圖'; diff --git a/module/job/control.php b/module/job/control.php index 1fff0240b8..a31f2a8dff 100644 --- a/module/job/control.php +++ b/module/job/control.php @@ -315,8 +315,9 @@ class job extends control if($_POST) { - $reference = new stdclass; - $reference->ref = explode("::", $refList[$this->post->ref])[1]; + $reference = new stdclass; + $explodedRefs = explode("::", $refList[$this->post->ref]); + $reference->ref = $explodedRefs[1]; $variables = array(); foreach($this->post->keys as $key => $field) diff --git a/module/my/view/bug.html.php b/module/my/view/bug.html.php index c5b9b2f88e..420df14d48 100644 --- a/module/my/view/bug.html.php +++ b/module/my/view/bug.html.php @@ -107,7 +107,13 @@ pri?>' title='bug->priList, $bug->pri);?>'>bug->priList, $bug->pri)?> createLink('bug', 'view', "bugID=$bug->id"), $bug->title, null, "style='color: $bug->color' title={$bug->title}");?> - createLink('product', 'index', "productID=$bug->product"), $bug->productName, null, "title={$bug->productName}");?> + productLink == 'product-all' ? '' : "productID=$bug->product";?> + + productLink); + echo html::a($this->createLink('product', $productLink[1], $param), $bug->productName, null, "title={$bug->productName}"); + ?> + bug->typeList, $bug->type, '');?> openedBy);?> diff --git a/module/personnel/control.php b/module/personnel/control.php index a442fe6525..3b2b74da9b 100644 --- a/module/personnel/control.php +++ b/module/personnel/control.php @@ -190,10 +190,11 @@ class personnel extends control $copyUsers = empty($copyID) ? array() : $this->personnel->getWhitelistAccount($copyID, $copyObjectType); $appendUsers = array_unique($deptUsers + $copyUsers); - $objectName = $this->lang->projectCommon . $this->lang->execution->or . $this->lang->execution->common; - if($objectType == 'program') $objectName = $this->lang->program->common; - if($objectType == 'product') $objectName = $this->lang->productCommon; - if($objectType == 'project') $objectName = $this->lang->projectCommon; + $objectName = $this->lang->execution->common; + if($this->config->systemMode == 'new') $objectName = $this->lang->projectCommon . $this->lang->execution->or . $objectName; + if($objectType == 'program') $objectName = $this->lang->program->common; + if($objectType == 'product') $objectName = $this->lang->productCommon; + if($objectType == 'project') $objectName = $this->lang->projectCommon; $this->lang->personnel->selectObjectTips = sprintf($this->lang->personnel->selectObjectTips, $objectName); $this->view->title = $this->lang->personnel->addWhitelist; diff --git a/module/personnel/model.php b/module/personnel/model.php index d3b541eede..a97a3a69bc 100644 --- a/module/personnel/model.php +++ b/module/personnel/model.php @@ -134,14 +134,17 @@ class personnelModel extends model $issueInvest = $this->getIssueInvest($accountPairs, $projects); $riskInvest = $this->getRiskInvest($accountPairs, $projects); } - $userPairs = $this->loadModel('user')->getListByAccounts(array_keys($accountPairs), 'account'); - foreach($userPairs as $user) $user->role = zget($this->lang->user->roleList, $user->role, $user->role); + + $users = $this->loadModel('user')->getListByAccounts(array_keys($accountPairs), 'account'); + foreach($users as $user) $user->role = zget($this->lang->user->roleList, $user->role, $user->role); foreach($accountPairs as $account => $projects) { - $personnelList[$account]['realname'] = $userPairs[$account]->realname; + $user = zget($users, $account, ''); + + $personnelList[$account]['realname'] = $user ? $user->realname : $account; $personnelList[$account]['account'] = $account; - $personnelList[$account]['role'] = $userPairs[$account]->role; + $personnelList[$account]['role'] = $user ? $user->role : ''; $personnelList[$account]['projects'] = $projects; $personnelList[$account]['executions'] = zget($executionPairs, $account, 0); diff --git a/module/productplan/model.php b/module/productplan/model.php index d5a3e884b8..00f18b2638 100644 --- a/module/productplan/model.php +++ b/module/productplan/model.php @@ -80,22 +80,22 @@ class productplanModel extends model public function getList($product = 0, $branch = 0, $browseType = 'all', $pager = null, $orderBy = 'begin_desc') { $date = date('Y-m-d'); - $plans = $this->dao->select('t1.*,t2.project')->from(TABLE_PRODUCTPLAN)->alias('t1') - ->leftJoin(TABLE_PROJECTPRODUCT)->alias('t2')->on("t2.plan = t1.id and t2.product = '$product'") - ->where('t1.product')->eq($product) - ->andWhere('t1.deleted')->eq(0) - ->beginIF(!empty($branch))->andWhere('t1.branch')->eq($branch)->fi() - ->beginIF($browseType == 'unexpired')->andWhere('t1.end')->ge($date)->fi() - ->beginIF($browseType == 'overdue')->andWhere('t1.end')->lt($date)->fi() + $plans = $this->dao->select('*')->from(TABLE_PRODUCTPLAN)->where('product')->eq($product) + ->andWhere('deleted')->eq(0) + ->beginIF(!empty($branch))->andWhere('branch')->eq($branch)->fi() + ->beginIF($browseType == 'unexpired')->andWhere('end')->ge($date)->fi() + ->beginIF($browseType == 'overdue')->andWhere('end')->lt($date)->fi() ->orderBy($orderBy) - ->page($pager, 't1.id') + ->page($pager) ->fetchAll('id'); if(!empty($plans)) { + $plans = $this->reorder4Children($plans); $planIdList = array_keys($plans); + $planProjects = $this->dao->select('*')->from(TABLE_PROJECTPRODUCT)->where('product')->eq($product)->andWhere('plan')->in(array_keys($plans))->fetchPairs('plan', 'project'); $storyCountInTable = $this->dao->select('plan,count(story) as count')->from(TABLE_PLANSTORY)->where('plan')->in($planIdList)->groupBy('plan')->fetchPairs('plan', 'count'); $product = $this->loadModel('product')->getById($product); if($product->type == 'normal') @@ -126,6 +126,7 @@ class productplanModel extends model $plan->stories = count($storyPairs); $plan->bugs = isset($bugs[$plan->id]) ? count($bugs[$plan->id]) : 0; $plan->hour = array_sum($storyPairs); + $plan->project = zget($planProjects, $plan->id, ''); $plan->projectID = $plan->project; /* Sync linked stories. */ diff --git a/module/program/control.php b/module/program/control.php index 266260265b..f07b8c2e63 100644 --- a/module/program/control.php +++ b/module/program/control.php @@ -182,7 +182,10 @@ class program extends control $program = $this->program->getByID($programID); $parentProgram = $program->parent ? $this->program->getByID($program->parent) : ''; $parents = $this->program->getParentPairs(); - unset($parents[$programID]); + + /* Remove children program from parents. */ + $children = $this->dao->select('*')->from(TABLE_PROGRAM)->where('path')->like("%,$programID,%")->fetchPairs('id', 'id'); + foreach($children as $childID) unset($parents[$childID]); $this->view->title = $this->lang->program->edit; $this->view->position[] = $this->lang->program->edit; diff --git a/module/program/model.php b/module/program/model.php index aa2520e0c8..fe6b0c6ee0 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -738,7 +738,15 @@ class programModel extends model $this->loadModel('personnel')->updateWhitelist($whitelist, 'program', $programID); if($program->acl != 'open') $this->loadModel('user')->updateUserView($programID, 'program'); - if($oldProgram->parent != $program->parent) $this->processNode($programID, $program->parent, $oldProgram->path, $oldProgram->grade); + if($oldProgram->parent != $program->parent) + { + $this->processNode($programID, $program->parent, $oldProgram->path, $oldProgram->grade); + + /* Move product to new top program. */ + $oldTopProgram = $this->getTopByPath($oldProgram->path); + $newTopProgram = $this->getTopByID($programID); + if($oldTopProgram != $newTopProgram) $this->dao->update(TABLE_PRODUCT)->set('program')->eq($newTopProgram)->where('program')->eq($oldTopProgram)->exec(); + } return common::createChanges($oldProgram, $program); } @@ -813,25 +821,19 @@ class programModel extends model while($program = $stmt->fetch()) { - $link = $from == 'program' ? helper::createLink($moduleName, $methodName, "programID=$program->id") : helper::createLink('product', 'all', "programID=$program->id" . $vars); + $link = $this->getLink($moduleName, $methodName, $program->id, $vars, $from); $linkHtml = html::a($link, $program->name, '', "id='program$program->id' class='text-ellipsis' title=$program->name"); if(isset($programMenu[$program->id]) and !empty($programMenu[$program->id])) { if(!isset($programMenu[$program->parent])) $programMenu[$program->parent] = ''; $programMenu[$program->parent] .= "
  • $linkHtml"; - $programMenu[$program->parent] .= "
      ".$programMenu[$program->id]."
    \n"; + $programMenu[$program->parent] .= "
      " . $programMenu[$program->id] . "
    \n"; } else { - if(isset($programMenu[$program->parent]) and !empty($programMenu[$program->parent])) - { - $programMenu[$program->parent] .= "
  • $linkHtml\n"; - } - else - { - $programMenu[$program->parent] = "
  • $linkHtml\n"; - } + if(empty($programMenu[$program->parent])) $programMenu[$program->parent] = ''; + $programMenu[$program->parent] .= "
  • $linkHtml\n"; } $programMenu[$program->parent] .= "
  • \n"; } @@ -843,6 +845,35 @@ class programModel extends model return $lastMenu; } + /** + * Get link for drop tree menu. + * + * @param string $moduleName + * @param string $methodName + * @param int $programID + * @param string $vars + * @param string $from + * @access public + * @return string + */ + public function getLink($moduleName, $methodName, $programID, $vars = '', $from = 'program') + { + if($from != 'program') return helper::createLink('product', 'all', "programID=$programID" . $vars); + + if($moduleName == 'project') + { + $moduleName = 'program'; + $methodName = 'project'; + } + if($moduleName == 'product') + { + $moduleName = 'program'; + $methodName = 'product'; + } + + return helper::createLink($moduleName, $methodName, "programID=$programID"); + } + /** * Get top program pairs. * @@ -879,8 +910,20 @@ class programModel extends model $program = $this->getByID($programID); if(empty($program)) return 0; - $path = explode(',', trim($program->path, ',')); - return $path[0]; + return $this->getTopByPath($program->path); + } + + /** + * get top program by path. + * + * @param string $path + * @access public + * @return string + */ + public function getTopByPath($path) + { + $paths = explode(',', trim($path, ',')); + return $paths[0]; } /** diff --git a/module/project/control.php b/module/project/control.php index 146c5944df..89260d44b9 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -400,6 +400,7 @@ class project extends control } if($this->app->tab == 'program') $this->loadModel('program')->setMenu($programID); + $this->session->set('projectModel', $model); $name = ''; $code = ''; diff --git a/module/project/view/browsebycard.html.php b/module/project/view/browsebycard.html.php index 79331eb022..9c2ad6533c 100644 --- a/module/project/view/browsebycard.html.php +++ b/module/project/view/browsebycard.html.php @@ -113,7 +113,7 @@
    getClientLang(), ['zh-cn','zh-tw']) ? round((float)$project->budget / 10000, 2) . $lang->project->tenThousand : round((float)$project->budget, 2); + $projectBudget = in_array($app->getClientLang(), array('zh-cn','zh-tw')) ? round((float)$project->budget / 10000, 2) . $lang->project->tenThousand : round((float)$project->budget, 2); $budgetTitle = $project->budget != 0 ? zget($lang->project->currencySymbol, $project->budgetUnit) . ' ' . $projectBudget : $lang->project->budget . $lang->project->future; $project->end = $project->end == LONG_TIME ? $this->lang->project->longTime : $project->end; $project->date = str_replace('-', '.', $project->begin) . ' - ' . str_replace('-', '.', $project->end); diff --git a/module/project/view/managemembers.html.php b/module/project/view/managemembers.html.php index 6e0bafe2c4..80e1e53b78 100644 --- a/module/project/view/managemembers.html.php +++ b/module/project/view/managemembers.html.php @@ -13,7 +13,7 @@
    execution->selectDept?> execution->selectDeptTitle}'");?> - + 1):?> execution->copyTeam;?> project->copyTeamTitle}'");?> diff --git a/module/story/control.php b/module/story/control.php index feb50ea82c..5d0bae9360 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -137,7 +137,7 @@ class story extends control if($objectID != 0) { if($objectID != $this->session->project) $this->loadModel('action')->create('story', $storyID, 'linked2execution', '', $objectID); - $this->loadModel('action')->create('story', $storyID, 'linked2project', '', $this->session->project); + if($this->config->systemMode == 'new') $this->loadModel('action')->create('story', $storyID, 'linked2project', '', $this->session->project); } if($todoID > 0) diff --git a/module/story/model.php b/module/story/model.php index d9a290cec3..5cef5c00bd 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -273,7 +273,7 @@ class storyModel extends model if($executionID != 0) { $this->linkStory($executionID, $this->post->product, $storyID); - if($executionID != $this->session->project) $this->linkStory($this->session->project, $this->post->product, $storyID); + if($this->config->systemMode == 'new' and $executionID != $this->session->project) $this->linkStory($this->session->project, $this->post->product, $storyID); } if(is_array($this->post->URS)) diff --git a/module/task/model.php b/module/task/model.php index f18fd2c77f..d6c8f89b81 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -465,12 +465,13 @@ class taskModel extends model { $task->version = 1; $task->openedBy = $this->app->user->account; + $task->lastEditedBy = $this->app->user->account; $task->assignedDate = isset($task->assignedTo) ? helper::now() : 0; $task->story = 0; $task->module = 0; $task->estimate = 0; $task->estStarted = '0000-00-00'; - $task->left = 1; + $task->left = 0; $task->pri = 3; $task->type = 'devel'; diff --git a/module/upgrade/lang/zh-cn.php b/module/upgrade/lang/zh-cn.php index deb6a56cfc..0bffebf74c 100644 --- a/module/upgrade/lang/zh-cn.php +++ b/module/upgrade/lang/zh-cn.php @@ -90,7 +90,7 @@ $lang->upgrade->mergeProgramDesc = <<可以选择这些{$lang->projectCommon}归属于某个新项目下。

    EOD; -$lang->upgrade->to15Mode['classic'] = '保持老版本的习惯'; +$lang->upgrade->to15Mode['classic'] = '经典管理模式'; $lang->upgrade->to15Mode['new'] = '全新项目集管理模式'; $lang->upgrade->selectedModeTips['classic'] = '后续您还可以在后台-自定义里面切换为全新项目集管理的模式。'; diff --git a/module/upgrade/lang/zh-tw.php b/module/upgrade/lang/zh-tw.php index 58898bc0de..6313c1801d 100644 --- a/module/upgrade/lang/zh-tw.php +++ b/module/upgrade/lang/zh-tw.php @@ -90,7 +90,7 @@ $lang->upgrade->mergeProgramDesc = <<可以選擇這些{$lang->projectCommon}歸屬於某個新項目下。

    EOD; -$lang->upgrade->to15Mode['classic'] = '保持老版本的習慣'; +$lang->upgrade->to15Mode['classic'] = '經典管理模式'; $lang->upgrade->to15Mode['new'] = '全新項目集管理模式'; $lang->upgrade->selectedModeTips['classic'] = '後續您還可以在後台-自定義裡面切換為全新項目集管理的模式。'; diff --git a/module/upgrade/model.php b/module/upgrade/model.php index dd28676d03..ec4f1d8346 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -4679,6 +4679,7 @@ class upgradeModel extends model */ public function computeObjectMembers() { + $this->app->loadLang('user'); $projects = $this->dao->select('id,days')->from(TABLE_PROJECT)->where('type')->eq('project')->fetchAll('id'); $projectIdList = array_keys($projects); @@ -4747,7 +4748,7 @@ class upgradeModel extends model $team->root = $projectID; $team->type = 'project'; $team->account = $account; - $team->role = $user->role; + $team->role = zget($this->lang->user->roleList, $user->role, $user->role); $team->join = $today; $team->days = $project->days; $team->hours = '7.0'; diff --git a/module/user/model.php b/module/user/model.php index 087d0a2347..949ac329b7 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -1588,13 +1588,15 @@ class userModel extends model /* Get teams. */ if($teams === null) { - $stmt = $this->dao->select('root,account')->from(TABLE_TEAM)->where('type')->in('project,execution')->query(); + $teams = array(); + $stmt = $this->dao->select('root,account')->from(TABLE_TEAM)->where('type')->in('project,execution')->query(); while($team = $stmt->fetch()) $teams[$team->root][$team->account] = $team->account; } /* Get product white list. */ if($productWhiteList === null) { + $productWhiteList = array(); $stmt = $this->dao->select('objectID,account')->from(TABLE_ACL)->where('objectType')->eq('product')->query(); while($acl = $stmt->fetch()) $productWhiteList[$acl->objectID][$acl->account] = $acl->account; } @@ -1602,14 +1604,16 @@ class userModel extends model /* Get white list. */ if($whiteList === null) { - $stmt = $this->dao->select('objectID,account')->from(TABLE_ACL)->where('objectType')->in('program,project,sprint')->query(); + $whiteList = array(); + $stmt = $this->dao->select('objectID,account')->from(TABLE_ACL)->where('objectType')->in('program,project,sprint')->query(); while($acl = $stmt->fetch()) $whiteList[$acl->objectID][$acl->account] = $acl->account; } /* Get stakeholders. */ if($stakeholders === null) { - $stmt = $this->dao->select('objectID,user')->from(TABLE_STAKEHOLDER)->query(); + $stakeholders = array(); + $stmt = $this->dao->select('objectID,user')->from(TABLE_STAKEHOLDER)->query(); while($stakeholder = $stmt->fetch()) $stakeholders[$stakeholder->objectID][$stakeholder->user] = $stakeholder->user; } diff --git a/tools/minifyfront.php b/tools/minifyfront.php index 4aa25288ce..2d8422409a 100755 --- a/tools/minifyfront.php +++ b/tools/minifyfront.php @@ -12,11 +12,11 @@ $jsRoot = $baseDir . '/www/js/'; $jqueryRoot = $jsRoot . 'jquery/'; /* Set js files to combined. */ -$jsFiles[] = $jqueryRoot . 'lib.js'; +$jsFiles[] = $jqueryRoot . 'lib.js'; $jsFiles[] = $jqueryRoot . 'tablesorter/min.js'; $jsFiles[] = $jqueryRoot . 'tablesorter/metadata.js'; -$jsFiles[] = $jsRoot . 'zui/min.js'; -$jsFiles[] = $jsRoot . 'zui/picker/zui.picker.min.js'; +$jsFiles[] = $jsRoot . 'zui/min.js'; +$jsFiles[] = $jsRoot . 'zui/picker/zui.picker.min.js'; $jsFiles[] = $jsRoot . 'my.full.js'; /* Combine these js files. */ @@ -39,6 +39,9 @@ $config->programLink = '-'; $config->productLink = '-'; $config->projectLink = '-'; $config->executionLink = '-'; +$config->systemMode = ''; +$config->URAndSR = ''; +$config->systemScore = ''; include $baseDir . '/config/config.php'; $lang = new stdclass(); diff --git a/www/js/zui/min.js b/www/js/zui/min.js index 44ea2459ef..e245a1ad84 100644 --- a/www/js/zui/min.js +++ b/www/js/zui/min.js @@ -1,7 +1,7 @@ /*! * ZUI: ZUI for Zentao - v1.9.2 - 2021-08-30 * http://openzui.com - * GitHub: https://github.com/easysoft/zui.git + * GitHub: https://github.com/easysoft/zui.git * Copyright (c) 2021 cnezsoft.com; Licensed MIT */ !function(t,e,i){"use strict";if("undefined"==typeof t)throw new Error("ZUI requires jQuery");t.zui||(t.zui=function(e){t.isPlainObject(e)&&t.extend(t.zui,e)});var n={all:-1,left:0,middle:1,right:2},o=0;t.zui({uuid:function(t){var e=1e5*(Date.now()-1580890015292)+10*Math.floor(1e4*Math.random())+o++%10;return t?e:e.toString(36)},callEvent:function(t,e,n){if("function"==typeof t){n!==i&&(t=t.bind(n));var o=t(e);return e&&(e.result=o),!(o!==i&&!o)}return 1},strCode:function(t){var e=0;if("string"!=typeof t&&(t=String(t)),t&&t.length)for(var i=0;i=e.innerWidth)return 0;if(!t.zui._scrollbarWidth){var i=document.createElement("div");i.className="scrollbar-measure",document.body.appendChild(i),t.zui._scrollbarWidth=i.offsetWidth-i.clientWidth,document.body.removeChild(i)}return t.zui._scrollbarWidth},fixBodyScrollbar:function(){if(t.zui.checkBodyScrollbar()){var e=t("body"),i=parseInt(e.css("padding-right")||0,10);return t.zui._scrollbarWidth&&e.css({paddingRight:i+t.zui._scrollbarWidth,overflowY:"hidden"}),!0}},resetBodyScrollbar:function(){t("body").css({paddingRight:"",overflowY:""})}}),t.fn.callEvent=function(e,n,o){var a=t(this),s=e.indexOf(".zui."),r=s<0?e:e.substring(0,s),l=t.Event(r,n);if(o===i&&s>0&&(o=a.data(e.substring(s+1))),o&&o.options){var h=o.options[r];"function"==typeof h&&(l.result=t.zui.callEvent(h,l,o))}return a.trigger(l),l},t.fn.callComEvent=function(t,e,n){n===i||Array.isArray(n)||(n=[n]);var o,a=this;a.trigger(e,n);var s=t.options[e];return s&&(o=s.apply(t,n)),o}}(jQuery,window,void 0),function(t){"use strict";t.fn.fixOlPd=function(e){return e=e||10,this.each(function(){var i=t(this);i.css("paddingLeft",Math.ceil(Math.log10(i.children().length))*e+10)})},t(function(){t(".ol-pd-fix,.article ol").fixOlPd()})}(jQuery),+function(t){"use strict";var e='[data-dismiss="alert"]',i="zui.alert",n=function(i){t(i).on("click",e,this.close)};n.prototype.close=function(e){function n(){s.trigger("closed."+i).remove()}var o=t(this),a=o.attr("data-target");a||(a=o.attr("href"),a=a&&a.replace(/.*(?=#[^\s]*$)/,""));var s=t(a);e&&e.preventDefault(),s.length||(s=o.hasClass("alert")?o:o.parent()),s.trigger(e=t.Event("close."+i)),e.isDefaultPrevented()||(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one(t.support.transition.end,n).emulateTransitionEnd(150):n())};var o=t.fn.alert;t.fn.alert=function(e){return this.each(function(){var o=t(this),a=o.data(i);a||o.data(i,a=new n(this)),"string"==typeof e&&a[e].call(o)})},t.fn.alert.Constructor=n,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click."+i+".data-api",e,n.prototype.close)}(window.jQuery),function(t,e){"use strict";var i="zui.pager",n={page:1,recTotal:0,recPerPage:10},o={zh_cn:{pageOfText:"第 {0} 页",prev:"上一页",next:"下一页",first:"第一页",last:"最后一页","goto":"跳转",pageOf:"第 {page} 页",totalPage:"共 {totalPage} 页",totalCount:"共 {recTotal} 项",pageSize:"每页 {recPerPage} 项",itemsRange:"第 {start} ~ {end} 项",pageOfTotal:"第 {page}/{totalPage} 页"},zh_tw:{pageOfText:"第 {0} 頁",prev:"上一頁",next:"下一頁",first:"第一頁",last:"最後一頁","goto":"跳轉",pageOf:"第 {page} 頁",totalPage:"共 {totalPage} 頁",totalCount:"共 {recTotal} 項",pageSize:"每頁 {recPerPage} 項",itemsRange:"第 {start} ~ {end} 項",pageOfTotal:"第 {page}/{totalPage} 頁"},en:{pageOfText:"Page {0}",prev:"Prev",next:"Next",first:"First",last:"Last","goto":"Goto",pageOf:"Page {page}",totalPage:"{totalPage} pages",totalCount:"Total: {recTotal} items",pageSize:"{recPerPage} per page",itemsRange:"From {start} to {end}",pageOfTotal:"Page {page} of {totalPage}"}},a=function(e,n){var s=this;s.name=i,s.$=t(e),n=s.options=t.extend({},a.DEFAULTS,this.$.data(),n),s.langName=n.lang||t.zui.clientLang(),s.lang=t.zui.getLangData(i,s.langName,o),s.state={},s.set(n.page,n.recTotal,n.recPerPage,!0),s.$.on("click",".pager-goto-btn",function(){var e=t(this).closest(".pager-goto"),i=parseInt(e.find(".pager-goto-input").val());NaN!==i&&s.set(i)}).on("click",".pager-item",function(){var e=t(this).data("page");"number"==typeof e&&e>0&&s.set(e)}).on("click",".pager-size-menu [data-size]",function(){var e=t(this).data("size");"number"==typeof e&&e>0&&s.set(-1,-1,e)})};a.prototype.set=function(e,i,o,a){var s=this;"object"==typeof e&&null!==e&&(o=e.recPerPage,i=e.recTotal,e=e.page);var r=s.state;r||(r=t.extend({},n));var l=t.extend({},r);return"number"==typeof o&&o>0&&(r.recPerPage=o),"number"==typeof i&&i>=0&&(r.recTotal=i),"number"==typeof e&&e>=0&&(r.page=e),r.totalPage=r.recTotal&&r.recPerPage?Math.ceil(r.recTotal/r.recPerPage):1,r.page=Math.max(0,Math.min(r.page,r.totalPage)),r.pageRecCount=r.recTotal,r.page&&r.recTotal&&(r.page1&&(r.pageRecCount=r.recTotal-r.recPerPage*(r.page-1))),r.skip=r.page>1?(r.page-1)*r.recPerPage:0,r.start=r.skip+1,r.end=r.skip+r.pageRecCount,r.prev=r.page>1?r.page-1:0,r.next=r.page').attr("href",i?a.createLink(i,a.state):"###").html(n);return o||(s=t("
  • ").append(s).toggleClass("active",i===a.state.page).toggleClass("disabled",!i||i===a.state.page)),s},a.prototype.createNavItems=function(t){var i=this,n=i.$,o=i.state,a=o.totalPage,s=o.page,r=function(t,o){if(t===!1)return void n.append(i.createLinkItem(0,o||i.options.navEllipsisItem));o===e&&(o=t);for(var a=t;a<=o;++a)n.append(i.createLinkItem(a))};t===e&&(t=i.options.maxNavCount||10),r(1),a>1&&(a<=t?r(2,a):sa-t+2?(r(!1),r(a-t+2,a)):(r(!1),r(s-Math.ceil((t-4)/2),s+Math.floor((t-4)/2)),r(!1),r(a)))},a.prototype.createGoto=function(){var e=this,i=this.state,n=t('
    ");return n},a.prototype.createSizeMenu=function(){var e=this,i=this.state,n=t(''),o=e.options.pageSizeOptions;"string"==typeof o&&(o=o.split(","));for(var a=0;a'+s+"
  • ").toggleClass("active",s===i.recPerPage);n.append(r)}return t('
    ').addClass(e.options.menuDirection).append(n)},a.prototype.createElement=function(e,i,n){var o=this,a=o.createLinkItem.bind(o),s=o.lang;switch(e){case"prev":return a(n.prev,s.prev);case"prev_icon":return a(n.prev,'');case"next":return a(n.next,s.next);case"next_icon":return a(n.next,'');case"first":return a(1,s.first);case"first_icon":return a(1,'');case"last":return a(n.totalPage,s.last);case"last_icon":return a(n.totalPage,'');case"space":case"|":return t('
  • ');case"nav":case"pages":return void o.createNavItems();case"total_text":return t(('
    '+s.totalCount+"
    ").format(n));case"page_text":return t(('
    '+s.pageOf+"
    ").format(n));case"total_page_text":return t(('
    '+s.totalPage+"
    ").format(n));case"page_of_total_text":return t(('
    '+s.pageOfTotal+"
    ").format(n));case"page_size_text":return t(('
    '+s.pageSize+"
    ").format(n));case"items_range_text":return t(('
    '+s.itemsRange+"
    ").format(n));case"goto":return o.createGoto();case"size_menu":return o.createSizeMenu();default:return t("
  • ").html(e.format(n))}},a.prototype.createLink=function(i,n){i===e&&(i=this.state.page),n===e&&(n=this.state);var o=this.options.linkCreator;return"string"==typeof o?o.format(t.extend({},n,{page:i})):"function"==typeof o?o(i,n):"#page="+i},a.prototype.render=function(e){var i=this,n=i.state,o=i.options.elementCreator||i.createElement,a=t.isPlainObject(o);e=e||i.elements||i.options.elements,"string"==typeof e&&(e=e.split(",")),i.elements=e,i.$.empty();for(var s=0;s").append(h)),i.$.append(h))}var c=null;return i.$.children("li").each(function(){var e=t(this),i=!!e.children(".pager-item").length;c?c.toggleClass("pager-item-right",!i):i&&e.addClass("pager-item-left"),c=i?e:null}),c&&c.addClass("pager-item-right"),i.$.callComEvent(i,"onRender",[n]),i},a.DEFAULTS=t.extend({elements:["first_icon","prev_icon","pages","next_icon","last_icon","page_of_total_text","items_range_text","total_text"],prevIcon:"icon-double-angle-left",nextIcon:"icon-double-angle-right",firstIcon:"icon-step-backward",lastIcon:"icon-step-forward",navEllipsisItem:'',maxNavCount:10,menuDirection:"dropdown",pageSizeOptions:[10,20,30,50,100]},n),t.fn.pager=function(e){return this.each(function(){var n=t(this),o=n.data(i),s="object"==typeof e&&e;o||n.data(i,o=new a(this,s)),"string"==typeof e&&o[e]()})},a.NAME=i,a.LANG=o,t.fn.pager.Constructor=a,t(function(){t('[data-ride="pager"]').pager()})}(jQuery,void 0),+function(t){"use strict";var e="zui.tab",i=function(e){this.element=t(e)};i.prototype.show=function(){var i=this.element,n=i.closest("ul:not(.dropdown-menu)"),o=i.attr("data-target")||i.attr("data-tab");if(o||(o=i.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),!i.parent("li").hasClass("active")){var a=n.find(".active:last a")[0],s=t.Event("show."+e,{relatedTarget:a});if(i.trigger(s),!s.isDefaultPrevented()){var r=t(o);this.activate(i.parent("li"),n),this.activate(r,r.parent(),function(){i.trigger({type:"shown."+e,relatedTarget:a})})}}},i.prototype.activate=function(e,i,n){function o(){a.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),e.addClass("active"),s?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active"),n&&n()}var a=i.find("> .active"),s=n&&t.support.transition&&a.hasClass("fade");s?a.one(t.support.transition.end,o).emulateTransitionEnd(150):o(),a.removeClass("in")};var n=t.fn.tab;t.fn.tab=function(n){return this.each(function(){var o=t(this),a=o.data(e);a||o.data(e,a=new i(this)),"string"==typeof n&&a[n]()})},t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=n,this},t(document).on("click.zui.tab.data-api",'[data-toggle="tab"], [data-tab]',function(e){e.preventDefault(),t(this).tab("show")})}(window.jQuery),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,n=this;t(this).one("bsTransitionEnd",function(){i=!0});var o=function(){i||t(n).trigger(t.support.transition.end)};return setTimeout(o,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(t){"use strict";var e="zui.collapse",i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.transitioning=null,this.options.parent&&(this.$parent=t(this.options.parent)),this.options.toggle&&this.toggle()};i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var i=t.Event("show."+e);if(this.$element.trigger(i),!i.isDefaultPrevented()){var n=this.$parent&&this.$parent.find(".in");if(n&&n.length){var o=n.data(e);if(o&&o.transitioning)return;n.collapse("hide"),o||n.data(e,null)}var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("in")[a]("auto"),this.transitioning=0,this.$element.trigger("shown."+e)};if(!t.support.transition)return s.call(this);var r=t.camelCase(["scroll",a].join("-"));this.$element.one(t.support.transition.end,s.bind(this)).emulateTransitionEnd(350)[a](this.$element[0][r])}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var i=t.Event("hide."+e);if(this.$element.trigger(i),!i.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.trigger("hidden."+e).removeClass("collapsing").addClass("collapse")};return t.support.transition?void this.$element[n](0).one(t.support.transition.end,o.bind(this)).emulateTransitionEnd(350):o.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var n=t.fn.collapse;t.fn.collapse=function(n){return this.each(function(){var o=t(this),a=o.data(e),s=t.extend({},i.DEFAULTS,o.data(),"object"==typeof n&&n);a||o.data(e,a=new i(this,s)),"string"==typeof n&&a[n]()})},t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=n,this},t(document).on("click."+e+".data-api","[data-toggle=collapse]",function(i){var n,o=t(this),a=o.attr("data-target")||i.preventDefault()||(n=o.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""),s=t(a),r=s.data(e),l=r?"toggle":o.data(),h=o.attr("data-parent"),c=h&&t(h);r&&r.transitioning||(c&&c.find('[data-toggle=collapse][data-parent="'+h+'"]').not(o).addClass("collapsed"),o[s.hasClass("in")?"addClass":"removeClass"]("collapsed")),s.collapse(l)})}(window.jQuery),function(t,e){"use strict";var i=1200,n=992,o=768,a=e(t),s=function(){var t=a.width();e("html").toggleClass("screen-desktop",t>=n&&t=i).toggleClass("screen-tablet",t>=o&&t=n)},r="",l=navigator.userAgent;l.match(/(iPad|iPhone|iPod)/i)?r+=" os-ios":l.match(/android/i)?r+=" os-android":l.match(/Win/i)?r+=" os-windows":l.match(/Mac/i)?r+=" os-mac":l.match(/Linux/i)?r+=" os-linux":l.match(/X11/i)&&(r+=" os-unix"),"ontouchstart"in document.documentElement&&(r+=" is-touchable"),e("html").addClass(r),a.resize(s),s()}(window,jQuery),function(t){"use strict";var e={zh_cn:'您的浏览器版本过低,无法体验所有功能,建议升级或者更换浏览器。 了解更多...',zh_tw:'您的瀏覽器版本過低,無法體驗所有功能,建議升級或者更换瀏覽器。了解更多...',en:'Your browser is too old, it has been unable to experience the colorful internet. We strongly recommend that you upgrade a better one. Learn more...'},i=function(){for(var t=!1,e=11;e>5;e--)if(this.isIE(e)){t=e;break}this.ie=t,this.cssHelper()};i.prototype.cssHelper=function(){var e=this.ie,i=t("html");i.toggleClass("ie",e).removeClass("ie-6 ie-7 ie-8 ie-9 ie-10"),e&&i.addClass("ie-"+e).toggleClass("gt-ie-7 gte-ie-8 support-ie",e>=8).toggleClass("lte-ie-7 lt-ie-8 outdated-ie",e<8).toggleClass("gt-ie-8 gte-ie-9",e>=9).toggleClass("lte-ie-8 lt-ie-9",e<9).toggleClass("gt-ie-9 gte-ie-10",e>=10).toggleClass("lte-ie-9 lt-ie-10",e<10).toggleClass("gt-ie-10 gte-ie-11",e>=11).toggleClass("lte-ie-10 lt-ie-11",e<11)},i.prototype.tip=function(i){var n=t("#browseHappyTip");n.length||(n=t('
    '),n.prependTo("body")),i||(i=t.zui.getLangData("zui.browser",t.zui.clientLang(),e),"object"==typeof i&&(i=i.tip)),n.find(".content").html(i)},i.prototype.isIE=function(t){if(11===t)return this.isIE11();if(10===t)return this.isIE10();if(!t&&(this.isIE11()||this.isIE10()))return!0;var e=document.createElement("b");return e.innerHTML="",1===e.getElementsByTagName("i").length},i.prototype.isIE10=function(){return navigator.appVersion.indexOf("MSIE 10")!==-1},i.prototype.isIE11=function(){var t=navigator.userAgent;return t.indexOf("Trident")!==-1&&t.indexOf("rv:11")!==-1},t.zui({browser:new i}),t(function(){t("body").hasClass("disabled-browser-tip")||t.zui.browser.ie&&t.zui.browser.ie<8&&t.zui.browser.tip()})}(jQuery),function(t){"use strict";var e=864e5,i=function(t){return t instanceof Date||("number"==typeof t&&t<1e10&&(t*=1e3),t=new Date(t)),t},n=function(t){return i(t).getTime()},o=function(t,e){t=i(t),void 0===e&&(e="yyyy-MM-dd hh:mm:ss");var n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds(),"q+":Math.floor((t.getMonth()+3)/3),"S+":t.getMilliseconds()};/(y+)/i.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));for(var o in n)new RegExp("("+o+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?n[o]:("00"+n[o]).substr((""+n[o]).length)));return e},a=function(t,e){return t.setTime(t.getTime()+e),t},s=function(t,i){return a(t,i*e)},r=function(t){return new Date(i(t).getTime())},l=function(t){return t%4===0&&t%100!==0||t%400===0},h=function(t,e){return[31,l(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},c=function(t){return h(t.getFullYear(),t.getMonth())},d=function(t){return t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t},u=function(t,e){var i=t.getDate();return t.setDate(1),t.setMonth(t.getMonth()+e),t.setDate(Math.min(i,c(t))),t},f=function(t,e){e=e||1;for(var i=new Date(t.getTime());i.getDay()!=e;)i=s(i,-1);return d(i)},p=function(t,e){return t.toDateString()===e.toDateString()},g=function(t,e){var i=f(t),n=s(r(i),7);return e>=i&&e1){var i;if(2==arguments.length&&"object"==typeof e)for(var n in e)void 0!==e[n]&&(i=new RegExp("({"+n+"})","g"),t=t.replace(i,e[n]));else for(var o=1;othis.length)&&(e=this.length),this.substring(e-t.length,e)===t}),String.prototype.startsWith||Object.defineProperty(String.prototype,"startsWith",{value:function(t,e){return e=!e||e<0?0:+e,this.substring(e,e+t.length)===t}}),String.prototype.includes||(String.prototype.includes=function(){return String.prototype.indexOf.apply(this,arguments)!==-1}))}(),/*! @@ -76,4 +76,4 @@ function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"= */ function(t){function e(e){if("string"==typeof e.data){var i=e.handler,n=e.data.toLowerCase().split(" ");e.handler=function(e){if(this===e.target||!/textarea|select/i.test(e.target.nodeName)&&"text"!==e.target.type){var o="keypress"!==e.type&&t.hotkeys.specialKeys[e.which],a=String.fromCharCode(e.which).toLowerCase(),s="",r={};e.altKey&&"alt"!==o&&(s+="alt+"),e.ctrlKey&&"ctrl"!==o&&(s+="ctrl+"),e.metaKey&&!e.ctrlKey&&"meta"!==o&&(s+="meta+"),e.shiftKey&&"shift"!==o&&(s+="shift+"),o?r[s+o]=!0:(r[s+a]=!0,r[s+t.hotkeys.shiftNums[a]]=!0,"shift+"===s&&(r[t.hotkeys.shiftNums[a]]=!0));for(var l=0,h=n.length;l","/":"?","\\":"|"}},t.each(["keydown","keyup","keypress"],function(){t.event.special[this]={add:e}})}(jQuery),function(t){"use strict";function e(e,i){if(e===!1)return e;if(!e)return i;e===!0?e={add:!0,"delete":!0,edit:!0,sort:!0}:"string"==typeof e&&(e=e.split(","));var n;return Array.isArray(e)&&(n={},t.each(e,function(e,i){t.isPlainObject(i)?n[i.action]=i:n[i]=!0}),e=n),t.isPlainObject(e)&&(n={},t.each(e,function(e,i){i?n[e]=t.extend({type:e},s[e],t.isPlainObject(i)?i:null):n[e]=!1}),e=n),i?t.extend(!0,{},i,e):e}function i(e,i,n){return i=i||e.type,t(n||e.template).addClass("tree-action").attr(t.extend({"data-type":i,title:e.title||""},e.attr)).data("action",e)}var n="zui.tree",o=0,a=function(e,i){this.name=n,this.$=t(e),this.getOptions(i),this._init()},s={sort:{template:''},add:{template:''},edit:{template:''},"delete":{template:''}};a.DEFAULTS={animate:null,initialState:"normal",toggleTemplate:''},a.prototype.add=function(e,i,n,o,a){var s,r=t(e),l=this.options;if(r.is("li")?(s=r.children("ul"),s.length||(s=t("
  • ");i.$.addClass("load-indicator loading"),s.load(window.location.href+" #"+o,function(r){if(a===o)i.$.empty().html(s.children().html()),i.$.find('[data-ride="pager"]').pager();else{i.$.find("#"+o).empty().html(s.children().html());try{var l=t(r),h=l.find("#"+o).closest('[data-ride="table"],#'+a);if(h.length){var c=h.find(".table-statistic");c.length&&(i.defaultStatistic=c.html());var d=i.$.find('[data-ride="pager"]').data("zui.pager"),u=h.find('[data-ride="pager"]');d&&u.length&&d.set(u.data())}}catch(f){console.error(f)}}i.$.removeClass("load-indicator loading").trigger("beforeTableReload"),delete i.defaultStatistic,i.updateStatistic(),i.initModals(),i.$.datepickerAll();var p=i.$.find("tbody>tr"),g=!1;t.each(i.checkItems,function(t,e){e&&(i.checkRow(p.filter('[data-id="'+t+'"]'),!0,!0),g=!0)}),g&&i.updateCheckUI(),i.$.trigger("tableReload");var m=t("#mainMenu>.btn-toolbar>.btn-active-text>.label");if(m.length){var u=i.$.find(".pager[data-rec-total]"),v=u.length?u.attr("data-rec-total"):i.getTable().find("tbody:first>tr:not(.table-children)").length;m.text(v)}e&&e(),n.afterReload&&n.afterReload()})},r.prototype.initModals=function(){var e=this,i=e.options,n=e.$.find(i.iframeModalTrigger);if(n.length){var o={type:"iframe",onHide:i.replaceId?function(){var n=t.cookie("selfClose");(1==n||i.hot)&&(t("#triggerModal").data("cancel-reload",1),e.reload(function(){t.cookie("selfClose",0)}))}:null};n.modalTrigger(o)}},r.prototype.getTable=function(){var t=this.$;if(this.isDataTable)return t.find("div.datatable");var e=t.is("table")?t:t.find("table:not(.fixed-header-copy)").first();return e.is(".datatable")&&(this.isDataTable=!0,e.data("zui.datatable")||window.initDatatable(e),e=t.find("div.datatable")),e},r.prototype.toggleGroups=function(e){var i=this,n={};i.$.find("tbody>tr").each(function(){var o=t(this).closest("tr").data("id");n[o]||i.toggleRowGroup(o,e)})},r.prototype.toggleRowGroup=function(i,n){var o=this.$.find('tbody>tr[data-id="'+i+'"]'),a=o.filter(".group-summary"),s=n===e?!a.hasClass("hidden"):!!n; o.not(".group-summary").toggleClass("hidden",!s),a.toggleClass("hidden",s),t("body").toggleClass("table-group-collapsed",!this.$.find("tbody>tr.group-summary.hidden").length)},r.prototype.updateStatistic=function(){var i=this,n=i.$.find(".table-statistic");if(n.length){if(i.defaultStatistic===e&&(i.defaultStatistic=n.html()),i.options.statisticCreator)return void n.html(i.options.statisticCreator(i)||i.defaultStatistic);var o=i.statisticCols;if(!o&&o!==!1){o={};var a=!1;i.getTable().find("thead th").each(function(e){var i=t(this),n=i.data("statistic");n&&(a=!0,o[e]={format:n,name:i.text()})}),i.statisticCols=!!a&&o}var s=0;o&&t.each(o,function(t){o[t].total=0,o[t].checkedTotal=0}),i.$.find(i.isDataTable?".fixed-left tbody>tr":"tbody>tr").each(function(){var e=t(this),i=e.hasClass("checked"),n=e.children("td");i&&s++,o&&t.each(o,function(t){var e=parseFloat(n.eq(t).text());isNaN(e)&&(e=0),o[t].total+=e,i&&(o[t].checkedTotal+=e)})});var r=[];if(s)r.push(i.lang.selectedItems.format(s));else if(i.defaultStatistic)return void n.html(i.defaultStatistic);o&&t.each(o,function(t){var e=o[t],n=e[s?"checkedTotal":"total"];e.format&&(n=e.format.format(n)),r.push(i.lang.attrTotal.format(e.name,n))}),n.html(r.join(", "))}},r.prototype.updateFixUI=function(e){var i=this,n=(new Date).getTime();if(!e&&(i.lastUpdateCall&&clearTimeout(i.lastUpdateCall),!i.lastUpdateTime||n-i.lastUpdateTime
    ').append(t('
    ').addClass(i.attr("class")).append(n.clone())).insertAfter(i)),c){var d=h[0].getBoundingClientRect();l.css({left:d.left,width:h.width(),overflow:"hidden"}),l.find(".fixed-header-copy").css({left:o.left-d.left,position:"relative",minWidth:i.width()}),a||h.data("fixHeaderScroll")||(h.data("fixHeaderScroll",1),i.width()>h.width()&&h.on("scroll",function(){e.fixHeader()}))}else l.css({left:o.left,width:o.width});var u=l.find("th");n.find("th").each(function(e){u.eq(e).css("width",t(this).outerWidth())})}else l.remove()},r.prototype.fixFooter=function(){var e,i=this,n=i.getTable(),o=i.$.find(".table-footer");if(i.isDataTable)e=n[0].getBoundingClientRect();else{var a=n.find("tbody");if(!a.length)return;e=a[0].getBoundingClientRect()}var s=i.options.fixFooter;o.toggleClass("fixed-footer",!!r);var r="function"==typeof s?s(e,o):e.bottom>window.innerHeight-50-("number"==typeof s?s:i.pageFooterHeight||5);o.toggleClass("fixed-footer",!!r),n.toggleClass("with-footer-fixed",!!r),n.trigger("fixFooter",r);var l=t("body"),h=l.hasClass("body-modal");if(r){var c=n.parent(),d=c.is(".table-responsive");o.css({bottom:i.pageFooterHeight||0,left:d?c[0].getBoundingClientRect().left:e.left,width:d?c.width():e.width}),h&&l.css("padding-bottom",40)}else o.css({width:"",left:0,bottom:0}),h&&l.css("padding-bottom",0)},r.prototype.checkAll=function(e){var i=this,n=i.$.find(i.isDataTable?".fixed-left tbody>tr":"tbody>tr");n.each(function(){i.checkRow(t(this),e,!0)}),i.updateCheckUI()},r.prototype.checkRow=function(t,i,n){var o=this;o.isDataTable&&!t.is(".datatable-row-left")&&(t=o.getTable().find('.datatable-row-left[data-index="'+t.data("index")+'"]'));var a=t.find('input[type="checkbox"]');a.length&&!a.is(":disabled")&&(i===e&&(i=!a.is(":checked")),o.isDataTable?o.getTable().find('.datatable-row[data-index="'+t.data("index")+'"]').toggleClass("checked",i):t.toggleClass("checked",i),this.checkItems[t.data("id")]=i,a.prop("checked",i).trigger("change"),n||o.updateCheckUI())},r.prototype.updateCheckUI=function(){var e=this,i=e.getTable(),n=i.find(e.isDataTable?".fixed-left tbody>tr":"tbody>tr").not(".group-summary"),o=!1,a=null,s=0,r=!1,l=n.length;n.each(function(n){var h=t(this),c=h.find('input[type="checkbox"]');if(!c.length)return void l--;r=c.is(":checked");var d=e.isDataTable?i.find('.datatable-row[data-index="'+h.data("index")+'"]'):h;d.toggleClass("checked",r),d.toggleClass("row-check-begin",r&&!o),a&&a.toggleClass("row-check-end",!r&&o),r&&(s+=1),a=d,o=r,l===n+1&&d.toggleClass("row-check-end",r)}),e.$.toggleClass("has-row-checked",s>0).find(".check-all").toggleClass("checked",!(!l||s!==l)),e.updateStatistic(),e.options.onCheckChange&&e.options.onCheckChange(),i.trigger("checkChange")},r.DEFAULTS={checkable:!0,checkOnClickRow:!0,ajaxForm:!1,selectable:!0,fixHeader:!a,fixFooter:!a,iframeWidth:900,replaceId:"self",nestLevelIndent:18,nested:!1,preserveNested:!0,hot:!1,iframeModalTrigger:".iframe"},t.fn.table=function(e){return this.each(function(){var n=t(this),o=n.data(i),a="object"==typeof e&&e;o||n.data(i,o=new r(this,a)),"string"==typeof e&&o[e]()})},r.NAME=i,t.fn.table.Constructor=r,t(function(){t('[data-ride="table"]').table()})}(jQuery,void 0),function(t,e,i){t.fn._ajaxForm=t.fn.ajaxForm;var n={timeout:e.config?e.config.timeout:0,dataType:"json",method:"post"},o="";t.fn.enableForm=function(e,n,o){return e===i&&(e=!0),this.each(function(){var i=t(this);n||i.find('[type="submit"]').attr("disabled",e?null:"disabled"),!o&&i.hasClass("load-indicator")&&i.toggleClass("loading",!e),i.toggleClass("form-disabled",!e)})},t.enableForm=function(e,i,n,o){"string"==typeof e||e instanceof t?e=t(e):(o=n,n=i,i=e,e=t("form")),e.enableForm(i!==!1,n,o)},t.disableForm=function(e,i,n){t.enableForm(e,!1,i,n)};var a=function(e,i,n){"string"==typeof i&&(n=i,i=null),n=n||"show",t.zui.messager?t.zui.messager[n](e,i):alert(e)};t.ajaxForm=function(s,r){var l=t(s);if(l.length>1)return l.each(function(){t.ajaxForm(this,r)});"function"==typeof r&&(r={complete:r}),r=t.extend({},n,l.data(),r);var h=r.beforeSubmit,c=r.error,d=r.success,u=r.finish;delete r.finish,delete r.success,delete r.onError,delete r.beforeSubmit,r=t.extend({beforeSubmit:function(n,a,s){if(l.removeClass("form-watched").enableForm(!1),(h&&h(n,a,s))!==!1){var r={},c=a.find('[type="file"]');r.fileapi=c.length&&c[0].files!==i,r.formdata=e.FormData!==i;var d=r.fileapi&&a.find('input[type="file"]:enabled').filter(function(){return""!==t(this).val()}),u=d.length,f="multipart/form-data",p=a.attr("enctype")==f||a.attr("encoding")==f,g=r.fileapi&&r.formdata,m=u&&!g||p&&!r.formdata;m&&(""==o&&(o=s.url),s.url!=o&&(s.url=o),s.url=s.url.indexOf("&")>=0?s.url+"&HTTP_X_REQUESTED_WITH=XMLHttpRequest":s.url+"?HTTP_X_REQUESTED_WITH=XMLHttpRequest")}},success:function(i,n,o){if((d&&d(i,n,o,l))!==!1){try{"string"==typeof i&&(i=JSON.parse(i))}catch(s){}if(null===i||"object"!=typeof i)return i?alert(i):a("No response.","danger");var h=r.responser?t(r.responser):l.find(".form-responser");h.length||(h=t("#responser"));var c=i.message,f=function(){var n=i.callback;if(n){var o=n.indexOf("("),a=(o>0?n.substr(0,o):n).split("."),s=e,r=a[0];a.length>1&&(r=a[1],"top"===a[0]?s=e.top:"parent"===a[0]&&(s=e.parent));var h=s[r];if("function"==typeof h){var c=[];return o>0&&")"==n[n.length-1]&&(c=t.parseJSON("["+n.substring(o+1,n.length-1)+"]")),c.push(i),h.apply(l,c)}}};if("success"===i.result){var p=r.locate||i.locate;if(l.enableForm(!0,!!p),c){var g=l.find('[type="submit"]').first(),m=!1;g.length&&(g.popover({container:"body",trigger:"manual",content:c,tipClass:"popover-in-modal popover-success popover-form-result",placement:i.placement||g.data("placement")||r.popoverPlacement||"right"}).popover("show"),setTimeout(function(){g.popover("destroy")},r.popoverTime||2e3),m=!0),h.length&&(h.html(''+c+"").show().delay(3e3).fadeOut(100),m=!0),m||a(c,"success")}if(u)return u(i,!0,l);if((r.closeModal||i.closeModal)&&setTimeout(t.zui.closeModal,r.closeModalTime||2e3),f()===!1)return;if(p)if("loadInModal"==p){var v=t(".modal");setTimeout(function(){v.load(v.attr("ref"),function(){t(this).find(".modal-dialog").css("width",t(this).data("width")),t.zui.ajustModalPosition()})},1e3)}else"parent"===p||"top"===p?e[p]&&setTimeout(function(){e[p].location.reload()},1200):"reload"===p?setTimeout(function(){e.location.href=e.location.href},1200):setTimeout(function(){t.tabs?t.tabs.open(p):e.location.href=p},1200);var y=r.ajaxReload||i.ajaxReload;if(y){var b=t(y);b.length&&b.load(e.location.href+" "+y,function(){b.find('[data-toggle="modal"]').modalTrigger()})}}else{if(l.enableForm(),"string"==typeof c)h.length?h.html(''+c+"").show().delay(3e3).fadeOut(100):a(c,"danger");else if("object"==typeof c){var w=!1,x=[];t.each(c,function(e,i){var n=t.isArray(i)?i.join(""):i,o=t("#"+e);if(!o.length)return void x.push(n);var a=e+"Label",s=t("#"+a);if(!s.length){var r=o.closest(".input-group").length,l=o.closest("td").length;s=t('
    ').appendTo(l?o.closest("td"):r?o.closest(".input-group").parent():o.parent())}s.empty().append(n),o.addClass("has-error");var h=function(){var e=t("#"+a);if(e.length)return e.remove(),o.removeClass("has-error"),!0};o.on("change input mousedown",h);var c=t("#"+e+"_chosen");if(c.length&&c.find(".chosen-single,.chosen-choices").addClass("has-error").on("mousedown",function(){h()===!0&&t(this).removeClass("has-error")}),!w){if(o.hasClass("chosen"))o.trigger("chosen:activate");else if(o.is("textarea")&&o.data("keditor")){var d=o.data("keditor");d.focus(),d.edit.doc.body.focus()}else o.focus();w=!0}}),x.length&&a(x.join(";"),"danger")}if(u)return u(i,!1,l);if(f()===!1)return}}},error:function(t,i,n){if((c&&c(t,i,n,l))!==!1){l.enableForm();var o="timeout"==i||"error"==i?e.lang?e.lang.timeout:i:t.responseText+i+n;a(o,"danger")}}},r),l._ajaxForm(r).data("zui.ajaxform",!0),l.on("click","[data-form-action]",function(){l.attr("action",t(this).data("formAction")).submit()})},t.setAjaxForm=function(e,i,n){t.ajaxForm(e,t.isPlainObject(i)?i:{onFinish:i,beforeSubmit:n})},t.fn.ajaxForm=function(e){return this.each(function(){t.ajaxForm(this,e)})},t.fn.setInputRequired=function(){return this.each(function(){var e=t(this),i=e.parent();i.is(".input-control,td")?i.addClass("required"):e.is(".chosen")?e.attr("required",null).next(".chosen-container").addClass("required"):i.addClass("required"),e.attr("required",null);var n=i.closest(".input-group");n.length&&1===n.find(".required,input[required],select[required]").length&&n.addClass("required")})},t(function(){t('.form-ajax,form[data-type="ajax"]').ajaxForm(),setTimeout(function(){var i=e.config.requiredFields,n=t("form");i&&(i=i.split(",")),i&&i.length&&t.each(i,function(t,e){n.find("#"+e).attr("required","required")}),n.find("input[required],select[required],textarea[required]").setInputRequired()},400),t('form[target="hiddenwin"]').on("submit",function(){var e=t(this);e.data("zui.ajaxform")||e.enableForm(!1).data("disabledTime",(new Date).getTime())}).on("click",function(){var e=t(this),i=e.data("disabledTime");i&&(new Date).getTime()-i>1e4&&e.enableForm(!0).data("disabledTime",null)})})}(jQuery,window,void 0),function(t){"use strict";var e="zui.searchList",i=function(t,e){if(t&&t.length)for(var i=0;i
    ').append(s)),i.$menu.append(s),i.$menu.removeClass("loading"),i.isLoaded=!0,e&&e(!0)},error:function(){i.$menu.removeClass("loading").append('
    '+(n.errorText||window.lang&&window.lang.timeout)+"
    "),e&&e(!1)}},n.ajax))},n.prototype.scrollTo=function(t){t.length&&t[0].scrollIntoViewIfNeeded&&t[0].scrollIntoViewIfNeeded({behavior:"smooth"})},n.prototype.getItems=function(){return this.$.find(this.options.selector).addClass("search-list-item")},n.prototype.getActiveItem=function(){return this.getItems().filter(".active:first")},n.prototype.search=function(e){var n=this,o=void 0===e||null===e||""===e;n.$.toggleClass("has-search-text",!o);var a=n.getItems().removeClass("active");if(o)a.removeClass("hidden");else{var s=t.trim(e).split(" ");a.each(function(){var e=t(this),n=e.text()+" "+(e.data("key")||e.data("filter"));e.toggleClass("hidden",!i(s,n))})}n.scrollTo(a.not(".hidden").first().addClass("active"))},n.DEFAULTS={selector:".list-group a:not(.not-list-item)",searchBox:".search-box",onSelectItem:null},t.fn.searchList=function(i){return this.each(function(){var o=t(this),a=o.data(e),s="object"==typeof i&&i;a||o.data(e,a=new n(this,s)),"string"==typeof i&&a[i]()})},n.NAME=e,t.fn.searchList.Constructor=n,t(function(){t('[data-ride="searchList"]').searchList()})}(jQuery),function(t){"use strict";var e="zui.labelSelector",i=function(n,o){var a=this;a.name=e,a.$=t(n),o=a.options=t.extend({},i.DEFAULTS,this.$.data(),o),a.$.hide(),a.update()};i.prototype.select=function(t){t+="",this.$wrapper.find(".label.active").removeClass("active"),this.$wrapper.find('.label[data-value="'+t+'"]').addClass("active"),this.$.val(t).trigger("change")},i.prototype.update=function(){var e=this,i=e.options,n=e.$wrapper;if(!n){if(i.wrapper)n=t(i.wrapper);else{var o=e.$.next();n=o.hasClass(".label-selector")?o:t('
    ')}n.parent().length||e.$.after(n),e.$wrapper=n,n.on("click",".label",function(i){var n=e.$.val(),o=t(this).data("value");e.hasEmptyValue!==!1&&o==n&&(o=e.hasEmptyValue),e.select(o),i.preventDefault()})}n.empty();var a=e.$.val();e.hasEmptyValue=!1,e.$.children("option").each(function(){var e=t(this),o={label:e.text(),value:e.val()},s=""===o.value||"0"===o.value,r=t(i.labelTemplate||'');i.labelClass&&!s&&r.addClass(i.labelClass),i.labelCreator?r=i.labelCreator(r):(r.data("option",o).attr("data-value",o.value),s&&!o.label?r.addClass("empty").append(''):r.text(o.label).toggleClass("active",a===o.value)),n.append(r)})},i.DEFAULTS={},t.fn.labelSelector=function(n){return this.each(function(){var o=t(this),a=o.data(e),s="object"==typeof n&&n;a||o.data(e,a=new i(this,s)),"string"==typeof n&&a[n]()})},i.NAME=e,t.fn.labelSelector.Constructor=i,t(function(){t('[data-provide="labelSelector"]').labelSelector()})}(jQuery),function(t){"use strict";var e="zui.fileInput",i=t.BYTE_UNITS={B:1,KB:1024,MB:1048576,GB:1073741824,TB:1099511627776},n=t.formatBytes=function(t,e,n){return void 0===e&&(e=2),n||(n=ts.fileMaxSize&&(h.val(""),(window.bootbox||window).alert(s.fileSizeError.format(n(s.fileMaxSize)))),r.update()}),r.update()};a.prototype.getFile=function(){var t=this.$input.prop("files");return t&&t[0]},a.prototype.update=function(){var t=this,e=t.$,i=t.getFile(),o=!i;e.toggleClass("normal",!o).toggleClass("empty",o),i?(t.oldName=i.name,e.find(".file-title").text(i.name).attr("title",i.name),e.find(".file-size").text(n(i.size)),e.find(".file-editbox").val(i.name).attr("size",i.name.length),t.options.onSelect&&t.options.onSelect(i,t)):e.find(".file-editbox").val("")},a.DEFAULTS={fileMaxSize:0,fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInput=function(i){return this.each(function(){var n=t(this),o=n.data(e),s="object"==typeof i&&i;o||n.data(e,o=new a(this,s)),"string"==typeof i&&o[i]()})},a.NAME=e,t.fn.fileInput.Constructor=a,t(function(){t('[data-provide="fileInput"]').fileInput()});var s="zui.fileInputList",r=function(e,i){var n=this;n.name=s;var o=n.$=t(e);i=n.options=t.extend({},r.DEFAULTS,this.$.data(),i),n.$template=o.find(".file-input").detach(),n.add()};r.prototype.add=function(){var t=this,e=t.options,i=t.$template.clone();"before"===e.appendWay?t.$.prepend(i):t.$.append(i),i.fileInput({fileMaxSize:e.eachFileMaxSize,fileSizeError:e.fileSizeError,onDelete:function(e){e.$.remove(),t.options.onDelete&&t.options.onDelete(e,t)},onSelect:function(e,i){t.add(),t.options.onSelect&&t.options.onSelect(e,i,t)}})},r.DEFAULTS={fileMaxSize:0,eachFileMaxSize:0,appendWay:"after",fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInputList=function(e){return this.each(function(){var i=t(this),n=i.data(s),o="object"==typeof e&&e;n||i.data(s,n=new r(this,o)),"string"==typeof e&&n[e]()})},r.NAME=s,t.fn.fileInputList.Constructor=r,t(function(){t('[data-provide="fileInputList"]').fileInputList()})}(jQuery),function(t){window.config||(window.config={}),t.createLink=window.createLink=function(e,n,o,a,s,r,l){if("object"==typeof e)return t.createLink(e.moduleName,e.methodName,e.vars,e.viewType,e.isOnlyBody,e.hash,e.tid);if(t.tabSession&&(l?"$new"===l&&(l=t.tabSession.getNewTid()):l=t.tabSession.getTid()),a||(a=config.defaultView),s||(s=!1),o)for("string"==typeof o&&(o=o.split("&")),i=0;i'+d+"")}}t.val()||(time=e(a.format("hh:mm")),time=time-time%10+10,t.val(n(time)))};t.fn.timeSpanControl=function(i){return this.each(function(){var s=t(this),r=t.extend({},i,s.data()),l=s.find('[name="begin"],.control-time-begin'),h=s.find('[name="end"],.control-time-end'),c=function(){var t=l.val();if(s.find(".hide-empty-begin").toggleClass("hide",!t),t){var i=n(e(t)+30);h.find('option[value="'+i+'"]').length&&h.val(i),r.onChange&&r.onChange(h,i)}};if(s.data("timeSpanControlInit")){if(r.begin){var d=o(r.begin).format("hh:mm");l.find('option[value="'+d+'"]').length&&l.val(d),r.onChange&&r.onChange(l,d)}if(r.end){var u=o(r.end).format("hh:mm");h.find('option[value="'+u+'"]').length&&h.val(u),r.onChange&&r.onChange(h,u)}}else l.on("change",c),a(l,r.begin),a(h,r.end),s.data("timeSpanControlInit",!0);r.end||c()})},t.timeSpanControl={convertTimeToNum:e,convertNumToTime:n,initTimeSelect:a,createTime:o};var s=t.setSearchType=function(e,i){var n=t("#searchType");e||(e=n.val()),e=e||"bug",n.val(e);var o=t("#searchTypeMenu");o.find("li.selected").removeClass("selected");var a=o.find('a[data-value="'+e+'"]'),s=a.text();a.parent().addClass("selected"),t("#searchTypeName").text(s),i||t("#searchInput").focus()};t.gotoObject=function(e,i){if(e||(e=t("#searchType").val()),i||(i=t("#searchInput").val()),i&&e)if(i=i.replace(/[^\d]/g,"")){var n=e.split("-");e=n[0];var o=n.length>1?n[1]:"testsuite"===e?"library":"view",a=t.createLink(e,o,"id="+i);t.apps?t.apps.open(a):window.location.href=a}else{var s={zh_cn:"请输入数字ID进行搜索",zh_tw:"請輸入數值ID行搜索"};alert(lang.searchTip||s[t.zui.clientLang()]||"Please enter a numberic id to search")}t("#searchInput").val(i).focus()},t(function(){s(null,!0),t(document).on("keydown",function(e){e.ctrlKey&&71===e.keyCode&&(t("#searchInput").val("").focus(),e.stopPropagation(),e.preventDefault())})}),t.removeAnchor=window.removeAnchor=function(t){var e=t.lastIndexOf("#");return e>-1?t.substr(0,e):t},t.refreshPage=function(t){t?window.parent.location.reload():window.location.reload()},t.selectLang=window.selectLang=function(e){t.cookie("lang",e,{expires:config.cookieLife,path:config.webRoot}),t.ajaxSendScore("selectLang"),t.refreshPage(1)},t.selectTheme=window.selectTheme=function(e){t.cookie("theme",e,{expires:config.cookieLife,path:config.webRoot}),t.ajaxSendScore("selectTheme"),t.refreshPage(1)},t.zui.Picker&&t.zui.Picker.enableChosen(),t.chosenDefaultOptions={middle_highlight:!0,disable_search_threshold:1,compact_search:!0,allow_single_deselect:!0,placeholder_text_single:" ",placeholder_text_multiple:" ",search_contains:!0,max_drop_width:500,max_drop_height:245,no_wrap:!0,drop_direction:function(){var e=t(this.container).closest(".table-responsive:not(.scroll-none)");if(e.length){if(this.drop_directionFixed)return this.drop_directionFixed;e.css("position","relative");var i="down",n=this.container.find(".chosen-drop"),o=this.container.position(),a=n.outerHeight();return o.top>=a&&o.top+31+a>e.outerHeight()&&(i="up"),this.drop_directionFixed=i,i}return"auto"}},t.chosenSimpleOptions=t.extend({},t.chosenDefaultOptions,{disable_search_threshold:6}),t.fn._chosen=t.fn.chosen,t.fn.chosen=function(e){return"string"==typeof e?this._chosen(e):this.each(function(){var i=t(this).addClass("chosen-controled");return i._chosen(t.extend({},i.hasClass("chosen-simple")?t.chosenSimpleOptions:t.chosenDefaultOptions,i.data(),e))})},t.fn.chosen.Constructor=t.fn._chosen.Constructor,t(function(){t(".chosen,.chosen-simple").each(function(){var e=t(this);e.closest(".template").length||e.chosen()})}),t.extend(t.fn.pager.Constructor.DEFAULTS,{maxNavCount:8,prevIcon:"icon-angle-left",nextIcon:"icon-angle-right",firstIcon:"icon-first-page",lastIcon:"icon-last-page",navEllipsisItem:"…",menuDirection:"dropup",pageSizeOptions:[5,10,15,20,25,30,35,40,45,50,100,200,500,1e3,2e3],elements:["total_text","size_menu","first_icon","prev_icon",'
    {page}/{totalPage}
    ',"next_icon","last_icon"],onPageChange:function(e,i){e.recPerPage!==i.recPerPage&&t.cookie(this.options.pageCookie,e.recPerPage,{expires:config.cookieLife,path:config.webRoot}),e.recPerPage!==i.recPerPage&&(window.location.href=this.createLink())}}),t.extend(!0,t.zui.Messager.DEFAULTS,{cssClass:"messagger-zt",icons:{success:"check-circle",info:"chat-line",warning:"exclamation-sign",danger:"exclamation-sign"}}),t.fn.reverseOrder=function(){return this.each(function(){var e=t(this);e.prependTo(e.parent())})};var r=function(e,i){var n=t(e);if(!n.data("historiesInited")){n.data("historiesInited",1),i=t.extend({},n.data(),i);var o=n.find(".histories-list"),a=!0,s=!1;n.on("click",".btn-reverse",function(){o.children("li").reverseOrder(),a=!a,t(this).find(".icon").toggleClass("icon-arrow-up",a).toggleClass("icon-arrow-down",!a);var e="#lastComment",i=t(e);i.length&&window.KindEditor&&(window.KindEditor.remove(e),i.kindeditor())}).on("click",".btn-expand-all",function(){var e=t(this).find(".icon");s=!s,e.toggleClass("icon-plus",!s).toggleClass("icon-minus",s),o.children("li").toggleClass("show-changes",s)}).on("click",".btn-expand",function(){t(this).closest("li").toggleClass("show-changes")}).on("click",".btn-strip",function(){var e=t(this),n=e.find(".icon"),o=n.hasClass("icon-code");n.toggleClass("icon-code",!o).toggleClass("icon-text",o),e.attr("title",o?i.original:i.textdiff),e.closest("li").toggleClass("show-original",o)}),o.find(".btn-strip").attr("title",i.original);var r=n.find(".modal-comment").modal({show:!1}).on("shown.zui.modal",function(){var t=r.find("#comment");t.length&&(t.focus(),window.editor&&window.editor.comment&&window.editor.comment.focus())}).on("show.zui.modal",function(){var e=r.find("#comment");e.length&&!e.data("keditor")&&t.fn.kindeditor&&e.kindeditor()});n.on("click",".btn-comment",function(t){r.modal("toggle"),t.preventDefault()}).on("click",".btn-edit-comment,.btn-hide-form",function(){t(this).closest("li").toggleClass("show-form")});var l=n.find(".comment-edit-form");l.ajaxForm({success:function(t,e,i,n){setTimeout(function(){l.closest("li").removeClass("show-form")},2e3)}})}};t.fn.histories=function(t){return this.each(function(){r(this,t)})},t(function(){t(".histories").histories()});var l=0,h=0;t.toggleSidebar=function(e){var i=t("#sidebar");if(i.length){var n=t("main");if(void 0===e)e=n.hasClass("hide-sidebar");else if(e&&!n.hasClass("hide-sidebar"))return;n.toggleClass("hide-sidebar",!e),clearTimeout(l),t.zui.store.set(h,e);var o=i.children(".cell"),a={overflow:"visible",maxHeight:"initial"};e?(i.addClass("showing"),l=setTimeout(function(){i.removeClass("showing"),i.trigger("sidebar.toggle",e)},210)):(i.trigger("sidebar.toggle",e),t(window).width()<1900&&(a={overflow:"hidden",maxHeight:t(window).height()-45})),o.css(a)}};var c=t.initSidebar=function(){var e=t("#sidebar");if(e.length){if(e.data("init"))return!0;h="sidebar:"+(e.data("id")||config.currentModule+"/"+config.currentMethod);var i=t("main");if(i.length){i.on("click",".sidebar-toggle",function(){t.toggleSidebar(i.hasClass("hide-sidebar"))});var n=t.zui.store.get(h,e.data("hide")!==!1);n===!1&&e.addClass("no-animate"),t.toggleSidebar(n),n===!1&&setTimeout(function(){e.removeClass("no-animate")},500);var o=e.find(".sidebar-toggle");if(o.length){var a=function(){var e=o[0].getBoundingClientRect(),i=t(window).height(),n=Math.max(0,Math.floor(Math.min(i-40,e.top+e.height)-Math.max(e.top,0))/2)+(e.top<0?0-e.top:0);o.removeClass("fade").find(".icon").css("top",n+(t.zui.browser.isIE()?(i-80)/2:0))};a(),e.data("init",1).on("sidebar.toggle",a);var s=t.zui.browser.isIE()?1500:0,r=0,l=null,c=function(){var t=Date.now();return l&&(clearTimeout(l),l=null),t-rtr input[type="checkbox"]:checked');i.each(function(){var i=parseInt(t(this).val(),10);NaN!==i&&e.push(i)}),t.cookie("checkedItem",e.join(","),{expires:config.cookieLife,path:config.webRoot})},t.extend(t.fn.modal.bs.Constructor.DEFAULTS,{scrollInside:!0,backdrop:"static",headerHeight:100}),t.extend(t.zui.ModalTrigger.DEFAULTS,{scrollInside:!0,backdrop:"static",headerHeight:40}),t.fn.initIframeModal=function(){return this.each(function(){var e=t(this);if(!e.parents('[data-ride="table"],.skip-iframe-modal').length){var i={type:"iframe"};e.hasClass("export")&&t.extend(i,{width:800,shown:setCheckedCookie},e.data()),e.modalTrigger(i)}})},t(function(){t("a.iframe,.export").initIframeModal()});var d=function(){var e,i,n=t(this),o=t.extend({limitSize:40,suffix:"…"},n.data()),a=n.text();if(a.length>o.limitSize){e=a,i=a.substr(0,o.limitSize)+o.suffix,n.text(i).addClass("limit-text-on");var s=o.toggleBtn?t(o.toggleBtn):n.next(".text-limit-toggle");s.text(s.data("textExpand")),s.on("click",function(){var t=n.toggleClass("limit-text-on").hasClass("limit-text-on");n.text(t?i:e),s.text(s.data(t?"textExpand":"textCollapse"))})}else(o.toggleBtn?t(o.toggleBtn):n.next(".text-limit-toggle")).hide()};t.fn.textLimit=function(){return this.each(d)},t(function(){t(".text-limit").textLimit()}),t.fixedTableHead=window.fixedTableHead=function(e,i){var n=t(e);if(n.is("table")||(n=n.find("table")),n.length){var o=t(i||window),a=null,s=function(){var e=n.children("thead"),i=e[0].getBoundingClientRect(),o=n.next(".fixed-head-table");if(i.top<0){var s=e.width();if(o.length){if(a!==s){a=s;var r=o.find("th");e.find("th").each(function(e){r.eq(e).width(t(this).width()); -})}}else{var o=t("
    ").addClass(n.attr("class")),l=e.clone(),r=l.find("th");e.find("th").each(function(e){r.eq(e).width(t(this).width())}),o.append(l).insertAfter(n)}o.css({left:i.left,width:i.width}).show()}else o.hide()};o.on("scroll",s).on("resize",s),s()}},t(document).on("click","tr[data-url]",function(){var e=t(this),i=e.data("href")||e.data("url");i&&(window.location.href=i)}),"yes"===config.onlybody&&self===parent&&(window.location.href=window.location.href.replace("?onlybody=yes","").replace("&onlybody=yes","")),t(function(){t("body").addClass("m-{currentModule}-{currentMethod}".format(config))});var u,f,p,g,m,v=function(){u||(u=t("#subNavbar"),f=t("#pageNav"),p=t("#pageActions"),g=u.children(".nav"),m=g.outerWidth());var e=u.outerWidth(),i=f.outerWidth()||0,n=p.outerWidth()||0;if(i=i?i+15:0,n=n?n+15:0,!i&&!n)return void g.css({maxWidth:null,left:null,position:"static"});var o=Math.max(300,e-i-n),a=Math.min(o,m),s=(e-a)/2,r=i&&s.btn-toolbar");if(e.length){var i,n,o=e.children(),a=o.length,s=!1,r=null;if(a)for(o.each(function(e){i=t(this),n=i.is(".divider"),n&&!r&&i.hide(),s||n||(s=!0),r=n?null:i,!n||e!==a-1&&0!==e||i.hide()});i.length&&i.is(".divider");)i=i.hide().prev();s||e.hide()}};t(function(){t(".input-group,.btn-group").fixInputGroup(),k()}),window.holders&&t.each(window.holders,function(e){var i=t("#"+e);i.length&&i.is("input")&&i.attr("placeholder",window.holders[e])}),t(function(){var e=t(".table-responsive"),i=t.fixTableResponsive=function(){e.each(function(){this.scrollHeight-3<=this.clientHeight&&this.scrollWidth-3<=this.clientWidth?t(this).addClass("scroll-none").css("overflow","visible"):t(this).removeClass("scroll-none").css("overflow","auto")})};e.length&&(t(window).on("resize",i),setTimeout(i,100))});var T=function(){var e=this,i=t(e),n=i.closest("tr").find("textarea");if(n.length){var o=32;n.each(function(){var e=t(this).closest("td"),i=e.css("height");e.css("height",this.style.height),this.style.height="auto";var n=this.value?this.scrollHeight+2:32;o=Math.max(o,n),e.css("height",i)}),n.css("height",o)}else{e.style.height="auto";var a=e.value?e.scrollHeight+2:32;e.style.height=a+"px"}};t.autoResizeTextarea=function(e){t(e).each(T)},t(function(){t("textarea.autosize").each(T),t(document).on("input paste change","textarea.autosize",T)}),t(function(){var e=t("#dropMenu,.drop-menu");e.length&&e.on("click",".toggle-right-col",function(e){t(this).closest("#dropMenu,.drop-menu").toggleClass("show-right-col"),e.stopPropagation(),e.preventDefault()})});var S="undefined"!=typeof InstallTrigger;t.zui.browser.firefox=S,t("html").toggleClass("is-firefox",S).toggleClass("not-firefox",!S),t(function(){var e=t("#mainContent>.main-col"),i=e.children(".main-actions");if(i.length){var n=i.prev();if(i.length&&n.length){t('
    ').css("height",i.outerHeight()).insertAfter(i);var o=0,a=function(){var e=n[0].getBoundingClientRect(),s=e.top+e.height+120>t(window).height();if(t("body").toggleClass("main-actions-fixed",s),s){const r=n.width();r?i.width(r):o<10&&setTimeout(a,1e3)}o++};t.resetToolbarPosition=a,a(),t(window).on("resize scroll",a)}}}),t(document).on("show.zui.modal",function(e){t("body.body-modal").length&&window.parent&&window.parent!==window&&t(e.target).is(".modal")&&window.parent.$("body").addClass("hide-modal-close")}).on("hidden.zui.modal",function(){t("body.body-modal").length&&window.parent&&window.parent!==window&&window.parent.$("body").removeClass("hide-modal-close")}),t(function(){var e=t(".dropdown-menu.with-search");e.length&&(e.find(".menu-search").on("click",function(t){return t.stopPropagation(),!1}),e.on("keyup change paste","input",function(){var e=t(this),i=e.closest(".dropdown-menu.with-search"),n=e.val().toLowerCase(),o=i.find(".option");""==n?o.removeClass("hide"):o.each(function(){var e=t(this);e.toggleClass("hide",e.text().toString().toLowerCase().indexOf(n)<0&&e.data("key").toString().toLowerCase().indexOf(n)<0)})}),e.parents(".dropdown-submenu").one("mouseenter",function(){var e=t(this).find(".dropdown-list")[0];e&&e.getBoundingClientRect&&setTimeout(function(){var t=270,i=e.getBoundingClientRect();i.top<0&&(t=Math.min(270,i.height)+i.top),e.style.maxHeight=Math.min(270,t)+"px"},50)})),t(".dropdown-menu.with-search .menu-search").on("click",function(t){return t.stopPropagation(),!1})})}(jQuery),function(t){function e(){var e=window.parent,i=config.currentModule,n=config.currentMethod,o="index"===i&&"index"===n,a="#_single"===location.hash||o||!t("#mainHeader,#editorNav").length||"tutorial"===i||"install"===i||"upgrade"===i||"user"===i&&("login"===n||"deny"===n)||"my"===i&&"changepassword"===n||t("body").hasClass("allow-self-open"),s=location.href;if(e===window&&!a){var r=location.pathname+location.search+location.hash,l="";return location.href=t.createLink("index","index",l)+"#app="+encodeURIComponent(r)}if(e!==window&&e.$.apps){o&&e.location.reload();var h=window.name;if(0===h.indexOf("app-")){t.apps=window.apps=e.$.apps;var c=h.substr(4);t.appCode=c,t(document).on("click",function(t){var i=e.document.getElementById(window.name);if(i){var n=e.document.getElementById(i.name)||i;n&&n.dispatchEvent(new Event(t.type,{bubbles:!0}))}}).on("click","a,.open-in-app,.show-in-app",function(e){var i=t(this);if(!i.is("[data-modal],[data-toggle],[data-ride],[data-tab],.iframe,.not-in-app,[target]")&&!i.data("zui.modaltrigger")){var n=i.hasClass("show-in-app")?"":i.attr("href")||(i.is("a")?"":i.data("url")),o=i.data("app")||i.data("group");if(n){if(0===n.indexOf("javascript:")||"#"===n[0])return;var a=t.parseLink(n);if("index"===a.moduleName&&"index"===a.methodName)return window.location.reload(),void e.preventDefault()}else if(!o)return;o||(o=t.apps.getAppCode(n)),o&&("help"===o&&(t.apps.appsMap.help.text=i.text(),t.apps.appsMap.help.url||(t.apps.appsMap.help.url=n)),t.apps.open(n,o)&&e.preventDefault())}}),t.apps.updateUrl(c,s,document.title)}}}function i(){var e=t("#navbar>.nav");if(e.length){var i=t("#heading"),n=+i.css("left").replace("px",""),o=i.outerWidth(),a=e.width(),s=t("#mainHeader>.container").width()-2*n,r=Math.floor((s-a)/2);e.css("marginLeft",r>>0;if(0===o)return!1;for(var a=0|e,s=Math.max(a>=0?a:o-Math.abs(a),0);s1&&("?"===e[0]&&(e=e.substr(1)),e.split("&").forEach(function(t){var e=t.split("=",2);if(e.length>1)try{i[e[0]]=decodeURIComponent(e[1])}catch(n){i[e[0]]=""}else i[e[0]]=""})),t?i[t]:i},t.parseLink=function(e){if(!e)return{};if((0===e.indexOf("http:")||0===e.indexOf("https:"))&&e.indexOf(window.location.origin)<0)return{};var i=e.split("#"),n=i[0].split("?"),o=n[1],a=o?t.getSearchParam("",o):{},s=n[0],r={isOnlyBody:"yes"===a.onlybody,vars:[],hash:i[1]||"",params:a,tid:a.tid||""};if("GET"===config.requestType){r.moduleName=a[config.moduleVar]||"index",r.methodName=a[config.methodVar]||"index",r.viewType=a[config.viewVar]||config.defaultView;for(var l in a)l!==config.moduleVar&&l!==config.methodVar&&l!==config.viewVar&&"onlybody"!==l&&"tid"!==l&&r.vars.push([l,a[l]])}else{var h=s.lastIndexOf("/");h===s.length-1&&(s=s.substr(0,h),h=s.lastIndexOf("/")),h>=0&&(s=s.substr(h+1));var c=s.lastIndexOf(".");c>=0?(r.viewType=s.substr(c+1),s=s.substr(0,c)):r.viewType=config.defaultView;var d=s.split(config.requestFix);if(r.moduleName=d[0]||"index",r.methodName=d[1]||"index",d.length>2)for(var u=2;u.nav>li").length>10&&(i(),t(window).on("resize",i)),setTimeout(n,1e3)})}(jQuery),function(t,e){function i(){return s}function n(){return r}function o(e){var i=t.parseLink(e),n=i.tid||"";return n===r?e:(i.tid=r,t.createLink(i))}function a(){var a=t.parseLink(window.location.href);s=a.tid!==e?a.tid:"",r=t.zui.uuid(),r=r.substr(r.length-8),t.tabSession={getTid:i,getNewTid:n};var l=window.location.origin;t("a").each(function(){var e=t(this),i=e.attr("href");if(0===i.indexOf(l)){var n=t.parseLink(i),o=n.tid||"";s&&s!==o&&(n.tid=s,i=t.createLink(n),e.attr("href",i))}}),t(document).contextmenu({selector:"a",items:function(e){var i=t(e.event.target).closest("a");if(i.length){var n=i.attr("href");return[{label:"打开",url:n},{label:"在新标签页中打开",onClick:function(){console.log("convertUrlWithNewTid(href)",o(n)),window.open(o(n),"_blank")}}]}}})}if(config.tabSession){var s,r;a()}}(jQuery,void 0),$.zui.lang("de",{"zui.pager":{pageOfText:"Seite {0}",prev:"Zurück",next:"Nächste Seite",first:"Erste Seite",last:"Letzte Seite","goto":"Goto",pageOf:"Seite {page}",totalPage:"{totalPage} Seiten",totalCount:"Total: {recTotal} Artikel",pageSize:"{recPerPage} Artikel pro Seite",itemsRange:"Seiten {start} bis {end}",pageOfTotal:"Seite {page}/{totalPage}"},"zui.boards":{append2end:"Gehen Sie zum Ende"},"zui.browser":{tip:"Online. Sorgenfrei. Aktualisiere deinen Browser noch heute!"},"zui.calendar":{weekNames:["Son","Mon","Die","Mit","Don","Fri","Sam"],monthNames:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",year:"{0}Jahr",month:"{0}Monat",yearMonth:"{0}-{1}"},"zui.chosenIcons":{emptyIcon:"[Kein Icon]",commonIcons:"Gemeinsame Symbole",webIcons:"Web-Symbol",editorIcons:"Editor-Symbol",directionalIcons:"Pfeil Zusammenfluss",otherIcons:"Andere Symbole"},"zui.colorPicker":{errorTip:"Kein gültiger Farbwert"},"zui.datagrid":{errorCannotGetDataFromRemote:"Daten vom Remote-Server ({0}) können nicht abgerufen werden.",errorCannotHandleRemoteData:"Die vom Remote-Server zurückgegebenen Daten können nicht verarbeitet werden."},"zui.guideViewer":{prevStep:"Vorheriger Schritt",nextStep:"Nächster Schritt"},"zui.tabs":{reload:"Neu laden",close:"Schliessen",closeOthers:"Schließen Sie andere Registerkarten",closeRight:"Schließen Sie die rechte Registerkarte",reopenLast:"Letzten geschlossenen Tab wiederherstellen",errorCannotFetchFromRemote:"Inhalt kann nicht vom Remote-Server abgerufen werden ({0})."},"zui.uploader":{},datetimepicker:{days:["Sonntag","Montag","Diensteg","Mittwoch","Donnerstag","Freitag","Samstag"],daysShort:["Son","Mon","Die","Mit","Don","Fri","Sam"],daysMin:["Son","Mon","Die","Mit","Don","Fri","Sam"],months:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",suffix:[],meridiem:[]},chosen:{no_results_text:"Nicht gefunden"},bootbox:{OK:"OK",CANCEL:"Stornieren",CONFIRM:"Bestätigen"}}),$.zui.lang("fr",{"zui.pager":{pageOfText:"Page {0}",prev:"Prev",next:"Suivant",first:"First",last:"Last","goto":"Goto",pageOf:"Page {page}",totalPage:"{totalPage} pages",totalCount:"Total: {recTotal} items",pageSize:"{recPerPage} per page",itemsRange:"De {start} à {end}",pageOfTotal:"Page {page} de {totalPage}"},"zui.boards":{append2end:"Aller jusqu'au bout"},"zui.browser":{tip:"Naviguez sans crainte sur Internet. Mettez votre navigateur à jour dès aujourd'hui!"},"zui.calendar":{weekNames:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],monthNames:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",year:"{0} Année",month:"{0} Mois",yearMonth:"{0}-{1}"},"zui.chosenIcons":{emptyIcon:"[Aucune icône]",commonIcons:"Icônes communes",webIcons:"Icône Web",editorIcons:"Icône de l'éditeur",directionalIcons:"Flèche confluence",otherIcons:"Autres icônes"},"zui.colorPicker":{errorTip:"Pas une valeur de couleur valide"},"zui.datagrid":{errorCannotGetDataFromRemote:"Impossible d'obtenir les données du serveur distant ({0}).",errorCannotHandleRemoteData:"Impossible de traiter les données renvoyées par le serveur distant."},"zui.guideViewer":{prevStep:"Étape précédente",nextStep:"Prochaine étape"},"zui.tabs":{reload:"Recharger",close:"Fermer",closeOthers:"Fermez les autres onglets",closeRight:"Fermer l'onglet de droite",reopenLast:"Restaurer le dernier onglet fermé",errorCannotFetchFromRemote:"Impossible d'obtenir le contenu du serveur distant ({0})."},"zui.uploader":{},datetimepicker:{days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],daysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],daysMin:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],months:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],monthsShort:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",suffix:[],meridiem:[]},chosen:{no_results_text:"Pas trouvé"},bootbox:{OK:"D'accord",CANCEL:"Annuler",CONFIRM:"Confirmer"}}); \ No newline at end of file +})}}else{var o=t("
    ").addClass(n.attr("class")),l=e.clone(),r=l.find("th");e.find("th").each(function(e){r.eq(e).width(t(this).width())}),o.append(l).insertAfter(n)}o.css({left:i.left,width:i.width}).show()}else o.hide()};o.on("scroll",s).on("resize",s),s()}},t(document).on("click","tr[data-url]",function(){var e=t(this),i=e.data("href")||e.data("url");i&&(window.location.href=i)}),"yes"===config.onlybody&&self===parent&&(window.location.href=window.location.href.replace("?onlybody=yes","").replace("&onlybody=yes","")),t(function(){t("body").addClass("m-{currentModule}-{currentMethod}".format(config))});var u,f,p,g,m,v=function(){u||(u=t("#subNavbar"),f=t("#pageNav"),p=t("#pageActions"),g=u.children(".nav"),m=g.outerWidth());var e=u.outerWidth(),i=f.outerWidth()||0,n=p.outerWidth()||0;if(i=i?i+15:0,n=n?n+15:0,!i&&!n)return void g.css({maxWidth:null,left:null,position:"static"});var o=Math.max(300,e-i-n),a=Math.min(o,m),s=(e-a)/2,r=i&&s.btn-toolbar");if(e.length){var i,n,o=e.children(),a=o.length,s=!1,r=null;if(a)for(o.each(function(e){i=t(this),n=i.is(".divider"),n&&!r&&i.hide(),s||n||(s=!0),r=n?null:i,!n||e!==a-1&&0!==e||i.hide()});i.length&&i.is(".divider");)i=i.hide().prev();s||e.hide()}};t(function(){t(".input-group,.btn-group").fixInputGroup(),k()}),window.holders&&t.each(window.holders,function(e){var i=t("#"+e);i.length&&i.is("input")&&i.attr("placeholder",window.holders[e])}),t(function(){var e=t(".table-responsive"),i=t.fixTableResponsive=function(){e.each(function(){this.scrollHeight-3<=this.clientHeight&&this.scrollWidth-3<=this.clientWidth?t(this).addClass("scroll-none").css("overflow","visible"):t(this).removeClass("scroll-none").css("overflow","auto")})};e.length&&(t(window).on("resize",i),setTimeout(i,100))});var T=function(){var e=this,i=t(e),n=i.closest("tr").find("textarea");if(n.length){var o=32;n.each(function(){var e=t(this).closest("td"),i=e.css("height");e.css("height",this.style.height),this.style.height="auto";var n=this.value?this.scrollHeight+2:32;o=Math.max(o,n),e.css("height",i)}),n.css("height",o)}else{e.style.height="auto";var a=e.value?e.scrollHeight+2:32;e.style.height=a+"px"}};t.autoResizeTextarea=function(e){t(e).each(T)},t(function(){t("textarea.autosize").each(T),t(document).on("input paste change","textarea.autosize",T)}),t(function(){var e=t("#dropMenu,.drop-menu");e.length&&e.on("click",".toggle-right-col",function(e){t(this).closest("#dropMenu,.drop-menu").toggleClass("show-right-col"),e.stopPropagation(),e.preventDefault()})});var S="undefined"!=typeof InstallTrigger;t.zui.browser.firefox=S,t("html").toggleClass("is-firefox",S).toggleClass("not-firefox",!S),t(function(){var e=t("#mainContent>.main-col"),i=e.children(".main-actions");if(i.length){var n=i.prev();if(i.length&&n.length){t('
    ').css("height",i.outerHeight()).insertAfter(i);var o=0,a=function(){var e=n[0].getBoundingClientRect(),s=e.top+e.height+120>t(window).height();if(t("body").toggleClass("main-actions-fixed",s),s){const r=n.width();r?i.width(r):o<10&&setTimeout(a,1e3)}o++};t.resetToolbarPosition=a,a(),t(window).on("resize scroll",a)}}}),t(document).on("show.zui.modal",function(e){t("body.body-modal").length&&window.parent&&window.parent!==window&&t(e.target).is(".modal")&&window.parent.$("body").addClass("hide-modal-close")}).on("hidden.zui.modal",function(){t("body.body-modal").length&&window.parent&&window.parent!==window&&window.parent.$("body").removeClass("hide-modal-close")}),t(function(){var e=t(".dropdown-menu.with-search");e.length&&(e.find(".menu-search").on("click",function(t){return t.stopPropagation(),!1}),e.on("keyup change paste","input",function(){var e=t(this),i=e.closest(".dropdown-menu.with-search"),n=e.val().toLowerCase(),o=i.find(".option");""==n?o.removeClass("hide"):o.each(function(){var e=t(this);e.toggleClass("hide",e.text().toString().toLowerCase().indexOf(n)<0&&e.data("key").toString().toLowerCase().indexOf(n)<0)})}),e.parents(".dropdown-submenu").one("mouseenter",function(){var e=t(this).find(".dropdown-list")[0];e&&e.getBoundingClientRect&&setTimeout(function(){var t=270,i=e.getBoundingClientRect();i.top<0&&(t=Math.min(270,i.height)+i.top),e.style.maxHeight=Math.min(270,t)+"px"},50)})),t(".dropdown-menu.with-search .menu-search").on("click",function(t){return t.stopPropagation(),!1})})}(jQuery),function(t){function e(){var e=window.parent,i=config.currentModule,n=config.currentMethod,o="index"===i&&"index"===n,a="#_single"===location.hash||o||!t("#mainHeader,#editorNav").length||"tutorial"===i||"install"===i||"upgrade"===i||"user"===i&&("login"===n||"deny"===n)||"my"===i&&"changepassword"===n||t("body").hasClass("allow-self-open"),s=location.href;if(e===window&&!a){var r=location.pathname+location.search+location.hash,l="";return location.href=t.createLink("index","index",l)+"#app="+encodeURIComponent(r)}if(e!==window&&e.$.apps){o&&e.location.reload();var h=window.name;if(0===h.indexOf("app-")){t.apps=window.apps=e.$.apps;var c=h.substr(4);t.appCode=c,t(document).on("click",function(t){var i=e.document.getElementById(window.name);if(i){var n=e.document.getElementById(i.name)||i;n&&n.dispatchEvent(new Event(t.type,{bubbles:!0}))}}).on("click","a,.open-in-app,.show-in-app",function(e){var i=t(this);if(!i.is("[data-modal],[data-toggle],[data-ride],[data-tab],.iframe,.not-in-app,[target]")&&!i.data("zui.modaltrigger")){var n=i.hasClass("show-in-app")?"":i.attr("href")||(i.is("a")?"":i.data("url")),o=i.data("app")||i.data("group");if(n){if(0===n.indexOf("javascript:")||"#"===n[0])return;var a=t.parseLink(n);if("index"===a.moduleName&&"index"===a.methodName)return window.location.reload(),void e.preventDefault()}else if(!o)return;o||(o=t.apps.getAppCode(n)),o&&("help"===o&&(t.apps.appsMap.help.text=i.text(),t.apps.appsMap.help.url||(t.apps.appsMap.help.url=n)),t.apps.open(n,o)&&e.preventDefault())}}),t.apps.updateUrl(c,s,document.title)}}}function i(){var e=t("#navbar>.nav");if(e.length){var i=t("#heading"),n=+i.css("left").replace("px",""),o=i.outerWidth(),a=e.width(),s=t("#mainHeader>.container").width()-2*n,r=Math.floor((s-a)/2);e.css("marginLeft",r>>0;if(0===o)return!1;for(var a=0|e,s=Math.max(a>=0?a:o-Math.abs(a),0);s1&&("?"===e[0]&&(e=e.substr(1)),e.split("&").forEach(function(t){var e=t.split("=",2);if(e.length>1)try{i[e[0]]=decodeURIComponent(e[1])}catch(n){i[e[0]]=""}else i[e[0]]=""})),t?i[t]:i},t.parseLink=function(e){if(!e)return{};if((0===e.indexOf("http:")||0===e.indexOf("https:"))&&e.indexOf(window.location.origin)<0)return{};var i=e.split("#"),n=i[0].split("?"),o=n[1],a=o?t.getSearchParam("",o):{},s=n[0],r={isOnlyBody:"yes"===a.onlybody,vars:[],hash:i[1]||"",params:a,tid:a.tid||""};if("GET"===config.requestType){r.moduleName=a[config.moduleVar]||"index",r.methodName=a[config.methodVar]||"index",r.viewType=a[config.viewVar]||config.defaultView;for(var l in a)l!==config.moduleVar&&l!==config.methodVar&&l!==config.viewVar&&"onlybody"!==l&&"tid"!==l&&r.vars.push([l,a[l]])}else{var h=s.lastIndexOf("/");h===s.length-1&&(s=s.substr(0,h),h=s.lastIndexOf("/")),h>=0&&(s=s.substr(h+1));var c=s.lastIndexOf(".");c>=0?(r.viewType=s.substr(c+1),s=s.substr(0,c)):r.viewType=config.defaultView;var d=s.split(config.requestFix);if(r.moduleName=d[0]||"index",r.methodName=d[1]||"index",d.length>2)for(var u=2;u.nav>li").length>10&&(i(),t(window).on("resize",i)),setTimeout(n,1e3)})}(jQuery),function(t,e){function i(){return s}function n(){return r}function o(e){var i=t.parseLink(e),n=i.tid||"";return n===r?e:(i.tid=r,t.createLink(i))}function a(){var a=t.parseLink(window.location.href);s=a.tid!==e?a.tid:"",r=t.zui.uuid(),r=r.substr(r.length-8),t.tabSession={getTid:i,getNewTid:n};var l=window.location.origin;t("a").each(function(){var e=t(this),i=e.attr("href");if(0===i.indexOf(l)){var n=t.parseLink(i),o=n.tid||"";s&&s!==o&&(n.tid=s,i=t.createLink(n),e.attr("href",i))}}),t(document).contextmenu({selector:"a",items:function(e){var i=t(e.event.target).closest("a");if(i.length){var n=i.attr("href");return[{label:"打开",url:n},{label:"在新标签页中打开",onClick:function(){console.log("convertUrlWithNewTid(href)",o(n)),window.open(o(n),"_blank")}}]}}})}if(config.tabSession){var s,r;a()}}(jQuery,void 0),$.zui.lang("de",{"zui.pager":{pageOfText:"Seite {0}",prev:"Zurück",next:"Nächste Seite",first:"Erste Seite",last:"Letzte Seite","goto":"Goto",pageOf:"Seite {page}",totalPage:"{totalPage} Seiten",totalCount:"Total: {recTotal} Artikel",pageSize:"{recPerPage} Artikel pro Seite",itemsRange:"Seiten {start} bis {end}",pageOfTotal:"Seite {page}/{totalPage}"},"zui.boards":{append2end:"Gehen Sie zum Ende"},"zui.browser":{tip:"Online. Sorgenfrei. Aktualisiere deinen Browser noch heute!"},"zui.calendar":{weekNames:["Son","Mon","Die","Mit","Don","Fri","Sam"],monthNames:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",year:"{0}Jahr",month:"{0}Monat",yearMonth:"{0}-{1}"},"zui.chosenIcons":{emptyIcon:"[Kein Icon]",commonIcons:"Gemeinsame Symbole",webIcons:"Web-Symbol",editorIcons:"Editor-Symbol",directionalIcons:"Pfeil Zusammenfluss",otherIcons:"Andere Symbole"},"zui.colorPicker":{errorTip:"Kein gültiger Farbwert"},"zui.datagrid":{errorCannotGetDataFromRemote:"Daten vom Remote-Server ({0}) können nicht abgerufen werden.",errorCannotHandleRemoteData:"Die vom Remote-Server zurückgegebenen Daten können nicht verarbeitet werden."},"zui.guideViewer":{prevStep:"Vorheriger Schritt",nextStep:"Nächster Schritt"},"zui.tabs":{reload:"Neu laden",close:"Schliessen",closeOthers:"Schließen Sie andere Registerkarten",closeRight:"Schließen Sie die rechte Registerkarte",reopenLast:"Letzten geschlossenen Tab wiederherstellen",errorCannotFetchFromRemote:"Inhalt kann nicht vom Remote-Server abgerufen werden ({0})."},"zui.uploader":{},datetimepicker:{days:["Sonntag","Montag","Diensteg","Mittwoch","Donnerstag","Freitag","Samstag"],daysShort:["Son","Mon","Die","Mit","Don","Fri","Sam"],daysMin:["Son","Mon","Die","Mit","Don","Fri","Sam"],months:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",suffix:[],meridiem:[]},chosen:{no_results_text:"Nicht gefunden"},bootbox:{OK:"OK",CANCEL:"Stornieren",CONFIRM:"Bestätigen"}}),$.zui.lang("fr",{"zui.pager":{pageOfText:"Page {0}",prev:"Prev",next:"Suivant",first:"First",last:"Last","goto":"Goto",pageOf:"Page {page}",totalPage:"{totalPage} pages",totalCount:"Total: {recTotal} items",pageSize:"{recPerPage} per page",itemsRange:"De {start} à {end}",pageOfTotal:"Page {page} de {totalPage}"},"zui.boards":{append2end:"Aller jusqu'au bout"},"zui.browser":{tip:"Naviguez sans crainte sur Internet. Mettez votre navigateur à jour dès aujourd'hui!"},"zui.calendar":{weekNames:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],monthNames:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",year:"{0} Année",month:"{0} Mois",yearMonth:"{0}-{1}"},"zui.chosenIcons":{emptyIcon:"[Aucune icône]",commonIcons:"Icônes communes",webIcons:"Icône Web",editorIcons:"Icône de l'éditeur",directionalIcons:"Flèche confluence",otherIcons:"Autres icônes"},"zui.colorPicker":{errorTip:"Pas une valeur de couleur valide"},"zui.datagrid":{errorCannotGetDataFromRemote:"Impossible d'obtenir les données du serveur distant ({0}).",errorCannotHandleRemoteData:"Impossible de traiter les données renvoyées par le serveur distant."},"zui.guideViewer":{prevStep:"Étape précédente",nextStep:"Prochaine étape"},"zui.tabs":{reload:"Recharger",close:"Fermer",closeOthers:"Fermez les autres onglets",closeRight:"Fermer l'onglet de droite",reopenLast:"Restaurer le dernier onglet fermé",errorCannotFetchFromRemote:"Impossible d'obtenir le contenu du serveur distant ({0})."},"zui.uploader":{},datetimepicker:{days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],daysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],daysMin:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],months:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],monthsShort:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",suffix:[],meridiem:[]},chosen:{no_results_text:"Pas trouvé"},bootbox:{OK:"D'accord",CANCEL:"Annuler",CONFIRM:"Confirmer"}});