From 3b415a49ec9ca3495dde20d228f5424484d4c150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=94=E4=BB=A4=E8=8C=82?= Date: Tue, 17 Jan 2023 15:25:59 +0800 Subject: [PATCH 001/349] + Resolved feedback #2016, the api my work task response error. --- module/my/control.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module/my/control.php b/module/my/control.php index 78dcb8192d..0b8c80881c 100755 --- a/module/my/control.php +++ b/module/my/control.php @@ -198,6 +198,8 @@ class my extends control $meetingCount = $pager->recTotal; } + if($this->app->viewType != 'json') + { echo << var taskCount = $taskCount; @@ -227,6 +229,7 @@ if(isMax !== 0) } EOF; + } } /** From 3d3157075c1485875b04ba27adb80213c36bf0e5 Mon Sep 17 00:00:00 2001 From: zhaoke Date: Tue, 14 Feb 2023 10:35:01 +0000 Subject: [PATCH 002/349] * Finish task #84712. --- api/v1/entries/hostheartbeat.php | 9 ++++ module/zanode/lang/zh-cn.php | 3 ++ module/zanode/model.php | 48 ++++++++++++++++++++++ module/zanode/view/browsesnapshot.html.php | 7 +++- 4 files changed, 65 insertions(+), 2 deletions(-) diff --git a/api/v1/entries/hostheartbeat.php b/api/v1/entries/hostheartbeat.php index cec8180eca..e245419fec 100644 --- a/api/v1/entries/hostheartbeat.php +++ b/api/v1/entries/hostheartbeat.php @@ -84,6 +84,15 @@ class hostHeartbeatEntry extends baseEntry if($heartbeat > 0) $vmData['heartbeat'] = date("Y-m-d H:i:s", $heartbeat); $this->dao->update(TABLE_ZAHOST)->data($vmData)->where('mac')->eq($vm->macAddress)->exec(); + + if($vm->status == 'running') + { + $node = $this->loadModel('zanode')->getNodeByMac($vm->macAddress); + $snaps = $this->loadModel('zanode')->getSnapshotList($node->id); + if(empty($snaps)){ + if($vm->status == 'running') $this->loadModel('zanode')->createDefaultSnapshot($node->id); + } + } } } diff --git a/module/zanode/lang/zh-cn.php b/module/zanode/lang/zh-cn.php index 220b61ae5e..f954e13d41 100644 --- a/module/zanode/lang/zh-cn.php +++ b/module/zanode/lang/zh-cn.php @@ -99,6 +99,9 @@ $lang->zanode->snapshot->statusList['restoring'] = '还原中'; $lang->zanode->snapshot->statusList['restore_failed'] = '还原失败'; $lang->zanode->snapshot->statusList['restore_completed'] = '还原成功'; +$lang->zanode->snapshot->defaultSnapName = '初始快照'; +$lang->zanode->snapshot->defaultSnapUser = '系统'; + $lang->zanode->imageNameEmpty = '名称不能为空'; $lang->zanode->imageNameEmpty = '名称不能为空'; $lang->zanode->snapStatusError = '快照不可用'; diff --git a/module/zanode/model.php b/module/zanode/model.php index bd81193d76..936d479e6f 100644 --- a/module/zanode/model.php +++ b/module/zanode/model.php @@ -231,6 +231,54 @@ class zanodemodel extends model return false; } + public function createDefaultSnapshot($zanodeID = 0) + { + $node = $this->getNodeByID($zanodeID); + if($node->status != 'running') dao::$errors['name'] = $this->lang->zanode->apiError['notRunning']; + if(dao::isError()) return false; + + $newSnapshot = new stdClass(); + $newSnapshot->host = $node->id; + $newSnapshot->name = "defaultSnap"; + $newSnapshot->desc = ""; + $newSnapshot->status = 'creating'; + $newSnapshot->osName = $node->osName; + $newSnapshot->from = 'snapshot'; + $newSnapshot->createdBy = 'system'; + $newSnapshot->createdDate = helper::now(); + + $this->dao->insert(TABLE_IMAGE) + ->data($newSnapshot) + ->autoCheck() + ->exec(); + + if(dao::isError()) return false; + + $newID = $this->dao->lastInsertID(); + + /* Prepare create params. */ + $agnetUrl = 'http://' . $node->ip . ':' . $node->hzap; + $param = array(array( + 'name' => $newSnapshot->name, + 'task' => $newID, + 'type' => 'createSnap', + 'vm' => $node->name + )); + + $result = json_decode(commonModel::http($agnetUrl . static::SNAPSHOT_CREATE_PATH, json_encode($param,JSON_NUMERIC_CHECK), null, array("Authorization:$node->tokenSN"))); + + + if(!empty($result) and $result->code == 'success') + { + $this->loadModel('action')->create('zanode', $zanodeID, 'createdSnapshot', '', $data->name); + return $newID; + } + + $this->dao->delete()->from(TABLE_IMAGE)->where('id')->eq($newID)->exec(); + dao::$errors[] = (!empty($result) and !empty($result->msg)) ? $result->msg : $this->app->lang->fail; + return false; + } + /** * Edit Snapshot. * diff --git a/module/zanode/view/browsesnapshot.html.php b/module/zanode/view/browsesnapshot.html.php index 055aa2fc9f..f1ea3462cc 100644 --- a/module/zanode/view/browsesnapshot.html.php +++ b/module/zanode/view/browsesnapshot.html.php @@ -44,10 +44,13 @@ $deleteAttr = "title='{$lang->zanode->deleteSnapshot}' target='hiddenwin'"; $deleteAttr .= ($snapshot->status == 'restoring' or $snapshot->status == 'creating') ? ' class="btn disabled"' : 'class="btn"'; + + $isDefalut = $snapshot->name == 'defaultSnap' && $snapshot->createdBy == 'system'; + if($isDefalut) $editAttr = $restoreAttr = $deleteAttr = 'class="btn disabled"'; ?> - localName ? $snapshot->localName : $snapshot->name;?> + localName ? $snapshot->localName : $snapshot->name;?> zanode->snapshot->statusList, $snapshot->status, '');?> - createdBy, '')?> + name == 'defaultSnap' && $snapshot->createdBy == 'system' ? $lang->zanode->snapshot->defaultSnapUser : zget($users, $snapshot->createdBy, '')?> createdDate;?> ', 'hiddenwin', $editAttr);?> From ecaf6e3ec8fa34704d23ef185c9d10b3015cc58e Mon Sep 17 00:00:00 2001 From: zhaoke Date: Wed, 15 Feb 2023 10:22:15 +0800 Subject: [PATCH 003/349] * Add default snapshot. --- module/zahost/lang/de.php | 2 +- module/zahost/lang/en.php | 2 +- module/zahost/lang/fr.php | 2 +- module/zahost/lang/vi.php | 2 +- module/zanode/control.php | 3 +-- module/zanode/lang/de.php | 7 +++++-- module/zanode/lang/en.php | 5 ++++- module/zanode/lang/fr.php | 5 ++++- module/zanode/view/browsesnapshot.html.php | 9 ++++++++- module/zanode/view/view.html.php | 16 +++++++++++----- 10 files changed, 37 insertions(+), 16 deletions(-) diff --git a/module/zahost/lang/de.php b/module/zahost/lang/de.php index b33c6f24cd..eb6f4b21e3 100644 --- a/module/zahost/lang/de.php +++ b/module/zahost/lang/de.php @@ -92,7 +92,7 @@ $lang->zahost->image->statusList['created'] = 'Inprogress'; $lang->zahost->image->statusList['canceled'] = 'Not Downloaded'; $lang->zahost->image->statusList['inprogress'] = 'Inprogress'; $lang->zahost->image->statusList['pending'] = 'Waiting for download'; -$lang->zahost->image->statusList['completed'] = 'Completed'; +$lang->zahost->image->statusList['completed'] = 'Usable'; $lang->zahost->image->statusList['failed'] = 'Failed'; $lang->zahost->image->imageEmpty = 'No Image'; diff --git a/module/zahost/lang/en.php b/module/zahost/lang/en.php index b33c6f24cd..eb6f4b21e3 100644 --- a/module/zahost/lang/en.php +++ b/module/zahost/lang/en.php @@ -92,7 +92,7 @@ $lang->zahost->image->statusList['created'] = 'Inprogress'; $lang->zahost->image->statusList['canceled'] = 'Not Downloaded'; $lang->zahost->image->statusList['inprogress'] = 'Inprogress'; $lang->zahost->image->statusList['pending'] = 'Waiting for download'; -$lang->zahost->image->statusList['completed'] = 'Completed'; +$lang->zahost->image->statusList['completed'] = 'Usable'; $lang->zahost->image->statusList['failed'] = 'Failed'; $lang->zahost->image->imageEmpty = 'No Image'; diff --git a/module/zahost/lang/fr.php b/module/zahost/lang/fr.php index b33c6f24cd..eb6f4b21e3 100644 --- a/module/zahost/lang/fr.php +++ b/module/zahost/lang/fr.php @@ -92,7 +92,7 @@ $lang->zahost->image->statusList['created'] = 'Inprogress'; $lang->zahost->image->statusList['canceled'] = 'Not Downloaded'; $lang->zahost->image->statusList['inprogress'] = 'Inprogress'; $lang->zahost->image->statusList['pending'] = 'Waiting for download'; -$lang->zahost->image->statusList['completed'] = 'Completed'; +$lang->zahost->image->statusList['completed'] = 'Usable'; $lang->zahost->image->statusList['failed'] = 'Failed'; $lang->zahost->image->imageEmpty = 'No Image'; diff --git a/module/zahost/lang/vi.php b/module/zahost/lang/vi.php index f639c0ca5c..2f0672f79a 100644 --- a/module/zahost/lang/vi.php +++ b/module/zahost/lang/vi.php @@ -91,7 +91,7 @@ $lang->zahost->image->statusList['created'] = 'Inprogress'; $lang->zahost->image->statusList['canceled'] = 'Not Downloaded'; $lang->zahost->image->statusList['inprogress'] = 'Inprogress'; $lang->zahost->image->statusList['pending'] = 'Waiting for download'; -$lang->zahost->image->statusList['completed'] = 'Completed'; +$lang->zahost->image->statusList['completed'] = 'Usable'; $lang->zahost->image->statusList['failed'] = 'Failed'; $lang->zahost->image->imageEmpty = 'No Image'; diff --git a/module/zanode/control.php b/module/zanode/control.php index 245ecbd4c9..fdaf931fd8 100644 --- a/module/zanode/control.php +++ b/module/zanode/control.php @@ -391,8 +391,7 @@ class zanode extends control } else { - if(isonlybody()) return print(js::alert($this->lang->zanode->actionSuccess) . js::reload('parent.parent')); - return print(js::alert($this->lang->zanode->actionSuccess) . js::locate($this->createLink('zanode', 'browse'), 'parent')); + return print(js::alert($this->lang->zanode->actionSuccess) . js::locate($this->createLink('zanode', 'browse'), 'parent.parent')); } } diff --git a/module/zanode/lang/de.php b/module/zanode/lang/de.php index 6fb124d62c..284b616b49 100644 --- a/module/zanode/lang/de.php +++ b/module/zanode/lang/de.php @@ -91,11 +91,14 @@ $lang->zanode->snapshotEmpty = 'No snapshots'; $lang->zanode->confirmDeleteSnapshot = "The snapshot cannot be restored from the recycle bin after being deleted. Are you sure to continue?"; $lang->zanode->snapshot->statusList['creating'] = 'Creating'; -$lang->zanode->snapshot->statusList['completed'] = 'Create Completed'; +$lang->zanode->snapshot->statusList['completed'] = 'Usable'; $lang->zanode->snapshot->statusList['failed'] = 'Create Failed'; $lang->zanode->snapshot->statusList['restoring'] = 'Restoring'; $lang->zanode->snapshot->statusList['restore_failed'] = 'Restore Failed'; -$lang->zanode->snapshot->statusList['restore_completed'] = 'Restore Completed'; +$lang->zanode->snapshot->statusList['restore_completed'] = 'Usable'; + +$lang->zanode->snapshot->defaultSnapName = 'DefaultSnapshot'; +$lang->zanode->snapshot->defaultSnapUser = 'System'; $lang->zanode->imageNameEmpty = 'Name can not be empty.'; diff --git a/module/zanode/lang/en.php b/module/zanode/lang/en.php index 563d3eed23..c1d66e45fe 100644 --- a/module/zanode/lang/en.php +++ b/module/zanode/lang/en.php @@ -93,12 +93,15 @@ $lang->zanode->snapshotEmpty = 'No snapshots'; $lang->zanode->confirmDeleteSnapshot = "The snapshot cannot be restored from the recycle bin after being deleted. Are you sure to continue?"; $lang->zanode->snapshot->statusList['creating'] = 'Creating'; -$lang->zanode->snapshot->statusList['completed'] = 'Create Completed'; +$lang->zanode->snapshot->statusList['completed'] = 'Usable'; $lang->zanode->snapshot->statusList['failed'] = 'Create Failed'; $lang->zanode->snapshot->statusList['restoring'] = 'Restoring'; $lang->zanode->snapshot->statusList['restore_failed'] = 'Restore Failed'; $lang->zanode->snapshot->statusList['restore_completed'] = 'Restore Completed'; +$lang->zanode->snapshot->defaultSnapName = 'DefaultSnapshot'; +$lang->zanode->snapshot->defaultSnapUser = 'System'; + $lang->zanode->imageNameEmpty = 'Name can not be empty.'; $lang->zanode->snapStatusError = 'Snapshot is not ready.'; $lang->zanode->snapRestoring = 'Snapshot is restoring.'; diff --git a/module/zanode/lang/fr.php b/module/zanode/lang/fr.php index 6fb124d62c..0691c5edee 100644 --- a/module/zanode/lang/fr.php +++ b/module/zanode/lang/fr.php @@ -95,7 +95,10 @@ $lang->zanode->snapshot->statusList['completed'] = 'Create Completed'; $lang->zanode->snapshot->statusList['failed'] = 'Create Failed'; $lang->zanode->snapshot->statusList['restoring'] = 'Restoring'; $lang->zanode->snapshot->statusList['restore_failed'] = 'Restore Failed'; -$lang->zanode->snapshot->statusList['restore_completed'] = 'Restore Completed'; +$lang->zanode->snapshot->statusList['restore_completed'] = 'Usable'; + +$lang->zanode->snapshot->defaultSnapName = 'DefaultSnapshot'; +$lang->zanode->snapshot->defaultSnapUser = 'System'; $lang->zanode->imageNameEmpty = 'Name can not be empty.'; diff --git a/module/zanode/view/browsesnapshot.html.php b/module/zanode/view/browsesnapshot.html.php index f1ea3462cc..d1077bdf17 100644 --- a/module/zanode/view/browsesnapshot.html.php +++ b/module/zanode/view/browsesnapshot.html.php @@ -47,8 +47,15 @@ $isDefalut = $snapshot->name == 'defaultSnap' && $snapshot->createdBy == 'system'; if($isDefalut) $editAttr = $restoreAttr = $deleteAttr = 'class="btn disabled"'; + $name = $snapshot->localName ? $snapshot->localName : $snapshot->name; + $title = $snapshot->name; + if($snapshot->name == 'defaultSnap' && $snapshot->createdBy == 'system') + { + $name = $lang->zanode->snapshot->defaultSnapName; + $title = $name; + } ?> - localName ? $snapshot->localName : $snapshot->name;?> + zanode->snapshot->statusList, $snapshot->status, '');?> name == 'defaultSnap' && $snapshot->createdBy == 'system' ? $lang->zanode->snapshot->defaultSnapUser : zget($users, $snapshot->createdBy, '')?> createdDate;?> diff --git a/module/zanode/view/view.html.php b/module/zanode/view/view.html.php index bfbf82c536..63837c1590 100644 --- a/module/zanode/view/view.html.php +++ b/module/zanode/view/view.html.php @@ -177,13 +177,19 @@ $account = strpos($zanode->osName, "windows") ? $config->zanode->defaultWinAccou deleted)) { $suspendAttr = "title='{$lang->zanode->suspend}' target='hiddenwin'"; - $suspendAttr .= $zanode->status != 'running' && $zanode->status != 'wait' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmSuspend}\")==false) return false;'"; + $suspendAttr .= $zanode->status != 'running' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmSuspend}\")==false) return false;'"; $resumeAttr = "title='{$lang->zanode->resume}' target='hiddenwin'"; - $resumeAttr .= $zanode->status == 'running' || $zanode->status == 'wait' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmResume}\")==false) return false;'"; + $resumeAttr .= $zanode->status == 'running' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmResume}\")==false) return false;'"; $rebootAttr = "title='{$lang->zanode->reboot}' target='hiddenwin'"; - $rebootAttr .= $zanode->status == 'shutoff' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmReboot}\")==false) return false;'"; + $rebootAttr .= $zanode->status == 'shutoff' || $zanode->status == 'wait' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmReboot}\")==false) return false;'"; + + $closeAttr = "title='{$lang->zanode->shutdown}'"; + $closeAttr .= $zanode->status == 'wait' ? ' class="btn disabled"' : ' class="btn iframe"'; + + $startAttr = "title='{$lang->zanode->boot}'"; + $startAttr .= $zanode->status == 'wait' ? ' class="btn disabled"' : ' class="btn iframe"'; $snapshotAttr = "title='{$lang->zanode->createSnapshot}'"; $snapshotAttr .= $zanode->status != 'running' ? ' class="btn disabled"' : ' class="btn iframe"'; @@ -200,11 +206,11 @@ $account = strpos($zanode->osName, "windows") ? $config->zanode->defaultWinAccou if($zanode->status == "shutoff") { - common::printLink('zanode', 'start', "zanodeID={$zanode->id}", " " . $lang->zanode->bootNode, '', "title='{$lang->zanode->boot}' class='btn '"); + common::printLink('zanode', 'start', "zanodeID={$zanode->id}", " " . $lang->zanode->bootNode, '', $startAttr); } else { - common::printLink('zanode', 'close', "zanodeID={$zanode->id}", " " . $lang->zanode->shutdownNode, '', "title='{$lang->zanode->shutdown}' class='btn '"); + common::printLink('zanode', 'close', "zanodeID={$zanode->id}", " " . $lang->zanode->shutdownNode, '', $closeAttr); } common::printLink('zanode', 'reboot', "zanodeID={$zanode->id}", " " . $lang->zanode->rebootNode, '', $rebootAttr); From 375465b56c06981bde172b0e141ba7e42ef2fe74 Mon Sep 17 00:00:00 2001 From: zhaoke Date: Wed, 15 Feb 2023 14:35:59 +0800 Subject: [PATCH 004/349] * Finish task 84707. --- module/zanode/view/browse.html.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/module/zanode/view/browse.html.php b/module/zanode/view/browse.html.php index 12e85471ea..773bd58fe8 100644 --- a/module/zanode/view/browse.html.php +++ b/module/zanode/view/browse.html.php @@ -78,17 +78,25 @@ zanode->suspend}' target='hiddenwin'"; - $suspendAttr .= $node->status != 'running' && $node->status != 'wait' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmSuspend}\")==false) return false;'"; + $suspendAttr .= $node->status != 'running' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmSuspend}\")==false) return false;'"; $resumeAttr = "title='{$lang->zanode->resume}' target='hiddenwin'"; $resumeAttr .= $node->status == 'running' || $node->status == 'wait' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmResume}\")==false) return false;'"; $rebootAttr = "title='{$lang->zanode->reboot}' target='hiddenwin'"; - $rebootAttr .= $node->status == 'shutoff' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmReboot}\")==false) return false;'"; + $rebootAttr .= $node->status == 'shutoff' || $node->status == 'wait' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmReboot}\")==false) return false;'"; + + $closeAttr = "title='{$lang->zanode->shutdown}'"; + $closeAttr .= $zanode->status == 'wait' ? ' class="btn disabled"' : ' class="btn iframe"'; + + $startAttr = "title='{$lang->zanode->boot}'"; + $startAttr .= $zanode->status == 'wait' ? ' class="btn disabled"' : ' class="btn iframe"'; $snapshotAttr = "title='{$lang->zanode->createSnapshot}'"; $snapshotAttr .= $node->status != 'running' ? ' class="btn disabled"' : ' class="btn iframe"'; + $imageAttr = $node->status != 'running' ? ' class="btn btn-action iframe createImage disabled"' : ' class="btn btn-action iframe createImage"'; + common::printLink('zanode', 'getVNC', "id={$node->id}", " ", (in_array($node->status ,array('running', 'launch', 'wait')) ? '_blank' : ''), "title='{$lang->zanode->getVNC}' class='btn desktop " . (in_array($node->status ,array('running', 'launch', 'wait')) ? '':'disabled') . "'", ''); if($node->status == "suspend") { @@ -117,7 +125,7 @@ echo ""; echo ""; echo ""; From 247f99df1d21c839c057d1e68d0a83734c255bc7 Mon Sep 17 00:00:00 2001 From: zhaoke Date: Wed, 15 Feb 2023 14:58:35 +0800 Subject: [PATCH 005/349] * Finish task 84707. --- module/zanode/view/browse.html.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/zanode/view/browse.html.php b/module/zanode/view/browse.html.php index 773bd58fe8..e30613101c 100644 --- a/module/zanode/view/browse.html.php +++ b/module/zanode/view/browse.html.php @@ -87,10 +87,10 @@ $rebootAttr .= $node->status == 'shutoff' || $node->status == 'wait' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmReboot}\")==false) return false;'"; $closeAttr = "title='{$lang->zanode->shutdown}'"; - $closeAttr .= $zanode->status == 'wait' ? ' class="btn disabled"' : ' class="btn iframe"'; + $closeAttr .= $node->status == 'wait' ? ' class="btn disabled"' : ' class="btn iframe"'; $startAttr = "title='{$lang->zanode->boot}'"; - $startAttr .= $zanode->status == 'wait' ? ' class="btn disabled"' : ' class="btn iframe"'; + $startAttr .= $node->status == 'wait' ? ' class="btn disabled"' : ' class="btn iframe"'; $snapshotAttr = "title='{$lang->zanode->createSnapshot}'"; $snapshotAttr .= $node->status != 'running' ? ' class="btn disabled"' : ' class="btn iframe"'; @@ -109,11 +109,11 @@ if($node->status == "shutoff") { - common::printLink('zanode', 'start', "zanodeID={$node->id}", " ", '', "class='btn ' title='{$lang->zanode->boot}'"); + common::printLink('zanode', 'start', "zanodeID={$node->id}", " ", '', $startAttr); } else { - common::printLink('zanode', 'close', "zanodeID={$node->id}", " ", '', "class='btn ' title='{$lang->zanode->shutdown}'"); + common::printLink('zanode', 'close', "zanodeID={$node->id}", " ", '', $closeAttr); } common::printLink('zanode', 'reboot', "zanodeID={$node->id}", " ", '', $rebootAttr); From 78f43b07fb07316f683a67b23612bf9ce02ccb21 Mon Sep 17 00:00:00 2001 From: zhaoke Date: Wed, 15 Feb 2023 16:03:33 +0800 Subject: [PATCH 006/349] * Fix bug. --- module/zanode/model.php | 1 - 1 file changed, 1 deletion(-) diff --git a/module/zanode/model.php b/module/zanode/model.php index 936d479e6f..9d72c1275e 100644 --- a/module/zanode/model.php +++ b/module/zanode/model.php @@ -804,7 +804,6 @@ class zanodemodel extends model { $node = $this->dao->select('*')->from(TABLE_ZAHOST) ->where('mac')->eq($mac) - ->andWhere("type")->eq('node') ->fetch(); $host = $this->loadModel("zahost")->getByID($node->parent); From b61f7002715261990b487f1d384c91307ec3bf4e Mon Sep 17 00:00:00 2001 From: zhaoke Date: Wed, 15 Feb 2023 18:07:15 +0800 Subject: [PATCH 007/349] * Finish bug #84711. --- module/zahost/css/view.css | 1 + module/zahost/js/view.js | 1 + module/zahost/view/view.html.php | 5 +---- module/zanode/css/view.css | 1 + module/zanode/js/view.js | 3 ++- module/zanode/view/view.html.php | 6 +++--- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/module/zahost/css/view.css b/module/zahost/css/view.css index 5d092fc6e2..3c5509e705 100644 --- a/module/zahost/css/view.css +++ b/module/zahost/css/view.css @@ -21,3 +21,4 @@ .icon-refresh {font-size: 15px;} .load-indicator:after {top: 33%;} .btn.disabled i {color: #fff;} +#statusContainer{min-height: 120px;} diff --git a/module/zahost/js/view.js b/module/zahost/js/view.js index 2b07966f7c..4b42db6e78 100644 --- a/module/zahost/js/view.js +++ b/module/zahost/js/view.js @@ -35,6 +35,7 @@ function ajaxGetServiceStatus() setTimeout(function() { $('#serviceContent').removeClass('loading'); + $(".service-status, .status-notice").show() }, 500); }); return diff --git a/module/zahost/view/view.html.php b/module/zahost/view/view.html.php index 3eaf1ef3f8..012802c1c8 100644 --- a/module/zahost/view/view.html.php +++ b/module/zahost/view/view.html.php @@ -105,10 +105,7 @@
-
KVM
-
Nginx
-
noVNC
-
Websockify
+
createLink('zahost', 'browseImage', "hostID=$zahost->id", '', true), $lang->zahost->image->downloadImage, '', "class='iframe'");?> diff --git a/module/zanode/css/view.css b/module/zanode/css/view.css index e89553f2ce..66481a016a 100644 --- a/module/zanode/css/view.css +++ b/module/zanode/css/view.css @@ -17,3 +17,4 @@ .node-not-wrap{white-space: nowrap;} .btn-info {background-color: unset;} .btn.disabled i {color: #fff;} +#serviceContent{min-height: 120px;} diff --git a/module/zanode/js/view.js b/module/zanode/js/view.js index 9472d8a65a..27bd683563 100644 --- a/module/zanode/js/view.js +++ b/module/zanode/js/view.js @@ -2,11 +2,11 @@ var checkInterval; var intervalTimes = 0; $('#checkServiceStatus').click(function(){ - $('#serviceContent').addClass('loading'); checkServiceStatus(); }) function checkServiceStatus(){ + $('#serviceContent').addClass('loading'); $.get(createLink('zanode', 'ajaxGetServiceStatus', 'nodeID=' + nodeID), function(response) { var resultData = JSON.parse(response); @@ -99,6 +99,7 @@ function checkServiceStatus(){ } setTimeout(function() { $('#serviceContent').removeClass('loading'); + $(".service-status, .status-notice").show() }, 500); }); return diff --git a/module/zanode/view/view.html.php b/module/zanode/view/view.html.php index 63837c1590..8626e03604 100644 --- a/module/zanode/view/view.html.php +++ b/module/zanode/view/view.html.php @@ -129,20 +129,20 @@ $account = strpos($zanode->osName, "windows") ? $config->zanode->defaultWinAccou
-
+
  ZenAgent   zanode->initializing; ?>
-
+
  ZTF   zanode->initializing; ?>  '>zanode->install ?>
-
+
zanode->init->initSuccessNoticeTitle, "{$lang->zanode->manual}", html::a(helper::createLink('testcase', 'automation', "", '', true), $lang->zanode->automation, '', "class='iframe' title='{$lang->zanode->automation}' data-width='50%'", '')); ?> zanode->init->initFailNoticeTitle . '
' . $lang->zanode->init->initFailNoticeDesc;?>
From 8fa5b6fc6f3ce06f7735a0cfcf2c61236f48444e Mon Sep 17 00:00:00 2001 From: zhaoke Date: Wed, 15 Feb 2023 18:17:18 +0800 Subject: [PATCH 008/349] * Fix bug. --- module/zahost/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/zahost/model.php b/module/zahost/model.php index 96c39aabfe..0a11eca44d 100644 --- a/module/zahost/model.php +++ b/module/zahost/model.php @@ -590,6 +590,7 @@ class zahostModel extends model */ public function getServiceStatus($host) { + if(in_array($host->status, array('wait', 'offline'))) return $this->lang->zahost->init->serviceStatus; $result = json_decode(commonModel::http("http://{$host->extranet}:{$host->zap}/api/v1/service/check", json_encode(array("services" => "all")), array(), array("Authorization:$host->tokenSN"))); if(empty($result) || $result->code != 'success') { From f334ac0f476c2e64920ff403b323db3a7abb7013 Mon Sep 17 00:00:00 2001 From: zhaoke Date: Wed, 15 Feb 2023 18:27:46 +0800 Subject: [PATCH 009/349] * Fix bug. --- module/zanode/view/browsesnapshot.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zanode/view/browsesnapshot.html.php b/module/zanode/view/browsesnapshot.html.php index d1077bdf17..fb3e502ea6 100644 --- a/module/zanode/view/browsesnapshot.html.php +++ b/module/zanode/view/browsesnapshot.html.php @@ -46,7 +46,7 @@ $deleteAttr .= ($snapshot->status == 'restoring' or $snapshot->status == 'creating') ? ' class="btn disabled"' : 'class="btn"'; $isDefalut = $snapshot->name == 'defaultSnap' && $snapshot->createdBy == 'system'; - if($isDefalut) $editAttr = $restoreAttr = $deleteAttr = 'class="btn disabled"'; + if($isDefalut) $editAttr = $deleteAttr = 'class="btn disabled"'; $name = $snapshot->localName ? $snapshot->localName : $snapshot->name; $title = $snapshot->name; if($snapshot->name == 'defaultSnap' && $snapshot->createdBy == 'system') From 1f3a9486e21436f2069163f70da8d565935dce6e Mon Sep 17 00:00:00 2001 From: zhaoke Date: Thu, 16 Feb 2023 11:22:05 +0800 Subject: [PATCH 010/349] * Finish task #84706. --- module/zanode/control.php | 4 +--- module/zanode/js/view.js | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/module/zanode/control.php b/module/zanode/control.php index fdaf931fd8..d7fbc3dcaf 100644 --- a/module/zanode/control.php +++ b/module/zanode/control.php @@ -243,9 +243,7 @@ class zanode extends control if($error) { - $response['result'] = 'fail'; - $response['message'] = $error; - return $this->send($response); + return print(js::alert($error) . js::reload('parent')); } else { diff --git a/module/zanode/js/view.js b/module/zanode/js/view.js index 27bd683563..d46022f99f 100644 --- a/module/zanode/js/view.js +++ b/module/zanode/js/view.js @@ -2,11 +2,11 @@ var checkInterval; var intervalTimes = 0; $('#checkServiceStatus').click(function(){ + $('#serviceContent').addClass('loading'); checkServiceStatus(); }) function checkServiceStatus(){ - $('#serviceContent').addClass('loading'); $.get(createLink('zanode', 'ajaxGetServiceStatus', 'nodeID=' + nodeID), function(response) { var resultData = JSON.parse(response); @@ -187,7 +187,7 @@ $('#jumpManual').click(function() $(function(){ - checkServiceStatus(); + $('#checkServiceStatus').trigger("click") checkInterval = setInterval(() => { intervalTimes++; if(intervalTimes > 300) From 005e2194b8f98066d0a87c74aecd1bb128f8bf81 Mon Sep 17 00:00:00 2001 From: zhaoke Date: Thu, 16 Feb 2023 14:34:17 +0800 Subject: [PATCH 011/349] * Segregate mysql data between deploy and test. --- module/zanode/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/zanode/model.php b/module/zanode/model.php index 9d72c1275e..7e85e442f4 100644 --- a/module/zanode/model.php +++ b/module/zanode/model.php @@ -560,6 +560,7 @@ class zanodemodel extends model ->leftJoin(TABLE_IMAGE)->alias('t3')->on('t3.id = t1.image') ->where('t1.deleted')->eq(0) ->andWhere("t1.type")->eq("node") + ->andWhere("t2.type")->eq("zahost") ->beginIF($query)->andWhere($query)->fi() ->orderBy($orderBy) ->page($pager) From 81d1e3e23a5f2b2e2c2867e03d88cda517e5a252 Mon Sep 17 00:00:00 2001 From: zhaoke Date: Thu, 16 Feb 2023 16:47:20 +0800 Subject: [PATCH 012/349] * Fix bug #32191. --- config/zentaopms.php | 1 + module/action/model.php | 2 ++ module/zanode/lang/en.php | 2 +- module/zanode/lang/fr.php | 2 +- module/zanode/lang/zh-cn.php | 4 ++-- module/zanode/model.php | 3 +-- module/zanode/view/browsesnapshot.html.php | 1 - 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/config/zentaopms.php b/config/zentaopms.php index 98b7e55e37..8a83216957 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -405,6 +405,7 @@ $config->objectTables['apistruct'] = TABLE_APISTRUCT; $config->objectTables['repo'] = TABLE_REPO; $config->objectTables['dataview'] = TABLE_DATAVIEW; $config->objectTables['zahost'] = TABLE_ZAHOST; +$config->objectTables['zanode'] = TABLE_ZAHOST; $config->objectTables['automation'] = TABLE_AUTOMATION; $config->objectTables['stepResult'] = TABLE_TESTRUN; diff --git a/module/action/model.php b/module/action/model.php index be95cededf..a40152affd 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -938,6 +938,8 @@ class actionModel extends model } else { + if($actionType == 'restoredsnapshot' && $action->objectType == 'vm' && $value == 'defaultSnap') $value = $this->lang->$objectType->snapshot->defaultSnapName; + $desc = str_replace('$' . $key, $value, $desc); } } diff --git a/module/zanode/lang/en.php b/module/zanode/lang/en.php index c1d66e45fe..fc18f5394a 100644 --- a/module/zanode/lang/en.php +++ b/module/zanode/lang/en.php @@ -97,7 +97,7 @@ $lang->zanode->snapshot->statusList['completed'] = 'Usable'; $lang->zanode->snapshot->statusList['failed'] = 'Create Failed'; $lang->zanode->snapshot->statusList['restoring'] = 'Restoring'; $lang->zanode->snapshot->statusList['restore_failed'] = 'Restore Failed'; -$lang->zanode->snapshot->statusList['restore_completed'] = 'Restore Completed'; +$lang->zanode->snapshot->statusList['restore_completed'] = 'Usable'; $lang->zanode->snapshot->defaultSnapName = 'DefaultSnapshot'; $lang->zanode->snapshot->defaultSnapUser = 'System'; diff --git a/module/zanode/lang/fr.php b/module/zanode/lang/fr.php index 0691c5edee..284b616b49 100644 --- a/module/zanode/lang/fr.php +++ b/module/zanode/lang/fr.php @@ -91,7 +91,7 @@ $lang->zanode->snapshotEmpty = 'No snapshots'; $lang->zanode->confirmDeleteSnapshot = "The snapshot cannot be restored from the recycle bin after being deleted. Are you sure to continue?"; $lang->zanode->snapshot->statusList['creating'] = 'Creating'; -$lang->zanode->snapshot->statusList['completed'] = 'Create Completed'; +$lang->zanode->snapshot->statusList['completed'] = 'Usable'; $lang->zanode->snapshot->statusList['failed'] = 'Create Failed'; $lang->zanode->snapshot->statusList['restoring'] = 'Restoring'; $lang->zanode->snapshot->statusList['restore_failed'] = 'Restore Failed'; diff --git a/module/zanode/lang/zh-cn.php b/module/zanode/lang/zh-cn.php index f954e13d41..fd4d76a402 100644 --- a/module/zanode/lang/zh-cn.php +++ b/module/zanode/lang/zh-cn.php @@ -93,11 +93,11 @@ $lang->zanode->confirmDeleteSnapshot = "快照被删除后无法从回收站中 $lang->zanode->snapshot = new stdClass(); $lang->zanode->snapshot->statusList['creating'] = '创建中'; -$lang->zanode->snapshot->statusList['completed'] = '创建完成'; +$lang->zanode->snapshot->statusList['completed'] = '可使用'; $lang->zanode->snapshot->statusList['failed'] = '创建失败'; $lang->zanode->snapshot->statusList['restoring'] = '还原中'; $lang->zanode->snapshot->statusList['restore_failed'] = '还原失败'; -$lang->zanode->snapshot->statusList['restore_completed'] = '还原成功'; +$lang->zanode->snapshot->statusList['restore_completed'] = '可使用'; $lang->zanode->snapshot->defaultSnapName = '初始快照'; $lang->zanode->snapshot->defaultSnapUser = '系统'; diff --git a/module/zanode/model.php b/module/zanode/model.php index 7e85e442f4..19c5d97c7d 100644 --- a/module/zanode/model.php +++ b/module/zanode/model.php @@ -270,7 +270,6 @@ class zanodemodel extends model if(!empty($result) and $result->code == 'success') { - $this->loadModel('action')->create('zanode', $zanodeID, 'createdSnapshot', '', $data->name); return $newID; } @@ -420,7 +419,7 @@ class zanodemodel extends model $this->dao->update(TABLE_ZAHOST)->set('status')->eq($status)->where('id')->eq($id)->exec(); } - $this->loadModel('action')->create('zanode', $id, ucfirst($type)); + $this->loadModel('action')->create('zanode', $id, ucfirst($type), $node->name); return; } diff --git a/module/zanode/view/browsesnapshot.html.php b/module/zanode/view/browsesnapshot.html.php index fb3e502ea6..6195869815 100644 --- a/module/zanode/view/browsesnapshot.html.php +++ b/module/zanode/view/browsesnapshot.html.php @@ -73,4 +73,3 @@
-getModuleRoot() . 'common/view/footer.html.php';?> From 7170af3b44bf1dccb03cfcdb4beb16e4badb648e Mon Sep 17 00:00:00 2001 From: liumengyi Date: Fri, 17 Feb 2023 00:52:32 +0000 Subject: [PATCH 013/349] * Finish task #84586. --- module/execution/control.php | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 0264d93147..f7421d9998 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -4071,22 +4071,7 @@ class execution extends control unset($fields[$key]); } - $executionStats = $this->execution->getStatData($projectID, $status == 'byproduct' ? 'all' : $status, $productID, 0, false, '', 'id_asc'); - if(isset($project->model) and $project->model == 'waterfall') - { - $stageList = array(); - foreach($executionStats as $stage) - { - $stageList[] = $stage; - foreach($stage->children as $child) - { - $child->name = $stage->name . '/' . $child->name; - $stageList[] = $child; - } - } - - $executionStats = $stageList; - } + $executionStats = $this->execution->getStatData($projectID, $status == 'byproduct' ? 'all' : $status, $productID, 0, false, 'hasParentName', 'order_asc'); $users = $this->loadModel('user')->getPairs('noletter'); foreach($executionStats as $i => $execution) @@ -4097,6 +4082,7 @@ class execution extends control $execution->totalConsumed = $execution->hours->totalConsumed; $execution->totalLeft = $execution->hours->totalLeft; $execution->progress = $execution->hours->progress . '%'; + $execution->name = isset($execution->title) ? $execution->title : $execution->name; if($this->app->tab == 'project' and ($project->model == 'agileplus' or $project->model == 'waterfallplus')) $execution->method = zget($executionLang->typeList, $execution->type); if($this->post->exportType == 'selected') From 2ebf416299269a8288d360b95cd78f57ab0cb5ab Mon Sep 17 00:00:00 2001 From: liumengyi Date: Fri, 17 Feb 2023 00:52:54 +0000 Subject: [PATCH 014/349] * Fix bug of task #84584. --- module/programplan/view/create.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/programplan/view/create.html.php b/module/programplan/view/create.html.php index d719335d9d..ded8e02027 100644 --- a/module/programplan/view/create.html.php +++ b/module/programplan/view/create.html.php @@ -140,7 +140,7 @@ setMilestone) ? '' : "disabled='disabled'"?> id);?> - execution->typeList, $plan->type, "class='form-control chosen'");?> + execution->typeList, $plan->type);?>'>execution->typeList, $plan->type);?> setCode) or $config->setCode == 1):?> code, "class='form-control'");?> From 6a9b3fc6e44caf0abef747c9e419732bc9955ecc Mon Sep 17 00:00:00 2001 From: liumengyi Date: Fri, 17 Feb 2023 06:26:19 +0000 Subject: [PATCH 015/349] * Fix bug #32243. --- module/execution/control.php | 32 +++++++-------------------- module/execution/view/create.html.php | 12 +++++++++- module/execution/view/edit.html.php | 12 +++++++++- module/productplan/model.php | 2 +- 4 files changed, 31 insertions(+), 27 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 44d1973535..bfd262a97e 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1727,15 +1727,8 @@ class execution extends control } $importPlanStoryTips = $multiBranchProduct ? $this->lang->execution->importBranchPlanStory : $this->lang->execution->importPlanStory; - if(!$execution->hasProduct) - { - return print(js::locate(inlink('create', "projectID=$projectID&executionID=$executionID"))); - } - else - { - return print(js::confirm($importPlanStoryTips, inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=$planID&confirm=yes"), inlink('create', "projectID=$projectID&executionID=$executionID"))); - } + return print(js::confirm($importPlanStoryTips, inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=$planID&confirm=yes"), inlink('create', "projectID=$projectID&executionID=$executionID"))); } } @@ -1801,16 +1794,11 @@ class execution extends control { if(isset($_POST['attribute']) and in_array($_POST['attribute'], array('request', 'design', 'review'))) unset($_POST['plans']); - /* No product execution link plans. */ - if(isset($project->hasProduct) and empty($project->hasProduct) and !empty($_POST['plans'])) + /* Filter empty plans. */ + if(!empty($_POST['plans'])) { - $plansItem = array(); - foreach($_POST['plans'] as $planItem) - { - if(empty($planItem[0][0])) continue; - $plansItem[] = $planItem[0][0]; - } - $_POST['plans'] = array($_POST['products'][0] => array(0 => $plansItem)); + foreach($_POST['plans'] as $key => $planItem) $_POST['plans'][$key] = array_filter($_POST['plans'][$key]); + $_POST['plans'] = array_filter($_POST['plans']); } $executionID = $this->execution->create($copyExecutionID); @@ -2006,15 +1994,11 @@ class execution extends control $newPlans = array(); if(isset($_POST['plans'])) { - - foreach($_POST['plans'] as $plans) + foreach($_POST['plans'] as $products) { - foreach($plans as $planList) + foreach($products as $planID) { - foreach($planList as $planID) - { - if(array_search($planID, $oldPlans) === false) $newPlans[$planID] = $planID; - } + if(array_search($planID, $oldPlans) === false) $newPlans[$planID] = $planID; } } } diff --git a/module/execution/view/create.html.php b/module/execution/view/create.html.php index 472a35d630..f087cc8332 100644 --- a/module/execution/view/create.html.php +++ b/module/execution/view/create.html.php @@ -140,7 +140,7 @@ printExtendFields('', 'table', 'columns=3');?> hasProduct)) $hidden = ''?> - + hasProduct) and !empty($project->hasProduct) and $products):?> @@ -184,6 +184,16 @@ + hasProduct)):?> + + execution->linkPlan;?> + + + + + + + project->manageProductPlan;?> diff --git a/module/execution/view/edit.html.php b/module/execution/view/edit.html.php index 826cad20aa..299f88e233 100644 --- a/module/execution/view/edit.html.php +++ b/module/execution/view/edit.html.php @@ -151,7 +151,7 @@ model != 'waterfall' and $project->model != 'waterfallplus'): ?> hasProduct)) $hidden = ''?> - + hasProduct) and $linkedProducts):?> @@ -195,6 +195,16 @@ + hasProduct)):?> + + execution->linkPlan;?> + + + plans : '', "class='form-control chosen' multiple");?> + + + + project->manageProductPlan;?> diff --git a/module/productplan/model.php b/module/productplan/model.php index af09f76d85..2c31845d58 100644 --- a/module/productplan/model.php +++ b/module/productplan/model.php @@ -1109,7 +1109,7 @@ class productplanModel extends model foreach($planStory as $id => $story) { $projectBranches = zget($projectProducts, $story->product, array()); - if($story->status == 'active' or (!empty($story->branch) and !empty($projectBranches) and !isset($projectBranches[$story->branch]))) + if($story->status != 'active' or (!empty($story->branch) and !empty($projectBranches) and !isset($projectBranches[$story->branch]))) { unset($planStory[$id]); continue; From 1fb012e88906d31406f7b3e883e2bfc5ea3566b9 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Fri, 17 Feb 2023 06:28:43 +0000 Subject: [PATCH 016/349] * Optimize code of bug #32243. --- module/execution/control.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index bfd262a97e..148f504a02 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1994,9 +1994,9 @@ class execution extends control $newPlans = array(); if(isset($_POST['plans'])) { - foreach($_POST['plans'] as $products) + foreach($_POST['plans'] as $plans) { - foreach($products as $planID) + foreach($plans as $planID) { if(array_search($planID, $oldPlans) === false) $newPlans[$planID] = $planID; } From e0b645b43d7702a53d7b259f830dbe1009f5f1e0 Mon Sep 17 00:00:00 2001 From: zhaoke Date: Fri, 17 Feb 2023 15:19:44 +0800 Subject: [PATCH 017/349] * Fix bug #32236. --- module/zanode/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zanode/model.php b/module/zanode/model.php index 19c5d97c7d..52db8fd3a0 100644 --- a/module/zanode/model.php +++ b/module/zanode/model.php @@ -419,7 +419,7 @@ class zanodemodel extends model $this->dao->update(TABLE_ZAHOST)->set('status')->eq($status)->where('id')->eq($id)->exec(); } - $this->loadModel('action')->create('zanode', $id, ucfirst($type), $node->name); + $this->loadModel('action')->create('zanode', $id, ucfirst($type)); return; } From b1f57ce0daca5f979111179f45e41e1223d33ed2 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Fri, 17 Feb 2023 07:50:45 +0000 Subject: [PATCH 018/349] * Fix bug #32244, #32245. --- module/programplan/model.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/module/programplan/model.php b/module/programplan/model.php index 15d82b1d11..4c6043071c 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -749,7 +749,7 @@ class programplanModel extends model foreach($datas as $index => $plan) { if(!empty($sameNames) and in_array($plan->name, $sameNames)) dao::$errors[$index]['name'] = empty($type) ? $this->lang->programplan->error->sameName : str_replace($this->lang->execution->stage, '', $this->lang->programplan->error->sameName); - if($setCode and $sameCodes !== true and !empty($sameCodes) and in_array($plan->code, $sameCodes)) dao::$errors[$index]['code'] = sprintf($this->lang->error->repeat, $this->lang->execution->code, $plan->code); + if($setCode and $sameCodes !== true and !empty($sameCodes) and in_array($plan->code, $sameCodes)) dao::$errors[$index]['code'] = sprintf($this->lang->error->repeat, $plan->type == 'stage' ? $this->lang->execution->code : $this->lang->code, $plan->code); if($plan->percent and !preg_match("/^[0-9]+(.[0-9]{1,3})?$/", $plan->percent)) { @@ -778,7 +778,7 @@ class programplanModel extends model if(isset($parentStage) and ($plan->end > $parentStage->end || $plan->begin < $parentStage->begin)) { if($plan->begin < $parentStage->begin and empty(dao::$errors[$index]['begin'])) dao::$errors[$index]['begin'] = $this->lang->programplan->error->parentDuration; - if($plan->end < $parentStage->end and empty(dao::$errors[$index]['end'])) dao::$errors[$index]['end'] = $this->lang->programplan->error->parentDuration; + if($plan->end > $parentStage->end and empty(dao::$errors[$index]['end'])) dao::$errors[$index]['end'] = $this->lang->programplan->error->parentDuration; } if($plan->begin < $project->begin and empty(dao::$errors[$index]['begin'])) { @@ -793,7 +793,7 @@ class programplanModel extends model if(helper::isZeroDate($plan->end)) $plan->end = ''; if($setCode and empty($plan->code)) { - dao::$errors[$index]['code'] = sprintf($this->lang->error->notempty, $this->lang->execution->code); + dao::$errors[$index]['code'] = sprintf($this->lang->error->notempty, $plan->type == 'stage' ? $this->lang->execution->code : $this->lang->code); } foreach(explode(',', $this->config->programplan->create->requiredFields) as $field) { @@ -1346,15 +1346,15 @@ class programplanModel extends model public function checkCodeUnique($codes, $planIDList) { $codes = array_filter($codes); - if(count(array_unique($codes)) != count($codes)) return false; - $code = $this->dao->select('code')->from(TABLE_EXECUTION) + $sameCodes = $this->dao->select('code')->from(TABLE_EXECUTION) ->where('type')->in('sprint,stage,kanban') ->andWhere('deleted')->eq('0') ->andWhere('code')->in($codes) ->beginIF($planIDList)->andWhere('id')->notin($planIDList)->fi() ->fetchPairs('code'); - return $code ? $code : true; + if(count(array_unique($codes)) != count($codes)) $sameCodes += array_diff_assoc($codes, array_unique($codes)); + return $sameCodes ? $sameCodes : true; } /** From 61e824c5486cb98cd92bf061ceb48bf068e00f0a Mon Sep 17 00:00:00 2001 From: liumengyi Date: Fri, 17 Feb 2023 07:54:54 +0000 Subject: [PATCH 019/349] * Fix bug #32249. --- module/action/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/action/control.php b/module/action/control.php index 92284c76e4..971a251e50 100755 --- a/module/action/control.php +++ b/module/action/control.php @@ -376,7 +376,7 @@ class action extends control /* Check type of siblings. */ $siblings = $this->dao->select('DISTINCT type')->from(TABLE_EXECUTION)->where('deleted')->eq(0)->andWhere('parent')->eq($execution->parent)->fetchPairs('type'); - if($execution->type == 'stage' and (isset($bsiblings['sprint']) or isset($siblings['kanban']))) die(js::alert($this->lang->action->hasOtherType[$execution->type])); + if($execution->type == 'stage' and (isset($siblings['sprint']) or isset($siblings['kanban']))) die(js::alert($this->lang->action->hasOtherType[$execution->type])); if(($execution->type == 'sprint' or $execution->type == 'kanban') and isset($siblings['stage'])) die(js::alert($this->lang->action->hasOtherType[$execution->type])); /* If parent stage is not exists, you should recover its parent stages, refresh status. */ From 82086084304f0c7562914a8e2fcd0fd49a455903 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Fri, 17 Feb 2023 17:32:46 +0800 Subject: [PATCH 020/349] * Compatible with earlier versions of php. --- module/admin/model.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/module/admin/model.php b/module/admin/model.php index b06e55e5ce..c23ea0103c 100755 --- a/module/admin/model.php +++ b/module/admin/model.php @@ -269,13 +269,13 @@ class adminModel extends model $this->setSwitcher($menuKey); if(isset($this->lang->admin->menuList->$menuKey)) { - if(isset($this->lang->admin->menuList->$menuKey['subMenu'])) + if(isset($this->lang->admin->menuList->{$menuKey}['subMenu'])) { $moduleName = $this->app->rawModule; $methodName = $this->app->rawMethod; $firstParam = $this->app->rawParams ? reset($this->app->rawParams) : ''; - foreach($this->lang->admin->menuList->$menuKey['subMenu'] as $subMenuKey => $subMenu) + foreach($this->lang->admin->menuList->{$menuKey}['subMenu'] as $subMenuKey => $subMenu) { $subModule = ''; if($moduleName == 'custom' and strpos(',required,set,', $methodName) !== false) @@ -285,25 +285,25 @@ class adminModel extends model } if(!empty($subModule)) $subMenu['subModule'] = $subModule; - if(isset($this->lang->admin->menuList->$menuKey['tabMenu'][$subMenuKey])) + if(isset($this->lang->admin->menuList->{$menuKey}['tabMenu'][$subMenuKey])) { if(!empty($subModule)) { - $this->lang->admin->menuList->$menuKey['tabMenu'][$subMenuKey][$firstParam]['subModule'] = $subModule; - unset($this->lang->admin->menuList->$menuKey['tabMenu'][$subMenuKey][$firstParam]['exclude']); + $this->lang->admin->menuList->{$menuKey}['tabMenu'][$subMenuKey][$firstParam]['subModule'] = $subModule; + unset($this->lang->admin->menuList->{$menuKey}['tabMenu'][$subMenuKey][$firstParam]['exclude']); } - $subMenu['subMenu'] = $this->lang->admin->menuList->$menuKey['tabMenu'][$subMenuKey]; + $subMenu['subMenu'] = $this->lang->admin->menuList->{$menuKey}['tabMenu'][$subMenuKey]; } - if(isset($this->lang->admin->menuList->$menuKey['tabMenu']['menuOrder'][$subMenuKey])) $subMenu['menuOrder'] = $this->lang->admin->menuList->$menuKey['tabMenu']['menuOrder'][$subMenuKey]; - if(isset($this->lang->admin->menuList->$menuKey['tabMenu']['dividerMenu'][$subMenuKey])) $subMenu['dividerMenu'] = $this->lang->admin->menuList->$menuKey['tabMenu']['dividerMenu'][$subMenuKey]; + if(isset($this->lang->admin->menuList->{$menuKey}['tabMenu']['menuOrder'][$subMenuKey])) $subMenu['menuOrder'] = $this->lang->admin->menuList->{$menuKey}['tabMenu']['menuOrder'][$subMenuKey]; + if(isset($this->lang->admin->menuList->{$menuKey}['tabMenu']['dividerMenu'][$subMenuKey])) $subMenu['dividerMenu'] = $this->lang->admin->menuList->{$menuKey}['tabMenu']['dividerMenu'][$subMenuKey]; $this->lang->admin->menu->$subMenuKey = $subMenu; } } - if(isset($this->lang->admin->menuList->$menuKey['menuOrder'])) $this->lang->admin->menuOrder = $this->lang->admin->menuList->$menuKey['menuOrder']; - if(isset($this->lang->admin->menuList->$menuKey['dividerMenu'])) $this->lang->admin->dividerMenu = $this->lang->admin->menuList->$menuKey['dividerMenu']; - if(isset($this->lang->admin->menuList->$menuKey['tabMenu'])) $this->lang->admin->tabMenu = $this->lang->admin->menuList->$menuKey['tabMenu']; + if(isset($this->lang->admin->menuList->{$menuKey}['menuOrder'])) $this->lang->admin->menuOrder = $this->lang->admin->menuList->{$menuKey}['menuOrder']; + if(isset($this->lang->admin->menuList->{$menuKey}['dividerMenu'])) $this->lang->admin->dividerMenu = $this->lang->admin->menuList->{$menuKey}['dividerMenu']; + if(isset($this->lang->admin->menuList->{$menuKey}['tabMenu'])) $this->lang->admin->tabMenu = $this->lang->admin->menuList->{$menuKey}['tabMenu']; } } From ae6dbb769c3e96cc9215140aa4b2814e4b5f5a15 Mon Sep 17 00:00:00 2001 From: zhaoke Date: Fri, 17 Feb 2023 17:33:13 +0800 Subject: [PATCH 021/349] * Fix restore default snapshot history error. --- module/action/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/action/model.php b/module/action/model.php index a40152affd..b912769a69 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -938,7 +938,7 @@ class actionModel extends model } else { - if($actionType == 'restoredsnapshot' && $action->objectType == 'vm' && $value == 'defaultSnap') $value = $this->lang->$objectType->snapshot->defaultSnapName; + if($actionType == 'restoredsnapshot' && in_array($action->objectType, array('vm', 'zanode')) && $value == 'defaultSnap') $value = $this->lang->$objectType->snapshot->defaultSnapName; $desc = str_replace('$' . $key, $value, $desc); } From 4e7f8247e3a4728fc7ae7365611e51f11f36beeb Mon Sep 17 00:00:00 2001 From: tianshujie Date: Sat, 18 Feb 2023 15:16:29 +0800 Subject: [PATCH 022/349] * Code for finish task #84593. --- module/execution/control.php | 12 ++++++------ module/task/control.php | 12 +++++++++++- module/task/js/create.js | 11 +++++++---- module/task/view/create.html.php | 2 ++ 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 44d1973535..38651c5404 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2595,6 +2595,12 @@ class execution extends control $execution = $this->commonAction($executionID); if($execution->type != 'kanban') return print(js::locate(inlink('view', "executionID=$executionID"))); + if($execution->lifetime == 'ops' or in_array($execution->attribute, array('request', 'review'))) + { + $browseType = 'task'; + unset($this->lang->kanban->group->task['story']); + } + $kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $browseType, $orderBy, 0, $groupBy); $executionActions = array(); foreach($this->config->execution->statusActions as $action) @@ -2602,12 +2608,6 @@ class execution extends control if($this->execution->isClickable($execution, $action)) $executionActions[] = $action; } - if($execution->lifetime == 'ops' or in_array($execution->attribute, array('request', 'review'))) - { - $browseType = 'task'; - unset($this->lang->kanban->group->task['story']); - } - $userList = array(); $users = $this->loadModel('user')->getPairs('noletter|nodeleted'); $avatarPairs = $this->user->getAvatarPairs('all'); diff --git a/module/task/control.php b/module/task/control.php index c911ae4c34..141f00a025 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -311,6 +311,15 @@ class task extends control } } + $lifetimeList = array(); + $attributeList = array(); + $executionList = $this->execution->getByIdList(array_keys($executions)); + foreach($executionList as $id => $object) + { + $lifetimeList[$id] = $object->lifetime; + $attributeList[$id] = $object->attribute; + } + $testStoryIdList = $this->loadModel('story')->getTestStories(array_keys($stories), $execution->id); /* Stories that can be used to create test tasks. */ $testStories = array(); @@ -330,7 +339,8 @@ class task extends control $this->view->gobackLink = (isset($output['from']) and $output['from'] == 'global') ? $this->createLink('execution', 'task', "executionID=$executionID") : ''; $this->view->execution = $execution; $this->view->executions = $executions; - $this->view->lifetimeList = $this->execution->getLifetimeByIdList(array_keys($executions)); + $this->view->lifetimeList = $lifetimeList; + $this->view->attributeList = $attributeList; $this->view->task = $task; $this->view->users = $users; $this->view->storyID = $storyID; diff --git a/module/task/js/create.js b/module/task/js/create.js index 25b2552ef3..10c979ad08 100644 --- a/module/task/js/create.js +++ b/module/task/js/create.js @@ -63,14 +63,16 @@ function showTeamMenu() function loadAll(executionID) { lifetime = lifetimeList[executionID]; + attribute = attributeList[executionID]; var fieldList = showFields + ','; - if(lifetime == 'ops') + if(lifetime == 'ops' || attribute == 'request' || attribute == 'review') { - $('.storyBox').addClass('hidden'); + $('.storyBox,#selectTestStoryBox,#testStoryBox').addClass('hidden'); } else if(fieldList.indexOf('story') >= 0) { - $('.storyBox').removeClass('hidden'); + $('.storyBox,#selectTestStoryBox').removeClass('hidden'); + if($('#selectTestStory').prop('checked')) $('#testStoryBox').removeClass('hidden'); } loadModuleMenu(executionID); @@ -504,9 +506,10 @@ $(document).ready(function() var value = $select.val(); $selector.find('.pri-text').html('' + value + ''); }); + $('#type').change(function() { - if(lifetime != 'ops') + if(lifetime != 'ops' && attribute != 'request' && attribute != 'review') { $('#selectTestStoryBox').toggleClass('hidden', $(this).val() != 'test'); toggleSelectTestStory(); diff --git a/module/task/view/create.html.php b/module/task/view/create.html.php index ac48512805..3a132b9d2f 100644 --- a/module/task/view/create.html.php +++ b/module/task/view/create.html.php @@ -22,7 +22,9 @@ task->create->requiredFields);?> error->gt, $lang->task->estimate, '0'))?> lifetime);?> +attribute);?> + hasProduct);?> Date: Sat, 18 Feb 2023 15:20:29 +0800 Subject: [PATCH 023/349] * Remove useless code. --- module/execution/model.php | 12 ------- test/class/execution.class.php | 28 ---------------- test/model/execution/getlifetimebyidlist.php | 34 -------------------- 3 files changed, 74 deletions(-) delete mode 100755 test/model/execution/getlifetimebyidlist.php diff --git a/module/execution/model.php b/module/execution/model.php index b55724ecaf..4abfb60087 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -5066,18 +5066,6 @@ class executionModel extends model return $productpairs; } - /** - * Get lifetime by id list. - * - * @param string $idList - * @access public - * @return array - */ - public function getLifetimeByIdList($idList = '') - { - return $this->dao->select('id,lifetime')->from(TABLE_EXECUTION)->where('id')->in($idList)->fetchPairs(); - } - /** * Set stage tree path. * diff --git a/test/class/execution.class.php b/test/class/execution.class.php index 205a472642..dd2eb1cc8e 100644 --- a/test/class/execution.class.php +++ b/test/class/execution.class.php @@ -2490,34 +2490,6 @@ class executionTest } } - /** - * Test Get lifetime by id list. - * - * @param array $idList - * @access public - * @return void - */ - public function getLifetimeByIdListTest($idList = '') - { - $result = $this->executionModel->getLifetimeByIdList($idList); - - if(dao::isError()) - { - $error = dao::getError(); - return $error; - } - else - { - if(!$result) return 'empty'; - - foreach($result as $id => $lifetime) - { - if(!$lifetime) $result[$id] = 'emptyLifetime'; - } - return $result; - } - } - /** * Test Update user view of execution and it's product. * diff --git a/test/model/execution/getlifetimebyidlist.php b/test/model/execution/getlifetimebyidlist.php deleted file mode 100755 index e59565250d..0000000000 --- a/test/model/execution/getlifetimebyidlist.php +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env php -gen(5); -su('admin'); - -$execution = zdTable('project'); -$execution->id->range('1-5'); -$execution->name->range('项目集1,项目1,迭代1,阶段1,看板1'); -$execution->type->range('program,project,sprint,stage,kanban'); -$execution->parent->range('0,1,2{3}'); -$execution->status->range('wait{3},suspended,closed,doing'); -$execution->openedBy->range('admin,user1'); -$execution->begin->range('20220112 000000:0')->type('timestamp')->format('YY/MM/DD'); -$execution->end->range('20220212 000000:0')->type('timestamp')->format('YY/MM/DD'); -$execution->gen(5); - -/** - -title=测试executionModel->getLifetimeByIdList(); -cid=1 -pid=1 - -查询执行3和4 lifetime >> emptyLifetime -查询空执行 lifetime >> empty - -*/ - -$executionIDList = array(3, 4); - -$executionTester = new executionTest(); -r($executionTester->getLifetimeByIdListTest($executionIDList)) && p('3') && e('emptyLifetime'); // 查询执行3和4 lifetime -r($executionTester->getLifetimeByIdListTest(array('0'))) && p('') && e('empty'); // 查询空执行 lifetime From 02adc7454f73b8f7cab762d72880c082c7adcbab Mon Sep 17 00:00:00 2001 From: liumengyi Date: Sat, 18 Feb 2023 07:27:40 +0000 Subject: [PATCH 024/349] * Fix bug #32251. --- module/programplan/lang/de.php | 4 ++-- module/programplan/lang/en.php | 4 ++-- module/programplan/lang/fr.php | 4 ++-- module/programplan/lang/zh-cn.php | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/module/programplan/lang/de.php b/module/programplan/lang/de.php index e653b4534c..7b1a58d0cf 100644 --- a/module/programplan/lang/de.php +++ b/module/programplan/lang/de.php @@ -82,7 +82,7 @@ $lang->programplan->delayList[0] = 'No'; $lang->programplan->typeList = array(); $lang->programplan->typeList['stage'] = 'Stage'; -$lang->programplan->typeList['agileplus'] = 'Sprint/Kanban'; +$lang->programplan->typeList['agileplus'] = $lang->executionCommon . '/Kanban'; $lang->programplan->noData = 'No Data'; $lang->programplan->children = 'Sub Plan'; @@ -118,7 +118,7 @@ $lang->programplan->error->sameName = 'Stage name cannot be the same!'; $lang->programplan->error->sameCode = 'Stage code cannot be the same!'; $lang->programplan->error->taskDrag = 'The %s task cannot be dragged'; $lang->programplan->error->planDrag = 'The %s stage cannot be dragged'; -$lang->programplan->error->notStage = 'Sprint/Kanban cannot create a sub stage.'; +$lang->programplan->error->notStage = $lang->executionCommon . '/Kanban cannot create a sub stage.'; $lang->programplan->ganttBrowseType['gantt'] = 'Group by Stage'; $lang->programplan->ganttBrowseType['assignedTo'] = 'Group by AssignedTo'; diff --git a/module/programplan/lang/en.php b/module/programplan/lang/en.php index 1846fa4c83..6d25da9d4c 100644 --- a/module/programplan/lang/en.php +++ b/module/programplan/lang/en.php @@ -82,7 +82,7 @@ $lang->programplan->delayList[0] = 'No'; $lang->programplan->typeList = array(); $lang->programplan->typeList['stage'] = 'Stage'; -$lang->programplan->typeList['agileplus'] = 'Sprint/Kanban'; +$lang->programplan->typeList['agileplus'] = $lang->executionCommon . '/Kanban'; $lang->programplan->noData = 'No Data'; $lang->programplan->children = 'Sub Plan'; @@ -118,7 +118,7 @@ $lang->programplan->error->sameName = 'Stage name cannot be the same!'; $lang->programplan->error->sameCode = 'Stage code cannot be the same!'; $lang->programplan->error->taskDrag = 'The %s task cannot be dragged'; $lang->programplan->error->planDrag = 'The %s stage cannot be dragged'; -$lang->programplan->error->notStage = 'Sprint/Kanban cannot create a sub stage.'; +$lang->programplan->error->notStage = $lang->executionCommon . '/Kanban cannot create a sub stage.'; $lang->programplan->ganttBrowseType['gantt'] = 'Group by Stage'; $lang->programplan->ganttBrowseType['assignedTo'] = 'Group by AssignedTo'; diff --git a/module/programplan/lang/fr.php b/module/programplan/lang/fr.php index e653b4534c..7b1a58d0cf 100644 --- a/module/programplan/lang/fr.php +++ b/module/programplan/lang/fr.php @@ -82,7 +82,7 @@ $lang->programplan->delayList[0] = 'No'; $lang->programplan->typeList = array(); $lang->programplan->typeList['stage'] = 'Stage'; -$lang->programplan->typeList['agileplus'] = 'Sprint/Kanban'; +$lang->programplan->typeList['agileplus'] = $lang->executionCommon . '/Kanban'; $lang->programplan->noData = 'No Data'; $lang->programplan->children = 'Sub Plan'; @@ -118,7 +118,7 @@ $lang->programplan->error->sameName = 'Stage name cannot be the same!'; $lang->programplan->error->sameCode = 'Stage code cannot be the same!'; $lang->programplan->error->taskDrag = 'The %s task cannot be dragged'; $lang->programplan->error->planDrag = 'The %s stage cannot be dragged'; -$lang->programplan->error->notStage = 'Sprint/Kanban cannot create a sub stage.'; +$lang->programplan->error->notStage = $lang->executionCommon . '/Kanban cannot create a sub stage.'; $lang->programplan->ganttBrowseType['gantt'] = 'Group by Stage'; $lang->programplan->ganttBrowseType['assignedTo'] = 'Group by AssignedTo'; diff --git a/module/programplan/lang/zh-cn.php b/module/programplan/lang/zh-cn.php index 6bb4359a30..eb55d08810 100644 --- a/module/programplan/lang/zh-cn.php +++ b/module/programplan/lang/zh-cn.php @@ -82,7 +82,7 @@ $lang->programplan->delayList[0] = '否'; $lang->programplan->typeList = array(); $lang->programplan->typeList['stage'] = '阶段'; -$lang->programplan->typeList['agileplus'] = '迭代/看板'; +$lang->programplan->typeList['agileplus'] = $lang->executionCommon . '/看板'; $lang->programplan->noData = '暂无数据。'; $lang->programplan->children = '二级计划'; @@ -118,7 +118,7 @@ $lang->programplan->error->sameName = '阶段名称不能相同!'; $lang->programplan->error->sameCode = '阶段代号不能相同!'; $lang->programplan->error->taskDrag = '%s的任务不可以拖动'; $lang->programplan->error->planDrag = '%s的阶段不可以拖动'; -$lang->programplan->error->notStage = '迭代/看板不支持创建子阶段'; +$lang->programplan->error->notStage = $lang->executionCommon . '/看板不支持创建子阶段'; $lang->programplan->ganttBrowseType['gantt'] = '按阶段分组'; $lang->programplan->ganttBrowseType['assignedTo'] = '按指派给分组'; From 1eb1f7ad7b58919bf42f7bc8121bf3191d3d432a Mon Sep 17 00:00:00 2001 From: liumengyi Date: Sat, 18 Feb 2023 07:28:22 +0000 Subject: [PATCH 025/349] * Fix bug of create waterfallplus's execution. --- module/execution/control.php | 2 +- module/execution/js/common.js | 2 +- module/execution/view/create.html.php | 10 ++++------ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 44d1973535..2e99560225 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1912,7 +1912,7 @@ class execution extends control $this->view->users = $this->loadModel('user')->getPairs('nodeleted|noclosed'); $this->view->copyExecution = isset($copyExecution) ? $copyExecution : ''; $this->view->from = $this->app->tab; - $this->view->isStage = (isset($project->model) and $project->model == 'waterfall') ? true : false; + $this->view->isStage = (isset($project->model) and ($project->model == 'waterfall' or $project->model == 'waterfallplus')) ? true : false; $this->view->project = $project; $this->view->division = !empty($project) ? $project->division : 1; $this->view->type = $type; diff --git a/module/execution/js/common.js b/module/execution/js/common.js index 7a138fe055..37b32040ba 100644 --- a/module/execution/js/common.js +++ b/module/execution/js/common.js @@ -180,7 +180,7 @@ function loadBranches(product) var branch = $('#branch' + index); loadPlans(product, branch); - if(typeof isWaterfall != 'undefined' && isWaterfall == true) + if(typeof isStage != 'undefined' && isStage == true) { $tableRow.find("select[name^='branch'] option").attr('selected', 'selected'); $tableRow.find("select[name^='branch']").trigger('chosen:updated'); diff --git a/module/execution/view/create.html.php b/module/execution/view/create.html.php index 472a35d630..9b94fb153b 100644 --- a/module/execution/view/create.html.php +++ b/module/execution/view/create.html.php @@ -31,7 +31,6 @@ -model) and ($project->model == 'waterfall' or $project->model == 'waterfallplus')) ? true : false;?> execution->weekend);?> execution->placeholder);?> @@ -47,7 +46,6 @@ execution->cancelCopy);?> execution->copyNoExecution);?> model) ? $project->model : '');?> -
@@ -153,9 +151,9 @@ type != 'normal' and isset($branchGroups[$product->id]);?>
'> product->common;?> - division) ? "disabled='disabled'" : '';?> + division) ? "disabled='disabled'" : '';?> id, "class='form-control chosen' $disabled onchange='loadBranches(this)' data-last='" . $product->id . "' data-type='" . $product->type . "'");?> - division) echo html::hidden("products[$i]", $product->id);?> + division) echo html::hidden("products[$i]", $product->id);?>
'> @@ -171,7 +169,7 @@
> product->plan;?> id][]", isset($productPlans[$product->id]) ? $productPlans[$product->id] : array(), isset($product->plans) ? $product->plans : '', "class='form-control chosen' multiple");?> - division)):?> + division)):?>
> @@ -209,7 +207,7 @@
product->plan;?> - division)):?> + division)):?>
From 0ad1aba2eeb694a98a329fc9c3815856372babf0 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Sat, 18 Feb 2023 08:38:13 +0000 Subject: [PATCH 026/349] * Fix bug #32255. --- module/programplan/model.php | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/module/programplan/model.php b/module/programplan/model.php index 4c6043071c..e1789a1369 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -833,6 +833,22 @@ class programplanModel extends model } } + $linkProducts = array(); + $linkBranches = array(); + $productList = $this->loadModel('product')->getProducts($projectID); + if($project->division) + { + $linkProducts = array(0 => $productID); + $linkBranches = array(0 => $productList[$productID]->branches); + } + else + { + $linkProducts = array_keys($productList); + foreach($linkProducts as $index => $productID) $linkBranches[$index] = $productList[$productID]->branches; + } + $this->post->set('products', $linkProducts); + $this->post->set('branch', $linkBranches); + foreach($datas as $data) { /* Set planDuration and realDuration. */ @@ -846,6 +862,7 @@ class programplanModel extends model $data->days = helper::diffDate($data->end, $data->begin) + 1; $data->order = current($orders); + if($data->id) { $stageID = $data->id; @@ -985,22 +1002,6 @@ class programplanModel extends model $this->computeProgress($stageID, 'create'); } } - - $linkProducts = array(); - $linkBranches = array(); - $productList = $this->loadModel('product')->getProducts($projectID); - if($project->division) - { - $linkProducts = array(0 => $productID); - $linkBranches = array(0 => $productList[$productID]->branches); - } - else - { - $linkProducts = array_keys($productList); - foreach($linkProducts as $index => $productID) $linkBranches[$index] = $productList[$productID]->branches; - } - $this->post->set('products', $linkProducts); - $this->post->set('branch', $linkBranches); $this->execution->updateProducts($stageID); /* If child plans has milestone, update parent plan set milestone eq 0 . */ From c28161fb0d58f7f823b4c26e6363831086383dd9 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Sat, 18 Feb 2023 09:15:04 +0000 Subject: [PATCH 027/349] * Fix bug of create project. --- module/project/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/model.php b/module/project/model.php index 59b321bc28..69e732bcef 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1236,7 +1236,7 @@ class projectModel extends model ->setIF($this->post->delta == 999, 'days', 0) ->setIF($this->post->acl == 'open', 'whitelist', '') ->setIF(!isset($_POST['whitelist']), 'whitelist', '') - ->setDefault('multiple', '1') + ->setIF(!isset($_POST['multiple']), 'multiple', '1') ->setDefault('openedBy', $this->app->user->account) ->setDefault('openedDate', helper::now()) ->setDefault('team', $this->post->name) From 09cb859c5e1cc8adef0660d784b0111fde79f3a7 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Sat, 18 Feb 2023 09:30:25 +0000 Subject: [PATCH 028/349] * Fix bug #32179. --- module/action/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/action/model.php b/module/action/model.php index 0dfdf4a832..30ddc77468 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -489,7 +489,7 @@ class actionModel extends model elseif($actionName == 'importedcard') { $title = $this->dao->select('name')->from(TABLE_KANBAN)->where('id')->eq($action->extra)->fetch('name'); - if($title) $action->extra = common::hasPriv('kanban', 'view') ? html::a(helper::createLink('kanban', 'view', "kanbanID=$action->extra"), "#$action->extra " . $title) : "#$action->extra " . $title; + if($title) $action->extra = (common::hasPriv('kanban', 'view') and !isonlybody()) ? html::a(helper::createLink('kanban', 'view', "kanbanID=$action->extra"), "#$action->extra " . $title) : "#$action->extra " . $title; } elseif($actionName == 'createchildren') { From fb57e0f9949c955e5c2c9fab1f42341421e84d71 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Sat, 18 Feb 2023 09:42:58 +0000 Subject: [PATCH 029/349] * Fix bug #32167. --- module/story/js/edit.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/story/js/edit.js b/module/story/js/edit.js index 2b8602a7b2..a5f7462886 100644 --- a/module/story/js/edit.js +++ b/module/story/js/edit.js @@ -95,4 +95,9 @@ $(function() { $('#planIdBox .chosen-container').find('div').css('width', $('#planIdBox').width()) }); + + $('#parent_chosen').click(function() + { + $('#parent_chosen').find('div').css('width', $('#parent_chosen').width()) + }); }) From 5aee6514541aa526f10260ff9791d75bed9ae5ab Mon Sep 17 00:00:00 2001 From: tianshujie Date: Sat, 18 Feb 2023 18:39:07 +0800 Subject: [PATCH 030/349] * Code for finish task #84575. --- module/build/control.php | 4 +-- module/common/model.php | 1 + module/execution/control.php | 3 +- module/execution/model.php | 58 ++++++++++++++++++++++++++---------- module/product/model.php | 8 ++--- 5 files changed, 52 insertions(+), 22 deletions(-) diff --git a/module/build/control.php b/module/build/control.php index cea5526559..8d4f0ff13c 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -72,7 +72,7 @@ class build extends control if($this->app->tab == 'project') { $this->project->setMenu($projectID); - $executions = $this->execution->getPairs($projectID, 'all', 'stagefilter|leaf'); + $executions = $this->execution->getPairs($projectID, 'all', 'stagefilter|leaf|order_asc'); $executionID = empty($executionID) ? key($executions) : $executionID; $productGroups = $executionID ? $this->product->getProducts($executionID) : array(); $branchGroups = $executionID ? $this->project->getBranchesByProject($executionID) : array(); @@ -81,7 +81,7 @@ class build extends control elseif($this->app->tab == 'execution') { $execution = $this->execution->getByID($executionID); - $executions = $this->execution->getPairs($execution->project, 'all', 'stagefilter|leaf'); + $executions = $this->execution->getPairs($execution->project, 'all', 'stagefilter|leaf|order_asc'); $projectID = $execution->project; $productGroups = $this->product->getProducts($executionID); $branchGroups = $this->project->getBranchesByProject($executionID); diff --git a/module/common/model.php b/module/common/model.php index 4cdc0b0394..525c199689 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -1792,6 +1792,7 @@ EOD; $userCondition = !$app->user->admin ? " AND `id` " . helper::dbIN($app->user->view->sprints) : ''; $orderBy = $object->type == 'stage' ? 'ORDER BY `id` ASC' : 'ORDER BY `id` DESC'; $executionList = $app->dbh->query("SELECT id,name,parent FROM " . TABLE_EXECUTION . " WHERE `project` = '{$object->project}' AND `deleted` = '0' $userCondition $orderBy")->fetchAll(); + $executionList = $app->control->loadModel('execution')->resetExecutionSorts($executionList); foreach($executionList as $execution) { if(isset($executionPairs[$execution->parent])) unset($executionPairs[$execution->parent]); diff --git a/module/execution/control.php b/module/execution/control.php index 38651c5404..899e0607d5 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -3771,7 +3771,7 @@ class execution extends control ->andWhere('type')->in('sprint,stage,kanban') ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi() ->andWhere('project')->in(array_keys($projects)) - ->orderBy('id_desc') + ->orderBy('order_asc') ->fetchGroup('project', 'id'); $teams = $this->dao->select('root,account')->from(TABLE_TEAM) @@ -3788,6 +3788,7 @@ class execution extends control $parents = array(); foreach($executions as $execution) $parents[$execution->parent] = $execution->parent; + $executions = $this->execution->resetExecutionSorts($executions); foreach($executions as $execution) { /* Only show leaf executions. */ diff --git a/module/execution/model.php b/module/execution/model.php index 4abfb60087..b3f627198b 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1366,7 +1366,7 @@ class executionModel extends model * * @param int $projectID * @param string $type all|sprint|stage|kanban - * @param string $mode all|noclosed|stagefilter|withdelete|multiple|leaf or empty + * @param string $mode all|noclosed|stagefilter|withdelete|multiple|leaf|order_asc or empty * @access public * @return array */ @@ -1401,20 +1401,19 @@ class executionModel extends model ->beginIF(strpos($mode, 'withdelete') === false)->andWhere('deleted')->eq(0)->fi() ->beginIF(!$this->app->user->admin and strpos($mode, 'all') === false)->andWhere('id')->in($this->app->user->view->sprints)->fi() ->orderBy($orderBy) - ->fetchAll(); + ->fetchAll('id'); /* If mode == leaf, only show leaf executions. */ - $allExecutions = $this->dao->select('id,name,parent')->from(TABLE_EXECUTION) + $allExecutions = $this->dao->select('id,name,parent,grade')->from(TABLE_EXECUTION) ->where('type')->notin(array('program', 'project')) ->andWhere('deleted')->eq('0') ->beginIf($projectID)->andWhere('project')->eq($projectID)->fi() ->fetchAll('id'); $parents = array(); - foreach($allExecutions as $exec) - { - $parents[$exec->parent] = true; - } + foreach($allExecutions as $exec) $parents[$exec->parent] = true; + + if(strpos($mode, 'order_asc') !== false) $executions = $this->resetExecutionSorts($executions); $pairs = array(); $noMultiples = array(); @@ -1780,9 +1779,7 @@ class executionModel extends model { if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getExecutionPairs(); - $project = $this->loadModel('project')->getByID($projectID); - $orderBy = (isset($project->model) and $project->model == 'waterfall') ? 'begin_asc,id_asc' : 'begin_desc,id_desc'; - + $project = $this->loadModel('project')->getByID($projectID); $executions = $this->dao->select('*')->from(TABLE_EXECUTION) ->where('type')->in('stage,sprint,kanban') ->andWhere('deleted')->eq('0') @@ -1794,12 +1791,12 @@ class executionModel extends model ->beginIF($status == 'noclosed')->andWhere('status')->ne('closed')->fi() ->beginIF($devel === true)->andWhere('attribute')->in('dev,qa,release')->fi() ->beginIF($appendedID)->orWhere('id')->eq($appendedID)->fi() - ->orderBy($orderBy) + ->orderBy('order_asc') ->beginIF($limit)->limit($limit)->fi() ->fetchAll('id'); /* Add product name and parent stage name to stage name. */ - if(isset($project->model) and $project->model == 'waterfall') + if(isset($project->model) and in_array($project->model, array('waterfall', 'waterfallplus'))) { $executionProducts = array(); if($project->hasProduct and $project->division) @@ -1812,8 +1809,8 @@ class executionModel extends model ->fetchPairs(); } - $allExecutions = $this->dao->select('id,name,parent')->from(TABLE_EXECUTION) - ->where('type')->eq('stage') + $allExecutions = $this->dao->select('id,name,parent,grade')->from(TABLE_EXECUTION) + ->where('type')->in('stage,sprint,kanban') ->andWhere('deleted')->eq('0') ->beginIf($projectID)->andWhere('project')->eq($projectID)->fi() ->fetchAll('id'); @@ -1821,6 +1818,7 @@ class executionModel extends model $parents = array(); foreach($allExecutions as $id => $execution) $parents[$execution->parent] = $execution->parent; + $executions = $this->resetExecutionSorts($executions); foreach($executions as $id => $execution) { if(isset($parents[$execution->id])) @@ -1836,7 +1834,6 @@ class executionModel extends model if($executionName) $execution->name = ltrim($executionName, '/'); if(isset($executionProducts[$id])) $execution->name = $executionProducts[$id] . '/' . $execution->name; } - } $projects = array(); @@ -5601,4 +5598,35 @@ class executionModel extends model return $executionIdList; } + + /** + * Reset execution orders. + * + * @param array $executions + * @param array $parentExecutions + * @access public + * @return array + */ + public function resetExecutionSorts($executions, $parentExecutions = array()) + { + if(empty($parentExecutions)) + { + $execution = current($executions); + $parentExecutions = $this->dao->select('*')->from(TABLE_EXECUTION) + ->where('deleted')->eq(0) + ->andWhere('type')->in('kanban,sprint,stage') + ->andWhere('grade')->eq(1) + ->orderBy('order_asc') + ->fetchAll('id'); + } + + $sortedExecutions = array(); + foreach($parentExecutions as $executionID => $execution) + { + $children = $this->getChildExecutions($executionID, 'order_asc'); + if(!empty($children)) $sortedExecutions += $this->resetExecutionSorts($executions, $children); + if(!isset($sortedExecutions[$executionID]) and isset($executions[$executionID])) $sortedExecutions[$executionID] = $executions[$executionID]; + } + return $sortedExecutions; + } } diff --git a/module/product/model.php b/module/product/model.php index f8108bc37a..db69c6d15d 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -1464,10 +1464,9 @@ class productModel extends model /* Only show leaf executions. */ $allExecutions = $this->dao->select('id,name,attribute,parent')->from(TABLE_EXECUTION)->where('type')->notin(array('program', 'project'))->fetchAll('id'); $parents = array(); - foreach($allExecutions as $exec) - { - $parents[$exec->parent] = true; - } + foreach($allExecutions as $exec) $parents[$exec->parent] = true; + + if($projectID) $executions = $this->loadModel('execution')->resetExecutionSorts($executions); $executionPairs = array('0' => ''); foreach($executions as $execID=> $execution) @@ -1535,6 +1534,7 @@ class productModel extends model } } + if($projectID) $executions = $this->loadModel('execution')->resetExecutionSorts($executions); foreach($executions as $execution) { if(isset($execution->children)) From 73077a3615c2a01ad38236524e89cc0ee0a13921 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Sat, 18 Feb 2023 18:55:59 +0800 Subject: [PATCH 031/349] * Code for finish task #84575. --- module/execution/control.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 899e0607d5..f3f1b66506 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -3785,10 +3785,15 @@ class execution extends control $executions = zget($executionGroups, $project->id, array()); if(isset($project->model) and $project->model == 'waterfall') ksort($executions); - $parents = array(); - foreach($executions as $execution) $parents[$execution->parent] = $execution->parent; + $parents = array(); + $firstGradeExecs = array(); + foreach($executions as $execution) + { + $parents[$execution->parent] = $execution->parent; + if($execution->grade == 1) $firstGradeExecs[$execution->id] = $execution->id; + } - $executions = $this->execution->resetExecutionSorts($executions); + $executions = $this->execution->resetExecutionSorts($executions, $firstGradeExecs); foreach($executions as $execution) { /* Only show leaf executions. */ From b05cad4addb6e7948ba227fae6d6b56d82cdbe9c Mon Sep 17 00:00:00 2001 From: tianshujie Date: Sat, 18 Feb 2023 20:16:52 +0800 Subject: [PATCH 032/349] * Add case of execution method. --- module/execution/model.php | 5 ++- test/class/execution.class.php | 40 +++++++++++++++++++ test/model/execution/resetexecutionsorts.php | 41 ++++++++++++++++++++ 3 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 test/model/execution/resetexecutionsorts.php diff --git a/module/execution/model.php b/module/execution/model.php index b3f627198b..55f0734e7f 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -5609,6 +5609,7 @@ class executionModel extends model */ public function resetExecutionSorts($executions, $parentExecutions = array()) { + if(empty($executions)) return array(); if(empty($parentExecutions)) { $execution = current($executions); @@ -5616,6 +5617,7 @@ class executionModel extends model ->where('deleted')->eq(0) ->andWhere('type')->in('kanban,sprint,stage') ->andWhere('grade')->eq(1) + ->andWhere('project')->eq($execution->project) ->orderBy('order_asc') ->fetchAll('id'); } @@ -5623,9 +5625,10 @@ class executionModel extends model $sortedExecutions = array(); foreach($parentExecutions as $executionID => $execution) { + if(!isset($sortedExecutions[$executionID]) and isset($executions[$executionID])) $sortedExecutions[$executionID] = $executions[$executionID]; + $children = $this->getChildExecutions($executionID, 'order_asc'); if(!empty($children)) $sortedExecutions += $this->resetExecutionSorts($executions, $children); - if(!isset($sortedExecutions[$executionID]) and isset($executions[$executionID])) $sortedExecutions[$executionID] = $executions[$executionID]; } return $sortedExecutions; } diff --git a/test/class/execution.class.php b/test/class/execution.class.php index dd2eb1cc8e..2c93e4b48d 100644 --- a/test/class/execution.class.php +++ b/test/class/execution.class.php @@ -2806,4 +2806,44 @@ class executionTest ->andWhere('date')->eq($date) ->orderBy('date DESC, id asc')->fetchGroup('name', 'date'); } + + /** + * Reset execution sorts. + * + * @param int $projectID + * @param string $type noParent + * @access public + * @return string + */ + public function resetExecutionSortsTest($projectID, $type = '') + { + $executions = array(); + $executionIDList = ''; + $firstGradeExecutions = array(); + if($projectID) + { + $executions = $this->executionModel->dao->select('*')->from(TABLE_EXECUTION) + ->where('deleted')->eq(0) + ->andWhere('project')->eq($projectID) + ->andWhere('type')->in('sprint,stage,kanban') + ->orderBy('order_asc') + ->fetchAll('id'); + + if($type == 'hasParent') + { + foreach($executions as $execution) + { + if($execution->grade == 1) $firstGradeExecutions[$execution->id] = $execution->id; + } + } + } + + $executions = $this->executionModel->resetExecutionSorts($executions, $firstGradeExecutions); + if(!empty($executions)) + { + $executionIDList = array_keys($executions); + $executionIDList = implode(',', $executionIDList); + } + return $executionIDList; + } } diff --git a/test/model/execution/resetexecutionsorts.php b/test/model/execution/resetexecutionsorts.php new file mode 100644 index 0000000000..d21a387966 --- /dev/null +++ b/test/model/execution/resetexecutionsorts.php @@ -0,0 +1,41 @@ +#!/usr/bin/env php +gen(5); +su('admin'); + +$execution = zdTable('project'); +$execution->id->range('1-8'); +$execution->name->range('项目集1,项目1,需求阶段1,测试阶段1,需求子阶段1,需求子阶段2,需求子阶段1的迭代1,需求子阶段1的看板1'); +$execution->model->range('[],waterfallplus,[]{6}'); +$execution->type->range('program,project,stage{4},sprint,kanban'); +$execution->project->range('0{2},2{6}'); +$execution->parent->range('0,1,2{2},3{2},5{2}'); +$execution->grade->range('1{4},2{2},3{2}'); +$execution->path->range('`,1,`,`,1,2,`,`,1,2,3`,`,1,2,4,`,`,1,2,3,5,`,`,1,2,3,6,`,`,1,2,3,5,7,`,`1,2,3,5,8,`'); +$execution->order->range('5,10,15,20,25,30,35,40'); +$execution->status->range('doing'); +$execution->openedBy->range('admin'); +$execution->begin->range('20220112 000000:0')->type('timestamp')->format('YY/MM/DD'); +$execution->end->range('20220212 000000:0')->type('timestamp')->format('YY/MM/DD'); +$execution->gen(8); + +/** + +title=测试executionModel->resetExecutionSorts(); +cid=1 +pid=1 + +检查没有执行时的排序 >> 0 +检查有执行时的排序 >> 3,5,7,8,6,4 +检查有执行并且传parenExecutions时的排序 >> 3,5,7,8,6,4 + +*/ + +$projectList = array(0, 2); + +$executionTester = new executionTest(); +r($executionTester->resetExecutionSortsTest($projectList[0])) && p() && e('0'); // 检查没有执行时的排序 +r($executionTester->resetExecutionSortsTest($projectList[1])) && p() && e('3,5,7,8,6,4'); // 检查有执行时的排序 +r($executionTester->resetExecutionSortsTest($projectList[1], 'hasParent')) && p() && e('3,5,7,8,6,4'); // 检查有执行并且传parenExecutions时的排序 From 75b5b2562c2f7f604efd7ba17f513b46547b882f Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Sat, 18 Feb 2023 16:04:53 +0000 Subject: [PATCH 033/349] * Finish task #84583. --- module/execution/config.php | 4 +- module/execution/control.php | 59 ++++- module/execution/js/all.js | 21 ++ module/execution/lang/de.php | 101 ++++---- module/execution/lang/en.php | 101 ++++---- module/execution/lang/fr.php | 101 ++++---- module/execution/lang/zh-cn.php | 102 ++++---- module/execution/model.php | 294 ++++++++++++++++++++++- module/execution/view/all.html.php | 35 ++- module/execution/view/batchedit.html.php | 3 - module/group/lang/resource.php | 2 + module/programplan/model.php | 56 +++++ module/project/control.php | 37 ++- module/project/js/execution.js | 23 +- module/project/view/execution.html.php | 1 + 15 files changed, 725 insertions(+), 215 deletions(-) diff --git a/module/execution/config.php b/module/execution/config.php index f2304568fe..216136c250 100644 --- a/module/execution/config.php +++ b/module/execution/config.php @@ -31,10 +31,10 @@ $config->execution->edit->requiredFields = 'name,code,begin,end'; $config->execution->start->requiredFields = 'realBegan'; $config->execution->close->requiredFields = 'realEnd'; -$config->execution->customBatchEditFields = 'days,type,teamname,status,desc,PO,QD,PM,RD'; +$config->execution->customBatchEditFields = 'days,type,teamname,desc,PO,QD,PM,RD'; $config->execution->custom = new stdclass(); -$config->execution->custom->batchEditFields = 'days,status,PM'; +$config->execution->custom->batchEditFields = 'days,PM'; $config->execution->editor = new stdclass(); $config->execution->editor->create = array('id' => 'desc', 'tools' => 'simpleTools'); diff --git a/module/execution/control.php b/module/execution/control.php index 44d1973535..c8dd813474 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2164,17 +2164,6 @@ class execution extends control $actionID = $this->loadModel('action')->create($this->objectType, $executionID, 'Edited'); $this->action->logHistory($actionID, $changes); - - $syncExecution = ''; - foreach($changes as $changeField) - { - if($changeField['field'] == 'status' && $changeField['old'] =='wait' && $changeField['new'] =='doing') - { - $syncExecution = $executionID; - break; - } - } - $this->loadModel('common')->syncPPEStatus($syncExecution); } } @@ -2237,6 +2226,54 @@ class execution extends control $this->display(); } + /** + * Batch change status. + * + * @param string $status + * @param int $projectID + * @access public + * @return void + */ + public function batchChangeStatus($status, $projectID = 0) + { + $executionIdList = $this->post->executionIDList; + if(is_string($executionIdList)) $executionIdList = explode(',', $executionIdList); + /* Sub-phases are changed first and then parented. */ + rsort($executionIdList); + + $pointOutStages = $this->execution->batchChangeStatus($executionIdList, $status); + $project = $this->loadModel('project')->getById($projectID); + + if($pointOutStages) + { + $alertLang = ''; + + if($status == 'wait') + { + /* In execution-all list or waterfall, waterfallplus project's execution list. */ + if(empty($project) or (!empty($project) and strpos($project->model, 'waterfall') !== false)) + { + $executionLang = (empty($project) or (!empty($project) and $project->model == 'waterfallplus')) ? $this->lang->execution->common : $this->lang->stage->common; + $alertLang = sprintf($this->lang->execution->hasStartedTaskOrSubStage, $executionLang, $pointOutStages); + } + + if(!empty($project) and strpos('agileplus,scrum', $project->model) !== false) + { + $executionLang = $project->model == 'scrum' ? $this->lang->executionCommon : $this->lang->execution->common; + $alertLang = sprintf($this->lang->execution->hasStartedTask, $executionLang, $pointOutStages); + } + } + + if($status == 'suspended') $alertLang = sprintf($this->lang->execution->hasSuspendedOrClosedChildren, $pointOutStages); + + if($status == 'closed') $alertLang = sprintf($this->lang->execution->hasNotClosedChildren, $pointOutStages); + + return print(js::alert($alertLang) . js::locate($this->session->executionList, 'parent')); + } + + return print(js::locate($this->session->executionList, 'parent')); + } + /** * Start execution. * diff --git a/module/execution/js/all.js b/module/execution/js/all.js index 959742346f..4e5cfbee4a 100644 --- a/module/execution/js/all.js +++ b/module/execution/js/all.js @@ -31,3 +31,24 @@ function byProduct(productID, projectID, status) { location.href = createLink('project', 'all', "status=" + status + "&project=" + projectID + "&orderBy=" + orderBy + '&productID=' + productID); } + +/** + * Set the color of the badge to white. + * + * @param object obj + * @param bool isShow + * @access public + * @return void + */ +function setBadgeStyle(obj, isShow) +{ + var $label = $(obj); + if(isShow == true) + { + $label.find('.label-badge').css({"color":"#fff", "border-color":"#fff"}); + } + else + { + $label.find('.label-badge').css({"color":"#838a9d", "border-color":"#838a9d"}); + } +} diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php index cfe000f2a8..9cd8aa1b8c 100644 --- a/module/execution/lang/de.php +++ b/module/execution/lang/de.php @@ -262,6 +262,7 @@ $lang->execution->edit = "Bearbeiten"; $lang->execution->editAction = "Edit Execution"; $lang->execution->batchEdit = "Mehere bearbeiten"; $lang->execution->batchEditAction = "Batch Edit"; +$lang->execution->batchChangeStatus = "Batch Change Status"; $lang->execution->manageMembers = 'Teams verwalten'; $lang->execution->unlinkMember = 'Mitgliefer entfernen'; $lang->execution->unlinkStory = 'Story entfernen'; @@ -376,51 +377,55 @@ $lang->execution->linkAllStoryTip = "({$lang->SRCommon} has never been link $lang->execution->copyTeamTitle = "Choose a {$lang->project->common} or {$lang->execution->common} Team to copy."; /* Interactive prompts. */ -$lang->execution->confirmDelete = "Möchten Sie {$lang->executionCommon}[%s] löschen?"; -$lang->execution->confirmUnlinkMember = "Möchten Sie den Benutzer vom {$lang->executionCommon} entfernen?"; -$lang->execution->confirmUnlinkStory = "After {$lang->SRCommon} is removed, cased linked to {$lang->SRCommon} will be reomoved and tasks linked to {$lang->SRCommon} will be cancelled. Do you want to continue?"; -$lang->execution->confirmSync = "After modifying the project, in order to maintain the consistency of data, the data of products, requirements, teams and whitelist associated with the implementation will be synchronized to the new project. Please know."; -$lang->execution->confirmUnlinkExecutionStory = "Do you want to unlink this Story from the project?"; -$lang->execution->notAllowedUnlinkStory = "This {$lang->SRCommon} is linked to the {$lang->executionCommon} of the project. Remove it from the {$lang->executionCommon}, then try again."; -$lang->execution->notAllowRemoveProducts = "The story of this product is linked with the {$lang->executionCommon}. Unlink it before doing any action."; -$lang->execution->errorNoLinkedProducts = "Kein verknüpftes {$lang->productCommon} in {$lang->executionCommon} gefunden. Sie werden auf die {$lang->productCommon} Seite geleitet."; -$lang->execution->errorSameProducts = "{$lang->executionCommon} Kann nicht mit mehreren identischen {$lang->productCommon} verknüpft werden"; -$lang->execution->errorSameBranches = "{$lang->executionCommon} cannot be linked to the same branch twice"; -$lang->execution->errorBegin = "The start time of {$lang->executionCommon} cannot be less than the start time of the project %s."; -$lang->execution->errorEnd = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; -$lang->execution->errorLetterProject = "The start time of {$lang->executionCommon} cannot be less than the start time of the project %s."; -$lang->execution->errorGreaterProject = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; -$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' should be ≥ the start date of project : %s.'; -$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' should be ≤ the deadline of project : %s.'; -$lang->execution->errorLetterParent = 'The begin cannot be less than the begin of the parent stage to which it belongs: %s.'; -$lang->execution->errorGreaterParent = 'The end cannot be greater than the end of the parent stage to which it belongs:%s.'; -$lang->execution->errorNameRepeat = 'Child stages of the same parent stage cannot have the same name.'; -$lang->execution->errorAttrMatch = "Parent stage's attribute is [%s], the attribute needs to be consistent with the parent stage."; -$lang->execution->accessDenied = "Zugriff zu {$lang->executionCommon} verweigert!"; -$lang->execution->tips = 'Hinweis'; -$lang->execution->afterInfo = "{$lang->executionCommon} wurde erstellt. Als nächstes können Sie "; -$lang->execution->setTeam = 'Team setzen'; -$lang->execution->linkStory = 'Link Stories'; -$lang->execution->createTask = 'Aufgaben erstellen'; -$lang->execution->goback = "Zurückkehren"; -$lang->execution->gobackExecution = "Go Back {$lang->executionCommon} List"; -$lang->execution->noweekend = 'Ohne Wochenende'; -$lang->execution->nodelay = 'Exclude Delay Date'; -$lang->execution->withweekend = 'Mit Wochenende'; -$lang->execution->withdelay = 'Include Delay Date'; -$lang->execution->interval = 'Intervale '; -$lang->execution->fixFirstWithLeft = 'Modify the left'; -$lang->execution->unfinishedExecution = "This {$lang->executionCommon} has "; -$lang->execution->unfinishedTask = "[%s] unfinished tasks. "; -$lang->execution->unresolvedBug = "[%s] unresolved bugs. "; -$lang->execution->projectNotEmpty = 'Project cannot be empty.'; -$lang->execution->confirmStoryToTask = $lang->SRCommon . '%s are converted to tasks in the current. Do you want to convert them anyways?'; -$lang->execution->ge = "『%s』should be >= actual begin『%s』."; -$lang->execution->storyDragError = "The {$lang->SRCommon} is not active. Please activate and drag again."; -$lang->execution->countTip = ' (%s member)'; -$lang->execution->pleaseInput = "Enter"; -$lang->execution->week = 'week'; -$lang->execution->checkedExecutions = "Seleted %s {$lang->executionCommon}."; +$lang->execution->confirmDelete = "Möchten Sie {$lang->executionCommon}[%s] löschen?"; +$lang->execution->confirmUnlinkMember = "Möchten Sie den Benutzer vom {$lang->executionCommon} entfernen?"; +$lang->execution->confirmUnlinkStory = "After {$lang->SRCommon} is removed, cased linked to {$lang->SRCommon} will be reomoved and tasks linked to {$lang->SRCommon} will be cancelled. Do you want to continue?"; +$lang->execution->confirmSync = "After modifying the project, in order to maintain the consistency of data, the data of products, requirements, teams and whitelist associated with the implementation will be synchronized to the new project. Please know."; +$lang->execution->confirmUnlinkExecutionStory = "Do you want to unlink this Story from the project?"; +$lang->execution->notAllowedUnlinkStory = "This {$lang->SRCommon} is linked to the {$lang->executionCommon} of the project. Remove it from the {$lang->executionCommon}, then try again."; +$lang->execution->notAllowRemoveProducts = "The story of this product is linked with the {$lang->executionCommon}. Unlink it before doing any action."; +$lang->execution->errorNoLinkedProducts = "Kein verknüpftes {$lang->productCommon} in {$lang->executionCommon} gefunden. Sie werden auf die {$lang->productCommon} Seite geleitet."; +$lang->execution->errorSameProducts = "{$lang->executionCommon} Kann nicht mit mehreren identischen {$lang->productCommon} verknüpft werden"; +$lang->execution->errorSameBranches = "{$lang->executionCommon} cannot be linked to the same branch twice"; +$lang->execution->errorBegin = "The start time of {$lang->executionCommon} cannot be less than the start time of the project %s."; +$lang->execution->errorEnd = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; +$lang->execution->errorLetterProject = "The start time of {$lang->executionCommon} cannot be less than the start time of the project %s."; +$lang->execution->errorGreaterProject = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; +$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' should be ≥ the start date of project : %s.'; +$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' should be ≤ the deadline of project : %s.'; +$lang->execution->errorLetterParent = 'The begin cannot be less than the begin of the parent stage to which it belongs: %s.'; +$lang->execution->errorGreaterParent = 'The end cannot be greater than the end of the parent stage to which it belongs:%s.'; +$lang->execution->errorNameRepeat = 'Child stages of the same parent stage cannot have the same name.'; +$lang->execution->errorAttrMatch = "Parent stage's attribute is [%s], the attribute needs to be consistent with the parent stage."; +$lang->execution->accessDenied = "Zugriff zu {$lang->executionCommon} verweigert!"; +$lang->execution->tips = 'Hinweis'; +$lang->execution->afterInfo = "{$lang->executionCommon} wurde erstellt. Als nächstes können Sie "; +$lang->execution->setTeam = 'Team setzen'; +$lang->execution->linkStory = 'Link Stories'; +$lang->execution->createTask = 'Aufgaben erstellen'; +$lang->execution->goback = "Zurückkehren"; +$lang->execution->gobackExecution = "Go Back {$lang->executionCommon} List"; +$lang->execution->noweekend = 'Ohne Wochenende'; +$lang->execution->nodelay = 'Exclude Delay Date'; +$lang->execution->withweekend = 'Mit Wochenende'; +$lang->execution->withdelay = 'Include Delay Date'; +$lang->execution->interval = 'Intervale '; +$lang->execution->fixFirstWithLeft = 'Modify the left'; +$lang->execution->unfinishedExecution = "This {$lang->executionCommon} has "; +$lang->execution->unfinishedTask = "[%s] unfinished tasks. "; +$lang->execution->unresolvedBug = "[%s] unresolved bugs. "; +$lang->execution->projectNotEmpty = 'Project cannot be empty.'; +$lang->execution->confirmStoryToTask = $lang->SRCommon . '%s are converted to tasks in the current. Do you want to convert them anyways?'; +$lang->execution->ge = "『%s』should be >= actual begin『%s』."; +$lang->execution->storyDragError = "The {$lang->SRCommon} is not active. Please activate and drag again."; +$lang->execution->countTip = ' (%s member)'; +$lang->execution->pleaseInput = "Enter"; +$lang->execution->week = 'week'; +$lang->execution->checkedExecutions = "Seleted %s {$lang->executionCommon}."; +$lang->execution->hasStartedTaskOrSubStage = "Tasks or subphases under %s %s have already started, cannot be modified, and have been filtered."; +$lang->execution->hasSuspendedOrClosedChildren = "The sub-stages under stage %s are not all suspended or closed, cannot be modified, and have been filtered."; +$lang->execution->hasNotClosedChildren = "The sub-stages under stage %s are not all closed, cannot be modified, and have been filtered."; +$lang->execution->hasStartedTask = "The task under %s %s has already started, cannot be modified, and has been filtered."; /* Statistics. */ $lang->execution->charts = new stdclass(); @@ -561,6 +566,9 @@ $lang->execution->action->startbychildclose = '$date, the stage status is execution->action->startbychildcreate = '$date, the stage status is Doing as the system judges that its sub-stages are Created. '; $lang->execution->action->startbychildedit = '$date, the stage status is Doing as the system judges that its sub-stages are Edited'; $lang->execution->action->startbychild = '$date, the stage status is Doing as the system judges that its sub-stages are Activated.'; +$lang->execution->action->waitbychild = '$date, the stage status is Wait as the system judges that its sub-stages are Edited'; +$lang->execution->action->suspendbychild = '$date, the stage status is Suspended as the system judges that its sub-stages are Edited'; +$lang->execution->action->closebychild = '$date, the stage status is Closed as the system judges that its sub-stages are Edited'; $lang->execution->startbychildactivate = 'activated'; $lang->execution->waitbychilddelete = 'stop'; @@ -576,6 +584,9 @@ $lang->execution->startbychildclose = 'activated'; $lang->execution->startbychildcreate = 'activated'; $lang->execution->startbychildedit = 'activated'; $lang->execution->startbychild = 'activated'; +$lang->execution->waitbychild = 'stop'; +$lang->execution->suspendbychild = 'suspended'; +$lang->execution->closebychild = 'closed'; $lang->execution->statusColorList = array(); $lang->execution->statusColorList['wait'] = '#0991FF'; diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index 4914a06a6d..5331ed2369 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -262,6 +262,7 @@ $lang->execution->edit = "Edit {$lang->executionCommon}"; $lang->execution->editAction = "Edit Execution"; $lang->execution->batchEdit = "Edit"; $lang->execution->batchEditAction = "Batch Edit"; +$lang->execution->batchChangeStatus = "Batch Change Status"; $lang->execution->manageMembers = 'Manage Team'; $lang->execution->unlinkMember = 'Remove Member'; $lang->execution->unlinkStory = 'Unlink Story'; @@ -376,51 +377,55 @@ $lang->execution->linkAllStoryTip = "({$lang->SRCommon} has never been link $lang->execution->copyTeamTitle = "Choose a {$lang->project->common} or {$lang->execution->common} Team to copy."; /* Interactive prompts. */ -$lang->execution->confirmDelete = "Do you want to delete the {$lang->executionCommon}[%s]?"; -$lang->execution->confirmUnlinkMember = "Do you want to unlink this User from {$lang->executionCommon}?"; -$lang->execution->confirmUnlinkStory = "After {$lang->SRCommon} is removed, cased linked to {$lang->SRCommon} will be reomoved and tasks linked to {$lang->SRCommon} will be cancelled. Do you want to continue?"; -$lang->execution->confirmSync = "After modifying the project, in order to maintain the consistency of data, the data of products, requirements, teams and whitelist associated with the implementation will be synchronized to the new project. Please know."; -$lang->execution->confirmUnlinkExecutionStory = "Do you want to unlink this Story from the execution?"; -$lang->execution->notAllowedUnlinkStory = "This {$lang->SRCommon} is linked to the {$lang->executionCommon} of the execution. Remove it from the {$lang->executionCommon}, then try again."; -$lang->execution->notAllowRemoveProducts = "The story %s of this product is linked with the {$lang->executionCommon}. Unlink it before doing any action."; -$lang->execution->errorNoLinkedProducts = "No {$lang->productCommon} is linked to {$lang->executionCommon}. You will be directed to {$lang->productCommon} page to link one."; -$lang->execution->errorSameProducts = "{$lang->executionCommon} cannot be linked to the same {$lang->productCommon} twice."; -$lang->execution->errorSameBranches = "{$lang->executionCommon} cannot be linked to the same branch twice"; -$lang->execution->errorBegin = "The start time of {$lang->executionCommon} cannot be less than the start time of the project %s."; -$lang->execution->errorEnd = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; -$lang->execution->errorLetterProject = "The start time of {$lang->executionCommon} cannot be less than the start time of the project %s."; -$lang->execution->errorGreaterProject = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; -$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' should be ≥ the start date of project : %s.'; -$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' should be ≤ the deadline of project : %s.'; -$lang->execution->errorLetterParent = 'The begin cannot be less than the begin of the parent stage to which it belongs: %s.'; -$lang->execution->errorGreaterParent = 'The end cannot be greater than the end of the parent stage to which it belongs:%s.'; -$lang->execution->errorNameRepeat = 'Child stages of the same parent stage cannot have the same name.'; -$lang->execution->errorAttrMatch = "Parent stage's attribute is [%s], the attribute needs to be consistent with the parent stage."; -$lang->execution->accessDenied = "Your access to {$lang->executionCommon} is denied!"; -$lang->execution->tips = 'Note'; -$lang->execution->afterInfo = "{$lang->executionCommon} is created. Next you can "; -$lang->execution->setTeam = 'Set Team'; -$lang->execution->linkStory = 'Link Story'; -$lang->execution->createTask = 'Create Task'; -$lang->execution->goback = "Go Back Task List"; -$lang->execution->gobackExecution = "Go Back {$lang->executionCommon} List"; -$lang->execution->noweekend = 'Exclude Weekend'; -$lang->execution->nodelay = 'Exclude Delay Date'; -$lang->execution->withweekend = 'Include Weekend'; -$lang->execution->withdelay = 'Include Delay Date'; -$lang->execution->interval = 'Intervals '; -$lang->execution->fixFirstWithLeft = 'Update hours left too'; -$lang->execution->unfinishedExecution = "This {$lang->executionCommon} has "; -$lang->execution->unfinishedTask = "[%s] unfinished tasks. "; -$lang->execution->unresolvedBug = "[%s] unresolved bugs. "; -$lang->execution->projectNotEmpty = 'Project cannot be empty.'; -$lang->execution->confirmStoryToTask = $lang->SRCommon . '%s are converted to tasks in the current. Do you want to convert them anyways?'; -$lang->execution->ge = "『%s』should be >= actual begin『%s』."; -$lang->execution->storyDragError = "The {$lang->SRCommon} is not active. Please activate and drag again."; -$lang->execution->countTip = ' (%s member)'; -$lang->execution->pleaseInput = "Enter"; -$lang->execution->week = 'week'; -$lang->execution->checkedExecutions = "Seleted %s {$lang->executionCommon}."; +$lang->execution->confirmDelete = "Do you want to delete the {$lang->executionCommon}[%s]?"; +$lang->execution->confirmUnlinkMember = "Do you want to unlink this User from {$lang->executionCommon}?"; +$lang->execution->confirmUnlinkStory = "After {$lang->SRCommon} is removed, cased linked to {$lang->SRCommon} will be reomoved and tasks linked to {$lang->SRCommon} will be cancelled. Do you want to continue?"; +$lang->execution->confirmSync = "After modifying the project, in order to maintain the consistency of data, the data of products, requirements, teams and whitelist associated with the implementation will be synchronized to the new project. Please know."; +$lang->execution->confirmUnlinkExecutionStory = "Do you want to unlink this Story from the execution?"; +$lang->execution->notAllowedUnlinkStory = "This {$lang->SRCommon} is linked to the {$lang->executionCommon} of the execution. Remove it from the {$lang->executionCommon}, then try again."; +$lang->execution->notAllowRemoveProducts = "The story %s of this product is linked with the {$lang->executionCommon}. Unlink it before doing any action."; +$lang->execution->errorNoLinkedProducts = "No {$lang->productCommon} is linked to {$lang->executionCommon}. You will be directed to {$lang->productCommon} page to link one."; +$lang->execution->errorSameProducts = "{$lang->executionCommon} cannot be linked to the same {$lang->productCommon} twice."; +$lang->execution->errorSameBranches = "{$lang->executionCommon} cannot be linked to the same branch twice"; +$lang->execution->errorBegin = "The start time of {$lang->executionCommon} cannot be less than the start time of the project %s."; +$lang->execution->errorEnd = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; +$lang->execution->errorLetterProject = "The start time of {$lang->executionCommon} cannot be less than the start time of the project %s."; +$lang->execution->errorGreaterProject = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; +$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' should be ≥ the start date of project : %s.'; +$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' should be ≤ the deadline of project : %s.'; +$lang->execution->errorLetterParent = 'The begin cannot be less than the begin of the parent stage to which it belongs: %s.'; +$lang->execution->errorGreaterParent = 'The end cannot be greater than the end of the parent stage to which it belongs:%s.'; +$lang->execution->errorNameRepeat = 'Child stages of the same parent stage cannot have the same name.'; +$lang->execution->errorAttrMatch = "Parent stage's attribute is [%s], the attribute needs to be consistent with the parent stage."; +$lang->execution->accessDenied = "Your access to {$lang->executionCommon} is denied!"; +$lang->execution->tips = 'Note'; +$lang->execution->afterInfo = "{$lang->executionCommon} is created. Next you can "; +$lang->execution->setTeam = 'Set Team'; +$lang->execution->linkStory = 'Link Story'; +$lang->execution->createTask = 'Create Task'; +$lang->execution->goback = "Go Back Task List"; +$lang->execution->gobackExecution = "Go Back {$lang->executionCommon} List"; +$lang->execution->noweekend = 'Exclude Weekend'; +$lang->execution->nodelay = 'Exclude Delay Date'; +$lang->execution->withweekend = 'Include Weekend'; +$lang->execution->withdelay = 'Include Delay Date'; +$lang->execution->interval = 'Intervals '; +$lang->execution->fixFirstWithLeft = 'Update hours left too'; +$lang->execution->unfinishedExecution = "This {$lang->executionCommon} has "; +$lang->execution->unfinishedTask = "[%s] unfinished tasks. "; +$lang->execution->unresolvedBug = "[%s] unresolved bugs. "; +$lang->execution->projectNotEmpty = 'Project cannot be empty.'; +$lang->execution->confirmStoryToTask = $lang->SRCommon . '%s are converted to tasks in the current. Do you want to convert them anyways?'; +$lang->execution->ge = "『%s』should be >= actual begin『%s』."; +$lang->execution->storyDragError = "The {$lang->SRCommon} is not active. Please activate and drag again."; +$lang->execution->countTip = ' (%s member)'; +$lang->execution->pleaseInput = "Enter"; +$lang->execution->week = 'week'; +$lang->execution->checkedExecutions = "Seleted %s {$lang->executionCommon}."; +$lang->execution->hasStartedTaskOrSubStage = "Tasks or subphases under %s %s have already started, cannot be modified, and have been filtered."; +$lang->execution->hasSuspendedOrClosedChildren = "The sub-stages under stage %s are not all suspended or closed, cannot be modified, and have been filtered."; +$lang->execution->hasNotClosedChildren = "The sub-stages under stage %s are not all closed, cannot be modified, and have been filtered."; +$lang->execution->hasStartedTask = "The task under %s %s has already started, cannot be modified, and has been filtered."; /* Statistics. */ $lang->execution->charts = new stdclass(); @@ -561,6 +566,9 @@ $lang->execution->action->startbychildclose = '$date, the stage status is execution->action->startbychildcreate = '$date, the stage status is Doing as the system judges that its sub-stages are Created. '; $lang->execution->action->startbychildedit = '$date, the stage status is Doing as the system judges that its sub-stages are Edited'; $lang->execution->action->startbychild = '$date, the stage status is Doing as the system judges that its sub-stages are Activated.'; +$lang->execution->action->waitbychild = '$date, the stage status is Wait as the system judges that its sub-stages are Edited'; +$lang->execution->action->suspendbychild = '$date, the stage status is Suspended as the system judges that its sub-stages are Edited'; +$lang->execution->action->closebychild = '$date, the stage status is Closed as the system judges that its sub-stages are Edited'; $lang->execution->startbychildactivate = 'activated'; $lang->execution->waitbychilddelete = 'stop'; @@ -576,6 +584,9 @@ $lang->execution->startbychildclose = 'activated'; $lang->execution->startbychildcreate = 'activated'; $lang->execution->startbychildedit = 'activated'; $lang->execution->startbychild = 'activated'; +$lang->execution->waitbychild = 'stop'; +$lang->execution->suspendbychild = 'suspended'; +$lang->execution->closebychild = 'closed'; $lang->execution->statusColorList = array(); $lang->execution->statusColorList['wait'] = '#0991FF'; diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php index bd6a30e4a5..41520d6e0d 100644 --- a/module/execution/lang/fr.php +++ b/module/execution/lang/fr.php @@ -262,6 +262,7 @@ $lang->execution->edit = "Edit {$lang->executionCommon}"; $lang->execution->editAction = "Edit Execution"; $lang->execution->batchEdit = "Edit"; $lang->execution->batchEditAction = "Batch Edit"; +$lang->execution->batchChangeStatus = "Batch Change Status"; $lang->execution->manageMembers = 'Manage Team'; $lang->execution->unlinkMember = 'Remove Member'; $lang->execution->unlinkStory = 'Unlink Story'; @@ -376,51 +377,55 @@ $lang->execution->linkAllStoryTip = "({$lang->SRCommon} has never been link $lang->execution->copyTeamTitle = "Choose a {$lang->project->common} or {$lang->execution->common} Team to copy."; /* Interactive prompts. */ -$lang->execution->confirmDelete = "Voulez-vous réellement supprimer le {$lang->executionCommon}[%s] ?"; -$lang->execution->confirmUnlinkMember = "Voulez-vous retirer cet utilisateur du {$lang->executionCommon} ?"; -$lang->execution->confirmUnlinkStory = "After {$lang->SRCommon} is removed, cased linked to {$lang->SRCommon} will be reomoved and tasks linked to {$lang->SRCommon} will be cancelled. Do you want to continue?"; -$lang->execution->confirmSync = "After modifying the project, in order to maintain the consistency of data, the data of products, requirements, teams and whitelist associated with the implementation will be synchronized to the new project. Please know."; -$lang->execution->confirmUnlinkExecutionStory = "Do you want to unlink this Story from the project?"; -$lang->execution->notAllowedUnlinkStory = "This {$lang->SRCommon} is linked to the {$lang->executionCommon} of the project. Remove it from the {$lang->executionCommon}, then try again."; -$lang->execution->notAllowRemoveProducts = "The story of this product is linked with the {$lang->executionCommon}. Unlink it before doing any action."; -$lang->execution->errorNoLinkedProducts = "Aucun {$lang->productCommon} n'est associé à ce {$lang->executionCommon}. Vous allez être redirigé vers la page {$lang->productCommon} pour en associer un."; -$lang->execution->errorSameProducts = "Ce {$lang->executionCommon} ne peut pas être associé deux fois au même {$lang->productCommon}. Imaginez un peu les résultats !"; -$lang->execution->errorSameBranches = "{$lang->executionCommon} cannot be linked to the same branch twice"; -$lang->execution->errorBegin = "The start time of {$lang->executionCommon} cannot be less than the start time of the project %s."; -$lang->execution->errorEnd = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; -$lang->execution->errorLetterProject = "The start time of {$lang->executionCommon} cannot be less than the start time of the project %s."; -$lang->execution->errorGreaterProject = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; -$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' should be ≥ the start date of project : %s.'; -$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' should be ≤ the deadline of project : %s.'; -$lang->execution->errorLetterParent = 'The begin cannot be less than the begin of the parent stage to which it belongs: %s.'; -$lang->execution->errorGreaterParent = 'The end cannot be greater than the end of the parent stage to which it belongs:%s.'; -$lang->execution->errorNameRepeat = 'Child stages of the same parent stage cannot have the same name.'; -$lang->execution->errorAttrMatch = "Parent stage's attribute is [%s], the attribute needs to be consistent with the parent stage."; -$lang->execution->accessDenied = "Votre accès au {$lang->executionCommon} est refusé ! Désolé."; -$lang->execution->tips = 'Note'; -$lang->execution->afterInfo = "Le {$lang->executionCommon} a été créé avec succès ! Ensuite vous pouvez "; -$lang->execution->setTeam = "Composer l'Equipe"; -$lang->execution->linkStory = 'Stories liées'; -$lang->execution->createTask = 'Créer des Tâches'; -$lang->execution->goback = "Revenir en arrière"; -$lang->execution->gobackExecution = "Go Back {$lang->executionCommon} List"; -$lang->execution->noweekend = 'Exclure les Weekends'; -$lang->execution->nodelay = 'Exclude Delay Date'; -$lang->execution->withweekend = 'Inclure les Weekends'; -$lang->execution->withdelay = 'Include Delay Date'; -$lang->execution->interval = 'Intervalles'; -$lang->execution->fixFirstWithLeft = 'Mettre à jour les heures également'; -$lang->execution->unfinishedExecution = "This {$lang->executionCommon} has "; -$lang->execution->unfinishedTask = "[%s] unfinished tasks. "; -$lang->execution->unresolvedBug = "[%s] unresolved bugs. "; -$lang->execution->projectNotEmpty = 'Project cannot be empty.'; -$lang->execution->confirmStoryToTask = $lang->SRCommon . '%s are converted to tasks in the current. Do you want to convert them anyways?'; -$lang->execution->ge = "『%s』should be >= actual begin『%s』."; -$lang->execution->storyDragError = "The {$lang->SRCommon} is not active. Please activate and drag again."; -$lang->execution->countTip = ' (%s member)'; -$lang->execution->pleaseInput = "Enter"; -$lang->execution->week = 'week'; -$lang->execution->checkedExecutions = "Pour s électionner l'élément%s."; +$lang->execution->confirmDelete = "Voulez-vous réellement supprimer le {$lang->executionCommon}[%s] ?"; +$lang->execution->confirmUnlinkMember = "Voulez-vous retirer cet utilisateur du {$lang->executionCommon} ?"; +$lang->execution->confirmUnlinkStory = "After {$lang->SRCommon} is removed, cased linked to {$lang->SRCommon} will be reomoved and tasks linked to {$lang->SRCommon} will be cancelled. Do you want to continue?"; +$lang->execution->confirmSync = "After modifying the project, in order to maintain the consistency of data, the data of products, requirements, teams and whitelist associated with the implementation will be synchronized to the new project. Please know."; +$lang->execution->confirmUnlinkExecutionStory = "Do you want to unlink this Story from the project?"; +$lang->execution->notAllowedUnlinkStory = "This {$lang->SRCommon} is linked to the {$lang->executionCommon} of the project. Remove it from the {$lang->executionCommon}, then try again."; +$lang->execution->notAllowRemoveProducts = "The story of this product is linked with the {$lang->executionCommon}. Unlink it before doing any action."; +$lang->execution->errorNoLinkedProducts = "Aucun {$lang->productCommon} n'est associé à ce {$lang->executionCommon}. Vous allez être redirigé vers la page {$lang->productCommon} pour en associer un."; +$lang->execution->errorSameProducts = "Ce {$lang->executionCommon} ne peut pas être associé deux fois au même {$lang->productCommon}. Imaginez un peu les résultats !"; +$lang->execution->errorSameBranches = "{$lang->executionCommon} cannot be linked to the same branch twice"; +$lang->execution->errorBegin = "The start time of {$lang->executionCommon} cannot be less than the start time of the project %s."; +$lang->execution->errorEnd = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; +$lang->execution->errorLetterProject = "The start time of {$lang->executionCommon} cannot be less than the start time of the project %s."; +$lang->execution->errorGreaterProject = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; +$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' should be ≥ the start date of project : %s.'; +$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' should be ≤ the deadline of project : %s.'; +$lang->execution->errorLetterParent = 'The begin cannot be less than the begin of the parent stage to which it belongs: %s.'; +$lang->execution->errorGreaterParent = 'The end cannot be greater than the end of the parent stage to which it belongs:%s.'; +$lang->execution->errorNameRepeat = 'Child stages of the same parent stage cannot have the same name.'; +$lang->execution->errorAttrMatch = "Parent stage's attribute is [%s], the attribute needs to be consistent with the parent stage."; +$lang->execution->accessDenied = "Votre accès au {$lang->executionCommon} est refusé ! Désolé."; +$lang->execution->tips = 'Note'; +$lang->execution->afterInfo = "Le {$lang->executionCommon} a été créé avec succès ! Ensuite vous pouvez "; +$lang->execution->setTeam = "Composer l'Equipe"; +$lang->execution->linkStory = 'Stories liées'; +$lang->execution->createTask = 'Créer des Tâches'; +$lang->execution->goback = "Revenir en arrière"; +$lang->execution->gobackExecution = "Go Back {$lang->executionCommon} List"; +$lang->execution->noweekend = 'Exclure les Weekends'; +$lang->execution->nodelay = 'Exclude Delay Date'; +$lang->execution->withweekend = 'Inclure les Weekends'; +$lang->execution->withdelay = 'Include Delay Date'; +$lang->execution->interval = 'Intervalles'; +$lang->execution->fixFirstWithLeft = 'Mettre à jour les heures également'; +$lang->execution->unfinishedExecution = "This {$lang->executionCommon} has "; +$lang->execution->unfinishedTask = "[%s] unfinished tasks. "; +$lang->execution->unresolvedBug = "[%s] unresolved bugs. "; +$lang->execution->projectNotEmpty = 'Project cannot be empty.'; +$lang->execution->confirmStoryToTask = $lang->SRCommon . '%s are converted to tasks in the current. Do you want to convert them anyways?'; +$lang->execution->ge = "『%s』should be >= actual begin『%s』."; +$lang->execution->storyDragError = "The {$lang->SRCommon} is not active. Please activate and drag again."; +$lang->execution->countTip = ' (%s member)'; +$lang->execution->pleaseInput = "Enter"; +$lang->execution->week = 'week'; +$lang->execution->checkedExecutions = "Pour s électionner l'élément%s."; +$lang->execution->hasStartedTaskOrSubStage = "Tasks or subphases under %s %s have already started, cannot be modified, and have been filtered."; +$lang->execution->hasSuspendedOrClosedChildren = "The sub-stages under stage %s are not all suspended or closed, cannot be modified, and have been filtered."; +$lang->execution->hasNotClosedChildren = "The sub-stages under stage %s are not all closed, cannot be modified, and have been filtered."; +$lang->execution->hasStartedTask = "The task under %s %s has already started, cannot be modified, and has been filtered."; /* Statistics. */ $lang->execution->charts = new stdclass(); @@ -561,6 +566,9 @@ $lang->execution->action->startbychildclose = '$date, the stage status is execution->action->startbychildcreate = '$date, the stage status is Doing as the system judges that its sub-stages are Created. '; $lang->execution->action->startbychildedit = '$date, the stage status is Doing as the system judges that its sub-stages are Edited'; $lang->execution->action->startbychild = '$date, the stage status is Doing as the system judges that its sub-stages are Activated.'; +$lang->execution->action->waitbychild = '$date, the stage status is Wait as the system judges that its sub-stages are Edited'; +$lang->execution->action->suspendbychild = '$date, the stage status is Suspended as the system judges that its sub-stages are Edited'; +$lang->execution->action->closebychild = '$date, the stage status is Closed as the system judges that its sub-stages are Edited'; $lang->execution->startbychildactivate = 'activated'; $lang->execution->waitbychilddelete = 'stop'; @@ -576,6 +584,9 @@ $lang->execution->startbychildclose = 'activated'; $lang->execution->startbychildcreate = 'activated'; $lang->execution->startbychildedit = 'activated'; $lang->execution->startbychild = 'activated'; +$lang->execution->waitbychild = 'stop'; +$lang->execution->suspendbychild = 'suspended'; +$lang->execution->closebychild = 'closed'; $lang->execution->statusColorList = array(); $lang->execution->statusColorList['wait'] = '#0991FF'; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index 5353f38177..bfb7610028 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -262,6 +262,7 @@ $lang->execution->edit = "设置{$lang->executionCommon}"; $lang->execution->editAction = "编辑{$lang->execution->common}"; $lang->execution->batchEdit = "编辑"; $lang->execution->batchEditAction = "批量编辑"; +$lang->execution->batchChangeStatus = "批量修改状态"; $lang->execution->manageMembers = '团队管理'; $lang->execution->unlinkMember = '移除成员'; $lang->execution->unlinkStory = "移除{$lang->SRCommon}"; @@ -376,51 +377,55 @@ $lang->execution->linkAllStoryTip = "(项目下还未关联{$lang->SRCommon $lang->execution->copyTeamTitle = "选择一个{$lang->project->common}或{$lang->execution->common}团队"; /* 交互提示。*/ -$lang->execution->confirmDelete = "您确定删除{$lang->executionCommon}[%s]吗?"; -$lang->execution->confirmUnlinkMember = "您确定从该{$lang->executionCommon}中移除该用户吗?"; -$lang->execution->confirmUnlinkStory = "移除该{$lang->SRCommon}后,该{$lang->SRCommon}关联的用例将被移除,该{$lang->SRCommon}关联的任务将被取消,请确认。"; -$lang->execution->confirmSync = "修改所属项目后,为了保持数据的一致性,该执行所关联的产品、需求、团队和白名单数据将会同步到新的项目中,请知悉。"; -$lang->execution->confirmUnlinkExecutionStory = "您确定从该项目中移除该{$lang->SRCommon}吗?"; -$lang->execution->notAllowedUnlinkStory = "该{$lang->SRCommon}已经与项目下{$lang->executionCommon}相关联,请从{$lang->executionCommon}中移除后再操作。"; -$lang->execution->notAllowRemoveProducts = "该{$lang->productCommon}中的{$lang->SRCommon}%s已与该{$lang->executionCommon}进行了关联,请取消关联后再操作。"; -$lang->execution->errorNoLinkedProducts = "该{$lang->executionCommon}没有关联的{$lang->productCommon},系统将转到{$lang->productCommon}关联页面"; -$lang->execution->errorSameProducts = "{$lang->executionCommon}不能关联多个相同的{$lang->productCommon}。"; -$lang->execution->errorSameBranches = "{$lang->executionCommon}不能关联多个相同的分支。"; -$lang->execution->errorBegin = "{$lang->executionCommon}的开始时间不能小于所属项目的开始时间%s。"; -$lang->execution->errorEnd = "{$lang->executionCommon}的截止时间不能大于所属项目的结束时间%s。"; -$lang->execution->errorLetterProject = "{$lang->executionCommon}的计划开始时间不能小于所属项目的计划开始时间%s。"; -$lang->execution->errorGreaterProject = "{$lang->executionCommon}的计划完成时间不能大于所属项目的计划完成时间%s。"; -$lang->execution->errorCommonBegin = $lang->executionCommon . '开始日期应大于等于项目的开始日期:%s。'; -$lang->execution->errorCommonEnd = $lang->executionCommon . '截止日期应小于等于项目的截止日期:%s。'; -$lang->execution->errorLetterParent = '计划开始时间不能小于所属父阶段的计划开始时间:%s。'; -$lang->execution->errorGreaterParent = '计划完成时间不能大于所属父阶段的计划完成时间:%s。'; -$lang->execution->errorNameRepeat = '相同父阶段的子阶段名称不能相同'; -$lang->execution->errorAttrMatch = "父阶段类型为[%s],阶段类型需与父阶段一致"; -$lang->execution->accessDenied = "您无权访问该{$lang->executionCommon}!"; -$lang->execution->tips = '提示'; -$lang->execution->afterInfo = "{$lang->executionCommon}添加成功,您现在可以进行以下操作:"; -$lang->execution->setTeam = '设置团队'; -$lang->execution->linkStory = "关联{$lang->SRCommon}"; -$lang->execution->createTask = '创建任务'; -$lang->execution->goback = "返回任务列表"; -$lang->execution->gobackExecution = "返回{$lang->executionCommon}列表"; -$lang->execution->noweekend = '去除周末'; -$lang->execution->nodelay = '去除延期日期'; -$lang->execution->withweekend = '显示周末'; -$lang->execution->withdelay = '显示延期日期'; -$lang->execution->interval = '间隔'; -$lang->execution->fixFirstWithLeft = '修改剩余工时'; -$lang->execution->unfinishedExecution = "该{$lang->executionCommon}下还有"; -$lang->execution->unfinishedTask = "[%s]个未完成的任务,"; -$lang->execution->unresolvedBug = "[%s]个未解决的bug,"; -$lang->execution->projectNotEmpty = '所属项目不能为空。'; -$lang->execution->confirmStoryToTask = '%s' . $lang->SRCommon . '已经在当前' . $lang->execution->common . '中转了任务,请确认是否重复转任务。'; -$lang->execution->ge = "『%s』应当不小于实际开始时间『%s』。"; -$lang->execution->storyDragError = "该{$lang->SRCommon}不是激活状态,请激活后再拖动"; -$lang->execution->countTip = '(%s人)'; -$lang->execution->pleaseInput = "请输入"; -$lang->execution->week = '周'; -$lang->execution->checkedExecutions = "共选中%s个{$lang->executionCommon}。"; +$lang->execution->confirmDelete = "您确定删除{$lang->executionCommon}[%s]吗?"; +$lang->execution->confirmUnlinkMember = "您确定从该{$lang->executionCommon}中移除该用户吗?"; +$lang->execution->confirmUnlinkStory = "移除该{$lang->SRCommon}后,该{$lang->SRCommon}关联的用例将被移除,该{$lang->SRCommon}关联的任务将被取消,请确认。"; +$lang->execution->confirmSync = "修改所属项目后,为了保持数据的一致性,该执行所关联的产品、需求、团队和白名单数据将会同步到新的项目中,请知悉。"; +$lang->execution->confirmUnlinkExecutionStory = "您确定从该项目中移除该{$lang->SRCommon}吗?"; +$lang->execution->notAllowedUnlinkStory = "该{$lang->SRCommon}已经与项目下{$lang->executionCommon}相关联,请从{$lang->executionCommon}中移除后再操作。"; +$lang->execution->notAllowRemoveProducts = "该{$lang->productCommon}中的{$lang->SRCommon}%s已与该{$lang->executionCommon}进行了关联,请取消关联后再操作。"; +$lang->execution->errorNoLinkedProducts = "该{$lang->executionCommon}没有关联的{$lang->productCommon},系统将转到{$lang->productCommon}关联页面"; +$lang->execution->errorSameProducts = "{$lang->executionCommon}不能关联多个相同的{$lang->productCommon}。"; +$lang->execution->errorSameBranches = "{$lang->executionCommon}不能关联多个相同的分支。"; +$lang->execution->errorBegin = "{$lang->executionCommon}的开始时间不能小于所属项目的开始时间%s。"; +$lang->execution->errorEnd = "{$lang->executionCommon}的截止时间不能大于所属项目的结束时间%s。"; +$lang->execution->errorLetterProject = "{$lang->executionCommon}的计划开始时间不能小于所属项目的计划开始时间%s。"; +$lang->execution->errorGreaterProject = "{$lang->executionCommon}的计划完成时间不能大于所属项目的计划完成时间%s。"; +$lang->execution->errorCommonBegin = $lang->executionCommon . '开始日期应大于等于项目的开始日期:%s。'; +$lang->execution->errorCommonEnd = $lang->executionCommon . '截止日期应小于等于项目的截止日期:%s。'; +$lang->execution->errorLetterParent = '计划开始时间不能小于所属父阶段的计划开始时间:%s。'; +$lang->execution->errorGreaterParent = '计划完成时间不能大于所属父阶段的计划完成时间:%s。'; +$lang->execution->errorNameRepeat = '相同父阶段的子阶段名称不能相同'; +$lang->execution->errorAttrMatch = "父阶段类型为[%s],阶段类型需与父阶段一致"; +$lang->execution->accessDenied = "您无权访问该{$lang->executionCommon}!"; +$lang->execution->tips = '提示'; +$lang->execution->afterInfo = "{$lang->executionCommon}添加成功,您现在可以进行以下操作:"; +$lang->execution->setTeam = '设置团队'; +$lang->execution->linkStory = "关联{$lang->SRCommon}"; +$lang->execution->createTask = '创建任务'; +$lang->execution->goback = "返回任务列表"; +$lang->execution->gobackExecution = "返回{$lang->executionCommon}列表"; +$lang->execution->noweekend = '去除周末'; +$lang->execution->nodelay = '去除延期日期'; +$lang->execution->withweekend = '显示周末'; +$lang->execution->withdelay = '显示延期日期'; +$lang->execution->interval = '间隔'; +$lang->execution->fixFirstWithLeft = '修改剩余工时'; +$lang->execution->unfinishedExecution = "该{$lang->executionCommon}下还有"; +$lang->execution->unfinishedTask = "[%s]个未完成的任务,"; +$lang->execution->unresolvedBug = "[%s]个未解决的bug,"; +$lang->execution->projectNotEmpty = '所属项目不能为空。'; +$lang->execution->confirmStoryToTask = '%s' . $lang->SRCommon . '已经在当前' . $lang->execution->common . '中转了任务,请确认是否重复转任务。'; +$lang->execution->ge = "『%s』应当不小于实际开始时间『%s』。"; +$lang->execution->storyDragError = "该{$lang->SRCommon}不是激活状态,请激活后再拖动"; +$lang->execution->countTip = '(%s人)'; +$lang->execution->pleaseInput = "请输入"; +$lang->execution->week = '周'; +$lang->execution->checkedExecutions = "共选中%s个{$lang->executionCommon}。"; +$lang->execution->hasStartedTaskOrSubStage = "%s%s下的任务或子阶段已经开始,无法修改,已过滤。"; +$lang->execution->hasSuspendedOrClosedChildren = "阶段%s下的子阶段未全部挂起或关闭,无法修改,已过滤。"; +$lang->execution->hasNotClosedChildren = "阶段%s下的子阶段未全部关闭,无法修改,已过滤。"; +$lang->execution->hasStartedTask = "%s%s下的任务已经开始,无法修改,已过滤。"; /* 统计。*/ $lang->execution->charts = new stdclass(); @@ -561,7 +566,9 @@ $lang->execution->action->startbychildclose = '$date, 系统判断由于子 $lang->execution->action->startbychildcreate = '$date, 系统判断由于 创建 子阶段 ,将阶段状态置为 进行中 。'; $lang->execution->action->startbychildedit = '$date, 系统判断由于子阶段 状态修改 ,将阶段状态置为 进行中 。'; $lang->execution->action->startbychild = '$date, 系统判断由于子阶段 激活 ,将阶段状态置为 进行中 。'; - +$lang->execution->action->waitbychild = '$date, 系统判断由于子阶段 状态修改 ,将阶段状态置为 未开始 。'; +$lang->execution->action->suspendbychild = '$date, 系统判断由于子阶段 状态修改 ,将阶段状态置为 已挂起 。'; +$lang->execution->action->closebychild = '$date, 系统判断由于子阶段 状态修改 ,将阶段状态置为 已关闭 。'; $lang->execution->startbychildactivate = '激活了'; $lang->execution->waitbychilddelete = '停止了'; @@ -577,6 +584,9 @@ $lang->execution->startbychildclose = '激活了'; $lang->execution->startbychildcreate = '激活了'; $lang->execution->startbychildedit = '激活了'; $lang->execution->startbychild = '激活了'; +$lang->execution->waitbychild = '停止了'; +$lang->execution->suspendbychild = '挂起了'; +$lang->execution->closebychild = '关闭了'; $lang->execution->statusColorList = array(); $lang->execution->statusColorList['wait'] = '#0991FF'; diff --git a/module/execution/model.php b/module/execution/model.php index b55724ecaf..2c76c4d05e 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -754,7 +754,6 @@ class executionModel extends model $executions[$executionID]->PO = $data->POs[$executionID]; $executions[$executionID]->QD = $data->QDs[$executionID]; $executions[$executionID]->RD = $data->RDs[$executionID]; - $executions[$executionID]->status = $data->statuses[$executionID]; $executions[$executionID]->begin = $data->begins[$executionID]; $executions[$executionID]->end = $data->ends[$executionID]; $executions[$executionID]->team = $data->teams[$executionID]; @@ -767,8 +766,6 @@ class executionModel extends model if(isset($data->projects)) $executions[$executionID]->project = zget($data->projects, $executionID, 0); if(isset($data->attributes)) $executions[$executionID]->attribute = zget($data->attributes, $executionID, ''); if(isset($data->lifetimes)) $executions[$executionID]->lifetime = $data->lifetimes[$executionID]; - if($executions[$executionID]->status == 'closed' and $oldExecutions[$executionID]->status != 'closed') $executions[$executionID]->closedDate = helper::now(); - if($executions[$executionID]->status == 'suspended' and $oldExecutions[$executionID]->status != 'suspended') $executions[$executionID]->suspendedDate = helper::today(); $oldExecution = $oldExecutions[$executionID]; $projectID = isset($executions[$executionID]->project) ? $executions[$executionID]->project : $oldExecution->project; @@ -975,6 +972,245 @@ class executionModel extends model return $allChanges; } + /** + * Batch change status. + * + * @param array $executionIdList + * @param string $status + * @access public + * @return void + */ + public function batchChangeStatus($executionIdList, $status) + { + $this->loadModel('programplan'); + $this->loadModel('action'); + + $selfAndChildrenList = $this->programplan->getSelfAndChildrenList($executionIdList); + $siblingStages = $this->programplan->getSiblings($executionIdList); + $pointOutStages = ''; + + foreach($executionIdList as $executionID) + { + $selfAndChildren = $selfAndChildrenList[$executionID]; + $execution = $selfAndChildren[$executionID]; + $executionType = $execution->type; + + $siblingList = array(); + if($executionType == 'stage') $siblingList = $siblingStages[$executionID]; + + if($status == 'wait' and $execution->status != 'wait') + { + $pointOutStages .= $this->changeStatus2Wait($executionID, $selfAndChildren, $siblingList); + } + + if($status == 'doing' and $execution->status != 'doing') + { + $this->changeStatus2Doing($executionID, $selfAndChildren); + } + + if(($status == 'suspended' and $execution->status != 'suspended') or ($status == 'closed' and $execution->status != 'closed')) + { + $pointOutStages .= $this->changeStatus2Inactived($executionID, $status, $selfAndChildren, $siblingList); + } + } + + return trim($pointOutStages, ','); + } + + /** + * Change status to wait. + * + * @param int $executionID + * @param array $selfAndChildren + * @param array $siblingStages + * @access public + * @return string + */ + public function changeStatus2Wait($executionID, $selfAndChildren, $siblingStages) + { + $parentID = $selfAndChildren[$executionID]->parent; + + /* There are already tasks consuming work in this phase or its sub-phases already have start times. */ + $hasStartedChildren = $this->dao->select('id')->from(TABLE_EXECUTION)->where('deleted')->eq(0)->andWhere('realBegan')->ne('0000-00-00')->andWhere('id')->in(array_keys($selfAndChildren))->andWhere('id')->ne($executionID)->fetchPairs(); + $hasConsumedTasks = $this->dao->select('count(consumed) as count')->from(TABLE_TASK)->where('deleted')->eq(0)->andWhere('execution')->in(array_keys($selfAndChildren))->andWhere('consumed')->gt(0)->fetch('count'); + if($hasStartedChildren or $hasConsumedTasks) return "'{$selfAndChildren[$executionID]->name}',"; + + $newExecution = $this->buildExecutionBySstatus('wait'); + $this->dao->update(TABLE_EXECUTION)->data($newExecution)->where('id')->eq($executionID)->exec(); + + if(!dao::isError()) + { + /* Action. */ + $changes = common::createChanges($selfAndChildren[$executionID], $newExecution); + $actionID = $this->action->create('execution', $executionID, 'Edited'); + $this->action->logHistory($actionID, $changes); + + /* This stage has a parent stage. */ + $checkTopStage = $this->programplan->checkTopStage($executionID); + $siblingsAllWait = true; + if(!$checkTopStage) + { + /* Check sibling stages are all wait. */ + foreach($siblingStages as $siblingID => $sibling) + { + if($siblingID == $executionID) continue; + + if($sibling->status != 'wait') + { + $siblingsAllWait = false; + return $pointOutStages; + } + } + + if($siblingsAllWait) + { + /* Actual start or consumed work exists for the parent phase. */ + $parent = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->eq($parentID)->fetch(); + $parentsChildren = $this->dao->select('id')->from(TABLE_EXECUTION)->where('deleted')->eq(0)->andWhere('path')->like("%,$executionID,%")->andWhere('id')->ne($parentID)->fetchPairs(); + $parentHasConsumedTasks = $this->dao->select('count(id) as count')->from(TABLE_TASK)->where('deleted')->eq(0)->andWhere('execution')->in($parentsChildren)->andWhere('consumed')->gt(0)->fetch('count'); + + $parentStatus = (!helper::isZeroDate($parent->realBegan) or $parentHasConsumedTasks) ? 'doing' : 'wait'; + if($parent->status == $parentStatus) return ''; + + $newParent = $this->buildExecutionBySstatus($parentStatus); + $this->dao->update(TABLE_EXECUTION)->data($newParent)->where('id')->eq($parentID)->exec(); + + if(!dao::isError()) + { + $changes = common::createChanges($parent, $newParent); + $actionType = $parentStatus == 'doing' ? 'startbychildedit' : 'waitbychild'; + $actionID = $this->action->create('execution', $parentID, $actionType, '', $actionType); + $this->action->logHistory($actionID, $changes); + + if($parent->status == 'wait' and $parentStatus == 'doing') $this->loadModel('common')->syncPPEStatus($parentID); + } + } + } + } + } + + /** + * Change status to doing. + * + * @param int $executionID + * @param array $selfAndChildren + * @access public + * @return string + */ + public function changeStatus2Doing($executionID, $selfAndChildren) + { + $type = $selfAndChildren[$executionID]->type; + $parentID = $selfAndChildren[$executionID]->parent; + + $newExecution = $this->buildExecutionBySstatus('doing'); + $this->dao->update(TABLE_EXECUTION)->data($newExecution)->where('id')->eq($executionID)->exec(); + if(!dao::isError()) + { + $changes = common::createChanges($selfAndChildren[$executionID], $newExecution); + $actionID = $this->action->create('execution', $executionID, 'Edited'); + $this->action->logHistory($actionID, $changes); + + if($type != 'stage') return ''; + + /* This stage has a parent stage. */ + $checkTopStage = $this->programplan->checkTopStage($executionID); + if(!$checkTopStage) + { + $parent = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->eq($parentID)->fetch(); + if($parent->status == 'doing') return ''; + + $newParent = $this->buildExecutionBySstatus('doing'); + $this->dao->update(TABLE_EXECUTION)->data($newParent)->where('id')->eq($parentID)->exec(); + + if(!dao::isError()) + { + $changes = common::createChanges($parent, $newParent); + $actionID = $this->action->create('execution', $parentID, 'startbychildedit', '', 'startbychildedit'); + $this->action->logHistory($actionID, $changes); + + if($parent->status == 'wait') $this->loadModel('common')->syncPPEStatus($parentID); + } + } + } + } + + /** + * Change status to suspended or closed. + * + * @param int $executionID + * @param strint $status + * @param array $selfAndChildren + * @param array $siblingStages + * @access public + * @return string + */ + public function changeStatus2Inactived($executionID, $status, $selfAndChildren, $siblingStages) + { + $type = $selfAndChildren[$executionID]->type; + $parentID = $selfAndChildren[$executionID]->parent; + $checkedStatus = $status == 'suspended' ? 'wait,doing' : 'wait,doing,suspended'; + + /* If status is suspended, the rules is there are sub-stages under this stage, and not all sub-stages are suspended or closed. */ + /* If status is closed, the rules is there are sub-stages under this stage, and not all sub-stages are closed. */ + $checkLeafStage = $this->programplan->checkLeafStage($executionID); + if(!$checkLeafStage) + { + foreach($selfAndChildren as $childID => $child) + { + if($childID == $executionID) continue; + + if(strpos($checkedStatus, $child->status) !== false) return "'{$selfAndChildren[$executionID]->name}',"; + } + } + + $newExecution = $this->buildExecutionBySstatus($status); + $this->dao->update(TABLE_EXECUTION)->data($newExecution)->where('id')->eq($executionID)->exec(); + if(!dao::isError()) + { + $changes = common::createChanges($selfAndChildren[$executionID], $newExecution); + $actionID = $this->action->create('execution', $executionID, 'Edited'); + $this->action->logHistory($actionID, $changes); + + if($type != 'stage') return ''; + + /* Suspended: When all child stages at the same level are suspended or closed, the status of the parent stage becomes "suspended". */ + /* Closed: When all child stages at the same level are closed, the status of the parent stage becomes "closed". */ + $checkTopStage = $this->programplan->checkTopStage($executionID); + $siblingsAllInactived = true; + if(!$checkTopStage) + { + foreach($siblingStages as $siblingID => $sibling) + { + if($siblingID == $executionID) continue; + + if(strpos($checkedStatus, $sibling->status) !== false) + { + $siblingsAllInactived = false; + break; + } + } + + if($siblingsAllInactived) + { + $parent = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->eq($parentID)->fetch(); + if($parent->status == $status) return ''; + + $newParent = $this->buildExecutionBySstatus($status); + $this->dao->update(TABLE_EXECUTION)->data($newParent)->where('id')->eq($parentID)->exec(); + + if(!dao::isError()) + { + $changes = common::createChanges($parent, $newParent); + $actionType = $status == 'suspended' ? 'suspendbychild' : 'closebychild'; + $actionID = $this->action->create('execution', $parentID, $actionType, '', $actionType); + $this->action->logHistory($actionID, $changes); + } + } + } + } + + } + /** * Start execution. * @@ -5613,4 +5849,56 @@ class executionModel extends model return $executionIdList; } + + /** + * Build execution object by status. + * + * @param string $status + * @access public + * @return object + */ + public function buildExecutionBySstatus($status) + { + $execution = new stdclass(); + $execution->status = $status; + $execution->lastEditedBy = $this->app->user->account; + $execution->lastEditedDate = helper::now(); + + if($status == 'wait') + { + $execution->realBegan = ''; + $execution->realEnd = ''; + $execution->closedBy = ''; + $execution->closedDate = ''; + $execution->canceledBy = ''; + $execution->canceledDate = ''; + $execution->suspendedDate = ''; + } + + if($status == 'doing') + { + $execution->realBegan = helper::today(); + $execution->realEnd = ''; + $execution->closedBy = ''; + $execution->closedDate = ''; + $execution->canceledBy = ''; + $execution->canceledDate = ''; + $execution->suspendedDate = ''; + } + + if($status == 'suspended') + { + $execution->suspendedDate = helper::now(); + $execution->closedBy = ''; + $execution->closedDate = ''; + } + + if($status == 'closed') + { + $execution->closedBy = $this->app->user->account; + $execution->closedDate = helper::now(); + } + + return $execution; + } } diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index 23d70c16a9..b6007fc541 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -32,6 +32,7 @@ js::set('isCNLang', !$this->loadModel('common')->checkNotCN()); ?> + show('right', 'pagerjs');?> @@ -159,6 +174,24 @@ js::set('isCNLang', !$this->loadModel('common')->checkNotCN()); document.body.appendChild(tempform); tempform.submit(); }) + + $('.statusLink').click(function() + { + var changeStatusLink = $(this).data('link'); + var tempform = document.createElement("form"); + tempform.action = changeStatusLink; + tempform.method = "post"; + tempform.target = "hiddenwin"; + tempform.style.display = "none"; + + var opt = document.createElement("input"); + opt.name = 'executionIDList'; + opt.value = checkItems; + + tempform.appendChild(opt); + document.body.appendChild(tempform); + tempform.submit(); + })
diff --git a/module/execution/view/batchedit.html.php b/module/execution/view/batchedit.html.php index 477eeaa4e8..5b95828e0f 100755 --- a/module/execution/view/batchedit.html.php +++ b/module/execution/view/batchedit.html.php @@ -41,7 +41,6 @@ $PM = $from == 'execution' ? 'execPM' : 'PM'; $type = $from == 'execution' ? 'execType' : 'type'; $desc = $from == 'execution' ? 'execDesc' : 'desc'; - $status = $from == 'execution' ? 'execStatus' : 'status'; ?> '>
@@ -64,7 +63,6 @@ '>execution->QD;?> '>execution->RD;?> '>execution->$type;?> - '>execution->$status;?> execution->begin;?> execution->end;?> '>execution->$desc;?> @@ -107,7 +105,6 @@ execution->lifeTimeList, $executions[$executionID]->lifetime, 'class=form-control');?> - '>execution->statusList, $executions[$executionID]->status, 'class=form-control');?> begin, "id='begins{$executionID}' class='form-control form-date' onchange='computeWorkDays(this.id)'");?> end, "id='ends{$executionID}' class='form-control form-date' onchange='computeWorkDays(this.id)'");?> '>desc, "rows='1' class='form-control autosize'");?> diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 6d3ff6178f..ac6c5c578b 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -802,6 +802,7 @@ $lang->resource->execution->browse = 'browse'; $lang->resource->execution->create = 'createExec'; $lang->resource->execution->edit = 'editAction'; $lang->resource->execution->batchedit = 'batchEditAction'; +$lang->resource->execution->batchchangestatus = 'batchChangeStatus'; $lang->resource->execution->start = 'startAction'; $lang->resource->execution->activate = 'activateAction'; $lang->resource->execution->putoff = 'delayAction'; @@ -860,6 +861,7 @@ $lang->execution->methodOrder[10] = 'browse'; $lang->execution->methodOrder[15] = 'create'; $lang->execution->methodOrder[20] = 'edit'; $lang->execution->methodOrder[25] = 'batchedit'; +$lang->execution->methodOrder[27] = 'batchchangestatus'; $lang->execution->methodOrder[30] = 'start'; $lang->execution->methodOrder[35] = 'activate'; $lang->execution->methodOrder[40] = 'putoff'; diff --git a/module/programplan/model.php b/module/programplan/model.php index 15d82b1d11..05efcceeb2 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -1616,4 +1616,60 @@ class programplanModel extends model $this->updateSubStageAttr($childID, $attribute, $withDeleted); } } + + /** + * Get plan and its children. + * + * @param array $planIdList + * @access public + * @return array + */ + public function getSelfAndChildrenList($planIdList) + { + $planList = $this->dao->select('t2.*')->from(TABLE_EXECUTION)->alias('t1') + ->leftJoin(TABLE_EXECUTION)->alias('t2')->on('FIND_IN_SET(t1.id,t2.`path`)') + ->where('t1.id')->in($planIdList) + ->andWhere('t2.deleted')->eq(0) + ->fetchAll('id'); + + $selfAndChildrenList = array(); + foreach($planIdList as $planID) + { + if(!isset($selfAndChildrenList[$planID])) $selfAndChildrenList[$planID] = array(); + foreach($planList as $plan) + { + if(strpos($plan->path, ",$planID,") !== false) $selfAndChildrenList[$planID][$plan->id] = $plan; + } + } + + return $selfAndChildrenList; + } + + /** + * Get plan's siblings. + * + * @param array $planIdList + * @access public + * @return array + */ + public function getSiblings($planIdList) + { + $siblingsList = $this->dao->select('t1.*')->from(TABLE_EXECUTION)->alias('t1') + ->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.parent=t2.parent') + ->where('t2.id')->in($planIdList) + ->andWhere('t1.deleted')->eq(0) + ->fetchAll('id'); + + $siblingStages = array(); + foreach($planIdList as $planID) + { + if(!isset($siblingStages[$planID])) $siblingStages[$planID] = array(); + foreach($siblingsList as $sibling) + { + if($siblingsList[$planID]->parent == $sibling->parent) $siblingStages[$planID][$sibling->id] = $sibling; + } + } + + return $siblingStages; + } } diff --git a/module/project/control.php b/module/project/control.php index 089447b42f..06fa156006 100755 --- a/module/project/control.php +++ b/module/project/control.php @@ -1103,19 +1103,30 @@ class project extends control if(!empty($execution->tasks) or !empty($execution->children)) $showToggleIcon = true; } - $this->view->executionStats = $executionStats; - $this->view->showToggleIcon = $showToggleIcon; - $this->view->productList = $this->loadModel('product')->getProductPairsByProject($projectID, 'all', '', false); - $this->view->productID = $productID; - $this->view->product = $this->product->getByID($productID); - $this->view->projectID = $projectID; - $this->view->project = $project; - $this->view->projects = $projects; - $this->view->pager = $pager; - $this->view->orderBy = $orderBy; - $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->status = $status; - $this->view->isStage = (isset($project->model) and ($project->model == 'waterfall' or $project->model == 'waterfallplus')) ? true : false; + $changeStatusHtml = "
"; + $changeStatusHtml .= ""; + $changeStatusHtml .= "
"; + + $this->view->executionStats = $executionStats; + $this->view->showToggleIcon = $showToggleIcon; + $this->view->productList = $this->loadModel('product')->getProductPairsByProject($projectID, 'all', '', false); + $this->view->productID = $productID; + $this->view->product = $this->product->getByID($productID); + $this->view->projectID = $projectID; + $this->view->project = $project; + $this->view->projects = $projects; + $this->view->pager = $pager; + $this->view->orderBy = $orderBy; + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->status = $status; + $this->view->isStage = (isset($project->model) and ($project->model == 'waterfall' or $project->model == 'waterfallplus')) ? true : false; + $this->view->changeStatusHtml = common::hasPriv('execution', 'batchChangeStatus') ? $changeStatusHtml : ''; $this->display(); } diff --git a/module/project/js/execution.js b/module/project/js/execution.js index 49a94fd3f4..0f8faf74d9 100644 --- a/module/project/js/execution.js +++ b/module/project/js/execution.js @@ -229,7 +229,7 @@ function showEditCheckbox(show) if(show) { $('.table-nest-title').prepend("
").addClass('table-nest-title-edit'); - var tableFooter = "
"; + var tableFooter = "
" + changeStatusHtml + "
"; $('#executionForm').attr('action', createLink('execution', 'batchEdit')); $('.table-footer').prepend(tableFooter).show(); $('body').scroll(); @@ -242,3 +242,24 @@ function showEditCheckbox(show) $('#executionForm').removeAttr('action'); } } + +/** + * Set the color of the badge to white. + * + * @param object obj + * @param bool isShow + * @access public + * @return void + */ +function setBadgeStyle(obj, isShow) +{ + var $label = $(obj); + if(isShow == true) + { + $label.find('.label-badge').css({"color":"#fff", "border-color":"#fff"}); + } + else + { + $label.find('.label-badge').css({"color":"#838a9d", "border-color":"#838a9d"}); + } +} diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php index 9485fb7828..c1eff7b9e3 100644 --- a/module/project/view/execution.html.php +++ b/module/project/view/execution.html.php @@ -13,6 +13,7 @@ execution->pageExecSummary);?> execution->executionSummary);?> execution->checkedExecutions);?> + - -
-
-
-
- -
-
- - - - - - - - - - - $assign):?> - - - - - $count):?> - ';?> - - - - - - '; $id ++;?> - - - - -
report->user;?>report->product;?>report->bugTotal;?>report->total;?>
- createLink('product', 'view', "product={$count['productID']}") : $this->createLink('project', 'view', "projectID={$count['projectID']}");?> - - - -
-
-
-
- - + diff --git a/module/report/view/bugcreate.html.php b/module/report/view/bugcreate.html.php index c330149633..f3dd5bb8ae 100644 --- a/module/report/view/bugcreate.html.php +++ b/module/report/view/bugcreate.html.php @@ -1,80 +1,85 @@ - - -
-
-

error->noData;?>

-
-
- + -
-
-
-
- report->bugOpenedDate;?> -
- report->to;?> -
-
-
-
-
- report->product;?> - -
-
-
-
- execution->common;?> - -
-
-
-
-
-
-
-
- -
-
- - - - - - bug->resolutionList as $resolutionType => $resolution):?> - - - - - - - - - $bug):?> - - - - - bug->resolutionList as $resolutionType => $resolution):?> - - - - - - - - -
bug->openedBy;?>bug->unResolved;?>report->validRate;?>report->total;?>
-
-
-
- +config->edition != 'open'):?> + + +
+ +
+
+
+
+
+ report->bugOpenedDate;?> +
+ report->to;?> +
+
+
+
+
+ report->product;?> + +
+
+
+
+ execution->common;?> + +
+
+
+
+ +
+
+

error->noData;?>

+
+
+ +
+
+
+
+ +
+
+ + + + + + bug->resolutionList as $resolutionType => $resolution):?> + + + + + + + + + $bug):?> + + + + + bug->resolutionList as $resolutionType => $resolution):?> + + + + + + + + +
bug->openedBy;?>bug->unResolved;?>report->validRate;?>report->total;?>
+
+
+
+ +
+
+ diff --git a/module/report/view/productsummary.html.php b/module/report/view/productsummary.html.php index 13ad80079b..52e182bf8f 100644 --- a/module/report/view/productsummary.html.php +++ b/module/report/view/productsummary.html.php @@ -1,109 +1,114 @@ - config->edition != 'open'):?> -#mainContent > .side-col.col-lg{width: 235px} -.hide-sidebar #sidebar{width: 0 !important} + + - - -
-
-

error->noData;?>

+
+ -
- -
-
-
-
-
-
-
-
- /> - -
-
- /> - +
+ +
+
+

error->noData;?>

+
+
+ +
+
+
+
+
+
+
+
+ /> + +
+
+ /> + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + plans) ? count($product->plans) : 1;?> + + + plans)):?> + + plans as $plan):?> + + "?> + parent) and $plan->parent > 0 and isset($product->plans[$plan->parent])) ? ' child' : '';?> + + + + status['draft']) ? $plan->status['draft'] : 0; + $reviewingCount = isset($plan->status['reviewing']) ? $plan->status['reviewing'] : 0; + $activeCount = isset($plan->status['active']) ? $plan->status['active'] : 0; + $changedCount = isset($plan->status['changing']) ? $plan->status['changing'] : 0; + $closedCount = isset($plan->status['closed']) ? $plan->status['closed'] : 0; + ?> + + + + + + + "?> + + + + + + + + + + + + + + + + + + + +
product->name;?>report->PO;?>productplan->common;?>productplan->begin;?>productplan->end;?>story->statusList['draft'];?>story->statusList['reviewing'];?>story->statusList['active'];?>story->statusList['changing'];?>story->statusList['closed'];?>report->total;?>
" . html::a($this->createLink('product', 'view', "product=$product->id"), $product->name) . "

";?>
" . zget($users, $product->PO) . '

';?>
title;?>begin == '2030-01-01' ? $lang->productplan->future : $plan->begin;?>end == '2030-01-01' ? $lang->productplan->future : $plan->end;?>000000
- -
-
- - - - - - - - - - - - - - - - - - - - - plans) ? count($product->plans) : 1;?> - - - plans)):?> - - plans as $plan):?> - - "?> - parent) and $plan->parent > 0 and isset($product->plans[$plan->parent])) ? ' child' : '';?> - - - - status['draft']) ? $plan->status['draft'] : 0; - $reviewingCount = isset($plan->status['reviewing']) ? $plan->status['reviewing'] : 0; - $activeCount = isset($plan->status['active']) ? $plan->status['active'] : 0; - $changedCount = isset($plan->status['changing']) ? $plan->status['changing'] : 0; - $closedCount = isset($plan->status['closed']) ? $plan->status['closed'] : 0; - ?> - - - - - - - "?> - - - - - - - - - - - - - - - - - - - -
product->name;?>report->PO;?>productplan->common;?>productplan->begin;?>productplan->end;?>story->statusList['draft'];?>story->statusList['reviewing'];?>story->statusList['active'];?>story->statusList['changing'];?>story->statusList['closed'];?>report->total;?>
" . html::a($this->createLink('product', 'view', "product=$product->id"), $product->name) . "

";?>
" . zget($users, $product->PO) . '

';?>
title;?>begin == '2030-01-01' ? $lang->productplan->future : $plan->begin;?>end == '2030-01-01' ? $lang->productplan->future : $plan->end;?>000000
+
- - + diff --git a/module/report/view/projectdeviation.html.php b/module/report/view/projectdeviation.html.php index 78df99f523..04924161d5 100644 --- a/module/report/view/projectdeviation.html.php +++ b/module/report/view/projectdeviation.html.php @@ -1,160 +1,163 @@ - - -
-
-

error->noData;?>

-
-
- + - array(), 'data' => array());?> -
-
-
-
- report->execution . $lang->report->begin;?> -
-
-
-
-
- report->execution . $lang->report->end;?> -
-
-
-
-
-
-
-
-
- - - -
- -
-
- - - - - - - - - - - - - - $execution):?> - - - - - - - consumed - $execution->estimate, 2);?> - - - - - -
report->id;?>report->project;?>report->execution;?>report->estimate;?>report->consumed;?>report->deviation;?>report->deviationRate;?>
- name ? $execution->projectName : html::a($this->createLink('project', 'index', "projectID=$execution->projectID"), $execution->projectName);?> - - multiple):?> - name ? html::a($this->createLink('execution', 'view', "executionID=$id"), $execution->name) : '';?> - - null;?> - - estimate, 2);?>consumed, 2);?> - 0) - { - echo '' . $deviation; - } - else if($deviation < 0) - { - echo '' . abs($deviation); - } - else - { - echo '0'; - } - ?> - - estimate ? round($deviation / $execution->estimate * 100, 2) : 'n/a'; - if($num >= 50) - { - echo '' . $num . '%'; - } - elseif($num >= 30) - { - echo '' . $num . '%'; - } - elseif($num >= 10) - { - echo '' . $num . '%'; - } - elseif($num > 0) - { - echo '' . abs($num) . '%'; - } - elseif($num <= -20) - { - echo '' . abs($num) . '%'; - } - elseif($num < 0) - { - echo '' . abs($num) . '%'; - } - elseif($num == 'n/a') - { - echo '' . $num . ''; - } - else - { - echo '' . abs($num) . '%'; - } - - $chartData['labels'][] = $execution->name; - $chartData['data'][] = $deviation; - ?> -
-
-
-
- -
- 30) - { - $chartData['labels'] = array_slice($chartData['labels'], 0, 30); - $chartData['data'] = array_slice($chartData['data'], 0, 30); - } - ?> -
-
-
report->deviationChart?>
-
-
- -
-
-
+config->edition != 'open'):?> + + + array(), 'data' => array());?> +
+ +
+
+
+
+
+ report->execution . $lang->report->begin;?> +
+
+
+
+
+ report->execution . $lang->report->end;?> +
+
+
+
+
+ +
+
+

error->noData;?>

+
+
+ +
+
+
+
+ + + +
+ +
+
+ + + + + + + + + + + + + + $execution):?> + + + + + + + consumed - $execution->estimate, 2);?> + + + + + +
report->id;?>report->project;?>report->execution;?>report->estimate;?>report->consumed;?>report->deviation;?>report->deviationRate;?>
+ name ? $execution->projectName : html::a($this->createLink('project', 'index', "projectID=$execution->projectID"), $execution->projectName);?> + + multiple):?> + name ? html::a($this->createLink('execution', 'view', "executionID=$id"), $execution->name) : '';?> + + null;?> + + estimate, 2);?>consumed, 2);?> + 0) + { + echo '' . $deviation; + } + else if($deviation < 0) + { + echo '' . abs($deviation); + } + else + { + echo '0'; + } + ?> + + estimate ? round($deviation / $execution->estimate * 100, 2) : 'n/a'; + if($num >= 50) + { + echo '' . $num . '%'; + } + elseif($num >= 30) + { + echo '' . $num . '%'; + } + elseif($num >= 10) + { + echo '' . $num . '%'; + } + elseif($num > 0) + { + echo '' . abs($num) . '%'; + } + elseif($num <= -20) + { + echo '' . abs($num) . '%'; + } + elseif($num < 0) + { + echo '' . abs($num) . '%'; + } + elseif($num == 'n/a') + { + echo '' . $num . ''; + } + else + { + echo '' . abs($num) . '%'; + } + + $chartData['labels'][] = $execution->name; + $chartData['data'][] = $deviation; + ?> +
+
+ + +
+ 30) + { + $chartData['labels'] = array_slice($chartData['labels'], 0, 30); + $chartData['data'] = array_slice($chartData['data'], 0, 30); + } + ?> +
+
+
report->deviationChart?>
+
+
+ +
+
+
+ +
+
- + diff --git a/module/report/view/workload.html.php b/module/report/view/workload.html.php index f8529330bf..7574e45f7d 100644 --- a/module/report/view/workload.html.php +++ b/module/report/view/workload.html.php @@ -1,122 +1,127 @@ - + +config->edition != 'open'):?> + + + execution->weekend);?> -
- -
-
-
- report->dept;?> - -
-
-
-
- report->beginAndEnd;?> -
- report->to;?> -
-
-
-
-
- report->diffDays;?> - -
-
-
-
-
+
+ +
+
+ +
+
- report->workday;?> - + report->dept;?> +
-
- report->assign, $assign, "class='form-control' onchange='changeParams(this)'");?> +
+
+ report->beginAndEnd;?> +
+ report->to;?> +
+
-
- report->query, '', 'btn btn-primary btn-block');?> +
+
+ report->diffDays;?> + +
+
+
+
+
+ report->workday;?> + +
+
+
+ report->assign, $assign, "class='form-control' onchange='changeParams(this)'");?> +
+
+ report->query, '', 'btn btn-primary btn-block');?> +
+
+
+
+ +
+ +
+
+

error->noData;?>

+
+
+ +
+
+
+
+ +
+ +
+
+ + + + + + + + + + + + + + + $load):?> + + + + $info) foreach($info['execution'] as $executionName => $executionInfo) $userCount ++;?> + + $info):?> + + $executionInfo) $projectCount ++ ;?> + $executionInfo):?> + ";?> + + + + + + + + + + + + + + + + ";?> + + + + + + + +
report->user;?>report->project ;?> + report->execution;?>report->task;?>report->remain;?>report->taskTotal;?>report->manhourTotal;?>report->workloadAB;?>
createLink('project', 'view', "projectID={$info['projectID']}"), $projectName);?>createLink('execution', 'view', "executionID={$executionInfo['executionID']}"), $executionName);?>null;?>
- -
- -
-
-

error->noData;?>

+
- -
-
-
-
- -
- -
-
- - - - - - - - - - - - - - - $load):?> - - - - $info) foreach($info['execution'] as $executionName => $executionInfo) $userCount ++;?> - - $info):?> - - $executionInfo) $projectCount ++ ;?> - $executionInfo):?> - ";?> - - - - - - - - - - - - - - - - ";?> - - - - - - - -
report->user;?>report->project ;?> - report->execution;?>report->task;?>report->remain;?>report->taskTotal;?>report->manhourTotal;?>report->workloadAB;?>
createLink('project', 'view', "projectID={$info['projectID']}"), $projectName);?>createLink('execution', 'view', "executionID={$executionInfo['executionID']}"), $executionName);?>null;?>
-
-
-
- - + From a26a5c5860a6e8e3bfd5549a30ae310007918d02 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 27 Feb 2023 06:41:48 +0000 Subject: [PATCH 182/349] * Fix sql error. --- db/zentao.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/zentao.sql b/db/zentao.sql index afadd1b64f..39768146fa 100755 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -13889,7 +13889,7 @@ REPLACE INTO `zt_chart` (`id`, `name`, `dimension`, `type`, `group`, `dataset`, (1093,'年度排行-项目集-修复Bug条目榜',1,'bar',0,'','','{\"xaxis\":[{\"field\":\"program\",\"name\":\"项目集\"}],\"yaxis\":[{\"type\":\"value\",\"field\":\"bug\",\"agg\":\"value\",\"name\":\"修复Bug条目\",\"valOrAgg\":\"value\"}]}','','','SELECT \r\n YEAR(t3.closedDate) AS `year`,\r\n t1.id, \r\n t1.name AS program, \r\n COUNT(1) AS bug \r\nFROM \r\n zt_project AS t1 \r\n LEFT JOIN zt_product AS t2 ON t1.id = t2.program \r\n AND t2.deleted = \'0\' \r\n LEFT JOIN zt_bug AS t3 ON t2.id = t3.product \r\n AND t3.deleted = \'0\' \r\n AND t3.resolution = \'fixed\' \r\n AND t3.status = \'closed\' \r\nWHERE \r\n t1.deleted = \'0\' \r\n AND t1.type = \'program\' \r\n AND t1.grade = 1 \r\n AND t3.id IS NOT NULL \r\nGROUP BY \r\n `year`, \r\n id,\r\n program \r\nORDER BY \r\n `year`, \r\n bug DESC',1,'','','0000-00-00 00:00:00','','0000-00-00 00:00:00',0), (1094,'年度排行-项目-工期榜',1,'bar',0,'','','{\"xaxis\":[{\"field\":\"name\",\"name\":\"项目\"}],\"yaxis\":[{\"type\":\"value\",\"field\":\"duration\",\"agg\":\"value\",\"name\":\"工期\",\"valOrAgg\":\"value\"}]}','',NULL,'SELECT `year`, id,name,status,realBegan,realEnd,IF(status = \'closed\', DATEDIFF(realEnd, realBegan), DATEDIFF(NOW(),realBegan)) as duration\r\nFROM (SELECT DISTINCT YEAR(`date`) as \'year\' FROM zt_action) AS t1\r\nLEFT JOIN zt_project AS t2 ON 1 = 1 WHERE deleted = \'0\' AND type = \'project\' AND YEAR(realBegan) <= `year` AND LEFT(realBegan, 4) != \'0000\' AND (status =\'doing\' OR (status = \'suspended\' AND YEAR(suspendedDate) >= `year`) OR (status = \'closed\' AND YEAR(realEnd) >= `year`)) HAVING 1=1 ORDER BY `year`, duration desc',1,'','','0000-00-00 00:00:00','','0000-00-00 00:00:00',0), (1096,'年度排行-项目-工期偏差榜',1,'bar',0,'','','{\"xaxis\":[{\"field\":\"name\",\"name\":\"项目\"}],\"yaxis\":[{\"type\":\"value\",\"field\":\"duration\",\"agg\":\"value\",\"name\":\"工期\",\"valOrAgg\":\"value\"}]}','',NULL,'SELECT `year`, id,name,status,`begin`,`end`,realBegan,realEnd,\nROUND((IF(LEFT(realEnd,4) != \'0000\', DATEDIFF(realEnd, realBegan), DATEDIFF(NOW(),realBegan)) - DATEDIFF(`end`, `begin`)) / DATEDIFF(`end`,`begin`) * 100) as duration\nFROM (SELECT DISTINCT YEAR(`date`) as \'year\' FROM zt_action) AS t1\nLEFT JOIN zt_project AS t2 ON 1 = 1 \nWHERE deleted = \'0\' AND type = \'project\'\nAND YEAR(realBegan) <= `year` AND LEFT(realBegan, 4) != \'0000\'\nAND (YEAR(realEnd) >= `year` OR LEFT(realEnd, 4) = \'0000\') AND YEAR(`end`) != \'2059\'\nHAVING 1=1\nORDER BY duration ASC',1,'','','0000-00-00 00:00:00','','0000-00-00 00:00:00',0), -(1097,'年度排行-项目-人员投入榜',1,'bar',0,'','','{\"xaxis\":[{\"field\":\"name\",\"name\":\"项目\"}],\"yaxis\":[{\"type\":\"value\",\"field\":\"number\",\"agg\":\"value\",\"name\":\"人数\",\"valOrAgg\":\"value\"}]}','','','SELECT tt.join as `year`, count(1) as number, tt.name from (\r\nselect \r\nt2.name, YEAR(t1.join) as `join`\r\nfrom zt_team t1 \r\nRIGHT JOIN zt_project t2 on t2.id = t1.root\r\nRIGHT JOIN zt_user t3 on t3.account = t1.account\r\nWHERE t1.type = \'project\'\r\nAND t2.deleted = \'0\'\r\n) tt\r\nGROUP BY tt.`name`, tt.join\r\nORDER BY tt.join, number desc, tt.name',1,'','','0000-00-00 00:00:00','','0000-00-00 00:00:00',0); +(1097,'年度排行-项目-人员投入榜',1,'bar',0,'','','{\"xaxis\":[{\"field\":\"name\",\"name\":\"项目\"}],\"yaxis\":[{\"type\":\"value\",\"field\":\"number\",\"agg\":\"value\",\"name\":\"人数\",\"valOrAgg\":\"value\"}]}','','','SELECT tt.join as `year`, count(1) as number, tt.name from (\r\nselect \r\nt2.name, YEAR(t1.join) as `join`\r\nfrom zt_team t1 \r\nRIGHT JOIN zt_project t2 on t2.id = t1.root\r\nRIGHT JOIN zt_user t3 on t3.account = t1.account\r\nWHERE t1.type = \'project\'\r\nAND t2.deleted = \'0\'\r\n) tt\r\nGROUP BY tt.`name`, tt.join\r\nORDER BY tt.join, number desc, tt.name',1,'','','0000-00-00 00:00:00','','0000-00-00 00:00:00',0), (1098,'年度排行-项目-工时消耗榜',1,'bar',0,'','','{\"xaxis\":[{\"field\":\"project\",\"name\":\"项目\"}],\"yaxis\":[{\"type\":\"value\",\"field\":\"consumed\",\"agg\":\"value\",\"name\":\"消耗工时\",\"valOrAgg\":\"value\"}]}','',NULL,'SELECT \r\n YEAR(t4.date) AS `year`,\r\n t1.id, \r\n t1.name AS project, \r\n ROUND(\r\n SUM(t4.consumed), \r\n 2\r\n ) AS consumed \r\nFROM \r\n zt_project AS t1 \r\n LEFT JOIN zt_project AS t2 ON t1.id = t2.parent \r\n AND t2.deleted = \'0\' \r\n AND t2.type IN (\'sprint\', \'stage\', \'kanban\') \r\n LEFT JOIN zt_task AS t3 ON t2.id = t3.execution \r\n AND t3.deleted = \'0\' \r\n AND t3.status != \'cancel\' \r\n LEFT JOIN zt_effort AS t4 ON t3.id = t4.objectID \r\n AND t4.deleted = \'0\' \r\n AND t4.objectType = \'task\' \r\nWHERE \r\n t1.deleted = \'0\' \r\n AND t1.type = \'project\' \r\n AND t4.id IS NOT NULL \r\nGROUP BY \r\n `year`, \r\n id,\r\n project \r\nORDER BY \r\n `year`, \r\n consumed DESC',1,'','','0000-00-00 00:00:00','','0000-00-00 00:00:00',0), (1099,'年度排行-项目-完成需求条目榜',1,'bar',0,'','','{\"xaxis\":[{\"field\":\"project\",\"name\":\"项目\"}],\"yaxis\":[{\"type\":\"value\",\"field\":\"story\",\"agg\":\"value\",\"name\":\"完成需求条目\",\"valOrAgg\":\"value\"}]}','',NULL,'SELECT \r\n YEAR(t1.closedDate) AS `year`, \r\n t1.id, \r\n t1.project, \r\n COUNT(1) AS story \r\nFROM \r\n (\r\n SELECT \r\n DISTINCT t1.id, \r\n t1.name AS project, \r\n t4.id AS story, \r\n t4.closedDate \r\n FROM \r\n zt_project AS t1 \r\n LEFT JOIN zt_project AS t2 ON t1.id = t2.parent \r\n AND t2.deleted = \'0\' \r\n AND t2.type IN (\'sprint\', \'stage\', \'kanban\') \r\n LEFT JOIN zt_projectstory AS t3 ON t2.id = t3.project \r\n LEFT JOIN zt_story AS t4 ON t3.story = t4.id \r\n AND t4.deleted = \'0\' \r\n AND t4.closedReason = \'done\' \r\n WHERE \r\n t1.deleted = \'0\' \r\n AND t1.type = \'project\' \r\n AND t4.id IS NOT NULL\r\n ) AS t1 \r\nGROUP BY \r\n `year`, \r\n id, \r\n project \r\nORDER BY \r\n `year`, \r\n story DESC',1,'','','0000-00-00 00:00:00','','0000-00-00 00:00:00',0), (1100,'年度排行-项目-完成需求规模榜',1,'bar',0,'','','{\"xaxis\":[{\"field\":\"project\",\"name\":\"项目\"}],\"yaxis\":[{\"type\":\"value\",\"field\":\"story\",\"agg\":\"value\",\"name\":\"完成需求规模\",\"valOrAgg\":\"value\"}]}','',NULL,'SELECT \r\n YEAR(t1.closedDate) AS `year`, \r\n t1.id, \r\n t1.project, \r\n ROUND(\r\n SUM(t1.estimate), \r\n 2\r\n ) AS story \r\nFROM \r\n (\r\n SELECT \r\n DISTINCT t1.id, \r\n t1.name AS project, \r\n t4.id AS story, \r\n t4.estimate, \r\n t4.closedDate \r\n FROM \r\n zt_project AS t1 \r\n LEFT JOIN zt_project AS t2 ON t1.id = t2.parent \r\n AND t2.deleted = \'0\' \r\n AND t2.type IN (\'sprint\', \'stage\', \'kanban\') \r\n LEFT JOIN zt_projectstory AS t3 ON t2.id = t3.project \r\n LEFT JOIN zt_story AS t4 ON t3.story = t4.id \r\n AND t4.deleted = \'0\' \r\n AND t4.closedReason = \'done\' \r\n WHERE \r\n t1.deleted = \'0\' \r\n AND t1.type = \'project\' \r\n AND t4.id IS NOT NULL\r\n ) AS t1 \r\nGROUP BY \r\n `year`, \r\n id, \r\n project \r\nORDER BY \r\n `year`, \r\n story DESC',1,'','','0000-00-00 00:00:00','','0000-00-00 00:00:00',0), From 42769d3425d40175fc29761902393c657b67e7f7 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Mon, 27 Feb 2023 06:51:34 +0000 Subject: [PATCH 183/349] * Add the new version. --- VERSION | 2 +- config/config.php | 2 +- db/standard/zentao18.2.sql | 3648 +++++++++++++++++++++++++++++++ doc/CHANGELOG | 133 ++ module/misc/lang/de.php | 4 + module/misc/lang/en.php | 4 + module/misc/lang/fr.php | 4 + module/misc/lang/zh-cn.php | 2 + module/upgrade/config.php | 6 +- module/upgrade/lang/version.php | 9 +- module/upgrade/model.php | 4 +- 11 files changed, 3810 insertions(+), 8 deletions(-) create mode 100644 db/standard/zentao18.2.sql diff --git a/VERSION b/VERSION index 9dc4015447..da1c69f02e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -18.1 \ No newline at end of file +18.2 \ No newline at end of file diff --git a/config/config.php b/config/config.php index 818e72dde7..7cf341e405 100644 --- a/config/config.php +++ b/config/config.php @@ -16,7 +16,7 @@ if(!class_exists('config')){class config{}} if(!function_exists('getWebRoot')){function getWebRoot(){}} /* 基本设置。Basic settings. */ -$config->version = '18.1'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it. +$config->version = '18.2'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it. $config->liteVersion = '1.2'; // 迅捷版版本。 The version of Lite. $config->charset = 'UTF-8'; // ZenTaoPHP的编码。 The encoding of ZenTaoPHP. $config->cookieLife = time() + 2592000; // Cookie的生存时间。The cookie life time. diff --git a/db/standard/zentao18.2.sql b/db/standard/zentao18.2.sql new file mode 100644 index 0000000000..20609e75eb --- /dev/null +++ b/db/standard/zentao18.2.sql @@ -0,0 +1,3648 @@ +CREATE TABLE `zt_account` ( + `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `type` varchar(255) NOT NULL, + `provider` varchar(255) NOT NULL, + `adminURI` varchar(255) NOT NULL, + `account` varchar(255) NOT NULL, + `password` varchar(255) NOT NULL, + `email` varchar(255) NOT NULL, + `mobile` varchar(255) NOT NULL, + `extra` text NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `status` varchar(30) NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `name` (`name`), + KEY `provider` (`provider`), + KEY `status` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_acl` ( + `id` mediumint(9) NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `objectType` char(30) NOT NULL, + `objectID` mediumint(9) NOT NULL DEFAULT '0', + `type` char(40) NOT NULL DEFAULT 'whitelist', + `source` char(30) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_action` ( + `id` int(9) unsigned NOT NULL AUTO_INCREMENT, + `objectType` varchar(30) NOT NULL DEFAULT '', + `objectID` mediumint(8) unsigned NOT NULL DEFAULT '0', + `product` text NOT NULL, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `actor` varchar(100) NOT NULL DEFAULT '', + `action` varchar(80) NOT NULL DEFAULT '', + `date` datetime NOT NULL, + `comment` text NOT NULL, + `extra` text, + `read` enum('0','1') NOT NULL DEFAULT '0', + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `efforted` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `date` (`date`), + KEY `actor` (`actor`), + KEY `project` (`project`), + KEY `action` (`action`), + KEY `objectID` (`objectID`) +) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_activity` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `process` mediumint(9) NOT NULL, + `name` varchar(255) NOT NULL, + `optional` varchar(255) NOT NULL, + `tailorNorm` varchar(255) NOT NULL, + `content` mediumtext NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `order` mediumint(8) DEFAULT '0', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=90 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_api` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `product` varchar(255) NOT NULL DEFAULT '', + `lib` int(10) unsigned NOT NULL DEFAULT '0', + `module` int(10) unsigned NOT NULL DEFAULT '0', + `title` varchar(100) NOT NULL DEFAULT '', + `path` varchar(255) NOT NULL DEFAULT '', + `protocol` varchar(10) NOT NULL DEFAULT '', + `method` varchar(10) NOT NULL DEFAULT '', + `requestType` varchar(100) NOT NULL DEFAULT '', + `responseType` varchar(100) NOT NULL DEFAULT '', + `status` varchar(20) NOT NULL DEFAULT '', + `owner` varchar(30) NOT NULL DEFAULT '0', + `desc` mediumtext, + `version` smallint(5) unsigned NOT NULL DEFAULT '0', + `params` text, + `paramsExample` text, + `responseExample` text, + `response` text, + `commonParams` text, + `addedBy` varchar(30) NOT NULL DEFAULT '0', + `addedDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL DEFAULT '0', + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_api_lib_release` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `lib` int(10) unsigned NOT NULL DEFAULT '0', + `desc` varchar(255) NOT NULL DEFAULT '', + `version` varchar(255) NOT NULL DEFAULT '', + `snap` mediumtext NOT NULL, + `addedBy` varchar(30) NOT NULL DEFAULT '0', + `addedDate` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_apispec` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `doc` int(10) unsigned NOT NULL DEFAULT '0', + `module` int(10) unsigned NOT NULL DEFAULT '0', + `title` varchar(100) NOT NULL DEFAULT '', + `path` varchar(255) NOT NULL DEFAULT '', + `protocol` varchar(10) NOT NULL DEFAULT '', + `method` varchar(10) NOT NULL DEFAULT '', + `requestType` varchar(100) NOT NULL DEFAULT '', + `responseType` varchar(100) NOT NULL DEFAULT '', + `status` varchar(20) NOT NULL DEFAULT '', + `owner` varchar(255) NOT NULL DEFAULT '0', + `desc` mediumtext, + `version` smallint(5) unsigned NOT NULL DEFAULT '0', + `params` text, + `paramsExample` text, + `responseExample` text, + `response` text, + `addedBy` varchar(30) NOT NULL DEFAULT '0', + `addedDate` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=176 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_apistruct` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `lib` int(10) unsigned NOT NULL DEFAULT '0', + `name` varchar(30) NOT NULL DEFAULT '', + `type` varchar(50) NOT NULL DEFAULT '', + `desc` mediumtext NOT NULL, + `version` smallint(5) unsigned NOT NULL DEFAULT '0', + `attribute` text, + `addedBy` varchar(30) NOT NULL DEFAULT '0', + `addedDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL DEFAULT '0', + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_apistruct_spec` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL DEFAULT '', + `type` varchar(50) NOT NULL DEFAULT '', + `desc` varchar(255) NOT NULL DEFAULT '', + `attribute` text, + `version` smallint(5) unsigned NOT NULL DEFAULT '0', + `addedBy` varchar(30) NOT NULL DEFAULT '0', + `addedDate` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_approval` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `flow` mediumint(8) NOT NULL, + `objectType` varchar(30) NOT NULL, + `objectID` mediumint(9) NOT NULL, + `nodes` mediumtext NOT NULL, + `version` mediumint(9) NOT NULL, + `status` varchar(20) NOT NULL DEFAULT 'doing', + `result` varchar(20) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_approvalflow` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `code` varchar(100) NOT NULL, + `desc` mediumtext NOT NULL, + `version` mediumint(8) NOT NULL DEFAULT '1', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `type` varchar(30) NOT NULL, + `deleted` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_approvalflowobject` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `root` int(8) NOT NULL, + `flow` int(8) NOT NULL, + `objectType` char(30) NOT NULL, + `objectID` mediumint(9) NOT NULL, + `extra` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_approvalflowspec` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `flow` mediumint(8) NOT NULL, + `version` mediumint(8) NOT NULL, + `nodes` mediumtext NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_approvalnode` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `approval` mediumint(8) NOT NULL, + `type` enum('review','cc') NOT NULL, + `title` varchar(255) NOT NULL, + `account` char(30) NOT NULL, + `node` varchar(100) NOT NULL, + `reviewType` varchar(100) NOT NULL DEFAULT 'manual', + `multipleType` enum('and','or') NOT NULL DEFAULT 'and', + `prev` mediumtext NOT NULL, + `next` mediumtext NOT NULL, + `status` varchar(20) NOT NULL DEFAULT 'wait', + `result` varchar(10) NOT NULL, + `date` date NOT NULL, + `opinion` mediumtext NOT NULL, + `extra` mediumtext NOT NULL, + `reviewedBy` char(30) NOT NULL, + `reviewedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `idx_reviewed_date` (`reviewedDate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_approvalobject` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `approval` int(8) NOT NULL, + `objectType` char(30) NOT NULL, + `objectID` mediumint(8) NOT NULL, + `extra` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_approvalrole` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `code` char(30) NOT NULL, + `name` varchar(255) NOT NULL, + `desc` text NOT NULL, + `users` longtext NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_assetlib` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `type` varchar(255) NOT NULL, + `desc` mediumtext NOT NULL, + `order` smallint(5) unsigned NOT NULL DEFAULT '0', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_attend` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `date` date NOT NULL, + `signIn` time NOT NULL, + `signOut` time NOT NULL, + `status` varchar(30) NOT NULL DEFAULT '', + `ip` varchar(15) NOT NULL, + `device` varchar(30) NOT NULL, + `client` varchar(20) NOT NULL, + `manualIn` time NOT NULL, + `manualOut` time NOT NULL, + `reason` varchar(30) NOT NULL DEFAULT '', + `desc` text NOT NULL, + `reviewStatus` varchar(30) NOT NULL DEFAULT '', + `reviewedBy` char(30) NOT NULL, + `reviewedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `attend` (`date`,`account`), + KEY `account` (`account`), + KEY `date` (`date`), + KEY `status` (`status`), + KEY `reason` (`reason`), + KEY `reviewStatus` (`reviewStatus`), + KEY `reviewedBy` (`reviewedBy`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_attendstat` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `month` char(10) NOT NULL DEFAULT '', + `normal` decimal(12,2) NOT NULL DEFAULT '0.00', + `late` decimal(12,2) NOT NULL DEFAULT '0.00', + `early` decimal(12,2) NOT NULL DEFAULT '0.00', + `absent` decimal(12,2) NOT NULL DEFAULT '0.00', + `trip` decimal(12,2) NOT NULL DEFAULT '0.00', + `egress` decimal(12,2) NOT NULL DEFAULT '0.00', + `lieu` decimal(12,2) NOT NULL DEFAULT '0.00', + `paidLeave` decimal(12,2) NOT NULL DEFAULT '0.00', + `unpaidLeave` decimal(12,2) NOT NULL DEFAULT '0.00', + `timeOvertime` decimal(12,2) NOT NULL DEFAULT '0.00', + `restOvertime` decimal(12,2) NOT NULL DEFAULT '0.00', + `holidayOvertime` decimal(12,2) NOT NULL DEFAULT '0.00', + `deserve` decimal(12,2) NOT NULL DEFAULT '0.00', + `actual` decimal(12,2) NOT NULL DEFAULT '0.00', + `status` char(30) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + UNIQUE KEY `attend` (`month`,`account`), + KEY `account` (`account`), + KEY `month` (`month`), + KEY `status` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_auditcl` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `model` char(30) NOT NULL DEFAULT 'waterfall', + `practiceArea` char(30) NOT NULL, + `type` char(30) NOT NULL, + `title` varchar(255) NOT NULL, + `objectType` char(30) NOT NULL, + `objectID` int(10) DEFAULT NULL, + `assignedTo` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_auditplan` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `dateType` char(30) DEFAULT NULL, + `config` text, + `objectID` mediumint(9) NOT NULL, + `objectType` char(30) NOT NULL, + `process` mediumint(9) NOT NULL, + `processType` char(30) NOT NULL, + `checkDate` date NOT NULL, + `checkedBy` varchar(30) NOT NULL, + `realCheckDate` date NOT NULL, + `result` char(30) NOT NULL, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + `checkBy` varchar(30) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_auditresult` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `auditplan` mediumint(8) NOT NULL, + `listID` mediumint(8) NOT NULL, + `result` char(30) NOT NULL, + `checkedBy` varchar(30) NOT NULL, + `checkedDate` date NOT NULL, + `comment` text NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_automation` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `node` int(11) unsigned NOT NULL DEFAULT '0', + `product` int(11) unsigned NOT NULL DEFAULT '0', + `scriptPath` varchar(255) NOT NULL DEFAULT '', + `shell` mediumtext NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_basicmeas` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `purpose` varchar(50) NOT NULL, + `scope` char(30) NOT NULL, + `object` char(30) NOT NULL, + `name` varchar(90) NOT NULL, + `code` char(30) NOT NULL, + `unit` varchar(10) NOT NULL, + `configure` text, + `params` text, + `definition` text, + `source` varchar(255) DEFAULT NULL, + `collectType` varchar(30) NOT NULL, + `collectConf` text NOT NULL, + `execTime` varchar(30) NOT NULL, + `collectedBy` varchar(10) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `order` mediumint(8) unsigned NOT NULL DEFAULT '0', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) +) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_block` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `module` varchar(20) NOT NULL, + `type` char(30) NOT NULL, + `title` varchar(100) NOT NULL, + `source` varchar(20) NOT NULL, + `block` varchar(30) NOT NULL, + `params` text NOT NULL, + `order` tinyint(3) unsigned NOT NULL DEFAULT '0', + `grid` tinyint(3) unsigned NOT NULL DEFAULT '0', + `height` smallint(5) unsigned NOT NULL DEFAULT '0', + `hidden` tinyint(1) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `account_vision_module_type_order` (`account`,`vision`,`module`,`type`,`order`), + KEY `account` (`account`) +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_branch` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `product` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `default` enum('0','1') NOT NULL DEFAULT '0', + `status` enum('active','closed') NOT NULL DEFAULT 'active', + `desc` varchar(255) NOT NULL, + `createdDate` date NOT NULL, + `closedDate` date NOT NULL, + `order` smallint(5) unsigned NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_budget` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `stage` char(30) NOT NULL, + `subject` mediumint(8) NOT NULL, + `amount` char(30) NOT NULL, + `name` varchar(255) NOT NULL, + `desc` mediumtext NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `lastEditedBy` char(30) NOT NULL, + `lastEditedDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_bug` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL DEFAULT '0', + `injection` mediumint(8) unsigned NOT NULL, + `identify` mediumint(8) unsigned NOT NULL, + `branch` mediumint(8) unsigned NOT NULL DEFAULT '0', + `module` mediumint(8) unsigned NOT NULL DEFAULT '0', + `execution` mediumint(8) unsigned NOT NULL DEFAULT '0', + `plan` mediumint(8) unsigned NOT NULL DEFAULT '0', + `story` mediumint(8) unsigned NOT NULL DEFAULT '0', + `storyVersion` smallint(6) NOT NULL DEFAULT '1', + `task` mediumint(8) unsigned NOT NULL DEFAULT '0', + `toTask` mediumint(8) unsigned NOT NULL DEFAULT '0', + `toStory` mediumint(8) NOT NULL DEFAULT '0', + `title` varchar(255) NOT NULL, + `keywords` varchar(255) NOT NULL, + `severity` tinyint(4) NOT NULL DEFAULT '0', + `pri` tinyint(3) unsigned NOT NULL, + `type` varchar(30) NOT NULL DEFAULT '', + `os` varchar(255) NOT NULL DEFAULT '', + `browser` varchar(255) NOT NULL DEFAULT '', + `hardware` varchar(30) NOT NULL, + `found` varchar(30) NOT NULL DEFAULT '', + `steps` mediumtext NOT NULL, + `status` enum('active','resolved','closed') NOT NULL DEFAULT 'active', + `subStatus` varchar(30) NOT NULL DEFAULT '', + `color` char(7) NOT NULL, + `confirmed` tinyint(1) NOT NULL DEFAULT '0', + `activatedCount` smallint(6) NOT NULL, + `activatedDate` datetime NOT NULL, + `feedbackBy` varchar(100) NOT NULL, + `notifyEmail` varchar(100) NOT NULL, + `mailto` text, + `openedBy` varchar(30) NOT NULL DEFAULT '', + `openedDate` datetime NOT NULL, + `openedBuild` varchar(255) NOT NULL, + `assignedTo` varchar(30) NOT NULL DEFAULT '', + `assignedDate` datetime NOT NULL, + `deadline` date NOT NULL, + `resolvedBy` varchar(30) NOT NULL DEFAULT '', + `resolution` varchar(30) NOT NULL DEFAULT '', + `resolvedBuild` varchar(30) NOT NULL DEFAULT '', + `resolvedDate` datetime NOT NULL, + `closedBy` varchar(30) NOT NULL DEFAULT '', + `closedDate` datetime NOT NULL, + `duplicateBug` mediumint(8) unsigned NOT NULL, + `linkBug` varchar(255) NOT NULL, + `case` mediumint(8) unsigned NOT NULL, + `caseVersion` smallint(6) NOT NULL DEFAULT '1', + `feedback` mediumint(8) unsigned NOT NULL DEFAULT '0', + `result` mediumint(8) unsigned NOT NULL, + `repo` mediumint(8) unsigned NOT NULL, + `mr` mediumint(8) unsigned NOT NULL, + `entry` text NOT NULL, + `lines` varchar(10) NOT NULL, + `v1` varchar(40) NOT NULL, + `v2` varchar(40) NOT NULL, + `repoType` varchar(30) NOT NULL DEFAULT '', + `issueKey` varchar(50) NOT NULL DEFAULT '', + `testtask` mediumint(8) unsigned NOT NULL, + `lastEditedBy` varchar(30) NOT NULL DEFAULT '', + `lastEditedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `execution` (`execution`), + KEY `status` (`status`), + KEY `plan` (`plan`), + KEY `story` (`story`), + KEY `case` (`case`), + KEY `toStory` (`toStory`), + KEY `result` (`result`), + KEY `assignedTo` (`assignedTo`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_build` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL DEFAULT '0', + `branch` varchar(255) NOT NULL DEFAULT '0', + `execution` mediumint(8) unsigned NOT NULL DEFAULT '0', + `builds` varchar(255) NOT NULL, + `name` char(150) NOT NULL, + `scmPath` char(255) NOT NULL, + `filePath` char(255) NOT NULL, + `date` date NOT NULL, + `stories` text NOT NULL, + `bugs` text NOT NULL, + `builder` char(30) NOT NULL DEFAULT '', + `desc` mediumtext NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `execution` (`execution`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_burn` ( + `execution` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `task` mediumint(8) unsigned NOT NULL DEFAULT '0', + `date` date NOT NULL, + `estimate` float NOT NULL, + `left` float NOT NULL, + `consumed` float NOT NULL, + `storyPoint` float NOT NULL, + PRIMARY KEY (`execution`,`date`,`task`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_case` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL DEFAULT '0', + `execution` mediumint(8) unsigned NOT NULL, + `branch` mediumint(8) unsigned NOT NULL DEFAULT '0', + `lib` mediumint(8) unsigned NOT NULL DEFAULT '0', + `module` mediumint(8) unsigned NOT NULL DEFAULT '0', + `path` mediumint(8) unsigned NOT NULL DEFAULT '0', + `story` mediumint(30) unsigned NOT NULL DEFAULT '0', + `storyVersion` smallint(6) NOT NULL DEFAULT '1', + `title` varchar(255) NOT NULL, + `precondition` text NOT NULL, + `keywords` varchar(255) NOT NULL, + `pri` tinyint(3) unsigned NOT NULL DEFAULT '3', + `type` char(30) NOT NULL DEFAULT '1', + `auto` varchar(10) NOT NULL DEFAULT 'no', + `frame` varchar(10) NOT NULL, + `stage` varchar(255) NOT NULL, + `howRun` varchar(30) NOT NULL, + `script` longtext NOT NULL, + `scriptedBy` varchar(30) NOT NULL, + `scriptedDate` date NOT NULL, + `scriptStatus` varchar(30) NOT NULL, + `scriptLocation` varchar(255) NOT NULL, + `status` char(30) NOT NULL DEFAULT '1', + `subStatus` varchar(30) NOT NULL DEFAULT '', + `color` char(7) NOT NULL, + `frequency` enum('1','2','3') NOT NULL DEFAULT '1', + `order` tinyint(30) unsigned NOT NULL DEFAULT '0', + `openedBy` char(30) NOT NULL DEFAULT '', + `openedDate` datetime NOT NULL, + `reviewedBy` varchar(255) NOT NULL, + `reviewedDate` date NOT NULL, + `lastEditedBy` char(30) NOT NULL DEFAULT '', + `lastEditedDate` datetime NOT NULL, + `version` tinyint(3) unsigned NOT NULL DEFAULT '0', + `linkCase` varchar(255) NOT NULL, + `fromBug` mediumint(8) unsigned NOT NULL, + `fromCaseID` mediumint(8) unsigned NOT NULL, + `fromCaseVersion` mediumint(8) unsigned NOT NULL DEFAULT '1', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + `lastRunner` varchar(30) NOT NULL, + `lastRunDate` datetime NOT NULL, + `lastRunResult` char(30) NOT NULL, + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `story` (`story`), + KEY `fromBug` (`fromBug`), + KEY `module` (`module`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_casestep` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `parent` mediumint(8) unsigned NOT NULL DEFAULT '0', + `case` mediumint(8) unsigned NOT NULL DEFAULT '0', + `version` smallint(3) unsigned NOT NULL DEFAULT '0', + `type` varchar(10) NOT NULL DEFAULT 'step', + `desc` text NOT NULL, + `expect` text NOT NULL, + PRIMARY KEY (`id`), + KEY `case` (`case`), + KEY `version` (`version`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_cfd` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `execution` int(8) NOT NULL, + `type` char(30) NOT NULL, + `name` char(30) NOT NULL, + `count` smallint(6) NOT NULL, + `date` date NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `execution_type_name_date` (`execution`,`type`,`name`,`date`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_chart` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `dimension` mediumint(8) unsigned NOT NULL DEFAULT '0', + `type` varchar(30) NOT NULL, + `group` mediumint(8) unsigned NOT NULL DEFAULT '0', + `dataset` varchar(30) NOT NULL, + `desc` text NOT NULL, + `settings` mediumtext NOT NULL, + `filters` mediumtext NOT NULL, + `fields` mediumtext, + `sql` mediumtext, + `builtin` tinyint(1) unsigned NOT NULL, + `objects` mediumtext NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_cmcl` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` char(30) NOT NULL, + `projectType` varchar(255) NOT NULL DEFAULT '', + `title` int(11) NOT NULL, + `contents` text NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `order` int(11) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_company` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` char(120) DEFAULT NULL, + `phone` char(20) DEFAULT NULL, + `fax` char(20) DEFAULT NULL, + `address` char(120) DEFAULT NULL, + `zipcode` char(10) DEFAULT NULL, + `website` char(120) DEFAULT NULL, + `backyard` char(120) DEFAULT NULL, + `guest` enum('1','0') NOT NULL DEFAULT '0', + `admins` char(255) DEFAULT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_compile` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(50) NOT NULL, + `job` mediumint(8) unsigned NOT NULL, + `queue` mediumint(8) NOT NULL, + `status` varchar(255) NOT NULL, + `logs` text, + `atTime` varchar(10) NOT NULL, + `testtask` mediumint(8) unsigned NOT NULL, + `tag` varchar(255) NOT NULL, + `times` tinyint(3) unsigned NOT NULL DEFAULT '0', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `updateDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_config` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `owner` char(30) NOT NULL DEFAULT '', + `module` varchar(30) NOT NULL, + `section` char(30) NOT NULL DEFAULT '', + `key` char(30) NOT NULL DEFAULT '', + `value` longtext NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique` (`vision`,`owner`,`module`,`section`,`key`) +) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_cron` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `m` varchar(20) NOT NULL, + `h` varchar(20) NOT NULL, + `dom` varchar(20) NOT NULL, + `mon` varchar(20) NOT NULL, + `dow` varchar(20) NOT NULL, + `command` text NOT NULL, + `remark` varchar(255) NOT NULL, + `type` varchar(20) NOT NULL, + `buildin` tinyint(1) NOT NULL DEFAULT '0', + `status` varchar(20) NOT NULL, + `lastTime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `lastTime` (`lastTime`) +) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_dashboard` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `dimension` int(8) NOT NULL DEFAULT '0', + `module` mediumint(9) NOT NULL, + `desc` mediumtext NOT NULL, + `layout` mediumtext NOT NULL, + `filters` mediumtext NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_dataset` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(155) NOT NULL, + `sql` text NOT NULL, + `fields` mediumtext NOT NULL, + `objects` mediumtext NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_dataview` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `group` mediumint(8) unsigned NOT NULL, + `name` varchar(155) NOT NULL, + `code` varchar(50) NOT NULL, + `view` varchar(57) NOT NULL, + `sql` text NOT NULL, + `fields` mediumtext NOT NULL, + `objects` mediumtext NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_deploy` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `begin` datetime NOT NULL, + `end` datetime NOT NULL, + `name` varchar(255) NOT NULL, + `desc` mediumtext NOT NULL, + `status` varchar(20) NOT NULL, + `owner` char(30) NOT NULL, + `members` text NOT NULL, + `notify` text NOT NULL, + `cases` text NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `result` varchar(20) NOT NULL, + `deleted` enum('0','1') NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_deployproduct` ( + `deploy` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `release` mediumint(8) unsigned NOT NULL, + `package` varchar(255) NOT NULL, + UNIQUE KEY `deploy_product_release` (`deploy`,`product`,`release`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_deployscope` ( + `deploy` mediumint(8) unsigned NOT NULL, + `service` mediumint(8) unsigned NOT NULL, + `hosts` text NOT NULL, + `remove` text NOT NULL, + `add` text NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_deploystep` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `deploy` mediumint(8) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `begin` datetime NOT NULL, + `end` datetime NOT NULL, + `stage` varchar(30) NOT NULL, + `content` text NOT NULL, + `status` varchar(30) NOT NULL, + `assignedTo` char(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `finishedBy` char(30) NOT NULL, + `finishedDate` datetime NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_dept` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` char(60) NOT NULL, + `parent` mediumint(8) unsigned NOT NULL DEFAULT '0', + `path` char(255) NOT NULL DEFAULT '', + `grade` tinyint(3) unsigned NOT NULL DEFAULT '0', + `order` smallint(4) unsigned NOT NULL DEFAULT '0', + `position` char(30) NOT NULL DEFAULT '', + `function` char(255) NOT NULL DEFAULT '', + `manager` char(30) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + KEY `parent` (`parent`), + KEY `path` (`path`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_design` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` varchar(255) NOT NULL, + `product` varchar(255) NOT NULL, + `commit` text NOT NULL, + `commitedBy` varchar(30) NOT NULL, + `execution` mediumint(8) unsigned NOT NULL DEFAULT '0', + `name` varchar(255) NOT NULL, + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + `story` char(30) NOT NULL, + `desc` mediumtext NOT NULL, + `version` smallint(6) NOT NULL, + `type` char(30) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_designspec` ( + `design` mediumint(8) NOT NULL, + `version` smallint(6) NOT NULL, + `name` varchar(255) NOT NULL, + `desc` mediumtext NOT NULL, + `files` varchar(255) NOT NULL, + UNIQUE KEY `design` (`design`,`version`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_dimension` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(90) NOT NULL, + `code` varchar(45) NOT NULL, + `desc` text NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `code` (`code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_doc` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `lib` varchar(30) NOT NULL, + `template` varchar(30) NOT NULL, + `templateType` varchar(30) NOT NULL, + `chapterType` varchar(30) NOT NULL, + `module` varchar(30) NOT NULL, + `title` varchar(255) NOT NULL, + `keywords` varchar(255) NOT NULL, + `type` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `parent` smallint(5) unsigned NOT NULL DEFAULT '0', + `path` char(255) NOT NULL DEFAULT '', + `grade` tinyint(3) unsigned NOT NULL DEFAULT '0', + `order` smallint(5) unsigned NOT NULL DEFAULT '0', + `views` smallint(5) unsigned NOT NULL, + `assetLib` mediumint(8) unsigned NOT NULL DEFAULT '0', + `assetLibType` varchar(30) NOT NULL DEFAULT '', + `from` mediumint(8) unsigned NOT NULL DEFAULT '0', + `fromVersion` smallint(6) NOT NULL DEFAULT '1', + `draft` longtext NOT NULL, + `collector` text NOT NULL, + `addedBy` varchar(30) NOT NULL, + `addedDate` datetime NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `approvedDate` date NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `mailto` text, + `acl` varchar(10) NOT NULL DEFAULT 'open', + `groups` varchar(255) NOT NULL, + `users` text NOT NULL, + `version` smallint(5) unsigned NOT NULL DEFAULT '1', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `execution` (`execution`), + KEY `lib` (`lib`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_doccontent` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `doc` mediumint(8) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `digest` varchar(255) NOT NULL, + `content` longtext NOT NULL, + `files` text NOT NULL, + `type` varchar(10) NOT NULL, + `version` smallint(5) unsigned NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `doc_version` (`doc`,`version`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_doclib` ( + `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `type` varchar(30) NOT NULL, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `product` mediumint(8) unsigned NOT NULL, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `name` varchar(60) NOT NULL, + `baseUrl` varchar(255) NOT NULL DEFAULT '', + `acl` varchar(10) NOT NULL DEFAULT 'open', + `groups` varchar(255) NOT NULL, + `users` text NOT NULL, + `main` enum('0','1') NOT NULL DEFAULT '0', + `collector` text NOT NULL, + `desc` mediumtext NOT NULL, + `order` tinyint(5) unsigned NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `execution` (`execution`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_domain` ( + `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `domain` varchar(255) NOT NULL, + `adminURI` varchar(255) NOT NULL, + `resolverURI` varchar(255) NOT NULL, + `register` varchar(255) NOT NULL, + `expiredDate` datetime NOT NULL, + `renew` varchar(255) NOT NULL, + `account` varchar(255) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `domain` (`domain`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_durationestimation` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `stage` mediumint(9) NOT NULL, + `workload` varchar(255) NOT NULL, + `worktimeRate` varchar(255) NOT NULL, + `people` varchar(255) NOT NULL, + `startDate` date NOT NULL, + `endDate` date NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_effort` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `objectType` varchar(30) NOT NULL, + `objectID` mediumint(8) unsigned NOT NULL, + `product` text NOT NULL, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `account` varchar(30) NOT NULL, + `work` text, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `date` date NOT NULL, + `left` float NOT NULL, + `consumed` float NOT NULL, + `begin` smallint(4) unsigned zerofill NOT NULL, + `end` smallint(4) unsigned zerofill NOT NULL, + `extra` text NOT NULL, + `order` tinyint(3) unsigned NOT NULL DEFAULT '0', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `execution` (`execution`), + KEY `objectID` (`objectID`), + KEY `date` (`date`), + KEY `account` (`account`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_entry` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(50) NOT NULL, + `account` varchar(30) NOT NULL DEFAULT '', + `code` varchar(20) NOT NULL, + `key` varchar(32) NOT NULL, + `freePasswd` enum('0','1') NOT NULL DEFAULT '0', + `ip` varchar(100) NOT NULL, + `desc` mediumtext NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `calledTime` int(10) unsigned NOT NULL DEFAULT '0', + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_expect` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `userID` mediumint(8) NOT NULL, + `project` mediumint(8) NOT NULL DEFAULT '0', + `expect` text NOT NULL, + `progress` text NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_extension` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(150) NOT NULL, + `code` varchar(30) NOT NULL, + `version` varchar(50) NOT NULL, + `author` varchar(100) NOT NULL, + `desc` mediumtext NOT NULL, + `license` text NOT NULL, + `type` varchar(20) NOT NULL DEFAULT 'extension', + `site` varchar(150) NOT NULL, + `zentaoCompatible` varchar(100) NOT NULL, + `installedTime` datetime NOT NULL, + `depends` varchar(100) NOT NULL, + `dirs` mediumtext NOT NULL, + `files` mediumtext NOT NULL, + `status` varchar(20) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`), + KEY `name` (`name`), + KEY `installedTime` (`installedTime`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_faq` ( + `id` mediumint(9) NOT NULL AUTO_INCREMENT, + `module` mediumint(9) NOT NULL, + `product` mediumint(9) NOT NULL, + `question` varchar(255) NOT NULL, + `answer` text NOT NULL, + `addedtime` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_feedback` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `product` mediumint(8) unsigned NOT NULL, + `module` mediumint(8) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `type` char(30) NOT NULL, + `solution` char(30) NOT NULL, + `desc` text NOT NULL, + `pri` tinyint(3) unsigned NOT NULL DEFAULT '2', + `status` varchar(30) NOT NULL, + `subStatus` varchar(30) NOT NULL DEFAULT '', + `public` enum('0','1') NOT NULL DEFAULT '0', + `notify` enum('0','1') NOT NULL DEFAULT '0', + `notifyEmail` varchar(100) NOT NULL, + `source` varchar(255) NOT NULL, + `likes` text NOT NULL, + `result` mediumint(8) unsigned NOT NULL, + `faq` mediumint(8) unsigned NOT NULL, + `openedBy` char(30) NOT NULL, + `openedDate` datetime NOT NULL, + `reviewedBy` varchar(255) NOT NULL, + `reviewedDate` datetime NOT NULL, + `processedBy` char(30) NOT NULL, + `processedDate` datetime NOT NULL, + `closedBy` char(30) NOT NULL, + `closedDate` datetime NOT NULL, + `closedReason` varchar(30) NOT NULL, + `editedBy` char(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedTo` varchar(255) NOT NULL, + `assignedDate` datetime NOT NULL, + `activatedBy` varchar(30) NOT NULL, + `activatedDate` datetime NOT NULL, + `feedbackBy` varchar(100) NOT NULL, + `repeatFeedback` mediumint(8) NOT NULL DEFAULT '0', + `mailto` varchar(255) NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_feedbackview` ( + `account` char(30) NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + UNIQUE KEY `account_product` (`account`,`product`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_file` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `pathname` char(100) NOT NULL, + `title` varchar(255) NOT NULL, + `extension` char(30) NOT NULL, + `size` int(10) unsigned NOT NULL DEFAULT '0', + `objectType` char(30) NOT NULL, + `objectID` mediumint(9) NOT NULL, + `addedBy` char(30) NOT NULL DEFAULT '', + `addedDate` datetime NOT NULL, + `downloads` mediumint(8) unsigned NOT NULL DEFAULT '0', + `extra` varchar(255) NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `objectType` (`objectType`), + KEY `objectID` (`objectID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_gapanalysis` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `account` varchar(30) NOT NULL, + `role` varchar(20) NOT NULL, + `analysis` mediumtext NOT NULL, + `needTrain` enum('no','yes') NOT NULL DEFAULT 'no', + `createdBy` char(30) DEFAULT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `project_account` (`project`,`account`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_group` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL DEFAULT '0', + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `name` char(30) NOT NULL, + `role` char(30) NOT NULL DEFAULT '', + `desc` char(255) NOT NULL DEFAULT '', + `acl` text, + `developer` enum('0','1') NOT NULL DEFAULT '1', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_grouppriv` ( + `group` mediumint(8) unsigned NOT NULL DEFAULT '0', + `module` char(30) NOT NULL DEFAULT '', + `method` char(30) NOT NULL DEFAULT '', + UNIQUE KEY `group` (`group`,`module`,`method`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_history` ( + `id` int(9) unsigned NOT NULL AUTO_INCREMENT, + `action` mediumint(8) unsigned NOT NULL DEFAULT '0', + `field` varchar(30) NOT NULL DEFAULT '', + `old` text NOT NULL, + `new` text NOT NULL, + `diff` mediumtext NOT NULL, + PRIMARY KEY (`id`), + KEY `action` (`action`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_holiday` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(30) NOT NULL DEFAULT '', + `type` enum('holiday','working') NOT NULL DEFAULT 'holiday', + `desc` mediumtext NOT NULL, + `year` char(4) NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + PRIMARY KEY (`id`), + KEY `year` (`year`), + KEY `name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_host` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL DEFAULT '', + `type` varchar(30) NOT NULL DEFAULT 'normal', + `hostType` varchar(30) NOT NULL DEFAULT '', + `mac` varchar(128) NOT NULL, + `memory` varchar(30) NOT NULL, + `diskSize` varchar(30) NOT NULL, + `status` varchar(50) NOT NULL, + `secret` varchar(50) NOT NULL DEFAULT '', + `desc` text NOT NULL, + `tokenSN` varchar(50) NOT NULL DEFAULT '', + `tokenTime` datetime NOT NULL, + `oldTokenSN` varchar(50) NOT NULL DEFAULT '', + `vsoft` varchar(30) NOT NULL DEFAULT '', + `heartbeat` datetime NOT NULL, + `zap` varchar(10) NOT NULL, + `provider` varchar(255) NOT NULL DEFAULT '', + `vnc` int(11) NOT NULL, + `ztf` int(11) NOT NULL, + `zd` int(11) NOT NULL, + `ssh` int(11) NOT NULL, + `parent` int(11) unsigned NOT NULL DEFAULT '0', + `image` int(11) unsigned NOT NULL DEFAULT '0', + `admin` smallint(5) unsigned NOT NULL DEFAULT '0', + `serverRoom` mediumint(8) unsigned NOT NULL, + `serverModel` varchar(256) NOT NULL, + `hardwareType` varchar(64) NOT NULL, + `cpuBrand` varchar(128) NOT NULL, + `cpuModel` varchar(128) NOT NULL, + `cpuNumber` varchar(16) NOT NULL, + `cpuCores` varchar(30) NOT NULL, + `intranet` varchar(128) NOT NULL, + `extranet` varchar(128) NOT NULL, + `osName` varchar(64) NOT NULL, + `osVersion` varchar(64) NOT NULL, + `group` varchar(128) NOT NULL DEFAULT '', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_chat` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `gid` char(40) NOT NULL DEFAULT '', + `name` varchar(60) NOT NULL DEFAULT '', + `type` varchar(20) NOT NULL DEFAULT 'group', + `admins` varchar(255) NOT NULL DEFAULT '', + `committers` varchar(255) NOT NULL DEFAULT '', + `subject` mediumint(8) unsigned NOT NULL DEFAULT '0', + `public` enum('0','1') NOT NULL DEFAULT '0', + `createdBy` varchar(30) NOT NULL DEFAULT '', + `createdDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `ownedBy` varchar(30) NOT NULL DEFAULT '', + `editedBy` varchar(30) NOT NULL DEFAULT '', + `editedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `mergedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `lastActiveTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `lastMessage` int(11) unsigned NOT NULL DEFAULT '0', + `lastMessageIndex` int(11) unsigned NOT NULL DEFAULT '0', + `dismissDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `pinnedMessages` text NOT NULL, + `mergedChats` text NOT NULL, + `adminInvite` enum('0','1') NOT NULL DEFAULT '0', + `avatar` text NOT NULL, + `archiveDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `gid` (`gid`), + KEY `name` (`name`), + KEY `type` (`type`), + KEY `public` (`public`), + KEY `createdBy` (`createdBy`), + KEY `editedBy` (`editedBy`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_chat_message_index` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `gid` char(40) NOT NULL, + `tableName` char(64) NOT NULL, + `start` int(11) unsigned NOT NULL, + `end` int(11) unsigned NOT NULL, + `startIndex` int(11) unsigned NOT NULL, + `endIndex` int(11) unsigned NOT NULL, + `startDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `endDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `count` mediumint(8) unsigned NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `chattable` (`gid`,`tableName`), + KEY `start` (`start`), + KEY `end` (`end`), + KEY `startDate` (`startDate`), + KEY `endDate` (`endDate`), + KEY `chatstartindex` (`gid`,`startIndex`), + KEY `chatendindex` (`gid`,`endIndex`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_chatuser` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `cgid` char(40) NOT NULL DEFAULT '', + `user` mediumint(8) NOT NULL DEFAULT '0', + `order` smallint(5) NOT NULL DEFAULT '0', + `star` enum('0','1') NOT NULL DEFAULT '0', + `hide` enum('0','1') NOT NULL DEFAULT '0', + `mute` enum('0','1') NOT NULL DEFAULT '0', + `freeze` enum('0','1') NOT NULL DEFAULT '0', + `join` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `quit` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `category` varchar(40) NOT NULL DEFAULT '', + `lastReadMessage` int(11) unsigned NOT NULL DEFAULT '0', + `lastReadMessageIndex` int(11) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `chatuser` (`cgid`,`user`), + KEY `cgid` (`cgid`), + KEY `user` (`user`), + KEY `order` (`order`), + KEY `star` (`star`), + KEY `hide` (`hide`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_client` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `version` char(30) NOT NULL DEFAULT '', + `desc` varchar(100) NOT NULL DEFAULT '', + `changeLog` text NOT NULL, + `strategy` varchar(10) NOT NULL DEFAULT '', + `downloads` text NOT NULL, + `createdDate` datetime NOT NULL, + `createdBy` varchar(30) NOT NULL DEFAULT '', + `editedDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL DEFAULT '', + `status` enum('released','wait') NOT NULL DEFAULT 'wait', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_conference` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `rid` char(40) NOT NULL DEFAULT '', + `cgid` char(40) NOT NULL DEFAULT '', + `status` enum('closed','open') NOT NULL DEFAULT 'closed', + `participants` text NOT NULL, + `invitee` text NOT NULL, + `openedBy` mediumint(8) NOT NULL DEFAULT '0', + `openedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_conferenceaction` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `rid` char(40) NOT NULL DEFAULT '', + `type` enum('create','invite','join','leave','close','publish') NOT NULL DEFAULT 'create', + `data` text NOT NULL, + `user` mediumint(8) NOT NULL DEFAULT '0', + `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `device` char(40) NOT NULL DEFAULT 'default', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_message` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `gid` char(40) NOT NULL DEFAULT '', + `cgid` char(40) NOT NULL DEFAULT '', + `user` varchar(30) NOT NULL DEFAULT '', + `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `index` int(11) unsigned NOT NULL DEFAULT '0', + `type` enum('normal','broadcast','notify','bulletin','botcommand') NOT NULL DEFAULT 'normal', + `content` text NOT NULL, + `contentType` enum('text','plain','emotion','image','file','object','code') NOT NULL DEFAULT 'text', + `data` text NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `mgid` (`gid`), + KEY `mcgid` (`cgid`), + KEY `muser` (`user`), + KEY `mtype` (`type`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_message_backup` ( + `id` int(11) unsigned NOT NULL, + `gid` char(40) NOT NULL DEFAULT '', + `cgid` char(40) NOT NULL DEFAULT '', + `user` varchar(30) NOT NULL DEFAULT '', + `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `index` int(11) unsigned NOT NULL DEFAULT '0', + `type` enum('normal','broadcast','notify') NOT NULL DEFAULT 'normal', + `content` text NOT NULL, + `contentType` enum('text','plain','emotion','image','file','object','code') NOT NULL DEFAULT 'text', + `data` text NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0' +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_message_index` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `tableName` char(64) NOT NULL, + `start` int(11) unsigned NOT NULL, + `end` int(11) unsigned NOT NULL, + `startDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `endDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `chats` text NOT NULL, + PRIMARY KEY (`id`), + KEY `tableName` (`tableName`), + KEY `start` (`start`), + KEY `end` (`end`), + KEY `startDate` (`startDate`), + KEY `endDate` (`endDate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_messagestatus` ( + `user` mediumint(8) NOT NULL DEFAULT '0', + `message` int(11) unsigned NOT NULL, + `status` enum('waiting','sent','readed','deleted') NOT NULL DEFAULT 'waiting', + UNIQUE KEY `user` (`user`,`message`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_queue` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` char(30) NOT NULL, + `content` text NOT NULL, + `addDate` datetime NOT NULL, + `processDate` datetime NOT NULL, + `result` text NOT NULL, + `status` char(30) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_userdevice` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `user` mediumint(8) NOT NULL DEFAULT '0', + `device` char(40) NOT NULL DEFAULT 'default', + `deviceID` char(40) NOT NULL DEFAULT '', + `token` char(64) NOT NULL DEFAULT '', + `validUntil` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `lastLogin` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `lastLogout` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + UNIQUE KEY `userdevice` (`user`,`device`), + KEY `user` (`user`), + KEY `lastLogin` (`lastLogin`), + KEY `lastLogout` (`lastLogout`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_image` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `host` int(11) unsigned NOT NULL DEFAULT '0', + `name` varchar(64) NOT NULL DEFAULT '', + `localName` varchar(64) NOT NULL, + `address` varchar(64) NOT NULL DEFAULT '', + `path` varchar(64) NOT NULL DEFAULT '', + `status` varchar(20) NOT NULL DEFAULT '', + `osName` varchar(32) NOT NULL DEFAULT '', + `from` varchar(10) NOT NULL DEFAULT 'zentao', + `memory` float unsigned NOT NULL, + `disk` float unsigned NOT NULL, + `fileSize` float unsigned NOT NULL, + `md5` varchar(64) NOT NULL, + `desc` text NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `restoreDate` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_intervention` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `activity` mediumint(8) NOT NULL, + `status` char(30) NOT NULL, + `partake` text NOT NULL, + `begin` date NOT NULL, + `realBegin` date NOT NULL, + `situation` varchar(255) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `project` (`project`,`activity`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_issue` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `resolvedBy` varchar(30) NOT NULL, + `project` varchar(255) NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `desc` mediumtext NOT NULL, + `pri` char(30) NOT NULL, + `severity` char(30) NOT NULL, + `type` char(30) NOT NULL, + `activity` varchar(255) NOT NULL, + `deadline` date NOT NULL, + `resolution` char(30) NOT NULL, + `resolutionComment` text NOT NULL, + `objectID` varchar(255) NOT NULL, + `resolvedDate` date NOT NULL, + `status` varchar(30) NOT NULL, + `owner` varchar(255) NOT NULL, + `lib` mediumint(8) unsigned NOT NULL DEFAULT '0', + `from` mediumint(8) unsigned NOT NULL DEFAULT '0', + `version` smallint(6) NOT NULL DEFAULT '1', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `activateBy` varchar(30) NOT NULL, + `activateDate` date NOT NULL, + `closedBy` varchar(30) NOT NULL, + `closedDate` date NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `approvedDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_job` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(50) NOT NULL, + `repo` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `frame` varchar(20) NOT NULL, + `engine` varchar(20) NOT NULL, + `server` mediumint(8) unsigned NOT NULL, + `pipeline` varchar(500) NOT NULL, + `triggerType` varchar(255) NOT NULL, + `sonarqubeServer` mediumint(8) unsigned NOT NULL, + `projectKey` varchar(255) NOT NULL, + `svnDir` varchar(255) NOT NULL, + `atDay` varchar(255) DEFAULT NULL, + `atTime` varchar(10) DEFAULT NULL, + `customParam` text NOT NULL, + `comment` varchar(255) DEFAULT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `lastExec` datetime DEFAULT NULL, + `lastStatus` varchar(255) DEFAULT NULL, + `lastTag` varchar(255) DEFAULT NULL, + `lastSyncDate` datetime DEFAULT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_kanban` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `space` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `owner` varchar(30) NOT NULL, + `team` text NOT NULL, + `desc` mediumtext NOT NULL, + `acl` char(30) NOT NULL DEFAULT 'open', + `whitelist` text NOT NULL, + `archived` enum('0','1') NOT NULL DEFAULT '1', + `performable` enum('0','1') NOT NULL DEFAULT '0', + `status` enum('active','closed') NOT NULL DEFAULT 'active', + `order` mediumint(8) NOT NULL DEFAULT '0', + `displayCards` smallint(6) NOT NULL DEFAULT '0', + `showWIP` enum('0','1') NOT NULL DEFAULT '1', + `fluidBoard` enum('0','1') NOT NULL DEFAULT '0', + `colWidth` smallint(4) NOT NULL DEFAULT '264', + `minColWidth` smallint(4) NOT NULL DEFAULT '200', + `maxColWidth` smallint(4) NOT NULL DEFAULT '384', + `object` varchar(255) NOT NULL, + `alignment` varchar(10) NOT NULL DEFAULT 'center', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `lastEditedBy` char(30) NOT NULL, + `lastEditedDate` datetime NOT NULL, + `closedBy` char(30) NOT NULL, + `closedDate` datetime NOT NULL, + `activatedBy` char(30) NOT NULL, + `activatedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_kanbancard` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `kanban` mediumint(8) unsigned NOT NULL, + `region` mediumint(8) unsigned NOT NULL, + `group` mediumint(8) unsigned NOT NULL, + `fromID` mediumint(8) unsigned NOT NULL, + `fromType` varchar(30) NOT NULL, + `name` varchar(255) NOT NULL, + `status` varchar(30) NOT NULL DEFAULT 'doing', + `pri` mediumint(8) unsigned NOT NULL, + `assignedTo` text NOT NULL, + `desc` mediumtext NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `estimate` float unsigned NOT NULL, + `progress` float unsigned NOT NULL DEFAULT '0', + `color` char(7) NOT NULL, + `acl` char(30) NOT NULL DEFAULT 'open', + `whitelist` text NOT NULL, + `order` mediumint(8) NOT NULL DEFAULT '0', + `archived` enum('0','1') NOT NULL DEFAULT '0', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `lastEditedBy` char(30) NOT NULL, + `lastEditedDate` datetime NOT NULL, + `archivedBy` char(30) NOT NULL, + `archivedDate` datetime NOT NULL, + `assignedBy` char(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_kanbancell` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `kanban` mediumint(8) NOT NULL, + `lane` mediumint(8) NOT NULL, + `column` mediumint(8) NOT NULL, + `type` char(30) NOT NULL, + `cards` text NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `card_group` (`kanban`,`type`,`lane`,`column`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_kanbancolumn` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `parent` mediumint(8) NOT NULL DEFAULT '0', + `type` char(30) NOT NULL, + `region` mediumint(8) unsigned NOT NULL, + `group` mediumint(8) NOT NULL DEFAULT '0', + `name` varchar(255) NOT NULL DEFAULT '', + `color` char(30) NOT NULL, + `limit` smallint(6) NOT NULL DEFAULT '-1', + `order` mediumint(8) NOT NULL DEFAULT '0', + `archived` enum('0','1') NOT NULL DEFAULT '0', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_kanbangroup` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `kanban` mediumint(8) unsigned NOT NULL, + `region` mediumint(8) unsigned NOT NULL, + `order` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_kanbanlane` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `execution` mediumint(8) NOT NULL DEFAULT '0', + `type` char(30) NOT NULL, + `region` mediumint(8) unsigned NOT NULL, + `group` mediumint(8) unsigned NOT NULL, + `groupby` char(30) NOT NULL, + `extra` char(30) NOT NULL, + `name` varchar(255) NOT NULL DEFAULT '', + `color` char(30) NOT NULL, + `order` smallint(6) NOT NULL DEFAULT '0', + `lastEditedTime` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_kanbanregion` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `space` mediumint(8) unsigned NOT NULL, + `kanban` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `order` mediumint(8) NOT NULL DEFAULT '0', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `lastEditedBy` char(30) NOT NULL, + `lastEditedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_kanbanspace` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `type` varchar(50) NOT NULL, + `owner` varchar(30) NOT NULL, + `team` text NOT NULL, + `desc` mediumtext NOT NULL, + `acl` char(30) NOT NULL DEFAULT 'open', + `whitelist` text NOT NULL, + `status` enum('active','closed') NOT NULL DEFAULT 'active', + `order` mediumint(8) NOT NULL DEFAULT '0', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `lastEditedBy` char(30) NOT NULL, + `lastEditedDate` datetime NOT NULL, + `closedBy` char(30) NOT NULL, + `closedDate` datetime NOT NULL, + `activatedBy` char(30) NOT NULL, + `activatedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_lang` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `lang` varchar(30) NOT NULL, + `module` varchar(30) NOT NULL, + `section` varchar(30) NOT NULL, + `key` varchar(60) NOT NULL, + `value` text NOT NULL, + `system` enum('0','1') NOT NULL DEFAULT '1', + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + PRIMARY KEY (`id`), + UNIQUE KEY `lang` (`lang`,`module`,`section`,`key`,`vision`) +) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_leave` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `year` char(4) NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `start` time NOT NULL, + `finish` time NOT NULL, + `hours` float(4,1) unsigned NOT NULL DEFAULT '0.0', + `backDate` datetime NOT NULL, + `type` varchar(30) NOT NULL DEFAULT '', + `desc` text NOT NULL, + `status` varchar(30) NOT NULL DEFAULT '', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `reviewedBy` char(30) NOT NULL, + `reviewedDate` datetime NOT NULL, + `level` tinyint(3) NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `reviewers` text NOT NULL, + `backReviewers` text NOT NULL, + PRIMARY KEY (`id`), + KEY `year` (`year`), + KEY `type` (`type`), + KEY `status` (`status`), + KEY `createdBy` (`createdBy`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_lieu` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `year` char(4) NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `start` time NOT NULL, + `finish` time NOT NULL, + `hours` float(4,1) unsigned NOT NULL DEFAULT '0.0', + `overtime` char(255) NOT NULL, + `trip` char(255) NOT NULL, + `desc` text NOT NULL, + `status` varchar(30) NOT NULL DEFAULT '', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `reviewedBy` char(30) NOT NULL, + `reviewedDate` datetime NOT NULL, + `level` tinyint(3) NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `reviewers` text NOT NULL, + PRIMARY KEY (`id`), + KEY `year` (`year`), + KEY `status` (`status`), + KEY `createdBy` (`createdBy`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_log` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `objectType` varchar(30) NOT NULL, + `objectID` mediumint(8) unsigned NOT NULL, + `action` mediumint(8) unsigned NOT NULL, + `date` datetime NOT NULL, + `url` varchar(255) NOT NULL, + `contentType` varchar(30) NOT NULL, + `data` text NOT NULL, + `result` text NOT NULL, + PRIMARY KEY (`id`), + KEY `objectType` (`objectType`), + KEY `obejctID` (`objectID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_measqueue` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` varchar(30) NOT NULL, + `mid` mediumint(8) unsigned NOT NULL, + `status` varchar(255) NOT NULL, + `logs` text, + `execTime` varchar(10) NOT NULL, + `params` text, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `updateDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_measrecords` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `type` varchar(30) NOT NULL, + `mid` mediumint(8) NOT NULL, + `measCode` char(50) NOT NULL DEFAULT '', + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `params` text NOT NULL, + `year` char(4) NOT NULL, + `month` char(6) NOT NULL, + `week` char(8) NOT NULL, + `day` char(8) NOT NULL, + `value` varchar(255) NOT NULL, + `date` date NOT NULL, + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `project` (`project`), + KEY `time` (`year`,`month`,`day`,`week`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_meastemplate` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `model` char(30) NOT NULL, + `name` varchar(255) NOT NULL, + `content` mediumtext NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_meeting` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) NOT NULL, + `execution` mediumint(8) NOT NULL, + `name` varchar(255) NOT NULL, + `type` varchar(255) NOT NULL, + `begin` time NOT NULL, + `end` time NOT NULL, + `dept` mediumint(8) NOT NULL, + `mode` varchar(255) NOT NULL, + `host` varchar(30) NOT NULL, + `participant` text NOT NULL, + `date` date NOT NULL, + `room` int(11) NOT NULL, + `minutes` text NOT NULL, + `minutedBy` varchar(30) NOT NULL, + `minutedDate` datetime NOT NULL, + `objectType` varchar(30) NOT NULL, + `objectID` mediumint(8) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_meetingroom` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `position` varchar(30) NOT NULL, + `seats` int(11) NOT NULL, + `equipment` varchar(255) NOT NULL, + `openTime` varchar(255) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_module` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `root` mediumint(8) unsigned NOT NULL DEFAULT '0', + `branch` mediumint(8) unsigned NOT NULL DEFAULT '0', + `name` char(60) NOT NULL DEFAULT '', + `parent` mediumint(8) unsigned NOT NULL DEFAULT '0', + `path` char(255) NOT NULL DEFAULT '', + `grade` tinyint(3) unsigned NOT NULL DEFAULT '0', + `order` smallint(5) unsigned NOT NULL DEFAULT '0', + `type` char(30) NOT NULL, + `from` mediumint(8) unsigned NOT NULL DEFAULT '0', + `owner` varchar(30) NOT NULL, + `collector` text NOT NULL, + `short` varchar(30) NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `root` (`root`), + KEY `type` (`type`), + KEY `path` (`path`) +) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_mr` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `hostID` mediumint(8) unsigned NOT NULL, + `sourceProject` varchar(50) NOT NULL, + `sourceBranch` varchar(100) NOT NULL, + `targetProject` varchar(50) NOT NULL, + `targetBranch` varchar(100) NOT NULL, + `mriid` int(10) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `description` text NOT NULL, + `assignee` varchar(255) NOT NULL, + `reviewer` varchar(255) NOT NULL, + `approver` varchar(255) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + `status` char(30) NOT NULL, + `mergeStatus` char(30) NOT NULL, + `approvalStatus` char(30) NOT NULL, + `needApproved` enum('0','1') NOT NULL DEFAULT '0', + `needCI` enum('0','1') NOT NULL DEFAULT '0', + `repoID` mediumint(8) unsigned NOT NULL, + `jobID` mediumint(8) unsigned NOT NULL, + `compileID` mediumint(8) unsigned NOT NULL, + `compileStatus` char(30) NOT NULL, + `removeSourceBranch` enum('0','1') NOT NULL DEFAULT '0', + `synced` enum('0','1') NOT NULL DEFAULT '1', + `syncError` varchar(255) NOT NULL, + `hasNoConflict` enum('0','1') NOT NULL DEFAULT '0', + `diffs` longtext, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_mrapproval` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `mrID` mediumint(8) unsigned NOT NULL, + `account` varchar(255) NOT NULL, + `date` datetime NOT NULL, + `action` char(30) NOT NULL, + `comment` text NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_nc` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `auditplan` mediumint(8) NOT NULL, + `listID` mediumint(8) NOT NULL, + `title` varchar(255) NOT NULL, + `desc` mediumtext NOT NULL, + `type` char(30) NOT NULL, + `status` varchar(30) NOT NULL DEFAULT 'active', + `severity` char(30) NOT NULL, + `deadline` date NOT NULL, + `resolvedBy` varchar(30) NOT NULL, + `resolution` char(30) NOT NULL, + `resolvedDate` date NOT NULL, + `closedBy` varchar(30) NOT NULL, + `closedDate` date NOT NULL, + `parent` mediumint(8) unsigned NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `assignedDate` date NOT NULL, + `activateDate` date NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_notify` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `objectType` varchar(50) NOT NULL, + `objectID` mediumint(8) unsigned NOT NULL, + `action` mediumint(9) NOT NULL, + `toList` varchar(255) NOT NULL, + `ccList` text NOT NULL, + `subject` varchar(255) NOT NULL, + `data` text NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `sendTime` datetime NOT NULL, + `status` varchar(10) NOT NULL DEFAULT 'wait', + `failReason` text NOT NULL, + PRIMARY KEY (`id`), + KEY `objectType_toList_status` (`objectType`,`toList`,`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_oauth` ( + `account` varchar(30) NOT NULL, + `openID` varchar(255) NOT NULL, + `providerType` varchar(30) NOT NULL, + `providerID` mediumint(8) unsigned NOT NULL, + KEY `account` (`account`), + KEY `providerType` (`providerType`), + KEY `providerID` (`providerID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_object` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) NOT NULL, + `from` mediumint(8) NOT NULL, + `title` varchar(255) NOT NULL, + `category` char(30) NOT NULL, + `version` varchar(255) NOT NULL, + `type` enum('reviewed','taged') NOT NULL, + `range` text NOT NULL, + `data` text NOT NULL, + `storyEst` char(30) NOT NULL, + `taskEst` char(30) NOT NULL, + `requestEst` char(30) NOT NULL, + `testEst` char(30) NOT NULL, + `devEst` char(30) NOT NULL, + `designEst` char(30) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_opportunity` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `source` char(30) NOT NULL, + `type` char(30) NOT NULL, + `strategy` char(30) NOT NULL, + `status` varchar(30) NOT NULL DEFAULT 'active', + `impact` mediumint(8) NOT NULL, + `chance` mediumint(8) NOT NULL, + `ratio` mediumint(8) NOT NULL, + `pri` char(30) NOT NULL, + `identifiedDate` date NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `assignedDate` date NOT NULL, + `approvedDate` date NOT NULL, + `prevention` mediumtext NOT NULL, + `plannedClosedDate` date NOT NULL, + `actualClosedDate` date NOT NULL, + `lib` mediumint(8) unsigned NOT NULL DEFAULT '0', + `from` mediumint(8) unsigned NOT NULL DEFAULT '0', + `version` smallint(6) NOT NULL DEFAULT '1', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `activatedBy` varchar(30) NOT NULL, + `activatedDate` datetime NOT NULL, + `closedBy` varchar(30) NOT NULL, + `closedDate` datetime NOT NULL, + `canceledBy` varchar(30) NOT NULL, + `canceledDate` datetime NOT NULL, + `cancelReason` char(30) NOT NULL, + `hangupedBy` varchar(30) NOT NULL, + `hangupedDate` datetime NOT NULL, + `resolution` mediumtext NOT NULL, + `resolvedBy` varchar(30) NOT NULL, + `resolvedDate` datetime NOT NULL, + `lastCheckedBy` varchar(30) NOT NULL, + `lastCheckedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_overtime` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `year` char(4) NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `start` time NOT NULL, + `finish` time NOT NULL, + `hours` float(4,1) unsigned NOT NULL DEFAULT '0.0', + `leave` varchar(255) NOT NULL, + `type` varchar(30) NOT NULL DEFAULT '', + `desc` text NOT NULL, + `status` varchar(30) NOT NULL DEFAULT '', + `rejectReason` varchar(100) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `reviewedBy` char(30) NOT NULL, + `reviewedDate` datetime NOT NULL, + `level` tinyint(3) NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `reviewers` text NOT NULL, + PRIMARY KEY (`id`), + KEY `year` (`year`), + KEY `type` (`type`), + KEY `status` (`status`), + KEY `createdBy` (`createdBy`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_pipeline` ( + `id` smallint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` char(30) NOT NULL, + `name` varchar(50) NOT NULL, + `url` varchar(255) DEFAULT NULL, + `account` varchar(30) DEFAULT NULL, + `password` varchar(255) NOT NULL, + `token` varchar(255) DEFAULT NULL, + `private` char(32) DEFAULT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_planstory` ( + `plan` mediumint(8) unsigned NOT NULL, + `story` mediumint(8) unsigned NOT NULL, + `order` mediumint(9) NOT NULL, + UNIQUE KEY `plan_story` (`plan`,`story`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_process` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `model` char(30) NOT NULL DEFAULT 'waterfall', + `name` varchar(255) NOT NULL, + `type` char(30) NOT NULL, + `abbr` char(30) NOT NULL, + `desc` mediumtext NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `order` mediumint(9) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_product` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `program` mediumint(8) unsigned NOT NULL, + `name` varchar(90) NOT NULL, + `code` varchar(45) NOT NULL, + `shadow` tinyint(1) unsigned NOT NULL, + `bind` enum('0','1') NOT NULL DEFAULT '0', + `line` mediumint(8) NOT NULL, + `type` varchar(30) NOT NULL DEFAULT 'normal', + `status` varchar(30) NOT NULL DEFAULT '', + `subStatus` varchar(30) NOT NULL DEFAULT '', + `desc` mediumtext NOT NULL, + `PO` varchar(30) NOT NULL, + `QD` varchar(30) NOT NULL, + `RD` varchar(30) NOT NULL, + `feedback` varchar(30) NOT NULL, + `ticket` varchar(30) NOT NULL, + `acl` enum('open','private','custom') NOT NULL DEFAULT 'open', + `whitelist` text NOT NULL, + `reviewer` text NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `createdVersion` varchar(20) NOT NULL, + `order` mediumint(8) unsigned NOT NULL, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `acl` (`acl`), + KEY `order` (`order`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_productplan` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `product` mediumint(8) unsigned NOT NULL, + `branch` varchar(255) NOT NULL DEFAULT '0', + `parent` mediumint(9) NOT NULL DEFAULT '0', + `title` varchar(90) NOT NULL, + `status` enum('wait','doing','done','closed') NOT NULL DEFAULT 'wait', + `desc` mediumtext NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `order` text NOT NULL, + `closedReason` varchar(20) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `end` (`end`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_programactivity` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `process` mediumint(8) NOT NULL, + `activity` mediumint(8) NOT NULL, + `name` varchar(255) NOT NULL, + `content` text NOT NULL, + `reason` varchar(255) NOT NULL, + `result` char(30) NOT NULL, + `linkedBy` char(30) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_programoutput` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `process` mediumint(8) NOT NULL, + `activity` mediumint(8) NOT NULL, + `output` mediumint(8) NOT NULL, + `content` text NOT NULL, + `name` varchar(255) NOT NULL, + `reason` varchar(255) NOT NULL, + `result` char(30) NOT NULL, + `linkedBy` char(30) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_programprocess` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `process` mediumint(8) NOT NULL, + `name` varchar(255) NOT NULL, + `type` char(30) NOT NULL, + `abbr` char(30) NOT NULL, + `desc` text NOT NULL, + `reason` varchar(255) NOT NULL, + `linkedBy` char(30) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_programreport` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `template` mediumint(8) NOT NULL, + `project` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `params` text NOT NULL, + `content` text NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_project` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) NOT NULL DEFAULT '0', + `model` char(30) NOT NULL, + `type` char(30) NOT NULL DEFAULT 'sprint', + `lifetime` char(30) NOT NULL DEFAULT '', + `budget` varchar(30) NOT NULL DEFAULT '0', + `budgetUnit` char(30) NOT NULL DEFAULT 'CNY', + `attribute` varchar(30) NOT NULL DEFAULT '', + `percent` float unsigned NOT NULL DEFAULT '0', + `milestone` enum('0','1') NOT NULL DEFAULT '0', + `output` text NOT NULL, + `auth` char(30) NOT NULL, + `parent` mediumint(8) unsigned NOT NULL DEFAULT '0', + `path` varchar(255) NOT NULL, + `grade` tinyint(3) unsigned NOT NULL, + `name` varchar(90) NOT NULL, + `code` varchar(45) NOT NULL, + `hasProduct` tinyint(1) unsigned NOT NULL DEFAULT '1', + `begin` date NOT NULL, + `end` date NOT NULL, + `realBegan` date NOT NULL, + `realEnd` date NOT NULL, + `days` smallint(5) unsigned NOT NULL, + `status` varchar(10) NOT NULL, + `subStatus` varchar(30) NOT NULL DEFAULT '', + `pri` enum('1','2','3','4') NOT NULL DEFAULT '1', + `desc` mediumtext NOT NULL, + `version` smallint(6) NOT NULL, + `parentVersion` smallint(6) NOT NULL, + `planDuration` int(11) NOT NULL, + `realDuration` int(11) NOT NULL, + `openedBy` varchar(30) NOT NULL DEFAULT '', + `openedDate` datetime NOT NULL, + `openedVersion` varchar(20) NOT NULL, + `lastEditedBy` varchar(30) NOT NULL DEFAULT '', + `lastEditedDate` datetime NOT NULL, + `closedBy` varchar(30) NOT NULL DEFAULT '', + `closedDate` datetime NOT NULL, + `canceledBy` varchar(30) NOT NULL DEFAULT '', + `canceledDate` datetime NOT NULL, + `suspendedDate` date NOT NULL, + `PO` varchar(30) NOT NULL DEFAULT '', + `PM` varchar(30) NOT NULL DEFAULT '', + `QD` varchar(30) NOT NULL DEFAULT '', + `RD` varchar(30) NOT NULL DEFAULT '', + `team` varchar(90) NOT NULL, + `acl` char(30) NOT NULL DEFAULT 'open', + `whitelist` text NOT NULL, + `order` mediumint(8) unsigned NOT NULL, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `division` enum('0','1') NOT NULL DEFAULT '1', + `displayCards` smallint(6) NOT NULL DEFAULT '0', + `fluidBoard` enum('0','1') NOT NULL DEFAULT '0', + `multiple` enum('0','1') NOT NULL DEFAULT '1', + `colWidth` smallint(4) NOT NULL DEFAULT '264', + `minColWidth` smallint(4) NOT NULL DEFAULT '200', + `maxColWidth` smallint(4) NOT NULL DEFAULT '384', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `parent` (`parent`), + KEY `begin` (`begin`), + KEY `end` (`end`), + KEY `status` (`status`), + KEY `acl` (`acl`), + KEY `order` (`order`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_projectadmin` ( + `group` smallint(6) NOT NULL, + `account` char(30) NOT NULL, + `programs` text NOT NULL, + `projects` text NOT NULL, + `products` text NOT NULL, + `executions` text NOT NULL, + UNIQUE KEY `group_account` (`group`,`account`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_projectcase` ( + `project` mediumint(8) unsigned NOT NULL DEFAULT '0', + `product` mediumint(8) unsigned NOT NULL DEFAULT '0', + `case` mediumint(8) unsigned NOT NULL DEFAULT '0', + `count` mediumint(8) unsigned NOT NULL DEFAULT '1', + `version` smallint(6) NOT NULL DEFAULT '1', + `order` smallint(6) unsigned NOT NULL, + UNIQUE KEY `project` (`project`,`case`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_projectproduct` ( + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `branch` mediumint(8) unsigned NOT NULL, + `plan` varchar(255) NOT NULL, + PRIMARY KEY (`project`,`product`,`branch`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_projectspec` ( + `project` mediumint(8) NOT NULL, + `version` smallint(6) NOT NULL, + `name` varchar(255) NOT NULL, + `milestone` enum('0','1') NOT NULL DEFAULT '0', + `begin` date NOT NULL, + `end` date NOT NULL, + UNIQUE KEY `project` (`project`,`version`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_projectstory` ( + `project` mediumint(8) unsigned NOT NULL DEFAULT '0', + `product` mediumint(8) unsigned NOT NULL, + `branch` mediumint(8) unsigned NOT NULL, + `story` mediumint(8) unsigned NOT NULL DEFAULT '0', + `version` smallint(6) NOT NULL DEFAULT '1', + `order` smallint(6) unsigned NOT NULL, + UNIQUE KEY `project` (`project`,`story`), + KEY `story` (`story`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_relation` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) NOT NULL, + `product` mediumint(8) NOT NULL, + `execution` mediumint(8) NOT NULL, + `AType` char(30) NOT NULL, + `AID` mediumint(8) NOT NULL, + `AVersion` char(30) NOT NULL, + `relation` char(30) NOT NULL, + `BType` char(30) NOT NULL, + `BID` mediumint(8) NOT NULL, + `BVersion` char(30) NOT NULL, + `extra` char(30) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `relation` (`product`,`relation`,`AType`,`BType`,`AID`,`BID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_relationoftasks` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `execution` mediumint(8) unsigned NOT NULL, + `pretask` mediumint(8) unsigned NOT NULL, + `condition` enum('begin','end') NOT NULL, + `task` mediumint(8) unsigned NOT NULL, + `action` enum('begin','end') NOT NULL, + PRIMARY KEY (`id`), + KEY `relationoftasks` (`execution`,`task`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_release` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` varchar(255) NOT NULL, + `product` mediumint(8) unsigned NOT NULL DEFAULT '0', + `branch` varchar(255) NOT NULL, + `shadow` mediumint(8) unsigned NOT NULL DEFAULT '0', + `build` varchar(255) NOT NULL, + `name` varchar(255) NOT NULL DEFAULT '', + `marker` enum('0','1') NOT NULL DEFAULT '0', + `date` date NOT NULL, + `stories` text NOT NULL, + `bugs` text NOT NULL, + `leftBugs` text NOT NULL, + `desc` mediumtext NOT NULL, + `mailto` text, + `notify` varchar(255) DEFAULT NULL, + `status` varchar(20) NOT NULL DEFAULT 'normal', + `subStatus` varchar(30) NOT NULL DEFAULT '', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `build` (`build`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_repo` ( + `id` mediumint(9) NOT NULL AUTO_INCREMENT, + `product` varchar(255) NOT NULL, + `projects` varchar(255) NOT NULL, + `name` varchar(255) NOT NULL, + `path` varchar(255) NOT NULL, + `prefix` varchar(100) NOT NULL, + `encoding` varchar(20) NOT NULL, + `SCM` varchar(10) NOT NULL, + `client` varchar(100) NOT NULL, + `serviceHost` varchar(50) NOT NULL, + `serviceProject` varchar(100) NOT NULL, + `commits` mediumint(8) unsigned NOT NULL, + `account` varchar(30) NOT NULL, + `password` varchar(30) NOT NULL, + `encrypt` varchar(30) NOT NULL DEFAULT 'plain', + `acl` text NOT NULL, + `synced` tinyint(1) NOT NULL DEFAULT '0', + `lastSync` datetime NOT NULL, + `desc` text NOT NULL, + `extra` char(30) NOT NULL, + `preMerge` enum('0','1') NOT NULL DEFAULT '0', + `job` mediumint(8) unsigned NOT NULL, + `fileServerUrl` text, + `fileServerAccount` varchar(40) NOT NULL DEFAULT '', + `fileServerPassword` varchar(100) NOT NULL DEFAULT '', + `deleted` tinyint(1) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_repobranch` ( + `repo` mediumint(8) unsigned NOT NULL, + `revision` mediumint(8) unsigned NOT NULL, + `branch` varchar(255) NOT NULL, + UNIQUE KEY `repo_revision_branch` (`repo`,`revision`,`branch`), + KEY `branch` (`branch`), + KEY `revision` (`revision`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_repofiles` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `repo` mediumint(8) unsigned NOT NULL, + `revision` mediumint(8) unsigned NOT NULL, + `path` varchar(255) NOT NULL, + `oldPath` varchar(255) DEFAULT '', + `parent` varchar(255) NOT NULL, + `type` varchar(20) NOT NULL, + `action` char(1) NOT NULL, + PRIMARY KEY (`id`), + KEY `path` (`path`), + KEY `parent` (`parent`), + KEY `repo` (`repo`), + KEY `revision` (`revision`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_repohistory` ( + `id` mediumint(9) NOT NULL AUTO_INCREMENT, + `repo` mediumint(9) NOT NULL, + `revision` varchar(40) NOT NULL, + `commit` mediumint(8) unsigned NOT NULL, + `comment` text NOT NULL, + `committer` varchar(100) NOT NULL, + `time` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `repo` (`repo`), + KEY `revision` (`revision`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_report` ( + `id` mediumint(9) NOT NULL AUTO_INCREMENT, + `code` varchar(100) NOT NULL, + `name` text NOT NULL, + `dimension` int(8) NOT NULL DEFAULT '0', + `module` varchar(100) NOT NULL, + `sql` text NOT NULL, + `vars` text NOT NULL, + `langs` text NOT NULL, + `params` text NOT NULL, + `step` tinyint(1) NOT NULL DEFAULT '2', + `desc` text NOT NULL, + `addedBy` char(30) NOT NULL, + `addedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) +) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_researchplan` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `customer` varchar(255) NOT NULL, + `stakeholder` varchar(255) NOT NULL, + `objective` varchar(255) NOT NULL, + `begin` datetime NOT NULL, + `end` datetime NOT NULL, + `location` varchar(255) NOT NULL, + `team` varchar(255) NOT NULL, + `method` enum('','videoConference','interview','questionnaire','telephoneInterview') NOT NULL, + `outline` mediumtext NOT NULL, + `schedule` mediumtext NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_researchreport` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `relatedPlan` mediumint(8) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `author` varchar(30) NOT NULL, + `content` mediumtext NOT NULL, + `customer` varchar(255) NOT NULL, + `researchObjects` varchar(255) NOT NULL, + `begin` datetime NOT NULL, + `end` datetime NOT NULL, + `location` varchar(255) NOT NULL, + `method` enum('','videoConference','interview','questionnaire','telephoneInterview') NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_review` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `object` mediumint(8) NOT NULL, + `template` mediumint(8) NOT NULL, + `doc` mediumint(8) DEFAULT NULL, + `docVersion` smallint(6) NOT NULL, + `status` char(30) NOT NULL, + `reviewedBy` varchar(255) NOT NULL, + `auditedBy` varchar(255) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deadline` date NOT NULL, + `lastReviewedBy` varchar(255) DEFAULT NULL, + `lastReviewedDate` date NOT NULL, + `lastAuditedBy` varchar(255) NOT NULL, + `lastAuditedDate` date NOT NULL, + `lastEditedBy` varchar(255) NOT NULL, + `lastEditedDate` date NOT NULL, + `result` char(30) NOT NULL, + `auditResult` char(30) NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_reviewcl` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL, + `object` char(30) NOT NULL, + `category` char(30) NOT NULL, + `type` varchar(255) NOT NULL DEFAULT '', + `assignedTo` varchar(30) NOT NULL, + `order` mediumint(8) DEFAULT '0', + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_reviewissue` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `review` mediumint(8) NOT NULL, + `approval` mediumint(8) NOT NULL, + `injection` mediumint(8) NOT NULL, + `identify` mediumint(8) NOT NULL, + `type` char(30) NOT NULL DEFAULT 'review', + `listID` mediumint(8) NOT NULL, + `title` varchar(255) NOT NULL, + `opinion` varchar(255) NOT NULL, + `opinionDate` date NOT NULL, + `status` char(30) NOT NULL, + `resolution` char(30) NOT NULL, + `resolutionBy` char(30) NOT NULL, + `resolutionDate` date NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_reviewlist` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL, + `object` char(30) NOT NULL, + `category` char(30) NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_reviewresult` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `review` mediumint(8) NOT NULL, + `type` char(30) NOT NULL DEFAULT 'review', + `result` char(30) NOT NULL, + `opinion` text NOT NULL, + `reviewer` char(30) NOT NULL, + `remainIssue` char(30) NOT NULL, + `createdDate` date NOT NULL, + `consumed` float NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `reviewer` (`review`,`reviewer`,`type`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_risk` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` varchar(255) NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `source` char(30) NOT NULL, + `category` char(30) NOT NULL, + `strategy` char(30) NOT NULL, + `status` varchar(30) NOT NULL DEFAULT 'active', + `impact` char(30) NOT NULL, + `probability` char(30) NOT NULL, + `rate` char(30) NOT NULL, + `pri` char(30) NOT NULL, + `identifiedDate` date NOT NULL, + `prevention` mediumtext NOT NULL, + `remedy` mediumtext NOT NULL, + `plannedClosedDate` date NOT NULL, + `actualClosedDate` date NOT NULL, + `lib` mediumint(8) unsigned NOT NULL DEFAULT '0', + `from` mediumint(8) unsigned NOT NULL DEFAULT '0', + `version` smallint(6) NOT NULL DEFAULT '1', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `resolution` mediumtext NOT NULL, + `resolvedBy` varchar(30) NOT NULL, + `activateBy` varchar(30) NOT NULL, + `activateDate` date NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `closedBy` varchar(30) NOT NULL, + `closedDate` date NOT NULL, + `cancelBy` varchar(30) NOT NULL, + `cancelDate` date NOT NULL, + `cancelReason` char(30) NOT NULL, + `hangupBy` varchar(30) NOT NULL, + `hangupDate` date NOT NULL, + `trackedBy` varchar(30) NOT NULL, + `trackedDate` date NOT NULL, + `assignedDate` date NOT NULL, + `approvedDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_riskissue` ( + `risk` mediumint(8) unsigned NOT NULL, + `issue` mediumint(8) unsigned NOT NULL, + UNIQUE KEY `risk_issue` (`risk`,`issue`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_score` ( + `id` bigint(12) unsigned NOT NULL AUTO_INCREMENT, + `account` varchar(30) NOT NULL, + `module` varchar(30) NOT NULL DEFAULT '', + `method` varchar(30) NOT NULL, + `desc` varchar(250) NOT NULL DEFAULT '', + `before` int(11) NOT NULL DEFAULT '0', + `score` int(11) NOT NULL DEFAULT '0', + `after` int(11) NOT NULL DEFAULT '0', + `time` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `account` (`account`), + KEY `model` (`module`), + KEY `method` (`method`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_searchdict` ( + `key` smallint(5) unsigned NOT NULL, + `value` char(3) NOT NULL, + PRIMARY KEY (`key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_searchindex` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `objectType` char(20) NOT NULL, + `objectID` mediumint(9) NOT NULL, + `title` text NOT NULL, + `content` text NOT NULL, + `addedDate` datetime NOT NULL, + `editedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `object` (`objectType`,`objectID`), + KEY `addedDate` (`addedDate`), + FULLTEXT KEY `content` (`content`), + FULLTEXT KEY `title` (`title`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_serverroom` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(128) NOT NULL, + `city` varchar(128) NOT NULL, + `line` varchar(20) NOT NULL, + `bandwidth` varchar(128) NOT NULL, + `provider` varchar(128) NOT NULL, + `owner` varchar(30) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` char(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_service` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `external` enum('0','1') NOT NULL DEFAULT '0', + `port` smallint(5) unsigned NOT NULL, + `entry` varchar(255) NOT NULL, + `deploy` varchar(255) NOT NULL, + `version` varchar(64) NOT NULL, + `color` char(7) NOT NULL, + `desc` mediumtext, + `dept` varchar(128) NOT NULL, + `devel` varchar(30) NOT NULL, + `qa` varchar(30) NOT NULL, + `ops` varchar(30) NOT NULL, + `hosts` text, + `softName` varchar(128) NOT NULL, + `softVersion` varchar(128) NOT NULL, + `type` varchar(20) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` char(30) NOT NULL, + `editedDate` datetime NOT NULL, + `parent` mediumint(8) unsigned NOT NULL DEFAULT '0', + `path` char(255) NOT NULL DEFAULT '', + `grade` tinyint(3) unsigned NOT NULL DEFAULT '0', + `order` smallint(5) unsigned NOT NULL DEFAULT '0', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_solutions` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `contents` text NOT NULL COMMENT '问题描述', + `support` text NOT NULL COMMENT '是否需要高层支持', + `measures` text NOT NULL COMMENT '解决建议', + `type` char(30) NOT NULL, + `addedBy` varchar(30) NOT NULL, + `addedDate` date NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_sqlview` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(90) NOT NULL, + `code` varchar(45) NOT NULL, + `sql` text NOT NULL, + `desc` text NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_stage` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `percent` varchar(255) NOT NULL, + `type` varchar(255) NOT NULL, + `projectType` varchar(255) NOT NULL DEFAULT '', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_stakeholder` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `objectID` mediumint(8) NOT NULL, + `objectType` char(30) NOT NULL, + `user` char(30) NOT NULL, + `type` char(30) NOT NULL, + `key` enum('0','1') NOT NULL, + `from` char(30) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `editedBy` char(30) NOT NULL, + `editedDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL, + PRIMARY KEY (`id`), + KEY `objectID` (`objectID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_story` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `parent` mediumint(9) NOT NULL DEFAULT '0', + `product` mediumint(8) unsigned NOT NULL DEFAULT '0', + `branch` mediumint(8) unsigned NOT NULL DEFAULT '0', + `module` mediumint(8) unsigned NOT NULL DEFAULT '0', + `plan` text, + `source` varchar(20) NOT NULL, + `sourceNote` varchar(255) NOT NULL, + `fromBug` mediumint(8) unsigned NOT NULL DEFAULT '0', + `feedback` mediumint(8) unsigned NOT NULL DEFAULT '0', + `title` varchar(255) NOT NULL, + `keywords` varchar(255) NOT NULL, + `type` varchar(30) NOT NULL DEFAULT 'story', + `category` varchar(30) NOT NULL DEFAULT 'feature', + `pri` tinyint(3) unsigned NOT NULL DEFAULT '3', + `estimate` float unsigned NOT NULL, + `status` enum('','changing','active','draft','closed','reviewing') NOT NULL DEFAULT '', + `subStatus` varchar(30) NOT NULL DEFAULT '', + `color` char(7) NOT NULL, + `stage` enum('','wait','planned','projected','developing','developed','testing','tested','verified','released','closed') NOT NULL DEFAULT 'wait', + `stagedBy` char(30) NOT NULL, + `mailto` text, + `lib` mediumint(8) unsigned NOT NULL DEFAULT '0', + `fromStory` mediumint(8) unsigned NOT NULL DEFAULT '0', + `fromVersion` smallint(6) NOT NULL DEFAULT '1', + `openedBy` varchar(30) NOT NULL DEFAULT '', + `openedDate` datetime NOT NULL, + `assignedTo` varchar(30) NOT NULL DEFAULT '', + `assignedDate` datetime NOT NULL, + `approvedDate` date NOT NULL, + `lastEditedBy` varchar(30) NOT NULL DEFAULT '', + `lastEditedDate` datetime NOT NULL, + `changedBy` varchar(30) NOT NULL, + `changedDate` datetime NOT NULL, + `reviewedBy` varchar(255) NOT NULL, + `reviewedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `closedBy` varchar(30) NOT NULL DEFAULT '', + `closedDate` datetime NOT NULL, + `closedReason` varchar(30) NOT NULL, + `activatedDate` datetime NOT NULL, + `toBug` mediumint(8) unsigned NOT NULL, + `childStories` varchar(255) NOT NULL, + `linkStories` varchar(255) NOT NULL, + `linkRequirements` varchar(255) NOT NULL, + `twins` varchar(255) NOT NULL, + `duplicateStory` mediumint(8) unsigned NOT NULL, + `version` smallint(6) NOT NULL DEFAULT '1', + `storyChanged` enum('0','1') NOT NULL DEFAULT '0', + `feedbackBy` varchar(100) NOT NULL, + `notifyEmail` varchar(100) NOT NULL, + `URChanged` enum('0','1') NOT NULL DEFAULT '0', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `status` (`status`), + KEY `assignedTo` (`assignedTo`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_storyestimate` ( + `story` mediumint(9) NOT NULL, + `round` smallint(6) NOT NULL, + `estimate` text NOT NULL, + `average` float NOT NULL, + `openedBy` varchar(30) NOT NULL, + `openedDate` datetime NOT NULL, + UNIQUE KEY `story` (`story`,`round`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_storyreview` ( + `story` mediumint(9) NOT NULL, + `version` smallint(6) NOT NULL, + `reviewer` varchar(30) NOT NULL, + `result` varchar(30) NOT NULL, + `reviewDate` datetime NOT NULL, + UNIQUE KEY `story` (`story`,`version`,`reviewer`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_storyspec` ( + `story` mediumint(9) NOT NULL, + `version` smallint(6) NOT NULL, + `title` varchar(255) NOT NULL, + `spec` mediumtext NOT NULL, + `verify` mediumtext NOT NULL, + `files` text NOT NULL, + UNIQUE KEY `story` (`story`,`version`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_storystage` ( + `story` mediumint(8) unsigned NOT NULL, + `branch` mediumint(8) unsigned NOT NULL, + `stage` varchar(50) NOT NULL, + `stagedBy` char(30) NOT NULL, + UNIQUE KEY `story_branch` (`story`,`branch`), + KEY `story` (`story`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_suitecase` ( + `suite` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `case` mediumint(8) unsigned NOT NULL, + `version` smallint(5) unsigned NOT NULL, + UNIQUE KEY `suitecase` (`suite`,`case`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_task` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `parent` mediumint(8) NOT NULL DEFAULT '0', + `execution` mediumint(8) unsigned NOT NULL DEFAULT '0', + `module` mediumint(8) unsigned NOT NULL DEFAULT '0', + `design` mediumint(8) unsigned NOT NULL, + `story` mediumint(8) unsigned NOT NULL DEFAULT '0', + `storyVersion` smallint(6) NOT NULL DEFAULT '1', + `designVersion` smallint(6) unsigned NOT NULL, + `fromBug` mediumint(8) unsigned NOT NULL DEFAULT '0', + `fromIssue` mediumint(8) unsigned NOT NULL DEFAULT '0', + `feedback` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `type` varchar(20) NOT NULL, + `mode` varchar(10) NOT NULL, + `pri` tinyint(3) unsigned NOT NULL DEFAULT '0', + `estimate` float unsigned NOT NULL, + `consumed` float unsigned NOT NULL, + `left` float unsigned NOT NULL, + `deadline` date NOT NULL, + `status` enum('wait','doing','done','pause','cancel','closed') NOT NULL DEFAULT 'wait', + `subStatus` varchar(30) NOT NULL DEFAULT '', + `color` char(7) NOT NULL, + `mailto` text, + `desc` mediumtext NOT NULL, + `version` smallint(6) NOT NULL, + `openedBy` varchar(30) NOT NULL, + `openedDate` datetime NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `estStarted` date NOT NULL, + `realStarted` datetime NOT NULL, + `finishedBy` varchar(30) NOT NULL, + `finishedDate` datetime NOT NULL, + `finishedList` text NOT NULL, + `canceledBy` varchar(30) NOT NULL, + `canceledDate` datetime NOT NULL, + `closedBy` varchar(30) NOT NULL, + `closedDate` datetime NOT NULL, + `planDuration` int(11) NOT NULL, + `realDuration` int(11) NOT NULL, + `closedReason` varchar(30) NOT NULL, + `lastEditedBy` varchar(30) NOT NULL, + `lastEditedDate` datetime NOT NULL, + `activatedDate` datetime NOT NULL, + `order` mediumint(8) NOT NULL DEFAULT '0', + `repo` mediumint(8) unsigned NOT NULL, + `mr` mediumint(8) unsigned NOT NULL, + `entry` varchar(255) NOT NULL, + `lines` varchar(10) NOT NULL, + `v1` varchar(40) NOT NULL, + `v2` varchar(40) NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + PRIMARY KEY (`id`), + KEY `execution` (`execution`), + KEY `story` (`story`), + KEY `parent` (`parent`), + KEY `assignedTo` (`assignedTo`), + KEY `order` (`order`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_taskestimate` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `task` mediumint(8) unsigned NOT NULL DEFAULT '0', + `date` date NOT NULL, + `left` float unsigned NOT NULL DEFAULT '0', + `consumed` float unsigned NOT NULL, + `account` char(30) NOT NULL DEFAULT '', + `work` text, + `order` tinyint(3) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `task` (`task`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_taskspec` ( + `task` mediumint(8) NOT NULL, + `version` smallint(6) NOT NULL, + `name` varchar(255) NOT NULL, + `estStarted` date NOT NULL, + `deadline` date NOT NULL, + UNIQUE KEY `task` (`task`,`version`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_taskteam` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `task` mediumint(8) unsigned NOT NULL, + `account` char(30) NOT NULL, + `estimate` decimal(12,2) NOT NULL, + `consumed` decimal(12,2) NOT NULL, + `left` decimal(12,2) NOT NULL, + `transfer` char(30) NOT NULL, + `status` enum('wait','doing','done') NOT NULL DEFAULT 'wait', + `order` tinyint(3) NOT NULL, + PRIMARY KEY (`id`), + KEY `task` (`task`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_team` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `root` mediumint(8) unsigned NOT NULL DEFAULT '0', + `type` enum('project','task','execution') NOT NULL DEFAULT 'project', + `account` char(30) NOT NULL DEFAULT '', + `role` char(30) NOT NULL DEFAULT '', + `position` varchar(30) NOT NULL, + `limited` char(8) NOT NULL DEFAULT 'no', + `join` date NOT NULL DEFAULT '0000-00-00', + `days` smallint(5) unsigned NOT NULL, + `hours` float(3,1) unsigned NOT NULL DEFAULT '0.0', + `estimate` decimal(12,2) unsigned NOT NULL DEFAULT '0.00', + `consumed` decimal(12,2) unsigned NOT NULL DEFAULT '0.00', + `left` decimal(12,2) unsigned NOT NULL DEFAULT '0.00', + `order` tinyint(3) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `team` (`root`,`type`,`account`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_testreport` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `tasks` varchar(255) NOT NULL, + `builds` varchar(255) NOT NULL, + `title` varchar(255) NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `owner` char(30) NOT NULL, + `members` text NOT NULL, + `stories` text NOT NULL, + `bugs` text NOT NULL, + `cases` text NOT NULL, + `report` text NOT NULL, + `objectType` varchar(20) NOT NULL, + `objectID` mediumint(8) unsigned NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_testresult` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `run` mediumint(8) unsigned NOT NULL, + `case` mediumint(8) unsigned NOT NULL, + `version` smallint(5) unsigned NOT NULL, + `job` mediumint(8) unsigned NOT NULL, + `compile` mediumint(8) unsigned NOT NULL, + `caseResult` char(30) NOT NULL, + `stepResults` text NOT NULL, + `ZTFResult` text NOT NULL, + `node` int(8) unsigned NOT NULL DEFAULT '0', + `lastRunner` varchar(30) NOT NULL, + `date` datetime NOT NULL, + `duration` float NOT NULL, + `xml` text NOT NULL, + `deploy` mediumint(8) unsigned NOT NULL, + PRIMARY KEY (`id`), + KEY `case` (`case`), + KEY `version` (`version`), + KEY `run` (`run`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_testrun` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `task` mediumint(8) unsigned NOT NULL DEFAULT '0', + `case` mediumint(8) unsigned NOT NULL DEFAULT '0', + `version` tinyint(3) unsigned NOT NULL DEFAULT '0', + `assignedTo` char(30) NOT NULL DEFAULT '', + `lastRunner` varchar(30) NOT NULL, + `lastRunDate` datetime NOT NULL, + `lastRunResult` char(30) NOT NULL, + `status` char(30) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `task` (`task`,`case`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_testsuite` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `desc` mediumtext NOT NULL, + `type` varchar(20) NOT NULL, + `order` smallint(5) unsigned NOT NULL DEFAULT '0', + `addedBy` char(30) NOT NULL, + `addedDate` datetime NOT NULL, + `lastEditedBy` char(30) NOT NULL, + `lastEditedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL, + PRIMARY KEY (`id`), + KEY `product` (`product`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_testtask` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `name` char(90) NOT NULL, + `execution` mediumint(8) unsigned NOT NULL DEFAULT '0', + `build` char(30) NOT NULL, + `type` varchar(255) NOT NULL DEFAULT '', + `owner` varchar(30) NOT NULL, + `pri` tinyint(3) unsigned NOT NULL DEFAULT '0', + `begin` date NOT NULL, + `end` date NOT NULL, + `realFinishedDate` datetime NOT NULL, + `mailto` text, + `desc` mediumtext NOT NULL, + `report` text NOT NULL, + `status` enum('blocked','doing','wait','done') NOT NULL DEFAULT 'wait', + `testreport` mediumint(8) unsigned NOT NULL, + `auto` varchar(10) NOT NULL DEFAULT 'no', + `subStatus` varchar(30) NOT NULL DEFAULT '', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `build` (`build`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_ticket` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `product` mediumint(8) unsigned NOT NULL, + `module` mediumint(8) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `type` varchar(30) NOT NULL, + `desc` text NOT NULL, + `openedBuild` varchar(255) NOT NULL, + `feedback` mediumint(8) NOT NULL, + `assignedTo` varchar(255) NOT NULL, + `assignedDate` datetime NOT NULL, + `realStarted` datetime NOT NULL, + `startedBy` varchar(255) NOT NULL, + `startedDate` datetime NOT NULL, + `deadline` date NOT NULL, + `pri` tinyint(3) unsigned NOT NULL DEFAULT '0', + `estimate` float unsigned NOT NULL, + `consumed` float unsigned NOT NULL, + `left` float unsigned NOT NULL, + `status` varchar(30) NOT NULL, + `openedBy` varchar(30) NOT NULL, + `openedDate` datetime NOT NULL, + `activatedCount` int(10) NOT NULL, + `activatedBy` varchar(30) NOT NULL, + `activatedDate` datetime NOT NULL, + `closedBy` varchar(30) NOT NULL, + `closedDate` datetime NOT NULL, + `closedReason` varchar(30) NOT NULL, + `finishedBy` varchar(30) NOT NULL, + `finishedDate` datetime NOT NULL, + `resolvedBy` varchar(30) NOT NULL, + `resolvedDate` datetime NOT NULL, + `resolution` text NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `keywords` varchar(255) NOT NULL, + `repeatTicket` mediumint(8) NOT NULL DEFAULT '0', + `mailto` varchar(255) NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_ticketrelation` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `ticketId` mediumint(8) unsigned NOT NULL, + `objectId` mediumint(9) NOT NULL, + `objectType` varchar(100) NOT NULL, + PRIMARY KEY (`id`), + KEY `ticketId` (`ticketId`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_ticketsource` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `ticketId` mediumint(8) unsigned NOT NULL, + `customer` varchar(100) NOT NULL, + `contact` varchar(100) NOT NULL, + `notifyEmail` varchar(100) NOT NULL, + `createdDate` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `ticketId` (`ticketId`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_todo` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `date` date NOT NULL, + `begin` smallint(4) unsigned zerofill NOT NULL, + `end` smallint(4) unsigned zerofill NOT NULL, + `feedback` mediumint(8) unsigned NOT NULL, + `type` char(15) NOT NULL, + `cycle` tinyint(3) unsigned NOT NULL DEFAULT '0', + `idvalue` mediumint(8) unsigned NOT NULL DEFAULT '0', + `pri` tinyint(3) unsigned NOT NULL, + `name` char(150) NOT NULL, + `desc` mediumtext NOT NULL, + `status` enum('wait','doing','done','closed') NOT NULL DEFAULT 'wait', + `private` tinyint(1) NOT NULL, + `config` varchar(255) NOT NULL, + `assignedTo` varchar(30) NOT NULL DEFAULT '', + `assignedBy` varchar(30) NOT NULL DEFAULT '', + `assignedDate` datetime NOT NULL, + `finishedBy` varchar(30) NOT NULL DEFAULT '', + `finishedDate` datetime NOT NULL, + `closedBy` varchar(30) NOT NULL DEFAULT '', + `closedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + PRIMARY KEY (`id`), + KEY `account` (`account`), + KEY `assignedTo` (`assignedTo`), + KEY `finishedBy` (`finishedBy`), + KEY `date` (`date`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_traincategory` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` char(30) NOT NULL DEFAULT '', + `parent` mediumint(8) unsigned NOT NULL DEFAULT '0', + `path` char(255) NOT NULL DEFAULT '', + `grade` tinyint(3) NOT NULL, + `order` mediumint(8) NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `parent` (`parent`), + KEY `path` (`path`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_traincontents` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `code` varchar(50) NOT NULL, + `course` mediumint(8) unsigned NOT NULL DEFAULT '0', + `name` varchar(255) NOT NULL, + `type` varchar(30) NOT NULL, + `parent` mediumint(8) unsigned NOT NULL DEFAULT '0', + `path` char(255) NOT NULL DEFAULT '', + `desc` text NOT NULL, + `order` mediumint(8) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` tinyint(1) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_traincourse` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `code` varchar(50) NOT NULL, + `category` mediumint(8) NOT NULL, + `name` varchar(255) NOT NULL, + `status` varchar(10) NOT NULL, + `teacher` varchar(30) NOT NULL DEFAULT '', + `desc` mediumtext NOT NULL, + `createdBy` varchar(255) NOT NULL, + `createdDate` date NOT NULL, + `editedBy` varchar(255) NOT NULL, + `editedDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_trainplan` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `place` varchar(255) NOT NULL, + `trainee` text NOT NULL, + `lecturer` varchar(20) NOT NULL, + `type` enum('inside','outside') NOT NULL DEFAULT 'inside', + `status` varchar(20) NOT NULL, + `summary` mediumtext NOT NULL, + `createdBy` char(30) DEFAULT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_trainrecords` ( + `user` char(30) NOT NULL, + `objectId` mediumint(8) unsigned NOT NULL, + `objectType` varchar(10) NOT NULL, + `status` varchar(10) NOT NULL, + PRIMARY KEY (`user`,`objectId`,`objectType`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_trip` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` enum('trip','egress') NOT NULL DEFAULT 'trip', + `customers` varchar(20) NOT NULL, + `name` char(30) NOT NULL, + `desc` text NOT NULL, + `year` char(4) NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `start` time NOT NULL, + `finish` time NOT NULL, + `from` char(50) NOT NULL, + `to` char(50) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `year` (`year`), + KEY `createdBy` (`createdBy`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_user` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `company` mediumint(8) unsigned NOT NULL, + `type` char(30) NOT NULL DEFAULT 'inside', + `dept` mediumint(8) unsigned NOT NULL DEFAULT '0', + `account` char(30) NOT NULL DEFAULT '', + `password` char(32) NOT NULL DEFAULT '', + `role` char(10) NOT NULL DEFAULT '', + `realname` varchar(100) NOT NULL DEFAULT '', + `pinyin` varchar(255) NOT NULL DEFAULT '', + `nickname` char(60) NOT NULL DEFAULT '', + `commiter` varchar(100) NOT NULL, + `avatar` text NOT NULL, + `birthday` date NOT NULL DEFAULT '0000-00-00', + `gender` enum('f','m') NOT NULL DEFAULT 'f', + `email` char(90) NOT NULL DEFAULT '', + `skype` char(90) NOT NULL DEFAULT '', + `qq` char(20) NOT NULL DEFAULT '', + `mobile` char(11) NOT NULL DEFAULT '', + `phone` char(20) NOT NULL DEFAULT '', + `weixin` varchar(90) NOT NULL DEFAULT '', + `dingding` varchar(90) NOT NULL DEFAULT '', + `slack` varchar(90) NOT NULL DEFAULT '', + `whatsapp` varchar(90) NOT NULL DEFAULT '', + `address` char(120) NOT NULL DEFAULT '', + `zipcode` char(10) NOT NULL DEFAULT '', + `nature` text NOT NULL, + `analysis` text NOT NULL, + `strategy` text NOT NULL, + `join` date NOT NULL DEFAULT '0000-00-00', + `visits` mediumint(8) unsigned NOT NULL DEFAULT '0', + `visions` varchar(20) NOT NULL DEFAULT 'rnd,lite', + `ip` char(15) NOT NULL DEFAULT '', + `last` int(10) unsigned NOT NULL DEFAULT '0', + `fails` tinyint(5) NOT NULL DEFAULT '0', + `locked` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `feedback` enum('0','1') NOT NULL DEFAULT '0', + `ranzhi` char(30) NOT NULL DEFAULT '', + `ldap` char(30) NOT NULL, + `score` int(11) NOT NULL DEFAULT '0', + `scoreLevel` int(11) NOT NULL DEFAULT '0', + `resetToken` varchar(50) NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + `clientStatus` enum('online','away','busy','offline','meeting') NOT NULL DEFAULT 'offline', + `clientLang` varchar(10) NOT NULL DEFAULT 'zh-cn', + PRIMARY KEY (`id`), + UNIQUE KEY `account` (`account`), + KEY `dept` (`dept`), + KEY `email` (`email`), + KEY `commiter` (`commiter`), + KEY `deleted` (`deleted`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_usercontact` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `listName` varchar(60) NOT NULL, + `userList` text NOT NULL, + PRIMARY KEY (`id`), + KEY `account` (`account`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_usergroup` ( + `account` char(30) NOT NULL DEFAULT '', + `group` mediumint(8) unsigned NOT NULL DEFAULT '0', + `project` text NOT NULL, + UNIQUE KEY `account` (`account`,`group`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_userquery` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `module` varchar(30) NOT NULL, + `title` varchar(90) NOT NULL, + `form` text NOT NULL, + `sql` text NOT NULL, + `shortcut` enum('0','1') NOT NULL DEFAULT '0', + `common` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `account` (`account`), + KEY `module` (`module`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_usertpl` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `type` char(30) NOT NULL, + `title` varchar(150) NOT NULL, + `content` text NOT NULL, + `public` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `account` (`account`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_userview` ( + `account` char(30) NOT NULL, + `programs` mediumtext NOT NULL, + `products` mediumtext NOT NULL, + `projects` mediumtext NOT NULL, + `sprints` mediumtext NOT NULL, + UNIQUE KEY `account` (`account`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_webhook` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` varchar(15) NOT NULL DEFAULT 'default', + `name` varchar(50) NOT NULL, + `url` varchar(255) NOT NULL, + `domain` varchar(255) NOT NULL, + `secret` varchar(255) NOT NULL, + `contentType` varchar(30) NOT NULL DEFAULT 'application/json', + `sendType` enum('sync','async') NOT NULL DEFAULT 'sync', + `products` text NOT NULL, + `executions` text NOT NULL, + `params` varchar(100) NOT NULL, + `actions` text NOT NULL, + `desc` text NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_weeklyreport` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `weekStart` date NOT NULL, + `pv` float(9,2) NOT NULL, + `ev` float(9,2) NOT NULL, + `ac` float(9,2) NOT NULL, + `sv` float(9,2) NOT NULL, + `cv` float(9,2) NOT NULL, + `staff` smallint(5) unsigned NOT NULL, + `progress` varchar(255) NOT NULL, + `workload` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `week` (`project`,`weekStart`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workestimation` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `scale` decimal(10,2) unsigned NOT NULL, + `productivity` decimal(10,2) unsigned NOT NULL, + `duration` decimal(10,2) unsigned NOT NULL, + `unitLaborCost` decimal(10,2) unsigned NOT NULL, + `totalLaborCost` decimal(10,2) unsigned NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + `dayHour` decimal(10,2) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflow` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `parent` varchar(30) NOT NULL, + `child` varchar(30) NOT NULL, + `type` varchar(10) NOT NULL DEFAULT 'flow', + `navigator` varchar(10) NOT NULL, + `app` varchar(20) NOT NULL, + `position` varchar(30) NOT NULL, + `module` varchar(30) NOT NULL, + `table` varchar(50) NOT NULL, + `name` varchar(30) NOT NULL, + `titleField` varchar(30) NOT NULL, + `contentField` text NOT NULL, + `flowchart` text NOT NULL, + `js` text NOT NULL, + `css` text NOT NULL, + `order` smallint(5) unsigned NOT NULL, + `buildin` tinyint(1) unsigned NOT NULL, + `administrator` text NOT NULL, + `desc` text NOT NULL, + `version` varchar(10) NOT NULL DEFAULT '1.0', + `status` varchar(10) NOT NULL DEFAULT 'wait', + `approval` enum('enabled','disabled') NOT NULL DEFAULT 'disabled', + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique` (`app`,`module`,`vision`), + KEY `type` (`type`), + KEY `app` (`app`), + KEY `module` (`module`), + KEY `order` (`order`) +) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowaction` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `module` varchar(30) NOT NULL, + `action` varchar(50) NOT NULL, + `method` varchar(50) NOT NULL, + `name` varchar(50) NOT NULL, + `type` enum('single','batch') NOT NULL DEFAULT 'single', + `batchMode` enum('same','different') NOT NULL DEFAULT 'different', + `extensionType` varchar(10) NOT NULL DEFAULT 'override' COMMENT 'none | extend | override', + `open` varchar(20) NOT NULL, + `position` enum('menu','browseandview','browse','view') NOT NULL DEFAULT 'browseandview', + `layout` char(20) NOT NULL, + `show` enum('dropdownlist','direct') NOT NULL DEFAULT 'dropdownlist', + `order` smallint(5) unsigned NOT NULL, + `buildin` tinyint(1) unsigned NOT NULL, + `role` varchar(10) NOT NULL DEFAULT 'custom', + `virtual` tinyint(1) unsigned NOT NULL, + `conditions` text NOT NULL, + `verifications` text NOT NULL, + `hooks` text NOT NULL, + `linkages` text NOT NULL, + `js` text NOT NULL, + `css` text NOT NULL, + `toList` char(255) NOT NULL, + `blocks` text NOT NULL, + `desc` text NOT NULL, + `status` varchar(10) NOT NULL DEFAULT 'enable', + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique` (`module`,`action`,`vision`), + KEY `module` (`module`), + KEY `action` (`action`), + KEY `order` (`order`) +) ENGINE=InnoDB AUTO_INCREMENT=190 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowdatasource` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` enum('system','sql','func','option','lang','category') NOT NULL DEFAULT 'option', + `name` varchar(30) NOT NULL, + `code` varchar(30) NOT NULL, + `datasource` text NOT NULL, + `view` varchar(20) NOT NULL, + `keyField` varchar(50) NOT NULL, + `valueField` varchar(50) NOT NULL, + `buildin` tinyint(1) unsigned NOT NULL, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` char(30) NOT NULL, + `editedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `type` (`type`) +) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowfield` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `module` varchar(30) NOT NULL, + `field` varchar(50) NOT NULL, + `type` varchar(20) NOT NULL DEFAULT 'varchar', + `length` varchar(10) NOT NULL, + `name` varchar(50) NOT NULL, + `control` varchar(20) NOT NULL, + `expression` text NOT NULL, + `options` text NOT NULL, + `default` varchar(100) NOT NULL, + `rules` varchar(255) NOT NULL, + `placeholder` varchar(100) NOT NULL, + `order` smallint(5) unsigned NOT NULL, + `searchOrder` smallint(5) unsigned NOT NULL DEFAULT '0', + `exportOrder` smallint(5) unsigned NOT NULL DEFAULT '0', + `canExport` enum('0','1') NOT NULL DEFAULT '0', + `canSearch` enum('0','1') NOT NULL DEFAULT '0', + `isValue` enum('0','1') NOT NULL DEFAULT '0', + `readonly` enum('0','1') NOT NULL DEFAULT '0', + `buildin` tinyint(1) unsigned NOT NULL, + `role` varchar(10) NOT NULL DEFAULT 'custom', + `desc` text NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique` (`module`,`field`), + KEY `module` (`module`), + KEY `field` (`field`), + KEY `order` (`order`) +) ENGINE=InnoDB AUTO_INCREMENT=360 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowlabel` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `module` varchar(30) NOT NULL, + `action` varchar(30) NOT NULL DEFAULT 'browse', + `code` varchar(30) NOT NULL, + `label` varchar(255) NOT NULL, + `params` text NOT NULL, + `orderBy` text NOT NULL, + `order` tinyint(3) NOT NULL, + `buildin` tinyint(1) unsigned NOT NULL, + `role` varchar(10) NOT NULL DEFAULT 'custom', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` char(30) NOT NULL, + `editedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `module` (`module`) +) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowlayout` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `module` varchar(30) NOT NULL, + `action` varchar(50) NOT NULL, + `field` varchar(50) NOT NULL, + `order` smallint(5) unsigned NOT NULL, + `width` smallint(5) NOT NULL, + `position` text NOT NULL, + `readonly` enum('0','1') NOT NULL DEFAULT '0', + `mobileShow` enum('0','1') NOT NULL DEFAULT '1', + `summary` varchar(20) NOT NULL, + `defaultValue` text NOT NULL, + `layoutRules` varchar(255) NOT NULL, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + PRIMARY KEY (`id`), + UNIQUE KEY `unique` (`module`,`action`,`field`,`vision`), + KEY `module` (`module`), + KEY `action` (`action`), + KEY `order` (`order`) +) ENGINE=InnoDB AUTO_INCREMENT=138 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowlinkdata` ( + `objectType` varchar(30) NOT NULL, + `objectID` mediumint(8) unsigned NOT NULL, + `linkedType` varchar(30) NOT NULL, + `linkedID` mediumint(8) unsigned NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + UNIQUE KEY `unique` (`objectType`,`objectID`,`linkedType`,`linkedID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowrelation` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `prev` varchar(30) NOT NULL, + `next` varchar(30) NOT NULL, + `field` varchar(50) NOT NULL, + `actions` varchar(20) NOT NULL, + `actionCodes` text NOT NULL, + `buildin` enum('0','1') NOT NULL DEFAULT '0', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowrelationlayout` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `prev` varchar(30) NOT NULL, + `next` varchar(30) NOT NULL, + `action` varchar(50) NOT NULL, + `field` varchar(50) NOT NULL, + `order` smallint(5) unsigned NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique` (`prev`,`next`,`action`,`field`), + KEY `prev` (`prev`), + KEY `next` (`next`), + KEY `action` (`action`), + KEY `order` (`order`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowreport` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `module` varchar(30) NOT NULL COMMENT 'module name', + `name` varchar(100) NOT NULL COMMENT 'report name', + `type` enum('pie','line','bar') NOT NULL DEFAULT 'pie' COMMENT 'report type', + `countType` enum('sum','count') NOT NULL DEFAULT 'sum' COMMENT 'report count method', + `displayType` enum('value','percent') NOT NULL DEFAULT 'value' COMMENT 'report display method', + `dimension` varchar(130) NOT NULL COMMENT 'dimension field code of zt_workflowfield', + `fields` text NOT NULL COMMENT 'count fileds code of zt_workflowfield,use comma split', + `order` smallint(5) unsigned NOT NULL DEFAULT '0', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowrule` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` enum('system','regex','func') NOT NULL DEFAULT 'regex', + `name` varchar(30) NOT NULL, + `rule` text NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` char(30) NOT NULL, + `editedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `type` (`type`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowsql` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `module` varchar(30) NOT NULL, + `field` varchar(50) NOT NULL, + `action` varchar(50) NOT NULL, + `sql` text NOT NULL, + `vars` text NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `module` (`module`), + KEY `field` (`field`), + KEY `action` (`action`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowversion` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `module` varchar(30) NOT NULL, + `version` varchar(10) NOT NULL, + `fields` text NOT NULL, + `actions` text NOT NULL, + `layouts` text NOT NULL, + `sqls` text NOT NULL, + `labels` text NOT NULL, + `table` text NOT NULL, + `datas` text NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `moduleversion` (`module`,`version`), + KEY `module` (`module`), + KEY `version` (`version`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_zoutput` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `activity` mediumint(8) NOT NULL, + `name` varchar(255) NOT NULL, + `content` mediumtext NOT NULL, + `optional` char(20) NOT NULL, + `tailorNorm` varchar(255) NOT NULL, + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `order` mediumint(8) DEFAULT '0', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=130 DEFAULT CHARSET=utf8; diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 9b69fd079c..9183299b31 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -1,3 +1,136 @@ +2023-02-27 18.2 +完成的需求 +开源版: +41729 按指派人搜索时,支持搜索多人并行任务 +41730 待处理中过滤掉我已经完成的多人并行任务 +41731 多人并行任务全部完成后指派给创建人 +41732 编辑任务时,父/子任务不能修改为多人任务 +41817 创建项目弹窗增加融合敏捷项目 +41821 融合敏捷项目的迭代菜单下可以创建看板 +41824 创建融合敏捷项目时,能复制融合敏捷项目的信息 +41825 创建执行时,能复制融合敏捷项目的执行的信息 +41829 融合敏捷项目的创建执行页面,增加方法字段 +41830 批量编辑迭代信息页面,增加方法字段 +41832 迭代列表导出增加方法字段 +41833 后台全局设置增加融合敏捷设置 +41834 后台融合敏捷设置下增加QA设置 +41835 后台融合敏捷设置下增加过程设置 +41940 后台过程设置的分类项设置,不同模型管理自己的分类项 +41952 轻量级模式增加融合敏捷项目入口 +41826 创建Bug时执行只能选择叶子执行 +41831 创建问题、风险、机会时只能选择叶子执行 +41839 瀑布项目阶段列表支持无限层级 +41865 创建版本时只能选择叶子执行 +41867 提交测试单时只能选择叶子执行 +41870 瀑布项目的甘特图列表支持无限层级 +41872 执行列表支持无限层级 +41877 瀑布模型的里程碑报告统计该阶段下所有数据 +41878 瀑布项目支持创建无限级阶段 +41889 阶段编辑页面支持修改父阶段 +41891 阶段类型增加“综合” +41907 瀑布项目创建任务时所属执行只能选择叶子执行 +41911 通用看板导入执行时可以选择父执行或子执行 +41912 创建执行文档库时支持选择父执行或子执行 +41913 执行文档库中2.5级菜单支持选择父执行或子执行 +41915 新增日志时只能选择叶子执行 +41957 代码模块中维护所属执行时只能选择叶子执行 +41961 代码的评审模块中维护所属执行时只能选择叶子执行 +41968 回收站内父阶段未删除时才能恢复子阶段 +42011 子阶段增加阶段类型字段 +42017 父阶段阶段类型修改后,子阶段类型同步变更 +42019 无限级阶段的阶段进度计算规则 +42212 宿主机重装服务后可正常操作执行节点 +42213 初始化中的执行节点只能进行远程操作 +42214 快照状态显示优化 +42215 创建执行节点的初始快照 +42216 加载或刷新宿主机详情页时清空服务状态文本 +42217 加载或刷新执行节点详情页时清空服务状态文本 +41743 后台首页内容定义 +41755 功能配置页的二级导航定义 +41756 后台首页设置区块调整 +41759 后台首页插件区块内容 +41760 后台首页公开课区块的内容 +41761 后台首页官方公众号区块的内容 +41768 后台配置页增加1.5级导航切换功能 +41774 私有部署时后台首页内容调整 +41777 后台模型配置页面结构调整 +41791 后台通知页面结构调整 +41793 后台数据导入页面定义 +41794 后台系统设置页面的结构调整 +41797 后台二次开发页面的结构调整 +41837 非中文版本后台首页内容调整 +41745 功能配置下的地盘中新增待办和区块的Tab项 +41746 功能配置下的产品中新增Tab项 +41747 功能配置下的执行中新增Tab项 +41748 功能配置下的测试中新增Tab项 +41749 新增功能配置下的看板模块 +41750 功能配置下的文档中新增必填项设置的字段及内容 +41751 新增功能配置下的反馈模块 +41752 将后台的审批移至功能配置下做为审批模块导航 +41753 将后台全局设置中的度量移至功能配置中做为度量模块的设置入口 +41754 新增功能配置下的会议室模块 +41758 后台首页禅道信息区块内容 +41766 调整二级页面配置项详情页面的布局和结构 +41773 新增功能配置下的用户模块 +41775 后台人员配置页面结构调整 +41776 后台功能开关页面结构调整 +41790 后台模型配置中瀑布模型的配置项定义 +41795 后台系统中聊天页面的排版调整 +41812 后台文档模板页面内容补充并调整结构 +41942 运营界面的后台功能配置中,新增的项目导航内容定义 +41955 调整后台基线模块的权限配置 +41965 将后台自定义的语言项改为配置 +42006 禅道补丁、新闻动态、公开课和禅道升级信息的接口 +41869 创建融合瀑布项目时,能复制瀑布项目和融合瀑布项目的信息 +41871 创建执行时,能复制融合瀑布项目的执行的信息 +41895 后台全局设置增加融合瀑布设置 +41896 后台融合瀑布设置下增加阶段设置 +41897 后台融合瀑布设置下增加设计设置 +41898 后台融合瀑布设置下增加QA设置 +41899 后台融合瀑布设置下增加配置设置 +41900 后台融合瀑布设置下增加过程设置 +41901 后台融合瀑布设置下增加评审设置 +41902 更新API接口 +41906 后台系统模式下,增加融合敏捷和融合瀑布 +41941 后台系统功能设置,增加融合敏捷和融合瀑布 +42100 瀑布项目的甘特图列表支持迭代和看板的展示 +42194 融合敏捷项目复制时,可以复制敏捷项目信息 +42196 融合敏捷项目创建执行时,能复制敏捷项目的执行的信息 +42360 阶段的所属计划可以编辑修改 +42501 融合敏捷项目创建执行页面增加提示语 +42502 融合瀑布项目创建子阶段页面增加提示语 +42517 多层级阶段的瀑布项目。在项目看板中,展示了第一层级阶段 +42542 融合敏捷项目下,迭代和看板支持互相转入任务 +42543 融合瀑布项目下,叶子节点的执行支持互相转入任务 +39290 瀑布项目的阶段支持排序 +41769 执行统计区块仅展示叶子层级的执行数据 +41803 执行总览区块统计父子层级汇总的数据 +41804 执行列表区块展示父子层级汇总的数据 +41815 项目集看板中的执行只展示叶子节点的执行 +41816 产品看板中的执行只展示叶子节点的执行 +41828 瀑布项目的项目计划区块仅统计一级阶段的数据 +41868 创建项目弹窗增加融合瀑布项目 +41875 修改阶段状态时,同步调整父子阶段的状态 +41892 融合瀑布项目阶段细分时,可以细分为迭代和看板 +41893 批量编辑阶段信息页面,增加方法字段 +41894 阶段列表导出增加方法字段 +41917 复制瀑布项目时支持复制无限级阶段 +42037 组织的日志中的执行只展示叶子节点的执行 +42038 组织的动态中的执行展示父执行和子执行 +42052 批量编辑无限级阶段信息时需要增加校验信息 +42088 融合瀑布项目迭代和看板的编辑页面增加父阶段 +42089 融合瀑布项目迭代和看板的的产品不允许编辑 +42182 剩余类型的迭代/看板的功能与阶段保持一致 +42193 执行1.5级菜单根据层级展示 +42195 设计类型的阶段增加研发需求菜单及功能 +42197 测试类型的阶段增加代码的菜单及功能 +42231 阶段进行操作时,同步调整父子阶段的状态 +42176 设计类型的迭代/看板的功能与阶段保持一致 +42175 需求/总结评审类型的迭代/看板的功能与阶段保持一致 +修复的Bug +开源版: +32397 地盘待处理任务搜索界面报错 + 2023-02-08 18.1 完成的需求 开源版: diff --git a/module/misc/lang/de.php b/module/misc/lang/de.php index a12f421b20..324127988f 100644 --- a/module/misc/lang/de.php +++ b/module/misc/lang/de.php @@ -103,6 +103,8 @@ $lang->misc->feature->themeDesc = '

ZenTao 15.0+ a new "Youth Blue" theme $lang->misc->feature->visionsDesc = "

The concept of interface has been added since 16.5. Users can deal with R&D affairs in [Full Feature Interface] and daily office affairs in [Operation Management Interface].

You can view the current interface on the avatar, and click the name of the interface to view and switch other interfaces.

"; $lang->misc->feature->visionsImage = 'theme/default/images/main/visions_en.png'; +/* Release Date. */ +$lang->misc->releaseDate['18.2'] = '2023-02-27'; $lang->misc->releaseDate['18.1'] = '2023-02-08'; $lang->misc->releaseDate['18.0'] = '2023-01-03'; $lang->misc->releaseDate['18.0.beta3'] = '2022-12-26'; @@ -197,6 +199,8 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22'; $lang->misc->releaseDate['7.1.stable'] = '2015-03-07'; $lang->misc->releaseDate['6.3.stable'] = '2014-11-07'; +/* Release Detail. */ +$lang->misc->feature->all['18.2'][] = array('title' => 'Agile Plus and Waterfall Plus management models are newly added. Support for unlimited splitting of waterfall project stages. The UI of Admin is completely upgraded and redesigned.', 'desc' => ''); $lang->misc->feature->all['18.1'][] = array('title' => 'The automation testing solution interaction is optimized, while a new snapshot management function is newly added. ZenTao IM implemented online collaboration of PPT documents.Fix bugs.', 'desc' => ''); $lang->misc->feature->all['18.0'][] = array('title' => "Automated test solutions are proposed. Work order related functions are added to the Operation Management Interface. Approval workflow support for adding all types of notifications. And at the same time, we have further improved the earned value calculation rules.", 'desc' => ''); $lang->misc->feature->all['18.0.beta3'][] = array('title' => "The module Statistic is upgraded to BI, with 5 built-in large screens of macro management dimensions.", 'desc' => ''); diff --git a/module/misc/lang/en.php b/module/misc/lang/en.php index 82f2eb7c46..8a6655824b 100644 --- a/module/misc/lang/en.php +++ b/module/misc/lang/en.php @@ -103,6 +103,8 @@ $lang->misc->feature->themeDesc = '

ZenTao 15.0+ a new "Youth Blue" theme $lang->misc->feature->visionsDesc = "

The concept of interface has been added since 16.5. Users can deal with R&D affairs in [Full Feature Interface] and daily office affairs in [Operation Management Interface].

You can view the current interface on the avatar, and click the name of the interface to view and switch other interfaces.

"; $lang->misc->feature->visionsImage = 'theme/default/images/main/visions_en.png'; +/* Release Date. */ +$lang->misc->releaseDate['18.2'] = '2023-02-27'; $lang->misc->releaseDate['18.1'] = '2023-02-08'; $lang->misc->releaseDate['18.0'] = '2023-01-03'; $lang->misc->releaseDate['18.0.beta3'] = '2022-12-26'; @@ -197,6 +199,8 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22'; $lang->misc->releaseDate['7.1.stable'] = '2015-03-07'; $lang->misc->releaseDate['6.3.stable'] = '2014-11-07'; +/* Release Detail. */ +$lang->misc->feature->all['18.2'][] = array('title' => 'Agile Plus and Waterfall Plus management models are newly added. Support for unlimited splitting of waterfall project stages. The UI of Admin is completely upgraded and redesigned.', 'desc' => ''); $lang->misc->feature->all['18.1'][] = array('title' => 'The automation testing solution interaction is optimized, while a new snapshot management function is newly added. ZenTao IM implemented online collaboration of PPT documents.Fix bugs.', 'desc' => ''); $lang->misc->feature->all['18.0'][] = array('title' => "Automated test solutions are proposed. Work order related functions are added to the Operation Management Interface. Approval workflow support for adding all types of notifications. And at the same time, we have further improved the earned value calculation rules.", 'desc' => ''); $lang->misc->feature->all['18.0.beta3'][] = array('title' => "The module Statistic is upgraded to BI, with 5 built-in large screens of macro management dimensions.", 'desc' => ''); diff --git a/module/misc/lang/fr.php b/module/misc/lang/fr.php index 6b857caae8..2060606572 100644 --- a/module/misc/lang/fr.php +++ b/module/misc/lang/fr.php @@ -103,6 +103,8 @@ $lang->misc->feature->themeDesc = '

ZenTao 15.0+ a new "Youth Blue" theme $lang->misc->feature->visionsDesc = "

The concept of interface has been added since 16.5. Users can deal with R&D affairs in [Full Feature Interface] and daily office affairs in [Operation Management Interface].

You can view the current interface on the avatar, and click the name of the interface to view and switch other interfaces.

"; $lang->misc->feature->visionsImage = 'theme/default/images/main/visions_en.png'; +/* Release Date. */ +$lang->misc->releaseDate['18.2'] = '2023-02-27'; $lang->misc->releaseDate['18.1'] = '2023-02-08'; $lang->misc->releaseDate['18.0'] = '2023-01-03'; $lang->misc->releaseDate['18.0.beta3'] = '2022-12-26'; @@ -197,6 +199,8 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22'; $lang->misc->releaseDate['7.1.stable'] = '2015-03-07'; $lang->misc->releaseDate['6.3.stable'] = '2014-11-07'; +/* Release Detail. */ +$lang->misc->feature->all['18.2'][] = array('title' => 'Agile Plus and Waterfall Plus management models are newly added. Support for unlimited splitting of waterfall project stages. The UI of Admin is completely upgraded and redesigned.', 'desc' => ''); $lang->misc->feature->all['18.1'][] = array('title' => 'The automation testing solution interaction is optimized, while a new snapshot management function is newly added. ZenTao IM implemented online collaboration of PPT documents.Fix bugs.', 'desc' => ''); $lang->misc->feature->all['18.0'][] = array('title' => "Automated test solutions are proposed. Work order related functions are added to the Operation Management Interface. Approval workflow support for adding all types of notifications. And at the same time, we have further improved the earned value calculation rules.", 'desc' => ''); $lang->misc->feature->all['18.0.beta3'][] = array('title' => "The module Statistic is upgraded to BI, with 5 built-in large screens of macro management dimensions.", 'desc' => ''); diff --git a/module/misc/lang/zh-cn.php b/module/misc/lang/zh-cn.php index b287862b30..00f8682669 100644 --- a/module/misc/lang/zh-cn.php +++ b/module/misc/lang/zh-cn.php @@ -104,6 +104,7 @@ $lang->misc->feature->visionsDesc = "

从16.5开始增加了界面概念, $lang->misc->feature->visionsImage = 'theme/default/images/main/visions.png'; /* Release Date. */ +$lang->misc->releaseDate['18.2'] = '2023-02-27'; $lang->misc->releaseDate['18.1'] = '2023-02-08'; $lang->misc->releaseDate['18.0'] = '2023-01-03'; $lang->misc->releaseDate['18.0.beta3'] = '2022-12-26'; @@ -199,6 +200,7 @@ $lang->misc->releaseDate['7.1.stable'] = '2015-03-07'; $lang->misc->releaseDate['6.3.stable'] = '2014-11-07'; /* Release Detail. */ +$lang->misc->feature->all['18.2'][] = array('title' => '新增融合敏捷、融合瀑布管理模型,瀑布项目阶段支持无限级拆分,后台进行全新UI改版。', 'desc' => ''); $lang->misc->feature->all['18.1'][] = array('title' => '自动化测试解决方案交互优化、新增快照管理功能。禅道客户端实现了 PPT文档在线协作。修复Bug。', 'desc' => ''); $lang->misc->feature->all['18.0'][] = array('title' => '推出自动化测试解决方案;运营管理界面增加工单功能;审批流支持增加所有类型的通知以及挣值计算规则完善。', 'desc' => ''); $lang->misc->feature->all['18.0.beta3'][] = array('title' => '统计模块升级为BI,内置5张宏观管理维度大屏。', 'desc' => ''); diff --git a/module/upgrade/config.php b/module/upgrade/config.php index 9682233fa7..99bdd1dbf8 100644 --- a/module/upgrade/config.php +++ b/module/upgrade/config.php @@ -32,7 +32,8 @@ $config->upgrade->maxVersion['max4_0_beta1'] = '18_0_beta1'; $config->upgrade->maxVersion['max4_0_beta2'] = '18_0_beta2'; $config->upgrade->maxVersion['max4_0_beta3'] = '18_0_beta3'; $config->upgrade->maxVersion['max4_0'] = '18_0'; -$config->upgrade->maxVersion['max4_1'] = '18_1'; // max insert position. +$config->upgrade->maxVersion['max4_1'] = '18_1'; +$config->upgrade->maxVersion['max4_2'] = '18_2'; // max insert position. $config->upgrade->bizVersion = array(); $config->upgrade->bizVersion['biz1_0'] = '9_5_1'; @@ -103,7 +104,8 @@ $config->upgrade->bizVersion['biz8_0_beta1'] = '18_0_beta1'; $config->upgrade->bizVersion['biz8_0_beta2'] = '18_0_beta2'; $config->upgrade->bizVersion['biz8_0_beta3'] = '18_0_beta3'; $config->upgrade->bizVersion['biz8_0'] = '18_0'; -$config->upgrade->bizVersion['biz8_1'] = '18_1'; // biz insert position. +$config->upgrade->bizVersion['biz8_1'] = '18_1'; +$config->upgrade->bizVersion['biz8_2'] = '18_2'; // biz insert position. $config->upgrade->proVersion = array(); $config->upgrade->proVersion['pro1_0'] = '3_1'; diff --git a/module/upgrade/lang/version.php b/module/upgrade/lang/version.php index 5720896112..6976636cb1 100644 --- a/module/upgrade/lang/version.php +++ b/module/upgrade/lang/version.php @@ -173,7 +173,8 @@ $lang->upgrade->fromVersions['18_0_beta1'] = '18.0.beta1'; $lang->upgrade->fromVersions['18_0_beta2'] = '18.0.beta2'; $lang->upgrade->fromVersions['18_0_beta3'] = '18.0.beta3'; $lang->upgrade->fromVersions['18_0'] = '18.0'; -$lang->upgrade->fromVersions['18_1'] = '18.1'; // pms insert position. +$lang->upgrade->fromVersions['18_1'] = '18.1'; +$lang->upgrade->fromVersions['18_2'] = '18.2'; // pms insert position. global $config; /* Lite. */ @@ -351,7 +352,8 @@ $lang->upgrade->fromVersions['biz8_0_beta1'] = 'Biz8.0.beta1'; $lang->upgrade->fromVersions['biz8_0_beta2'] = 'Biz8.0.beta2'; $lang->upgrade->fromVersions['biz8_0_beta3'] = 'Biz8.0.beta3'; $lang->upgrade->fromVersions['biz8_0'] = 'Biz8.0'; -$lang->upgrade->fromVersions['biz8_1'] = 'Biz8.1'; // biz insert position. +$lang->upgrade->fromVersions['biz8_1'] = 'Biz8.1'; +$lang->upgrade->fromVersions['biz8_2'] = 'Biz8.2'; // biz insert position. /* Max. */ $lang->upgrade->fromVersions['max2_0_beta4'] = 'Max2.0.beta4'; @@ -385,4 +387,5 @@ $lang->upgrade->fromVersions['max3_8'] = 'Max3.8'; $lang->upgrade->fromVersions['max4_0_beta1'] = 'Max4.0.beta1'; $lang->upgrade->fromVersions['max4_0_beta2'] = 'Max4.0.beta2'; $lang->upgrade->fromVersions['max4_0_beta3'] = 'Max4.0.beta3'; -$lang->upgrade->fromVersions['max4_0'] = 'Max4.0'; // max insert position. +$lang->upgrade->fromVersions['max4_0'] = 'Max4.0'; +$lang->upgrade->fromVersions['max4_1'] = 'Max4.1'; // max insert position. diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 19e6f4cd63..dd86027b06 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -1085,7 +1085,9 @@ class upgradeModel extends model case '18_0_beta3': $confirmContent .= file_get_contents($this->getUpgradeFile('18.0.beta3')); case '18_0': - $confirmContent .= file_get_contents($this->getUpgradeFile('18.0')); // confirm insert position. + $confirmContent .= file_get_contents($this->getUpgradeFile('18.0')); + case '18_1': + $confirmContent .= file_get_contents($this->getUpgradeFile('18.1')); // confirm insert position. } return $confirmContent; From 4912b2004efa741486e54750be4753c577eaf6ae Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 27 Feb 2023 06:54:39 +0000 Subject: [PATCH 184/349] * Finish task #85630. --- module/admin/config.php | 2 +- module/admin/lang/menu.php | 2 ++ module/common/lang/de.php | 1 + module/common/lang/en.php | 1 + module/common/lang/fr.php | 1 + module/common/lang/zh-cn.php | 1 + module/custom/control.php | 19 +++++++++++++ module/custom/css/percent.css | 3 +++ module/custom/lang/de.php | 3 +++ module/custom/lang/en.php | 3 +++ module/custom/lang/fr.php | 3 +++ module/custom/lang/zh-cn.php | 3 +++ module/custom/view/percent.html.php | 42 +++++++++++++++++++++++++++++ module/group/lang/resource.php | 2 ++ 14 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 module/custom/css/percent.css create mode 100644 module/custom/view/percent.html.php diff --git a/module/admin/config.php b/module/admin/config.php index 6739ff17f1..6db2ea5444 100755 --- a/module/admin/config.php +++ b/module/admin/config.php @@ -10,7 +10,7 @@ if(!isset($config->safe->weak)) $config->safe->weak = '123456,password,12345,123 $config->admin->menuGroup['system'] = array('custom|mode', 'backup', 'cron', 'action|trash', 'admin|xuanxuan', 'setting|xuanxuan', 'admin|license', 'admin|checkweak', 'admin|resetpwdsetting', 'admin|safe', 'custom|timezone', 'search|buildindex', 'admin|tableengine', 'ldap', 'custom|libreoffice', 'conference', 'client'); $config->admin->menuGroup['user'] = array('dept', 'company', 'user', 'group'); $config->admin->menuGroup['switch'] = array('admin|setmodule'); -$config->admin->menuGroup['model'] = array('auditcl', 'stage', 'design', 'cmcl', 'reviewcl', 'custom|required', 'custom|set', 'custom|flow', 'custom|code', 'custom|estimate', 'custom|hours', 'subject', 'process', 'activity', 'zoutput', 'classify', 'holiday', 'reviewsetting'); +$config->admin->menuGroup['model'] = array('auditcl', 'stage', 'design', 'cmcl', 'reviewcl', 'custom|required', 'custom|set', 'custom|flow', 'custom|code', 'custom|percent','custom|estimate', 'custom|hours', 'subject', 'process', 'activity', 'zoutput', 'classify', 'holiday', 'reviewsetting'); $config->admin->menuGroup['feature'] = array('custom|set', 'custom|product', 'custom|execution', 'custom|required', 'custom|kanban', 'approvalflow', 'measurement', 'meetingroom', 'custom|browsestoryconcept', 'custom|kanban', 'sqlbuilder', 'report'); $config->admin->menuGroup['template'] = array('custom|set', 'baseline'); $config->admin->menuGroup['message'] = array('mail', 'webhook', 'sms', 'message'); diff --git a/module/admin/lang/menu.php b/module/admin/lang/menu.php index 4bbbd8b777..e71cbb1706 100644 --- a/module/admin/lang/menu.php +++ b/module/admin/lang/menu.php @@ -89,6 +89,7 @@ $lang->admin->menuList->model['tabMenu']['common']['stage'] = array('link $lang->admin->menuList->model['tabMenu']['common']['build'] = array('link' => "{$lang->build->common}|custom|required|module=build", 'alias' => 'set', 'exclude' => 'custom'); $lang->admin->menuList->model['tabMenu']['common']['flow'] = array('link' => "{$lang->custom->flow}|custom|flow|", 'divider' => true); $lang->admin->menuList->model['tabMenu']['common']['code'] = array('link' => "{$lang->code}|custom|code|"); +$lang->admin->menuList->model['tabMenu']['common']['percent'] = array('link' => "{$lang->stage->percent}|custom|percent|"); $lang->admin->menuList->model['tabMenu']['common']['hours'] = array('link' => "{$lang->workingHour}|custom|hours|", 'subModule' => 'holiday', 'links' => array('holiday|browse|')); $lang->admin->menuList->model['tabMenu']['waterfall']['stage'] = array('link' => "{$lang->stage->common}|stage|browse|", 'subModule' => 'stage', 'exclude' => 'stage-plusbrowse'); $lang->admin->menuList->model['tabMenu']['waterfallplus']['stage'] = array('link' => "{$lang->stage->common}|stage|plusbrowse|", 'subModule' => 'stage', 'exclude' => 'stage-browse'); @@ -97,6 +98,7 @@ $lang->admin->menuList->model['tabMenu']['menuOrder']['common']['7'] = 's $lang->admin->menuList->model['tabMenu']['menuOrder']['common']['10'] = 'build'; $lang->admin->menuList->model['tabMenu']['menuOrder']['common']['35'] = 'flow'; $lang->admin->menuList->model['tabMenu']['menuOrder']['common']['40'] = 'code'; +$lang->admin->menuList->model['tabMenu']['menuOrder']['common']['43'] = 'percent'; $lang->admin->menuList->model['tabMenu']['menuOrder']['common']['45'] = 'hours'; $lang->admin->menuList->model['tabMenu']['menuOrder']['waterfall']['5'] = 'stage'; $lang->admin->menuList->model['tabMenu']['menuOrder']['waterfallplus']['5'] = 'stage'; diff --git a/module/common/lang/de.php b/module/common/lang/de.php index 4810af6d36..1ab1b5ea48 100644 --- a/module/common/lang/de.php +++ b/module/common/lang/de.php @@ -203,6 +203,7 @@ $lang->design->DBDS = 'DBDS'; $lang->design->ADS = 'ADS'; $lang->stage->common = 'Stage'; $lang->stage->list = 'Stage List'; +$lang->stage->percent = 'Workload Ratio'; $lang->execution->list = "{$lang->executionCommon} List"; $lang->kanban->common = 'Kanban'; $lang->backup->common = 'Backup'; diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 7e772786e2..ad77a8cefd 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -203,6 +203,7 @@ $lang->design->DBDS = 'Database Design'; $lang->design->ADS = 'Interface Design'; $lang->stage->common = 'Stage'; $lang->stage->list = 'Stage List'; +$lang->stage->percent = 'Workload Ratio'; $lang->execution->list = "{$lang->executionCommon} List"; $lang->kanban->common = 'Kanban'; $lang->backup->common = 'Backup'; diff --git a/module/common/lang/fr.php b/module/common/lang/fr.php index f366dd685b..7a7151bfbd 100644 --- a/module/common/lang/fr.php +++ b/module/common/lang/fr.php @@ -203,6 +203,7 @@ $lang->design->DBDS = 'DBDS'; $lang->design->ADS = 'ADS'; $lang->stage->common = 'Stage'; $lang->stage->list = 'Stage List'; +$lang->stage->percent = 'Workload Ratio'; $lang->execution->list = "{$lang->executionCommon} List"; $lang->kanban->common = 'Kanban'; $lang->backup->common = 'Backup'; diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 5cd8b557c0..c947d2f92b 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -203,6 +203,7 @@ $lang->design->DBDS = '数据库设计'; $lang->design->ADS = '接口设计'; $lang->stage->common = '阶段'; $lang->stage->list = '阶段列表'; +$lang->stage->percent = '工作量占比'; $lang->execution->list = "{$lang->executionCommon}列表"; $lang->kanban->common = '看板'; $lang->backup->common = '备份'; diff --git a/module/custom/control.php b/module/custom/control.php index 1a1f8e835b..8ef684b846 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -862,6 +862,25 @@ class custom extends control $this->display(); } + /** + * Set stage percent. + * + * @access public + * @return void + */ + public function percent() + { + if($_POST) + { + $this->loadModel('setting')->setItem('system.common.setPercent', $this->post->percent); + return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload')); + } + + $this->view->title = $this->lang->stage->percent; + + $this->display(); + } + /** * Set hours and weekend * diff --git a/module/custom/css/percent.css b/module/custom/css/percent.css new file mode 100644 index 0000000000..f29730761e --- /dev/null +++ b/module/custom/css/percent.css @@ -0,0 +1,3 @@ +.table-form>tbody>tr>th.c-setPercent {width: 135px;} +#readOnlyOfPercent {font-size: 13px; color: #5e626d; display: flex; width: 200%;} +#readOnlyOfPercent i {font-size: 14px; color: #0075ff; margin-right: 3px;} diff --git a/module/custom/lang/de.php b/module/custom/lang/de.php index b3140f2c89..dd6b01ad86 100644 --- a/module/custom/lang/de.php +++ b/module/custom/lang/de.php @@ -58,6 +58,8 @@ $lang->custom->executionCommon = 'Execution'; $lang->custom->selectDefaultProgram = 'Please select default program'; $lang->custom->defaultProgram = 'Default program'; $lang->custom->modeManagement = 'Mode Management'; +$lang->custom->percent = $lang->stage->percent; +$lang->custom->setPercent = "Enable or Disable {$lang->stage->percent}"; $lang->custom->unitList['efficiency'] = 'Working Hours/'; $lang->custom->unitList['manhour'] = 'Man-hour/'; @@ -198,6 +200,7 @@ $lang->custom->notice->storyReviewTip = 'After selecting by individual, pos $lang->custom->notice->selectAllTip = 'After selecting all people, the reviewers will be emptied and grayed out while hiding their positions and departments.'; $lang->custom->notice->repeatKey = 'Repeat Key %s'; $lang->custom->notice->readOnlyOfCode = 'A code is a management term that exists for secrecy or as an antonym. When code management is enabled, the code information of product, project, and execution in the system will be displayed in the creation, editing, detail, and list pages.'; +$lang->custom->notice->readOnlyOfPercent = 'The "Workload Ratio" is used to divide the workload of a project into different stages. The sum of the percentages of the same level stages cannot exceed 100%. After enabling the "Workload Ratio", users have to fill in the ratio fields when setting up the stages in the Waterfall project and Waterfall Plus project management models.'; $lang->custom->notice->indexPage['product'] = "ZenTao 8.2+ has Product Homepage. Do you want to go to Product Homepage?"; $lang->custom->notice->indexPage['project'] = "ZenTao 8.2+ has Project Homepage. Do you want to go to Project Homepage?"; diff --git a/module/custom/lang/en.php b/module/custom/lang/en.php index 8f2e139a8d..79cb3893e7 100644 --- a/module/custom/lang/en.php +++ b/module/custom/lang/en.php @@ -58,6 +58,8 @@ $lang->custom->executionCommon = 'Execution'; $lang->custom->selectDefaultProgram = 'Please select default program'; $lang->custom->defaultProgram = 'Default program'; $lang->custom->modeManagement = 'Mode Management'; +$lang->custom->percent = $lang->stage->percent; +$lang->custom->setPercent = "Enable or Disable {$lang->stage->percent}"; $lang->custom->unitList['efficiency'] = 'Working Hours/'; $lang->custom->unitList['manhour'] = 'Man-hour/'; @@ -198,6 +200,7 @@ $lang->custom->notice->storyReviewTip = 'After selecting by individual, pos $lang->custom->notice->selectAllTip = 'After selecting all people, the reviewers will be emptied and grayed out while hiding their positions and departments.'; $lang->custom->notice->repeatKey = 'Repeat Key %s'; $lang->custom->notice->readOnlyOfCode = 'A code is a management term that exists for secrecy or as an antonym. When code management is enabled, the code information of product, project, and execution in the system will be displayed in the creation, editing, detail, and list pages.'; +$lang->custom->notice->readOnlyOfPercent = 'The "Workload Ratio" is used to divide the workload of a project into different stages. The sum of the percentages of the same level stages cannot exceed 100%. After enabling the "Workload Ratio", users have to fill in the ratio fields when setting up the stages in the Waterfall project and Waterfall Plus project management models.'; $lang->custom->notice->indexPage['product'] = "ZenTao 8.2+ has Product Home. Do you want to go to Product Home?"; $lang->custom->notice->indexPage['project'] = "ZenTao 8.2+ has Project Home. Do you want to go to Project Home?"; diff --git a/module/custom/lang/fr.php b/module/custom/lang/fr.php index 2e43227781..d937dc876e 100644 --- a/module/custom/lang/fr.php +++ b/module/custom/lang/fr.php @@ -58,6 +58,8 @@ $lang->custom->executionCommon = 'Execution'; $lang->custom->selectDefaultProgram = 'Please select default program'; $lang->custom->defaultProgram = 'Default program'; $lang->custom->modeManagement = 'Mode Management'; +$lang->custom->percent = $lang->stage->percent; +$lang->custom->setPercent = "Enable or Disable {$lang->stage->percent}"; $lang->custom->unitList['efficiency'] = 'Working Hours/'; $lang->custom->unitList['manhour'] = 'Man-hour/'; @@ -198,6 +200,7 @@ $lang->custom->notice->storyReviewTip = 'After selecting by individual, pos $lang->custom->notice->selectAllTip = 'After selecting all people, the reviewers will be emptied and grayed out while hiding their positions and departments.'; $lang->custom->notice->repeatKey = 'Repeat Key %s'; $lang->custom->notice->readOnlyOfCode = "Le code est un terme de gestion utilisé pour la confidentialité ou comme alias. Lorsque la gestion du code est activée, le produit, le projet et l'exécution dans le système afficheront les informations de code sur les pages de création, de modification, de détails et de liste."; +$lang->custom->notice->readOnlyOfPercent = 'The "Workload Ratio" is used to divide the workload of a project into different stages. The sum of the percentages of the same level stages cannot exceed 100%. After enabling the "Workload Ratio", users have to fill in the ratio fields when setting up the stages in the Waterfall project and Waterfall Plus project management models.'; $lang->custom->notice->indexPage['product'] = "ZenTao 8.2+ possède une page d'accueil. Voulez-vous consulter la page d'accueil du produit ?"; $lang->custom->notice->indexPage['project'] = "ZenTao 8.2+ possède une page d'accueil. Voulez-vous consulter la page d'accueil du produit ?"; diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php index 8ed08ff52c..5c5c23350f 100644 --- a/module/custom/lang/zh-cn.php +++ b/module/custom/lang/zh-cn.php @@ -58,6 +58,8 @@ $lang->custom->executionCommon = '执行'; $lang->custom->selectDefaultProgram = '请选择一个默认项目集'; $lang->custom->defaultProgram = '默认项目集'; $lang->custom->modeManagement = '模式管理'; +$lang->custom->percent = $lang->stage->percent; +$lang->custom->setPercent = "是否启用{$lang->stage->percent}"; $lang->custom->unitList['efficiency'] = '工时/'; $lang->custom->unitList['manhour'] = '人时/'; @@ -198,6 +200,7 @@ $lang->custom->notice->storyReviewTip = '按人员、职位、部门勾选 $lang->custom->notice->selectAllTip = '勾选所有人员后,会清空并置灰评审人员,同时隐藏职位、部门。'; $lang->custom->notice->repeatKey = '%s键重复'; $lang->custom->notice->readOnlyOfCode = '代号是一种管理话术,主要便于保密或作为别名存在。启用代号管理后,系统中的产品、项目、执行在创建、编辑、详情、列表等页面均会展示代号信息。'; +$lang->custom->notice->readOnlyOfPercent = '工作量占比用于划分项目中存在多个阶段时的工作量的占比,同一级阶段的百分比之和最高为100%。启用工作量占比后,系统中的瀑布项目和融合瀑布项目模型中设置阶段时需要维护阶段的工作量占比。'; $lang->custom->notice->indexPage['product'] = "从8.2版本起增加了产品主页视图,是否默认进入产品主页?"; $lang->custom->notice->indexPage['project'] = "从8.2版本起增加了项目主页视图,是否默认进入项目主页?"; diff --git a/module/custom/view/percent.html.php b/module/custom/view/percent.html.php new file mode 100644 index 0000000000..25ecf9ddd0 --- /dev/null +++ b/module/custom/view/percent.html.php @@ -0,0 +1,42 @@ + + * @package custom + * @version $Id$ + * @link https://www.zentao.net + */ +?> +getModuleRoot() . 'common/view/header.html.php';?> +

+
+ + + + + + + + + + + + + + +
custom->setPercent;?> + setPercent) ? $config->setPercent : 0;?> + custom->conceptOptions->URAndSR as $key => $value):?> + + +
+
 
+
custom->notice->readOnlyOfPercent;?>
+
+ +
+
+
+ diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index c70d06f828..91b7e12faa 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -1444,6 +1444,7 @@ $lang->resource->custom->setDefaultConcept = 'setDefaultConcept'; $lang->resource->custom->deleteStoryConcept = 'deleteStoryConcept'; $lang->resource->custom->kanban = 'kanban'; $lang->resource->custom->code = 'code'; +$lang->resource->custom->percent = 'percent'; $lang->custom->methodOrder[5] = 'index'; $lang->custom->methodOrder[10] = 'set'; @@ -1461,6 +1462,7 @@ $lang->custom->methodOrder[65] = 'setDefaultConcept'; $lang->custom->methodOrder[70] = 'deleteStoryConcept'; $lang->custom->methodOrder[75] = 'kanban'; $lang->custom->methodOrder[80] = 'code'; +$lang->custom->methodOrder[85] = 'percent'; $lang->resource->datatable = new stdclass(); $lang->resource->datatable->setGlobal = 'setGlobal'; From f41f2cfb9bfe6cb0da7196e9699251a27d4fa2df Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Mon, 27 Feb 2023 06:57:19 +0000 Subject: [PATCH 185/349] * Add the lang item. --- module/admin/lang/en.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/admin/lang/en.php b/module/admin/lang/en.php index aba1645159..88bcf84189 100755 --- a/module/admin/lang/en.php +++ b/module/admin/lang/en.php @@ -72,6 +72,7 @@ $lang->admin->registerNotice->click = 'Sign Up'; $lang->admin->registerNotice->lblAccount = '>= 3 letters and numbers'; $lang->admin->registerNotice->lblPasswd = '>= 6 letters and numbers'; $lang->admin->registerNotice->submit = 'Submit'; +$lang->admin->registerNotice->submitHere = 'RegistierenHere'; $lang->admin->registerNotice->bind = "Bind Exsiting Account"; $lang->admin->registerNotice->success = "You have signed up!"; From 599150da94ba28c682a3d93fe7bdec749c6411c8 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 27 Feb 2023 06:58:37 +0000 Subject: [PATCH 186/349] * Fix bug #32442. --- module/programplan/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/programplan/model.php b/module/programplan/model.php index 5bd2ca475f..716881a5e9 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -868,7 +868,7 @@ class programplanModel extends model if($data->id) { $stageID = $data->id; - unset($data->id); + unset($data->id, $data->type); $oldStage = $this->getByID($stageID); $planChanged = ($oldStage->name != $data->name || $oldStage->milestone != $data->milestone || $oldStage->begin != $data->begin || $oldStage->end != $data->end); From 1bf386225a045b39f428f78b9875834208cf06c7 Mon Sep 17 00:00:00 2001 From: zhaoke Date: Mon, 27 Feb 2023 15:09:26 +0800 Subject: [PATCH 187/349] * Fix zanode lang file. --- module/zanode/lang/de.php | 6 +++++- module/zanode/lang/en.php | 8 ++++---- module/zanode/lang/fr.php | 6 +++++- module/zanode/lang/zh-cn.php | 9 ++++----- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/module/zanode/lang/de.php b/module/zanode/lang/de.php index 6fb124d62c..76e365c3a0 100644 --- a/module/zanode/lang/de.php +++ b/module/zanode/lang/de.php @@ -48,6 +48,7 @@ $lang->zanode->confirmReboot = "Are you sure to restart the ZenAgent Node?"; $lang->zanode->confirmShutdown = "Are you sure to shutdown the ZenAgent Node?"; $lang->zanode->confirmSuspend = "Are you sure to suspend the ZenAgent Node?"; $lang->zanode->confirmResume = "Are you sure to resume the ZenAgent Node?"; +$lang->zanode->confirmRestore = "The ZenAgent Node will be restored to this snapshot state, are you sure you want to continue?"; $lang->zanode->actionSuccess = 'Success'; $lang->zanode->deleted = "Deleted"; $lang->zanode->scriptPath = "Script path"; @@ -90,6 +91,7 @@ $lang->zanode->deleteSnapshot = 'Delete Snapshot'; $lang->zanode->snapshotEmpty = 'No snapshots'; $lang->zanode->confirmDeleteSnapshot = "The snapshot cannot be restored from the recycle bin after being deleted. Are you sure to continue?"; +$lang->zanode->snapshot = new stdClass(); $lang->zanode->snapshot->statusList['creating'] = 'Creating'; $lang->zanode->snapshot->statusList['completed'] = 'Create Completed'; $lang->zanode->snapshot->statusList['failed'] = 'Create Failed'; @@ -97,7 +99,9 @@ $lang->zanode->snapshot->statusList['restoring'] = 'Restoring'; $lang->zanode->snapshot->statusList['restore_failed'] = 'Restore Failed'; $lang->zanode->snapshot->statusList['restore_completed'] = 'Restore Completed'; -$lang->zanode->imageNameEmpty = 'Name can not be empty.'; +$lang->zanode->imageNameEmpty = 'Name can not be empty.'; +$lang->zanode->snapStatusError = 'Snapshot is not ready.'; +$lang->zanode->snapRestoring = 'Snapshot is restoring.'; $lang->zanode->runTimeout = 'Network connection timeout, please check the host and execution node status.'; diff --git a/module/zanode/lang/en.php b/module/zanode/lang/en.php index 563d3eed23..8f7bc3edb3 100644 --- a/module/zanode/lang/en.php +++ b/module/zanode/lang/en.php @@ -48,7 +48,6 @@ $lang->zanode->confirmReboot = "Are you sure to restart the ZenAgent Node?"; $lang->zanode->confirmShutdown = "Are you sure to shutdown the ZenAgent Node?"; $lang->zanode->confirmSuspend = "Are you sure to suspend the ZenAgent Node?"; $lang->zanode->confirmResume = "Are you sure to resume the ZenAgent Node?"; -$lang->zanode->confirmRestore = "Are you sure to restore the ZenAgent Node?"; $lang->zanode->confirmRestore = "The ZenAgent Node will be restored to this snapshot state, are you sure you want to continue?"; $lang->zanode->actionSuccess = 'Success'; $lang->zanode->deleted = "Deleted"; @@ -92,6 +91,7 @@ $lang->zanode->deleteSnapshot = 'Delete Snapshot'; $lang->zanode->snapshotEmpty = 'No snapshots'; $lang->zanode->confirmDeleteSnapshot = "The snapshot cannot be restored from the recycle bin after being deleted. Are you sure to continue?"; +$lang->zanode->snapshot = new stdClass(); $lang->zanode->snapshot->statusList['creating'] = 'Creating'; $lang->zanode->snapshot->statusList['completed'] = 'Create Completed'; $lang->zanode->snapshot->statusList['failed'] = 'Create Failed'; @@ -151,8 +151,8 @@ $lang->zanode->init->title = "Initialize Node"; $lang->zanode->init->descTitle = "Follow these steps to complete the initialization on the node:"; $lang->zanode->init->initDesc = "Execute the init script on the node: %s %s
- Click check service status button."; -$lang->zanode->tips = "The execution node is a virtual machine or container instance created by the host machine, which is a test environment for executing test tasks. After the execution node is configured with the automated test environment, the script can be automatically executed, and the results can be viewed in the execution results of Zen Dao's application cases."; -$lang->zanode->scriptTips = 'Write the directory where the script is located on the execution node.'; -$lang->zanode->shellTips = 'Before running the automated test script on the execution node, you can execute a custom shell command.'; +$lang->zanode->tips = "The execution node is a virtual machine or container instance created by the host machine, which is a test environment for executing test tasks. After the execution node is configured with the automated test environment, the script can be automatically executed, and the results can be viewed in the execution results of Zen Dao's application cases."; +$lang->zanode->scriptTips = 'Write the directory where the script is located on the execution node.'; +$lang->zanode->shellTips = 'Before running the automated test script on the execution node, you can execute a custom shell command.'; $lang->zanode->automationTips = 'Before executing the test task on the execution node, you need to set up the execution node corresponding to the product, the directory of the automated test script, and the custom Shell command to execute.'; $lang->zanode->nameUnique = $lang->zanode->name . 'already exist'; diff --git a/module/zanode/lang/fr.php b/module/zanode/lang/fr.php index 6fb124d62c..76e365c3a0 100644 --- a/module/zanode/lang/fr.php +++ b/module/zanode/lang/fr.php @@ -48,6 +48,7 @@ $lang->zanode->confirmReboot = "Are you sure to restart the ZenAgent Node?"; $lang->zanode->confirmShutdown = "Are you sure to shutdown the ZenAgent Node?"; $lang->zanode->confirmSuspend = "Are you sure to suspend the ZenAgent Node?"; $lang->zanode->confirmResume = "Are you sure to resume the ZenAgent Node?"; +$lang->zanode->confirmRestore = "The ZenAgent Node will be restored to this snapshot state, are you sure you want to continue?"; $lang->zanode->actionSuccess = 'Success'; $lang->zanode->deleted = "Deleted"; $lang->zanode->scriptPath = "Script path"; @@ -90,6 +91,7 @@ $lang->zanode->deleteSnapshot = 'Delete Snapshot'; $lang->zanode->snapshotEmpty = 'No snapshots'; $lang->zanode->confirmDeleteSnapshot = "The snapshot cannot be restored from the recycle bin after being deleted. Are you sure to continue?"; +$lang->zanode->snapshot = new stdClass(); $lang->zanode->snapshot->statusList['creating'] = 'Creating'; $lang->zanode->snapshot->statusList['completed'] = 'Create Completed'; $lang->zanode->snapshot->statusList['failed'] = 'Create Failed'; @@ -97,7 +99,9 @@ $lang->zanode->snapshot->statusList['restoring'] = 'Restoring'; $lang->zanode->snapshot->statusList['restore_failed'] = 'Restore Failed'; $lang->zanode->snapshot->statusList['restore_completed'] = 'Restore Completed'; -$lang->zanode->imageNameEmpty = 'Name can not be empty.'; +$lang->zanode->imageNameEmpty = 'Name can not be empty.'; +$lang->zanode->snapStatusError = 'Snapshot is not ready.'; +$lang->zanode->snapRestoring = 'Snapshot is restoring.'; $lang->zanode->runTimeout = 'Network connection timeout, please check the host and execution node status.'; diff --git a/module/zanode/lang/zh-cn.php b/module/zanode/lang/zh-cn.php index 220b61ae5e..a93e113823 100644 --- a/module/zanode/lang/zh-cn.php +++ b/module/zanode/lang/zh-cn.php @@ -99,7 +99,6 @@ $lang->zanode->snapshot->statusList['restoring'] = '还原中'; $lang->zanode->snapshot->statusList['restore_failed'] = '还原失败'; $lang->zanode->snapshot->statusList['restore_completed'] = '还原成功'; -$lang->zanode->imageNameEmpty = '名称不能为空'; $lang->zanode->imageNameEmpty = '名称不能为空'; $lang->zanode->snapStatusError = '快照不可用'; $lang->zanode->snapRestoring = '快照正在还原中'; @@ -130,7 +129,7 @@ $lang->zanode->statusList['restoring'] = '还原中'; $lang->zanode->initNotice = "保存成功,请初始化执行节点或返回列表。"; $lang->zanode->initButton = "去初始化"; -$lang->zanode->init = new stdclass; +$lang->zanode->init = new stdClass(); $lang->zanode->init->statusTitle = "服务状态"; $lang->zanode->init->checkStatus = "检测服务状态"; $lang->zanode->init->not_install = "未安装"; @@ -152,8 +151,8 @@ $lang->zanode->init->title = "初始化执行节点"; $lang->zanode->init->descTitle = "请根据引导完成执行节点上的初始化: "; $lang->zanode->init->initDesc = "- 在执行节点上执行命令:%s %s
- 点击检测服务状态。";$lang->zanode->init->statusTitle = "服务状态"; -$lang->zanode->tips = '执行节点是由宿主机创建的虚拟机或容器实例,是执行测试任务的测试环境,在执行节点配置自动化测试环境后可以自动执行脚本,结果可以在禅道对应用例执行结果中查看。'; -$lang->zanode->scriptTips = '填写执行节点上自动化测试脚本所在的目录。'; -$lang->zanode->shellTips = '在执行节点上运行自动化测试脚本前,可以执行自定义的shell命令。'; +$lang->zanode->tips = '执行节点是由宿主机创建的虚拟机或容器实例,是执行测试任务的测试环境,在执行节点配置自动化测试环境后可以自动执行脚本,结果可以在禅道对应用例执行结果中查看。'; +$lang->zanode->scriptTips = '填写执行节点上自动化测试脚本所在的目录。'; +$lang->zanode->shellTips = '在执行节点上运行自动化测试脚本前,可以执行自定义的shell命令。'; $lang->zanode->automationTips = '在执行节点上执行测试任务前,需要设置产品对应的执行节点,自动化测试脚本的目录以及需要执行的自定义Shell命令。'; $lang->zanode->nameUnique = $lang->zanode->name . '已存在'; From 1f88b86fda4e02a98e655775ea7584ed0f0b96c1 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Mon, 27 Feb 2023 15:13:03 +0800 Subject: [PATCH 188/349] * Code for update zui/min.js . --- www/js/zui/min.js | 78 +++++------------------------------------------ 1 file changed, 7 insertions(+), 71 deletions(-) diff --git a/www/js/zui/min.js b/www/js/zui/min.js index 470d2404d9..d6264863d5 100644 --- a/www/js/zui/min.js +++ b/www/js/zui/min.js @@ -1,80 +1,16 @@ /*! - * ZUI: ZUI for Zentao - v1.10.0 - 2022-11-08 + * ZUI: Standard edition - v1.10.0 - 2023-02-27 * http://openzui.com * GitHub: https://github.com/easysoft/zui.git - * Copyright (c) 2022 cnezsoft.com; Licensed MIT + * Copyright (c) 2023 cnezsoft.com; Licensed MIT */ -!function(t,e,i){"use strict";if("undefined"==typeof t)throw new Error("ZUI requires jQuery");Number.isNaN||"function"!=typeof isNaN||(Number.isNaN=isNaN),Number.parseInt||"function"!=typeof parseInt||(Number.parseInt=parseInt),Number.parseFloat||"function"!=typeof parseFloat||(Number.parseFloat=parseFloat),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?0:t.zui.getScrollbarSize()},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 c=o.options[r];"function"==typeof c&&(l.result=t.zui.callEvent(c,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(){"use strict";function t(t,e){return i&&!e?requestAnimationFrame(t):setTimeout(t,e||0)}function e(t){return i?cancelAnimationFrame(t):void clearTimeout(t)}var i="function"==typeof window.requestAnimationFrame;$.zui({asap:t,clearAsap:e})}(),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(c)),i.$.append(c))}var h=null;return i.$.children("li").each(function(){var e=t(this),i=!!e.children(".pager-item").length;h?h.toggleClass("pager-item-right",!i):i&&e.addClass("pager-item-left"),h=i?e:null}),h&&h.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(),c=o.attr("data-parent"),h=c&&t(c);r&&r.transitioning||(h&&h.find('[data-toggle=collapse][data-parent="'+c+'"]').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},c=function(t,e){return[31,l(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},h=function(t){return c(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,h(t))),t},p=function(t,e){e=e||1;for(var i=new Date(t.getTime());i.getDay()!=e;)i=s(i,-1);return d(i)},f=function(t,e){return t.toDateString()===e.toDateString()},g=function(t,e){var i=p(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}))}(),/*! +/*! Some code copy from Bootstrap v3.0.0 by @fat and @mdo. (Copyright 2013 Twitter, Inc. Licensed under http://www.apache.org/licenses/)*/ +!function(t,e,n){"use strict";if("undefined"==typeof t)throw new Error("ZUI requires jQuery");Number.isNaN||"function"!=typeof isNaN||(Number.isNaN=isNaN),Number.parseInt||"function"!=typeof parseInt||(Number.parseInt=parseInt),Number.parseFloat||"function"!=typeof parseFloat||(Number.parseFloat=parseFloat),t.zui||(t.zui=function(e){t.isPlainObject(e)&&t.extend(t.zui,e)});var i={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,i){if("function"==typeof t){i!==n&&(t=t.bind(i));var o=t(e);return e&&(e.result=o),!(o!==n&&!o)}return 1},strCode:function(t){var e=0;if("string"!=typeof t&&(t=String(t)),t&&t.length)for(var n=0;n=e.innerWidth?0:t.zui.getScrollbarSize()},fixBodyScrollbar:function(){if(t.zui.checkBodyScrollbar()){var e=t("body"),n=parseInt(e.css("padding-right")||0,10);return t.zui._scrollbarWidth&&e.css({paddingRight:n+t.zui._scrollbarWidth,overflowY:"hidden"}),!0}},resetBodyScrollbar:function(){t("body").css({paddingRight:"",overflowY:""})}}),t.fn.callEvent=function(e,i,o){var a=t(this),r=e.indexOf(".zui."),s=r<0?e:e.substring(0,r),l=t.Event(s,i);if(o===n&&r>0&&(o=a.data(e.substring(r+1))),o&&o.options){var d=o.options[s];"function"==typeof d&&(l.result=t.zui.callEvent(d,l,o))}return a.trigger(l),l},t.fn.callComEvent=function(t,e,i){i===n||Array.isArray(i)||(i=[i]);var o,a=this;a.trigger(e,i);var r=t.options[e];return r&&(o=r.apply(t,i)),o}}(jQuery,window,void 0),function(){"use strict";function t(t,e){return n&&!e?requestAnimationFrame(t):setTimeout(t,e||0)}function e(t){return n?cancelAnimationFrame(t):void clearTimeout(t)}var n="function"==typeof window.requestAnimationFrame;$.zui({asap:t,clearAsap:e})}(),function(t){"use strict";t.fn.fixOlPd=function(e){return e=e||10,this.each(function(){var n=t(this);n.css("paddingLeft",Math.ceil(Math.log10(n.children().length))*e+10)})},t(function(){t(".ol-pd-fix,.article ol").fixOlPd()})}(jQuery),+function(t){"use strict";var e=function(n,i){this.$element=t(n),this.options=t.extend({},e.DEFAULTS,i),this.isLoading=!1};e.DEFAULTS={loadingText:"loading..."},e.prototype.setState=function(t){var e="disabled",n=this.$element,i=n.is("input")?"val":"html",o=n.data();t+="Text",o.resetText||n.data("resetText",n[i]()),n[i](o[t]||this.options[t]),setTimeout(function(){"loadingText"==t?(this.isLoading=!0,n.addClass(e).attr(e,e)):this.isLoading&&(this.isLoading=!1,n.removeClass(e).removeAttr(e))}.bind(this),0)},e.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")&&(n.prop("checked")&&this.$element.hasClass("active")?t=!1:e.find(".active").removeClass("active")),t&&n.prop("checked",!this.$element.hasClass("active")).trigger("change")}t&&this.$element.toggleClass("active")};var n=t.fn.button;t.fn.button=function(n){return this.each(function(){var i=t(this),o=i.data("zui.button"),a="object"==typeof n&&n;o||i.data("zui.button",o=new e(this,a)),"toggle"==n?o.toggle():n&&o.setState(n)})},t.fn.button.Constructor=e,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.zui.button.data-api","[data-toggle^=button]",function(e){var n=t(e.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle"),e.preventDefault()})}(jQuery),+function(t){"use strict";var e='[data-dismiss="alert"]',n="zui.alert",i=function(n){t(n).on("click",e,this.close)};i.prototype.close=function(e){function i(){r.trigger("closed."+n).remove()}var o=t(this),a=o.attr("data-target");a||(a=o.attr("href"),a=a&&a.replace(/.*(?=#[^\s]*$)/,""));var r=t(a);e&&e.preventDefault(),r.length||(r=o.hasClass("alert")?o:o.parent()),r.trigger(e=t.Event("close."+n)),e.isDefaultPrevented()||(r.removeClass("in"),t.support.transition&&r.hasClass("fade")?r.one(t.support.transition.end,i).emulateTransitionEnd(150):i())};var o=t.fn.alert;t.fn.alert=function(e){return this.each(function(){var o=t(this),a=o.data(n);a||o.data(n,a=new i(this)),"string"==typeof e&&a[e].call(o)})},t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click."+n+".data-api",e,i.prototype.close)}(window.jQuery),function(t,e){"use strict";var n="zui.pager",i={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,i){var r=this;r.name=n,r.$=t(e),i=r.options=t.extend({},a.DEFAULTS,this.$.data(),i),r.langName=i.lang||t.zui.clientLang(),r.lang=t.zui.getLangData(n,r.langName,o),r.state={},r.set(i.page,i.recTotal,i.recPerPage,!0),r.$.on("click",".pager-goto-btn",function(){var e=t(this).closest(".pager-goto"),n=parseInt(e.find(".pager-goto-input").val());NaN!==n&&r.set(n)}).on("click",".pager-item",function(){var e=t(this).data("page");"number"==typeof e&&e>0&&r.set(e)}).on("click",".pager-size-menu [data-size]",function(){var e=t(this).data("size");"number"==typeof e&&e>0&&r.set(-1,-1,e)})};a.prototype.set=function(e,n,o,a){var r=this;"object"==typeof e&&null!==e&&(o=e.recPerPage,n=e.recTotal,e=e.page);var s=r.state;s||(s=t.extend({},i));var l=t.extend({},s);return"number"==typeof o&&o>0&&(s.recPerPage=o),"number"==typeof n&&n>=0&&(s.recTotal=n),"number"==typeof e&&e>=0&&(s.page=e),s.totalPage=s.recTotal&&s.recPerPage?Math.ceil(s.recTotal/s.recPerPage):1,s.page=Math.max(0,Math.min(s.page,s.totalPage)),s.pageRecCount=s.recTotal,s.page&&s.recTotal&&(s.page1&&(s.pageRecCount=s.recTotal-s.recPerPage*(s.page-1))),s.skip=s.page>1?(s.page-1)*s.recPerPage:0,s.start=s.skip+1,s.end=s.skip+s.pageRecCount,s.prev=s.page>1?s.page-1:0,s.next=s.page').attr("href",n?a.createLink(n,a.state):"###").html(i);return o||(r=t("
  • ").append(r).toggleClass("active",n===a.state.page).toggleClass("disabled",!n||n===a.state.page)),r},a.prototype.createNavItems=function(t){var n=this,i=n.$,o=n.state,a=o.totalPage,r=o.page,s=function(t,o){if(t===!1)return void i.append(n.createLinkItem(0,o||n.options.navEllipsisItem));o===e&&(o=t);for(var a=t;a<=o;++a)i.append(n.createLinkItem(a))};t===e&&(t=n.options.maxNavCount||10),s(1),a>1&&(a<=t?s(2,a):ra-t+2?(s(!1),s(a-t+2,a)):(s(!1),s(r-Math.ceil((t-4)/2),r+Math.floor((t-4)/2)),s(!1),s(a)))},a.prototype.createGoto=function(){var e=this,n=this.state,i=t('
    ");return i},a.prototype.createSizeMenu=function(){var e=this,n=this.state,i=t(''),o=e.options.pageSizeOptions;"string"==typeof o&&(o=o.split(","));for(var a=0;a'+r+"
  • ").toggleClass("active",r===n.recPerPage);i.append(s)}return t('
    ').addClass(e.options.menuDirection).append(i)},a.prototype.createElement=function(e,n,i){var o=this,a=o.createLinkItem.bind(o),r=o.lang;switch(e){case"prev":return a(i.prev,r.prev);case"prev_icon":return a(i.prev,'');case"next":return a(i.next,r.next);case"next_icon":return a(i.next,'');case"first":return a(1,r.first);case"first_icon":return a(1,'');case"last":return a(i.totalPage,r.last);case"last_icon":return a(i.totalPage,'');case"space":case"|":return t('
  • ');case"nav":case"pages":return void o.createNavItems();case"total_text":return t(('
    '+r.totalCount+"
    ").format(i));case"page_text":return t(('
    '+r.pageOf+"
    ").format(i));case"total_page_text":return t(('
    '+r.totalPage+"
    ").format(i));case"page_of_total_text":return t(('
    '+r.pageOfTotal+"
    ").format(i));case"page_size_text":return t(('
    '+r.pageSize+"
    ").format(i));case"items_range_text":return t(('
    '+r.itemsRange+"
    ").format(i));case"goto":return o.createGoto();case"size_menu":return o.createSizeMenu();default:return t("
  • ").html(e.format(i))}},a.prototype.createLink=function(n,i){n===e&&(n=this.state.page),i===e&&(i=this.state);var o=this.options.linkCreator;return"string"==typeof o?o.format(t.extend({},i,{page:n})):"function"==typeof o?o(n,i):"#page="+n},a.prototype.render=function(e){var n=this,i=n.state,o=n.options.elementCreator||n.createElement,a=t.isPlainObject(o);e=e||n.elements||n.options.elements,"string"==typeof e&&(e=e.split(",")),n.elements=e,n.$.empty();for(var r=0;r").append(d)),n.$.append(d))}var c=null;return n.$.children("li").each(function(){var e=t(this),n=!!e.children(".pager-item").length;c?c.toggleClass("pager-item-right",!n):n&&e.addClass("pager-item-left"),c=n?e:null}),c&&c.addClass("pager-item-right"),n.$.callComEvent(n,"onRender",[i]),n},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]},i),t.fn.pager=function(e){return this.each(function(){var i=t(this),o=i.data(n),r="object"==typeof e&&e;o||i.data(n,o=new a(this,r)),"string"==typeof e&&o[e]()})},a.NAME=n,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",n=function(e){this.element=t(e)};n.prototype.show=function(){var n=this.element,i=n.closest("ul:not(.dropdown-menu)"),o=n.attr("data-target")||n.attr("data-tab");if(o||(o=n.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),!n.parent("li").hasClass("active")){var a=i.find(".active:last a")[0],r=t.Event("show."+e,{relatedTarget:a});if(n.trigger(r),!r.isDefaultPrevented()){var s=t(o);this.activate(n.parent("li"),i),this.activate(s,s.parent(),function(){n.trigger({type:"shown."+e,relatedTarget:a})})}}},n.prototype.activate=function(e,n,i){function o(){a.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),e.addClass("active"),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active"),i&&i()}var a=n.find("> .active"),r=i&&t.support.transition&&a.hasClass("fade");r?a.one(t.support.transition.end,o).emulateTransitionEnd(150):o(),a.removeClass("in")};var i=t.fn.tab;t.fn.tab=function(i){return this.each(function(){var o=t(this),a=o.data(e);a||o.data(e,a=new n(this)),"string"==typeof i&&a[i]()})},t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=i,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 n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;t(this).one("bsTransitionEnd",function(){n=!0});var o=function(){n||t(i).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",n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.transitioning=null,this.options.parent&&(this.$parent=t(this.options.parent)),this.options.toggle&&this.toggle()};n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var n=t.Event("show."+e);if(this.$element.trigger(n),!n.isDefaultPrevented()){var i=this.$parent&&this.$parent.find(".in");if(i&&i.length){var o=i.data(e);if(o&&o.transitioning)return;i.collapse("hide"),o||i.data(e,null)}var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0),this.transitioning=1;var r=function(){this.$element.removeClass("collapsing").addClass("in")[a]("auto"),this.transitioning=0,this.$element.trigger("shown."+e)};if(!t.support.transition)return r.call(this);var s=t.camelCase(["scroll",a].join("-"));this.$element.one(t.support.transition.end,r.bind(this)).emulateTransitionEnd(350)[a](this.$element[0][s])}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var n=t.Event("hide."+e);if(this.$element.trigger(n),!n.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[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[i](0).one(t.support.transition.end,o.bind(this)).emulateTransitionEnd(350):o.call(this)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var i=t.fn.collapse;t.fn.collapse=function(i){return this.each(function(){var o=t(this),a=o.data(e),r=t.extend({},n.DEFAULTS,o.data(),"object"==typeof i&&i);a||o.data(e,a=new n(this,r)),"string"==typeof i&&a[i]()})},t.fn.collapse.Constructor=n,t.fn.collapse.noConflict=function(){return t.fn.collapse=i,this},t(document).on("click."+e+".data-api","[data-toggle=collapse]",function(n){var i,o=t(this),a=o.attr("data-target")||n.preventDefault()||(i=o.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""),r=t(a),s=r.data(e),l=s?"toggle":o.data(),d=o.attr("data-parent"),c=d&&t(d);s&&s.transitioning||(c&&c.find('[data-toggle=collapse][data-parent="'+d+'"]').not(o).addClass("collapsed"),o[r.hasClass("in")?"addClass":"removeClass"]("collapsed")),r.collapse(l)})}(window.jQuery),function(t,e){"use strict";var n=1200,i=992,o=768,a=e(t),r=function(){var t=a.width();e("html").toggleClass("screen-desktop",t>=i&&t=n).toggleClass("screen-tablet",t>=o&&t=i)},s="",l=navigator.userAgent;l.match(/(iPad|iPhone|iPod)/i)?s+=" os-ios":l.match(/android/i)?s+=" os-android":l.match(/Win/i)?s+=" os-windows":l.match(/Mac/i)?s+=" os-mac":l.match(/Linux/i)?s+=" os-linux":l.match(/X11/i)&&(s+=" os-unix"),"ontouchstart"in document.documentElement&&(s+=" is-touchable"),e("html").addClass(s),a.resize(r),r()}(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...'},n=function(){for(var t=!1,e=11;e>5;e--)if(this.isIE(e)){t=e;break}this.ie=t,this.cssHelper()};n.prototype.cssHelper=function(){var e=this.ie,n=t("html");n.toggleClass("ie",e).removeClass("ie-6 ie-7 ie-8 ie-9 ie-10"),e&&n.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)},n.prototype.tip=function(n){var i=t("#browseHappyTip");i.length||(i=t('
    '),i.prependTo("body")),n||(n=t.zui.getLangData("zui.browser",t.zui.clientLang(),e),"object"==typeof n&&(n=n.tip)),i.find(".content").html(n)},n.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},n.prototype.isIE10=function(){return navigator.appVersion.indexOf("MSIE 10")!==-1},n.prototype.isIE11=function(){var t=navigator.userAgent;return t.indexOf("Trident")!==-1&&t.indexOf("rv:11")!==-1},t.zui({browser:new n}),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,n=function(t){return t instanceof Date||("number"==typeof t&&t<1e10&&(t*=1e3),t=new Date(t)),t},i=function(t){return n(t).getTime()},o=function(t,e){t=n(t),void 0===e&&(e="yyyy-MM-dd hh:mm:ss");var i={"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 i)new RegExp("("+o+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?i[o]:("00"+i[o]).substr((""+i[o]).length)));return e},a=function(t,e){return t.setTime(t.getTime()+e),t},r=function(t,n){return a(t,n*e)},s=function(t){return new Date(n(t).getTime())},l=function(t){return t%4===0&&t%100!==0||t%400===0},d=function(t,e){return[31,l(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},c=function(t){return d(t.getFullYear(),t.getMonth())},p=function(t){return t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t},u=function(t,e){var n=t.getDate();return t.setDate(1),t.setMonth(t.getMonth()+e),t.setDate(Math.min(n,c(t))),t},f=function(t,e){e=e||1;for(var n=new Date(t.getTime());n.getDay()!=e;)n=r(n,-1);return p(n)},h=function(t,e){return t.toDateString()===e.toDateString()},g=function(t,e){var n=f(t),i=r(s(n),7);return e>=n&&e1){var n;if(2==arguments.length&&"object"==typeof e)for(var i in e)void 0!==e[i]&&(n=new RegExp("({"+i+"})","g"),t=t.replace(n,e[i]));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}))}(),/*! * jQuery resize event - v1.1 * http://benalman.com/projects/jquery-resize-plugin/ * Copyright (c) 2010 "Cowboy" Ben Alman * MIT & GPL http://benalman.com/about/license/ */ -function(t,e,i){"$:nomunge";function n(){o=e[r](function(){a.each(function(){var e=t(this),i=e.width(),n=e.height(),o=t.data(this,c);i===o.w&&n===o.h||e.trigger(l,[o.w=i,o.h=n])}),n()},s[h])}var o,a=t([]),s=t.resize=t.extend(t.resize,{}),r="setTimeout",l="resize",c=l+"-special-event",h="delay",d="throttleWindow";s[h]=250,s[d]=!0,t.event.special[l]={setup:function(){if(!s[d]&&this[r])return!1;var e=t(this);a=a.add(e),t.data(this,c,{w:e.width(),h:e.height()}),1===a.length&&n()},teardown:function(){if(!s[d]&&this[r])return!1;var e=t(this);a=a.not(e),e.removeData(c),a.length||clearTimeout(o)},add:function(e){function n(e,n,a){var s=t(this),r=t.data(this,c)||{};r.w=n!==i?n:s.width(),r.h=a!==i?a:s.height(),o.apply(this,arguments)}if(!s[d]&&this[r])return!1;var o;return"function"==typeof e?(o=e,n):(o=e.handler,void(e.handler=n))}}}(jQuery,this),/*! - * jQuery Cookie Plugin v1.4.1 - * https://github.com/carhartl/jquery-cookie - * Copyright 2006, 2014 Klaus Hartl - * Released under the MIT license - */ -function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)}(function(t){function e(t){return r.raw?t:encodeURIComponent(t)}function i(t){return r.raw?t:decodeURIComponent(t)}function n(t){return e(r.json?JSON.stringify(t):String(t))}function o(t){0===t.indexOf('"')&&(t=t.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return t=decodeURIComponent(t.replace(s," ")),r.json?JSON.parse(t):t}catch(e){}}function a(t,e){var i=r.raw?t:o(t);return"function"==typeof e?e(i):i}var s=/\+/g,r=t.cookie=function(o,s,l){if(void 0!==s&&"function"!=typeof s){if(l=t.extend({},r.defaults,l),"number"==typeof l.expires){var c=l.expires,h=l.expires=new Date;h.setTime(+h+864e5*c)}return document.cookie=[e(o),"=",n(s),l.expires?"; expires="+l.expires.toUTCString():"",l.path?"; path="+l.path:"",l.domain?"; domain="+l.domain:"",l.secure?"; secure":""].join("")}for(var d=o?void 0:{},u=document.cookie?document.cookie.split("; "):[],p=0,f=u.length;p=0;t--)delete this.page[i[t]];this.set(a,this.page)}},s.prototype.pageRemove=function(t){"undefined"!=typeof this.page[t]&&(this.page[t]=null,this.pageSave())},s.prototype.pageClear=function(){this.page={},this.pageSave()},s.prototype.pageGet=function(t,e){var i=this.page[t];return void 0===e||null!==i&&void 0!==i?i:e},s.prototype.pageSet=function(t,i){e.isPlainObject(t)?e.extend(!0,this.page,t):this.page[this.serialize(t)]=i,this.pageSave()},s.prototype.check=function(){if(!this.enable&&!this.silence)throw new Error("Browser not support localStorage or enable status been set true.");return this.enable},s.prototype.length=function(){return this.check()?i.getLength?i.getLength():i.length:0},s.prototype.removeItem=function(t){return i.removeItem(t),this},s.prototype.remove=function(t){return this.removeItem(t)},s.prototype.getItem=function(t){return i.getItem(t)},s.prototype.get=function(t,e){var i=this.deserialize(this.getItem(t));return"undefined"!=typeof i&&null!==i||"undefined"==typeof e?i:e},s.prototype.key=function(t){return i.key(t)},s.prototype.setItem=function(t,e){return i.setItem(t,e),this},s.prototype.set=function(t,e){return void 0===e?this.remove(t):(this.setItem(t,this.serialize(e)),this)},s.prototype.clear=function(){return i.clear(),this},s.prototype.forEach=function(t){for(var e=this.length(),n=e-1;n>=0;n--){var o=i.key(n);t(o,this.get(o))}return this},s.prototype.getAll=function(){var t={};return this.forEach(function(e,i){t[e]=i}),t},s.prototype.serialize=function(t){return"string"==typeof t?t:JSON.stringify(t)},s.prototype.deserialize=function(t){if("string"==typeof t)try{return JSON.parse(t)}catch(e){return t||void 0}},e.zui({store:new s})}(window,jQuery),function(t){"use strict";var e="zui.searchBox",i=function(e,n){var o=this;o.name=name,o.$=t(e),o.options=n=t.extend({},i.DEFAULTS,o.$.data(),n);var a=o.$.is(n.inputSelector)?o.$:o.$.find(n.inputSelector);if(a.length){var s=function(){o.changeTimer&&(clearTimeout(o.changeTimer),o.changeTimer=null)},r=function(){s();var t=o.getSearch();if(t!==o.lastValue){var e=""===t;a.toggleClass("empty",e),o.$.callComEvent(o,"onSearchChange",[t,e]),o.lastValue=t}};o.$input=a=a.first(),a.on(n.listenEvent,function(t){o.changeTimer=setTimeout(function(){r()},n.changeDelay)}).on("focus",function(t){a.addClass("focus"),o.$.callComEvent(o,"onFocus",[t])}).on("blur",function(t){a.removeClass("focus"),o.$.callComEvent(o,"onBlur",[t])}).on("keydown",function(t){var e=0,i=t.which;27===i&&n.escToClear?(this.setSearch("",!0),r(),e=1):13===i&&n.onPressEnter&&(r(),o.$.callComEvent(o,"onPressEnter",[t]));var a=o.$.callComEvent(o,"onKeyDown",[t]);a===!1&&(e=1),e&&t.preventDefault()}),o.$.on("click",".search-clear-btn",function(t){o.setSearch("",!0),r(),o.focus(),t.preventDefault()}),r()}else console.error("ZUI: search box init error, cannot find search box input element.")};i.DEFAULTS={inputSelector:'input[type="search"],input[type="text"]',listenEvent:"change input paste",changeDelay:500},i.prototype.getSearch=function(){return this.$input&&t.trim(this.$input.val())},i.prototype.setSearch=function(t,e){var i=this.$input;i&&(i.val(t),e||i.trigger("change"))},i.prototype.focus=function(){this.$input&&this.$input.focus()},t.fn.searchBox=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.searchBox.Constructor=i}(jQuery),function(t,e){"use strict";var i="zui.draggable",n={container:"body",move:!0},o=0,a=function(e,i){var a=this;a.$=t(e),a.id=o++,a.options=t.extend({},n,a.$.data(),i),a.init()};a.DEFAULTS=n,a.NAME=i,a.prototype.init=function(){var n,o,a,s,r,l=this,c=l.$,h="before",d="drag",u="finish",p="."+i+"."+l.id,f="mousedown"+p,g="mouseup"+p,m="mousemove"+p,v=l.options,y=v.selector,b=v.handle,w=c,x="function"==typeof v.move,C=function(t){var e=t.pageX,i=t.pageY;r=!0;var o={left:e-a.x,top:i-a.y};w.removeClass("drag-ready").addClass("dragging"),v.move&&(x?v.move(o,w):w.css(o)),v[d]&&v[d]({event:t,element:w,startOffset:a,pos:o,offset:{x:e-n.x,y:i-n.y},smallOffset:{x:e-s.x,y:i-s.y}}),s.x=e,s.y=i,v.stopPropagation&&t.stopPropagation()},_=0,k=function(e){_&&(t.zui.clearAsap||clearTimeout)(_),_=(t.zui.asap||setTimeout)(function(){_=0,C(e)},0)},T=function(i){if(t(e).off(p),!r)return void w.removeClass("drag-ready");var o={left:i.pageX-a.x,top:i.pageY-a.y};w.removeClass("drag-ready dragging"),v.move&&(x?v.move(o,w):w.css(o)),v[u]&&v[u]({event:i,element:w,startOffset:a,pos:o,offset:{x:i.pageX-n.x,y:i.pageY-n.y},smallOffset:{x:i.pageX-s.x,y:i.pageY-s.y}}),i.preventDefault(),v.stopPropagation&&i.stopPropagation()},S=function(i){var l=t.zui.getMouseButtonCode(v.mouseButton);if(!(l>-1&&i.button!==l)){var c=t(this);if(y&&(w=b?c.closest(y):c),v[h]){var d=v[h]({event:i,element:w});if(d===!1)return}var u=t(v.container),p=w.offset();o=u.offset(),n={x:i.pageX,y:i.pageY},a={x:i.pageX-p.left+o.left,y:i.pageY-p.top+o.top},s=t.extend({},n),r=!1,w.addClass("drag-ready"),i.preventDefault(),v.stopPropagation&&i.stopPropagation(),t(e).on(m,k).on(g,T)}};b?c.on(f,b,S):y?c.on(f,y,S):c.on(f,S)},a.prototype.destroy=function(){var n="."+i+"."+this.id;this.$.off(n),t(e).off(n),this.$.data(i,null)},t.fn.draggable=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]()})},t.fn.draggable.Constructor=a}(jQuery,document),function(t,e,i){"use strict";var n="zui.droppable",o={target:".droppable-target",deviation:5,sensorOffsetX:0,sensorOffsetY:0,dropToClass:"drop-to",dropTargetClass:"drop-target"},a=0,s=function(e,i){var n=this;n.id=a++,n.$=t(e),n.options=t.extend({},o,n.$.data(),i),n.init()};s.DEFAULTS=o,s.NAME=n,s.prototype.trigger=function(e,i){return t.zui.callEvent(this.options[e],i,this)},s.prototype.init=function(){var o,a,s,r,l,c,h,d,u,p,f,g,m,v,y=this,b=y.$,w=y.options,x=w.deviation,C="."+n+"."+y.id,_="mousedown"+C,k="mouseup"+C,T="mousemove"+C,S=w.selector,D=w.handle,M=w.flex,L=w.canMoveHere,z=w.dropToClass,P=w.noShadow,$=b,I=!1;w.dropOnMouseleave&&(k+=" mouseleave"+C);var F=function(e){if(I){if(g={left:e.pageX,top:e.pageY},!r){if(i.abs(g.left-u.left)a&&g.top>s&&g.left-1&&i.button!==n)){var g=t(this);S&&($=D?g.closest(S):g),$.hasClass("drag-shadow")||w.before&&w.before({event:i,element:$})===!1||(I=!0,o=w.container?"function"==typeof w.container?w.container($,b):t(w.container).first():S?b:t("body"),a="function"==typeof w.target?w.target($,b):o.find(w.target),s=null,r=null,l=!1,c=!0,h=null,d=$.offset(),p=o.offset(),p.top=p.top-o.scrollTop(),p.left=p.left-o.scrollLeft(),u={left:i.pageX,top:i.pageY},m=t.extend({},u),f={left:u.left-d.left,top:u.top-d.top},$.addClass("drag-from"),t(e).on(T,E).on(k,O),v=setTimeout(function(){t(e).on(_,O)},10),i.preventDefault(),w.stopPropagation&&i.stopPropagation())}};D?b.on(_,D,R):S?b.on(_,S,R):b.on(_,R)},s.prototype.destroy=function(){var i="."+n+"."+this.id;this.$.off(i),t(e).off(i),this.$.data(n,null)},s.prototype.reset=function(){this.destroy(),this.init()},t.fn.droppable=function(e){return this.each(function(){var i=t(this),o=i.data(n),a="object"==typeof e&&e;o||i.data(n,o=new s(this,a)),"string"==typeof e&&o[e]()})},t.fn.droppable.Constructor=s}(jQuery,document,Math),+function(t,e){"use strict";function i(e,i,a){return this.each(function(){var s=t(this),r=s.data(n),l=t.extend({},o.DEFAULTS,s.data(),"object"==typeof e&&e);r||s.data(n,r=new o(this,l)),"string"==typeof e?r[e](i,a):l.show&&r.show(i,a)})}var n="zui.modal",o=function(i,o){var a=this;a.options=o,a.$body=t(document.body),a.$element=t(i),a.$backdrop=a.isShown=null,a.scrollbarWidth=0,o.moveable===e&&(a.options.moveable=a.$element.hasClass("modal-moveable")),o.remote&&a.$element.find(".modal-content").load(o.remote,function(){a.$element.trigger("loaded."+n)}),o.scrollInside&&t(window).on("resize."+n,function(){a.isShown&&a.adjustPosition(e,100)})};o.VERSION="3.2.0",o.TRANSITION_DURATION=300,o.BACKDROP_TRANSITION_DURATION=150,o.DEFAULTS={backdrop:!0,keyboard:!0,show:!0,position:"fit"};var a=function(e,i){var n=t(window);i.left=Math.max(0,Math.min(i.left,n.width()-e.outerWidth())),i.top=Math.max(0,Math.min(i.top,n.height()-e.outerHeight())),e.css(i)};o.prototype.toggle=function(t,e){return this.isShown?this.hide():this.show(t,e)},o.prototype.adjustPosition=function(i,o){var s=this;if(clearTimeout(s.reposTask),o)return void(s.reposTask=setTimeout(s.adjustPosition.bind(s,i,0),o));var r=s.options;if(i===e&&(i=r.position),i!==e&&null!==i){"function"==typeof i&&(i=i(s));var l=s.$element.find(".modal-dialog"),c=t(window).height(),h={maxHeight:"initial",overflow:"visible"},d=l.find(".modal-body").css(h);if(r.scrollInside&&d.length){var u=r.headerHeight,p=r.footerHeight,f=l.find(".modal-header"),g=l.find(".modal-footer");"number"!=typeof u&&(u=f.length?f.outerHeight():"function"==typeof u?u(f):0),"number"!=typeof p&&(p=g.length?g.outerHeight():"function"==typeof p?p(g):0),h.maxHeight=c-u-p,h.overflow=d[0].scrollHeight>h.maxHeight?"auto":"visible",d.css(h)}var m=Math.max(0,(c-l.outerHeight())/2);if("fit"===i?i={top:m>50?Math.floor(2*m/3):m}:"center"===i?i={top:m}:t.isPlainObject(i)||(i={top:i}),l.hasClass("modal-moveable")){var v=null,y=r.rememberPos;y&&(y===!0?v=s.$element.data("modal-pos"):t.zui.store&&(v=t.zui.store.pageGet(n+".rememberPos."+y))),i=t.extend(i,{left:Math.max(0,(t(window).width()-l.outerWidth())/2)},v),"inside"===r.moveable?a(l,i):l.css(i)}else l.css(i)}},o.prototype.setMoveable=function(){t.fn.draggable||console.error("Moveable modal requires draggable.js.");var e=this,i=e.options,o=e.$element.find(".modal-dialog").removeClass("modal-dragged");o.toggleClass("modal-moveable",!!i.moveable),e.$element.data("modal-moveable-setup")||o.draggable({container:e.$element,handle:".modal-header",before:function(){var t=o.css("margin-top");t&&"0px"!==t&&o.css("top",t).css("margin-top","").addClass("modal-dragged")},finish:function(o){var a=i.rememberPos;a&&(e.$element.data("modal-pos",o.pos),t.zui.store&&a!==!0&&t.zui.store.pageSet(n+".rememberPos."+a,o.pos))},move:"inside"!==i.moveable||function(t){a(o,t)}})},o.prototype.show=function(e,i){var a=this,s=t.Event("show."+n,{relatedTarget:e});a.$element.trigger(s),a.$element.toggleClass("modal-scroll-inside",!!a.options.scrollInside),a.isShown||s.isDefaultPrevented()||(a.isShown=!0,a.options.moveable&&a.setMoveable(),a.options.backdrop!==!1&&(a.setScrollbar(),a.$body.addClass("modal-open")),a.escape(),a.$element.on("click.dismiss."+n,'[data-dismiss="modal"]',function(t){a.hide(),t.stopPropagation()}),a.backdrop(function(){var s=t.support.transition&&a.$element.hasClass("fade");a.$element.parent().length||a.$element.appendTo(a.$body),a.$element.show().scrollTop(0),s&&a.$element[0].offsetWidth,a.$element.addClass("in").attr("aria-hidden",!1),a.adjustPosition(i),a.enforceFocus();var r=t.Event("shown."+n,{relatedTarget:e});s?a.$element.find(".modal-dialog").one("bsTransitionEnd",function(){a.$element.trigger("focus").trigger(r)}).emulateTransitionEnd(o.TRANSITION_DURATION):a.$element.trigger("focus").trigger(r)}))},o.prototype.hide=function(e){e&&e.preventDefault&&e.preventDefault();var i=this;e=t.Event("hide."+n),i.$element.trigger(e),i.isShown&&!e.isDefaultPrevented()&&(i.isShown=!1,i.options.backdrop!==!1&&(i.$body.removeClass("modal-open"),i.resetScrollbar()),i.escape(),t(document).off("focusin."+n),i.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss."+n),t.support.transition&&i.$element.hasClass("fade")?i.$element.one("bsTransitionEnd",i.hideModal.bind(i)).emulateTransitionEnd(o.TRANSITION_DURATION):i.hideModal())},o.prototype.enforceFocus=function(){t(document).off("focusin."+n).on("focusin."+n,function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")}.bind(this))},o.prototype.escape=function(){this.isShown&&this.options.keyboard?t(document).on("keydown.dismiss."+n,function(i){if(27==i.which){var o=t.Event("escaping."+n),a=this.$element.triggerHandler(o,"esc");if(a!=e&&!a)return;this.hide()}}.bind(this)):this.isShown||t(document).off("keydown.dismiss."+n)},o.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$element.trigger("hidden."+n)})},o.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},o.prototype.backdrop=function(e){var i=this,a=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var s=t.support.transition&&a;if(this.$backdrop=t('
  • ",{"class":"search-choice"}).html(""+e.html+""),e.disabled?i.addClass("search-choice-disabled"):(n=t("",{"class":"search-choice-close","data-option-array-index":e.array_index}),n.bind("click.chosen",function(t){return o.choice_destroy_link_click(t)}),i.append(n)),this.search_container.before(i)},i.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(t(e.target))},i.prototype.choice_destroy=function(t){if(this.result_deselect(t[0].getAttribute("data-option-array-index")))return this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),t.parents("li").first().remove(),this.search_field_scale()},i.prototype.results_reset=function(){var t=this.form_field_jq.val();this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup();var e=this.form_field_jq.val(),i={selected:e};if(t===e||e.length||(i.deselected=t),this.form_field_jq.trigger("change",i),this.sync_sort_field(),this.active_field)return this.results_hide()},i.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},i.prototype.result_select=function(t){var e,i;if(this.result_highlight)return e=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?e.removeClass("active-result"):this.reset_single_select_options(),i=this.results_data[e[0].getAttribute("data-option-array-index")],i.selected=!0,this.form_field.options[i.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(i):this.single_set_selected_text(i.text),(t.metaKey||t.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&(this.form_field_jq.trigger("change",{selected:this.form_field.options[i.options_index].value}),this.sync_sort_field()),this.current_selectedIndex=this.form_field.selectedIndex,this.search_field_scale())},i.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.compact_search&&this.search_field.attr("placeholder",t),this.selected_item.find("span").attr("title",t).text(t)},i.prototype.sync_sort_field=function(){var e=this;if(e.is_multiple&&e.sort_field){var i=t(e.sort_field);if(!i.length)return;var n=[];e.search_choices.find("li.search-choice").each(function(){var i=t(this),o=i.children(".search-choice-close").first().data("optionArrayIndex"),a=e.results_data[o];a&&a.selected&&n.push(a.value)}),i.val(n.join(e.sort_value_splitter)).trigger("change")}},i.prototype.result_deselect=function(t){var e;return e=this.results_data[t],!this.form_field.options[e.options_index].disabled&&(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[e.options_index].value}),this.sync_sort_field(),this.search_field_scale(),!0)},i.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after(''),this.selected_item.addClass("chosen-single-with-deselect")},i.prototype.get_search_text=function(){return this.search_field.val()===this.default_text?"":t("
    ").text(t.trim(this.search_field.val())).html()},i.prototype.winnow_results_set_highlight=function(t){var e,i;if(i=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),e=i.length?i.first():this.search_results.find(".active-result").first(),null!=e)return this.result_do_highlight(e,t)},i.prototype.no_results=function(e){var i;return i=t('
  • '+this.results_none_found+' ""
  • '),i.find("span").first().html(e),this.search_results.append(i),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},i.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},i.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void 0:this.results_show()},i.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result"),t.length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},i.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last(),t.length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},i.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},i.prototype.keydown_checker=function(t){var e,i;switch(e=null!=(i=t.which)?i:t.keyCode,this.search_field_scale(),8!==e&&this.pending_backstroke&&this.clear_backstroke(),e){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(t),this.mouse_on_container=!1;break;case 13:t.preventDefault();break;case 38:t.preventDefault(),this.keyup_arrow();break;case 40:t.preventDefault(),this.keydown_arrow()}},i.prototype.search_field_scale=function(){var e,i,n,o,a,s,r,l,c;if(this.is_multiple){for(n=0,r=0,a="position:absolute; left: -1000px; top: -1000px; display:none;",s=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],l=0,c=s.length;l",{style:a}),e.text(this.search_field.val()),t("body").append(e),r=e.width()+25,e.remove(),i=this.container.outerWidth(),r>i-10&&(r=i-10),this.search_field.css({width:r+"px"})}},i}(e),i.DEFAULTS=l,i.LANGUAGES=r,t.fn.chosen.Constructor=i}.call(this),function(t){"use strict";var e="zui.selectable",i=function(i,n){this.name=e,this.$=t(i),this.id=t.zui.uuid(),this.selectOrder=1,this.selections={},this.getOptions(n),this._init()},n=function(t,e,i){return t>=i.left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height},o=function(t,e){var i=Math.max(t.left,e.left),o=Math.max(t.top,e.top),a=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height);return n(i,o,t)&&n(a,s,t)&&n(i,o,e)&&n(a,s,e)};i.DEFAULTS={selector:"li,tr,div",trigger:"",selectClass:"active",rangeStyle:{border:"1px solid "+(t.zui.colorset?t.zui.colorset.primary:"#3280fc"),backgroundColor:t.zui.colorset?new t.zui.Color(t.zui.colorset.primary).fade(20).toCssStr():"rgba(50, 128, 252, 0.2)"},clickBehavior:"toggle",ignoreVal:3,listenClick:!0},i.prototype.getOptions=function(e){this.options=t.extend({},i.DEFAULTS,this.$.data(),e)},i.prototype.select=function(t){this.toggle(t,!0)},i.prototype.unselect=function(t){this.toggle(t,!1)},i.prototype.toggle=function(e,i,n){var o,a,s=this.options.selector,r=this;if(void 0===e)return void this.$.find(s).each(function(){r.toggle(this,i)});if("object"==typeof e?(o=t(e).closest(s),a=o.data("id")):(a=e,o=r.$.find('.selectable-item[data-id="'+a+'"]')),o&&o.length){if(a||(a=t.zui.uuid(),o.attr("data-id",a)),void 0!==i&&null!==i||(i=!r.selections[a]),!!i!=!!r.selections[a]){var l;"function"==typeof n&&(l=n(i)),l!==!0&&(r.selections[a]=!!i&&r.selectOrder++,r.callEvent(i?"select":"unselect",{id:a,selections:r.selections, -target:o,selected:r.getSelectedArray()},r))}r.options.selectClass&&o.toggleClass(r.options.selectClass,i)}},i.prototype.getSelectedArray=function(){var e=[];return t.each(this.selections,function(t,i){i&&e.push(t)}),e},i.prototype.syncSelectionsFromClass=function(){var e=this,i=e.$children=e.$.find(e.options.selector);e.selections={},i.each(function(){var i=t(this);e.selections[i.data("id")]=i.hasClass(e.options.selectClass)})},i.prototype._init=function(){var e,i,n,a,s,r,l,c=this.options,h=this,d=c.ignoreVal,u=!0,p="."+this.name+"."+this.id,f="function"==typeof c.checkFunc?c.checkFunc:null,g="function"==typeof c.rangeFunc?c.rangeFunc:null,m=!1,v=null,y="mousedown"+p,b=function(){a&&h.$children.each(function(){var e=t(this),i=e.offset();i.width=e.outerWidth(),i.height=e.outerHeight();var n=g?g.call(this,a,i):o(a,i);if(f){var s=f.call(h,{intersect:n,target:e,range:a,targetRange:i});s===!0?h.select(e):s===!1&&h.unselect(e)}else n?h.select(e):h.multiKey||h.unselect(e)})},w=function(o){m&&(s=o.pageX,r=o.pageY,a={width:Math.abs(s-e),height:Math.abs(r-i),left:s>e?e:s,top:r>i?i:r},u&&a.width
    ').css(t.extend({zIndex:1060,position:"absolute",top:e,left:i,pointerEvents:"none"},h.options.rangeStyle)).appendTo(t("body")))),n.css(a),clearTimeout(l),l=setTimeout(b,10),u=!1))},x=0,C=function(e){x&&(t.zui.clearAsap||clearTimeout)(x),x=(t.zui.asap||setTimeout)(function(){x=0,w(e)},0)},_=function(e){t(document).off(p),clearTimeout(v),m&&(m=!1,n&&n.remove(),u||a&&(clearTimeout(l),b(),a=null),h.callEvent("finish",{selections:h.selections,selected:h.getSelectedArray()}),e.preventDefault())},k=function(o){if(m)return _(o);var a=t.zui.getMouseButtonCode(c.mouseButton);if(!(a>-1&&o.button!==a||t(o.target).closest("input,select,textarea,label").length||h.altKey||3===o.which||h.callEvent("start",o)===!1)){var s=h.$children=h.$.find(c.selector);s.addClass("selectable-item");var r=h.multiKey?"multi":c.clickBehavior;if("single"===r&&h.unselect(),c.listenClick&&("multi"===r?h.toggle(o.target):"single"===r?h.select(o.target):"toggle"===r&&h.toggle(o.target,null,function(t){h.unselect()})),h.callEvent("startDrag",o)===!1)return void h.callEvent("finish",{selections:h.selections,selected:h.getSelectedArray()});e=o.pageX,i=o.pageY,n=null,u=!0,m=!0,t(document).on("mousemove"+p,C).on("mouseup"+p,_),v=setTimeout(function(){t(document).on(y,_)},10),o.preventDefault()}},T=c.container&&"default"!==c.container?t(c.container):this.$;c.trigger?T.on(y,c.trigger,k):T.on(y,k),t(document).on("keydown",function(t){var e=t.keyCode;17===e||91==e?h.multiKey=e:18===e&&(h.altKey=!0)}).on("keyup",function(t){h.multiKey=!1,h.altKey=!1})},i.prototype.callEvent=function(e,i){var n=t.Event(e+"."+this.name);this.$.trigger(n,i);var o=n.result,a=this.options[e];return"function"==typeof a&&(o=a.apply(this,Array.isArray(i)?i:[i])),o},t.fn.selectable=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]()})},t.fn.selectable.Constructor=i,t(function(){t('[data-ride="selectable"]').selectable()})}(jQuery),+function(t,e,i){"use strict";if(!t.fn.droppable)return void console.error("Sortable requires droppable.js");var n="zui.sortable",o={selector:"li,div",dragCssClass:"invisible",sortingClass:"sortable-sorting"},a="order",s=function(e,i){var n=this;n.$=t(e),n.options=t.extend({},o,n.$.data(),i),n.init()};s.DEFAULTS=o,s.NAME=n,s.prototype.init=function(){var e,i,n=this,o=n.$,s=n.options,r=s.selector,l=s.containerSelector,c=s.sortingClass,h=s.dragCssClass,d=s.targetSelector,u=s.reverse,p=s.moveDirection,f=function(e){e=e||n.getItems(1);var i=e.length;i&&e.each(function(e){var n=u?i-e:e;t(this).attr("data-"+a,n).data(a,n)})};d||f(),o.droppable({handle:s.trigger,target:d?d:l?r+","+l:r,selector:r,container:s.container||o,always:s.always,flex:!0,lazy:s.lazy,canMoveHere:s.canMoveHere,dropToClass:s.dropToClass,before:s.before,nested:!!l,mouseButton:s.mouseButton,noShadow:s.noShadow,dropOnMouseleave:s.dropOnMouseleave,stopPropagation:s.stopPropagation,start:function(t){if(h&&t.element.addClass(h),e=!1,n.$element=t.element,!p&&t.targets.length>1){var i=t.targets.eq(0).offset(),o=t.targets.eq(1).offset();p=Math.abs(i.left-o.left)>Math.abs(i.top-o.top)?"h":"v"}f(),n.trigger("start",t)},drag:function(t){if(o.addClass(c),t.isIn){var s=t.target,h=t.element,d=l&&s.is(l);if(d)return void(s.children(r).filter(".dragging").length||(s.append(h),f(w),n.trigger(a,{list:w,element:h})));var g=h.data(a),m=s.data(a);if(g!==m){var v="h"===p?"left":"top",y=t.mouseOffset[v]-t.lastMouseOffset[v];if(0!==y){var b=g>m?u:!u;if(!(y<0&&b||y>0&&!b)){i=b?"after":"before",s[i](h),e=!0,n.$target=s,n.$element=h;var w=n.getItems(1);f(w),n.trigger(a,{insert:i,target:s,list:w,element:h})}}}}},finish:function(t){h&&t.element&&t.element.removeClass(h),o.removeClass(c),n.trigger("finish",{insert:i,target:n.$target,list:n.getItems(),element:n.$element,changed:e}),n.$element=null,n.$target=null}})},s.prototype.destroy=function(){this.$.droppable("destroy"),this.$.data(n,null)},s.prototype.reset=function(){this.destroy(),this.init()},s.prototype.getItems=function(e){var i,n=this,o=n.options.targetSelector;return i=o?"function"==typeof o?o(n.$element,n.$):n.$.find(o):n.$.find(n.options.selector),i=i.not(".drag-shadow"),e?i:i.map(function(){var e=t(this);return{item:e,order:e.data("order")}})},s.prototype.trigger=function(e,i){return t.zui.callEvent(this.options[e],i,this)},t.fn.sortable=function(e){return this.each(function(){var i=t(this),o=i.data(n),a="object"==typeof e&&e;o?"object"==typeof e&&o.reset():i.data(n,o=new s(this,a)),"string"==typeof e&&o[e]()})},t.fn.sortable.Constructor=s}(jQuery,window,document),function(t,e){"use strict";function i(e,i){if("string"==typeof e&&(e="seperator"===e||"divider"===e||"-"===e||"|"===e?{type:"seperator"}:{label:e,id:i}),"seperator"===e.type||"divider"===e.type)return t('
  • ');var n=t("
    ").attr(t.extend({href:e.url||"###","class":e.className,style:e.style},e.attrs)).data("item",e);e.html?e.html===!0?n.html(e.label||e.text):n=t(e.html):n.text(e.label||e.text),e.icon&&n.prepend(''),e.onClick&&n.on("click",e.onClick);var o=t("
  • ").toggleClass("disabled",e.disabled===!0).append(n);return e.items&&o.data("item",e).addClass("dropdown-submenu"),o}function n(e,n,o){var a=o.itemCreator||i,s=typeof e;return"string"===s?e=e.split(","):"function"===s&&(e=e(o)),!!e&&(t.each(e,function(t,e){n.append(a(e,t,o))}),!0)}var o="zui.contextmenu",a={animation:"fade",menuTemplate:'',toggleTrigger:!1,duration:200},s=!1,r={},l="zui-contextmenu-"+t.zui.uuid(),c=0,h=0,d=function(){return t(document).off("mousemove."+o).on("mousemove."+o,function(t){c=t.clientX,h=t.clientY}),r},u=function(e){var i=t("#"+l);return i.length&&i.hasClass("contextmenu-show")&&(!e||(i.data("options")||{}).id===e)},p=null,f=function(e,i){"function"==typeof e&&(i=e,e=null),p&&(clearTimeout(p),p=null);var n=t("#"+l);if(n.length){var o=n.removeClass("contextmenu-show").data("options");if(!e||o.id===e){var a=function(){n.find(".contextmenu-menu").removeClass("open"),o.onHidden&&o.onHidden(),i&&i()};o.onHide&&o.onHide();var s=o.animation;n.find(".contextmenu-menu").removeClass("in"),s?p=setTimeout(a,o.duration):a()}}return r},g=function(i,d,u){t.isPlainObject(i)&&(u=d,d=i,i=d.items),s=!0,d=t.extend({},a,d);var g=t("#"+l);g.length||(g=t('
    ').appendTo("body"));var m=g.find(".contextmenu-menu").empty();m.off("click."+o).on("click."+o,"a,.contextmenu-item",function(e){var i=t(this),n=d.onClickItem&&d.onClickItem(i.data("item"),i,e,d);n!==!1&&f()}).off("mouseenter."+o).on("mouseenter."+o,".dropdown-submenu",function(e){var i=t(this),o=i.data("item"),a=i.children(".dropdown-menu");if(o&&(o.items&&(a.length||(a=t(d.menuTemplate).appendTo(i)),n(o.items,a,d)),i.removeData("item")),a.length){a.removeClass("pull-left").css("top",0);var s=(i[0].getBoundingClientRect(),a[0].getBoundingClientRect()),r=window.innerWidth,l=window.innerHeight;if(s.bottom>l){var c=Math.max(-s.top,l-s.bottom);a.css("top",c)}s.right>r&&a.addClass("pull-left")}}),m.attr("class","contextmenu-menu"+(d.className?" "+d.className:"")),g.attr("class","contextmenu contextmenu-show");var v=d.menuCreator;if(v)m.append(v(i,d));else{m.append(d.menuTemplate);var y=m.children().first(),b=n(i,y,d);if(b===!1)return b}var w=d.animation,x=d.duration;w===!0&&(d.animation=w="fade"),p&&(clearTimeout(p),p=null);var C=function(){m.addClass("in"),d.onShown&&d.onShown(),u&&u()};d.onShow&&d.onShow(),g.data("options",{animation:w,onHide:d.onHide,onHidden:d.onHidden,id:d.id,duration:x});var _=d.x,k=d.y;_===e&&(_=(d.event||d).clientX),_===e&&(_=c),k===e&&(k=(d.event||d).clientY),k===e&&(k=h);var T=window.innerHeight,S=window.innerWidth,y=m.children().first(),D=y.outerWidth(),M=y.outerHeight();if(d.position){var L=d.position({x:_,y:k,width:D,height:M,winHeight:T,winWidth:S},d,m);L&&(_=L.x,k=L.y)}return _=Math.max(0,Math.min(_,S-D)),k=Math.max(0,Math.min(k,T-M)),g.css({left:_,top:k}).show(),m.addClass("open"),w?(m.addClass(w),p=setTimeout(function(){C(),s=!1},10)):(C(),s=!1),r};t.extend(r,{NAME:o,DEFAULTS:a,show:g,hide:f,listenMouse:d,isShow:u}),t.zui({ContextMenu:r});var m=function(e,i){var n=this;n.name=o,n.$=t(e),n.id=t.zui.uuid(),i=n.options=t.extend({trigger:"contextmenu"},r.DEFAULTS,this.$.data(),i);var a=function(t){if("mousedown"!==t.type||2===t.button){if(i.toggleTrigger&&n.isShow())n.hide();else{var e={x:t.clientX,y:t.clientY,event:t};if(n.show(e)===!1)return}return t.preventDefault(),t.returnValue=!1,!1}},s=i.trigger,l=s+"."+o;i.selector?n.$.on(l,i.selector,a):n.$.on(l,a),i.show&&n.show("object"==typeof i.show?i.show:null)};m.prototype.destory=function(){that.$.off("."+o)},m.prototype.hide=function(t){return r.hide(this.id,t)},m.prototype.show=function(e,i){return e=t.extend({id:this.id,$toggle:this.$},this.options,e),r.show(e,i)},m.prototype.isShow=function(){return u(this.id)},t.fn.contextmenu=function(e){return this.each(function(){var i=t(this),n=i.data(o),a="object"==typeof e&&e;n||i.data(o,n=new m(this,a)),"string"==typeof e&&n[e]()})},t.fn.contextmenu.Constructor=m,t.fn.contextDropdown=function(e){t(this).contextmenu(t.extend({trigger:"click",animation:"fade",toggleTrigger:!0,menuCreator:function(e,i){var n=i.$toggle,o=n.attr("data-target");o||(o=n.attr("href"),o=o&&/#/.test(o)&&o.replace(/.*(?=#[^\s]*$)/,""));var a=o?t(o):n.next(".dropdown-menu"),s=i.transferEvent;if(s!==!1){var r="data-contextmenu-index";a.find("a,.contextmenu-item").each(function(e){t(this).attr(r,e)});var l=a.clone();return l.on("string"==typeof s?s:"click","a,.contextmenu-item",function(e){var i=a.find("["+r+'="'+t(this).attr(r)+'"]'),n=i[0];if(n)return n[e.type]?n[e.type]():i.trigger(e.type),e.preventDefault(),e.stopPropagation(),!1}),l}return a.clone()},position:function(t,e,i){var n=e.placement,o=e.$toggle;if(!n){var a=i.find(".dropdown-menu"),s=a.hasClass("pull-right"),r=o.parent().hasClass("dropup");n=s?r?"top-right":"bottom-right":r?"top-left":"bottom-left",s&&a.removeClass("pull-right")}var l=o[0].getBoundingClientRect();switch(n){case"top-left":return{x:l.left,y:Math.floor(l.top-t.height)};case"top-right":return{x:Math.floor(l.right-t.width),y:Math.floor(l.top-t.height)};case"bottom-left":return{x:l.left,y:l.bottom};case"bottom-right":return{x:Math.floor(l.right-t.width),y:l.bottom}}return t}},e))},t(document).on("click",function(e){var i=t(e.target),n=i.closest('[data-toggle="context-dropdown"]');if(n.length){var a=n.data(o);a||n.contextDropdown({show:!0})}else s||i.closest(".contextmenu").length||f()})}(jQuery,void 0),/*! - * jQuery Form Plugin - * version: 4.2.2 - * Requires jQuery v1.7.2 or later - * Project repository: https://github.com/jquery-form/form - - * Copyright 2017 Kevin Morris - * Copyright 2006 M. Alsup - - * Dual licensed under the LGPL-2.1+ or MIT licenses - * https://github.com/jquery-form/form#license - - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ -function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=function(e,i){return"undefined"==typeof i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(e)),t(i),i}:t(jQuery)}(function(t){"use strict";function e(e){var i=e.data;e.isDefaultPrevented()||(e.preventDefault(),t(e.target).closest("form").ajaxSubmit(i))}function i(e){var i=e.target,n=t(i);if(!n.is("[type=submit],[type=image]")){var o=n.closest("[type=submit]");if(0===o.length)return;i=o[0]}var a=i.form;if(a.clk=i,"image"===i.type)if("undefined"!=typeof e.offsetX)a.clk_x=e.offsetX,a.clk_y=e.offsetY;else if("function"==typeof t.fn.offset){var s=n.offset();a.clk_x=e.pageX-s.left,a.clk_y=e.pageY-s.top}else a.clk_x=e.pageX-i.offsetLeft,a.clk_y=e.pageY-i.offsetTop;setTimeout(function(){a.clk=a.clk_x=a.clk_y=null},100)}function n(){if(t.fn.ajaxSubmit.debug){var e="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e)}}var o=/\r?\n/g,a={};a.fileapi=void 0!==t('').get(0).files,a.formdata="undefined"!=typeof window.FormData;var s=!!t.fn.prop;t.fn.attr2=function(){if(!s)return this.attr.apply(this,arguments);var t=this.prop.apply(this,arguments);return t&&t.jquery||"string"==typeof t?t:this.attr.apply(this,arguments)},t.fn.ajaxSubmit=function(e,i,o,r){function l(i){var n,o,a=t.param(i,e.traditional).split("&"),s=a.length,r=[];for(n=0;n',T).val(h.extraData[u].value).appendTo(_)[0]):c.push(t('',T).val(h.extraData[u]).appendTo(_)[0]));h.iframeTarget||g.appendTo(S),m.attachEvent?m.attachEvent("onload",r):m.addEventListener("load",r,!1),setTimeout(e,15);try{_.submit()}catch(v){var y=document.createElement("form").submit;y.apply(_)}}finally{_.setAttribute("action",a),_.setAttribute("enctype",l),i?_.setAttribute("target",i):f.removeAttr("target"),t.each(c,function(){this.remove()})}}function r(e){if(!v.aborted&&!I){if($=o(m),$||(n("cannot access response document"),e=M),e===D&&v)return v.abort("timeout"),void k.reject(v,"timeout");if(e===M&&v)return v.abort("server abort"),void k.reject(v,"error","server abort");if($&&$.location.href!==h.iframeSrc||x){m.detachEvent?m.detachEvent("onload",r):m.removeEventListener("load",r,!1);var i,a="success";try{if(x)throw"timeout";var s="xml"===h.dataType||$.XMLDocument||t.isXMLDoc($);if(n("isXml="+s),!s&&window.opera&&(null===$.body||!$.body.innerHTML)&&--F)return n("requeing onLoad callback, DOM not available"),void setTimeout(r,250);var l=$.body?$.body:$.documentElement;v.responseText=l?l.innerHTML:null,v.responseXML=$.XMLDocument?$.XMLDocument:$,s&&(h.dataType="xml"),v.getResponseHeader=function(t){var e={"content-type":h.dataType};return e[t.toLowerCase()]},l&&(v.status=Number(l.getAttribute("status"))||v.status,v.statusText=l.getAttribute("statusText")||v.statusText);var c=(h.dataType||"").toLowerCase(),d=/(json|script|text)/.test(c);if(d||h.textarea){var p=$.getElementsByTagName("textarea")[0];if(p)v.responseText=p.value,v.status=Number(p.getAttribute("status"))||v.status,v.statusText=p.getAttribute("statusText")||v.statusText;else if(d){var f=$.getElementsByTagName("pre")[0],y=$.getElementsByTagName("body")[0];f?v.responseText=f.textContent?f.textContent:f.innerText:y&&(v.responseText=y.textContent?y.textContent:y.innerText)}}else"xml"===c&&!v.responseXML&&v.responseText&&(v.responseXML=A(v.responseText));try{P=O(v,c,h)}catch(b){a="parsererror",v.error=i=b||a}}catch(b){n("error caught: ",b),a="error",v.error=i=b||a}v.aborted&&(n("upload aborted"),a=null),v.status&&(a=v.status>=200&&v.status<300||304===v.status?"success":"error"),"success"===a?(h.success&&h.success.call(h.context,P,"success",v),k.resolve(v.responseText,"success",v),u&&t.event.trigger("ajaxSuccess",[v,h])):a&&("undefined"==typeof i&&(i=v.statusText),h.error&&h.error.call(h.context,v,a,i),k.reject(v,"error",i),u&&t.event.trigger("ajaxError",[v,h,i])),u&&t.event.trigger("ajaxComplete",[v,h]),u&&!--t.active&&t.event.trigger("ajaxStop"),h.complete&&h.complete.call(h.context,v,a),I=!0,h.timeout&&clearTimeout(C),setTimeout(function(){h.iframeTarget?g.attr("src",h.iframeSrc):g.remove(),v.responseXML=null},100)}}}var l,c,h,u,p,g,m,v,b,w,x,C,_=f[0],k=t.Deferred();if(k.abort=function(t){v.abort(t)},i)for(c=0;c',T),g.css({position:"absolute",top:"-1000px",left:"-1000px"})),m=g[0],v={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var i="timeout"===e?"timeout":"aborted";n("aborting upload... "+i),this.aborted=1;try{m.contentWindow.document.execCommand&&m.contentWindow.document.execCommand("Stop")}catch(o){}g.attr("src",h.iframeSrc),v.error=i,h.error&&h.error.call(h.context,v,i,e),u&&t.event.trigger("ajaxError",[v,h,i]),h.complete&&h.complete.call(h.context,v,i)}},u=h.global,u&&0===t.active++&&t.event.trigger("ajaxStart"),u&&t.event.trigger("ajaxSend",[v,h]),h.beforeSend&&h.beforeSend.call(h.context,v,h)===!1)return h.global&&t.active--,k.reject(),k;if(v.aborted)return k.reject(),k;b=_.clk,b&&(w=b.name,w&&!b.disabled&&(h.extraData=h.extraData||{},h.extraData[w]=b.value,"image"===b.type&&(h.extraData[w+".x"]=_.clk_x,h.extraData[w+".y"]=_.clk_y)));var D=1,M=2,L=t("meta[name=csrf-token]").attr("content"),z=t("meta[name=csrf-param]").attr("content");z&&L&&(h.extraData=h.extraData||{},h.extraData[z]=L),h.forceSync?a():setTimeout(a,10);var P,$,I,F=50,A=t.parseXML||function(t,e){return window.ActiveXObject?(e=new ActiveXObject("Microsoft.XMLDOM"),e.async="false",e.loadXML(t)):e=(new DOMParser).parseFromString(t,"text/xml"),e&&e.documentElement&&"parsererror"!==e.documentElement.nodeName?e:null},E=t.parseJSON||function(t){return window.eval("("+t+")")},O=function(e,i,n){var o=e.getResponseHeader("content-type")||"",a=("xml"===i||!i)&&o.indexOf("xml")>=0,s=a?e.responseXML:e.responseText;return a&&"parsererror"===s.documentElement.nodeName&&t.error&&t.error("parsererror"),n&&n.dataFilter&&(s=n.dataFilter(s,i)),"string"==typeof s&&(("json"===i||!i)&&o.indexOf("json")>=0?s=E(s):("script"===i||!i)&&o.indexOf("javascript")>=0&&t.globalEval(s)),s};return k}if(!this.length)return n("ajaxSubmit: skipping submit process - no element selected"),this;var d,u,p,f=this;"function"==typeof e?e={success:e}:"string"==typeof e||e===!1&&arguments.length>0?(e={url:e,data:i,dataType:o},"function"==typeof r&&(e.success=r)):"undefined"==typeof e&&(e={}),d=e.method||e.type||this.attr2("method"),u=e.url||this.attr2("action"),p="string"==typeof u?t.trim(u):"",p=p||window.location.href||"",p&&(p=(p.match(/^([^#]+)/)||[])[1]),e=t.extend(!0,{url:p,success:t.ajaxSettings.success,type:d||t.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},e);var g={};if(this.trigger("form-pre-serialize",[this,e,g]),g.veto)return n("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(e.beforeSerialize&&e.beforeSerialize(this,e)===!1)return n("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var m=e.traditional;"undefined"==typeof m&&(m=t.ajaxSettings.traditional);var v,y=[],b=this.formToArray(e.semantic,y,e.filtering);if(e.data){var w="function"==typeof e.data?e.data(b):e.data;e.extraData=w,v=t.param(w,m)}if(e.beforeSubmit&&e.beforeSubmit(b,this,e)===!1)return n("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[b,this,e,g]),g.veto)return n("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var x=t.param(b,m);v&&(x=x?x+"&"+v:v),"GET"===e.type.toUpperCase()?(e.url+=(e.url.indexOf("?")>=0?"&":"?")+x,e.data=null):e.data=x;var C=[];if(e.resetForm&&C.push(function(){f.resetForm()}),e.clearForm&&C.push(function(){f.clearForm(e.includeHidden)}),!e.dataType&&e.target){var _=e.success||function(){};C.push(function(i,n,o){var a=arguments,s=e.replaceTarget?"replaceWith":"html";t(e.target)[s](i).each(function(){_.apply(this,a)})})}else e.success&&(Array.isArray(e.success)?t.merge(C,e.success):C.push(e.success));if(e.success=function(t,i,n){for(var o=e.context||this,a=0,s=C.length;a0,M="multipart/form-data",L=f.attr("enctype")===M||f.attr("encoding")===M,z=a.fileapi&&a.formdata;n("fileAPI :"+z);var P,$=(D||L)&&!z;e.iframe!==!1&&(e.iframe||$)?e.closeKeepAlive?t.get(e.closeKeepAlive,function(){P=h(b)}):P=h(b):P=(D||L)&&z?c(b):t.ajax(e),f.removeData("jqxhr").data("jqxhr",P);for(var I=0;I0)&&(o={url:o,data:a,dataType:s},"function"==typeof r&&(o.success=r)),o=o||{},o.delegation=o.delegation&&"function"==typeof t.fn.on,!o.delegation&&0===this.length){var l={s:this.selector,c:this.context};return!t.isReady&&l.s?(n("DOM not ready, queuing ajaxForm"),t(function(){t(l.s,l.c).ajaxForm(o)}),this):(n("terminating; zero elements found by selector"+(t.isReady?"":" (DOM not ready)")),this)}return o.delegation?(t(document).off("submit.form-plugin",this.selector,e).off("click.form-plugin",this.selector,i).on("submit.form-plugin",this.selector,o,e).on("click.form-plugin",this.selector,o,i),this):this.ajaxFormUnbind().on("submit.form-plugin",o,e).on("click.form-plugin",o,i)},t.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},t.fn.formToArray=function(e,i,n){var o=[];if(0===this.length)return o;var s,r=this[0],l=this.attr("id"),c=e||"undefined"==typeof r.elements?r.getElementsByTagName("*"):r.elements;if(c&&(c=t.makeArray(c)),l&&(e||/(Edge|Trident)\//.test(navigator.userAgent))&&(s=t(':input[form="'+l+'"]').get(),s.length&&(c=(c||[]).concat(s))),!c||!c.length)return o;"function"==typeof n&&(c=t.map(c,n));var h,d,u,p,f,g,m;for(h=0,g=c.length;h","/":"?","\\":"|"}},t.each(["keydown","keyup","keypress"],function(){t.event.special[this]={add:e}})}(jQuery),function(t,e,i){"use strict";var n="zui.picker",o={},a={lang:null,remote:null,remoteConverter:null,remoteOnly:!1,onRemoteError:null,disableEmptySearch:!1,textKey:"text",valueKey:"value",keysKey:"keys",multi:"auto",formItem:"auto",list:null,allowSingleDeselect:null,autoSelectFirst:!1,maxSelectedCount:0,maxListCount:100,hideEmptyTextOption:!0,searchValueKey:!0,emptyResultHint:null,hideOnScroll:!0,inheritFormItemClasses:!1,emptySearchResultHint:null,accurateSearchHint:null,remoteErrorHint:null,deleteByBackspace:!0,disableScrollOnShow:!0,maxDropHeight:250,dropDirection:"auto",dropWidth:"100%",maxAutoDropWidth:450,minAutoDropWidth:100,multiValueSplitter:",",multiSelectActions:5,searchDelay:200,autoClearDrop:6e4,fixLabelFor:!0,hotkey:!0,onSelect:null,onDeselect:null,onBeforeChange:null,onChange:null,onReady:null,onNoResults:null,onShowingDrop:null,onHidingDrop:null,onShowedDrop:null,onHiddenDrop:null,valueMustInList:!0},s={zh_cn:{emptyResultHint:"没有可选项",emptySearchResultHint:"没有找到 “{0}”",accurateSearchHint:"请提供更多关键词缩小匹配范围",remoteErrorHint:"无法从服务器获取结果 - {0}",selectAll:"全选",deselectAll:"取消选择"},zh_tw:{emptyResultHint:"沒有可選項",emptySearchResultHint:"沒有找到 “{0}”",accurateSearchHint:"請提供更多關鍵詞縮小匹配範圍",remoteErrorHint:"無法從服務器獲取結果 - {0}",selectAll:"全選",deselectAll:"取消選擇"},en:{emptyResultHint:"No options",emptySearchResultHint:'Cannot found "{0}"',accurateSearchHint:"Suggest to provide more keywords",remoteErrorHint:"Unable to get result from server: {0}",selectAll:"Select all",deselectAll:"Deselect all"}},r=function(o,a){var l=this;l.name=n,l.$=t(o),l.id="pk_"+(l.$.attr("id")||t.zui.uuid()),a=l.options=t.extend({},r.DEFAULTS,this.$.data(),a),void 0!==a.hideOnWindowScroll&&(a.hideOnScroll=a.hideOnWindowScroll);var c=t.zui.clientLang?t.zui.clientLang():"en",h=a.lang||c;l.lang=t.zui.getLangData?t.zui.getLangData(n,h,s):s[h]||s[c];var d,u,p=a.formItem,f='.form-item,input[type="hidden"],select,input[type="text"]';if(d="self"===p?l.$:"auto"!==p&&p?l.$.find(p):l.$.is(f)?l.$:l.$.find(f).first(),!d.length)return console.error&&console.error("Cannot found form item for picker.");if(d.is('input[type="hidden"]'))u="hidden";else if(d.is("select"))u="select";else{if(!d.is('input[type="text"]'))return console.error&&console.error("Unknown form type for picker.");u="text"}a.inheritFormItemClasses&&v.addClass(d.attr("class")),l.formType=u,l.$formItem=d.removeClass("picker").hide(),l.selfFormItem=d.is(l.$);var g=a.multi;g&&"auto"!==g||(g="select"===u&&"multiple"===d.attr("multiple")),g=!!g,l.multi=g,g||(l.options.checkable=!1);var m=a.list;m?l.setList("function"==typeof m?m({search:l.search,limit:a.maxListCount}):m,!0):"select"===u?l.updateFromSelect():l.setList([],!0);var v;v=!l.selfFormItem&&l.$.hasClass("picker")?l.$:t('
    ').insertAfter(l.$),v.addClass("picker").toggleClass("picker-multi",g).toggleClass("picker-single",!g);var y=v.children(".picker-selections");y.length?y.empty():y=t('
    ');var b=l.id+"-search",w=t('').appendTo(y);if(!g){var x=t('
    ');a.allowSingleDeselect&&x.append(''),x.appendTo(y),l.$singleSelection=x}v.toggleClass("picker-input-empty",!w.val().length).append(y),l.$container=v,l.$selections=y,l.$search=w,l.search="";var C=a.placeholder;if(void 0===C&&(C=d.attr("placeholder")),"string"==typeof C&&C.length&&y.append(t('
    ').text(C)),a.placeholder=C,a.fixLabelFor){var _=d.attr("id");_&&t('label[for="'+_+'"]').attr("for",b)}var k=void 0!==a.defaultValue?a.defaultValue:d.val();if(null===k&&(k=""),l.setValue(k,!0),l.setDisabled(),w.on("focus",function(){l.disabled||(l._blurTimer&&(clearTimeout(l._blurTimer),l._blurTimer=0),v.addClass("picker-focus"),l.options.disableEmptySearch&&"string"==typeof l.search&&!l.search.length||l.showDropList())}).on("blur",function(){l.disabled||(l._blurTimer&&clearTimeout(l._blurTimer),l._blurTimer=setTimeout(function(){l._blurTimer=0,w.is(":focus")||v.removeClass("picker-focus")},100))}).on("input change",function(){if(!l.disabled){var t=w.val();if(g&&w.width(14*t.length),v.toggleClass("picker-input-empty",!t.length),l.tryUpdateList(t),a.disableEmptySearch){const e="string"!=typeof t||t.length;!l.dropListShowed&&e?l.showDropList():l.dropListShowed&&!e&&l.hideDropList()}}}),a.hotkey&&w.on("keydown",function(t){if(!l.disabled){var e=t.key||t.which;if(l.dropListShowed){var i=l.activeValue,n="string"==typeof i;if("Enter"===e||13===e)n&&(l.select(i,g),g?(l.$search.val(""),l.tryUpdateList("")):w.blur(),t.preventDefault(),t.stopPropagation());else if("ArrowDown"===e||40===e){var o,s=l.$activeOption;if(s&&(o=s.next(".picker-option"),g))for(;o.length&&o.hasClass("picker-option-selected");)o=o.next(".picker-option");o&&o.length||(o=l.$optionsList.children(g?".picker-option:not(.picker-option-selected)":".picker-option").first()),o.length&&l.activeOption(o),t.preventDefault(),t.stopPropagation()}else if("ArrowUp"===e||30===e){var r,s=l.$activeOption;if(s&&(r=s.prev(".picker-option"),g))for(;r.length&&r.hasClass("picker-option-selected");)r=r.prev(".picker-option");r&&r.length||(r=l.$optionsList.children(g?".picker-option:not(.picker-option-selected)":".picker-option").last()),r.length&&l.activeOption(r),t.preventDefault(),t.stopPropagation()}else"Escape"===e||27===e?l.hideDropList(!0):a.deleteByBackspace&&g&&("Backspace"===e||8===e)&&l.value&&l.value.length&&!w.val().length&&l.deselect(l.value[l.value.length-1])}}}),g){y.on("mousedown",function(t){if(!l.disabled)return l.dropListShowed&&!a.checkable?(t.preventDefault(),void t.stopPropagation()):void 0}).on("mouseup",function(e){l.disabled||y.hasClass("sortable-sorting")||t(e.target).closest(".picker-selection-remove").length||l.dropListShowed&&!a.checkable||l.focus()});var T=a.sortValuesByDnd;if(T&&t.fn.sortable){v.addClass("picker-sortable");var S={selector:".picker-selection",stopPropagation:!0,start:function(){l.hideDropList(!0)},finish:function(e){var i=[];t.each(e.list,function(t,e){i.push(e.item.data("value"))}),l.setValue(i.slice(),!1,!0)}};"object"==typeof T&&t.extend(S,T),y.sortable(S)}}if(y.on("click",".picker-selection-remove",function(e){if(!l.disabled){if(l.multi){var i=t(this).closest(".picker-selection");l.deselect(i.data("value"))}else l.deselect();e.stopPropagation()}}),d.on("chosen:updated",function(){l.updateFromSelect(!1),l.setValue(d.val(),!0),l.setDisabled(),l.updateList()}).on("chosen:activate",l.focus).on("chosen:open",l.showDropList).on("chosen:close",l.hideDropList),v.addClass("picker-ready"),t.zui.asap(function(){l.triggerEvent("ready",{picker:l},"","chosen:ready")}),!a.disableScrollOnShow){var D=a.hideOnScroll;D&&![e,i,!0].includes(D)&&t(D).on("scroll",this.handleParentScroll.bind(this))}};r.prototype.destroy=function(){var e=this,i=e.options;e.hideDropList(!0);var o=e.$search;o.off("focus blur input change"),i.hotkey&&o.off("keydown"),o.remove();var a=e.$selections;a.off("click"),e.multi&&a.off("mousedown mouseup"),a.remove();var s=e.$formItem;e.selectOptionsBackup&&(s.empty(),t.each(e.selectOptionsBackup,function(e,n){var o={value:n[i.valueKey]},a=n[i.keysKey];void 0!==a&&(o["data-"+i.keysKey]=a),s.append(t("'),s.checkable&&L.prepend('
    ')):L.removeClass("picker-expired"),L.attr("title",D).removeClass("picker-option-active").toggleClass("disabled",!!k.disabled).toggleClass("picker-option-selected",S),s.checkable&&L.find(".checkbox-primary").toggleClass("checked",S);var P=L.find(".picker-option-text");if(l){var $=D.toLowerCase(),I=$.split(b);if(I.length>1){P.empty();var F=0,A=I[0].length;A&&(P.append(t("").text(D.substr(F,A))),F+=A);for(var E=1;E').text(D.substr(F,r.length))),F+=r.length,A=I[E].length,A&&(P.append(t("").text(D.substr(F,A))),F+=A)}else P.text(D)}else P.text(D);if(s.optionRender){var O=s.optionRender(L,k,n);O instanceof t&&(L=O)}p?(z||L.prev(".picker-option")[0]!==p[0])&&L.insertAfter(p):z&&L.prependTo(o),p=L,n.multi?S||d||(d=k):!u&&C&&T===x?u=k:S?h=k:d||(d=k)}}}w.filter(".picker-expired").remove(),!i&&y=N&&(R=!0,n.$actions.find('[data-type="select-all"]').attr("disabled",o.children(".picker-option").length?null:"disabled"),n.$actions.find('[data-type="deselect-all"]').attr("disabled",n.value&&n.value.length?null:"disabled")))}n.showActions=R,n.$dropMenu.toggleClass("picker-no-actions",!R),i||n.updateMessage(a,"info"),n.$dropMenu.toggleClass("picker-no-options",!c),n.layoutDropList(n.listRendered),n.listRendered=!0}},r.prototype.activeOption=function(e,i){var n=this;e&&(e instanceof t?e=e.attr("data-value"):"object"==typeof e&&(e=e[n.options.valueKey])),n.$optionsList.find(".picker-option-active").removeClass("picker-option-active");var o=n.getListItem(e);if(o){if(o.disabled)return;n.activeValue=e}else e=n.activeValue;var a=n.$optionsList.find('[data-value="'+e+'"]');if(a.length){if(a.addClass("picker-option-active"),!i){var s=a[0];s.scrollIntoViewIfNeeded?s.scrollIntoViewIfNeeded():s.scrollIntoView&&s.scrollIntoView()}n.$activeOption=a}else n.$activeOption=null},r.prototype.updateList=function(t,e,i){var n=this;void 0!==t?n.search=t:t=n.search;var o=n.options.remoteOnly;if(o)n.layoutDropList(!1,!0);else{var a=[];if(null===t||void 0===t||"string"==typeof t&&!t.length)a=n.list||[];else if("function"==typeof n.options.list)a=n.options.list({search:t,limit:n.options.maxListCount});else if(n.list&&n.list.length){var s=n.options.maxListCount,r=n.options.keysKey,l=n.options.textKey,c=n.options.valueKey,h=n.options.searchValueKey,d={};t=t.toLowerCase();for(var u=0;u-1&&(g+=0===v?20:10)}if(!g){var y=p[r];if(null!==y&&void 0!==y&&""!==y){y=y.toLowerCase();var v=y.indexOf(t);v>-1&&(g+=0===v?8:4)}}if(!g&&h&&null!==f&&void 0!==f&&""!==f){f=f.toLowerCase();var v=f.indexOf(t);v>-1&&(g+=0===v?3:1)}if(g&&(d[f]=g+(n.list.length-u)/n.list.length,a.push(p)),s&&a.length>=s)break}}a.length&&(a=a.sort(function(t,e){return d[e[c]]-d[t[c]]}))}n.renderOptionsList(a,!1,i)}e||n.getRemoteList(function(e){o?n.renderOptionsList(n.list,!1,i):n.updateList(t,!0)},o?function(){n.renderOptionsList([],!0,i)}:null)},r.prototype.destroyDropList=function(t){var e=this;e._clearTimer&&clearTimeout(e._clearTimer),e.$dropMenu&&(t?e._clearTimer=setTimeout(e.destroyDropList.bind(e,0),t):(e.$optionsList.off("click mouseenter"),e.$optionsList=null,e.$dropMenu.remove(),e.$dropMenu=null,e.$message=null))},r.prototype.showDropList=function(){var e=this;if(e.triggerEvent("showingDrop",{picker:e})!==!1){if(e._clearTimer&&clearTimeout(e._clearTimer),e.dropListShowed=!0,e.dropDirection=null,e.listRendered=!1,e.activeValue=null,o[e.id]=e,e.options.disableScrollOnShow&&t.zui.fixBodyScrollbar(),!e.$dropMenu){var i=t('
    ').attr("data-id",e.id),a=t('
    ').appendTo(i),s=e.options.checkable;i.data(n,e).toggleClass("picker-multi",e.multi).toggleClass("picker-single",!e.multi).toggleClass("picker-checkable",!!s).appendTo("body"),e.options.chosenMode&&i.addClass("chosen-up"),a.on("click",".picker-option:not(.disabled)",function(){var i=t(this),n=i.hasClass("picker-option-selected");if(!n||s){var o=i.attr("data-value");n?e.deselect(o):e.select(o,s)}}).on("mouseenter",".picker-option:not(.disabled)",function(){s||e.activeOption(t(this),!0)}),e.multi&&!e.options.remote&&(e.$actions=t(['
    ','",'","
    "].join("")).appendTo(i),e.$actions.on("click",".picker-action",function(i){var n=t(this).data("type");"select-all"===n?e.selectAll(s):"deselect-all"===n&&e.deselectAll(s)})),e.$message=t('
    ').appendTo(i),e.$dropMenu=i,e.$optionsList=a}e.updateList(e.search,!1,function(){e.triggerEvent("showedDrop",{picker:e},"","chosen:showing_dropdown")}),e.$dropMenu.addClass("picker-drop-show")}},r.prototype.hideDropList=function(e){var i=this;if(i.triggerEvent("hidingDrop",{picker:i})!==!1){i.dropListShowed=!1,i.$activeOption=null,i.activeValue=null,i.$search.val(""),i.search="",delete o[i.id],i.$dropMenu&&i.$dropMenu.removeClass("picker-drop-show"),i.options.disableScrollOnShow&&t.zui.resetBodyScrollbar(),e&&this.$search.blur(),i.triggerEvent("hiddenDrop",{picker:i},"","chosen:hiding_dropdown");var n=i.options.autoClearDrop;n&&i.destroyDropList(n)}},r.prototype.updateFromSelect=function(e){var i=this,n=i.options,o=[];void 0===e&&(e=!0);var a=i.$formItem.children("option");a.length&&(a.each(function(){var e=t(this),a=e.val(),s=e.text();if(n.onUpdateSelectOption){var r=n.onUpdateSelectOption(e,i);r&&o.push(r)}else if(s.length||a.length){var r={};r[n.valueKey]=a,r[n.textKey]=s,r[n.keysKey]=e.data(n.keysKey),r.disabled=e.attr("disabled"),o.push(r)}var l=n.allowSingleDeselect;"auto"!==l&&null!==l&&void 0!==l||a.length||(n.allowSingleDeselect=!0)}),i.selectOptionsBackup=o.slice()),i.setList(o,e)},r.prototype.setList=function(t,e){var i=this,n=i.options,o=e?[]:i.list||[],a=e?{}:i.listMap||{};"string"==typeof t&&(t=t.split(n.multiValueSplitter));for(var s=0;s')}):p&&u.find('option[value="'+e+'"]').length||u.append('
    ");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),c=l.find("#"+o).closest('[data-ride="table"],#'+a);if(c.length){var h=c.find(".table-statistic");h.length&&(i.defaultStatistic=h.html());var d=i.$.find('[data-ride="pager"]').data("zui.pager"),u=c.find('[data-ride="pager"]');d&&u.length&&d.set(u.data())}}catch(p){console.error(p)}}i.$.removeClass("load-indicator loading").trigger("beforeTableReload"),delete i.defaultStatistic,i.updateStatistic(),i.initModals(),i.$.datepickerAll();var f=i.$.find("tbody>tr"),g=!1;t.each(i.checkItems,function(t,e){e&&(i.checkRow(f.filter('[data-id="'+t+'"]'),!0,!0),g=!0)}),g&&i.updateCheckUI(),n.nested&&i.initNestedList(),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)),h){var d=c[0].getBoundingClientRect();l.css({left:d.left,width:c.width(),overflow:"hidden"}),l.find(".fixed-header-copy").css({left:o.left-d.left,position:"relative",minWidth:i.width()}),a||c.data("fixHeaderScroll")||(c.data("fixHeaderScroll",1),i.width()>c.width()&&c.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"),c=l.hasClass("body-modal");if(r){var h=n.parent(),d=h.is(".table-responsive");o.css({bottom:i.pageFooterHeight||0,left:d?h[0].getBoundingClientRect().left:e.left,width:d?h.width():e.width}),c&&l.css("padding-bottom",40)}else o.css({width:"",left:0,bottom:0}),c&&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(i,n,o){var a=this,s=a.getTable();a.isDataTable&&!i.is(".datatable-row-left")&&(i=s.find('.datatable-row-left[data-index="'+i.data("index")+'"]'));var r=i.find('input[type="checkbox"]');if(r.length&&!r.is(":disabled")){n===e&&(n=!r.is(":checked")),a.isDataTable?s.find('.datatable-row[data-index="'+i.data("index")+'"]').toggleClass("checked",n):i.toggleClass("checked",n);var l=i.data("id");this.checkItems[l]=n,r.prop("checked",n).trigger("change"),o||(i.hasClass("table-parent")&&s.find((a.isDataTable?".fixed-left ":"")+"tbody>tr.parent-"+l).each(function(){a.checkRow(t(this),n,!0)}),a.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 c=t(this),h=c.find('input[type="checkbox"]');if(!h.length)return void l--;r=h.is(":checked");var d=e.isDataTable?i.find('.datatable-row[data-index="'+c.data("index")+'"]'):c;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:20,nested:!1,preserveNested:!0,hot:!1,iframeModalTrigger:".iframe:not(.disabled,[disabled])"},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){i=i||"show",t.zui.messager?(n?n.html=!0:n={html:!0},e=e.toString().replace(/\n/g,"
    "),t.zui.messager[i](e,n)):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 c=r.beforeSubmit,h=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((c&&c(n,a,s))===!1)return!1;l.removeClass("form-watched").enableForm(!1);var r={},h=a.find('[type="file"]');r.fileapi=h.length&&h[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,p="multipart/form-data",f=a.attr("enctype")==p||a.attr("encoding")==p,g=r.fileapi&&r.formdata,m=u&&!g||f&&!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 c=r.responser?t(r.responser):l.find(".form-responser");c.length||(c=t("#responser"));var h=i.message,p=function(){var n=i.callback;if(n)if("object"==typeof n){var o=n.target?e[n.target]:e,a=o[n.name];a.apply(l,Array.isArray(n.params)?n.params:[n.params])}else{var s=n.indexOf("("),r=(s>0?n.substr(0,s):n).split("."),c=e,h=r[0];r.length>1&&(h=r[1],"top"===r[0]?c=e.top:"parent"===r[0]&&(c=e.parent));var a=c[h];if("function"==typeof a){var d=[];return s>0&&")"==n[n.length-1]&&(d=t.parseJSON("["+n.substring(s+1,n.length-1)+"]")),d.push(i),a.apply(l,d)}}};if("success"===i.result){var f=r.locate||i.locate,g=r.closeModal||i.closeModal,m=r.ajaxReload||i.ajaxReload;if(l.enableForm(!0,!!(f||g||m)),h){var v=l.find('[type="submit"]').first(),y=!1;v.length&&(v.popover({container:"body",trigger:"manual",content:h,tipClass:"popover-in-modal popover-success popover-form-result",placement:i.placement||v.data("placement")||r.popoverPlacement||"right"}).popover("show"),setTimeout(function(){v.popover("destroy")},r.popoverTime||2e3),y=!0),c.length&&(c.html(''+h+"").show().delay(3e3).fadeOut(100),y=!0),y||a(h,"success")}if(u)return u(i,!0,l);if(g&&setTimeout(t.zui.closeModal,"number"==typeof g?g:r.closeModalTime||2e3),p()===!1)return;if(f)if("loadInModal"==f){var b=t(".modal");setTimeout(function(){b.load(b.attr("ref"),function(){t(this).find(".modal-dialog").css("width",t(this).data("width")),t.zui.ajustModalPosition()})},1e3)}else"parent"===f||"top"===f?e[f]&&setTimeout(function(){e[f].location.reload()},1200):"reload"===f?setTimeout(function(){e.location.href=e.location.href},1200):setTimeout(function(){t.apps?t.apps.open(f):e.location.href=f},1200);if(m){var w=t(m);w.length&&w.load(e.location.href+" "+m,function(){w.find('[data-toggle="modal"]').modalTrigger()})}}else{if(l.enableForm(),"string"==typeof h)c.length?c.html(''+h+"").show().delay(3e3).fadeOut(100):a(h,"danger");else if("object"==typeof h){var x=!1,C=[];t.each(h,function(e,i){var n=t.isArray(i)?i.join(""):i,o=t("#"+e);if(!o.length)return void C.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 c=function(){var e=t("#"+a);if(e.length)return e.remove(),o.removeClass("has-error"),!0};o.on("change input mousedown",c);var h=t("#"+e+"_chosen");if(h.length&&h.find(".chosen-single,.chosen-choices").addClass("has-error").on("mousedown",function(){c()===!0&&t(this).removeClass("has-error")}),!x&&!o.data("datetimepicker")){var d=o[0];if(o.hasClass("chosen"))o.trigger("chosen:activate").trigger("chosen:open"),d=o.parent().find(".chosen-container")[0];else if(o.is("textarea")&&o.data("keditor")){var u=o.data("keditor");u.focus(),u.edit.doc.body.focus(),d=o.parent().find(".ke-container")[0]}else o.focus();d.scrollIntoView&&d.scrollIntoView(),x=!0}}),C.length&&a(C.join(""),"danger")}if(u)return u(i,!1,l);if(p()===!1)return}}},error:function(t,i,n){if((h&&h(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:{finish: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=e.trim().split(" ");a.each(function(){var e=t(this),n=(e.text()+" "+(e.data("key")||e.data("filter")||"")).trim();e.toggleClass("hidden",!i(s,n))})}n.scrollTo(a.not(".hidden").first().addClass("active")),n.$.trigger("onSearchComplete",e)},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)&&!o.label,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?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=ti.fileMaxSize||e.push(s)}t.length!=e.length&&(window.bootbox||window).alert(i.fileSizeError.format(n(i.fileMaxSize))),e.forEach(function(t){o.add(t)})})};r.prototype.add=function(t){var e=this,i=e.options,n=e.$template.clone();"before"===i.appendWay?e.$.prepend(n):e.$.append(n),n.fileInput({file:t,fileMaxSize:i.eachFileMaxSize,fileSizeError:i.fileSizeError,onDelete:function(t){t.$.remove(),e.options.onDelete&&e.options.onDelete(t,e)},onSelect:function(t,i){e.options.onSelect&&e.options.onSelect(t,i,e)}})},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,c){if("object"==typeof e)return t.createLink(e.moduleName,e.methodName,e.vars,e.viewType,e.isOnlyBody,e.hash,e.tid,e.params);if(c&&(c.tid&!l&&(l=c.tid),void 0!==c.isOnlyBody&&void 0===s&&(s=c.isOnlyBody)),t.tabSession&&!l&&(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'),c=s.find('[name="end"],.control-time-end'),h=function(){var t=l.val();if(s.find(".hide-empty-begin").toggleClass("hide",!t),t){var i=n(e(t)+30);c.find('option[value="'+i+'"]').length&&c.val(i),r.onChange&&r.onChange(c,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");c.find('option[value="'+u+'"]').length&&c.val(u),r.onChange&&r.onChange(c,u)}}else l.on("change",h),a(l,r.begin),a(c,r.end),s.data("timeSpanControlInit",!0);r.end||h()})},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.top.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.extend(t.zui.Picker.DEFAULTS,{optionRender:function(e,i,n){if("user"===n.options.type){var o=n.options.users;if(!o)return;var a=o[i.value];if(!a)return;if(e.find(".picker-option-text").text(a.realname||a.account),e.hasClass("picker-user-option"))return;return e.prepend(t('
    ').avatar({user:a})),a.deptName&&e.append(t('').text(a.deptName)),a.roleName&&e.append(t('').text(a.roleName)),e.addClass("picker-user-option")}},checkable:!0,maxListCount:500,disableScrollOnShow:!1}),t.zui.setUserPickerInfos=function(e){t.zui.Picker.DEFAULTS.users=t.extend({},t.zui.Picker.DEFAULTS.users,e)},t(function(){t(".picker-select[data-pickertype!='remote']").picker({chosenMode:!0}),t("[data-pickertype='remote']").each(function(){var e=t(this).attr("data-pickerremote");t(this).picker({chosenMode:!0,remote:e})}),window.pickerUsers&&t.zui.setUserPickerInfos(window.pickerUsers),t(".user-picker").picker({type:"user"})})),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,c=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(c,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 h=t.initSidebar=function(){var e=t("#sidebar");if(e.length){if(e.data("init"))return!0;c="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(c,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,h=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"}),t.fn.initIframeModal=function(){return this.each(function(){var e=t(this);if(!e.is("[disabled],.disabled")&&!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()}),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 d,u,p,f,g,m=function(){d||(d=t("#subNavbar"),u=t("#pageNav"),p=t("#pageActions"),f=d.children(".nav"),g=f.outerWidth());var e=d.outerWidth(),i=u.outerWidth()||0,n=p.outerWidth()||0;if(i=i?i+15:0,n=n?n+15:0,!i&&!n)return void f.css({maxWidth:null,left:null,position:"static"});var o=Math.max(300,e-i-n),a=Math.min(o,g),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(), -x()}),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 C=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(C)},t(function(){t("textarea.autosize").each(C),t(document).on("input paste change","textarea.autosize",C)}),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 _="undefined"!=typeof InstallTrigger;t.zui.browser.firefox=_,t("html").toggleClass("is-firefox",_).toggleClass("not-firefox",!_),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){var 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(e){t("body.body-modal").length&&window.parent&&window.parent!==window&&window.parent.$("body").removeClass("hide-modal-close")}).on("loaded.zui.modal",function(e){t("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 i=270,n=e.getBoundingClientRect();n.top<0&&(i=Math.min(270,n.height)+n.top),e.style.maxHeight=Math.min(270,i,t(window).height()-28)+"px"},50)})),t(".dropdown-menu.with-search .menu-search").on("click",function(t){return t.stopPropagation(),!1})})}(jQuery),function(t){function e(){if(!config.skipRedirect&&!window.skipRedirect){var e=window.parent,i=config.currentModule,n=config.currentMethod;if("file"!==i||"download"!==n){var o="index"===i&&"index"===n,a="#_single"===location.hash||/(\?|\&)_single/.test(location.search)||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;return void(location.href=t.createLink("index","index","")+"#app="+encodeURIComponent(r))}if(e!==window&&e.$.apps){o&&e.location.reload();var l=window.name;if(0===l.indexOf("app-")){t.apps=window.apps=e.$.apps;var c=l.substring(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;if(n){var o;"function"==typeof Event?o=new Event(t.type,{bubbles:!0}):(o=document.createEvent("Event"),o.initEvent(t.type,!0,!0)),n.dispatchEvent(o)}}}).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(a.external||"file"===a.moduleName&&"download"===a.methodName)return;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{};var i=0===e.indexOf("http:")||0===e.indexOf("https:");if(i){var n=window.location.origin;if(e.indexOf(n)<0)return{external:!0,url:e};e=e.substr((n+config.webRoot).length)}var o=e.split("#"),a=o[0].split("?"),s=a[1],r=s?t.getSearchParam("",s):{},l=a[0],c={url:e,isOnlyBody:"yes"===r.onlybody,vars:[],hash:o[1]||"",params:r,tid:r.tid||""};if("GET"===config.requestType){c.moduleName=r[config.moduleVar]||"index",c.methodName=r[config.methodVar]||"index",c.viewType=r[config.viewVar]||config.defaultView;for(var h in r)h!==config.moduleVar&&h!==config.methodVar&&h!==config.viewVar&&"onlybody"!==h&&"tid"!==h&&c.vars.push([h,r[h]])}else{var d=l.lastIndexOf("/");d===l.length-1&&(l=l.substr(0,d),d=l.lastIndexOf("/")),d>=0&&(l=l.substr(d+1));var u=l.lastIndexOf(".");u>=0?(c.viewType=l.substr(u+1),l=l.substr(0,u)):c.viewType=config.defaultView;var p=l.split(config.requestFix);if(c.moduleName=p[0]||"index",c.methodName=p[1]||"index",p.length>2)for(var f=2;f.nav>li").length>10&&(i(),t(window).on("resize",i)),setTimeout(n,1e3)}),parent!==window&&parent.$.apps){var o=window.name;if(o&&0===o.indexOf("app-")){var a=o.substring(4),s=parent.$.apps.openedApps[a];s&&s.$app.removeClass("loading")}}}(jQuery),function(t){"use strict";function e(e,i){"object"!=typeof i&&(i={user:i});var n=t(e);i=t.extend({},n.data(),i);var o=i.user;"string"==typeof o&&(o={account:o});var a={},s=i.size;s&&(a.width=s,a.height=s,a.lineHeight=s,Number.isNaN(+s)||n.addClass("size-"+s));var r=!!o.avatar;if(n.toggleClass("has-image",r).toggleClass("has-text",!r),n.empty(),r)n.append(t("").attr("src",o.avatar));else{var l=t.zui.strCode(o.account)*(i.hueDistance||43)%360;a.background="hsl("+l+","+(i.saturation||"40%")+","+(i.lightness||"60%")+")",Number.isNaN(+s)||(a.fontSize=Math.round(s/2)+"px");var c=o.name||o.realname||o.account;c=/^[\u4e00-\u9fa5\s]+$/.test(c)?c.length<=2?c:c.substring(c.length-2):/^[A-Za-z\d\s]+$/.test(c)?c[0].toUpperCase():c.length<=2?c:c.substring(0,2),n.append(t('').text(c))}return n.css(a)}t.fn.avatar=function(t){return this.each(function(){e(this,t)})}}(jQuery),$.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 +function(t,e,n){"$:nomunge";function i(){o=e[s](function(){a.each(function(){var e=t(this),n=e.width(),i=e.height(),o=t.data(this,d);n===o.w&&i===o.h||e.trigger(l,[o.w=n,o.h=i])}),i()},r[c])}var o,a=t([]),r=t.resize=t.extend(t.resize,{}),s="setTimeout",l="resize",d=l+"-special-event",c="delay",p="throttleWindow";r[c]=250,r[p]=!0,t.event.special[l]={setup:function(){if(!r[p]&&this[s])return!1;var e=t(this);a=a.add(e),t.data(this,d,{w:e.width(),h:e.height()}),1===a.length&&i()},teardown:function(){if(!r[p]&&this[s])return!1;var e=t(this);a=a.not(e),e.removeData(d),a.length||clearTimeout(o)},add:function(e){function i(e,i,a){var r=t(this),s=t.data(this,d)||{};s.w=i!==n?i:r.width(),s.h=a!==n?a:r.height(),o.apply(this,arguments)}if(!r[p]&&this[s])return!1;var o;return"function"==typeof e?(o=e,i):(o=e.handler,void(e.handler=i))}}}(jQuery,this),+function(t){"use strict";function e(i,o){var a,r=this.process.bind(this);this.$element=t(t(i).is("body")?window:i),this.$body=t("body"),this.$scrollElement=this.$element.on("scroll."+n+".data-api",r),this.options=t.extend({},e.DEFAULTS,o),this.selector||(this.selector=(this.options.target||(a=t(i).attr("href"))&&a.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a"),this.offsets=t([]),this.targets=t([]),this.activeTarget=null,this.refresh(),this.process()}var n="zui.scrollspy";e.DEFAULTS={offset:10},e.prototype.refresh=function(){var e=this.$element[0]==window?"offset":"position";this.offsets=t([]),this.targets=t([]);var n=this;this.$body.find(this.selector).map(function(){var i=t(this),o=i.data("target")||i.attr("href"),a=/^#./.test(o)&&t(o);return a&&a.length&&a.is(":visible")&&[[a[e]().top+(!t.isWindow(n.$scrollElement.get(0))&&n.$scrollElement.scrollTop()),o]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){n.offsets.push(this[0]),n.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,i=n-this.$scrollElement.height(),o=this.offsets,a=this.targets,r=this.activeTarget;if(e>=i)return r!=(t=a.last()[0])&&this.activate(t);if(r&&e<=o[0])return r!=(t=a[0])&&this.activate(t);for(t=o.length;t--;)r!=a[t]&&e>=o[t]&&(!o[t+1]||e<=o[t+1])&&this.activate(a[t])},e.prototype.activate=function(e){this.activeTarget=e,t(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var i=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',o=t(i).parents("li").addClass("active");o.parent(".dropdown-menu").length&&(o=o.closest("li.dropdown").addClass("active")),o.trigger("activate."+n)};var i=t.fn.scrollspy;t.fn.scrollspy=function(i){return this.each(function(){var o=t(this),a=o.data(n),r="object"==typeof i&&i;a||o.data(n,a=new e(this,r)),"string"==typeof i&&a[i]()})},t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=i,this},t(window).on("load",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);e.scrollspy(e.data())})})}(jQuery),function(t,e){"use strict";var n,i,o="localStorage",a="page_"+t.location.pathname+t.location.search,r=function(){this.silence=!0;try{o in t&&t[o]&&t[o].setItem&&(this.enable=!0,n=t[o])}catch(r){}this.enable||(i={},n={getLength:function(){var t=0;return e.each(i,function(){t++}),t},key:function(t){var n,o=0;return e.each(i,function(e){return o===t?(n=e,!1):void o++}),n},removeItem:function(t){delete i[t]},getItem:function(t){return i[t]},setItem:function(t,e){i[t]=e},clear:function(){i={}}}),this.storage=n,this.page=this.get(a,{})};r.prototype.pageSave=function(){if(e.isEmptyObject(this.page))this.remove(a);else{var t,n=[];for(t in this.page){var i=this.page[t];null===i&&n.push(t)}for(t=n.length-1;t>=0;t--)delete this.page[n[t]];this.set(a,this.page)}},r.prototype.pageRemove=function(t){"undefined"!=typeof this.page[t]&&(this.page[t]=null,this.pageSave())},r.prototype.pageClear=function(){this.page={},this.pageSave()},r.prototype.pageGet=function(t,e){var n=this.page[t];return void 0===e||null!==n&&void 0!==n?n:e},r.prototype.pageSet=function(t,n){e.isPlainObject(t)?e.extend(!0,this.page,t):this.page[this.serialize(t)]=n,this.pageSave()},r.prototype.check=function(){if(!this.enable&&!this.silence)throw new Error("Browser not support localStorage or enable status been set true.");return this.enable},r.prototype.length=function(){return this.check()?n.getLength?n.getLength():n.length:0},r.prototype.removeItem=function(t){return n.removeItem(t),this},r.prototype.remove=function(t){return this.removeItem(t)},r.prototype.getItem=function(t){return n.getItem(t)},r.prototype.get=function(t,e){var n=this.deserialize(this.getItem(t));return"undefined"!=typeof n&&null!==n||"undefined"==typeof e?n:e},r.prototype.key=function(t){return n.key(t)},r.prototype.setItem=function(t,e){return n.setItem(t,e),this},r.prototype.set=function(t,e){return void 0===e?this.remove(t):(this.setItem(t,this.serialize(e)),this)},r.prototype.clear=function(){return n.clear(),this},r.prototype.forEach=function(t){for(var e=this.length(),i=e-1;i>=0;i--){var o=n.key(i);t(o,this.get(o))}return this},r.prototype.getAll=function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},r.prototype.serialize=function(t){return"string"==typeof t?t:JSON.stringify(t)},r.prototype.deserialize=function(t){if("string"==typeof t)try{return JSON.parse(t)}catch(e){return t||void 0}},e.zui({store:new r})}(window,jQuery),function(t){"use strict";var e="zui.searchBox",n=function(e,i){var o=this;o.name=name,o.$=t(e),o.options=i=t.extend({},n.DEFAULTS,o.$.data(),i);var a=o.$.is(i.inputSelector)?o.$:o.$.find(i.inputSelector);if(a.length){var r=function(){o.changeTimer&&(clearTimeout(o.changeTimer),o.changeTimer=null)},s=function(){r();var t=o.getSearch();if(t!==o.lastValue){var e=""===t;a.toggleClass("empty",e),o.$.callComEvent(o,"onSearchChange",[t,e]),o.lastValue=t}};o.$input=a=a.first(),a.on(i.listenEvent,function(t){o.changeTimer=setTimeout(function(){s()},i.changeDelay)}).on("focus",function(t){a.addClass("focus"),o.$.callComEvent(o,"onFocus",[t])}).on("blur",function(t){a.removeClass("focus"),o.$.callComEvent(o,"onBlur",[t])}).on("keydown",function(t){var e=0,n=t.which;27===n&&i.escToClear?(this.setSearch("",!0),s(),e=1):13===n&&i.onPressEnter&&(s(),o.$.callComEvent(o,"onPressEnter",[t]));var a=o.$.callComEvent(o,"onKeyDown",[t]);a===!1&&(e=1),e&&t.preventDefault()}),o.$.on("click",".search-clear-btn",function(t){o.setSearch("",!0),s(),o.focus(),t.preventDefault()}),s()}else console.error("ZUI: search box init error, cannot find search box input element.")};n.DEFAULTS={inputSelector:'input[type="search"],input[type="text"]',listenEvent:"change input paste",changeDelay:500},n.prototype.getSearch=function(){return this.$input&&t.trim(this.$input.val())},n.prototype.setSearch=function(t,e){var n=this.$input;n&&(n.val(t),e||n.trigger("change"))},n.prototype.focus=function(){this.$input&&this.$input.focus()},t.fn.searchBox=function(i){return this.each(function(){var o=t(this),a=o.data(e),r="object"==typeof i&&i;a||o.data(e,a=new n(this,r)),"string"==typeof i&&a[i]()})},n.NAME=e,t.fn.searchBox.Constructor=n}(jQuery),function(t,e){"use strict";var n="zui.draggable",i={container:"body",move:!0},o=0,a=function(e,n){var a=this;a.$=t(e),a.id=o++,a.options=t.extend({},i,a.$.data(),n),a.init()};a.DEFAULTS=i,a.NAME=n,a.prototype.init=function(){var i,o,a,r,s,l=this,d=l.$,c="before",p="drag",u="finish",f="."+n+"."+l.id,h="mousedown"+f,g="mouseup"+f,m="mousemove"+f,v=l.options,y=v.selector,b=v.handle,w=d,C="function"==typeof v.move,x=function(t){var e=t.pageX,n=t.pageY;s=!0;var o={left:e-a.x,top:n-a.y};w.removeClass("drag-ready").addClass("dragging"),v.move&&(C?v.move(o,w):w.css(o)),v[p]&&v[p]({event:t,element:w,startOffset:a,pos:o,offset:{x:e-i.x,y:n-i.y},smallOffset:{x:e-r.x,y:n-r.y}}),r.x=e,r.y=n,v.stopPropagation&&t.stopPropagation()},$=0,T=function(e){$&&(t.zui.clearAsap||clearTimeout)($),$=(t.zui.asap||setTimeout)(function(){$=0,x(e)},0)},S=function(n){if(t(e).off(f),!s)return void w.removeClass("drag-ready");var o={left:n.pageX-a.x,top:n.pageY-a.y};w.removeClass("drag-ready dragging"),v.move&&(C?v.move(o,w):w.css(o)),v[u]&&v[u]({event:n,element:w,startOffset:a,pos:o,offset:{x:n.pageX-i.x,y:n.pageY-i.y},smallOffset:{x:n.pageX-r.x,y:n.pageY-r.y}}),n.preventDefault(),v.stopPropagation&&n.stopPropagation()},D=function(n){var l=t.zui.getMouseButtonCode(v.mouseButton);if(!(l>-1&&n.button!==l)){var d=t(this);if(y&&(w=b?d.closest(y):d),v[c]){var p=v[c]({event:n,element:w});if(p===!1)return}var u=t(v.container),f=w.offset();o=u.offset(),i={x:n.pageX,y:n.pageY},a={x:n.pageX-f.left+o.left,y:n.pageY-f.top+o.top},r=t.extend({},i),s=!1,w.addClass("drag-ready"),n.preventDefault(),v.stopPropagation&&n.stopPropagation(),t(e).on(m,T).on(g,S)}};b?d.on(h,b,D):y?d.on(h,y,D):d.on(h,D)},a.prototype.destroy=function(){var i="."+n+"."+this.id;this.$.off(i),t(e).off(i),this.$.data(n,null)},t.fn.draggable=function(e){return this.each(function(){var i=t(this),o=i.data(n),r="object"==typeof e&&e;o||i.data(n,o=new a(this,r)),"string"==typeof e&&o[e]()})},t.fn.draggable.Constructor=a}(jQuery,document),function(t,e,n){"use strict";var i="zui.droppable",o={target:".droppable-target",deviation:5,sensorOffsetX:0,sensorOffsetY:0,dropToClass:"drop-to",dropTargetClass:"drop-target"},a=0,r=function(e,n){var i=this;i.id=a++,i.$=t(e),i.options=t.extend({},o,i.$.data(),n),i.init()};r.DEFAULTS=o,r.NAME=i,r.prototype.trigger=function(e,n){return t.zui.callEvent(this.options[e],n,this)},r.prototype.init=function(){var o,a,r,s,l,d,c,p,u,f,h,g,m,v,y=this,b=y.$,w=y.options,C=w.deviation,x="."+i+"."+y.id,$="mousedown"+x,T="mouseup"+x,S="mousemove"+x,D=w.selector,k=w.handle,z=w.flex,E=w.canMoveHere,P=w.dropToClass,I=w.noShadow,M=b,O=!1;w.dropOnMouseleave&&(T+=" mouseleave"+x);var j=function(e){if(O){if(g={left:e.pageX,top:e.pageY},!s){if(n.abs(g.left-u.left)a&&g.top>r&&g.left-1&&n.button!==i)){var g=t(this);D&&(M=k?g.closest(D):g),M.hasClass("drag-shadow")||w.before&&w.before({event:n,element:M})===!1||(O=!0,o=w.container?"function"==typeof w.container?w.container(M,b):t(w.container).first():D?b:t("body"),a="function"==typeof w.target?w.target(M,b):o.find(w.target),r=null,s=null,l=!1,d=!0,c=null,p=M.offset(),f=o.offset(),f.top=f.top-o.scrollTop(),f.left=f.left-o.scrollLeft(),u={left:n.pageX,top:n.pageY},m=t.extend({},u),h={left:u.left-p.left,top:u.top-p.top},M.addClass("drag-from"),t(e).on(S,A).on(T,N),v=setTimeout(function(){t(e).on($,N)},10),n.preventDefault(),w.stopPropagation&&n.stopPropagation())}};k?b.on($,k,H):D?b.on($,D,H):b.on($,H)},r.prototype.destroy=function(){var n="."+i+"."+this.id;this.$.off(n),t(e).off(n),this.$.data(i,null)},r.prototype.reset=function(){this.destroy(),this.init()},t.fn.droppable=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]()})},t.fn.droppable.Constructor=r}(jQuery,document,Math),+function(t,e){"use strict";function n(e,n,a){return this.each(function(){var r=t(this),s=r.data(i),l=t.extend({},o.DEFAULTS,r.data(),"object"==typeof e&&e);s||r.data(i,s=new o(this,l)),"string"==typeof e?s[e](n,a):l.show&&s.show(n,a)})}var i="zui.modal",o=function(n,o){var a=this;a.options=o,a.$body=t(document.body),a.$element=t(n),a.$backdrop=a.isShown=null,a.scrollbarWidth=0,o.moveable===e&&(a.options.moveable=a.$element.hasClass("modal-moveable")),o.remote&&a.$element.find(".modal-content").load(o.remote,function(){a.$element.trigger("loaded."+i)}),o.scrollInside&&t(window).on("resize."+i,function(){a.isShown&&a.adjustPosition(e,100)})};o.VERSION="3.2.0",o.TRANSITION_DURATION=300,o.BACKDROP_TRANSITION_DURATION=150,o.DEFAULTS={backdrop:!0,keyboard:!0,show:!0,position:"fit"};var a=function(e,n){var i=t(window);n.left=Math.max(0,Math.min(n.left,i.width()-e.outerWidth())),n.top=Math.max(0,Math.min(n.top,i.height()-e.outerHeight())),e.css(n)};o.prototype.toggle=function(t,e){return this.isShown?this.hide():this.show(t,e)},o.prototype.adjustPosition=function(n,o){var r=this;if(clearTimeout(r.reposTask),o)return void(r.reposTask=setTimeout(r.adjustPosition.bind(r,n,0),o));var s=r.options;if(n===e&&(n=s.position),n!==e&&null!==n){"function"==typeof n&&(n=n(r));var l=r.$element.find(".modal-dialog"),d=t(window).height(),c={maxHeight:"initial",overflow:"visible"},p=l.find(".modal-body").css(c);if(s.scrollInside&&p.length){var u=s.headerHeight,f=s.footerHeight,h=l.find(".modal-header"),g=l.find(".modal-footer");"number"!=typeof u&&(u=h.length?h.outerHeight():"function"==typeof u?u(h):0),"number"!=typeof f&&(f=g.length?g.outerHeight():"function"==typeof f?f(g):0),c.maxHeight=d-u-f,c.overflow=p[0].scrollHeight>c.maxHeight?"auto":"visible",p.css(c)}var m=Math.max(0,(d-l.outerHeight())/2);if("fit"===n?n={top:m>50?Math.floor(2*m/3):m}:"center"===n?n={top:m}:t.isPlainObject(n)||(n={top:n}),l.hasClass("modal-moveable")){var v=null,y=s.rememberPos;y&&(y===!0?v=r.$element.data("modal-pos"):t.zui.store&&(v=t.zui.store.pageGet(i+".rememberPos."+y))),n=t.extend(n,{left:Math.max(0,(t(window).width()-l.outerWidth())/2)},v),"inside"===s.moveable?a(l,n):l.css(n)}else l.css(n)}},o.prototype.setMoveable=function(){t.fn.draggable||console.error("Moveable modal requires draggable.js.");var e=this,n=e.options,o=e.$element.find(".modal-dialog").removeClass("modal-dragged");o.toggleClass("modal-moveable",!!n.moveable),e.$element.data("modal-moveable-setup")||o.draggable({container:e.$element,handle:".modal-header",before:function(){var t=o.css("margin-top");t&&"0px"!==t&&o.css("top",t).css("margin-top","").addClass("modal-dragged")},finish:function(o){var a=n.rememberPos;a&&(e.$element.data("modal-pos",o.pos),t.zui.store&&a!==!0&&t.zui.store.pageSet(i+".rememberPos."+a,o.pos))},move:"inside"!==n.moveable||function(t){a(o,t)}})},o.prototype.show=function(e,n){var a=this,r=t.Event("show."+i,{relatedTarget:e});a.$element.trigger(r),a.$element.toggleClass("modal-scroll-inside",!!a.options.scrollInside),a.isShown||r.isDefaultPrevented()||(a.isShown=!0,a.options.moveable&&a.setMoveable(),a.options.backdrop!==!1&&(a.setScrollbar(),a.$body.addClass("modal-open")),a.escape(),a.$element.on("click.dismiss."+i,'[data-dismiss="modal"]',function(t){a.hide(),t.stopPropagation()}),a.backdrop(function(){var r=t.support.transition&&a.$element.hasClass("fade");a.$element.parent().length||a.$element.appendTo(a.$body),a.$element.show().scrollTop(0),r&&a.$element[0].offsetWidth,a.$element.addClass("in").attr("aria-hidden",!1),a.adjustPosition(n),a.enforceFocus();var s=t.Event("shown."+i,{relatedTarget:e});r?a.$element.find(".modal-dialog").one("bsTransitionEnd",function(){a.$element.trigger("focus").trigger(s)}).emulateTransitionEnd(o.TRANSITION_DURATION):a.$element.trigger("focus").trigger(s)}))},o.prototype.hide=function(e){e&&e.preventDefault&&e.preventDefault();var n=this;e=t.Event("hide."+i),n.$element.trigger(e),n.isShown&&!e.isDefaultPrevented()&&(n.isShown=!1,n.options.backdrop!==!1&&(n.$body.removeClass("modal-open"),n.resetScrollbar()),n.escape(),t(document).off("focusin."+i),n.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss."+i),t.support.transition&&n.$element.hasClass("fade")?n.$element.one("bsTransitionEnd",n.hideModal.bind(n)).emulateTransitionEnd(o.TRANSITION_DURATION):n.hideModal())},o.prototype.enforceFocus=function(){t(document).off("focusin."+i).on("focusin."+i,function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")}.bind(this))},o.prototype.escape=function(){this.isShown&&this.options.keyboard?t(document).on("keydown.dismiss."+i,function(n){if(27==n.which){var o=t.Event("escaping."+i),a=this.$element.triggerHandler(o,"esc");if(a!=e&&!a)return;this.hide()}}.bind(this)):this.isShown||t(document).off("keydown.dismiss."+i)},o.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$element.trigger("hidden."+i)})},o.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},o.prototype.backdrop=function(e){var n=this,a=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var r=t.support.transition&&a;if(this.$backdrop=t('
  • ');var i=t("").attr(t.extend({href:e.url||"###","class":e.className,style:e.style},e.attrs)).data("item",e);e.html?e.html===!0?i.html(e.label||e.text):i=t(e.html):i.text(e.label||e.text),e.icon&&i.prepend(''),e.onClick&&i.on("click",e.onClick);var o=t("
  • ").toggleClass("disabled",e.disabled===!0).append(i);return e.items&&o.data("item",e).addClass("dropdown-submenu"),o}function i(e,i,o){var a=o.itemCreator||n,r=typeof e;return"string"===r?e=e.split(","):"function"===r&&(e=e(o)),!!e&&(t.each(e,function(t,e){i.append(a(e,t,o))}),!0)}var o="zui.contextmenu",a={animation:"fade",menuTemplate:'',toggleTrigger:!1,duration:200},r=!1,s={},l="zui-contextmenu-"+t.zui.uuid(),d=0,c=0,p=function(){return t(document).off("mousemove."+o).on("mousemove."+o,function(t){d=t.clientX,c=t.clientY}),s},u=function(e){var n=t("#"+l);return n.length&&n.hasClass("contextmenu-show")&&(!e||(n.data("options")||{}).id===e)},f=null,h=function(e,n){"function"==typeof e&&(n=e,e=null),f&&(clearTimeout(f),f=null);var i=t("#"+l);if(i.length){var o=i.removeClass("contextmenu-show").data("options");if(!e||o.id===e){var a=function(){i.find(".contextmenu-menu").removeClass("open"),o.onHidden&&o.onHidden(),n&&n()};o.onHide&&o.onHide();var r=o.animation;i.find(".contextmenu-menu").removeClass("in"),r?f=setTimeout(a,o.duration):a()}}return s},g=function(n,p,u){t.isPlainObject(n)&&(u=p,p=n,n=p.items),r=!0,p=t.extend({},a,p);var g=t("#"+l);g.length||(g=t('
    ').appendTo("body"));var m=g.find(".contextmenu-menu").empty();m.off("click."+o).on("click."+o,"a,.contextmenu-item",function(e){var n=t(this),i=p.onClickItem&&p.onClickItem(n.data("item"),n,e,p);i!==!1&&h()}).off("mouseenter."+o).on("mouseenter."+o,".dropdown-submenu",function(e){var n=t(this),o=n.data("item"),a=n.children(".dropdown-menu");if(o&&(o.items&&(a.length||(a=t(p.menuTemplate).appendTo(n)),i(o.items,a,p)),n.removeData("item")),a.length){a.removeClass("pull-left").css("top",0);var r=(n[0].getBoundingClientRect(),a[0].getBoundingClientRect()),s=window.innerWidth,l=window.innerHeight;if(r.bottom>l){var d=Math.max(-r.top,l-r.bottom);a.css("top",d)}r.right>s&&a.addClass("pull-left")}}),m.attr("class","contextmenu-menu"+(p.className?" "+p.className:"")),g.attr("class","contextmenu contextmenu-show");var v=p.menuCreator;if(v)m.append(v(n,p));else{m.append(p.menuTemplate);var y=m.children().first(),b=i(n,y,p);if(b===!1)return b}var w=p.animation,C=p.duration;w===!0&&(p.animation=w="fade"),f&&(clearTimeout(f),f=null);var x=function(){m.addClass("in"),p.onShown&&p.onShown(),u&&u()};p.onShow&&p.onShow(),g.data("options",{animation:w,onHide:p.onHide,onHidden:p.onHidden,id:p.id,duration:C});var $=p.x,T=p.y;$===e&&($=(p.event||p).clientX),$===e&&($=d),T===e&&(T=(p.event||p).clientY),T===e&&(T=c);var S=window.innerHeight,D=window.innerWidth,y=m.children().first(),k=y.outerWidth(),z=y.outerHeight();if(p.position){var E=p.position({x:$,y:T,width:k,height:z,winHeight:S,winWidth:D},p,m);E&&($=E.x,T=E.y)}return $=Math.max(0,Math.min($,D-k)),T=Math.max(0,Math.min(T,S-z)),g.css({left:$,top:T}).show(),m.addClass("open"),w?(m.addClass(w),f=setTimeout(function(){x(),r=!1},10)):(x(),r=!1),s};t.extend(s,{NAME:o,DEFAULTS:a,show:g,hide:h,listenMouse:p,isShow:u}),t.zui({ContextMenu:s});var m=function(e,n){var i=this;i.name=o,i.$=t(e),i.id=t.zui.uuid(),n=i.options=t.extend({trigger:"contextmenu"},s.DEFAULTS,this.$.data(),n);var a=function(t){if("mousedown"!==t.type||2===t.button){if(n.toggleTrigger&&i.isShow())i.hide();else{var e={x:t.clientX,y:t.clientY,event:t};if(i.show(e)===!1)return}return t.preventDefault(),t.returnValue=!1,!1}},r=n.trigger,l=r+"."+o;n.selector?i.$.on(l,n.selector,a):i.$.on(l,a),n.show&&i.show("object"==typeof n.show?n.show:null)};m.prototype.destory=function(){that.$.off("."+o)},m.prototype.hide=function(t){return s.hide(this.id,t)},m.prototype.show=function(e,n){return e=t.extend({id:this.id,$toggle:this.$},this.options,e),s.show(e,n)},m.prototype.isShow=function(){return u(this.id)},t.fn.contextmenu=function(e){return this.each(function(){var n=t(this),i=n.data(o),a="object"==typeof e&&e;i||n.data(o,i=new m(this,a)),"string"==typeof e&&i[e]()})},t.fn.contextmenu.Constructor=m,t.fn.contextDropdown=function(e){t(this).contextmenu(t.extend({trigger:"click",animation:"fade",toggleTrigger:!0,menuCreator:function(e,n){var i=n.$toggle,o=i.attr("data-target");o||(o=i.attr("href"),o=o&&/#/.test(o)&&o.replace(/.*(?=#[^\s]*$)/,""));var a=o?t(o):i.next(".dropdown-menu"),r=n.transferEvent;if(r!==!1){var s="data-contextmenu-index";a.find("a,.contextmenu-item").each(function(e){t(this).attr(s,e)});var l=a.clone();return l.on("string"==typeof r?r:"click","a,.contextmenu-item",function(e){var n=a.find("["+s+'="'+t(this).attr(s)+'"]'),i=n[0];if(i)return i[e.type]?i[e.type]():n.trigger(e.type),e.preventDefault(),e.stopPropagation(),!1}),l}return a.clone()},position:function(t,e,n){var i=e.placement,o=e.$toggle;if(!i){var a=n.find(".dropdown-menu"),r=a.hasClass("pull-right"),s=o.parent().hasClass("dropup");i=r?s?"top-right":"bottom-right":s?"top-left":"bottom-left",r&&a.removeClass("pull-right")}var l=o[0].getBoundingClientRect();switch(i){case"top-left":return{x:l.left,y:Math.floor(l.top-t.height)};case"top-right":return{x:Math.floor(l.right-t.width),y:Math.floor(l.top-t.height)};case"bottom-left":return{x:l.left,y:l.bottom};case"bottom-right":return{x:Math.floor(l.right-t.width),y:l.bottom}}return t}},e))},t(document).on("click",function(e){var n=t(e.target),i=n.closest('[data-toggle="context-dropdown"]');if(i.length){var a=i.data(o);a||i.contextDropdown({show:!0})}else r||n.closest(".contextmenu").length||h()})}(jQuery,void 0),+function(t){"use strict";var e=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",this.pause.bind(this)).on("mouseleave",this.cycle.bind(this))};e.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,touchable:!0},e.prototype.touchable=function(){function e(e){var e=e||window.event;e.originalEvent&&(e=e.originalEvent);var a=t(this);switch(e.type){case"touchstart":i=e.touches[0].pageX,o=e.touches[0].pageY;break;case"touchend":var r=e.changedTouches[0].pageX-i,s=e.changedTouches[0].pageY-o;if(Math.abs(r)>Math.abs(s))n(a,r),Math.abs(r)>10&&e.preventDefault();else{var l=t(window);t("body,html").animate({scrollTop:l.scrollTop()-s},400)}}}function n(t,e){e>10?a.prev():e<-10&&a.next()}if(this.options.touchable){this.$element.on("touchstart touchmove touchend",e);var i,o,a=this}},e.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(this.next.bind(this),this.options.interval)),this},e.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},e.prototype.to=function(e){var n=this,i=this.getActiveIndex();if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid",function(){n.to(e)}):i==e?this.pause().cycle():this.slide(e>i?"next":"prev",t(this.$items[e]))},e.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition.end&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},e.prototype.next=function(){if(!this.sliding)return this.slide("next")},e.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},e.prototype.slide=function(e,n){var i=this.$element.find(".item.active"),o=n||i[e](),a=this.interval,r="next"==e?"left":"right",s="next"==e?"first":"last",l=this;if(!o.length){if(!this.options.wrap)return;o=this.$element.find(".item")[s]()}this.sliding=!0,a&&this.pause();var d=t.Event("slide.zui.carousel",{relatedTarget:o[0],direction:r});if(!o.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var e=t(l.$indicators.children()[l.getActiveIndex()]);e&&e.addClass("active")})),t.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(d),d.isDefaultPrevented())return;o.addClass(e),o[0].offsetWidth,i.addClass(r),o.addClass(r),i.one(t.support.transition.end,function(){o.removeClass([e,r].join(" ")).addClass("active"),i.removeClass(["active",r].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(d),d.isDefaultPrevented())return;i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return a&&this.cycle(),this}};var n=t.fn.carousel;t.fn.carousel=function(n){return this.each(function(){var i=t(this),o=i.data("zui.carousel"),a=t.extend({},e.DEFAULTS,i.data(),"object"==typeof n&&n),r="string"==typeof n?n:a.slide;o||i.data("zui.carousel",o=new e(this,a)),"number"==typeof n?o.to(n):r?o[r]():a.interval&&o.pause().cycle(),a.touchable&&o.touchable()})},t.fn.carousel.Constructor=e,t.fn.carousel.noConflict=function(){return t.fn.carousel=n,this},t(document).on("click.zui.carousel.data-api","[data-slide], [data-slide-to]",function(e){var n,i=t(this),o=t(i.attr("data-target")||(n=i.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"")),a=t.extend({},o.data(),i.data()),r=i.attr("data-slide-to");r&&(a.interval=!1),o.carousel(a),(r=i.attr("data-slide-to"))&&o.data("zui.carousel").to(r),e.preventDefault()}),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var e=t(this);e.carousel(e.data())})})}(window.jQuery),/*! TangBin: image.ready.js http://www.planeart.cn/?p=1121 */ +function(t){"use strict";t.zui.imgReady=function(){var t=[],e=null,n=function(){for(var e=0;e1024)&&(o.call(u),s.end=!0)},s(),u.onload=function(){!s.end&&s(),a&&a.call(u),u=u.onload=u.onerror=null},void(s.end||(t.push(s),null===e&&(e=setInterval(n,40)))))}}()}(jQuery),function(t,e,n){"use strict";if(!t.fn.modalTrigger)throw new Error("modal & modalTrigger requires for lightbox");if(!t.zui.imgReady)throw new Error("imgReady requires for lightbox");var i=function(e,n){this.$=t(e),this.options=this.getOptions(n),this.init()};i.DEFAULTS={modalTeamplate:'
  • ").toggleClass("active",r===n.recPerPage);i.append(s)}return t('
    ').addClass(e.options.menuDirection).append(i)},a.prototype.createElement=function(e,n,i){var o=this,a=o.createLinkItem.bind(o),r=o.lang;switch(e){case"prev":return a(i.prev,r.prev);case"prev_icon":return a(i.prev,'');case"next":return a(i.next,r.next);case"next_icon":return a(i.next,'');case"first":return a(1,r.first);case"first_icon":return a(1,'');case"last":return a(i.totalPage,r.last);case"last_icon":return a(i.totalPage,'');case"space":case"|":return t('
  • ');case"nav":case"pages":return void o.createNavItems();case"total_text":return t(('
    '+r.totalCount+"
    ").format(i));case"page_text":return t(('
    '+r.pageOf+"
    ").format(i));case"total_page_text":return t(('
    '+r.totalPage+"
    ").format(i));case"page_of_total_text":return t(('
    '+r.pageOfTotal+"
    ").format(i));case"page_size_text":return t(('
    '+r.pageSize+"
    ").format(i));case"items_range_text":return t(('
    '+r.itemsRange+"
    ").format(i));case"goto":return o.createGoto();case"size_menu":return o.createSizeMenu();default:return t("
  • ").html(e.format(i))}},a.prototype.createLink=function(n,i){n===e&&(n=this.state.page),i===e&&(i=this.state);var o=this.options.linkCreator;return"string"==typeof o?o.format(t.extend({},i,{page:n})):"function"==typeof o?o(n,i):"#page="+n},a.prototype.render=function(e){var n=this,i=n.state,o=n.options.elementCreator||n.createElement,a=t.isPlainObject(o);e=e||n.elements||n.options.elements,"string"==typeof e&&(e=e.split(",")),n.elements=e,n.$.empty();for(var r=0;r").append(d)),n.$.append(d))}var c=null;return n.$.children("li").each(function(){var e=t(this),n=!!e.children(".pager-item").length;c?c.toggleClass("pager-item-right",!n):n&&e.addClass("pager-item-left"),c=n?e:null}),c&&c.addClass("pager-item-right"),n.$.callComEvent(n,"onRender",[i]),n},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]},i),t.fn.pager=function(e){return this.each(function(){var i=t(this),o=i.data(n),r="object"==typeof e&&e;o||i.data(n,o=new a(this,r)),"string"==typeof e&&o[e]()})},a.NAME=n,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",n=function(e){this.element=t(e)};n.prototype.show=function(){var n=this.element,i=n.closest("ul:not(.dropdown-menu)"),o=n.attr("data-target")||n.attr("data-tab");if(o||(o=n.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),!n.parent("li").hasClass("active")){var a=i.find(".active:last a")[0],r=t.Event("show."+e,{relatedTarget:a});if(n.trigger(r),!r.isDefaultPrevented()){var s=t(o);this.activate(n.parent("li"),i),this.activate(s,s.parent(),function(){n.trigger({type:"shown."+e,relatedTarget:a})})}}},n.prototype.activate=function(e,n,i){function o(){a.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),e.addClass("active"),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active"),i&&i()}var a=n.find("> .active"),r=i&&t.support.transition&&a.hasClass("fade");r?a.one(t.support.transition.end,o).emulateTransitionEnd(150):o(),a.removeClass("in")};var i=t.fn.tab;t.fn.tab=function(i){return this.each(function(){var o=t(this),a=o.data(e);a||o.data(e,a=new n(this)),"string"==typeof i&&a[i]()})},t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=i,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 n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;t(this).one("bsTransitionEnd",function(){n=!0});var o=function(){n||t(i).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",n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.transitioning=null,this.options.parent&&(this.$parent=t(this.options.parent)),this.options.toggle&&this.toggle()};n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var n=t.Event("show."+e);if(this.$element.trigger(n),!n.isDefaultPrevented()){var i=this.$parent&&this.$parent.find(".in");if(i&&i.length){var o=i.data(e);if(o&&o.transitioning)return;i.collapse("hide"),o||i.data(e,null)}var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0),this.transitioning=1;var r=function(){this.$element.removeClass("collapsing").addClass("in")[a]("auto"),this.transitioning=0,this.$element.trigger("shown."+e)};if(!t.support.transition)return r.call(this);var s=t.camelCase(["scroll",a].join("-"));this.$element.one(t.support.transition.end,r.bind(this)).emulateTransitionEnd(350)[a](this.$element[0][s])}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var n=t.Event("hide."+e);if(this.$element.trigger(n),!n.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[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[i](0).one(t.support.transition.end,o.bind(this)).emulateTransitionEnd(350):o.call(this)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var i=t.fn.collapse;t.fn.collapse=function(i){return this.each(function(){var o=t(this),a=o.data(e),r=t.extend({},n.DEFAULTS,o.data(),"object"==typeof i&&i);a||o.data(e,a=new n(this,r)),"string"==typeof i&&a[i]()})},t.fn.collapse.Constructor=n,t.fn.collapse.noConflict=function(){return t.fn.collapse=i,this},t(document).on("click."+e+".data-api","[data-toggle=collapse]",function(n){var i,o=t(this),a=o.attr("data-target")||n.preventDefault()||(i=o.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""),r=t(a),s=r.data(e),l=s?"toggle":o.data(),d=o.attr("data-parent"),c=d&&t(d);s&&s.transitioning||(c&&c.find('[data-toggle=collapse][data-parent="'+d+'"]').not(o).addClass("collapsed"),o[r.hasClass("in")?"addClass":"removeClass"]("collapsed")),r.collapse(l)})}(window.jQuery),function(t,e){"use strict";var n=1200,i=992,o=768,a=e(t),r=function(){var t=a.width();e("html").toggleClass("screen-desktop",t>=i&&t=n).toggleClass("screen-tablet",t>=o&&t=i)},s="",l=navigator.userAgent;l.match(/(iPad|iPhone|iPod)/i)?s+=" os-ios":l.match(/android/i)?s+=" os-android":l.match(/Win/i)?s+=" os-windows":l.match(/Mac/i)?s+=" os-mac":l.match(/Linux/i)?s+=" os-linux":l.match(/X11/i)&&(s+=" os-unix"),"ontouchstart"in document.documentElement&&(s+=" is-touchable"),e("html").addClass(s),a.resize(r),r()}(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...'},n=function(){for(var t=!1,e=11;e>5;e--)if(this.isIE(e)){t=e;break}this.ie=t,this.cssHelper()};n.prototype.cssHelper=function(){var e=this.ie,n=t("html");n.toggleClass("ie",e).removeClass("ie-6 ie-7 ie-8 ie-9 ie-10"),e&&n.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)},n.prototype.tip=function(n){var i=t("#browseHappyTip");i.length||(i=t('
    '),i.prependTo("body")),n||(n=t.zui.getLangData("zui.browser",t.zui.clientLang(),e),"object"==typeof n&&(n=n.tip)),i.find(".content").html(n)},n.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},n.prototype.isIE10=function(){return navigator.appVersion.indexOf("MSIE 10")!==-1},n.prototype.isIE11=function(){var t=navigator.userAgent;return t.indexOf("Trident")!==-1&&t.indexOf("rv:11")!==-1},t.zui({browser:new n}),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,n=function(t){return t instanceof Date||("number"==typeof t&&t<1e10&&(t*=1e3),t=new Date(t)),t},i=function(t){return n(t).getTime()},o=function(t,e){t=n(t),void 0===e&&(e="yyyy-MM-dd hh:mm:ss");var i={"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 i)new RegExp("("+o+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?i[o]:("00"+i[o]).substr((""+i[o]).length)));return e},a=function(t,e){return t.setTime(t.getTime()+e),t},r=function(t,n){return a(t,n*e)},s=function(t){return new Date(n(t).getTime())},l=function(t){return t%4===0&&t%100!==0||t%400===0},d=function(t,e){return[31,l(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},c=function(t){return d(t.getFullYear(),t.getMonth())},p=function(t){return t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t},u=function(t,e){var n=t.getDate();return t.setDate(1),t.setMonth(t.getMonth()+e),t.setDate(Math.min(n,c(t))),t},f=function(t,e){e=e||1;for(var n=new Date(t.getTime());n.getDay()!=e;)n=r(n,-1);return p(n)},h=function(t,e){return t.toDateString()===e.toDateString()},g=function(t,e){var n=f(t),i=r(s(n),7);return e>=n&&e1){var n;if(2==arguments.length&&"object"==typeof e)for(var i in e)void 0!==e[i]&&(n=new RegExp("({"+i+"})","g"),t=t.replace(n,e[i]));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}))}(),/*! +!function(t,e,i){"use strict";if("undefined"==typeof t)throw new Error("ZUI requires jQuery");Number.isNaN||"function"!=typeof isNaN||(Number.isNaN=isNaN),Number.parseInt||"function"!=typeof parseInt||(Number.parseInt=parseInt),Number.parseFloat||"function"!=typeof parseFloat||(Number.parseFloat=parseFloat),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?0:t.zui.getScrollbarSize()},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 c=o.options[r];"function"==typeof c&&(l.result=t.zui.callEvent(c,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(){"use strict";function t(t,e){return i&&!e?requestAnimationFrame(t):setTimeout(t,e||0)}function e(t){return i?cancelAnimationFrame(t):void clearTimeout(t)}var i="function"==typeof window.requestAnimationFrame;$.zui({asap:t,clearAsap:e})}(),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(c)),i.$.append(c))}var h=null;return i.$.children("li").each(function(){var e=t(this),i=!!e.children(".pager-item").length;h?h.toggleClass("pager-item-right",!i):i&&e.addClass("pager-item-left"),h=i?e:null}),h&&h.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(),c=o.attr("data-parent"),h=c&&t(c);r&&r.transitioning||(h&&h.find('[data-toggle=collapse][data-parent="'+c+'"]').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},c=function(t,e){return[31,l(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},h=function(t){return c(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,h(t))),t},p=function(t,e){e=e||1;for(var i=new Date(t.getTime());i.getDay()!=e;)i=s(i,-1);return d(i)},f=function(t,e){return t.toDateString()===e.toDateString()},g=function(t,e){var i=p(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}))}(),/*! * jQuery resize event - v1.1 * http://benalman.com/projects/jquery-resize-plugin/ * Copyright (c) 2010 "Cowboy" Ben Alman * MIT & GPL http://benalman.com/about/license/ */ -function(t,e,n){"$:nomunge";function i(){o=e[s](function(){a.each(function(){var e=t(this),n=e.width(),i=e.height(),o=t.data(this,d);n===o.w&&i===o.h||e.trigger(l,[o.w=n,o.h=i])}),i()},r[c])}var o,a=t([]),r=t.resize=t.extend(t.resize,{}),s="setTimeout",l="resize",d=l+"-special-event",c="delay",p="throttleWindow";r[c]=250,r[p]=!0,t.event.special[l]={setup:function(){if(!r[p]&&this[s])return!1;var e=t(this);a=a.add(e),t.data(this,d,{w:e.width(),h:e.height()}),1===a.length&&i()},teardown:function(){if(!r[p]&&this[s])return!1;var e=t(this);a=a.not(e),e.removeData(d),a.length||clearTimeout(o)},add:function(e){function i(e,i,a){var r=t(this),s=t.data(this,d)||{};s.w=i!==n?i:r.width(),s.h=a!==n?a:r.height(),o.apply(this,arguments)}if(!r[p]&&this[s])return!1;var o;return"function"==typeof e?(o=e,i):(o=e.handler,void(e.handler=i))}}}(jQuery,this),+function(t){"use strict";function e(i,o){var a,r=this.process.bind(this);this.$element=t(t(i).is("body")?window:i),this.$body=t("body"),this.$scrollElement=this.$element.on("scroll."+n+".data-api",r),this.options=t.extend({},e.DEFAULTS,o),this.selector||(this.selector=(this.options.target||(a=t(i).attr("href"))&&a.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a"),this.offsets=t([]),this.targets=t([]),this.activeTarget=null,this.refresh(),this.process()}var n="zui.scrollspy";e.DEFAULTS={offset:10},e.prototype.refresh=function(){var e=this.$element[0]==window?"offset":"position";this.offsets=t([]),this.targets=t([]);var n=this;this.$body.find(this.selector).map(function(){var i=t(this),o=i.data("target")||i.attr("href"),a=/^#./.test(o)&&t(o);return a&&a.length&&a.is(":visible")&&[[a[e]().top+(!t.isWindow(n.$scrollElement.get(0))&&n.$scrollElement.scrollTop()),o]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){n.offsets.push(this[0]),n.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,i=n-this.$scrollElement.height(),o=this.offsets,a=this.targets,r=this.activeTarget;if(e>=i)return r!=(t=a.last()[0])&&this.activate(t);if(r&&e<=o[0])return r!=(t=a[0])&&this.activate(t);for(t=o.length;t--;)r!=a[t]&&e>=o[t]&&(!o[t+1]||e<=o[t+1])&&this.activate(a[t])},e.prototype.activate=function(e){this.activeTarget=e,t(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var i=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',o=t(i).parents("li").addClass("active");o.parent(".dropdown-menu").length&&(o=o.closest("li.dropdown").addClass("active")),o.trigger("activate."+n)};var i=t.fn.scrollspy;t.fn.scrollspy=function(i){return this.each(function(){var o=t(this),a=o.data(n),r="object"==typeof i&&i;a||o.data(n,a=new e(this,r)),"string"==typeof i&&a[i]()})},t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=i,this},t(window).on("load",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);e.scrollspy(e.data())})})}(jQuery),function(t,e){"use strict";var n,i,o="localStorage",a="page_"+t.location.pathname+t.location.search,r=function(){this.silence=!0;try{o in t&&t[o]&&t[o].setItem&&(this.enable=!0,n=t[o])}catch(r){}this.enable||(i={},n={getLength:function(){var t=0;return e.each(i,function(){t++}),t},key:function(t){var n,o=0;return e.each(i,function(e){return o===t?(n=e,!1):void o++}),n},removeItem:function(t){delete i[t]},getItem:function(t){return i[t]},setItem:function(t,e){i[t]=e},clear:function(){i={}}}),this.storage=n,this.page=this.get(a,{})};r.prototype.pageSave=function(){if(e.isEmptyObject(this.page))this.remove(a);else{var t,n=[];for(t in this.page){var i=this.page[t];null===i&&n.push(t)}for(t=n.length-1;t>=0;t--)delete this.page[n[t]];this.set(a,this.page)}},r.prototype.pageRemove=function(t){"undefined"!=typeof this.page[t]&&(this.page[t]=null,this.pageSave())},r.prototype.pageClear=function(){this.page={},this.pageSave()},r.prototype.pageGet=function(t,e){var n=this.page[t];return void 0===e||null!==n&&void 0!==n?n:e},r.prototype.pageSet=function(t,n){e.isPlainObject(t)?e.extend(!0,this.page,t):this.page[this.serialize(t)]=n,this.pageSave()},r.prototype.check=function(){if(!this.enable&&!this.silence)throw new Error("Browser not support localStorage or enable status been set true.");return this.enable},r.prototype.length=function(){return this.check()?n.getLength?n.getLength():n.length:0},r.prototype.removeItem=function(t){return n.removeItem(t),this},r.prototype.remove=function(t){return this.removeItem(t)},r.prototype.getItem=function(t){return n.getItem(t)},r.prototype.get=function(t,e){var n=this.deserialize(this.getItem(t));return"undefined"!=typeof n&&null!==n||"undefined"==typeof e?n:e},r.prototype.key=function(t){return n.key(t)},r.prototype.setItem=function(t,e){return n.setItem(t,e),this},r.prototype.set=function(t,e){return void 0===e?this.remove(t):(this.setItem(t,this.serialize(e)),this)},r.prototype.clear=function(){return n.clear(),this},r.prototype.forEach=function(t){for(var e=this.length(),i=e-1;i>=0;i--){var o=n.key(i);t(o,this.get(o))}return this},r.prototype.getAll=function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},r.prototype.serialize=function(t){return"string"==typeof t?t:JSON.stringify(t)},r.prototype.deserialize=function(t){if("string"==typeof t)try{return JSON.parse(t)}catch(e){return t||void 0}},e.zui({store:new r})}(window,jQuery),function(t){"use strict";var e="zui.searchBox",n=function(e,i){var o=this;o.name=name,o.$=t(e),o.options=i=t.extend({},n.DEFAULTS,o.$.data(),i);var a=o.$.is(i.inputSelector)?o.$:o.$.find(i.inputSelector);if(a.length){var r=function(){o.changeTimer&&(clearTimeout(o.changeTimer),o.changeTimer=null)},s=function(){r();var t=o.getSearch();if(t!==o.lastValue){var e=""===t;a.toggleClass("empty",e),o.$.callComEvent(o,"onSearchChange",[t,e]),o.lastValue=t}};o.$input=a=a.first(),a.on(i.listenEvent,function(t){o.changeTimer=setTimeout(function(){s()},i.changeDelay)}).on("focus",function(t){a.addClass("focus"),o.$.callComEvent(o,"onFocus",[t])}).on("blur",function(t){a.removeClass("focus"),o.$.callComEvent(o,"onBlur",[t])}).on("keydown",function(t){var e=0,n=t.which;27===n&&i.escToClear?(this.setSearch("",!0),s(),e=1):13===n&&i.onPressEnter&&(s(),o.$.callComEvent(o,"onPressEnter",[t]));var a=o.$.callComEvent(o,"onKeyDown",[t]);a===!1&&(e=1),e&&t.preventDefault()}),o.$.on("click",".search-clear-btn",function(t){o.setSearch("",!0),s(),o.focus(),t.preventDefault()}),s()}else console.error("ZUI: search box init error, cannot find search box input element.")};n.DEFAULTS={inputSelector:'input[type="search"],input[type="text"]',listenEvent:"change input paste",changeDelay:500},n.prototype.getSearch=function(){return this.$input&&t.trim(this.$input.val())},n.prototype.setSearch=function(t,e){var n=this.$input;n&&(n.val(t),e||n.trigger("change"))},n.prototype.focus=function(){this.$input&&this.$input.focus()},t.fn.searchBox=function(i){return this.each(function(){var o=t(this),a=o.data(e),r="object"==typeof i&&i;a||o.data(e,a=new n(this,r)),"string"==typeof i&&a[i]()})},n.NAME=e,t.fn.searchBox.Constructor=n}(jQuery),function(t,e){"use strict";var n="zui.draggable",i={container:"body",move:!0},o=0,a=function(e,n){var a=this;a.$=t(e),a.id=o++,a.options=t.extend({},i,a.$.data(),n),a.init()};a.DEFAULTS=i,a.NAME=n,a.prototype.init=function(){var i,o,a,r,s,l=this,d=l.$,c="before",p="drag",u="finish",f="."+n+"."+l.id,h="mousedown"+f,g="mouseup"+f,m="mousemove"+f,v=l.options,y=v.selector,b=v.handle,w=d,C="function"==typeof v.move,x=function(t){var e=t.pageX,n=t.pageY;s=!0;var o={left:e-a.x,top:n-a.y};w.removeClass("drag-ready").addClass("dragging"),v.move&&(C?v.move(o,w):w.css(o)),v[p]&&v[p]({event:t,element:w,startOffset:a,pos:o,offset:{x:e-i.x,y:n-i.y},smallOffset:{x:e-r.x,y:n-r.y}}),r.x=e,r.y=n,v.stopPropagation&&t.stopPropagation()},$=0,T=function(e){$&&(t.zui.clearAsap||clearTimeout)($),$=(t.zui.asap||setTimeout)(function(){$=0,x(e)},0)},S=function(n){if(t(e).off(f),!s)return void w.removeClass("drag-ready");var o={left:n.pageX-a.x,top:n.pageY-a.y};w.removeClass("drag-ready dragging"),v.move&&(C?v.move(o,w):w.css(o)),v[u]&&v[u]({event:n,element:w,startOffset:a,pos:o,offset:{x:n.pageX-i.x,y:n.pageY-i.y},smallOffset:{x:n.pageX-r.x,y:n.pageY-r.y}}),n.preventDefault(),v.stopPropagation&&n.stopPropagation()},D=function(n){var l=t.zui.getMouseButtonCode(v.mouseButton);if(!(l>-1&&n.button!==l)){var d=t(this);if(y&&(w=b?d.closest(y):d),v[c]){var p=v[c]({event:n,element:w});if(p===!1)return}var u=t(v.container),f=w.offset();o=u.offset(),i={x:n.pageX,y:n.pageY},a={x:n.pageX-f.left+o.left,y:n.pageY-f.top+o.top},r=t.extend({},i),s=!1,w.addClass("drag-ready"),n.preventDefault(),v.stopPropagation&&n.stopPropagation(),t(e).on(m,T).on(g,S)}};b?d.on(h,b,D):y?d.on(h,y,D):d.on(h,D)},a.prototype.destroy=function(){var i="."+n+"."+this.id;this.$.off(i),t(e).off(i),this.$.data(n,null)},t.fn.draggable=function(e){return this.each(function(){var i=t(this),o=i.data(n),r="object"==typeof e&&e;o||i.data(n,o=new a(this,r)),"string"==typeof e&&o[e]()})},t.fn.draggable.Constructor=a}(jQuery,document),function(t,e,n){"use strict";var i="zui.droppable",o={target:".droppable-target",deviation:5,sensorOffsetX:0,sensorOffsetY:0,dropToClass:"drop-to",dropTargetClass:"drop-target"},a=0,r=function(e,n){var i=this;i.id=a++,i.$=t(e),i.options=t.extend({},o,i.$.data(),n),i.init()};r.DEFAULTS=o,r.NAME=i,r.prototype.trigger=function(e,n){return t.zui.callEvent(this.options[e],n,this)},r.prototype.init=function(){var o,a,r,s,l,d,c,p,u,f,h,g,m,v,y=this,b=y.$,w=y.options,C=w.deviation,x="."+i+"."+y.id,$="mousedown"+x,T="mouseup"+x,S="mousemove"+x,D=w.selector,k=w.handle,z=w.flex,E=w.canMoveHere,P=w.dropToClass,I=w.noShadow,M=b,O=!1;w.dropOnMouseleave&&(T+=" mouseleave"+x);var j=function(e){if(O){if(g={left:e.pageX,top:e.pageY},!s){if(n.abs(g.left-u.left)a&&g.top>r&&g.left-1&&n.button!==i)){var g=t(this);D&&(M=k?g.closest(D):g),M.hasClass("drag-shadow")||w.before&&w.before({event:n,element:M})===!1||(O=!0,o=w.container?"function"==typeof w.container?w.container(M,b):t(w.container).first():D?b:t("body"),a="function"==typeof w.target?w.target(M,b):o.find(w.target),r=null,s=null,l=!1,d=!0,c=null,p=M.offset(),f=o.offset(),f.top=f.top-o.scrollTop(),f.left=f.left-o.scrollLeft(),u={left:n.pageX,top:n.pageY},m=t.extend({},u),h={left:u.left-p.left,top:u.top-p.top},M.addClass("drag-from"),t(e).on(S,A).on(T,N),v=setTimeout(function(){t(e).on($,N)},10),n.preventDefault(),w.stopPropagation&&n.stopPropagation())}};k?b.on($,k,H):D?b.on($,D,H):b.on($,H)},r.prototype.destroy=function(){var n="."+i+"."+this.id;this.$.off(n),t(e).off(n),this.$.data(i,null)},r.prototype.reset=function(){this.destroy(),this.init()},t.fn.droppable=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]()})},t.fn.droppable.Constructor=r}(jQuery,document,Math),+function(t,e){"use strict";function n(e,n,a){return this.each(function(){var r=t(this),s=r.data(i),l=t.extend({},o.DEFAULTS,r.data(),"object"==typeof e&&e);s||r.data(i,s=new o(this,l)),"string"==typeof e?s[e](n,a):l.show&&s.show(n,a)})}var i="zui.modal",o=function(n,o){var a=this;a.options=o,a.$body=t(document.body),a.$element=t(n),a.$backdrop=a.isShown=null,a.scrollbarWidth=0,o.moveable===e&&(a.options.moveable=a.$element.hasClass("modal-moveable")),o.remote&&a.$element.find(".modal-content").load(o.remote,function(){a.$element.trigger("loaded."+i)}),o.scrollInside&&t(window).on("resize."+i,function(){a.isShown&&a.adjustPosition(e,100)})};o.VERSION="3.2.0",o.TRANSITION_DURATION=300,o.BACKDROP_TRANSITION_DURATION=150,o.DEFAULTS={backdrop:!0,keyboard:!0,show:!0,position:"fit"};var a=function(e,n){var i=t(window);n.left=Math.max(0,Math.min(n.left,i.width()-e.outerWidth())),n.top=Math.max(0,Math.min(n.top,i.height()-e.outerHeight())),e.css(n)};o.prototype.toggle=function(t,e){return this.isShown?this.hide():this.show(t,e)},o.prototype.adjustPosition=function(n,o){var r=this;if(clearTimeout(r.reposTask),o)return void(r.reposTask=setTimeout(r.adjustPosition.bind(r,n,0),o));var s=r.options;if(n===e&&(n=s.position),n!==e&&null!==n){"function"==typeof n&&(n=n(r));var l=r.$element.find(".modal-dialog"),d=t(window).height(),c={maxHeight:"initial",overflow:"visible"},p=l.find(".modal-body").css(c);if(s.scrollInside&&p.length){var u=s.headerHeight,f=s.footerHeight,h=l.find(".modal-header"),g=l.find(".modal-footer");"number"!=typeof u&&(u=h.length?h.outerHeight():"function"==typeof u?u(h):0),"number"!=typeof f&&(f=g.length?g.outerHeight():"function"==typeof f?f(g):0),c.maxHeight=d-u-f,c.overflow=p[0].scrollHeight>c.maxHeight?"auto":"visible",p.css(c)}var m=Math.max(0,(d-l.outerHeight())/2);if("fit"===n?n={top:m>50?Math.floor(2*m/3):m}:"center"===n?n={top:m}:t.isPlainObject(n)||(n={top:n}),l.hasClass("modal-moveable")){var v=null,y=s.rememberPos;y&&(y===!0?v=r.$element.data("modal-pos"):t.zui.store&&(v=t.zui.store.pageGet(i+".rememberPos."+y))),n=t.extend(n,{left:Math.max(0,(t(window).width()-l.outerWidth())/2)},v),"inside"===s.moveable?a(l,n):l.css(n)}else l.css(n)}},o.prototype.setMoveable=function(){t.fn.draggable||console.error("Moveable modal requires draggable.js.");var e=this,n=e.options,o=e.$element.find(".modal-dialog").removeClass("modal-dragged");o.toggleClass("modal-moveable",!!n.moveable),e.$element.data("modal-moveable-setup")||o.draggable({container:e.$element,handle:".modal-header",before:function(){var t=o.css("margin-top");t&&"0px"!==t&&o.css("top",t).css("margin-top","").addClass("modal-dragged")},finish:function(o){var a=n.rememberPos;a&&(e.$element.data("modal-pos",o.pos),t.zui.store&&a!==!0&&t.zui.store.pageSet(i+".rememberPos."+a,o.pos))},move:"inside"!==n.moveable||function(t){a(o,t)}})},o.prototype.show=function(e,n){var a=this,r=t.Event("show."+i,{relatedTarget:e});a.$element.trigger(r),a.$element.toggleClass("modal-scroll-inside",!!a.options.scrollInside),a.isShown||r.isDefaultPrevented()||(a.isShown=!0,a.options.moveable&&a.setMoveable(),a.options.backdrop!==!1&&(a.setScrollbar(),a.$body.addClass("modal-open")),a.escape(),a.$element.on("click.dismiss."+i,'[data-dismiss="modal"]',function(t){a.hide(),t.stopPropagation()}),a.backdrop(function(){var r=t.support.transition&&a.$element.hasClass("fade");a.$element.parent().length||a.$element.appendTo(a.$body),a.$element.show().scrollTop(0),r&&a.$element[0].offsetWidth,a.$element.addClass("in").attr("aria-hidden",!1),a.adjustPosition(n),a.enforceFocus();var s=t.Event("shown."+i,{relatedTarget:e});r?a.$element.find(".modal-dialog").one("bsTransitionEnd",function(){a.$element.trigger("focus").trigger(s)}).emulateTransitionEnd(o.TRANSITION_DURATION):a.$element.trigger("focus").trigger(s)}))},o.prototype.hide=function(e){e&&e.preventDefault&&e.preventDefault();var n=this;e=t.Event("hide."+i),n.$element.trigger(e),n.isShown&&!e.isDefaultPrevented()&&(n.isShown=!1,n.options.backdrop!==!1&&(n.$body.removeClass("modal-open"),n.resetScrollbar()),n.escape(),t(document).off("focusin."+i),n.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss."+i),t.support.transition&&n.$element.hasClass("fade")?n.$element.one("bsTransitionEnd",n.hideModal.bind(n)).emulateTransitionEnd(o.TRANSITION_DURATION):n.hideModal())},o.prototype.enforceFocus=function(){t(document).off("focusin."+i).on("focusin."+i,function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")}.bind(this))},o.prototype.escape=function(){this.isShown&&this.options.keyboard?t(document).on("keydown.dismiss."+i,function(n){if(27==n.which){var o=t.Event("escaping."+i),a=this.$element.triggerHandler(o,"esc");if(a!=e&&!a)return;this.hide()}}.bind(this)):this.isShown||t(document).off("keydown.dismiss."+i)},o.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$element.trigger("hidden."+i)})},o.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},o.prototype.backdrop=function(e){var n=this,a=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var r=t.support.transition&&a;if(this.$backdrop=t('
  • ');var i=t("").attr(t.extend({href:e.url||"###","class":e.className,style:e.style},e.attrs)).data("item",e);e.html?e.html===!0?i.html(e.label||e.text):i=t(e.html):i.text(e.label||e.text),e.icon&&i.prepend(''),e.onClick&&i.on("click",e.onClick);var o=t("
  • ").toggleClass("disabled",e.disabled===!0).append(i);return e.items&&o.data("item",e).addClass("dropdown-submenu"),o}function i(e,i,o){var a=o.itemCreator||n,r=typeof e;return"string"===r?e=e.split(","):"function"===r&&(e=e(o)),!!e&&(t.each(e,function(t,e){i.append(a(e,t,o))}),!0)}var o="zui.contextmenu",a={animation:"fade",menuTemplate:'',toggleTrigger:!1,duration:200},r=!1,s={},l="zui-contextmenu-"+t.zui.uuid(),d=0,c=0,p=function(){return t(document).off("mousemove."+o).on("mousemove."+o,function(t){d=t.clientX,c=t.clientY}),s},u=function(e){var n=t("#"+l);return n.length&&n.hasClass("contextmenu-show")&&(!e||(n.data("options")||{}).id===e)},f=null,h=function(e,n){"function"==typeof e&&(n=e,e=null),f&&(clearTimeout(f),f=null);var i=t("#"+l);if(i.length){var o=i.removeClass("contextmenu-show").data("options");if(!e||o.id===e){var a=function(){i.find(".contextmenu-menu").removeClass("open"),o.onHidden&&o.onHidden(),n&&n()};o.onHide&&o.onHide();var r=o.animation;i.find(".contextmenu-menu").removeClass("in"),r?f=setTimeout(a,o.duration):a()}}return s},g=function(n,p,u){t.isPlainObject(n)&&(u=p,p=n,n=p.items),r=!0,p=t.extend({},a,p);var g=t("#"+l);g.length||(g=t('
    ').appendTo("body"));var m=g.find(".contextmenu-menu").empty();m.off("click."+o).on("click."+o,"a,.contextmenu-item",function(e){var n=t(this),i=p.onClickItem&&p.onClickItem(n.data("item"),n,e,p);i!==!1&&h()}).off("mouseenter."+o).on("mouseenter."+o,".dropdown-submenu",function(e){var n=t(this),o=n.data("item"),a=n.children(".dropdown-menu");if(o&&(o.items&&(a.length||(a=t(p.menuTemplate).appendTo(n)),i(o.items,a,p)),n.removeData("item")),a.length){a.removeClass("pull-left").css("top",0);var r=(n[0].getBoundingClientRect(),a[0].getBoundingClientRect()),s=window.innerWidth,l=window.innerHeight;if(r.bottom>l){var d=Math.max(-r.top,l-r.bottom);a.css("top",d)}r.right>s&&a.addClass("pull-left")}}),m.attr("class","contextmenu-menu"+(p.className?" "+p.className:"")),g.attr("class","contextmenu contextmenu-show");var v=p.menuCreator;if(v)m.append(v(n,p));else{m.append(p.menuTemplate);var y=m.children().first(),b=i(n,y,p);if(b===!1)return b}var w=p.animation,C=p.duration;w===!0&&(p.animation=w="fade"),f&&(clearTimeout(f),f=null);var x=function(){m.addClass("in"),p.onShown&&p.onShown(),u&&u()};p.onShow&&p.onShow(),g.data("options",{animation:w,onHide:p.onHide,onHidden:p.onHidden,id:p.id,duration:C});var $=p.x,T=p.y;$===e&&($=(p.event||p).clientX),$===e&&($=d),T===e&&(T=(p.event||p).clientY),T===e&&(T=c);var S=window.innerHeight,D=window.innerWidth,y=m.children().first(),k=y.outerWidth(),z=y.outerHeight();if(p.position){var E=p.position({x:$,y:T,width:k,height:z,winHeight:S,winWidth:D},p,m);E&&($=E.x,T=E.y)}return $=Math.max(0,Math.min($,D-k)),T=Math.max(0,Math.min(T,S-z)),g.css({left:$,top:T}).show(),m.addClass("open"),w?(m.addClass(w),f=setTimeout(function(){x(),r=!1},10)):(x(),r=!1),s};t.extend(s,{NAME:o,DEFAULTS:a,show:g,hide:h,listenMouse:p,isShow:u}),t.zui({ContextMenu:s});var m=function(e,n){var i=this;i.name=o,i.$=t(e),i.id=t.zui.uuid(),n=i.options=t.extend({trigger:"contextmenu"},s.DEFAULTS,this.$.data(),n);var a=function(t){if("mousedown"!==t.type||2===t.button){if(n.toggleTrigger&&i.isShow())i.hide();else{var e={x:t.clientX,y:t.clientY,event:t};if(i.show(e)===!1)return}return t.preventDefault(),t.returnValue=!1,!1}},r=n.trigger,l=r+"."+o;n.selector?i.$.on(l,n.selector,a):i.$.on(l,a),n.show&&i.show("object"==typeof n.show?n.show:null)};m.prototype.destory=function(){that.$.off("."+o)},m.prototype.hide=function(t){return s.hide(this.id,t)},m.prototype.show=function(e,n){return e=t.extend({id:this.id,$toggle:this.$},this.options,e),s.show(e,n)},m.prototype.isShow=function(){return u(this.id)},t.fn.contextmenu=function(e){return this.each(function(){var n=t(this),i=n.data(o),a="object"==typeof e&&e;i||n.data(o,i=new m(this,a)),"string"==typeof e&&i[e]()})},t.fn.contextmenu.Constructor=m,t.fn.contextDropdown=function(e){t(this).contextmenu(t.extend({trigger:"click",animation:"fade",toggleTrigger:!0,menuCreator:function(e,n){var i=n.$toggle,o=i.attr("data-target");o||(o=i.attr("href"),o=o&&/#/.test(o)&&o.replace(/.*(?=#[^\s]*$)/,""));var a=o?t(o):i.next(".dropdown-menu"),r=n.transferEvent;if(r!==!1){var s="data-contextmenu-index";a.find("a,.contextmenu-item").each(function(e){t(this).attr(s,e)});var l=a.clone();return l.on("string"==typeof r?r:"click","a,.contextmenu-item",function(e){var n=a.find("["+s+'="'+t(this).attr(s)+'"]'),i=n[0];if(i)return i[e.type]?i[e.type]():n.trigger(e.type),e.preventDefault(),e.stopPropagation(),!1}),l}return a.clone()},position:function(t,e,n){var i=e.placement,o=e.$toggle;if(!i){var a=n.find(".dropdown-menu"),r=a.hasClass("pull-right"),s=o.parent().hasClass("dropup");i=r?s?"top-right":"bottom-right":s?"top-left":"bottom-left",r&&a.removeClass("pull-right")}var l=o[0].getBoundingClientRect();switch(i){case"top-left":return{x:l.left,y:Math.floor(l.top-t.height)};case"top-right":return{x:Math.floor(l.right-t.width),y:Math.floor(l.top-t.height)};case"bottom-left":return{x:l.left,y:l.bottom};case"bottom-right":return{x:Math.floor(l.right-t.width),y:l.bottom}}return t}},e))},t(document).on("click",function(e){var n=t(e.target),i=n.closest('[data-toggle="context-dropdown"]');if(i.length){var a=i.data(o);a||i.contextDropdown({show:!0})}else r||n.closest(".contextmenu").length||h()})}(jQuery,void 0),+function(t){"use strict";var e=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",this.pause.bind(this)).on("mouseleave",this.cycle.bind(this))};e.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,touchable:!0},e.prototype.touchable=function(){function e(e){var e=e||window.event;e.originalEvent&&(e=e.originalEvent);var a=t(this);switch(e.type){case"touchstart":i=e.touches[0].pageX,o=e.touches[0].pageY;break;case"touchend":var r=e.changedTouches[0].pageX-i,s=e.changedTouches[0].pageY-o;if(Math.abs(r)>Math.abs(s))n(a,r),Math.abs(r)>10&&e.preventDefault();else{var l=t(window);t("body,html").animate({scrollTop:l.scrollTop()-s},400)}}}function n(t,e){e>10?a.prev():e<-10&&a.next()}if(this.options.touchable){this.$element.on("touchstart touchmove touchend",e);var i,o,a=this}},e.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(this.next.bind(this),this.options.interval)),this},e.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},e.prototype.to=function(e){var n=this,i=this.getActiveIndex();if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid",function(){n.to(e)}):i==e?this.pause().cycle():this.slide(e>i?"next":"prev",t(this.$items[e]))},e.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition.end&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},e.prototype.next=function(){if(!this.sliding)return this.slide("next")},e.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},e.prototype.slide=function(e,n){var i=this.$element.find(".item.active"),o=n||i[e](),a=this.interval,r="next"==e?"left":"right",s="next"==e?"first":"last",l=this;if(!o.length){if(!this.options.wrap)return;o=this.$element.find(".item")[s]()}this.sliding=!0,a&&this.pause();var d=t.Event("slide.zui.carousel",{relatedTarget:o[0],direction:r});if(!o.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var e=t(l.$indicators.children()[l.getActiveIndex()]);e&&e.addClass("active")})),t.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(d),d.isDefaultPrevented())return;o.addClass(e),o[0].offsetWidth,i.addClass(r),o.addClass(r),i.one(t.support.transition.end,function(){o.removeClass([e,r].join(" ")).addClass("active"),i.removeClass(["active",r].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(d),d.isDefaultPrevented())return;i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return a&&this.cycle(),this}};var n=t.fn.carousel;t.fn.carousel=function(n){return this.each(function(){var i=t(this),o=i.data("zui.carousel"),a=t.extend({},e.DEFAULTS,i.data(),"object"==typeof n&&n),r="string"==typeof n?n:a.slide;o||i.data("zui.carousel",o=new e(this,a)),"number"==typeof n?o.to(n):r?o[r]():a.interval&&o.pause().cycle(),a.touchable&&o.touchable()})},t.fn.carousel.Constructor=e,t.fn.carousel.noConflict=function(){return t.fn.carousel=n,this},t(document).on("click.zui.carousel.data-api","[data-slide], [data-slide-to]",function(e){var n,i=t(this),o=t(i.attr("data-target")||(n=i.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"")),a=t.extend({},o.data(),i.data()),r=i.attr("data-slide-to");r&&(a.interval=!1),o.carousel(a),(r=i.attr("data-slide-to"))&&o.data("zui.carousel").to(r),e.preventDefault()}),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var e=t(this);e.carousel(e.data())})})}(window.jQuery),/*! TangBin: image.ready.js http://www.planeart.cn/?p=1121 */ -function(t){"use strict";t.zui.imgReady=function(){var t=[],e=null,n=function(){for(var e=0;e1024)&&(o.call(u),s.end=!0)},s(),u.onload=function(){!s.end&&s(),a&&a.call(u),u=u.onload=u.onerror=null},void(s.end||(t.push(s),null===e&&(e=setInterval(n,40)))))}}()}(jQuery),function(t,e,n){"use strict";if(!t.fn.modalTrigger)throw new Error("modal & modalTrigger requires for lightbox");if(!t.zui.imgReady)throw new Error("imgReady requires for lightbox");var i=function(e,n){this.$=t(e),this.options=this.getOptions(n),this.init()};i.DEFAULTS={modalTeamplate:'
  • ').appendTo("body").data(n,i);var s=function(t,i,n){n=n||e[t],"function"==typeof n&&o.on(i+a,n)};s("onShow","show"),s("shown","shown"),s("onHide","hide",function(t){if("iframe"===e.type&&i.$iframeBody){var n=i.$iframeBody.triggerHandler("modalhide"+a,[i]);n===!1&&t.preventDefault()}var o=e.onHide;if(o)return o(t)}),s("hidden","hidden"),s("loaded","loaded"),o.on("shown"+a,function(){i.isShown=!0}).on("hidden"+a,function(){i.isShown=!1}),this.$modal=o,this.$dialog=o.find(".modal-dialog"),e.mergeOptions&&(this.options=e)},r.prototype.show=function(i){var a=this,l=t.extend({},r.DEFAULTS,a.options,{url:a.$trigger?a.$trigger.attr("href")||a.$trigger.attr("data-url")||a.$trigger.data("url"):a.options.url},i),c=a.isShown;l=a.initOptions(l),c||a.init(l);var h=a.$modal,d=h.find(".modal-dialog"),u=l.custom,p=d.find(".modal-body").css("padding","").toggleClass("load-indicator loading",!!c),f=d.find(".modal-header"),g=d.find(".modal-content");h.toggleClass("fade",l.fade).addClass(l.className).toggleClass("modal-loading",!c).toggleClass("modal-scroll-inside",!!l.scrollInside),d.toggleClass("modal-md","md"===l.size).toggleClass("modal-sm","sm"===l.size).toggleClass("modal-lg","lg"===l.size).toggleClass("modal-fullscreen","fullscreen"===l.size),f.toggle(l.showHeader),f.find(".modal-icon").attr("class","modal-icon icon-"+l.icon),f.find(".modal-title-name").text(l.title||""),l.size&&"fullscreen"===l.size&&(l.width="",l.height="");var m=function(){clearTimeout(this.resizeTask),this.resizeTask=setTimeout(function(){a.adjustPosition(l.position)},100)},v=function(t,e){return"undefined"==typeof t&&(t=l.delay),setTimeout(function(){d=h.find(".modal-dialog"),l.width&&"auto"!=l.width&&d.css("width",l.width),l.height&&"auto"!=l.height&&(d.css("height",l.height),"iframe"===l.type&&p.css("height",d.height()-f.outerHeight())),a.adjustPosition(l.position),h.removeClass("modal-loading").removeClass("modal-updating"),c&&p.removeClass("loading"),"iframe"!=l.type&&(p=d.off("resize."+n).find(".modal-body").off("resize."+n),l.scrollInside&&(p=p.children().off("resize."+n)),(p.length?p:d).on("resize."+n,m)),e&&e()},t)};if("custom"===l.type&&u)if("function"==typeof u){var y=u({modal:h,options:l,modalTrigger:a,ready:v});typeof y===s&&(p.html(y),v())}else u instanceof t?(p.html(t("
    ").append(u.clone()).html()),v()):(p.html(u),v());else if(l.url){var b=function(){var t=h.callComEvent(a,"broken");"string"==typeof t&&p.html(t),v()};if(h.attr("ref",l.url),"iframe"===l.type){h.addClass("modal-iframe"),this.firstLoad=!0;var w="iframe-"+l.name;f.detach(),p.detach(),g.empty().append(f).append(p),p.css("padding",0).html(''),l.waittime>0&&(a.waitTimeout=v(l.waittime,b));var x=document.getElementById(w);x.onload=x.onreadystatechange=function(i){var o=!!l.scrollInside;if(a.firstLoad&&h.addClass("modal-loading"),!this.readyState||"complete"==this.readyState){a.firstLoad=!1,l.waittime>0&&clearTimeout(a.waitTimeout);try{h.attr("ref",x.contentWindow.location.href);var s=e.frames[w];s.modalWidthReset&&(l.width=s.modalWidthReset);var r=s.$;if(r&&"auto"===l.height&&"fullscreen"!=l.size){var c=r("body").addClass("body-modal").toggleClass("body-modal-scroll-inside",o);a.$iframeBody=c,l.iframeBodyClass&&c.addClass(l.iframeBodyClass);var d=[],u=function(i){h.removeClass("fade");var n=c.outerHeight();if(i===!0&&l.onlyIncreaseHeight&&(n=Math.max(n,p.data("minModalHeight")||0),p.data("minModalHeight",n)),o){var a=l.headerHeight;"number"!=typeof a?a=f.outerHeight():"function"==typeof a&&(a=a(f));var s=t(e).height();n=Math.min(n,s-a)}for(d.length>1&&n===d[0]&&(n=Math.max(n,d[1])),d.push(n);d.length>2;)d.shift();p.css("height",n),l.fade&&h.addClass("fade"),v()};h.callComEvent(a,"loaded",{modalType:"iframe",jQuery:r}),setTimeout(u,100),c.off("resize."+n).on("resize."+n,u),o&&t(s).off("resize."+n).on("resize."+n,u)}else v();var g=l.handleLinkInIframe;g&&r("body").on("click","string"==typeof g?g:"a[href]",function(){t(this).is('[data-toggle="modal"]')||h.addClass("modal-updating")}),l.iframeStyle&&r("head").append("")}catch(i){v()}}}}else t.ajax(t.extend({url:l.url,success:function(i){try{var s=t(i);s.filter(".modal-dialog").length?d.parent().empty().append(s):s.filter(".modal-content").length?d.find(".modal-content").replaceWith(s):p.wrapInner(s)}catch(r){e.console&&e.console.warn&&console.warn("ZUI: Cannot recogernize remote content.",{error:r,data:i}),h.html(i)}h.callComEvent(a,"loaded",{modalType:o}),v(),l.scrollInside&&t(e).off("resize."+n).on("resize."+n,m)},error:b},l.ajaxOptions))}c||h.modal({show:"show",backdrop:l.backdrop,moveable:l.moveable,rememberPos:l.rememberPos,keyboard:l.keyboard,scrollInside:l.scrollInside})},r.prototype.close=function(t,i){var n=this;(t||i)&&n.$modal.on("hidden"+a,function(){"function"==typeof t&&t(),typeof i===s&&i.length&&!n.$modal.data("cancel-reload")&&("this"===i?e.location.reload():e.location=i)}),n.$modal.modal("hide")},r.prototype.toggle=function(t){this.isShown?this.close():this.show(t)},r.prototype.adjustPosition=function(t){t=t===i?this.options.position:t,"function"==typeof t&&(t=t(this)),this.$modal.modal("adjustPosition",t)},t.zui({ModalTrigger:r,modalTrigger:new r}),t.fn.modalTrigger=function(e,i){return t(this).each(function(){var o=t(this),a=o.data(n),l=t.extend({title:o.attr("title")||o.text(),url:o.attr("href"),type:o.hasClass("iframe")?"iframe":""},o.data(),t.isPlainObject(e)&&e);return a?void(typeof e==s?a[e](i):l.show&&a.show(i)):(o.data(n,a=new r(l,o)),void o.on((l.trigger||"click")+".toggle."+n,function(e){l=t.extend(l,{url:o.attr("href")||o.attr("data-url")||o.data("url")||l.url}),a.toggle(l),o.is("a")&&e.preventDefault()}))})};var l=t.fn.modal;t.fn.modal=function(e,i){return t(this).each(function(){var n=t(this);n.hasClass("modal")?l.call(n,e,i):n.modalTrigger(e,i)})},t.fn.modal.bs=l;var c=function(e){return e=t(e||".modal.modal-trigger.in"),e&&e instanceof t?e:null},h=function(i,o,a){var s=i;if("function"==typeof i){var r=a;a=o,o=i,i=r}i=c(i),i&&i.length?i.each(function(){t(this).data(n).close(o,a)}):t("body").hasClass("modal-open")||t(".modal.in").length||t("body").hasClass("body-modal")&&e.parent.$.zui.closeModal(s,o,a)},d=function(t,e){e=c(e),e&&e.length&&e.modal("adjustPosition",t)},u=function(e,i){"string"==typeof e&&(e={url:e});var o=c(i);o&&o.length&&o.each(function(){t(this).data(n).show(e)})};t.zui({reloadModal:u,closeModal:h,ajustModalPosition:d,adjustModalPosition:d}),t(document).on("click."+n+".data-api",'[data-toggle="modal"]',function(e){var i=t(this),o=i.attr("href"),a=null;try{a=t(i.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,""))}catch(s){}a&&a.length||(i.data(n)?i.trigger(".toggle."+n):i.modalTrigger({show:!0})),i.is("a")&&e.preventDefault()}).on("click."+n+".data-api",'[data-dismiss="modal"]',function(){t.zui.closeModal()})}(window.jQuery,window,void 0),+function(t){"use strict";var e=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.init("tooltip",t,e)};e.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'
    ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.prototype.init=function(e,i,n){this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(n);for(var o=this.options.trigger.split(" "),a=o.length;a--;){var s=o[a];if("click"==s)this.$element.on("click."+this.type,this.options.selector,this.toggle.bind(this));else if("manual"!=s){var r="hover"==s?"mouseenter":"focus",l="hover"==s?"mouseleave":"blur";this.$element.on(r+"."+this.type,this.options.selector,this.enter.bind(this)),this.$element.on(l+"."+this.type,this.options.selector,this.leave.bind(this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},e.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,n){i[t]!=n&&(e[t]=n)}),e},e.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type);return clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show()},e.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type);return clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()},e.prototype.show=function(e){var i=t.Event("show.zui."+this.type);if((e||this.hasContent())&&this.enabled){var n=this;if(n.$element.trigger(i),i.isDefaultPrevented())return;var o=n.tip();n.setContent(e),n.options.animation&&o.addClass("fade");var a="function"==typeof n.options.placement?n.options.placement.call(n,o[0],n.$element[0]):n.options.placement,s=/\s?auto?\s?/i,r=s.test(a);r&&(a=a.replace(s,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(a),n.options.container?o.appendTo(n.options.container):o.insertAfter(n.$element);var l=n.getPosition(),c=o[0].offsetWidth,h=o[0].offsetHeight;if(r){var d=n.$element.parent(),u=a,p=document.documentElement.scrollTop||document.body.scrollTop,f="body"==n.options.container?window.innerWidth:d.outerWidth(),g="body"==n.options.container?window.innerHeight:d.outerHeight(),m="body"==n.options.container?0:d.offset().left;a="bottom"==a&&l.top+l.height+h-p>g?"top":"top"==a&&l.top-p-h<0?"bottom":"right"==a&&l.right+c>f?"left":"left"==a&&l.left-c

    '}),e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),e.prototype.constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var t=this.tip(),e=this.getTarget();if(e)return e.find(".arrow").length<1&&t.addClass("no-arrow"),void t.html(e.html());var i=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](i),t.find(".popover-content")[this.options.html?"html":"text"](n),t.removeClass("fade top bottom left right in"),this.options.tipId&&t.attr("id",this.options.tipId),this.options.tipClass&&t.addClass(this.options.tipClass),t.find(".popover-title").html()||t.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTarget()||this.getTitle()||this.getContent()},e.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},e.prototype.getTarget=function(){var e=this.$element,i=this.options,n=e.attr("data-target")||("function"==typeof i.target?i.target.call(e[0]):i.target);return!!n&&("$next"==n?e.next(".popover"):t(n))},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},e.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var i=t.fn.popover;t.fn.popover=function(i){return this.each(function(){var n=t(this),o=n.data("zui.popover"),a="object"==typeof i&&i;o||n.data("zui.popover",o=new e(this,a)),"string"==typeof i&&o[i]()})},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(window.jQuery),+function(t){"use strict";function e(e){t(o).remove(),t(a).each(function(e){var o=i(t(this));o.hasClass("open")&&(o.trigger(e=t.Event("hide."+n)),e.isDefaultPrevented()||o.removeClass("open").trigger("hidden."+n))})}function i(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var n;try{n=i&&t(i)}catch(o){}return n&&n.length?n:e.parent()}var n="zui.dropdown",o=".dropdown-backdrop",a="[data-toggle=dropdown]",s=function(e){t(e).on("click."+n,this.toggle)};s.prototype.toggle=function(o){var a=t(this);if(!a.is(".disabled, :disabled")){var s=i(a),r=s.hasClass("open");if(e(),!r){if("ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t('',a={icons:{},type:"default",placement:"top",time:4e3,parent:"body",close:!0,fade:!0,scale:!0},s={},r=function(e,r){t.isPlainObject(e)?r=t.extend({},r,e):e&&(r?r.content=e:r={content:e});var l=this;r=l.options=t.extend({},a,r),l.id=r.id||n++;var c=s[l.id];c&&c.destroy(),s[l.id]=l,l.$=t(o.format(r)).toggleClass("fade",r.fade).toggleClass("scale",r.scale).attr("id","messager-"+l.id),r.cssClass&&l.$.addClass(r.cssClass);var h=!1,d=l.$.find(".messager-actions"),u=function(e){var n=t('",form:"
    ",inputs:{text:"",textarea:"",email:"",select:"",checkbox:"
    ",date:"",time:"",number:"",password:""}},f={locale:e.zui&&e.zui.clientLang?e.zui.clientLang():"en",backdrop:"static",animate:!0,className:null,closeButton:!0,show:!0,container:"body"},g={};g.alert=function(){var t;if(t=h("alert",["ok"],["message","callback"],arguments),t.callback&&"function"!=typeof t.callback)throw new Error("alert requires callback property to be a function when provided");return t.buttons.ok.callback=t.onEscape=function(){return"function"!=typeof t.callback||t.callback.call(this)},g.dialog(t)},g.confirm=function(){var t;if(t=h("confirm",["confirm","cancel"],["message","callback"],arguments),t.buttons.cancel.callback=t.onEscape=function(){return t.callback.call(this,!1)},t.buttons.confirm.callback=function(){return t.callback.call(this,!0)},"function"!=typeof t.callback)throw new Error("confirm requires a callback");return g.dialog(t)},g.prompt=function(){var t,n,o,a,r,l,h;if(a=e(p.form),n={className:"bootbox-prompt",buttons:d("cancel","confirm"),value:"",inputType:"text"},t=u(c(n,arguments,["title","callback"]),["confirm","cancel"]),l=t.show===i||t.show,t.message=a,t.buttons.cancel.callback=t.onEscape=function(){return t.callback.call(this,null)},t.buttons.confirm.callback=function(){var i;switch(t.inputType){case"text":case"textarea":case"email":case"select":case"date":case"time":case"number":case"password":i=r.val();break;case"checkbox":var n=r.find("input:checked");i=[],s(n,function(t,n){i.push(e(n).val())})}return t.callback.call(this,i)},t.show=!1,!t.title)throw new Error("prompt requires a title");if("function"!=typeof t.callback)throw new Error("prompt requires a callback");if(!p.inputs[t.inputType])throw new Error("invalid prompt type");switch(r=e(p.inputs[t.inputType]),t.inputType){case"text":case"textarea":case"email":case"date":case"time":case"number":case"password":r.val(t.value);break;case"select":var f={};if(h=t.inputOptions||[],!Array.isArray(h))throw new Error("Please pass an array of input options");if(!h.length)throw new Error("prompt with select requires options");s(h,function(t,n){var o=r;if(n.value===i||n.text===i)throw new Error("given options in wrong format");n.group&&(f[n.group]||(f[n.group]=e("").attr("label",n.group)),o=f[n.group]),o.append("")}),s(f,function(t,e){r.append(e)}),r.val(t.value);break;case"checkbox":var m=Array.isArray(t.value)?t.value:[t.value];if(h=t.inputOptions||[],!h.length)throw new Error("prompt with checkbox requires options");if(!h[0].value||!h[0].text)throw new Error("given options in wrong format");r=e("
    "),s(h,function(i,n){var o=e(p.inputs[t.inputType]);o.find("input").attr("value",n.value),o.find("label").append(n.text),s(m,function(t,e){e===n.value&&o.find("input").prop("checked",!0)}),r.append(o)})}return t.placeholder&&r.attr("placeholder",t.placeholder),t.pattern&&r.attr("pattern",t.pattern),t.maxlength&&r.attr("maxlength",t.maxlength),a.append(r),a.on("submit",function(t){t.preventDefault(),t.stopPropagation(),o.find(".btn-primary").click()}),o=g.dialog(t),o.off("shown.zui.modal"),o.on("shown.zui.modal",function(){r.focus()}),l===!0&&o.modal("show"),o},g.dialog=function(t){t=r(t);var n=e(p.dialog),a=n.find(".modal-dialog"),l=n.find(".modal-body"),c=t.buttons,h="",d={onEscape:t.onEscape};if(e.fn.modal===i)throw new Error("$.fn.modal is not defined; please double check you have included the Bootstrap JavaScript library. See http://getbootstrap.com/javascript/ for more details.");if(s(c,function(t,e){h+="",d[t]=e.callback}),l.find(".bootbox-body").html(t.message),t.animate===!0&&n.addClass("fade"),t.className&&n.addClass(t.className),"large"===t.size?a.addClass("modal-lg"):"small"===t.size&&a.addClass("modal-sm"),t.title&&l.before(p.header),t.closeButton){var u=e(p.closeButton);t.title?n.find(".modal-header").prepend(u):u.css("margin-top","-10px").prependTo(l)}return t.title&&n.find(".modal-title").html(t.title),h.length&&(l.after(p.footer),n.find(".modal-footer").html(h)),n.on("hidden.zui.modal",function(t){t.target===this&&n.remove()}),n.on("shown.zui.modal",function(){n.find(".btn-primary:first").focus()}),"static"!==t.backdrop&&n.on("click.dismiss.zui.modal",function(t){n.children(".modal-backdrop").length&&(t.currentTarget=n.children(".modal-backdrop").get(0)),t.target===t.currentTarget&&n.trigger("escape.close.bb")}),n.on("escape.close.bb",function(t){d.onEscape&&o(t,n,d.onEscape)}),n.on("click",".modal-footer button",function(t){var i=e(this).data("bb-handler");o(t,n,d[i])}),n.on("click",".bootbox-close-button",function(t){o(t,n,d.onEscape)}),n.on("keyup",function(t){27===t.which&&n.trigger("escape.close.bb")}),e(t.container).append(n),n.modal({backdrop:!!t.backdrop&&"static",keyboard:!1,show:!1}),t.show&&n.modal("show"),n},g.setDefaults=function(){var t={};2===arguments.length?t[arguments[0]]=arguments[1]:t=arguments[0],e.extend(f,t)},g.hideAll=function(){return e(".bootbox").modal("hide"),g};var m={en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"Confirm"},zh_cn:{OK:"确认",CANCEL:"取消",CONFIRM:"确认"},zh_tw:{OK:"確認",CANCEL:"取消",CONFIRM:"確認"}};return g.addLocale=function(t,i){return e.each(["OK","CANCEL","CONFIRM"],function(t,e){if(!i[e])throw new Error("Please supply a translation for '"+e+"'")}),m[t]={OK:i.OK,CANCEL:i.CANCEL,CONFIRM:i.CONFIRM},g},g.removeLocale=function(t){return delete m[t],g},g.setLocale=function(t){return g.setDefaults("locale",t)},g.init=function(i){return t(i||e)},g}),/*! +Chosen, a Select Box Enhancer for jQuery and Prototype +by Patrick Filler for Harvest, http://getharvest.com + +Version 1.1.0 +Full source at https://github.com/harvesthq/chosen +Copyright (c) 2011 Harvest http://getharvest.com + +MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md +*/ +function(){var t,e,i,n,o,a={}.hasOwnProperty,s=function(t,e){function i(){this.constructor=t}for(var n in e)a.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},r={zh_cn:{no_results_text:"没有找到"},zh_tw:{no_results_text:"沒有找到"},en:{no_results_text:"No results match"}},l={};n=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.add_node=function(t){return"OPTGROUP"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},e.prototype.add_group=function(e){var i,n,o,a,s,r;for(i=this.parsed.length,this.parsed.push({array_index:i,group:!0,label:this.escapeExpression(e.label),children:0,disabled:e.disabled,title:e.title,search_keys:t.trim(e.getAttribute("data-keys")||"").replace(/,/g," ")}),s=e.childNodes,r=[],o=0,a=s.length;o\"\'\`]/.test(t)?(e={"<":"<",">":">",'"':""","'":"'","`":"`"},i=/&(?!\w+;)|[\<\>\"\'\`]/g,t.replace(i,function(t){return e[t]||"&"})):t},e}(),n.select_to_array=function(t){var e,i,o,a,s;for(i=new n,s=t.childNodes,o=0,a=s.length;o0?(e=document.createElement("li"),e.className="group-result",e.title=t.title,e.innerHTML=t.search_text,this.outerHTML(e)):""},e.prototype.results_update_field=function(){this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing&&(this.winnow_results(),this.autoResizeDrop())},e.prototype.reset_single_select_options=function(){var t,e,i,n,o;for(n=this.results_data,o=[],e=0,i=n.length;e"+i.search_text.substr(l+r.length),i.search_text=c.substr(0,l)+""+c.substr(l)):i.search_keys_match&&i.search_keys.length&&(l=i.search_keys.search(h),c=i.search_keys.substr(0,l+r.length)+""+i.search_keys.substr(l+r.length),i.search_text+='  '+c.substr(0,l)+""+c.substr(l)+""),null!=s&&(s.group_match=!0)):null!=i.group_array_index&&this.results_data[i.group_array_index].search_match&&(i.search_match=!0)));return this.result_clear_highlight(),a<1&&r.length?(this.update_results_content(""),this.no_results(r)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight(t))},e.prototype.search_string_match=function(t,e){var i,n,o,a;if(e.test(t))return!0;if(this.enable_split_word_search&&(t.indexOf(" ")>=0||0===t.indexOf("["))&&(n=t.replace(/\[|\]/g,"").split(" "),n.length))for(o=0,a=n.length;o0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(t.preventDefault(),this.results_showing)return this.result_select(t);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},e.prototype.clipboard_event_checker=function(t){var e=this;return setTimeout(function(){return e.results_search()},50)},e.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field&&this.form_field.classList&&this.form_field.classList.contains("form-control")?"100%":""+this.form_field.offsetWidth+"px"},e.prototype.include_option_in_results=function(t){return!(this.is_multiple&&!this.display_selected_options&&t.selected)&&(!(!this.display_disabled_options&&t.disabled)&&!t.empty)},e.prototype.search_results_touchstart=function(t){return this.touch_started=!0,this.search_results_mouseover(t)},e.prototype.search_results_touchmove=function(t){return this.touch_started=!1,this.search_results_mouseout(t)},e.prototype.search_results_touchend=function(t){if(this.touch_started)return this.search_results_mouseup(t)},e.prototype.outerHTML=function(t){var e;return t.outerHTML?t.outerHTML:(e=document.createElement("div"),e.appendChild(t),e.innerHTML)},e.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!/iP(od|hone)/i.test(window.navigator.userAgent)&&(!/Android/i.test(window.navigator.userAgent)||!/Mobile/i.test(window.navigator.userAgent))},e.default_multiple_text="",e.default_single_text="",e.default_no_result_text="No results match",e}(),t=jQuery,t.fn.extend({chosen:function(n){return e.browser_is_supported()?this.each(function(e){var o=t(this),a=o.data("chosen");"destroy"===n&&a?a.destroy():a||o.data("chosen",new i(this,t.extend({},o.data(),n)))}):this}}),i=function(e){function i(){return o=i.__super__.constructor.apply(this,arguments)}return s(i,e),i.prototype.setup=function(){return this.form_field_jq=t(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},i.prototype.set_up_html=function(){var e,i;e=["chosen-container"],e.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl");var n=this.form_field.getAttribute("data-css-class");return n&&e.push(n),i={"class":e.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(i.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=t("
    ",i),this.is_multiple?this.container.html('
      '):(this.container.html('
      '+this.default_text+'
        '),this.compact_search?this.container.addClass("chosen-compact").find(".chosen-search").appendTo(this.container.find(".chosen-single")):this.container.find(".chosen-search").prependTo(this.container.find(".chosen-drop")),this.options.highlight_selected!==!1&&this.container.addClass("chosen-highlight-selected")),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.options.drop_width&&this.dropdown.css("width",this.options.drop_width).addClass("chosen-drop-size-limited"),this.max_drop_width&&this.dropdown.addClass("chosen-auto-max-width"),this.options.no_wrap&&this.dropdown.addClass("chosen-no-wrap"),this.results_build(),this.set_tab_index(),this.set_label_behavior(),this.form_field_jq.trigger("chosen:ready",{chosen:this})},i.prototype.register_observers=function(){var t=this;return this.container.bind("mousedown.chosen",function(e){t.container_mousedown(e)}),this.container.bind("mouseup.chosen",function(e){t.container_mouseup(e)}),this.container.bind("mouseenter.chosen",function(e){t.mouse_enter(e)}),this.container.bind("mouseleave.chosen",function(e){t.mouse_leave(e)}),this.search_results.bind("mouseup.chosen",function(e){t.search_results_mouseup(e)}),this.search_results.bind("mouseover.chosen",function(e){t.search_results_mouseover(e)}),this.search_results.bind("mouseout.chosen",function(e){t.search_results_mouseout(e)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(e){t.search_results_mousewheel(e)}),this.search_results.bind("touchstart.chosen",function(e){t.search_results_touchstart(e)}),this.search_results.bind("touchmove.chosen",function(e){t.search_results_touchmove(e)}),this.search_results.bind("touchend.chosen",function(e){t.search_results_touchend(e)}),this.form_field_jq.bind("chosen:updated.chosen",function(e){t.results_update_field(e)}),this.form_field_jq.bind("chosen:activate.chosen",function(e){t.activate_field(e)}),this.form_field_jq.bind("chosen:open.chosen",function(e){t.container_mousedown(e)}),this.form_field_jq.bind("chosen:close.chosen",function(e){t.input_blur(e)}),this.search_field.bind("blur.chosen",function(e){t.input_blur(e)}),this.search_field.bind("keyup.chosen",function(e){t.keyup_checker(e)}),this.search_field.bind("keydown.chosen",function(e){t.keydown_checker(e)}),this.search_field.bind("focus.chosen",function(e){t.input_focus(e)}),this.search_field.bind("cut.chosen",function(e){t.clipboard_event_checker(e)}),this.search_field.bind("paste.chosen",function(e){t.clipboard_event_checker(e)}),this.is_multiple?this.search_choices.bind("click.chosen",function(e){t.choices_click(e)}):this.container.bind("click.chosen",function(t){t.preventDefault()})},i.prototype.destroy=function(){return t(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},i.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},i.prototype.container_mousedown=function(e){if(!this.is_disabled&&(e&&"mousedown"===e.type&&!this.results_showing&&e.preventDefault(),null==e||!t(e.target).hasClass("search-choice-close")))return this.active_field?this.is_multiple||!e||t(e.target)[0]!==this.selected_item[0]&&!t(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),t(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field()},i.prototype.container_mouseup=function(t){if("ABBR"===t.target.nodeName&&!this.is_disabled)return this.results_reset(t)},i.prototype.search_results_mousewheel=function(t){var e;if(t.originalEvent&&(e=-t.originalEvent.wheelDelta||t.originalEvent.detail),null!=e)return t.preventDefault(),"DOMMouseScroll"===t.type&&(e=40*e),this.search_results.scrollTop(e+this.search_results.scrollTop())},i.prototype.blur_test=function(t){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},i.prototype.close_field=function(){return t(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},i.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},i.prototype.test_active_click=function(e){var i;return i=t(e.target).closest(".chosen-container"),i.length&&this.container[0]===i[0]?this.active_field=!0:this.close_field()},i.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=n.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch"),this.container.removeClass("chosen-with-search")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"),this.container.addClass("chosen-with-search"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},i.prototype.result_do_highlight=function(t,e){if(t.length){var i,n,o,a,s,r,l=-1;this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass("highlighted"),o=parseInt(this.search_results.css("maxHeight"),10),r=this.result_highlight.outerHeight(),s=this.search_results.scrollTop(),a=o+s,n=this.result_highlight.position().top+this.search_results.scrollTop(),i=n+r,this.middle_highlight&&(e||"always"===this.middle_highlight)?l=Math.min(n-r,Math.max(0,n-(o-r)/2)):i>=a?l=i-o>0?i-o:0:n-1?this.search_results.scrollTop(l):this.result_highlight.scrollIntoView&&this.result_highlight.scrollIntoView()}},i.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},i.prototype.results_show=function(){var e=this;if(e.is_multiple&&e.max_selected_options<=e.choices_count())return e.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1;e.results_showing=!0,e.search_field.val(e.search_field.val()),e.search_field.focus(),e.container.addClass("chosen-with-drop"),e.winnow_results(1);var i=e.drop_direction;if("function"==typeof i&&(i=i.call(this)),"auto"===i)if(e.drop_directionFixed)i=e.drop_directionFixed;else{var n=e.container.find(".chosen-drop"),o=n.outerHeight();e.drop_item_height&&o.active-result").length*e.drop_item_height));var a=e.container.offset();a.top+o+30>t(window).height()+t(window).scrollTop()&&(i="up"),e.drop_directionFixed=i}return e.container.toggleClass("chosen-up","up"===i),e.autoResizeDrop(),e.form_field_jq.trigger("chosen:showing_dropdown",{chosen:e})},i.prototype.autoResizeDrop=function(){var e=this,i=e.max_drop_width;if(i){var n=e.container.find(".chosen-drop");n.removeClass("in");var o=0,a=n.find(".chosen-results"),s=a.children("li"),r=parseFloat(a.css("padding-left").replace("px","")),l=parseFloat(a.css("padding-right").replace("px","")),c=(isNaN(r)?0:r)+(isNaN(l)?0:l);s.each(function(){o=Math.max(o,t(this).outerWidth())}),n.css("width",Math.min(o+c+20,i)),e.fixDropWidthTimer=setTimeout(function(){e.fixDropWidthTimer=null,n.addClass("in"),e.winnow_results_set_highlight(1)},50)}},i.prototype.update_results_content=function(t){return this.search_results.html(t)},i.prototype.results_hide=function(){var t=this;return t.fixDropWidthTimer&&(clearTimeout(t.fixDropWidthTimer),t.fixDropWidthTimer=null),t.results_showing&&(t.result_clear_highlight(),t.container.removeClass("chosen-with-drop"),t.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:t}),t.drop_directionFixed=0),t.results_showing=!1},i.prototype.set_tab_index=function(t){var e;if(this.form_field.tabIndex)return e=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=e},i.prototype.set_label_behavior=function(){var e=this;if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=t("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0)return this.form_field_label.bind("click.chosen",function(t){return e.is_multiple?e.container_mousedown(t):e.activate_field()})},i.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},i.prototype.search_results_mouseup=function(e){var i;if(i=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first(),i.length)return this.result_highlight=i,this.result_select(e),this.search_field.focus()},i.prototype.search_results_mouseover=function(e){var i;if(i=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first())return this.result_do_highlight(i)},i.prototype.search_results_mouseout=function(e){if(t(e.target).hasClass("active-result"))return this.result_clear_highlight()},i.prototype.choice_build=function(e){var i,n,o=this;return i=t("
      • ",{"class":"search-choice"}).html(""+e.html+""),e.disabled?i.addClass("search-choice-disabled"):(n=t("",{"class":"search-choice-close","data-option-array-index":e.array_index}),n.bind("click.chosen",function(t){return o.choice_destroy_link_click(t)}),i.append(n)),this.search_container.before(i)},i.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(t(e.target))},i.prototype.choice_destroy=function(t){if(this.result_deselect(t[0].getAttribute("data-option-array-index")))return this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),t.parents("li").first().remove(),this.search_field_scale()},i.prototype.results_reset=function(){var t=this.form_field_jq.val();this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup();var e=this.form_field_jq.val(),i={selected:e};if(t===e||e.length||(i.deselected=t),this.form_field_jq.trigger("change",i),this.sync_sort_field(),this.active_field)return this.results_hide()},i.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},i.prototype.result_select=function(t){var e,i;if(this.result_highlight)return e=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?e.removeClass("active-result"):this.reset_single_select_options(),i=this.results_data[e[0].getAttribute("data-option-array-index")],i.selected=!0,this.form_field.options[i.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(i):this.single_set_selected_text(i.text),(t.metaKey||t.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&(this.form_field_jq.trigger("change",{selected:this.form_field.options[i.options_index].value}),this.sync_sort_field()),this.current_selectedIndex=this.form_field.selectedIndex,this.search_field_scale())},i.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.compact_search&&this.search_field.attr("placeholder",t),this.selected_item.find("span").attr("title",t).text(t)},i.prototype.sync_sort_field=function(){var e=this;if(e.is_multiple&&e.sort_field){var i=t(e.sort_field);if(!i.length)return;var n=[];e.search_choices.find("li.search-choice").each(function(){var i=t(this),o=i.children(".search-choice-close").first().data("optionArrayIndex"),a=e.results_data[o];a&&a.selected&&n.push(a.value)}),i.val(n.join(e.sort_value_splitter)).trigger("change")}},i.prototype.result_deselect=function(t){var e;return e=this.results_data[t],!this.form_field.options[e.options_index].disabled&&(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[e.options_index].value}),this.sync_sort_field(),this.search_field_scale(),!0)},i.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after(''),this.selected_item.addClass("chosen-single-with-deselect")},i.prototype.get_search_text=function(){return this.search_field.val()===this.default_text?"":t("
        ").text(t.trim(this.search_field.val())).html()},i.prototype.winnow_results_set_highlight=function(t){var e,i;if(i=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),e=i.length?i.first():this.search_results.find(".active-result").first(),null!=e)return this.result_do_highlight(e,t)},i.prototype.no_results=function(e){var i;return i=t('
      • '+this.results_none_found+' ""
      • '),i.find("span").first().html(e),this.search_results.append(i),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},i.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},i.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void 0:this.results_show()},i.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result"),t.length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},i.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last(),t.length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},i.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},i.prototype.keydown_checker=function(t){var e,i;switch(e=null!=(i=t.which)?i:t.keyCode,this.search_field_scale(),8!==e&&this.pending_backstroke&&this.clear_backstroke(),e){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(t),this.mouse_on_container=!1;break;case 13:t.preventDefault();break;case 38:t.preventDefault(),this.keyup_arrow();break;case 40:t.preventDefault(),this.keydown_arrow()}},i.prototype.search_field_scale=function(){var e,i,n,o,a,s,r,l,c;if(this.is_multiple){for(n=0,r=0,a="position:absolute; left: -1000px; top: -1000px; display:none;",s=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],l=0,c=s.length;l",{style:a}),e.text(this.search_field.val()),t("body").append(e),r=e.width()+25,e.remove(),i=this.container.outerWidth(),r>i-10&&(r=i-10),this.search_field.css({width:r+"px"})}},i}(e),i.DEFAULTS=l,i.LANGUAGES=r,t.fn.chosen.Constructor=i}.call(this),function(t){"use strict";var e="zui.selectable",i=function(i,n){this.name=e,this.$=t(i),this.id=t.zui.uuid(),this.selectOrder=1,this.selections={},this.getOptions(n),this._init()},n=function(t,e,i){return t>=i.left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height},o=function(t,e){var i=Math.max(t.left,e.left),o=Math.max(t.top,e.top),a=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height);return n(i,o,t)&&n(a,s,t)&&n(i,o,e)&&n(a,s,e)};i.DEFAULTS={selector:"li,tr,div",trigger:"",selectClass:"active",rangeStyle:{border:"1px solid "+(t.zui.colorset?t.zui.colorset.primary:"#3280fc"),backgroundColor:t.zui.colorset?new t.zui.Color(t.zui.colorset.primary).fade(20).toCssStr():"rgba(50, 128, 252, 0.2)"},clickBehavior:"toggle",ignoreVal:3,listenClick:!0},i.prototype.getOptions=function(e){this.options=t.extend({},i.DEFAULTS,this.$.data(),e)},i.prototype.select=function(t){this.toggle(t,!0)},i.prototype.unselect=function(t){this.toggle(t,!1)},i.prototype.toggle=function(e,i,n){var o,a,s=this.options.selector,r=this;if(void 0===e)return void this.$.find(s).each(function(){r.toggle(this,i)});if("object"==typeof e?(o=t(e).closest(s),a=o.data("id")):(a=e,o=r.$.find('.selectable-item[data-id="'+a+'"]')),o&&o.length){if(a||(a=t.zui.uuid(),o.attr("data-id",a)),void 0!==i&&null!==i||(i=!r.selections[a]),!!i!=!!r.selections[a]){var l;"function"==typeof n&&(l=n(i)),l!==!0&&(r.selections[a]=!!i&&r.selectOrder++,r.callEvent(i?"select":"unselect",{id:a,selections:r.selections, +target:o,selected:r.getSelectedArray()},r))}r.options.selectClass&&o.toggleClass(r.options.selectClass,i)}},i.prototype.getSelectedArray=function(){var e=[];return t.each(this.selections,function(t,i){i&&e.push(t)}),e},i.prototype.syncSelectionsFromClass=function(){var e=this,i=e.$children=e.$.find(e.options.selector);e.selections={},i.each(function(){var i=t(this);e.selections[i.data("id")]=i.hasClass(e.options.selectClass)})},i.prototype._init=function(){var e,i,n,a,s,r,l,c=this.options,h=this,d=c.ignoreVal,u=!0,p="."+this.name+"."+this.id,f="function"==typeof c.checkFunc?c.checkFunc:null,g="function"==typeof c.rangeFunc?c.rangeFunc:null,m=!1,v=null,y="mousedown"+p,b=function(){a&&h.$children.each(function(){var e=t(this),i=e.offset();i.width=e.outerWidth(),i.height=e.outerHeight();var n=g?g.call(this,a,i):o(a,i);if(f){var s=f.call(h,{intersect:n,target:e,range:a,targetRange:i});s===!0?h.select(e):s===!1&&h.unselect(e)}else n?h.select(e):h.multiKey||h.unselect(e)})},w=function(o){m&&(s=o.pageX,r=o.pageY,a={width:Math.abs(s-e),height:Math.abs(r-i),left:s>e?e:s,top:r>i?i:r},u&&a.width
        ').css(t.extend({zIndex:1060,position:"absolute",top:e,left:i,pointerEvents:"none"},h.options.rangeStyle)).appendTo(t("body")))),n.css(a),clearTimeout(l),l=setTimeout(b,10),u=!1))},x=0,C=function(e){x&&(t.zui.clearAsap||clearTimeout)(x),x=(t.zui.asap||setTimeout)(function(){x=0,w(e)},0)},_=function(e){t(document).off(p),clearTimeout(v),m&&(m=!1,n&&n.remove(),u||a&&(clearTimeout(l),b(),a=null),h.callEvent("finish",{selections:h.selections,selected:h.getSelectedArray()}),e.preventDefault())},k=function(o){if(m)return _(o);var a=t.zui.getMouseButtonCode(c.mouseButton);if(!(a>-1&&o.button!==a||t(o.target).closest("input,select,textarea,label").length||h.altKey||3===o.which||h.callEvent("start",o)===!1)){var s=h.$children=h.$.find(c.selector);s.addClass("selectable-item");var r=h.multiKey?"multi":c.clickBehavior;if("single"===r&&h.unselect(),c.listenClick&&("multi"===r?h.toggle(o.target):"single"===r?h.select(o.target):"toggle"===r&&h.toggle(o.target,null,function(t){h.unselect()})),h.callEvent("startDrag",o)===!1)return void h.callEvent("finish",{selections:h.selections,selected:h.getSelectedArray()});e=o.pageX,i=o.pageY,n=null,u=!0,m=!0,t(document).on("mousemove"+p,C).on("mouseup"+p,_),v=setTimeout(function(){t(document).on(y,_)},10),o.preventDefault()}},T=c.container&&"default"!==c.container?t(c.container):this.$;c.trigger?T.on(y,c.trigger,k):T.on(y,k),t(document).on("keydown",function(t){var e=t.keyCode;17===e||91==e?h.multiKey=e:18===e&&(h.altKey=!0)}).on("keyup",function(t){h.multiKey=!1,h.altKey=!1})},i.prototype.callEvent=function(e,i){var n=t.Event(e+"."+this.name);this.$.trigger(n,i);var o=n.result,a=this.options[e];return"function"==typeof a&&(o=a.apply(this,Array.isArray(i)?i:[i])),o},t.fn.selectable=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]()})},t.fn.selectable.Constructor=i,t(function(){t('[data-ride="selectable"]').selectable()})}(jQuery),+function(t,e,i){"use strict";if(!t.fn.droppable)return void console.error("Sortable requires droppable.js");var n="zui.sortable",o={selector:"li,div",dragCssClass:"invisible",sortingClass:"sortable-sorting"},a="order",s=function(e,i){var n=this;n.$=t(e),n.options=t.extend({},o,n.$.data(),i),n.init()};s.DEFAULTS=o,s.NAME=n,s.prototype.init=function(){var e,i,n=this,o=n.$,s=n.options,r=s.selector,l=s.containerSelector,c=s.sortingClass,h=s.dragCssClass,d=s.targetSelector,u=s.reverse,p=s.moveDirection,f=function(e){e=e||n.getItems(1);var i=e.length;i&&e.each(function(e){var n=u?i-e:e;t(this).attr("data-"+a,n).data(a,n)})};d||f(),o.droppable({handle:s.trigger,target:d?d:l?r+","+l:r,selector:r,container:s.container||o,always:s.always,flex:!0,lazy:s.lazy,canMoveHere:s.canMoveHere,dropToClass:s.dropToClass,before:s.before,nested:!!l,mouseButton:s.mouseButton,noShadow:s.noShadow,dropOnMouseleave:s.dropOnMouseleave,stopPropagation:s.stopPropagation,start:function(t){if(h&&t.element.addClass(h),e=!1,n.$element=t.element,!p&&t.targets.length>1){var i=t.targets.eq(0).offset(),o=t.targets.eq(1).offset();p=Math.abs(i.left-o.left)>Math.abs(i.top-o.top)?"h":"v"}f(),n.trigger("start",t)},drag:function(t){if(o.addClass(c),t.isIn){var s=t.target,h=t.element,d=l&&s.is(l);if(d)return void(s.children(r).filter(".dragging").length||(s.append(h),f(w),n.trigger(a,{list:w,element:h})));var g=h.data(a),m=s.data(a);if(g!==m){var v="h"===p?"left":"top",y=t.mouseOffset[v]-t.lastMouseOffset[v];if(0!==y){var b=g>m?u:!u;if(!(y<0&&b||y>0&&!b)){i=b?"after":"before",s[i](h),e=!0,n.$target=s,n.$element=h;var w=n.getItems(1);f(w),n.trigger(a,{insert:i,target:s,list:w,element:h})}}}}},finish:function(t){h&&t.element&&t.element.removeClass(h),o.removeClass(c),n.trigger("finish",{insert:i,target:n.$target,list:n.getItems(),element:n.$element,changed:e}),n.$element=null,n.$target=null}})},s.prototype.destroy=function(){this.$.droppable("destroy"),this.$.data(n,null)},s.prototype.reset=function(){this.destroy(),this.init()},s.prototype.getItems=function(e){var i,n=this,o=n.options.targetSelector;return i=o?"function"==typeof o?o(n.$element,n.$):n.$.find(o):n.$.find(n.options.selector),i=i.not(".drag-shadow"),e?i:i.map(function(){var e=t(this);return{item:e,order:e.data("order")}})},s.prototype.trigger=function(e,i){return t.zui.callEvent(this.options[e],i,this)},t.fn.sortable=function(e){return this.each(function(){var i=t(this),o=i.data(n),a="object"==typeof e&&e;o?"object"==typeof e&&o.reset():i.data(n,o=new s(this,a)),"string"==typeof e&&o[e]()})},t.fn.sortable.Constructor=s}(jQuery,window,document),function(t,e){"use strict";function i(e,i){if("string"==typeof e&&(e="seperator"===e||"divider"===e||"-"===e||"|"===e?{type:"seperator"}:{label:e,id:i}),"seperator"===e.type||"divider"===e.type)return t('
      • ');var n=t("
        ").attr(t.extend({href:e.url||"###","class":e.className,style:e.style},e.attrs)).data("item",e);e.html?e.html===!0?n.html(e.label||e.text):n=t(e.html):n.text(e.label||e.text),e.icon&&n.prepend(''),e.onClick&&n.on("click",e.onClick);var o=t("
      • ").toggleClass("disabled",e.disabled===!0).append(n);return e.items&&o.data("item",e).addClass("dropdown-submenu"),o}function n(e,n,o){var a=o.itemCreator||i,s=typeof e;return"string"===s?e=e.split(","):"function"===s&&(e=e(o)),!!e&&(t.each(e,function(t,e){n.append(a(e,t,o))}),!0)}var o="zui.contextmenu",a={animation:"fade",menuTemplate:'',toggleTrigger:!1,duration:200},s=!1,r={},l="zui-contextmenu-"+t.zui.uuid(),c=0,h=0,d=function(){return t(document).off("mousemove."+o).on("mousemove."+o,function(t){c=t.clientX,h=t.clientY}),r},u=function(e){var i=t("#"+l);return i.length&&i.hasClass("contextmenu-show")&&(!e||(i.data("options")||{}).id===e)},p=null,f=function(e,i){"function"==typeof e&&(i=e,e=null),p&&(clearTimeout(p),p=null);var n=t("#"+l);if(n.length){var o=n.removeClass("contextmenu-show").data("options");if(!e||o.id===e){var a=function(){n.find(".contextmenu-menu").removeClass("open"),o.onHidden&&o.onHidden(),i&&i()};o.onHide&&o.onHide();var s=o.animation;n.find(".contextmenu-menu").removeClass("in"),s?p=setTimeout(a,o.duration):a()}}return r},g=function(i,d,u){t.isPlainObject(i)&&(u=d,d=i,i=d.items),s=!0,d=t.extend({},a,d);var g=t("#"+l);g.length||(g=t('
        ').appendTo("body"));var m=g.find(".contextmenu-menu").empty();m.off("click."+o).on("click."+o,"a,.contextmenu-item",function(e){var i=t(this),n=d.onClickItem&&d.onClickItem(i.data("item"),i,e,d);n!==!1&&f()}).off("mouseenter."+o).on("mouseenter."+o,".dropdown-submenu",function(e){var i=t(this),o=i.data("item"),a=i.children(".dropdown-menu");if(o&&(o.items&&(a.length||(a=t(d.menuTemplate).appendTo(i)),n(o.items,a,d)),i.removeData("item")),a.length){a.removeClass("pull-left").css("top",0);var s=(i[0].getBoundingClientRect(),a[0].getBoundingClientRect()),r=window.innerWidth,l=window.innerHeight;if(s.bottom>l){var c=Math.max(-s.top,l-s.bottom);a.css("top",c)}s.right>r&&a.addClass("pull-left")}}),m.attr("class","contextmenu-menu"+(d.className?" "+d.className:"")),g.attr("class","contextmenu contextmenu-show");var v=d.menuCreator;if(v)m.append(v(i,d));else{m.append(d.menuTemplate);var y=m.children().first(),b=n(i,y,d);if(b===!1)return b}var w=d.animation,x=d.duration;w===!0&&(d.animation=w="fade"),p&&(clearTimeout(p),p=null);var C=function(){m.addClass("in"),d.onShown&&d.onShown(),u&&u()};d.onShow&&d.onShow(),g.data("options",{animation:w,onHide:d.onHide,onHidden:d.onHidden,id:d.id,duration:x});var _=d.x,k=d.y;_===e&&(_=(d.event||d).clientX),_===e&&(_=c),k===e&&(k=(d.event||d).clientY),k===e&&(k=h);var T=window.innerHeight,S=window.innerWidth,y=m.children().first(),D=y.outerWidth(),M=y.outerHeight();if(d.position){var L=d.position({x:_,y:k,width:D,height:M,winHeight:T,winWidth:S},d,m);L&&(_=L.x,k=L.y)}return _=Math.max(0,Math.min(_,S-D)),k=Math.max(0,Math.min(k,T-M)),g.css({left:_,top:k}).show(),m.addClass("open"),w?(m.addClass(w),p=setTimeout(function(){C(),s=!1},10)):(C(),s=!1),r};t.extend(r,{NAME:o,DEFAULTS:a,show:g,hide:f,listenMouse:d,isShow:u}),t.zui({ContextMenu:r});var m=function(e,i){var n=this;n.name=o,n.$=t(e),n.id=t.zui.uuid(),i=n.options=t.extend({trigger:"contextmenu"},r.DEFAULTS,this.$.data(),i);var a=function(t){if("mousedown"!==t.type||2===t.button){if(i.toggleTrigger&&n.isShow())n.hide();else{var e={x:t.clientX,y:t.clientY,event:t};if(n.show(e)===!1)return}return t.preventDefault(),t.returnValue=!1,!1}},s=i.trigger,l=s+"."+o;i.selector?n.$.on(l,i.selector,a):n.$.on(l,a),i.show&&n.show("object"==typeof i.show?i.show:null)};m.prototype.destory=function(){that.$.off("."+o)},m.prototype.hide=function(t){return r.hide(this.id,t)},m.prototype.show=function(e,i){return e=t.extend({id:this.id,$toggle:this.$},this.options,e),r.show(e,i)},m.prototype.isShow=function(){return u(this.id)},t.fn.contextmenu=function(e){return this.each(function(){var i=t(this),n=i.data(o),a="object"==typeof e&&e;n||i.data(o,n=new m(this,a)),"string"==typeof e&&n[e]()})},t.fn.contextmenu.Constructor=m,t.fn.contextDropdown=function(e){t(this).contextmenu(t.extend({trigger:"click",animation:"fade",toggleTrigger:!0,menuCreator:function(e,i){var n=i.$toggle,o=n.attr("data-target");o||(o=n.attr("href"),o=o&&/#/.test(o)&&o.replace(/.*(?=#[^\s]*$)/,""));var a=o?t(o):n.next(".dropdown-menu"),s=i.transferEvent;if(s!==!1){var r="data-contextmenu-index";a.find("a,.contextmenu-item").each(function(e){t(this).attr(r,e)});var l=a.clone();return l.on("string"==typeof s?s:"click","a,.contextmenu-item",function(e){var i=a.find("["+r+'="'+t(this).attr(r)+'"]'),n=i[0];if(n)return n[e.type]?n[e.type]():i.trigger(e.type),e.preventDefault(),e.stopPropagation(),!1}),l}return a.clone()},position:function(t,e,i){var n=e.placement,o=e.$toggle;if(!n){var a=i.find(".dropdown-menu"),s=a.hasClass("pull-right"),r=o.parent().hasClass("dropup");n=s?r?"top-right":"bottom-right":r?"top-left":"bottom-left",s&&a.removeClass("pull-right")}var l=o[0].getBoundingClientRect();switch(n){case"top-left":return{x:l.left,y:Math.floor(l.top-t.height)};case"top-right":return{x:Math.floor(l.right-t.width),y:Math.floor(l.top-t.height)};case"bottom-left":return{x:l.left,y:l.bottom};case"bottom-right":return{x:Math.floor(l.right-t.width),y:l.bottom}}return t}},e))},t(document).on("click",function(e){var i=t(e.target),n=i.closest('[data-toggle="context-dropdown"]');if(n.length){var a=n.data(o);a||n.contextDropdown({show:!0})}else s||i.closest(".contextmenu").length||f()})}(jQuery,void 0),/*! + * jQuery Form Plugin + * version: 4.2.2 + * Requires jQuery v1.7.2 or later + * Project repository: https://github.com/jquery-form/form + + * Copyright 2017 Kevin Morris + * Copyright 2006 M. Alsup + + * Dual licensed under the LGPL-2.1+ or MIT licenses + * https://github.com/jquery-form/form#license + + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + */ +function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=function(e,i){return"undefined"==typeof i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(e)),t(i),i}:t(jQuery)}(function(t){"use strict";function e(e){var i=e.data;e.isDefaultPrevented()||(e.preventDefault(),t(e.target).closest("form").ajaxSubmit(i))}function i(e){var i=e.target,n=t(i);if(!n.is("[type=submit],[type=image]")){var o=n.closest("[type=submit]");if(0===o.length)return;i=o[0]}var a=i.form;if(a.clk=i,"image"===i.type)if("undefined"!=typeof e.offsetX)a.clk_x=e.offsetX,a.clk_y=e.offsetY;else if("function"==typeof t.fn.offset){var s=n.offset();a.clk_x=e.pageX-s.left,a.clk_y=e.pageY-s.top}else a.clk_x=e.pageX-i.offsetLeft,a.clk_y=e.pageY-i.offsetTop;setTimeout(function(){a.clk=a.clk_x=a.clk_y=null},100)}function n(){if(t.fn.ajaxSubmit.debug){var e="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e)}}var o=/\r?\n/g,a={};a.fileapi=void 0!==t('').get(0).files,a.formdata="undefined"!=typeof window.FormData;var s=!!t.fn.prop;t.fn.attr2=function(){if(!s)return this.attr.apply(this,arguments);var t=this.prop.apply(this,arguments);return t&&t.jquery||"string"==typeof t?t:this.attr.apply(this,arguments)},t.fn.ajaxSubmit=function(e,i,o,r){function l(i){var n,o,a=t.param(i,e.traditional).split("&"),s=a.length,r=[];for(n=0;n',T).val(h.extraData[u].value).appendTo(_)[0]):c.push(t('',T).val(h.extraData[u]).appendTo(_)[0]));h.iframeTarget||g.appendTo(S),m.attachEvent?m.attachEvent("onload",r):m.addEventListener("load",r,!1),setTimeout(e,15);try{_.submit()}catch(v){var y=document.createElement("form").submit;y.apply(_)}}finally{_.setAttribute("action",a),_.setAttribute("enctype",l),i?_.setAttribute("target",i):f.removeAttr("target"),t.each(c,function(){this.remove()})}}function r(e){if(!v.aborted&&!I){if($=o(m),$||(n("cannot access response document"),e=M),e===D&&v)return v.abort("timeout"),void k.reject(v,"timeout");if(e===M&&v)return v.abort("server abort"),void k.reject(v,"error","server abort");if($&&$.location.href!==h.iframeSrc||x){m.detachEvent?m.detachEvent("onload",r):m.removeEventListener("load",r,!1);var i,a="success";try{if(x)throw"timeout";var s="xml"===h.dataType||$.XMLDocument||t.isXMLDoc($);if(n("isXml="+s),!s&&window.opera&&(null===$.body||!$.body.innerHTML)&&--F)return n("requeing onLoad callback, DOM not available"),void setTimeout(r,250);var l=$.body?$.body:$.documentElement;v.responseText=l?l.innerHTML:null,v.responseXML=$.XMLDocument?$.XMLDocument:$,s&&(h.dataType="xml"),v.getResponseHeader=function(t){var e={"content-type":h.dataType};return e[t.toLowerCase()]},l&&(v.status=Number(l.getAttribute("status"))||v.status,v.statusText=l.getAttribute("statusText")||v.statusText);var c=(h.dataType||"").toLowerCase(),d=/(json|script|text)/.test(c);if(d||h.textarea){var p=$.getElementsByTagName("textarea")[0];if(p)v.responseText=p.value,v.status=Number(p.getAttribute("status"))||v.status,v.statusText=p.getAttribute("statusText")||v.statusText;else if(d){var f=$.getElementsByTagName("pre")[0],y=$.getElementsByTagName("body")[0];f?v.responseText=f.textContent?f.textContent:f.innerText:y&&(v.responseText=y.textContent?y.textContent:y.innerText)}}else"xml"===c&&!v.responseXML&&v.responseText&&(v.responseXML=A(v.responseText));try{P=O(v,c,h)}catch(b){a="parsererror",v.error=i=b||a}}catch(b){n("error caught: ",b),a="error",v.error=i=b||a}v.aborted&&(n("upload aborted"),a=null),v.status&&(a=v.status>=200&&v.status<300||304===v.status?"success":"error"),"success"===a?(h.success&&h.success.call(h.context,P,"success",v),k.resolve(v.responseText,"success",v),u&&t.event.trigger("ajaxSuccess",[v,h])):a&&("undefined"==typeof i&&(i=v.statusText),h.error&&h.error.call(h.context,v,a,i),k.reject(v,"error",i),u&&t.event.trigger("ajaxError",[v,h,i])),u&&t.event.trigger("ajaxComplete",[v,h]),u&&!--t.active&&t.event.trigger("ajaxStop"),h.complete&&h.complete.call(h.context,v,a),I=!0,h.timeout&&clearTimeout(C),setTimeout(function(){h.iframeTarget?g.attr("src",h.iframeSrc):g.remove(),v.responseXML=null},100)}}}var l,c,h,u,p,g,m,v,b,w,x,C,_=f[0],k=t.Deferred();if(k.abort=function(t){v.abort(t)},i)for(c=0;c',T),g.css({position:"absolute",top:"-1000px",left:"-1000px"})),m=g[0],v={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var i="timeout"===e?"timeout":"aborted";n("aborting upload... "+i),this.aborted=1;try{m.contentWindow.document.execCommand&&m.contentWindow.document.execCommand("Stop")}catch(o){}g.attr("src",h.iframeSrc),v.error=i,h.error&&h.error.call(h.context,v,i,e),u&&t.event.trigger("ajaxError",[v,h,i]),h.complete&&h.complete.call(h.context,v,i)}},u=h.global,u&&0===t.active++&&t.event.trigger("ajaxStart"),u&&t.event.trigger("ajaxSend",[v,h]),h.beforeSend&&h.beforeSend.call(h.context,v,h)===!1)return h.global&&t.active--,k.reject(),k;if(v.aborted)return k.reject(),k;b=_.clk,b&&(w=b.name,w&&!b.disabled&&(h.extraData=h.extraData||{},h.extraData[w]=b.value,"image"===b.type&&(h.extraData[w+".x"]=_.clk_x,h.extraData[w+".y"]=_.clk_y)));var D=1,M=2,L=t("meta[name=csrf-token]").attr("content"),z=t("meta[name=csrf-param]").attr("content");z&&L&&(h.extraData=h.extraData||{},h.extraData[z]=L),h.forceSync?a():setTimeout(a,10);var P,$,I,F=50,A=t.parseXML||function(t,e){return window.ActiveXObject?(e=new ActiveXObject("Microsoft.XMLDOM"),e.async="false",e.loadXML(t)):e=(new DOMParser).parseFromString(t,"text/xml"),e&&e.documentElement&&"parsererror"!==e.documentElement.nodeName?e:null},E=t.parseJSON||function(t){return window.eval("("+t+")")},O=function(e,i,n){var o=e.getResponseHeader("content-type")||"",a=("xml"===i||!i)&&o.indexOf("xml")>=0,s=a?e.responseXML:e.responseText;return a&&"parsererror"===s.documentElement.nodeName&&t.error&&t.error("parsererror"),n&&n.dataFilter&&(s=n.dataFilter(s,i)),"string"==typeof s&&(("json"===i||!i)&&o.indexOf("json")>=0?s=E(s):("script"===i||!i)&&o.indexOf("javascript")>=0&&t.globalEval(s)),s};return k}if(!this.length)return n("ajaxSubmit: skipping submit process - no element selected"),this;var d,u,p,f=this;"function"==typeof e?e={success:e}:"string"==typeof e||e===!1&&arguments.length>0?(e={url:e,data:i,dataType:o},"function"==typeof r&&(e.success=r)):"undefined"==typeof e&&(e={}),d=e.method||e.type||this.attr2("method"),u=e.url||this.attr2("action"),p="string"==typeof u?t.trim(u):"",p=p||window.location.href||"",p&&(p=(p.match(/^([^#]+)/)||[])[1]),e=t.extend(!0,{url:p,success:t.ajaxSettings.success,type:d||t.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},e);var g={};if(this.trigger("form-pre-serialize",[this,e,g]),g.veto)return n("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(e.beforeSerialize&&e.beforeSerialize(this,e)===!1)return n("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var m=e.traditional;"undefined"==typeof m&&(m=t.ajaxSettings.traditional);var v,y=[],b=this.formToArray(e.semantic,y,e.filtering);if(e.data){var w="function"==typeof e.data?e.data(b):e.data;e.extraData=w,v=t.param(w,m)}if(e.beforeSubmit&&e.beforeSubmit(b,this,e)===!1)return n("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[b,this,e,g]),g.veto)return n("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var x=t.param(b,m);v&&(x=x?x+"&"+v:v),"GET"===e.type.toUpperCase()?(e.url+=(e.url.indexOf("?")>=0?"&":"?")+x,e.data=null):e.data=x;var C=[];if(e.resetForm&&C.push(function(){f.resetForm()}),e.clearForm&&C.push(function(){f.clearForm(e.includeHidden)}),!e.dataType&&e.target){var _=e.success||function(){};C.push(function(i,n,o){var a=arguments,s=e.replaceTarget?"replaceWith":"html";t(e.target)[s](i).each(function(){_.apply(this,a)})})}else e.success&&(Array.isArray(e.success)?t.merge(C,e.success):C.push(e.success));if(e.success=function(t,i,n){for(var o=e.context||this,a=0,s=C.length;a0,M="multipart/form-data",L=f.attr("enctype")===M||f.attr("encoding")===M,z=a.fileapi&&a.formdata;n("fileAPI :"+z);var P,$=(D||L)&&!z;e.iframe!==!1&&(e.iframe||$)?e.closeKeepAlive?t.get(e.closeKeepAlive,function(){P=h(b)}):P=h(b):P=(D||L)&&z?c(b):t.ajax(e),f.removeData("jqxhr").data("jqxhr",P);for(var I=0;I0)&&(o={url:o,data:a,dataType:s},"function"==typeof r&&(o.success=r)),o=o||{},o.delegation=o.delegation&&"function"==typeof t.fn.on,!o.delegation&&0===this.length){var l={s:this.selector,c:this.context};return!t.isReady&&l.s?(n("DOM not ready, queuing ajaxForm"),t(function(){t(l.s,l.c).ajaxForm(o)}),this):(n("terminating; zero elements found by selector"+(t.isReady?"":" (DOM not ready)")),this)}return o.delegation?(t(document).off("submit.form-plugin",this.selector,e).off("click.form-plugin",this.selector,i).on("submit.form-plugin",this.selector,o,e).on("click.form-plugin",this.selector,o,i),this):this.ajaxFormUnbind().on("submit.form-plugin",o,e).on("click.form-plugin",o,i)},t.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},t.fn.formToArray=function(e,i,n){var o=[];if(0===this.length)return o;var s,r=this[0],l=this.attr("id"),c=e||"undefined"==typeof r.elements?r.getElementsByTagName("*"):r.elements;if(c&&(c=t.makeArray(c)),l&&(e||/(Edge|Trident)\//.test(navigator.userAgent))&&(s=t(':input[form="'+l+'"]').get(),s.length&&(c=(c||[]).concat(s))),!c||!c.length)return o;"function"==typeof n&&(c=t.map(c,n));var h,d,u,p,f,g,m;for(h=0,g=c.length;h","/":"?","\\":"|"}},t.each(["keydown","keyup","keypress"],function(){t.event.special[this]={add:e}})}(jQuery),function(t,e,i){"use strict";var n="zui.picker",o={},a={lang:null,remote:null,remoteConverter:null,remoteOnly:!1,onRemoteError:null,disableEmptySearch:!1,textKey:"text",valueKey:"value",keysKey:"keys",multi:"auto",formItem:"auto",list:null,allowSingleDeselect:null,autoSelectFirst:!1,maxSelectedCount:0,maxListCount:100,hideEmptyTextOption:!0,searchValueKey:!0,emptyResultHint:null,hideOnScroll:!0,inheritFormItemClasses:!1,emptySearchResultHint:null,accurateSearchHint:null,remoteErrorHint:null,deleteByBackspace:!0,disableScrollOnShow:!0,maxDropHeight:250,dropDirection:"auto",dropWidth:"100%",maxAutoDropWidth:450,minAutoDropWidth:100,multiValueSplitter:",",multiSelectActions:5,searchDelay:200,autoClearDrop:6e4,fixLabelFor:!0,hotkey:!0,onSelect:null,onDeselect:null,onBeforeChange:null,onChange:null,onReady:null,onNoResults:null,onShowingDrop:null,onHidingDrop:null,onShowedDrop:null,onHiddenDrop:null,valueMustInList:!0},s={zh_cn:{emptyResultHint:"没有可选项",emptySearchResultHint:"没有找到 “{0}”",accurateSearchHint:"请提供更多关键词缩小匹配范围",remoteErrorHint:"无法从服务器获取结果 - {0}",selectAll:"全选",deselectAll:"取消选择"},zh_tw:{emptyResultHint:"沒有可選項",emptySearchResultHint:"沒有找到 “{0}”",accurateSearchHint:"請提供更多關鍵詞縮小匹配範圍",remoteErrorHint:"無法從服務器獲取結果 - {0}",selectAll:"全選",deselectAll:"取消選擇"},en:{emptyResultHint:"No options",emptySearchResultHint:'Cannot found "{0}"',accurateSearchHint:"Suggest to provide more keywords",remoteErrorHint:"Unable to get result from server: {0}",selectAll:"Select all",deselectAll:"Deselect all"}},r=function(o,a){var l=this;l.name=n,l.$=t(o),l.id="pk_"+(l.$.attr("id")||t.zui.uuid()),a=l.options=t.extend({},r.DEFAULTS,this.$.data(),a),void 0!==a.hideOnWindowScroll&&(a.hideOnScroll=a.hideOnWindowScroll);var c=t.zui.clientLang?t.zui.clientLang():"en",h=a.lang||c;l.lang=t.zui.getLangData?t.zui.getLangData(n,h,s):s[h]||s[c];var d,u,p=a.formItem,f='.form-item,input[type="hidden"],select,input[type="text"]';if(d="self"===p?l.$:"auto"!==p&&p?l.$.find(p):l.$.is(f)?l.$:l.$.find(f).first(),!d.length)return console.error&&console.error("Cannot found form item for picker.");if(d.is('input[type="hidden"]'))u="hidden";else if(d.is("select"))u="select";else{if(!d.is('input[type="text"]'))return console.error&&console.error("Unknown form type for picker.");u="text"}a.inheritFormItemClasses&&v.addClass(d.attr("class")),l.formType=u,l.$formItem=d.removeClass("picker").hide(),l.selfFormItem=d.is(l.$);var g=a.multi;g&&"auto"!==g||(g="select"===u&&"multiple"===d.attr("multiple")),g=!!g,l.multi=g,g||(l.options.checkable=!1);var m=a.list;m?l.setList("function"==typeof m?m({search:l.search,limit:a.maxListCount}):m,!0):"select"===u?l.updateFromSelect():l.setList([],!0);var v;v=!l.selfFormItem&&l.$.hasClass("picker")?l.$:t('
        ').insertAfter(l.$),v.addClass("picker").toggleClass("picker-multi",g).toggleClass("picker-single",!g);var y=v.children(".picker-selections");y.length?y.empty():y=t('
        ');var b=l.id+"-search",w=t('').appendTo(y);if(!g){var x=t('
        ');a.allowSingleDeselect&&x.append(''),x.appendTo(y),l.$singleSelection=x}v.toggleClass("picker-input-empty",!w.val().length).append(y),l.$container=v,l.$selections=y,l.$search=w,l.search="";var C=a.placeholder;if(void 0===C&&(C=d.attr("placeholder")),"string"==typeof C&&C.length&&y.append(t('
        ').text(C)),a.placeholder=C,a.fixLabelFor){var _=d.attr("id");_&&t('label[for="'+_+'"]').attr("for",b)}var k=void 0!==a.defaultValue?a.defaultValue:d.val();if(null===k&&(k=""),l.setValue(k,!0),l.setDisabled(),w.on("focus",function(){l.disabled||(l._blurTimer&&(clearTimeout(l._blurTimer),l._blurTimer=0),v.addClass("picker-focus"),l.options.disableEmptySearch&&"string"==typeof l.search&&!l.search.length||l.showDropList())}).on("blur",function(){l.disabled||(l._blurTimer&&clearTimeout(l._blurTimer),l._blurTimer=setTimeout(function(){l._blurTimer=0,w.is(":focus")||v.removeClass("picker-focus")},100))}).on("input change",function(){if(!l.disabled){var t=w.val();if(g&&w.width(14*t.length),v.toggleClass("picker-input-empty",!t.length),l.tryUpdateList(t),a.disableEmptySearch){const e="string"!=typeof t||t.length;!l.dropListShowed&&e?l.showDropList():l.dropListShowed&&!e&&l.hideDropList()}}}),a.hotkey&&w.on("keydown",function(t){if(!l.disabled){var e=t.key||t.which;if(l.dropListShowed){var i=l.activeValue,n="string"==typeof i;if("Enter"===e||13===e)n&&(l.select(i,g),g?(l.$search.val(""),l.tryUpdateList("")):w.blur(),t.preventDefault(),t.stopPropagation());else if("ArrowDown"===e||40===e){var o,s=l.$activeOption;if(s&&(o=s.next(".picker-option"),g))for(;o.length&&o.hasClass("picker-option-selected");)o=o.next(".picker-option");o&&o.length||(o=l.$optionsList.children(g?".picker-option:not(.picker-option-selected)":".picker-option").first()),o.length&&l.activeOption(o),t.preventDefault(),t.stopPropagation()}else if("ArrowUp"===e||30===e){var r,s=l.$activeOption;if(s&&(r=s.prev(".picker-option"),g))for(;r.length&&r.hasClass("picker-option-selected");)r=r.prev(".picker-option");r&&r.length||(r=l.$optionsList.children(g?".picker-option:not(.picker-option-selected)":".picker-option").last()),r.length&&l.activeOption(r),t.preventDefault(),t.stopPropagation()}else"Escape"===e||27===e?l.hideDropList(!0):a.deleteByBackspace&&g&&("Backspace"===e||8===e)&&l.value&&l.value.length&&!w.val().length&&l.deselect(l.value[l.value.length-1])}}}),g){y.on("mousedown",function(t){if(!l.disabled)return l.dropListShowed&&!a.checkable?(t.preventDefault(),void t.stopPropagation()):void 0}).on("mouseup",function(e){l.disabled||y.hasClass("sortable-sorting")||t(e.target).closest(".picker-selection-remove").length||l.dropListShowed&&!a.checkable||l.focus()});var T=a.sortValuesByDnd;if(T&&t.fn.sortable){v.addClass("picker-sortable");var S={selector:".picker-selection",stopPropagation:!0,start:function(){l.hideDropList(!0)},finish:function(e){var i=[];t.each(e.list,function(t,e){i.push(e.item.data("value"))}),l.setValue(i.slice(),!1,!0)}};"object"==typeof T&&t.extend(S,T),y.sortable(S)}}if(y.on("click",".picker-selection-remove",function(e){if(!l.disabled){if(l.multi){var i=t(this).closest(".picker-selection");l.deselect(i.data("value"))}else l.deselect();e.stopPropagation()}}),d.on("chosen:updated",function(){l.updateFromSelect(!1),l.setValue(d.val(),!0),l.setDisabled(),l.updateList()}).on("chosen:activate",l.focus).on("chosen:open",l.showDropList).on("chosen:close",l.hideDropList),v.addClass("picker-ready"),t.zui.asap(function(){l.triggerEvent("ready",{picker:l},"","chosen:ready")}),!a.disableScrollOnShow){var D=a.hideOnScroll;D&&![e,i,!0].includes(D)&&t(D).on("scroll",this.handleParentScroll.bind(this))}};r.prototype.destroy=function(){var e=this,i=e.options;e.hideDropList(!0);var o=e.$search;o.off("focus blur input change"),i.hotkey&&o.off("keydown"),o.remove();var a=e.$selections;a.off("click"),e.multi&&a.off("mousedown mouseup"),a.remove();var s=e.$formItem;e.selectOptionsBackup&&(s.empty(),t.each(e.selectOptionsBackup,function(e,n){var o={value:n[i.valueKey]},a=n[i.keysKey];void 0!==a&&(o["data-"+i.keysKey]=a),s.append(t("'),s.checkable&&L.prepend('
        ')):L.removeClass("picker-expired"),L.attr("title",D).removeClass("picker-option-active").toggleClass("disabled",!!k.disabled).toggleClass("picker-option-selected",S),s.checkable&&L.find(".checkbox-primary").toggleClass("checked",S);var P=L.find(".picker-option-text");if(l){var $=D.toLowerCase(),I=$.split(b);if(I.length>1){P.empty();var F=0,A=I[0].length;A&&(P.append(t("").text(D.substr(F,A))),F+=A);for(var E=1;E').text(D.substr(F,r.length))),F+=r.length,A=I[E].length,A&&(P.append(t("").text(D.substr(F,A))),F+=A)}else P.text(D)}else P.text(D);if(s.optionRender){var O=s.optionRender(L,k,n);O instanceof t&&(L=O)}p?(z||L.prev(".picker-option")[0]!==p[0])&&L.insertAfter(p):z&&L.prependTo(o),p=L,n.multi?S||d||(d=k):!u&&C&&T===x?u=k:S?h=k:d||(d=k)}}}w.filter(".picker-expired").remove(),!i&&y=N&&(R=!0,n.$actions.find('[data-type="select-all"]').attr("disabled",o.children(".picker-option").length?null:"disabled"),n.$actions.find('[data-type="deselect-all"]').attr("disabled",n.value&&n.value.length?null:"disabled")))}n.showActions=R,n.$dropMenu.toggleClass("picker-no-actions",!R),i||n.updateMessage(a,"info"),n.$dropMenu.toggleClass("picker-no-options",!c),n.layoutDropList(n.listRendered),n.listRendered=!0}},r.prototype.activeOption=function(e,i){var n=this;e&&(e instanceof t?e=e.attr("data-value"):"object"==typeof e&&(e=e[n.options.valueKey])),n.$optionsList.find(".picker-option-active").removeClass("picker-option-active");var o=n.getListItem(e);if(o){if(o.disabled)return;n.activeValue=e}else e=n.activeValue;var a=n.$optionsList.find('[data-value="'+e+'"]');if(a.length){if(a.addClass("picker-option-active"),!i){var s=a[0];s.scrollIntoViewIfNeeded?s.scrollIntoViewIfNeeded():s.scrollIntoView&&s.scrollIntoView()}n.$activeOption=a}else n.$activeOption=null},r.prototype.updateList=function(t,e,i){var n=this;void 0!==t?n.search=t:t=n.search;var o=n.options.remoteOnly;if(o)n.layoutDropList(!1,!0);else{var a=[];if(null===t||void 0===t||"string"==typeof t&&!t.length)a=n.list||[];else if("function"==typeof n.options.list)a=n.options.list({search:t,limit:n.options.maxListCount});else if(n.list&&n.list.length){var s=n.options.maxListCount,r=n.options.keysKey,l=n.options.textKey,c=n.options.valueKey,h=n.options.searchValueKey,d={};t=t.toLowerCase();for(var u=0;u-1&&(g+=0===v?20:10)}if(!g){var y=p[r];if(null!==y&&void 0!==y&&""!==y){y=y.toLowerCase();var v=y.indexOf(t);v>-1&&(g+=0===v?8:4)}}if(!g&&h&&null!==f&&void 0!==f&&""!==f){f=f.toLowerCase();var v=f.indexOf(t);v>-1&&(g+=0===v?3:1)}if(g&&(d[f]=g+(n.list.length-u)/n.list.length,a.push(p)),s&&a.length>=s)break}}a.length&&(a=a.sort(function(t,e){return d[e[c]]-d[t[c]]}))}n.renderOptionsList(a,!1,i)}e||n.getRemoteList(function(e){o?n.renderOptionsList(n.list,!1,i):n.updateList(t,!0)},o?function(){n.renderOptionsList([],!0,i)}:null)},r.prototype.destroyDropList=function(t){var e=this;e._clearTimer&&clearTimeout(e._clearTimer),e.$dropMenu&&(t?e._clearTimer=setTimeout(e.destroyDropList.bind(e,0),t):(e.$optionsList.off("click mouseenter"),e.$optionsList=null,e.$dropMenu.remove(),e.$dropMenu=null,e.$message=null))},r.prototype.showDropList=function(){var e=this;if(e.triggerEvent("showingDrop",{picker:e})!==!1){if(e._clearTimer&&clearTimeout(e._clearTimer),e.dropListShowed=!0,e.dropDirection=null,e.listRendered=!1,e.activeValue=null,o[e.id]=e,e.options.disableScrollOnShow&&t.zui.fixBodyScrollbar(),!e.$dropMenu){var i=t('
        ').attr("data-id",e.id),a=t('
        ').appendTo(i),s=e.options.checkable;i.data(n,e).toggleClass("picker-multi",e.multi).toggleClass("picker-single",!e.multi).toggleClass("picker-checkable",!!s).appendTo("body"),e.options.chosenMode&&i.addClass("chosen-up"),a.on("click",".picker-option:not(.disabled)",function(){var i=t(this),n=i.hasClass("picker-option-selected");if(!n||s){var o=i.attr("data-value");n?e.deselect(o):e.select(o,s)}}).on("mouseenter",".picker-option:not(.disabled)",function(){s||e.activeOption(t(this),!0)}),e.multi&&!e.options.remote&&(e.$actions=t(['
        ','",'","
        "].join("")).appendTo(i),e.$actions.on("click",".picker-action",function(i){var n=t(this).data("type");"select-all"===n?e.selectAll(s):"deselect-all"===n&&e.deselectAll(s)})),e.$message=t('
        ').appendTo(i),e.$dropMenu=i,e.$optionsList=a}e.updateList(e.search,!1,function(){e.triggerEvent("showedDrop",{picker:e},"","chosen:showing_dropdown")}),e.$dropMenu.addClass("picker-drop-show")}},r.prototype.hideDropList=function(e){var i=this;if(i.triggerEvent("hidingDrop",{picker:i})!==!1){i.dropListShowed=!1,i.$activeOption=null,i.activeValue=null,i.$search.val(""),i.search="",delete o[i.id],i.$dropMenu&&i.$dropMenu.removeClass("picker-drop-show"),i.options.disableScrollOnShow&&t.zui.resetBodyScrollbar(),e&&this.$search.blur(),i.triggerEvent("hiddenDrop",{picker:i},"","chosen:hiding_dropdown");var n=i.options.autoClearDrop;n&&i.destroyDropList(n)}},r.prototype.updateFromSelect=function(e){var i=this,n=i.options,o=[];void 0===e&&(e=!0);var a=i.$formItem.children("option");a.length&&(a.each(function(){var e=t(this),a=e.val(),s=e.text();if(n.onUpdateSelectOption){var r=n.onUpdateSelectOption(e,i);r&&o.push(r)}else if(s.length||a.length){var r={};r[n.valueKey]=a,r[n.textKey]=s,r[n.keysKey]=e.data(n.keysKey),r.disabled=e.attr("disabled"),o.push(r)}var l=n.allowSingleDeselect;"auto"!==l&&null!==l&&void 0!==l||a.length||(n.allowSingleDeselect=!0)}),i.selectOptionsBackup=o.slice()),i.setList(o,e)},r.prototype.setList=function(t,e){var i=this,n=i.options,o=e?[]:i.list||[],a=e?{}:i.listMap||{};"string"==typeof t&&(t=t.split(n.multiValueSplitter));for(var s=0;s')}):p&&u.find('option[value="'+e+'"]').length||u.append('
        ");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),c=l.find("#"+o).closest('[data-ride="table"],#'+a);if(c.length){var h=c.find(".table-statistic");h.length&&(i.defaultStatistic=h.html());var d=i.$.find('[data-ride="pager"]').data("zui.pager"),u=c.find('[data-ride="pager"]');d&&u.length&&d.set(u.data())}}catch(p){console.error(p)}}i.$.removeClass("load-indicator loading").trigger("beforeTableReload"),delete i.defaultStatistic,i.updateStatistic(),i.initModals(),i.$.datepickerAll();var f=i.$.find("tbody>tr"),g=!1;t.each(i.checkItems,function(t,e){e&&(i.checkRow(f.filter('[data-id="'+t+'"]'),!0,!0),g=!0)}),g&&i.updateCheckUI(),n.nested&&i.initNestedList(),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)),h){var d=c[0].getBoundingClientRect();l.css({left:d.left,width:c.width(),overflow:"hidden"}),l.find(".fixed-header-copy").css({left:o.left-d.left,position:"relative",minWidth:i.width()}),a||c.data("fixHeaderScroll")||(c.data("fixHeaderScroll",1),i.width()>c.width()&&c.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"),c=l.hasClass("body-modal");if(r){var h=n.parent(),d=h.is(".table-responsive");o.css({bottom:i.pageFooterHeight||0,left:d?h[0].getBoundingClientRect().left:e.left,width:d?h.width():e.width}),c&&l.css("padding-bottom",40)}else o.css({width:"",left:0,bottom:0}),c&&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(i,n,o){var a=this,s=a.getTable();a.isDataTable&&!i.is(".datatable-row-left")&&(i=s.find('.datatable-row-left[data-index="'+i.data("index")+'"]'));var r=i.find('input[type="checkbox"]');if(r.length&&!r.is(":disabled")){n===e&&(n=!r.is(":checked")),a.isDataTable?s.find('.datatable-row[data-index="'+i.data("index")+'"]').toggleClass("checked",n):i.toggleClass("checked",n);var l=i.data("id");this.checkItems[l]=n,r.prop("checked",n).trigger("change"),o||(i.hasClass("table-parent")&&s.find((a.isDataTable?".fixed-left ":"")+"tbody>tr.parent-"+l).each(function(){a.checkRow(t(this),n,!0)}),a.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 c=t(this),h=c.find('input[type="checkbox"]');if(!h.length)return void l--;r=h.is(":checked");var d=e.isDataTable?i.find('.datatable-row[data-index="'+c.data("index")+'"]'):c;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:20,nested:!1,preserveNested:!0,hot:!1,iframeModalTrigger:".iframe:not(.disabled,[disabled])"},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){i=i||"show",t.zui.messager?(n?n.html=!0:n={html:!0},e=e.toString().replace(/\n/g,"
        "),t.zui.messager[i](e,n)):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 c=r.beforeSubmit,h=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((c&&c(n,a,s))===!1)return!1;l.removeClass("form-watched").enableForm(!1);var r={},h=a.find('[type="file"]');r.fileapi=h.length&&h[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,p="multipart/form-data",f=a.attr("enctype")==p||a.attr("encoding")==p,g=r.fileapi&&r.formdata,m=u&&!g||f&&!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(l.trigger("success.form.zui",[i,n,o,l]),(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 c=r.responser?t(r.responser):l.find(".form-responser");c.length||(c=t("#responser"));var h=i.message,p=function(){var n=i.callback;if(n)if("object"==typeof n){var o=n.target?e[n.target]:e,a=o[n.name];a.apply(l,Array.isArray(n.params)?n.params:[n.params])}else{var s=n.indexOf("("),r=(s>0?n.substr(0,s):n).split("."),c=e,h=r[0];r.length>1&&(h=r[1],"top"===r[0]?c=e.top:"parent"===r[0]&&(c=e.parent));var a=c[h];if("function"==typeof a){var d=[];return s>0&&")"==n[n.length-1]&&(d=t.parseJSON("["+n.substring(s+1,n.length-1)+"]")),d.push(i),a.apply(l,d)}}};if("success"===i.result){var f=r.locate||i.locate,g=r.closeModal||i.closeModal,m=r.ajaxReload||i.ajaxReload;if(l.enableForm(!0,!!(f||g||m)),h){var v=l.find('[type="submit"]').first(),y=!1;v.length&&(v.popover({container:"body",trigger:"manual",content:h,tipClass:"popover-in-modal popover-success popover-form-result",placement:i.placement||v.data("placement")||r.popoverPlacement||"right"}).popover("show"),setTimeout(function(){v.popover("destroy")},r.popoverTime||2e3),y=!0),c.length&&(c.html(''+h+"").show().delay(3e3).fadeOut(100),y=!0),y||a(h,"success")}if(u)return u(i,!0,l);if(g&&setTimeout(t.zui.closeModal,"number"==typeof g?g:r.closeModalTime||2e3),p()===!1)return;if(f)if("loadInModal"==f){var b=t(".modal");setTimeout(function(){b.load(b.attr("ref"),function(){t(this).find(".modal-dialog").css("width",t(this).data("width")),t.zui.ajustModalPosition()})},1e3)}else"parent"===f||"top"===f?e[f]&&setTimeout(function(){e[f].location.reload()},1200):"reload"===f?setTimeout(function(){e.location.href=e.location.href},1200):setTimeout(function(){t.apps?t.apps.open(f):e.location.href=f},1200);if(m){var w=t(m);w.length&&w.load(e.location.href+" "+m,function(){w.find('[data-toggle="modal"]').modalTrigger()})}}else{if(l.enableForm(),"string"==typeof h)c.length?c.html(''+h+"").show().delay(3e3).fadeOut(100):a(h,"danger");else if("object"==typeof h){var x=!1,C=[];t.each(h,function(e,i){var n=t.isArray(i)?i.join(""):i,o=t("#"+e);if(!o.length)return void C.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 c=function(){var e=t("#"+a);if(e.length)return e.remove(),o.removeClass("has-error"),!0};o.on("change input mousedown",c);var h=t("#"+e+"_chosen");if(h.length&&h.find(".chosen-single,.chosen-choices").addClass("has-error").on("mousedown",function(){c()===!0&&t(this).removeClass("has-error")}),!x&&!o.data("datetimepicker")){var d=o[0];if(o.hasClass("chosen"))o.trigger("chosen:activate").trigger("chosen:open"),d=o.parent().find(".chosen-container")[0];else if(o.is("textarea")&&o.data("keditor")){var u=o.data("keditor");u.focus(),u.edit.doc.body.focus(),d=o.parent().find(".ke-container")[0]}else o.focus();d.scrollIntoView&&d.scrollIntoView(),x=!0}}),C.length&&a(C.join(""),"danger")}if(u)return u(i,!1,l);if(p()===!1)return}}},error:function(t,i,n){if(l.trigger("error.form.zui",[t,i,n,l]),(h&&h(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:{finish: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=e.trim().split(" ");a.each(function(){var e=t(this),n=(e.text()+" "+(e.data("key")||e.data("filter")||"")).trim();e.toggleClass("hidden",!i(s,n))})}n.scrollTo(a.not(".hidden").first().addClass("active")),n.$.trigger("onSearchComplete",e)},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)&&!o.label,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?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=tt.options.fileMaxSize||(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;var s="zui.fileInputList",r=function(e,i){var o=this;o.name=s;var a=o.$=t(e),l=a.find("#file-input-multiple");a.on("click",".file-input-btn",function(){l.trigger("click")}),o.$template=a.find(".file-input").detach(),i=o.options=t.extend({},r.DEFAULTS,o.$.data(),i),l.on("change",function(){for(var t=l.prop("files"),e=[],a=0;ai.fileMaxSize||e.push(s)}t.length!=e.length&&(window.bootbox||window).alert(i.fileSizeError.format(n(i.fileMaxSize))),e.forEach(function(t){o.add(t)})})};r.prototype.add=function(t){var e=this,i=e.options,n=e.$template.clone();"before"===i.appendWay?e.$.prepend(n):e.$.append(n),n.fileInput({file:t,fileMaxSize:i.eachFileMaxSize,fileSizeError:i.fileSizeError,onDelete:function(t){t.$.remove(),e.options.onDelete&&e.options.onDelete(t,e)},onSelect:function(t,i){e.options.onSelect&&e.options.onSelect(t,i,e)}})},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,c){if("object"==typeof e)return t.createLink(e.moduleName,e.methodName,e.vars,e.viewType,e.isOnlyBody,e.hash,e.tid,e.params);if(c&&(c.tid&!l&&(l=c.tid),void 0!==c.isOnlyBody&&void 0===s&&(s=c.isOnlyBody)),t.tabSession&&!l&&(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'),c=s.find('[name="end"],.control-time-end'),h=function(){var t=l.val();if(s.find(".hide-empty-begin").toggleClass("hide",!t),t){var i=n(e(t)+30);c.find('option[value="'+i+'"]').length&&c.val(i),r.onChange&&r.onChange(c,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");c.find('option[value="'+u+'"]').length&&c.val(u),r.onChange&&r.onChange(c,u)}}else l.on("change",h),a(l,r.begin),a(c,r.end),s.data("timeSpanControlInit",!0);r.end||h()})},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.top.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.extend(t.zui.Picker.DEFAULTS,{optionRender:function(e,i,n){if("user"===n.options.type){var o=n.options.users;if(!o)return;var a=o[i.value];if(!a)return;if(e.find(".picker-option-text").text(a.realname||a.account),e.hasClass("picker-user-option"))return;return e.prepend(t('
        ').avatar({user:a})),a.deptName&&e.append(t('').text(a.deptName)),a.roleName&&e.append(t('').text(a.roleName)),e.addClass("picker-user-option")}},checkable:!0,maxListCount:500,disableScrollOnShow:!1}),t.zui.setUserPickerInfos=function(e){t.zui.Picker.DEFAULTS.users=t.extend({},t.zui.Picker.DEFAULTS.users,e)},t(function(){t(".picker-select[data-pickertype!='remote']").picker({chosenMode:!0}),t("[data-pickertype='remote']").each(function(){var e=t(this).attr("data-pickerremote");t(this).picker({chosenMode:!0,remote:e})}),window.pickerUsers&&t.zui.setUserPickerInfos(window.pickerUsers),t(".user-picker").picker({type:"user"})})),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,c=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(c,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 h=t.initSidebar=function(){var e=t("#sidebar");if(e.length){if(e.data("init"))return!0;c="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(c,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,h=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"}),t.fn.initIframeModal=function(){return this.each(function(){var e=t(this);if(!e.is("[disabled],.disabled")&&!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()}),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 d,u,p,f,g,m=function(){d||(d=t("#subNavbar"),u=t("#pageNav"),p=t("#pageActions"),f=d.children(".nav"),g=f.outerWidth());var e=d.outerWidth(),i=u.outerWidth()||0,n=p.outerWidth()||0;if(i=i?i+15:0,n=n?n+15:0,!i&&!n)return void f.css({maxWidth:null,left:null,position:"static"});var o=Math.max(300,e-i-n),a=Math.min(o,g),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(),x()}),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 C=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(C)},t(function(){t("textarea.autosize").each(C),t(document).on("input paste change","textarea.autosize",C)}),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 _="undefined"!=typeof InstallTrigger;t.zui.browser.firefox=_,t("html").toggleClass("is-firefox",_).toggleClass("not-firefox",!_),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){var 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(e){t("body.body-modal").length&&window.parent&&window.parent!==window&&window.parent.$("body").removeClass("hide-modal-close")}).on("loaded.zui.modal",function(e){t("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 i=270,n=e.getBoundingClientRect();n.top<0&&(i=Math.min(270,n.height)+n.top),e.style.maxHeight=Math.min(270,i,t(window).height()-28)+"px"},50)})),t(".dropdown-menu.with-search .menu-search").on("click",function(t){return t.stopPropagation(),!1})})}(jQuery),function(t){function e(){if(!config.skipRedirect&&!window.skipRedirect){var e=window.parent,i=config.currentModule,n=config.currentMethod;if("file"!==i||"download"!==n){var o="index"===i&&"index"===n,a="#_single"===location.hash||/(\?|\&)_single/.test(location.search)||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;return void(location.href=t.createLink("index","index","")+"#app="+encodeURIComponent(r))}if(e!==window&&e.$.apps){o&&e.location.reload();var l=window.name;if(0===l.indexOf("app-")){t.apps=window.apps=e.$.apps;var c=l.substring(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;if(n){var o;"function"==typeof Event?o=new Event(t.type,{bubbles:!0}):(o=document.createEvent("Event"),o.initEvent(t.type,!0,!0)),n.dispatchEvent(o)}}}).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(a.external||"file"===a.moduleName&&"download"===a.methodName)return;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{};var i=0===e.indexOf("http:")||0===e.indexOf("https:");if(i){var n=window.location.origin;if(e.indexOf(n)<0)return{external:!0,url:e};e=e.substr((n+config.webRoot).length)}var o=e.split("#"),a=o[0].split("?"),s=a[1],r=s?t.getSearchParam("",s):{},l=a[0],c={url:e,isOnlyBody:"yes"===r.onlybody,vars:[],hash:o[1]||"",params:r,tid:r.tid||""};if("GET"===config.requestType){c.moduleName=r[config.moduleVar]||"index",c.methodName=r[config.methodVar]||"index",c.viewType=r[config.viewVar]||config.defaultView;for(var h in r)h!==config.moduleVar&&h!==config.methodVar&&h!==config.viewVar&&"onlybody"!==h&&"tid"!==h&&c.vars.push([h,r[h]])}else{var d=l.lastIndexOf("/");d===l.length-1&&(l=l.substr(0,d),d=l.lastIndexOf("/")),d>=0&&(l=l.substr(d+1));var u=l.lastIndexOf(".");u>=0?(c.viewType=l.substr(u+1),l=l.substr(0,u)):c.viewType=config.defaultView;var p=l.split(config.requestFix);if(c.moduleName=p[0]||"index",c.methodName=p[1]||"index",p.length>2)for(var f=2;f.nav>li").length>10&&(i(),t(window).on("resize",i)),setTimeout(n,1e3)}),parent!==window&&parent.$.apps){var o=window.name;if(o&&0===o.indexOf("app-")){var a=o.substring(4),s=parent.$.apps.openedApps[a];s&&s.$app.removeClass("loading")}}}(jQuery),function(t){"use strict";function e(e,i){"object"!=typeof i&&(i={user:i});var n=t(e);i=t.extend({},n.data(),i);var o=i.user;"string"==typeof o&&(o={account:o});var a={},s=i.size;s&&(a.width=s,a.height=s,a.lineHeight=s,Number.isNaN(+s)||n.addClass("size-"+s));var r=!!o.avatar;if(n.toggleClass("has-image",r).toggleClass("has-text",!r),n.empty(),r)n.append(t("").attr("src",o.avatar));else{var l=t.zui.strCode(o.account)*(i.hueDistance||43)%360;a.background="hsl("+l+","+(i.saturation||"40%")+","+(i.lightness||"60%")+")",Number.isNaN(+s)||(a.fontSize=Math.round(s/2)+"px");var c=o.name||o.realname||o.account;c=/^[\u4e00-\u9fa5\s]+$/.test(c)?c.length<=2?c:c.substring(c.length-2):/^[A-Za-z\d\s]+$/.test(c)?c[0].toUpperCase():c.length<=2?c:c.substring(0,2),n.append(t('').text(c))}return n.css(a)}t.fn.avatar=function(t){return this.each(function(){e(this,t)})}}(jQuery),$.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"}}); From 6399f9dff7d2396e161f789f6cf8eb7587da8fa5 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Mon, 27 Feb 2023 07:41:38 +0000 Subject: [PATCH 190/349] * Format the output. --- tools/prepareupdate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/prepareupdate.php b/tools/prepareupdate.php index b832e58a8c..cae8d0590e 100755 --- a/tools/prepareupdate.php +++ b/tools/prepareupdate.php @@ -113,7 +113,7 @@ class prepareUpdate $bugs = array_filter(explode(',', trim($release->bugs, ','))); if(!empty($stories)) $doneStories .= $title[$product] . "\n"; - if(!empty($fixedBugs)) $fixedBugs .= $title[$product] . "\n"; + if(!empty($bugs)) $fixedBugs .= $title[$product] . "\n"; foreach($stories as $storyID) { $storyTitle = $this->getStoryOrBugTitle('story', $storyID); @@ -266,7 +266,7 @@ class prepareUpdate { `sed -i "s/ \/\/ pms insert position\.$/\\n\\\$lang->upgrade->fromVersions['{$this->internalZT->pmsVersionAB}'] = '{$this->internalZT->pmsVersion}'; \/\/ pms insert position\./" ../module/upgrade/lang/version.php`; `sed -i "s/ \/\/ biz insert position\.$/\\n\\\$lang->upgrade->fromVersions['biz{$this->internalZT->bizVersionAB}'] = 'Biz{$this->internalZT->bizVersion}'; \/\/ biz insert position\./" ../module/upgrade/lang/version.php`; - `sed -i "s/ \/\/ max insert position\.$/\\n\\\$lang->upgrade->fromVersions['max{$this->internalZT->lastMaxVersionAB}'] = 'Max{$this->internalZT->lastMaxVersion}'; \/\/ max insert position\./" ../module/upgrade/lang/version.php`; + `sed -i "s/ \/\/ max insert position\.$/\\n\\\$lang->upgrade->fromVersions['max{$this->internalZT->lastMaxVersionAB}'] = 'Max{$this->internalZT->lastMaxVersion}'; \/\/ max insert position\./" ../module/upgrade/lang/version.php`; } /** From fd282324870f6ef0611c9bc87a50ec4f632c490e Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 27 Feb 2023 08:05:14 +0000 Subject: [PATCH 191/349] * Finish task #85630. --- db/update18.2.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 db/update18.2.sql diff --git a/db/update18.2.sql b/db/update18.2.sql new file mode 100644 index 0000000000..1d3adf53f9 --- /dev/null +++ b/db/update18.2.sql @@ -0,0 +1 @@ +REPLACE INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system','common','','setPercent','1'); From 226f798470d2470e825b81327615506b3a0b50d9 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 27 Feb 2023 08:08:07 +0000 Subject: [PATCH 192/349] * Finish task #85631. --- module/execution/model.php | 6 ++-- module/execution/view/create.html.php | 2 +- module/execution/view/edit.html.php | 2 +- module/programplan/config.php | 34 +++++++++++++++----- module/programplan/control.php | 1 + module/programplan/model.php | 44 ++++++++++++++++---------- module/programplan/view/edit.html.php | 2 ++ module/stage/config.php | 14 ++++++-- module/stage/model.php | 28 ++++++++++------ module/stage/view/batchcreate.html.php | 4 +++ module/stage/view/browse.html.php | 4 +++ module/stage/view/create.html.php | 4 ++- module/stage/view/edit.html.php | 4 ++- 13 files changed, 104 insertions(+), 45 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 3b5386d02f..9ba46a87ca 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -383,7 +383,7 @@ class executionModel extends model $type = 'sprint'; if($project) $type = zget($this->config->execution->modelList, $project->model, 'sprint'); - if($project->model == 'waterfall') + if($project->model == 'waterfall' and isset($this->config->setPercent) and $this->config->setPercent == 1) { $this->checkWorkload('create', $_POST['percent'], $project); if(dao::isError()) return false; @@ -432,7 +432,7 @@ class executionModel extends model } /* Check the workload format and total. */ - if(!empty($sprint->percent)) $this->checkWorkload('create', $sprint->percent, $sprint->project); + if(!empty($sprint->percent) and isset($this->config->setPercent) and $this->config->setPercent == 1) $this->checkWorkload('create', $sprint->percent, $sprint->project); /* Set planDuration and realDuration. */ if($this->config->edition == 'max') @@ -621,7 +621,7 @@ class executionModel extends model $execution = $this->loadModel('file')->processImgURL($execution, $this->config->execution->editor->edit['id'], $this->post->uid); /* Check the workload format and total. */ - if(!empty($execution->percent)) $this->checkWorkload('update', $execution->percent, $oldExecution); + if(!empty($execution->percent) and isset($this->config->setPercent) and $this->config->setPercent == 1) $this->checkWorkload('update', $execution->percent, $oldExecution); /* Set planDuration and realDuration. */ if($this->config->edition == 'max') diff --git a/module/execution/view/create.html.php b/module/execution/view/create.html.php index dab4ad2d55..a1c6f81724 100644 --- a/module/execution/view/create.html.php +++ b/module/execution/view/create.html.php @@ -124,7 +124,7 @@
        execution->typeDesc;?>
        - + setPercent) and $config->setPercent == 1):?> stage->percent;?> diff --git a/module/execution/view/edit.html.php b/module/execution/view/edit.html.php index 18123bcfed..1c9a55e90b 100644 --- a/module/execution/view/edit.html.php +++ b/module/execution/view/edit.html.php @@ -144,7 +144,7 @@
        - type == 'stage'):?> + type == 'stage' and isset($config->setPercent) and $config->setPercent == 1):?> stage->percent;?> diff --git a/module/programplan/config.php b/module/programplan/config.php index 3136c4559d..e5745773c6 100644 --- a/module/programplan/config.php +++ b/module/programplan/config.php @@ -5,7 +5,14 @@ $config->programplan->create->requiredFields = 'name,begin,end'; $config->programplan->edit->requiredFields = 'name,begin,end'; $config->programplan->datatable = new stdclass(); -$config->programplan->datatable->defaultField = array('id', 'name', 'percent', 'attribute', 'begin', 'end', 'realBegan', 'realEnd', 'actions'); +if(isset($config->setPercent) and $config->setPercent == 1) +{ + $config->programplan->datatable->defaultField = array('id', 'name', 'percent', 'attribute', 'begin', 'end', 'realBegan', 'realEnd', 'actions'); +} +else +{ + $config->programplan->datatable->defaultField = array('id', 'name', 'attribute', 'begin', 'end', 'realBegan', 'realEnd', 'actions'); +} $config->programplan->datatable->fieldList['id']['title'] = 'idAB'; $config->programplan->datatable->fieldList['id']['fixed'] = 'left'; @@ -17,10 +24,13 @@ $config->programplan->datatable->fieldList['name']['fixed'] = 'left'; $config->programplan->datatable->fieldList['name']['width'] = 'auto'; $config->programplan->datatable->fieldList['name']['required'] = 'yes'; -$config->programplan->datatable->fieldList['percent']['title'] = 'percent'; -$config->programplan->datatable->fieldList['percent']['fixed'] = 'no'; -$config->programplan->datatable->fieldList['percent']['width'] = '100'; -$config->programplan->datatable->fieldList['percent']['required'] = 'no'; +if(isset($config->setPercent) and $config->setPercent == 1) +{ + $config->programplan->datatable->fieldList['percent']['title'] = 'percent'; + $config->programplan->datatable->fieldList['percent']['fixed'] = 'no'; + $config->programplan->datatable->fieldList['percent']['width'] = '100'; + $config->programplan->datatable->fieldList['percent']['required'] = 'no'; +} $config->programplan->datatable->fieldList['attribute']['title'] = 'attribute'; $config->programplan->datatable->fieldList['attribute']['fixed'] = 'no'; @@ -53,10 +63,18 @@ $config->programplan->datatable->fieldList['actions']['width'] = '150'; $config->programplan->datatable->fieldList['actions']['required'] = 'yes'; $config->programplan->datatable->fieldList['actions']['sort'] = 'no'; -$config->programplan->customCreateFields = 'PM,percent,attribute,acl,milestone,realBegan,realEnd'; - $config->programplan->custom = new stdclass(); -$config->programplan->custom->createFields = 'PM,percent,attribute,acl,milestone'; + +if(isset($config->setPercent) and $config->setPercent == 1) +{ + $config->programplan->custom->createFields = 'PM,percent,attribute,acl,milestone'; + $config->programplan->customCreateFields = 'PM,percent,attribute,acl,milestone,realBegan,realEnd'; +} +else +{ + $config->programplan->custom->createFields = 'PM,attribute,acl,milestone'; + $config->programplan->customCreateFields = 'PM,attribute,acl,milestone,realBegan,realEnd'; +} $config->programplan->customAgilePlusCreateFields = 'PM,milestone,acl,desc,attribute'; diff --git a/module/programplan/control.php b/module/programplan/control.php index ccf3baa0a5..83f280143f 100644 --- a/module/programplan/control.php +++ b/module/programplan/control.php @@ -205,6 +205,7 @@ class programplan extends control if(strpos(",{$this->config->programplan->$customCreateFields},", ",{$field},") !== false) $visibleFields[$field] = ''; } } + if(empty($this->config->setPercent)) unset($visibleFields['percent'], $requiredFields['percent']); if($executionType != 'stage') unset($this->lang->execution->typeList[''], $this->lang->execution->typeList['stage']); diff --git a/module/programplan/model.php b/module/programplan/model.php index 5bd2ca475f..c46b69ee02 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -201,7 +201,7 @@ class programplanModel extends model $data->type = 'plan'; $data->text = empty($plan->milestone) ? $plan->name : $plan->name . $isMilestone ; $data->name = $plan->name; - $data->percent = $plan->percent; + if(isset($this->config->setPercent) and $this->config->setPercent == 1) $data->percent = $plan->percent; $data->attribute = zget($this->lang->stage->typeList, $plan->attribute); $data->milestone = zget($this->lang->programplan->milestoneList, $plan->milestone); $data->owner_id = $plan->PM; @@ -717,6 +717,7 @@ class programplanModel extends model $setCode = (isset($this->config->setCode) and $this->config->setCode == 1) ? true : false; $sameCodes = $this->checkCodeUnique($codes, isset($planIDList) ? $planIDList : ''); + $setPercent = (isset($this->config->setPercent) and $this->config->setPercent == 1) ? true : false; $datas = array(); foreach($names as $key => $name) { @@ -728,8 +729,8 @@ class programplanModel extends model $plan->project = $projectID; $plan->parent = $parentID ? $parentID : $projectID; $plan->name = $names[$key]; - if($setCode) $plan->code = $codes[$key]; - $plan->percent = $percents[$key]; + if($setCode) $plan->code = $codes[$key]; + if($setPercent) $plan->percent = $percents[$key]; $plan->attribute = (empty($parentID) or $parentAttribute == 'mix') ? $attributes[$key] : $parentAttribute; $plan->milestone = $milestone[$key]; $plan->begin = empty($begin[$key]) ? '0000-00-00' : $begin[$key]; @@ -753,7 +754,7 @@ class programplanModel extends model if(!empty($sameNames) and in_array($plan->name, $sameNames)) dao::$errors[$index]['name'] = empty($type) ? $this->lang->programplan->error->sameName : str_replace($this->lang->execution->stage, '', $this->lang->programplan->error->sameName); if($setCode and $sameCodes !== true and !empty($sameCodes) and in_array($plan->code, $sameCodes)) dao::$errors[$index]['code'] = sprintf($this->lang->error->repeat, $plan->type == 'stage' ? $this->lang->execution->code : $this->lang->code, $plan->code); - if($plan->percent and !preg_match("/^[0-9]+(.[0-9]{1,3})?$/", $plan->percent)) + if($setPercent and $plan->percent and !preg_match("/^[0-9]+(.[0-9]{1,3})?$/", $plan->percent)) { dao::$errors[$index]['percent'] = $this->lang->programplan->error->percentNumber; } @@ -806,13 +807,16 @@ class programplanModel extends model } } - $plan->percent = (float)$plan->percent; - $totalPercent += $plan->percent; + if($setPercent) + { + $plan->percent = (float)$plan->percent; + $totalPercent += $plan->percent; + } if($plan->milestone) $milestone = 1; } - if($totalPercent > 100) dao::$errors['percent'] = $this->lang->programplan->error->percentOver; + if($setPercent and $totalPercent > 100) dao::$errors['percent'] = $this->lang->programplan->error->percentOver; if(dao::isError()) return false; $this->loadModel('action'); @@ -877,7 +881,7 @@ class programplanModel extends model $this->dao->update(TABLE_PROJECT)->data($data) ->autoCheck() ->batchCheck($this->config->programplan->edit->requiredFields, 'notempty') - ->checkIF($plan->percent != '', 'percent', 'float') + ->checkIF($plan->percent != '' and $setPercent, 'percent', 'float') ->where('id')->eq($stageID) ->exec(); @@ -934,7 +938,7 @@ class programplanModel extends model $this->dao->insert(TABLE_PROJECT)->data($data) ->autoCheck() ->batchCheck($this->config->programplan->create->requiredFields, 'notempty') - ->checkIF($plan->percent != '', 'percent', 'float') + ->checkIF($plan->percent != '' and $setPercent, 'percent', 'float') ->exec(); if(!dao::isError()) @@ -1084,15 +1088,18 @@ class programplanModel extends model $planChanged = ($oldPlan->name != $plan->name || $oldPlan->milestone != $plan->milestone || $oldPlan->begin != $plan->begin || $oldPlan->end != $plan->end); + $setPercent = isset($this->config->setPercent) and $this->config->setPercent == 1 ? true : false; if($plan->parent > 0) { $plan->attribute = $parentStage->attribute == 'mix' ? $plan->attribute : $parentStage->attribute; $plan->acl = $parentStage->acl; - $parentPercent = $parentStage->percent; - - $childrenTotalPercent = $this->getTotalPercent($parentStage, true); - $childrenTotalPercent = $plan->parent == $oldPlan->parent ? ($childrenTotalPercent - $oldPlan->percent + $plan->percent) : ($childrenTotalPercent + $plan->percent); - if($childrenTotalPercent > 100) return dao::$errors['percent'][] = $this->lang->programplan->error->percentOver; + if($setPercent) + { + $parentPercent = $parentStage->percent; + $childrenTotalPercent = $this->getTotalPercent($parentStage, true); + $childrenTotalPercent = $plan->parent == $oldPlan->parent ? ($childrenTotalPercent - $oldPlan->percent + $plan->percent) : ($childrenTotalPercent + $plan->percent); + if($childrenTotalPercent > 100) return dao::$errors['percent'][] = $this->lang->programplan->error->percentOver; + } /* If child plan has milestone, update parent plan set milestone eq 0 . */ if($plan->milestone and $parentStage->milestone) $this->dao->update(TABLE_PROJECT)->set('milestone')->eq(0)->where('id')->eq($oldPlan->parent)->exec(); @@ -1105,9 +1112,12 @@ class programplanModel extends model /* The workload of the parent plan cannot exceed 100%. */ $oldPlan->parent = $plan->parent; - $totalPercent = $this->getTotalPercent($oldPlan); - $totalPercent = $totalPercent + $plan->percent; - if($totalPercent > 100) return dao::$errors['percent'][] = $this->lang->programplan->error->percentOver; + if($setPercent) + { + $totalPercent = $this->getTotalPercent($oldPlan); + $totalPercent = $totalPercent + $plan->percent; + if($totalPercent > 100) return dao::$errors['percent'][] = $this->lang->programplan->error->percentOver; + } } /* Set planDuration and realDuration. */ diff --git a/module/programplan/view/edit.html.php b/module/programplan/view/edit.html.php index 73ae92b6c7..83e047eeda 100644 --- a/module/programplan/view/edit.html.php +++ b/module/programplan/view/edit.html.php @@ -46,6 +46,7 @@ programplan->PM;?> + setPercent) and $config->setPercent == 1):?> programplan->percent;?> @@ -55,6 +56,7 @@
        + programplan->attribute;?> diff --git a/module/stage/config.php b/module/stage/config.php index f77eb68cd9..1e76c319bd 100644 --- a/module/stage/config.php +++ b/module/stage/config.php @@ -1,5 +1,13 @@ -stage->create = new stdclass(); $config->stage->edit = new stdclass(); -$config->stage->create->requiredFields = 'name,percent,type'; -$config->stage->edit->requiredFields = 'name,percent,type'; +if(isset($config->setPercent) and $config->setPercent == 1) +{ + $config->stage->create->requiredFields = 'name,percent,type'; + $config->stage->edit->requiredFields = 'name,percent,type'; +} +else +{ + $config->stage->create->requiredFields = 'name,type'; + $config->stage->edit->requiredFields = 'name,type'; +} diff --git a/module/stage/model.php b/module/stage/model.php index c475e5e196..5303d6d651 100644 --- a/module/stage/model.php +++ b/module/stage/model.php @@ -27,10 +27,13 @@ class stageModel extends model ->add('createdDate', helper::today()) ->get(); - $totalPercent = $this->getTotalPercent($type); + if(isset($this->config->setPercent) and $this->config->setPercent == 1) + { + $totalPercent = $this->getTotalPercent($type); - if(!is_numeric($stage->percent)) return dao::$errors['message'][] = $this->lang->stage->error->notNum; - if(round($totalPercent + $stage->percent) > 100) return dao::$errors['message'][] = $this->lang->stage->error->percentOver; + if(!is_numeric($stage->percent)) return dao::$errors['message'][] = $this->lang->stage->error->notNum; + if(round($totalPercent + $stage->percent) > 100) return dao::$errors['message'][] = $this->lang->stage->error->percentOver; + } $this->dao->insert(TABLE_STAGE) ->data($stage) @@ -53,9 +56,12 @@ class stageModel extends model { $data = fixer::input('post')->get(); - $totalPercent = $this->getTotalPercent($type); - - if(round($totalPercent + array_sum($data->percent)) > 100) return dao::$errors['message'][] = $this->lang->stage->error->percentOver; + $setPercent = (isset($this->config->setPercent) and $this->config->setPercent == 1) ? true : false; + if($setPercent) + { + $totalPercent = $this->getTotalPercent($type); + if(round($totalPercent + array_sum($data->percent)) > 100) return dao::$errors['message'][] = $this->lang->stage->error->percentOver; + } $this->loadModel('action'); foreach($data->name as $i => $name) @@ -64,7 +70,7 @@ class stageModel extends model $stage = new stdclass(); $stage->name = $name; - $stage->percent = $data->percent[$i]; + if($setPercent) $stage->percent = $data->percent[$i]; $stage->type = $data->type[$i]; $stage->projectType = $type; $stage->createdBy = $this->app->user->account; @@ -100,9 +106,11 @@ class stageModel extends model ->add('editedDate', helper::today()) ->get(); - $totalPercent = $this->getTotalPercent($oldStage->projectType); - - if(round($totalPercent + $stage->percent - $oldStage->percent) > 100) return dao::$errors['message'][] = $this->lang->stage->error->percentOver; + if(isset($this->config->setPercent) and $this->config->setPercent == 1) + { + $totalPercent = $this->getTotalPercent($oldStage->projectType); + if(round($totalPercent + $stage->percent - $oldStage->percent) > 100) return dao::$errors['message'][] = $this->lang->stage->error->percentOver; + } $this->dao->update(TABLE_STAGE) ->data($stage) diff --git a/module/stage/view/batchcreate.html.php b/module/stage/view/batchcreate.html.php index 6184ee3eaf..8043dcf55b 100644 --- a/module/stage/view/batchcreate.html.php +++ b/module/stage/view/batchcreate.html.php @@ -22,7 +22,9 @@ stage->id;?> stage->name;?> + setPercent) and $config->setPercent == 1):?> stage->percent;?> + stage->type;?> @@ -31,7 +33,9 @@ + setPercent) and $config->setPercent == 1):?> + '') + $lang->stage->typeList, '', "class='form-control chosen'");?> diff --git a/module/stage/view/browse.html.php b/module/stage/view/browse.html.php index 32d8a50a9c..e5abf7647f 100644 --- a/module/stage/view/browse.html.php +++ b/module/stage/view/browse.html.php @@ -38,7 +38,9 @@ stage->id);?> stage->name);?> + setPercent) and $config->setPercent == 1):?> stage->percent);?> + stage->type);?> actions;?> @@ -48,7 +50,9 @@ id;?> name;?> + setPercent) and $config->setPercent == 1):?> percent;?> + stage->typeList, $stage->type);?> + setPercent) and $config->setPercent == 1):?> stage->percent;?>
        - % + %
        + stage->type;?> stage->typeList, '', "class='form-control chosen'");?> diff --git a/module/stage/view/edit.html.php b/module/stage/view/edit.html.php index 4a258ee822..f23abace37 100644 --- a/module/stage/view/edit.html.php +++ b/module/stage/view/edit.html.php @@ -25,15 +25,17 @@ + setPercent) and $config->setPercent == 1):?> stage->percent;?>
        percent, "class='form-control'");?> - % + %
        + stage->type;?> stage->typeList, $stage->type, "class='form-control chosen'");?> From 11507ffff2fdca5621713972481c2cdb19ac9b85 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 27 Feb 2023 16:16:04 +0800 Subject: [PATCH 193/349] * fix bug #32277. --- module/admin/lang/menu.php | 4 ++-- module/custom/lang/de.php | 1 + module/custom/lang/en.php | 1 + module/custom/lang/fr.php | 1 + module/custom/lang/zh-cn.php | 1 + module/custom/view/hours.html.php | 2 +- module/group/lang/resource.php | 2 ++ module/holiday/view/browse.html.php | 2 ++ 8 files changed, 11 insertions(+), 3 deletions(-) diff --git a/module/admin/lang/menu.php b/module/admin/lang/menu.php index 18c422a129..a592e16d5a 100644 --- a/module/admin/lang/menu.php +++ b/module/admin/lang/menu.php @@ -84,12 +84,12 @@ $lang->admin->menuList->model['menuOrder']['15'] = 'waterfall'; $lang->admin->menuList->model['menuOrder']['20'] = 'agileplus'; $lang->admin->menuList->model['menuOrder']['25'] = 'waterfallplus'; -$lang->admin->menuList->model['tabMenu']['common']['project'] = array('link' => "{$lang->project->common}|custom|required|module=project", 'alias' => 'set', 'exclude' => 'custom', 'links' => array('custom|set|')); +$lang->admin->menuList->model['tabMenu']['common']['project'] = array('link' => "{$lang->project->common}|custom|required|module=project", 'alias' => 'set', 'exclude' => 'custom', 'links' => array('custom|set|module=project&field=unitList')); $lang->admin->menuList->model['tabMenu']['common']['stage'] = array('link' => "{$lang->stage->type}|stage|settype|", 'subModule' => 'stage', 'links' => array('stage|browse|')); $lang->admin->menuList->model['tabMenu']['common']['build'] = array('link' => "{$lang->build->common}|custom|required|module=build", 'alias' => 'set', 'exclude' => 'custom'); $lang->admin->menuList->model['tabMenu']['common']['flow'] = array('link' => "{$lang->custom->flow}|custom|flow|", 'divider' => true); $lang->admin->menuList->model['tabMenu']['common']['code'] = array('link' => "{$lang->code}|custom|code|"); -$lang->admin->menuList->model['tabMenu']['common']['hours'] = array('link' => "{$lang->workingHour}|custom|hours|", 'subModule' => 'holiday', 'links' => array('holiday|browse|')); +$lang->admin->menuList->model['tabMenu']['common']['hours'] = array('link' => "{$lang->workingHour}|custom|hours|", 'subModule' => 'holiday', 'links' => array('holiday|browse|', 'custom|hours')); $lang->admin->menuList->model['tabMenu']['waterfall']['stage'] = array('link' => "{$lang->stage->list}|stage|browse|", 'subModule' => 'stage', 'exclude' => 'stage-plusbrowse'); $lang->admin->menuList->model['tabMenu']['waterfallplus']['stage'] = array('link' => "{$lang->stage->list}|stage|plusbrowse|", 'subModule' => 'stage', 'exclude' => 'stage-browse'); $lang->admin->menuList->model['tabMenu']['menuOrder']['common']['5'] = 'project'; diff --git a/module/custom/lang/de.php b/module/custom/lang/de.php index b3140f2c89..1ed0bb6dee 100644 --- a/module/custom/lang/de.php +++ b/module/custom/lang/de.php @@ -10,6 +10,7 @@ $lang->custom->key = 'Key'; $lang->custom->value = 'Value'; $lang->custom->working = 'WorkStyle'; $lang->custom->select = 'Select Concept'; +$lang->custom->hours = 'Hours'; $lang->custom->branch = 'Multi Branch'; $lang->custom->owner = 'Owner'; $lang->custom->module = 'Module'; diff --git a/module/custom/lang/en.php b/module/custom/lang/en.php index 8f2e139a8d..171bc035f2 100644 --- a/module/custom/lang/en.php +++ b/module/custom/lang/en.php @@ -10,6 +10,7 @@ $lang->custom->key = 'Key'; $lang->custom->value = 'Value'; $lang->custom->working = 'Mode'; $lang->custom->select = 'Select Concept'; +$lang->custom->hours = 'Hours'; $lang->custom->branch = 'Multi-Branch'; $lang->custom->owner = 'Owner'; $lang->custom->module = 'Module'; diff --git a/module/custom/lang/fr.php b/module/custom/lang/fr.php index 2e43227781..f434865205 100644 --- a/module/custom/lang/fr.php +++ b/module/custom/lang/fr.php @@ -10,6 +10,7 @@ $lang->custom->key = 'Clé'; $lang->custom->value = 'Valeur'; $lang->custom->working = 'Mode'; $lang->custom->select = 'Choix du Concept'; +$lang->custom->hours = 'Hours'; $lang->custom->branch = 'Multi-Branches'; $lang->custom->owner = 'Propriétaire'; $lang->custom->module = 'Module'; diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php index 8ed08ff52c..1ff729cb98 100644 --- a/module/custom/lang/zh-cn.php +++ b/module/custom/lang/zh-cn.php @@ -9,6 +9,7 @@ $lang->custom->restore = '恢复默认'; $lang->custom->key = '键'; $lang->custom->value = '值'; $lang->custom->working = '工作方式'; +$lang->custom->hours = '工时'; $lang->custom->select = '请选择流程:'; $lang->custom->branch = '多分支'; $lang->custom->owner = '所有者'; diff --git a/module/custom/view/hours.html.php b/module/custom/view/hours.html.php index 466398467d..50807ab711 100644 --- a/module/custom/view/hours.html.php +++ b/module/custom/view/hours.html.php @@ -17,7 +17,7 @@
      • diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index d89215cffd..8b3fe28f99 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -1444,6 +1444,7 @@ $lang->resource->custom->setDefaultConcept = 'setDefaultConcept'; $lang->resource->custom->deleteStoryConcept = 'deleteStoryConcept'; $lang->resource->custom->kanban = 'kanban'; $lang->resource->custom->code = 'code'; +$lang->resource->custom->hours = 'hours'; $lang->custom->methodOrder[5] = 'index'; $lang->custom->methodOrder[10] = 'set'; @@ -1461,6 +1462,7 @@ $lang->custom->methodOrder[65] = 'setDefaultConcept'; $lang->custom->methodOrder[70] = 'deleteStoryConcept'; $lang->custom->methodOrder[75] = 'kanban'; $lang->custom->methodOrder[80] = 'code'; +$lang->custom->methodOrder[85] = 'hours'; $lang->resource->datatable = new stdclass(); $lang->resource->datatable->setGlobal = 'setGlobal'; diff --git a/module/holiday/view/browse.html.php b/module/holiday/view/browse.html.php index 0f81948867..8aca520eff 100644 --- a/module/holiday/view/browse.html.php +++ b/module/holiday/view/browse.html.php @@ -15,8 +15,10 @@