diff --git a/framework/control.class.php b/framework/control.class.php index b98973b91f..d7fd0ec2ee 100644 --- a/framework/control.class.php +++ b/framework/control.class.php @@ -185,16 +185,21 @@ class control extends baseControl /** * Print extend fields. * - * @param object $object bug | build | feedback | product | productplan | project | release | story | task | testcase | testsuite | testtask - * @param string $type table | div - * @param string $extras columns=1,mode=value,position=right|right|all + * @param object $object bug | build | feedback | product | productplan | project | release | story | task | testcase | testsuite | testtask + * @param string $type The parent component which fileds displayed in. It should be table or div. + * @param string $extras The extra params. + * columns=2|3|5 Number of the columns merged to display the fields. The default is 1. + * position=left|right The position which the fields displayed in a page. + * inForm=0|1 The fields displayed in a form or not. The default is 1. + * inCell=0|1 The fields displayed in a div with class cell or not. The default is 0. * @access public * @return void */ - public function printExtendFields($object, $type, $extras) + public function printExtendFields($object, $type, $extras = '') { if(!isset($this->config->bizVersion)) return false; - $this->loadModel('flow')->printFields($this->moduleName, $this->methodName, $object, $type, $extras); + + echo $this->loadModel('flow')->printFields($this->moduleName, $this->methodName, $object, $type, $extras); } /** diff --git a/module/bug/view/activate.html.php b/module/bug/view/activate.html.php index d3af8dcb37..55f7eda56e 100644 --- a/module/bug/view/activate.html.php +++ b/module/bug/view/activate.html.php @@ -34,7 +34,7 @@ bug->status;?> - printExtendFields($bug, 'table', 'columns=1');?> + printExtendFields($bug, 'table');?> bug->openedBuild;?> openedBuild, 'size=4 multiple=multiple class="form-control chosen"');?> diff --git a/module/bug/view/assignto.html.php b/module/bug/view/assignto.html.php index 3953004a00..454c943aad 100644 --- a/module/bug/view/assignto.html.php +++ b/module/bug/view/assignto.html.php @@ -38,7 +38,7 @@ js::set('page', 'assignedto'); bug->status;?> status);?> - printExtendFields($bug, 'table', 'columns=1');?> + printExtendFields($bug, 'table');?> bug->mailto;?> mailto), 'class="form-control chosen" multiple');?> diff --git a/module/bug/view/close.html.php b/module/bug/view/close.html.php index 6ceb3f22a4..6d2f80c941 100644 --- a/module/bug/view/close.html.php +++ b/module/bug/view/close.html.php @@ -30,7 +30,7 @@ bug->status;?> - printExtendFields($bug, 'table', 'columns=1');?> + printExtendFields($bug, 'table');?> comment;?> diff --git a/module/bug/view/confirmbug.html.php b/module/bug/view/confirmbug.html.php index e9b31fca17..3d54a18561 100755 --- a/module/bug/view/confirmbug.html.php +++ b/module/bug/view/confirmbug.html.php @@ -50,7 +50,7 @@ js::set('page', 'confirmbug'); status);?> - printExtendFields($bug, 'table', 'columns=1');?> + printExtendFields($bug, 'table');?> bug->mailto;?> mailto), 'class="form-control chosen" multiple');?> diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index 1ab8b9d20e..5d8ec4dc24 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -292,7 +292,7 @@ js::set('flow', $config->global->flow); bug->status;?> - printExtendFields('', 'table', 'columns=1');?> + printExtendFields('', 'table');?> bug->files;?> fetch('file', 'buildform', 'fileCount=1&percent=0.85');?> diff --git a/module/bug/view/edit.html.php b/module/bug/view/edit.html.php index 93e71d744d..a762c9b334 100644 --- a/module/bug/view/edit.html.php +++ b/module/bug/view/edit.html.php @@ -62,7 +62,7 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild); - printExtendFields($bug, 'div', 'position=left&divCell=false');?> + printExtendFields($bug, 'div', 'position=left');?>
files;?>
fetch('file', 'buildform');?>
@@ -297,7 +297,7 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
- printExtendFields($bug, 'div', 'position=right&divCell=false');?> + printExtendFields($bug, 'div', 'position=right');?> diff --git a/module/bug/view/resolve.html.php b/module/bug/view/resolve.html.php index f2c2523579..d7a7b9f6d1 100644 --- a/module/bug/view/resolve.html.php +++ b/module/bug/view/resolve.html.php @@ -77,7 +77,7 @@ js::set('productID' , $bug->product); bug->status;?> - printExtendFields($bug, 'table', 'columns=1');?> + printExtendFields($bug, 'table');?> bug->files;?> fetch('file', 'buildform', 'fileCount=1&percent=0.85');?> diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php index 1794eefb73..4cc4131aca 100644 --- a/module/bug/view/view.html.php +++ b/module/bug/view/view.html.php @@ -58,7 +58,7 @@ fetch('file', 'printFiles', array('files' => $bug->files, 'fieldset' => 'true'));?> createLink('action', 'comment', "objectType=bug&objectID=$bug->id");?> - printExtendFields($bug, 'div', "position=left&divCell=true");?> + printExtendFields($bug, 'div', "position=left&inForm=0&inCell=1");?>
id"; @@ -376,7 +376,7 @@ - printExtendFields($bug, 'div', "position=right&mode=value");?> + printExtendFields($bug, 'div', "position=right&inForm=0&inCell=1");?> diff --git a/module/build/view/view.html.php b/module/build/view/view.html.php index f968eadafd..94be631064 100644 --- a/module/build/view/view.html.php +++ b/module/build/view/view.html.php @@ -335,7 +335,7 @@ tbody tr td:first-child input{display:none;} build->filePath;?> filePath, $build->filePath, '_blank');?> - printExtendFields($build, 'table', "position=all&columns=1");?> + printExtendFields($build, 'table', 'inForm=0');?> global->flow != 'onlyTest'):?> build->desc;?> diff --git a/module/group/css/managepriv.css b/module/group/css/managepriv.css index a7d7b2b229..3360a8146a 100644 --- a/module/group/css/managepriv.css +++ b/module/group/css/managepriv.css @@ -6,3 +6,6 @@ #mainMenu #groupName{line-height:33px; float: left} .checkbox-right{padding-left:0px !important;} + +td.menus {border-right: 0;padding-right: 0;width: 220px !important;} +td.menus + td {border-left: 0;} diff --git a/module/group/view/privbygroup.html.php b/module/group/view/privbygroup.html.php index e4a505a011..f570a79f70 100644 --- a/module/group/view/privbygroup.html.php +++ b/module/group/view/privbygroup.html.php @@ -73,7 +73,7 @@ group->module;?> - group->method;?> + group->method;?> resource as $moduleName => $moduleActions):?> @@ -102,7 +102,13 @@ - + $moduleName->menus)):?> + + $lang->$moduleName->browse), isset($groupPrivs[$moduleName]) ? $groupPrivs[$moduleName] : '');?> + $moduleName->menus, isset($groupPrivs[$moduleName]) ? $groupPrivs[$moduleName] : '');?> + + + $actionLabel):?> @@ -121,7 +127,7 @@ - + @@ -133,3 +139,19 @@ + diff --git a/module/product/view/close.html.php b/module/product/view/close.html.php index b4e12dbe32..e6ec6e5039 100644 --- a/module/product/view/close.html.php +++ b/module/product/view/close.html.php @@ -28,7 +28,7 @@ product->status;?> status);?> - printExtendFields($product, 'table', 'columns=1');?> + printExtendFields($product, 'table');?> comment;?> diff --git a/module/product/view/create.html.php b/module/product/view/create.html.php index b089804aec..62cfba66a0 100644 --- a/module/product/view/create.html.php +++ b/module/product/view/create.html.php @@ -66,7 +66,7 @@ - printExtendFields('', 'table', 'columns=1');?> + printExtendFields('', 'table');?> product->desc;?> diff --git a/module/product/view/edit.html.php b/module/product/view/edit.html.php index 572d8b9935..c01aae8c75 100644 --- a/module/product/view/edit.html.php +++ b/module/product/view/edit.html.php @@ -58,7 +58,7 @@ product->status;?> product->statusList, $product->status, "class='form-control'");?> - printExtendFields($product, 'table', 'columns=1');?> + printExtendFields($product, 'table');?> product->desc;?> desc), "rows='8' class='form-control'");?> diff --git a/module/product/view/view.html.php b/module/product/view/view.html.php index 7f3dba8890..319ec4d2aa 100644 --- a/module/product/view/view.html.php +++ b/module/product/view/view.html.php @@ -75,7 +75,7 @@ - printExtendFields($product, 'div', "position=left&divCell=false");?> + printExtendFields($product, 'div', "position=left&inForm=0");?>
createLink('action', 'comment', "objectType=product&objectID=$product->id");?> @@ -236,7 +236,7 @@
- printExtendFields($product, 'div', "position=right&mode=value");?> + printExtendFields($product, 'div', "position=right&inForm=0&inCell=1");?> diff --git a/module/productplan/view/edit.html.php b/module/productplan/view/edit.html.php index 3a22833ff6..7f408d399b 100644 --- a/module/productplan/view/edit.html.php +++ b/module/productplan/view/edit.html.php @@ -52,7 +52,7 @@ end != '2030-01-01' ? formatTime($plan->end) : '', 'class="form-control form-date"');?> productplan->endList , '', "onclick='computeEndDate(this.value)'");?> - printExtendFields($plan, 'table', 'columns=1');?> + printExtendFields($plan, 'table');?> productplan->desc;?> desc), "rows='10' class='form-control kindeditor' hidefocus='true'");?> diff --git a/module/productplan/view/view.html.php b/module/productplan/view/view.html.php index 8bc2effef1..e6e996e2a6 100644 --- a/module/productplan/view/view.html.php +++ b/module/productplan/view/view.html.php @@ -455,7 +455,7 @@ - printExtendFields($plan, 'table', "position=all&columns=1");?> + printExtendFields($plan, 'table', 'inForm=0');?> productplan->desc;?> desc;?> diff --git a/module/project/view/close.html.php b/module/project/view/close.html.php index 984bd88366..7ef24518a1 100644 --- a/module/project/view/close.html.php +++ b/module/project/view/close.html.php @@ -29,7 +29,7 @@ project->status;?> - printExtendFields($project, 'table', 'columns=1');?> + printExtendFields($project, 'table');?> comment;?> diff --git a/module/project/view/create.html.php b/module/project/view/create.html.php index 0eea960508..fa4d4959d7 100644 --- a/module/project/view/create.html.php +++ b/module/project/view/create.html.php @@ -88,7 +88,7 @@ - printExtendFields('', 'table', 'columns=1');?> + printExtendFields('', 'table');?> global->flow == 'onlyTask') echo "class='hidden'";?>> project->manageProducts;?> diff --git a/module/project/view/edit.html.php b/module/project/view/edit.html.php index feaa6acb5b..6f89eba8ba 100644 --- a/module/project/view/edit.html.php +++ b/module/project/view/edit.html.php @@ -150,7 +150,7 @@ project->desc;?> desc), "rows='6' class='form-control kindeditor' hidefocus='true'");?> - printExtendFields($project, 'table', 'columns=1');?> + printExtendFields($project, 'table');?> project->acl;?> project->aclList, $project->acl, "onclick='setWhite(this.value);'", 'block'));?> diff --git a/module/project/view/suspend.html.php b/module/project/view/suspend.html.php index 89ef1020c8..13a6ab7401 100644 --- a/module/project/view/suspend.html.php +++ b/module/project/view/suspend.html.php @@ -28,7 +28,7 @@ project->status;?> - printExtendFields($project, 'table', 'columns=1');?> + printExtendFields($project, 'table');?> comment;?> diff --git a/module/project/view/view.html.php b/module/project/view/view.html.php index d61c02ba17..44e0b3f98a 100644 --- a/module/project/view/view.html.php +++ b/module/project/view/view.html.php @@ -140,7 +140,7 @@ - printExtendFields($project, 'div', "position=left&divCell=false");?> + printExtendFields($project, 'div', "position=left&inForm=0");?>
createLink('action', 'comment', "objectType=project&objectID=$project->id");?> @@ -295,7 +295,7 @@
- printExtendFields($project, 'div', "position=right&mode=value");?> + printExtendFields($project, 'div', "position=right&inForm=0&inCell=1");?> diff --git a/module/release/view/create.html.php b/module/release/view/create.html.php index 115262cf60..2c134b8375 100644 --- a/module/release/view/create.html.php +++ b/module/release/view/create.html.php @@ -44,7 +44,7 @@ - printExtendFields('', 'table', 'columns=1');?> + printExtendFields('', 'table');?> release->desc;?> diff --git a/module/release/view/edit.html.php b/module/release/view/edit.html.php index d35affc5ed..bf94003bc4 100644 --- a/module/release/view/edit.html.php +++ b/module/release/view/edit.html.php @@ -47,7 +47,7 @@ release->status;?> release->statusList, $release->status, "class='form-control'");?> - printExtendFields($release, 'table', 'columns=1');?> + printExtendFields($release, 'table');?> release->desc;?> desc), "rows=10 class='form-control kindeditor' hidefocus='true'");?> diff --git a/module/release/view/view.html.php b/module/release/view/view.html.php index 0b295c42c9..dc10c7be81 100644 --- a/module/release/view/view.html.php +++ b/module/release/view/view.html.php @@ -330,7 +330,7 @@ release->date;?> date;?> - printExtendFields($release, 'table', "position=all&columns=1");?> + printExtendFields($release, 'table', 'inForm=0');?> release->desc;?> desc;?> diff --git a/module/story/view/activate.html.php b/module/story/view/activate.html.php index aacb0bb91d..c946a90973 100644 --- a/module/story/view/activate.html.php +++ b/module/story/view/activate.html.php @@ -38,7 +38,7 @@ ?> - printExtendFields($story, 'table', 'columns=1');?> + printExtendFields($story, 'table');?> story->comment;?> diff --git a/module/story/view/assignto.html.php b/module/story/view/assignto.html.php index ba8cc09ff1..a523af0712 100644 --- a/module/story/view/assignto.html.php +++ b/module/story/view/assignto.html.php @@ -33,7 +33,7 @@ story->status;?> status);?> - printExtendFields($story, 'table', 'columns=1');?> + printExtendFields($story, 'table');?> comment;?> diff --git a/module/story/view/change.html.php b/module/story/view/change.html.php index a828a4d006..43c0000a9b 100644 --- a/module/story/view/change.html.php +++ b/module/story/view/change.html.php @@ -40,7 +40,7 @@ story->status;?> status);?> - printExtendFields($story, 'table', 'columns=1');?> + printExtendFields($story, 'table');?> story->title;?> title, 'class="form-control"');?> diff --git a/module/story/view/close.html.php b/module/story/view/close.html.php index 872d185444..31a27df0f9 100644 --- a/module/story/view/close.html.php +++ b/module/story/view/close.html.php @@ -40,7 +40,7 @@ story->status;?> - printExtendFields($story, 'table', 'columns=1');?> + printExtendFields($story, 'table');?> story->comment;?> diff --git a/module/story/view/create.html.php b/module/story/view/create.html.php index a630dbaf74..b217129d2b 100644 --- a/module/story/view/create.html.php +++ b/module/story/view/create.html.php @@ -177,7 +177,7 @@ story->status;?> - printExtendFields('', 'table', 'columns=1');?> + printExtendFields('', 'table');?> story->legendAttatch;?> fetch('file', 'buildform');?> diff --git a/module/story/view/edit.html.php b/module/story/view/edit.html.php index 7b29c31993..0a1970af89 100644 --- a/module/story/view/edit.html.php +++ b/module/story/view/edit.html.php @@ -43,7 +43,7 @@
story->verify;?>
verify;?>
- printExtendFields($story, 'div', 'position=left&divCell=false');?> + printExtendFields($story, 'div', 'position=left');?>
story->comment;?>
@@ -200,7 +200,7 @@
- printExtendFields($story, 'div', 'position=right&divCell=false');?> + printExtendFields($story, 'div', 'position=right');?>
story->legendMisc;?>
diff --git a/module/story/view/review.html.php b/module/story/view/review.html.php index fa3703d339..197d5f1fb8 100644 --- a/module/story/view/review.html.php +++ b/module/story/view/review.html.php @@ -68,7 +68,7 @@ var assignedTo = 'lastEditedBy ? print($story->lastEditedBy) : pri story->status;?> status);?> - printExtendFields($story, 'table', 'columns=1');?> + printExtendFields($story, 'table');?> story->reviewedBy;?> user->account, "class='form-control' multiple data-placeholder='{$lang->story->chosen->reviewedBy}'");?> diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php index eb9982657b..d713176357 100644 --- a/module/story/view/view.html.php +++ b/module/story/view/view.html.php @@ -62,7 +62,7 @@ fetch('file', 'printFiles', array('files' => $story->files, 'fieldset' => 'true'));?> createLink('action', 'comment', "objectType=story&objectID=$story->id");?>
- printExtendFields($story, 'div', "position=left&divCell=true");?> + printExtendFields($story, 'div', "position=left&inForm=0&inCell=1");?>
@@ -387,7 +387,7 @@
- printExtendFields($story, 'div', "position=right&mode=value");?> + printExtendFields($story, 'div', "position=right&inForm=0&inCell=1");?> diff --git a/module/task/view/cancel.html.php b/module/task/view/cancel.html.php index d13a720294..ad9ea44b5a 100644 --- a/module/task/view/cancel.html.php +++ b/module/task/view/cancel.html.php @@ -30,7 +30,7 @@ task->status;?> - printExtendFields($task, 'table', 'columns=1');?> + printExtendFields($task, 'table');?> comment;?> diff --git a/module/task/view/close.html.php b/module/task/view/close.html.php index 8031ccfa13..7002c5007c 100644 --- a/module/task/view/close.html.php +++ b/module/task/view/close.html.php @@ -30,7 +30,7 @@ task->status;?> - printExtendFields($task, 'table', 'columns=1');?> + printExtendFields($task, 'table');?> comment;?> diff --git a/module/task/view/create.html.php b/module/task/view/create.html.php index fda31fb51f..483083576b 100644 --- a/module/task/view/create.html.php +++ b/module/task/view/create.html.php @@ -63,7 +63,7 @@ task->status;?> - printExtendFields('', 'table', 'columns=1');?> + printExtendFields('', 'table');?> global->flow != 'onlyTask' and $project->type != 'ops'):?> task->story;?> diff --git a/module/task/view/edit.html.php b/module/task/view/edit.html.php index d3d786e9d2..dddada366d 100644 --- a/module/task/view/edit.html.php +++ b/module/task/view/edit.html.php @@ -69,7 +69,7 @@
comment;?>
- printExtendFields($task, 'div', 'position=left&divCell=false');?> + printExtendFields($task, 'div', 'position=left');?>
files;?>
fetch('file', 'buildform');?>
@@ -215,7 +215,7 @@
- printExtendFields($task, 'div', 'position=right&divCell=false');?> + printExtendFields($task, 'div', 'position=right');?> @@ -274,7 +274,6 @@ - printExtendFields($task, 'div', 'position=left&divCell=false');?> diff --git a/module/task/view/pause.html.php b/module/task/view/pause.html.php index 6f1af85d72..e580f43c86 100644 --- a/module/task/view/pause.html.php +++ b/module/task/view/pause.html.php @@ -38,7 +38,7 @@ task->status;?> - printExtendFields($task, 'table', 'columns=1');?> + printExtendFields($task, 'table');?> comment;?> diff --git a/module/task/view/view.html.php b/module/task/view/view.html.php index 7c2ad104c9..3dc8f82f5d 100644 --- a/module/task/view/view.html.php +++ b/module/task/view/view.html.php @@ -145,7 +145,7 @@ fetch('file', 'printFiles', array('files' => $task->files, 'fieldset' => 'true'));?> createLink('action', 'comment', "objectType=task&objectID=$task->id");?> - printExtendFields($task, 'div', "position=left&divCell=true");?> + printExtendFields($task, 'div', "position=left&inForm=0&inCell=1");?>
@@ -376,7 +376,7 @@
- printExtendFields($task, 'div', "position=right&mode=value");?> + printExtendFields($task, 'div', "position=right&inForm=0&inCell=1");?> diff --git a/module/testcase/view/create.html.php b/module/testcase/view/create.html.php index fd99d6d02d..1971328be4 100644 --- a/module/testcase/view/create.html.php +++ b/module/testcase/view/create.html.php @@ -210,7 +210,7 @@ testcase->status;?> - printExtendFields('', 'table', 'columns=1');?> + printExtendFields('', 'table');?> testcase->files;?> fetch('file', 'buildform');?> diff --git a/module/testcase/view/edit.html.php b/module/testcase/view/edit.html.php index f43d592c4a..943f2db84e 100644 --- a/module/testcase/view/edit.html.php +++ b/module/testcase/view/edit.html.php @@ -114,7 +114,7 @@ - printExtendFields($case, 'div', 'position=left&divCell=false');?> + printExtendFields($case, 'div', 'position=left');?>
testcase->legendComment;?>
@@ -248,7 +248,7 @@
- printExtendFields($case, 'div', 'position=right&divCell=false');?> + printExtendFields($case, 'div', 'position=right');?>
testcase->legendOpenAndEdit;?>
diff --git a/module/testcase/view/review.html.php b/module/testcase/view/review.html.php index 2f037d5cb1..5fe8d599a7 100644 --- a/module/testcase/view/review.html.php +++ b/module/testcase/view/review.html.php @@ -36,7 +36,7 @@ - printExtendFields($case, 'table', 'columns=1');?> + printExtendFields($case, 'table');?> diff --git a/module/testcase/view/view.html.php b/module/testcase/view/view.html.php index d74247c4cb..1b110cbcb9 100644 --- a/module/testcase/view/view.html.php +++ b/module/testcase/view/view.html.php @@ -96,7 +96,7 @@ fetch('file', 'printFiles', array('files' => $case->files, 'fieldset' => 'true'));?> - printExtendFields($case, 'div', "position=left&divCell=true");?> + printExtendFields($case, 'div', "position=left&inForm=0&inCell=1");?>
@@ -327,7 +327,7 @@
- printExtendFields($case, 'div', "position=right&divCell=true");?> + printExtendFields($case, 'div', "position=right&inForm=0&inCell=1");?>
diff --git a/module/testsuite/view/edit.html.php b/module/testsuite/view/edit.html.php index b6688bd2c6..807ea8c7c5 100644 --- a/module/testsuite/view/edit.html.php +++ b/module/testsuite/view/edit.html.php @@ -27,7 +27,7 @@
- printExtendFields($suite, 'table', 'columns=1');?> + printExtendFields($suite, 'table');?> type != 'library'):?> diff --git a/module/testsuite/view/view.html.php b/module/testsuite/view/view.html.php index 7b150a4e8f..ee6da9488a 100644 --- a/module/testsuite/view/view.html.php +++ b/module/testsuite/view/view.html.php @@ -153,7 +153,7 @@ - printExtendFields($suite, 'div', "position=right&divCell=true");?> + printExtendFields($suite, 'div', "position=right&inForm=0&inCell=1");?>
diff --git a/module/testtask/view/activate.html.php b/module/testtask/view/activate.html.php index 958cb7c25a..68f38ff3cf 100644 --- a/module/testtask/view/activate.html.php +++ b/module/testtask/view/activate.html.php @@ -27,7 +27,7 @@ - printExtendFields($testtask, 'table', 'columns=1');?> + printExtendFields($testtask, 'table');?> diff --git a/module/testtask/view/block.html.php b/module/testtask/view/block.html.php index 05301610cf..9d8d88385b 100644 --- a/module/testtask/view/block.html.php +++ b/module/testtask/view/block.html.php @@ -28,7 +28,7 @@ - printExtendFields($testtask, 'table', 'columns=1');?> + printExtendFields($testtask, 'table');?> diff --git a/module/testtask/view/close.html.php b/module/testtask/view/close.html.php index aa42a83333..c789730286 100644 --- a/module/testtask/view/close.html.php +++ b/module/testtask/view/close.html.php @@ -27,7 +27,7 @@ - printExtendFields($testtask, 'table', 'columns=1');?> + printExtendFields($testtask, 'table');?> diff --git a/module/testtask/view/create.html.php b/module/testtask/view/create.html.php index a82c0ede2d..5fa2bc65ac 100644 --- a/module/testtask/view/create.html.php +++ b/module/testtask/view/create.html.php @@ -94,7 +94,7 @@ - printExtendFields('', 'table', 'columns=1');?> + printExtendFields('', 'table');?> - printExtendFields($task, 'table', 'columns=1');?> + printExtendFields($task, 'table');?> - printExtendFields($testtask, 'table', 'columns=1');?> + printExtendFields($testtask, 'table');?> diff --git a/module/testtask/view/view.html.php b/module/testtask/view/view.html.php index ab463683da..1bec08eeec 100644 --- a/module/testtask/view/view.html.php +++ b/module/testtask/view/view.html.php @@ -41,7 +41,7 @@ createLink('action', 'comment', "objectType=testtask&objectID=$task->id");?> - printExtendFields($task, 'div', "position=left&divCell=true");?> + printExtendFields($task, 'div', "position=left&inForm=0&inCell=1");?>
@@ -124,7 +124,7 @@
- printExtendFields($task, 'div', "position=right&mode=value");?> + printExtendFields($task, 'div', "position=right&inForm=0&inCell=1");?> diff --git a/module/todo/model.php b/module/todo/model.php index e85ff7c848..4557694b26 100644 --- a/module/todo/model.php +++ b/module/todo/model.php @@ -512,7 +512,7 @@ class todoModel extends model if(strpos(",{$todo->config->week},", ",{$week},") !== false) { if(empty($lastCycle)) $date = $today; - if($lastCycle->date < $today) $date = $today; + if($lastCycle and $lastCycle->date < $today) $date = $today; } } elseif($todo->config->type == 'month') @@ -521,7 +521,7 @@ class todoModel extends model if(strpos(",{$todo->config->month},", ",{$day},") !== false) { if(empty($lastCycle)) $date = $today; - if($lastCycle->date < $today) $date = $today; + if($lastCycle and $lastCycle->date < $today) $date = $today; } } diff --git a/www/js/zui/min.js b/www/js/zui/min.js index feb03fe823..a936cbb40b 100644 --- a/www/js/zui/min.js +++ b/www/js/zui/min.js @@ -1,5 +1,5 @@ /*! - * ZUI: Zentao template - v1.9.1 - 2019-07-30 + * ZUI: Zentao template - v1.9.1 - 2019-08-12 * http://zui.sexy * GitHub: https://github.com/easysoft/zui.git * Copyright (c) 2019 cnezsoft.com; Licensed MIT @@ -17,7 +17,7 @@ function(t,e,i){"$:nomunge";function n(){o=e[r](function(){s.each(function(){var * 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(a," ")),r.json?JSON.parse(t):t}catch(e){}}function s(e,i){var n=r.raw?e:o(e);return t.isFunction(i)?i(n):n}var a=/\+/g,r=t.cookie=function(o,a,l){if(void 0!==a&&!t.isFunction(a)){if(l=t.extend({},r.defaults,l),"number"==typeof l.expires){var h=l.expires,c=l.expires=new Date;c.setTime(+c+864e5*h)}return document.cookie=[e(o),"=",n(a),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(s,this.page)}},a.prototype.pageRemove=function(t){"undefined"!=typeof this.page[t]&&(this.page[t]=null,this.pageSave())},a.prototype.pageClear=function(){this.page={},this.pageSave()},a.prototype.pageGet=function(t,e){var i=this.page[t];return void 0===e||null!==i&&void 0!==i?i:e},a.prototype.pageSet=function(t,i){e.isPlainObject(t)?e.extend(!0,this.page,t):this.page[this.serialize(t)]=i,this.pageSave()},a.prototype.check=function(){if(!this.enable&&!this.slience)throw new Error("Browser not support localStorage or enable status been set true.");return this.enable},a.prototype.length=function(){return this.check()?i.getLength?i.getLength():i.length:0},a.prototype.removeItem=function(t){return i.removeItem(t),this},a.prototype.remove=function(t){return this.removeItem(t)},a.prototype.getItem=function(t){return i.getItem(t)},a.prototype.get=function(t,e){var i=this.deserialize(this.getItem(t));return"undefined"!=typeof i&&null!==i||"undefined"==typeof e?i:e},a.prototype.key=function(t){return i.key(t)},a.prototype.setItem=function(t,e){return i.setItem(t,e),this},a.prototype.set=function(t,e){return void 0===e?this.remove(t):(this.setItem(t,this.serialize(e)),this)},a.prototype.clear=function(){return i.clear(),this},a.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},a.prototype.getAll=function(){var t={};return this.forEach(function(e,i){t[e]=i}),t},a.prototype.serialize=function(t){return"string"==typeof t?t:JSON.stringify(t)},a.prototype.deserialize=function(t){if("string"==typeof t)try{return JSON.parse(t)}catch(e){return t||void 0}},e.zui({store:new a})}(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 s=o.$.is(n.inputSelector)?o.$:o.$.find(n.inputSelector);if(s.length){var a=function(){o.changeTimer&&(clearTimeout(o.changeTimer),o.changeTimer=null)},r=function(){a();var t=o.getSearch();if(t!==o.lastValue){var e=""===t;s.toggleClass("empty",e),o.$.callComEvent(o,"onSearchChange",[t,e]),o.lastValue=t}};o.$input=s=s.first(),s.on(n.listenEvent,function(t){o.changeTimer=setTimeout(function(){r()},n.changeDelay)}).on("focus",function(t){s.addClass("focus"),o.$.callComEvent(o,"onFocus",[t])}).on("blur",function(t){s.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 s=o.$.callComEvent(o,"onKeyDown",[t]);s===!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),s=o.data(e),a="object"==typeof n&&n;s||o.data(e,s=new i(this,a)),"string"==typeof n&&s[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,s=function(e,i){var s=this;s.$=t(e),s.id=o++,s.options=t.extend({},n,s.$.data(),i),s.init()};s.DEFAULTS=n,s.NAME=i,s.prototype.init=function(){var n,o,s,a,r,l=this,h=l.$,c="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=h,x=t.isFunction(v.move),C=function(t){var e=t.pageX,i=t.pageY;r=!0;var o={left:e-s.x,top:i-s.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:s,pos:o,offset:{x:e-n.x,y:i-n.y},smallOffset:{x:e-a.x,y:i-a.y}}),a.x=e,a.y=i,v.stopPropagation&&t.stopPropagation()},_=function(i){if(t(e).off(p),!r)return void w.removeClass("drag-ready");var o={left:i.pageX-s.x,top:i.pageY-s.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:s,pos:o,offset:{x:i.pageX-n.x,y:i.pageY-n.y},smallOffset:{x:i.pageX-a.x,y:i.pageY-a.y}}),i.preventDefault(),v.stopPropagation&&i.stopPropagation()},k=function(i){var l=t.zui.getMouseButtonCode(v.mouseButton);if(!(l>-1&&i.button!==l)){var h=t(this);if(y&&(w=b?h.closest(y):h),v[c]){var d=v[c]({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},s={x:i.pageX-p.left+o.left,y:i.pageY-p.top+o.top},a=t.extend({},n),r=!1,w.addClass("drag-ready"),i.preventDefault(),v.stopPropagation&&i.stopPropagation(),t(e).on(m,C).on(g,_)}};b?h.on(f,b,k):y?h.on(f,y,k):h.on(f,k)},s.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),a="object"==typeof e&&e;o||n.data(i,o=new s(this,a)),"string"==typeof e&&o[e]()})},t.fn.draggable.Constructor=s}(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"},s=0,a=function(e,i){var n=this;n.id=s++,n.$=t(e),n.options=t.extend({},o,n.$.data(),i),n.init()};a.DEFAULTS=o,a.NAME=n,a.prototype.trigger=function(e,i){return t.zui.callEvent(this.options[e],i,this)},a.prototype.init=function(){var o,s,a,r,l,h,c,d,u,p,f,g,m,v=this,y=v.$,b=v.options,w=b.deviation,x="."+n+"."+v.id,C="mousedown"+x,_="mouseup"+x,k="mousemove"+x,T=b.selector,S=b.handle,D=b.flex,M=b.container,P=b.canMoveHere,F=b.dropToClass,L=y,z=!1,I=M?t(b.container).first():T?y:t("body"),E=function(e){if(z&&(f={left:e.pageX,top:e.pageY},!(i.abs(f.left-d.left)s&&f.top>a&&f.left-1&&i.button!==n)){var f=t(this);T&&(L=S?f.closest(T):f),L.hasClass("drag-shadow")||b.before&&b.before({event:i,element:L})===!1||(z=!0,o=t.isFunction(b.target)?b.target(L,y):I.find(b.target),s=null,a=null,r=!1,l=!0,h=null,c=L.offset(),u=I.offset(),u.top=u.top-I.scrollTop(),u.left=u.left-I.scrollLeft(),d={left:i.pageX,top:i.pageY},g=t.extend({},d),p={left:d.left-c.left,top:d.top-c.top},L.addClass("drag-from"),t(e).on(k,E).on(_,$),m=setTimeout(function(){t(e).on(C,$)},10),i.preventDefault(),b.stopPropagation&&i.stopPropagation())}};S?y.on(C,S,A):T?y.on(C,T,A):y.on(C,A)},a.prototype.destroy=function(){var i="."+n+"."+this.id;this.$.off(i),t(e).off(i),this.$.data(n,null)},a.prototype.reset=function(){this.destroy(),this.init()},t.fn.droppable=function(e){return this.each(function(){var i=t(this),o=i.data(n),s="object"==typeof e&&e;o||i.data(n,o=new a(this,s)),"string"==typeof e&&o[e]()})},t.fn.droppable.Constructor=a}(jQuery,document,Math),+function(t,e){"use strict";function i(e,i,s){return this.each(function(){var a=t(this),r=a.data(n),l=t.extend({},o.DEFAULTS,a.data(),"object"==typeof e&&e);r||a.data(n,r=new o(this,l)),"string"==typeof e?r[e](i,s):l.show&&r.show(i,s)})}var n="zui.modal",o=function(i,o){var s=this;s.options=o,s.$body=t(document.body),s.$element=t(i),s.$backdrop=s.isShown=null,s.scrollbarWidth=0,o.moveable===e&&(s.options.moveable=s.$element.hasClass("modal-moveable")),o.remote&&s.$element.find(".modal-content").load(o.remote,function(){s.$element.trigger("loaded."+n)})};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 s=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.ajustPosition=function(i){var o=this,a=o.options;if(i===e&&(i=a.position),i!==e&&null!==i){t.isFunction(i)&&(i=i(o));var r=o.$element.find(".modal-dialog"),l=t(window).height(),h={maxHeight:"initial",overflow:"visible"},c=r.find(".modal-body").css(h);if(a.scrollInside){var d=a.headerHeight;"number"!=typeof d?d=r.find(".modal-header").height():t.isFunction(d)&&(d=d($header)),h.maxHeight=l-d,c.outerHeight()>h.maxHeight&&(h.overflow="auto")}c.css(h);var u=Math.max(0,(l-r.outerHeight())/2);if("fit"===i?i={top:u>50?Math.floor(2*u/3):u}:"center"===i?i={top:u}:t.isPlainObject(i)||(i={top:i}),r.hasClass("modal-moveable")){var p=null,f=a.rememberPos;f&&(f===!0?p=o.$element.data("modal-pos"):t.zui.store&&(p=t.zui.store.pageGet(n+".rememberPos."+f))),i=t.extend(i,{left:Math.max(0,(t(window).width()-r.outerWidth())/2)},p),"inside"===a.moveable?s(r,i):r.css(i)}else r.css(i)}},o.prototype.setMoveale=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 s=i.rememberPos;s&&(e.$element.data("modal-pos",o.pos),t.zui.store&&s!==!0&&t.zui.store.pageSet(n+".rememberPos."+s,o.pos))},move:"inside"!==i.moveable||function(t){s(o,t)}})},o.prototype.show=function(e,i){var s=this,a=t.Event("show."+n,{relatedTarget:e});s.$element.trigger(a),s.$element.toggleClass("modal-scroll-inside",!!s.options.scrollInside),s.isShown||a.isDefaultPrevented()||(s.isShown=!0,s.options.moveable&&s.setMoveale(),s.checkScrollbar(),s.options.backdrop!==!1&&(s.$body.addClass("modal-open"),s.setScrollbar()),s.escape(),s.$element.on("click.dismiss."+n,'[data-dismiss="modal"]',function(t){s.hide(),t.stopPropagation()}),s.backdrop(function(){var a=t.support.transition&&s.$element.hasClass("fade");s.$element.parent().length||s.$element.appendTo(s.$body),s.$element.show().scrollTop(0),a&&s.$element[0].offsetWidth,s.$element.addClass("in").attr("aria-hidden",!1),s.ajustPosition(i),s.enforceFocus();var r=t.Event("shown."+n,{relatedTarget:e});a?s.$element.find(".modal-dialog").one("bsTransitionEnd",function(){s.$element.trigger("focus").trigger(r)}).emulateTransitionEnd(o.TRANSITION_DURATION):s.$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",t.proxy(i.hideModal,i)).emulateTransitionEnd(o.TRANSITION_DURATION):i.hideModal())},o.prototype.enforceFocus=function(){t(document).off("focusin."+n).on("focusin."+n,t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},o.prototype.escape=function(){this.isShown&&this.options.keyboard?t(document).on("keydown.dismiss."+n,t.proxy(function(i){if(27==i.which){var o=t.Event("escaping."+n),s=this.$element.triggerHandler(o,"esc");if(s!=e&&!s)return;this.hide()}},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,s=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var a=t.support.transition&&s;if(this.$backdrop=t('',n={zh_cn:{errorTip:"不是有效的颜色值"},zh_tw:{errorTip:"不是有效的顏色值"},en:{errorTip:"Not a valid color value"}},o=function(i,n){this.name=e,this.$=t(i),this.getOptions(n),this.init()};o.prototype.init=function(){var e=this,n=e.options,o=e.$,s=o.parent(),a=!1;s.hasClass("colorpicker")?e.$picker=s:(e.$picker=t(n.template||i),a=!0),e.$picker.addClass(n.wrapper).find(".cp-title").toggle(void 0!==n.title).text(n.title),e.$menu=e.$picker.find(".dropdown-menu").toggleClass("pull-right",n.pullMenuRight),e.$btn=e.$picker.find(".btn.dropdown-toggle"),e.$btn.find(".ic").addClass("icon-"+n.icon),n.btnTip&&e.$picker.attr("data-toggle","tooltip").tooltip({title:n.btnTip,placement:n.tooltip,container:"body"}),o.attr("data-provide",null),a&&o.after(e.$picker),e.colors={},t.each(n.colors,function(i,n){if(t.zui.Color.isColor(n)){var o=new t.zui.Color(n);e.colors[o.toCssStr()]=o}}),e.updateColors(),e.$picker.on("click",".cp-tile",function(){e.setValue(t(this).data("color"))});var r=function(){var i=o.val(),s=t.zui.Color.isColor(i);o.parent().toggleClass("has-error",!(s||n.optional&&""===i)),s?e.setValue(i,!0):n.optional&&""===i?o.tooltip("hide"):o.is(":focus")||o.tooltip("show",n.errorTip)};o.is("input:not([type=hidden])")?(n.tooltip&&o.attr("data-toggle","tooltip").tooltip({trigger:"manual",placement:n.tooltip,tipClass:"tooltip-danger",container:"body"}),o.on("keyup paste input change",r)):o.appendTo(e.$picker),r()},o.prototype.addColor=function(e){e instanceof t.zui.Color||(e=new t.zui.Color(e));var i=e.toCssStr(),n=this.options;this.colors[i]||(this.colors[i]=e);var o=t('',{titile:e}).data("color",e).css({color:e.contrast().toCssStr(),background:i,"border-color":e.luma()>.43?"#ccc":"transparent"}).attr("data-color",i);this.$menu.append(t("
  • ").css({width:n.tileSize,height:n.tileSize}).append(o)),n.optional&&this.$menu.find(".cp-tile.empty").parent().detach().appendTo(this.$menu)},o.prototype.updateColors=function(e){var i=(this.$picker,this.$menu.children("li:not(.heading)").remove()),n=this.options,e=e||this.colors,o=this,s=0;if(t.each(e,function(t,e){o.addColor(e),s++}),n.optional){var a=t('
  • ').css({width:n.tileSize,height:n.tileSize});this.$menu.append(a),s++}i.css("width",Math.min(s,n.lineCount)*n.tileSize+6)},o.prototype.setValue=function(e,i){var n=this,o=n.options,s=n.$btn;n.$menu.find(".cp-tile.active").removeClass("active");var a="",r=o.updateBtn;if("auto"===r){var l=s.find(".color-bar");r=!l.length||function(t){l.css("background",t||"")}}if(e){var h=new t.zui.Color(e);a=h.toCssStr().toLowerCase(),r&&(t.isFunction(r)?r(a,s,n):s.css({background:a,color:h.contrast().toCssStr(),borderColor:h.luma()>.43?"#ccc":a})),n.colors[a]||n.addColor(h),i||n.$.val().toLowerCase()===a||n.$.val(a).trigger("change"),n.$menu.find('.cp-tile[data-color="'+a+'"]').addClass("active"),n.$.tooltip("hide"),n.$.trigger("colorchange",h)}else r&&(t.isFunction(r)?r(null,s,n):s.attr("style",null)),i||""===n.$.val()||n.$.val(a).trigger("change"),o.optional&&n.$.tooltip("hide"),n.$menu.find(".cp-tile.empty").addClass("active"),n.$.trigger("colorchange",null);o.updateBorder&&t(o.updateBorder).css("border-color",a),o.updateBackground&&t(o.updateBackground).css("background-color",a),o.updateColor&&t(o.updateColor).css("color",a),o.updateText&&t(o.updateText).text(a)},o.prototype.getOptions=function(e){var i=t.extend({},o.DEFAULTS,this.$.data(),e);"string"==typeof i.colors&&(i.colors=i.colors.split(","));var s=(i.lang||t.zui.clientLang()).toLowerCase();s=n[s]||n.en,i.errorTip||(i.errorTip=s.errorTip),t.fn.tooltip||(i.btnTip=!1),this.options=i},o.DEFAULTS={colors:["#00BCD4","#388E3C","#3280fc","#3F51B5","#9C27B0","#795548","#F57C00","#F44336","#E91E63"],pullMenuRight:!0,wrapper:"btn-wrapper",tileSize:30,lineCount:5,optional:!0,tooltip:"top",icon:"caret-down",updateBtn:"auto"},o.LANG=n,t.fn.colorPicker=function(i){return this.each(function(){var n=t(this),s=n.data(e),a="object"==typeof i&&i;s||n.data(e,s=new o(this,a)),"string"==typeof i&&s[i]()})},t.fn.colorPicker.Constructor=o,t(function(){t('[data-provide="colorpicker"]').colorPicker()})}(jQuery),function(t,e){function i(t){return t===e&&(t=n+=1),o[t%o.length]}var n=0,o=["#00a9fc","#ff5d5d","#fdc137","#00da88","#7ec5ff","#8666b8","#bd7b46","#ff9100","#ff3d00","#f57f17","#00e5ff","#00b0ff","#2979ff","#3d5afe","#651fff","#d500f9","#f50057","#ff1744"];jQuery.fn.tableChart=function(){t(this).each(function(){var e=t(this),n=e.data(),o=n.chart||"pie",s=t(n.target);if(s.length){var a=null;if("pie"===o){n=t.extend({scaleShowLabels:!0,scaleLabel:"<%=label%>: <%=value%>"},n);var r=[],l=e.find("tbody > tr").each(function(e){var n=t(this),o=i();n.attr("data-id",e).find(".chart-color-dot").css("background",o),r.push({label:n.find(".chart-label").text(),value:parseFloat(n.data("value")||n.find(".chart-value").text()),color:o,id:e})});r.length>1?n.scaleLabelPlacement="outside":1===r.length&&(n.scaleLabelPlacement="inside",r.push({label:"",value:r[0].value/2e3,color:"#fff",showLabel:!1})),a=s.pieChart(r,n),s.on("mousemove",function(t){var e=a.getSegmentsAtEvent(t);l.removeClass("active"),e.length&&l.filter('[data-id="'+e[0].id+'"]').addClass("active")})}else if("bar"===o){var h=i(),c=[],d={label:e.find("thead .chart-label").text(),color:h,data:[]},l=e.find("tbody > tr").each(function(e){var i=t(this);c.push(i.find(".chart-label").text()),d.data.push(i.data("value")||parseFloat(i.find(".chart-value").text())),i.find(".chart-color-dot").css("background",h)}),r={labels:c,datasets:[d]};c.length&&(n.barValueSpacing=5),a=s.barChart(r,n)}else if("line"===o){var h=i(),c=[],d={label:e.find("thead .chart-label").text(),color:h,data:[]},l=e.find("tbody > tr").each(function(e){var i=t(this);c.push(i.find(".chart-label").text()),d.data.push(parseInt(i.find(".chart-value").text())),i.find(".chart-color-dot").css("background",h)}),r={labels:c,datasets:[d]};c.length&&(n.barValueSpacing=5),a=s.lineChart(r,n)}null!==a&&e.data("zui.chart",a)}})},t(".table-chart").tableChart();var s=function(i,n){var o=t(i);if(!o.data("initProgressPie")){o.data("initProgressPie",1);var s=o.is("canvas")?o:o.find("canvas"),a=t.extend({value:0,color:t.getThemeColor("primary")||"#006af1",backColor:t.getThemeColor("pale")||"#E9F2FB",doughnut:!0,doughnutSize:85,width:20,height:20,showTip:!1,name:"",tipTemplate:"<%=value%>%",animation:"auto",realValue:parseFloat(o.find(".progress-value").text())},n,o.data()),r=s.length;r||(s=t("").appendTo(o)),s.attr("width")!==e?a.width=s.attr("width"):s.attr("width",a.width),s.attr("height")!==e?a.height=s.attr("height"):s.attr("height",a.height),r||8!=t.zui.browser.ie||G_vmlCanvasManager.initElement(s[0]),"auto"===a.animation&&(a.animation=a.width>30),a.value=Math.max(0,Math.min(100,a.value)),o.addClass("progress-pie-"+a.width);var l=[{value:a.value,label:a.name,color:a.color,circleBeginEnd:!0},{value:100-a.value,label:"",color:a.backColor}];s[a.doughnut?"doughnutChart":"pieChart"](l,t.extend({segmentShowStroke:!1,animation:a.animation,showTooltips:a.showTip,tooltipTemplate:a.tipTemplate,percentageInnerCutout:a.doughnutSize,reverseDrawOrder:!0,animationEasing:"easeInOutQuart",onAnimationProgress:a.realValue?function(t){o.find(".progress-value").text(Math.floor(a.realValue*t))}:e,onAnimationComplete:a.realValue?function(t){o.find(".progress-value").text(a.realValue)}:e},a.chartOptions))}};jQuery.fn.progressPie=function(e){t(this).each(function(){var i=t(this);if(!i.closest(".hidden").length){var n=i.closest(".tab-pane");n.length&&!n.hasClass("active")?t('[data-toggle="tab"][data-target="#'+n.attr("id")+'"]').one("shown.zui.tab",function(){s(i,e)}):s(this,e)}})},t(function(){t(".table-chart").tableChart();var e=t(".progress-pie");e.length>100?setTimeout(function(){e.progressPie()},1e3):e.progressPie()})}(jQuery,void 0),function(t){jQuery.fn.sparkline=function(e){t(this).each(function(){var i=t(this),n=t.extend({values:i.attr("values"),width:i.width()-4,height:i.height()-4},i.data(),e),o=n.height,s=[],a=n.width,r=n.values.split(","),l=0;for(var h in r){var c=parseFloat(r[h]);NaN!=c&&(s.push(c),l=Math.max(c,l))}var d=(Math.min(l,30),Math.min(a,Math.max(10,s.length*a/30))),u=i.children("canvas");u.length||(i.append(''),u=i.children("canvas")),u.attr("width",d).attr("height",o);var p={labels:s,datasets:[{fillColor:t.getThemeColor("pale")||"rgba(0,0,255,0.05)",strokeColor:t.getThemeColor("primary")||"#0054EC",pointColor:t.getThemeColor("secondary")||"rgba(255,136,0,1)",pointStrokeColor:"#fff",data:s}]},f={animation:!0,scaleOverride:!0,scaleStepWidth:Math.ceil(l/10),scaleSteps:10,scaleStartValue:0,showScale:!1,showTooltips:!1,pointDot:!1,scaleShowGridLines:!1,datasetStrokeWidth:1},g=t(u).lineChart(p,f);i.data("sparklineChart",g)})},t(function(){t(".sparkline").sparkline()})}(jQuery),function(t){t.fn.fixedDate=function(){return t(this).each(function(){var e=t(this).attr("autocomplete","off");"0000-00-00"==e.val()&&e.focus(function(){"0000-00-00"==e.val()&&e.val("").datetimepicker("update")}).blur(function(){""==e.val()&&e.val("0000-00-00")})})},t(function(){var e={language:t("html").attr("lang"),weekStart:1,todayBtn:1,autoclose:1,todayHighlight:1,startView:2,forceParse:0,showMeridian:1,format:"yyyy-mm-dd hh:ii",startDate:"1970-1-1"},i=t.extend({},e,{minView:2,format:"yyyy-mm-dd"}),n=t.extend({},e,{eleClass:"only-pick-time",startView:1,minView:0,maxView:1,format:"hh:ii"});t(".datepicker-wrapper").click(function(){t(this).find(".form-date, .form-datetime, .form-time").datetimepicker("show").focus()}),window.datepickerOptions=e,t.fn.datepicker=function(e){return this.datetimepicker(t.extend({},i,e))},t.fn.timepicker=function(e){return this.datetimepicker(t.extend({},n,e))},t.fn.datepickerAll=function(){return this.find(".form-datetime").fixedDate().datetimepicker(e),this.find(".form-date").fixedDate().datepicker(),this.find(".form-time").fixedDate().timepicker(),this},t("body").datepickerAll()})}(jQuery),function(t){var e=function(e,i){i=t.extend({idStart:0,idEnd:9,chosen:!0,datetimepicker:!0,colorPicker:!0,hotkeys:!0},i,e.data());var n=e.find(".template");!n.length&&i.template&&(n=t(i.template));var o=0,s=0,a=function(t){t.is("select.chosen")?t.next(".chosen-container").find("input").focus():t.focus()},r=function(t){var i=e.find("[data-ctrl-index]:focus,.chosen-container-active").first();if(i.length){if(i.is(".chosen-container-active")){if(i.hasClass("chosen-with-drop")&&("down"===t||"up"===t))return;i=i.prev("select.chosen")}var n=i.data("ctrlIndex"),r=i.closest("tr").data("row");"down"===t?r0?r-=1:r=s-1:"left"===t?n>0?n-=1:n=o-1:"right"===t&&(n").html(a);return r.attr("data-row",e).addClass(n.attr("class")).removeClass("template"),i.rowCreator&&i.rowCreator(r,e,i),o?o.after(r):h.append(r),c(r),r};t.extend(l,{createRow:u,template:d});for(var p=i.idStart;p<=i.idEnd;++p)u(p)}else c(e);e.on("click",".btn-copy",function(){var e=t(this),i=t(e.data("copyFrom")).val(),n=t(e.data("copyTo")).val(i).addClass("highlight");setTimeout(function(){n.removeClass("highlight")},2e3)}),i.hotkeys&&t(document).on("keydown",function(t){var e={"Ctrl+#37":"left","Ctrl+#39":"right","#38":"up","#40":"down","Ctrl+#38":"up","Ctrl+#40":"down"},i=[];t.ctrlKey&&i.push("Ctrl"),i.push("#"+t.keyCode);var n=e[i.join("+")];n&&(r(n),t.ctrlKey&&(t.stopPropagation(),t.preventDefault()))}),e.data("zui.batchActionForm",l)};t.fn.batchActionForm=function(i){return this.each(function(){e(t(this),i)})}}(jQuery),function(t,e){"use strict";var i="zui.table",n={zh_cn:{selectedItems:"已选择 {0} 项",attrTotal:"{0}总计 {1}"},zh_tw:{selectedItems:"已选择 {0} 项",attrTotal:"{0}总计 {1}"},en:{selectedItems:"Seleted {0} items",attrTotal:"{0} total {1}"}},o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),s=function(e,o){var a=this;a.name=i;var r=a.$=t(e);o=a.options=t.extend({},s.DEFAULTS,this.$.data(),o);var l=o.lang||"zh_cn";a.lang=t.isPlainObject(l)?t.extend(!0,{},n.en,n[l.lang||t.zui.clientLang()],l):n[l]||n.en,r.attr("id")||(r.attr("id","table-"+t.zui.uuid()),o.hot&&console.warn("ZUI: table hot replace id not defined, the element id attribute should be set.")),r.attr("data-ride")||r.attr("data-ride","table"),a.getTable().find("thead>tr>th").each(function(){var e=t(this);if(!e.attr("title")){var i=t.trim(e.find("a:first").text()||e.text()||"");i.length&&e.attr("title",i)}}),o.checkable&&(r.on("click",".check-all",function(){a.checkAll(!t(this).hasClass("checked"))}).on("click","tbody>tr",function(e){t(e.target).closest('.btn,a,.not-check,.form-control,input[type="text"],.chosen-container').length||a.checkRow(t(this))}).on("click",'tbody input[type="checkbox"],tbody label[for]',function(e){e.stopPropagation();var i=t(this);i.is("label")&&(i=i.closest(".checkbox-primary").find('input[type="checkbox"]')),a.checkRow(i.closest("tr"),i.is(":checked"))}),o.selectable&&r.selectable(t.extend({},{selector:a.isDataTable?".fixed-left tbody>tr":"tbody>tr",selectClass:"",trigger:".c-id",clickBehavior:"multi",listenClick:!1,select:function(e){a.checkRow(e.target,!0),t.cookie("ajax_dragSelected")||(t.cookie("ajax_dragSelected","on",{expires:config.cookieLife,path:config.webRoot}),t.ajaxSendScore("dragSelected"))},unselect:function(t){a.checkRow(t.target,!1)},rangeStyle:{border:"1px solid #006af1",backgroundColor:"rgba(50,128,252,0.2)",borderRadius:"2px"}},t.isPlainObject(o.selectable)?o.selectable:null)));var h=a.$form=r.is("form")?r:r.find("form");h.length&&(o.ajaxForm?h.ajaxForm(t.isPlainObject(o.ajaxForm)?o.ajaxForm:null):h.on("click","[data-form-action]",function(){h.attr("action",t(this).data("formAction")).submit()})),(o.fixFooter||o.fixHeader)&&(a.pageFooterHeight=t("#footer").outerHeight(),a.updateFixUI(),t(window).on("scroll resize",function(){a.updateFixUI()}).on("sidebar.toggle",function(){setTimeout(function(){a.updateFixUI()},200)})),o.group&&(r.on("click",".group-toggle",function(){a.toggleRowGroup(t(this).closest("tr").data("id"))}),t(document).on("click",".group-collapse-all",function(){a.toggleGroups(!1)}).on("click",".group-expand-all",function(){a.toggleGroups(!0)})),a.defaultStatistic=r.find(".table-statistic").html(),a.updateStatistic(),a.initModals(),a.checkItems={},a.updateCheckUI()};s.prototype.reload=function(e){var i=this,n=i.options,o=n.replaceId;if(!o)return e&&e();"self"===o&&(o=i.$.attr("id"));var s=t("
    ");i.$.addClass("load-indicator loading"),s.load(window.location.href+" #"+o,function(){i.$.empty().html(s.children().html()).removeClass("load-indicator loading"),i.$.trigger("beforeTableReload"),i.updateStatistic(),i.initModals(),i.$.datepickerAll();var o=i.$.find("tbody>tr"),a=!1;t.each(i.checkItems,function(t,e){e&&(i.checkRow(o.filter('[data-id="'+t+'"]'),!0,!0),a=!0)}),a&&i.updateCheckUI(),i.$.trigger("tableReload");var r=t("#mainMenu>.btn-toolbar>.btn-active-text>.label");r.length&&r.text(i.getTable().find("tbody:first>tr:not(.table-children)").length),i.$.find('[data-ride="pager"]').pager(),e&&e(),n.afterReload&&n.afterReload()})},s.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)}},s.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=t.find("div.datatable")),e},s.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)})},s.prototype.toggleRowGroup=function(i,n){var o=this.$.find('tbody>tr[data-id="'+i+'"]'),s=o.filter(".group-summary"),a=n===e?!s.hasClass("hidden"):!!n;o.not(".group-summary").toggleClass("hidden",!a),s.toggleClass("hidden",a),t("body").toggleClass("table-group-collapsed",!this.$.find("tbody>tr.group-summary.hidden").length)},s.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 s=!1;i.getTable().find("thead th").each(function(e){var i=t(this),n=i.data("statistic");n&&(s=!0,o[e]={format:n,name:i.text()})}),i.statisticCols=!!s&&o}var a=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&&a++,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(a)r.push(i.lang.selectedItems.format(a));else if(i.defaultStatistic)return void n.html(i.defaultStatistic);o&&t.each(o,function(t){var e=o[t],n=e[a?"checkedTotal":"total"];e.format&&(n=e.format.format(n)),r.push(i.lang.attrTotal.format(e.name,n))}),n.html(r.join(", "))}},s.prototype.updateFixUI=function(e){var i=this,n=(new Date).getTime();if(!e&&(i.lastUpdateCall&&clearTimeout(i.lastUpdateCall),!i.lastUpdateTime||n-i.lastUpdateTime<100))return void(i.lastUpdateCall=setTimeout(function(){i.updateFixUI(!0)},30));if(i.lastUpdateTime=n,i.lastUpdateCall&&(clearTimeout(i.lastUpdateCall),i.lastUpdateCall=null),o){var s=i.getTable();if(s.parent().is(".table-responsive")){var a=s.find("thead"),r=0;a.find("th").each(function(){r+=t(this).outerWidth()}),s.css("min-width",r)}}i.options.fixHeader&&!i.isDataTable&&i.fixHeader(),i.options.fixFooter&&i.fixFooter()},s.prototype.fixHeader=function(){var e=this,i=e.getTable(),n=i.find("thead"),o=n[0].getBoundingClientRect(),s=e.options.fixFooter,a=t.isFunction(s)?s(o,n):o.top<("number"==typeof s?s:-5),r=e.$.find(".fix-table-copy-wrapper"),l=i.parent(),h=l.is(".table-responsive");if(a){if(r.length||(r=t('
    ').append(t('
    testcase->status;?> status);?>
    testcase->reviewedByAB;?> user->account, "class='form-control chosen' multiple");?> testsuite->desc;?> desc), "rows=10 class='form-control'");?>
    testsuite->author;?> testtask->status;?>
    comment;?> testtask->status;?>
    comment;?> testtask->status;?>
    comment;?>
    diff --git a/module/testtask/view/edit.html.php b/module/testtask/view/edit.html.php index d920c5bc30..c93241f3fd 100644 --- a/module/testtask/view/edit.html.php +++ b/module/testtask/view/edit.html.php @@ -83,7 +83,7 @@
    diff --git a/module/testtask/view/start.html.php b/module/testtask/view/start.html.php index f43b5dc55f..fe9cf19be8 100644 --- a/module/testtask/view/start.html.php +++ b/module/testtask/view/start.html.php @@ -29,7 +29,7 @@ testtask->status;?>
    comment;?>
    ').addClass(i.attr("class")).append(n.clone())).insertAfter(i)),h){var c=l[0].getBoundingClientRect();r.css({left:c.left,width:l.width()}),r.find(".fixed-header-copy").css({left:o.left-c.left,position:"relative",minWidth:i.width()}),l.data("fixHeaderScroll")||l.data("fixHeaderScroll",1).on("scroll",function(){e.fixHeader()})}else r.css({left:o.left,width:o.width});var d=r.find("th");n.find("th").each(function(e){d.eq(e).css("width",t(this).outerWidth())})}else r.remove()},s.prototype.fixFooter=function(){var e,i=this,n=i.getTable(),o=i.$.find(".table-footer");if(i.isDataTable)e=n[0].getBoundingClientRect();else{var s=n.find("tbody");if(!s.length)return;e=s[0].getBoundingClientRect(),e=s[0].getBoundingClientRect()}var a=i.options.fixFooter;o.toggleClass("fixed-footer",!!r);var r=t.isFunction(a)?a(e,o):e.bottom>window.innerHeight-50-("number"==typeof a?a:i.pageFooterHeight||5);o.toggleClass("fixed-footer",!!r),n.toggleClass("with-footer-fixed",!!r),n.trigger("fixFooter",r);var l=t("body"),h=l.hasClass("body-modal");if(r){var c=n.parent(),d=c.is(".table-responsive");o.css({bottom:i.pageFooterHeight||0,left:d?c[0].getBoundingClientRect().left:e.left,width:d?c.width():e.width}),h&&l.css("padding-bottom",40)}else o.css({width:"",left:0,bottom:0}),h&&l.css("padding-bottom",0)},s.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()},s.prototype.checkRow=function(t,i,n){var o=this;o.isDataTable&&!t.is(".datatable-row-left")&&(t=o.getTable().find('.datatable-row-left[data-index="'+t.data("index")+'"]'));var s=t.find('input[type="checkbox"]');s.length&&(i===e&&(i=!s.is(":checked")),o.isDataTable?o.getTable().find('.datatable-row[data-index="'+t.data("index")+'"]').toggleClass("checked",i):t.toggleClass("checked",i),this.checkItems[t.data("id")]=i,s.prop("checked",i).trigger("change"),n||o.updateCheckUI())},s.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,s=null,a=0,r=!1,l=n.length;n.each(function(n){var h=t(this),c=h.find('input[type="checkbox"]');r=c.is(":checked");var d=e.isDataTable?i.find('.datatable-row[data-index="'+h.data("index")+'"]'):h;d.toggleClass("checked",r),d.toggleClass("row-check-begin",r&&!o),s&&s.toggleClass("row-check-end",!r&&o),r&&(a+=1),s=d,o=r,l===n+1&&d.toggleClass("row-check-end",r)}),e.$.toggleClass("has-row-checked",a>0).find(".check-all").toggleClass("checked",!(!l||a!==l)),e.updateStatistic(),e.options.onCheckChange&&e.options.onCheckChange()},s.DEFAULTS={checkable:!0,ajaxForm:!1,selectable:!0,fixHeader:!0,fixFooter:!0,iframeWidth:900,replaceId:"self",hot:!1,iframeModalTrigger:".iframe"},t.fn.table=function(e){return this.each(function(){var n=t(this),o=n.data(i),a="object"==typeof e&&e;o||n.data(i,o=new s(this,a)),"string"==typeof e&&o[e]()})},s.NAME=i,t.fn.table.Constructor=s,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){e===!1?t("form").enableForm(e,i,n):t("form.form-disabled").enableForm(!0,i,n)};var s=function(e,i,n){"string"==typeof i&&(n=i,i=null),n=n||"show",t.zui.messager?t.zui.messager[n](e,i):alert(e)};t.ajaxForm=function(a,r){var l=t(a);if(l.length>1)return l.each(function(){t.ajaxForm(this,r)});t.isFunction(r)&&(r={complete:r}),r=t.extend({},n,l.data(),r);var h=r.beforeSubmit,c=r.error,d=r.success,u=r.finish;delete r.finish,delete r.success,delete r.onError,delete r.beforeSubmit,r=t.extend({beforeSubmit:function(n,s,a){if(l.enableForm(!1),(h&&h(n,s,a))!==!1){var r={},c=s.find('[type="file"]');r.fileapi=c.length&&c[0].files!==i,r.formdata=e.FormData!==i;var d=r.fileapi&&s.find('input[type="file"]:enabled').filter(function(){return""!==t(this).val()}),u=d.length,p="multipart/form-data",f=s.attr("enctype")==p||s.attr("encoding")==p,g=r.fileapi&&r.formdata,m=u&&!g||f&&!r.formdata;m&&(""==o&&(o=a.url), -a.url!=o&&(a.url=o),a.url=a.url.indexOf("&")>=0?a.url+"&HTTP_X_REQUESTED_WITH=XMLHttpRequest":a.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(a){}if(null===i||"object"!=typeof i)return i?alert(i):s("No response.","danger");var h=r.responser?t(r.responser):l.find(".form-responser");h.length||(h=t("#responser"));var c=i.message,p=function(){var n=i.callback;if(n){var o=n.indexOf("("),s=(o>0?n.substr(0,o):n).split("."),a=e,r=s[0];s.length>1&&(r=s[1],"top"===s[0]?a=e.top:"parent"===s[0]&&(a=e.parent));var h=a[r];if(t.isFunction(h)){var c=[];return o>0&&")"==n[n.length-1]&&(c=t.parseJSON("["+n.substring(o+1,n.length-1)+"]")),c.push(i),h.apply(l,c)}}};if("success"===i.result){if(l.enableForm(!0,1),c){var f=l.find('[type="submit"]'),g=!1;f.length&&(f.popover({container:"body",trigger:"manual",content:c,tipClass:"popover-in-modal popover-success popover-form-result",placement:i.placement||r.popoverPlacement||"right"}).popover("show"),setTimeout(function(){f.popover("destroy")},r.popoverTime||2e3),g=!0),h.length&&(h.html(''+c+"").show().delay(3e3).fadeOut(100),g=!0),g||s(c,"success")}if(u)return u(i,!0,l);if((r.closeModal||i.closeModal)&&setTimeout(t.zui.closeModal,r.closeModalTime||2e3),p()===!1)return;var m=r.locate||i.locate;if(m)if("loadInModal"==m){var v=t(".modal");setTimeout(function(){v.load(v.attr("ref"),function(){t(this).find(".modal-dialog").css("width",t(this).data("width")),t.zui.ajustModalPosition()})},1e3)}else if("parent"===m||"top"===m)e[m]&&setTimeout(function(){e[m].location.reload()},1200);else{var y="reload"==m?e.location.href:m;setTimeout(function(){e.location.href=y},1200)}var b=r.ajaxReload||i.ajaxReload;if(b){var w=t(b);w.length&&w.load(e.location.href+" "+b,function(){w.find('[data-toggle="modal"]').modalTrigger()})}}else{if(l.enableForm(),"string"==typeof c)h.length?h.html(''+c+"").show().delay(3e3).fadeOut(100):s(c,"danger");else if("object"==typeof c){var x=!1,C=[];t.each(c,function(e,i){var n=t.isArray(i)?i.join(";"):i,o=t("#"+e);if(!o.length)return void C.push(n);var s=e+"Label",a=t("#"+s);if(!a.length){var r=o.closest(".input-group").length,l=o.closest("td").length;a=t('
    ').appendTo(l?o.closest("td"):r?o.closest(".input-group").parent():o.parent())}a.empty().append(n),o.addClass("has-error");var h=function(){var e=t("#"+s);if(e.length)return e.remove(),o.removeClass("has-error"),!0};o.on("change input mousedown",h);var c=t("#"+e+"_chosen");c.length&&c.find(".chosen-single,.chosen-choices").addClass("has-error").on("mousedown",function(){h()===!0&&t(this).removeClass("has-error")}),x||(o.focus(),x=!0)}),C.length&&s(C.join(";"),"danger")}if(u)return u(i,!1,l);if(p()===!1)return}}},error:function(t,i,n){if((c&&c(t,i,n,l))!==!1){l.enableForm();var o="timeout"==i||"error"==i?e.lang?e.lang.timeout:i:t.responseText+i+n;s(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.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("#hiddenwin"),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(a)),i.$menu.append(a),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].scrollIntoView({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 s=n.getItems().removeClass("active");if(o)s.removeClass("hidden");else{var a=t.trim(e).split(" ");s.each(function(){var e=t(this),n=e.text()+" "+(e.data("key")||e.data("filter"));e.toggleClass("hidden",!i(a,n))})}n.scrollTo(s.not(".hidden").first().addClass("active"))},n.DEFAULTS={selector:".list-group a:not(.not-list-item)",searchBox:".search-box",onSelectItem:null},t.fn.searchList=function(i){return this.each(function(){var o=t(this),s=o.data(e),a="object"==typeof i&&i;s||o.data(e,s=new n(this,a)),"string"==typeof i&&s[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 s=this;s.name=e,s.$=t(n),o=s.options=t.extend({},i.DEFAULTS,this.$.data(),o),s.$.hide(),s.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 s=e.$.val();e.hasEmptyValue=!1,e.$.children("option").each(function(){var e=t(this),o={label:e.text(),value:e.val()},a=""===o.value||"0"===o.value,r=t(i.labelTemplate||'');i.labelClass&&!a&&r.addClass(i.labelClass),i.labelCreator?r=i.labelCreator(r):(r.data("option",o).attr("data-value",o.value),a&&!o.label?r.addClass("empty").append(''):r.text(o.label).toggleClass("active",s===o.value)),n.append(r)})},i.DEFAULTS={},t.fn.labelSelector=function(n){return this.each(function(){var o=t(this),s=o.data(e),a="object"==typeof n&&n;s||o.data(e,s=new i(this,a)),"string"==typeof n&&s[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=ta.fileMaxSize&&(h.val(""),(window.bootbox||window).alert(a.fileSizeError.format(n(a.fileMaxSize)))),r.update()}),r.update()};s.prototype.getFile=function(){var t=this.$input.prop("files");return t&&t[0]},s.prototype.update=function(){var t=this,e=t.$,i=t.getFile(),o=!i;e.toggleClass("normal",!o).toggleClass("empty",o),i?(t.oldName=i.name,e.find(".file-title").text(i.name).attr("title",i.name),e.find(".file-size").text(n(i.size)),e.find(".file-editbox").val(i.name).attr("size",i.name.length),t.options.onSelect&&t.options.onSelect(i,t)):e.find(".file-editbox").val("")},s.DEFAULTS={fileMaxSize:0,fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInput=function(i){return this.each(function(){var n=t(this),o=n.data(e),a="object"==typeof i&&i;o||n.data(e,o=new s(this,a)),"string"==typeof i&&o[i]()})},s.NAME=e,t.fn.fileInput.Constructor=s,t(function(){t('[data-provide="fileInput"]').fileInput()});var a="zui.fileInputList",r=function(e,i){var n=this;n.name=a;var o=n.$=t(e);i=n.options=t.extend({},r.DEFAULTS,this.$.data(),i),n.$template=o.find(".file-input").detach(),n.add()};r.prototype.add=function(){var t=this,e=t.options,i=t.$template.clone();"before"===e.appendWay?t.$.prepend(i):t.$.append(i),i.fileInput({fileMaxSize:e.eachFileMaxSize,fileSizeError:e.fileSizeError,onDelete:function(e){e.$.remove(),t.options.onDelete&&t.options.onDelete(e,t)},onSelect:function(e,i){t.add(),t.options.onSelect&&t.options.onSelect(e,i,t)}})},r.DEFAULTS={fileMaxSize:0,eachFileMaxSize:0,appendWay:"after",fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInputList=function(e){return this.each(function(){var i=t(this),n=i.data(a),o="object"==typeof e&&e;n||i.data(a,n=new r(this,o)),"string"==typeof e&&n[e]()})},r.NAME=a,t.fn.fileInputList.Constructor=r,t(function(){t('[data-provide="fileInputList"]').fileInputList()})}(jQuery),function(t){window.config||(window.config={}),t.createLink=window.createLink=function(t,e,n,o,s){if(o||(o=config.defaultView),s||(s=!1),n)for(n=n.split("&"),i=0;i'+d+"")}}t.val()||(time=e(s.format("hh:mm")),time=time-time%10+10,t.val(n(time)))};t.fn.timeSpanControl=function(i){return this.each(function(){var a=t(this),r=t.extend({},i,a.data()),l=a.find('[name="begin"],.control-time-begin'),h=a.find('[name="end"],.control-time-end'),c=function(){var t=l.val();if(a.find(".hide-empty-begin").toggleClass("hide",!t),t){var i=n(e(t)+30);h.find('option[value="'+i+'"]').length&&h.val(i),r.onChange&&r.onChange(h,i)}};if(a.data("timeSpanControlInit")){if(r.begin){var d=o(r.begin).format("hh:mm");l.find('option[value="'+d+'"]').length&&l.val(d),r.onChange&&r.onChange(l,d)}if(r.end){var u=o(r.end).format("hh:mm");h.find('option[value="'+u+'"]').length&&h.val(u),r.onChange&&r.onChange(h,u)}}else l.on("change",c),s(l,r.begin),s(h,r.end),a.data("timeSpanControlInit",!0);r.end||c()})},t.timeSpanControl={convertTimeToNum:e,convertNumToTime:n,initTimeSelect:s,createTime:o};var a=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 s=o.find('a[data-value="'+e+'"]'),a=s.text();s.parent().addClass("selected"),t("#searchTypeName").text(a),i||t("#searchInput").focus()};t.gotoObject=function(e,i){e||(e=t("#searchType").val()),i||(i=t("#searchInput").val()),i&&e&&(window.location.href=t.createLink(e,"testsuite"===e?"library":"view","id="+i))},t(function(){a(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(){location.href=removeAnchor(location.href)},t.selectLang=window.selectLang=function(e){t.cookie("lang",e,{expires:config.cookieLife,path:config.webRoot}),t.ajaxSendScore("selectLang"),t.refreshPage()},t.selectTheme=window.selectTheme=function(e){t.cookie("theme",e,{expires:config.cookieLife,path:config.webRoot}),t.ajaxSendScore("selectTheme"),t.refreshPage()},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,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;var i="down",n=this.container.find(".chosen-drop"),o=this.container.position(),s=n.outerHeight();return o.top>=s&&o.top+s{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.zui.Messager.DEFAULTS.cssClass="messagger-zt",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);i=t.extend({},n.data(),i);var o=n.find(".histories-list"),s=!0,a=!1;n.on("click",".btn-reverse",function(){o.children("li").reverseOrder(),s=!s,t(this).find(".icon").toggleClass("icon-arrow-up",s).toggleClass("icon-arrow-down",!s);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");a=!a,e.toggleClass("icon-plus",!a).toggleClass("icon-minus",a),o.children("li").toggleClass("show-changes",a)}).on("click",".btn-expand",function(){t(this).closest("li").toggleClass("show-changes")}).on("click",".btn-strip",function(){var e=t(this),n=e.find(".icon"),o=n.hasClass("icon-code");n.toggleClass("icon-code",!o).toggleClass("icon-text",o),e.attr("title",o?i.original:i.textdiff),e.closest("li").toggleClass("show-original",o)}),o.find(".btn-strip").attr("title",i.original);var r=n.find(".modal-comment").modal({show:!1}).on("shown.zui.modal",function(){var t=r.find("#comment");t.length&&(t.focus(),window.editor&&window.editor.comment&&window.editor.comment.focus())}).on("show.zui.modal",function(){var e=r.find("#comment");e.length&&!e.data("keditor")&&t.fn.kindeditor&&e.kindeditor()});n.on("click",".btn-comment",function(t){r.modal("toggle"),t.preventDefault()}).on("click",".btn-edit-comment,.btn-hide-form",function(){t(this).closest("li").toggleClass("show-form")});var l=n.find(".comment-edit-form");l.ajaxForm({success:function(t,e,i,n){setTimeout(function(){l.closest("li").removeClass("show-form")},2e3)}})};t.fn.histories=function(t){return this.each(function(){r(this,t)})},t(function(){t(".histories").histories()});var l=0,h=0;t.toggleSidebar=function(e){var i=t("#sidebar");if(i.length){var n=t("main");if(void 0===e)e=n.hasClass("hide-sidebar");else if(e&&!n.hasClass("hide-sidebar"))return;n.toggleClass("hide-sidebar",!e),clearTimeout(l),t.zui.store.set(h,e);var o=i.children(".cell"),s={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&&(s={overflow:"hidden",maxHeight:t(window).height()-45})),o.css(s)}};var c=t.initSidebar=function(){var e=t("#sidebar");if(e.length){if(e.data("init"))return!0;h="sidebar:"+(e.data("id")||config.currentModule+"/"+config.currentMethod);var i=t("main");i.on("click",".sidebar-toggle",function(){t.toggleSidebar(i.hasClass("hide-sidebar"))});var n=t.zui.store.get(h,e.data("hide")!==!1);n===!1&&e.addClass("no-animate"),t.toggleSidebar(n),n===!1&&setTimeout(function(){e.removeClass("no-animate")},500);var o=function(){var i=e.find(".sidebar-toggle");if(i.length){var n=i[0].getBoundingClientRect(),o=t(window).height(),s=Math.max(0,Math.floor(Math.min(o-40,n.top+n.height)-Math.max(n.top,0))/2)+(n.top<0?0-n.top:0);i.find(".icon").css("top",s)}};return o(),e.on("sidebar.toggle",o),t(window).on("resize",o).on("scroll",o),e.data("init",1),!0}};c()||t(c),t.toggleQueryBox=function(e,i){var n=t(i||"#queryBox");n.length&&(void 0===e&&(e=!n.hasClass("show")),n.toggleClass("show",!!e),n.data("init")||(n.addClass("load-indicator loading").data("init",1),t.get(t.createLink("search","buildForm"),function(t){n.html(t).removeClass("loading")})),t(".querybox-toggle").toggleClass("querybox-opened",e))},t(function(){var e=t("#queryBox");e.length&&(t(document).on("click",".querybox-toggle",function(){t.toggleQueryBox()}),e.hasClass("show")&&t.toggleQueryBox(!0))}),t.extend(t.fn.colorPicker.Constructor.DEFAULTS,{colors:["#3DA7F5","#75C941","#2DBDB2","#797EC9","#FFAF38","#FF4E3E"]}),window.setCheckedCookie=function(){var e=[],i=t('#mainContent .main-table tbody>tr input[type="checkbox"]:checked');i.each(function(){var i=parseInt(t(this).val(),10);NaN!==i&&e.push(i)}),t.cookie("checkedItem",e.join(","),{expires:config.cookieLife,path:config.webRoot})},t.extend(t.fn.modal.bs.Constructor.DEFAULTS,{scrollInside:!0,backdrop:"static",headerHeight:100}),t.extend(t.zui.ModalTrigger.DEFAULTS,{scrollInside:!0,backdrop:"static",headerHeight:40}),t.fn.initIframeModal=function(){return this.each(function(){var e=t(this);if(!e.parents('[data-ride="table"],.skip-iframe-modal').length){var i={type:"iframe"};e.hasClass("export")&&t.extend(i,{width:800,shown:setCheckedCookie},e.data()),e.modalTrigger(i)}})},t(function(){t("a.iframe,.export").initIframeModal()});var d=function(){var e,i,n=t(this),o=t.extend({limitSize:40,suffix:"…"},n.data()),s=n.text();if(s.length>o.limitSize){e=s,i=s.substr(0,o.limitSize)+o.suffix,n.text(i).addClass("limit-text-on");var a=o.toggleBtn?t(o.toggleBtn):n.next(".text-limit-toggle");a.text(a.data("textExpand")),a.on("click",function(){var t=n.toggleClass("limit-text-on").hasClass("limit-text-on");n.text(t?i:e),a.text(a.data(t?"textExpand":"textCollapse"))})}else(o.toggleBtn?t(o.toggleBtn):n.next(".text-limit-toggle")).hide()};t.fn.textLimit=function(){return this.each(d)},t(function(){t(".text-limit").textLimit()}),t.fixedTableHead=window.fixedTableHead=function(e,i){var n=t(e);if(n.is("table")||(n=n.find("table")),n.length){var o=t(i||window),s=null,a=function(){var e=n.children("thead"),i=e[0].getBoundingClientRect(),o=n.next(".fixed-head-table");if(i.top<0){var a=e.width();if(o.length){if(s!==a){s=a;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",a).on("resize",a),a()}},t(document).on("click","tr[data-url]",function(){var e=t(this),i=e.data("href")||e.data("url");i&&(window.location.href=i)}),"yes"===config.onlybody&&self===parent&&(window.location.href=window.location.href.replace("?onlybody=yes","").replace("&onlybody=yes","")),t(function(){t("body").addClass("m-{currentModule}-{currentMethod}".format(config))});var u,p,f,g,m,v=function(){u||(u=t("#subNavbar"),p=t("#pageNav"),f=t("#pageActions"),g=u.children(".nav"),m=g.outerWidth());var e=u.outerWidth(),i=p.outerWidth()||0,n=f.outerWidth()||0;if(i=i?i+15:0,n=n?n+15:0,!i&&!n)return void g.css({maxWidth:null,left:null,position:"static"});var o=Math.max(300,e-i-n),s=Math.min(o,m),a=(e-s)/2,r=i&&a.btn-toolbar");if(e.length){var i,n,o=!1,s=null,a=e.children(),r=a.length;for(a.each(function(e){i=t(this),n=i.is(".divider"),n&&!s&&i.hide(),o||n||(o=!0),s=n?null:i,!n||e!==r-1&&0!==e||i.hide()});i.length&&i.is(".divider");)i=i.hide().prev();o||e.hide()}};t(function(){t(".input-group,.btn-group").fixInputGroup(),k()}),window.holders&&t.each(window.holders,function(e){var i=t("#"+e);i.length&&i.is("input")&&i.attr("placeholder",window.holders[e])});var T=function(){var e,i="en"==config.clientLang?"http://www.zentao.pm/book/zentaomanual/8.html?fullScreen=zentao":"http://www.zentao.net/book/zentaopmshelp.html?fullScreen=zentao",n=t("#navbar > .nav").first(),o=1e4,s=function(){clearTimeout(e),t("#helpContent").removeClass("show-error")},a=t.openHelp=function(){s(),n.children("li.active:not(#helpMenuItem)").removeClass("active").addClass("close-help-tab"),t("#helpMenuItem").addClass("active");var a=t("#helpContent");if(a.length){if(t("body").hasClass("show-help-tab"))return void t("#helpIframe").get(0).contentWindow.location.replace(i)}else{a=t('

    '+lang.timeout+'

    '+i+'

    '),t("#header").after(a);var r=t("#helpIframe").get(0);e=setTimeout(function(){t("#helpContent").addClass("show-error")},o),r.onload=r.onreadystatechange=function(){this.readyState&&"complete"!=this.readyState||s()}}t("body").addClass("show-help-tab")},r=t.closeHelp=function(){t("body").removeClass("show-help-tab"),t("#helpMenuItem").removeClass("active"),n.find("li.close-help-tab").removeClass("close-help-tab").addClass("active").find("a").focus()};t(document).on("click",".open-help-tab",function(e){var i=t("#helpMenuItem");i.length||(i=t('
  • '+t(this).text()+'
  • '),n.append('
  • ').append(i)),a(),e.preventDefault()}).on("click",".close-help-tab",function(t){r(),t.stopPropagation(),t.preventDefault()})};t(T),t(function(){var e=t(".table-responsive"),i=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&&(i(),t(window).on("resize",i))});var S=function(){var e=this.value?this.scrollHeight+2+"px":"32px";this.style.height="auto",this.style.height=e,t(this).closest("tr").find("textarea").each(function(){this.style.height=e})};t.autoResizeTextarea=function(e){t(e).each(S)},t(function(){t("textarea.autosize").each(S),t(document).on("input keyup paste change","textarea.autosize",S)}),t(function(){var e=t("#dropMenu");e.length&&e.on("click",".toggle-right-col",function(t){e.toggleClass("show-right-col"),t.stopPropagation(),t.preventDefault()})});var D="undefined"!=typeof InstallTrigger;t.zui.browser.firefox=D,t("html").toggleClass("is-firefox",D).toggleClass("not-firefox",!D),t(function(){var e=t("#mainContent>.main-col"),i=e.children(".main-actions"),n=i.prev();if(i.length&&n.length){t('
    ').css("height",i.outerHeight()).insertAfter(i);var o=function(){var e=n[0].getBoundingClientRect(),o=e.top+e.height+120>t(window).height();t("body").toggleClass("main-actions-fixed",o),o&&i.width(n.width())};t.resetToolbarPosition=o,o(),t(window).on("resize scroll",o)}}),t(document).on("show.zui.modal",function(e){t("body.body-modal").length&&window.parent&&window.parent!==window&&t(e.target).is(".modal")&&window.parent.$("body").addClass("hide-modal-close")}).on("hidden.zui.modal",function(){t("body.body-modal").length&&window.parent&&window.parent!==window&&window.parent.$("body").removeClass("hide-modal-close")})}(jQuery); \ No newline at end of file +function(t){function e(e){if("string"==typeof e.data){var i=e.handler,n=e.data.toLowerCase().split(" ");e.handler=function(e){if(this===e.target||!/textarea|select/i.test(e.target.nodeName)&&"text"!==e.target.type){var o="keypress"!==e.type&&t.hotkeys.specialKeys[e.which],s=String.fromCharCode(e.which).toLowerCase(),a="",r={};e.altKey&&"alt"!==o&&(a+="alt+"),e.ctrlKey&&"ctrl"!==o&&(a+="ctrl+"),e.metaKey&&!e.ctrlKey&&"meta"!==o&&(a+="meta+"),e.shiftKey&&"shift"!==o&&(a+="shift+"),o?r[a+o]=!0:(r[a+s]=!0,r[a+t.hotkeys.shiftNums[s]]=!0,"shift+"===a&&(r[t.hotkeys.shiftNums[s]]=!0));for(var l=0,h=n.length;l","/":"?","\\":"|"}},t.each(["keydown","keyup","keypress"],function(){t.event.special[this]={add:e}})}(jQuery),function(t){"use strict";function e(e,i){if(e===!1)return e;if(!e)return i;e===!0?e={add:!0,"delete":!0,edit:!0,sort:!0}:"string"==typeof e&&(e=e.split(","));var n;return t.isArray(e)&&(n={},t.each(e,function(e,i){t.isPlainObject(i)?n[i.action]=i:n[i]=!0}),e=n),t.isPlainObject(e)&&(n={},t.each(e,function(e,i){i?n[e]=t.extend({type:e},a[e],t.isPlainObject(i)?i:null):n[e]=!1}),e=n),i?t.extend(!0,{},i,e):e}function i(e,i,n){return i=i||e.type,t(n||e.template).addClass("tree-action").attr(t.extend({"data-type":i,title:e.title||""},e.attr)).data("action",e)}var n="zui.tree",o=0,s=function(e,i){this.name=n,this.$=t(e),this.getOptions(i),this._init()},a={sort:{template:''},add:{template:''},edit:{template:''},"delete":{template:''}};s.DEFAULTS={animate:null,initialState:"normal",toggleTemplate:''},s.prototype.add=function(e,i,n,o,s){var a,r=t(e),l=this.options;if(r.is("li")?(a=r.children("ul"),a.length||(a=t("
      "),r.append(a),this._initList(a,r))):a=r,a){var h=this;t.isArray(i)||(i=[i]),t.each(i,function(e,i){var n=t("
    • ").data(i).appendTo(a);void 0!==i.id&&n.attr("data-id",i.id);var o=l.itemWrapper?t(l.itemWrapper===!0?'
    • ').append(i(h.add,"add",h.add.templateInList)).appendTo(n)}h.sort&&n.sortable(t.extend({dragCssClass:"tree-drag-holder",trigger:".sort-handler",selector:"li:not(.tree-action-item)",finish:function(t){r.callEvent("action",{action:h.sort,$list:n,target:t.target,item:a})}},h.sort.options,t.isPlainObject(this.options.sortable)?this.options.sortable:null))}o&&(o.hasClass("open")||a&&a.open)&&o.addClass("open in")},s.prototype._initItem=function(n,o,s,a){if(void 0===o){var r=n.prev("li");o=r.length?r.data("idx")+1:1}if(s=s||n.closest("ul"),n.attr("data-idx",o).removeClass("tree-single-item"),!n.data("id")){var l=o;s.hasClass("tree")||(l=s.parent("li").data("id")+"-"+l),n.attr("data-id",l)}n.hasClass("active")&&s.parent("li").addClass("has-active-item"),a=a||n.data();var h=e(a.actions,this.actions);if(h){var c=n.find(".tree-actions");c.length||(c=t('
      ').appendTo(this.options.itemWrapper?n.find(".tree-item-wrapper"):n),t.each(h,function(t,e){e&&c.append(i(e,t))}))}var d=n.children("ul");d.length&&this._initList(d,n,o,a)},s.prototype._init=function(){var i=this.options,s=this;this.actions=e(i.actions),this.$.addClass("tree"),i.animate&&this.$.addClass("tree-animate"),this._initList(this.$);var a=i.initialState,r=t.zui&&t.zui.store&&t.zui.store.enable;r&&(this.selector=n+"::"+(i.name||"")+"#"+(this.$.attr("id")||o++),this.store=t.zui.store[i.name?"get":"pageGet"](this.selector,{})),"preserve"===a&&(r?this.isPreserve=!0:this.options.initialState=a="normal"),this.reload(i.data),r&&(this.isPreserve=!0),"expand"===a?this.expand():"collapse"===a?this.collapse():"active"===a&&this.expandSelect(".active"),this.$.on("click",'.list-toggle,a[href="#"],.tree-toggle',function(e){var i=t(this),n=i.parent("li");s.callEvent("hit",{target:n,item:n.data()}),s.toggle(n),i.is("a")&&e.preventDefault()}).on("click",".tree-action",function(){var e=t(this),i=e.data();if(i.action&&(i=i.action),"sort"!==i.type){var n=e.closest("li:not(.tree-action-item)");s.callEvent("action",{action:i,target:this,$item:n,item:n.data()})}})},s.prototype.preserve=function(e,i,n){if(this.isPreserve)if(e)i=i||e.data("id"),n=void 0===n&&e.hasClass("open"),n?this.store[i]=n:delete this.store[i],this.store.time=(new Date).getTime(),t.zui.store[this.options.name?"set":"pageSet"](this.selector,this.store);else{var o=this;this.store={},this.$.find("li").each(function(){o.preserve(t(this))})}},s.prototype.expandSelect=function(t){this.show(t,!0)},s.prototype.expand=function(t,e,i){t?(t.addClass("open"),!e&&this.options.animate?setTimeout(function(){t.addClass("in")},10):t.addClass("in")):t=this.$.find("li.has-list").addClass("open in"),i||this.preserve(t),this.callEvent("expand",t,this)},s.prototype.show=function(e,i,n){var o=this;e instanceof t||(e=o.$.find("li").filter(e)),e.each(function(){var e=t(this);if(o.expand(e,i,n),e)for(var s=e.parent("ul");s&&s.length&&!s.hasClass("tree");){var a=s.parent("li");a.length?(o.expand(a,i,n),s=a.parent("ul")):s=!1}})},s.prototype.collapse=function(t,e,i){t?!e&&this.options.animate?(t.removeClass("in"),setTimeout(function(){t.removeClass("open")},300)):t.removeClass("open in"):t=this.$.find("li.has-list").removeClass("open in"),i||this.preserve(t),this.callEvent("collapse",t,this)},s.prototype.toggle=function(t){var e=t&&t.hasClass("open")||t===!1||void 0===t&&this.$.find("li.has-list.open").length;this[e?"collapse":"expand"](t)},s.prototype.getOptions=function(e){this.options=t.extend({},s.DEFAULTS,this.$.data(),e),null===this.options.animate&&this.$.hasClass("tree-animate")&&(this.options.animate=!0)},s.prototype.toData=function(e,i){t.isFunction(e)&&(i=e,e=null),e=e||this.$;var n=this;return e.children("li:not(.tree-action-item)").map(function(){var e=t(this),o=e.data();delete o["zui.droppable"];var s=e.children("ul");return s.length&&(o.children=n.toData(s)),t.isFunction(i)?i(o,e):o}).get()},s.prototype.callEvent=function(e,i){var n;return t.isFunction(this.options[e])&&(n=this.options[e](i,this)),this.$.trigger(t.Event(e+"."+this.name,i)),n},t.fn.tree=function(e,i){return this.each(function(){var o=t(this),a=o.data(n),r="object"==typeof e&&e;a||o.data(n,a=new s(this,r)),"string"==typeof e&&a[e](i)})},t.fn.tree.Constructor=s,t(function(){t('[data-ride="tree"]').tree()})}(jQuery),function(t){"use strict";var e="zui.colorPicker",i='
      ',n={zh_cn:{errorTip:"不是有效的颜色值"},zh_tw:{errorTip:"不是有效的顏色值"},en:{errorTip:"Not a valid color value"}},o=function(i,n){this.name=e,this.$=t(i),this.getOptions(n),this.init()};o.prototype.init=function(){var e=this,n=e.options,o=e.$,s=o.parent(),a=!1;s.hasClass("colorpicker")?e.$picker=s:(e.$picker=t(n.template||i),a=!0),e.$picker.addClass(n.wrapper).find(".cp-title").toggle(void 0!==n.title).text(n.title),e.$menu=e.$picker.find(".dropdown-menu").toggleClass("pull-right",n.pullMenuRight),e.$btn=e.$picker.find(".btn.dropdown-toggle"),e.$btn.find(".ic").addClass("icon-"+n.icon),n.btnTip&&e.$picker.attr("data-toggle","tooltip").tooltip({title:n.btnTip,placement:n.tooltip,container:"body"}),o.attr("data-provide",null),a&&o.after(e.$picker),e.colors={},t.each(n.colors,function(i,n){if(t.zui.Color.isColor(n)){var o=new t.zui.Color(n);e.colors[o.toCssStr()]=o}}),e.updateColors(),e.$picker.on("click",".cp-tile",function(){e.setValue(t(this).data("color"))});var r=function(){var i=o.val(),s=t.zui.Color.isColor(i);o.parent().toggleClass("has-error",!(s||n.optional&&""===i)),s?e.setValue(i,!0):n.optional&&""===i?o.tooltip("hide"):o.is(":focus")||o.tooltip("show",n.errorTip)};o.is("input:not([type=hidden])")?(n.tooltip&&o.attr("data-toggle","tooltip").tooltip({trigger:"manual",placement:n.tooltip,tipClass:"tooltip-danger",container:"body"}),o.on("keyup paste input change",r)):o.appendTo(e.$picker),r()},o.prototype.addColor=function(e){e instanceof t.zui.Color||(e=new t.zui.Color(e));var i=e.toCssStr(),n=this.options;this.colors[i]||(this.colors[i]=e);var o=t('
      ',{titile:e}).data("color",e).css({color:e.contrast().toCssStr(),background:i,"border-color":e.luma()>.43?"#ccc":"transparent"}).attr("data-color",i);this.$menu.append(t("
    • ").css({width:n.tileSize,height:n.tileSize}).append(o)),n.optional&&this.$menu.find(".cp-tile.empty").parent().detach().appendTo(this.$menu)},o.prototype.updateColors=function(e){var i=(this.$picker,this.$menu.children("li:not(.heading)").remove()),n=this.options,e=e||this.colors,o=this,s=0;if(t.each(e,function(t,e){o.addColor(e),s++}),n.optional){var a=t('
    • ').css({width:n.tileSize,height:n.tileSize});this.$menu.append(a),s++}i.css("width",Math.min(s,n.lineCount)*n.tileSize+6)},o.prototype.setValue=function(e,i){var n=this,o=n.options,s=n.$btn;n.$menu.find(".cp-tile.active").removeClass("active");var a="",r=o.updateBtn;if("auto"===r){var l=s.find(".color-bar");r=!l.length||function(t){l.css("background",t||"")}}if(e){var h=new t.zui.Color(e);a=h.toCssStr().toLowerCase(),r&&(t.isFunction(r)?r(a,s,n):s.css({background:a,color:h.contrast().toCssStr(),borderColor:h.luma()>.43?"#ccc":a})),n.colors[a]||n.addColor(h),i||n.$.val().toLowerCase()===a||n.$.val(a).trigger("change"),n.$menu.find('.cp-tile[data-color="'+a+'"]').addClass("active"),n.$.tooltip("hide"),n.$.trigger("colorchange",h)}else r&&(t.isFunction(r)?r(null,s,n):s.attr("style",null)),i||""===n.$.val()||n.$.val(a).trigger("change"),o.optional&&n.$.tooltip("hide"),n.$menu.find(".cp-tile.empty").addClass("active"),n.$.trigger("colorchange",null);o.updateBorder&&t(o.updateBorder).css("border-color",a),o.updateBackground&&t(o.updateBackground).css("background-color",a),o.updateColor&&t(o.updateColor).css("color",a),o.updateText&&t(o.updateText).text(a)},o.prototype.getOptions=function(e){var i=t.extend({},o.DEFAULTS,this.$.data(),e);"string"==typeof i.colors&&(i.colors=i.colors.split(","));var s=(i.lang||t.zui.clientLang()).toLowerCase();s=n[s]||n.en,i.errorTip||(i.errorTip=s.errorTip),t.fn.tooltip||(i.btnTip=!1),this.options=i},o.DEFAULTS={colors:["#00BCD4","#388E3C","#3280fc","#3F51B5","#9C27B0","#795548","#F57C00","#F44336","#E91E63"],pullMenuRight:!0,wrapper:"btn-wrapper",tileSize:30,lineCount:5,optional:!0,tooltip:"top",icon:"caret-down",updateBtn:"auto"},o.LANG=n,t.fn.colorPicker=function(i){return this.each(function(){var n=t(this),s=n.data(e),a="object"==typeof i&&i;s||n.data(e,s=new o(this,a)),"string"==typeof i&&s[i]()})},t.fn.colorPicker.Constructor=o,t(function(){t('[data-provide="colorpicker"]').colorPicker()})}(jQuery),function(t,e){function i(t){return t===e&&(t=n+=1),o[t%o.length]}var n=0,o=["#00a9fc","#ff5d5d","#fdc137","#00da88","#7ec5ff","#8666b8","#bd7b46","#ff9100","#ff3d00","#f57f17","#00e5ff","#00b0ff","#2979ff","#3d5afe","#651fff","#d500f9","#f50057","#ff1744"];jQuery.fn.tableChart=function(){t(this).each(function(){var e=t(this),n=e.data(),o=n.chart||"pie",s=t(n.target);if(s.length){var a=null;if("pie"===o){n=t.extend({scaleShowLabels:!0,scaleLabel:"<%=label%>: <%=value%>"},n);var r=[],l=e.find("tbody > tr").each(function(e){var n=t(this),o=i();n.attr("data-id",e).find(".chart-color-dot").css("background",o),r.push({label:n.find(".chart-label").text(),value:parseFloat(n.data("value")||n.find(".chart-value").text()),color:o,id:e})});r.length>1?n.scaleLabelPlacement="outside":1===r.length&&(n.scaleLabelPlacement="inside",r.push({label:"",value:r[0].value/2e3,color:"#fff",showLabel:!1})),a=s.pieChart(r,n),s.on("mousemove",function(t){var e=a.getSegmentsAtEvent(t);l.removeClass("active"),e.length&&l.filter('[data-id="'+e[0].id+'"]').addClass("active")})}else if("bar"===o){var h=i(),c=[],d={label:e.find("thead .chart-label").text(),color:h,data:[]},l=e.find("tbody > tr").each(function(e){var i=t(this);c.push(i.find(".chart-label").text()),d.data.push(i.data("value")||parseFloat(i.find(".chart-value").text())),i.find(".chart-color-dot").css("background",h)}),r={labels:c,datasets:[d]};c.length&&(n.barValueSpacing=5),a=s.barChart(r,n)}else if("line"===o){var h=i(),c=[],d={label:e.find("thead .chart-label").text(),color:h,data:[]},l=e.find("tbody > tr").each(function(e){var i=t(this);c.push(i.find(".chart-label").text()),d.data.push(parseInt(i.find(".chart-value").text())),i.find(".chart-color-dot").css("background",h)}),r={labels:c,datasets:[d]};c.length&&(n.barValueSpacing=5),a=s.lineChart(r,n)}null!==a&&e.data("zui.chart",a)}})},t(".table-chart").tableChart();var s=function(i,n){var o=t(i);if(!o.data("initProgressPie")){o.data("initProgressPie",1);var s=o.is("canvas")?o:o.find("canvas"),a=t.extend({value:0,color:t.getThemeColor("primary")||"#006af1",backColor:t.getThemeColor("pale")||"#E9F2FB",doughnut:!0,doughnutSize:85,width:20,height:20,showTip:!1,name:"",tipTemplate:"<%=value%>%",animation:"auto",realValue:parseFloat(o.find(".progress-value").text())},n,o.data()),r=s.length;r||(s=t("").appendTo(o)),s.attr("width")!==e?a.width=s.attr("width"):s.attr("width",a.width),s.attr("height")!==e?a.height=s.attr("height"):s.attr("height",a.height),r||8!=t.zui.browser.ie||G_vmlCanvasManager.initElement(s[0]),"auto"===a.animation&&(a.animation=a.width>30),a.value=Math.max(0,Math.min(100,a.value)),o.addClass("progress-pie-"+a.width);var l=[{value:a.value,label:a.name,color:a.color,circleBeginEnd:!0},{value:100-a.value,label:"",color:a.backColor}];s[a.doughnut?"doughnutChart":"pieChart"](l,t.extend({segmentShowStroke:!1,animation:a.animation,showTooltips:a.showTip,tooltipTemplate:a.tipTemplate,percentageInnerCutout:a.doughnutSize,reverseDrawOrder:!0,animationEasing:"easeInOutQuart",onAnimationProgress:a.realValue?function(t){o.find(".progress-value").text(Math.floor(a.realValue*t))}:e,onAnimationComplete:a.realValue?function(t){o.find(".progress-value").text(a.realValue)}:e},a.chartOptions))}};jQuery.fn.progressPie=function(e){t(this).each(function(){var i=t(this);if(!i.closest(".hidden").length){var n=i.closest(".tab-pane");n.length&&!n.hasClass("active")?t('[data-toggle="tab"][data-target="#'+n.attr("id")+'"]').one("shown.zui.tab",function(){s(i,e)}):s(this,e)}})},t(function(){t(".table-chart").tableChart();var e=t(".progress-pie");e.length>100?setTimeout(function(){e.progressPie()},1e3):e.progressPie()})}(jQuery,void 0),function(t){jQuery.fn.sparkline=function(e){t(this).each(function(){var i=t(this),n=t.extend({values:i.attr("values"),width:i.width()-4,height:i.height()-4},i.data(),e),o=n.height,s=[],a=n.width,r=n.values.split(","),l=0;for(var h in r){var c=parseFloat(r[h]);NaN!=c&&(s.push(c),l=Math.max(c,l))}var d=(Math.min(l,30),Math.min(a,Math.max(10,s.length*a/30))),u=i.children("canvas");u.length||(i.append(''),u=i.children("canvas")),u.attr("width",d).attr("height",o);var p={labels:s,datasets:[{fillColor:t.getThemeColor("pale")||"rgba(0,0,255,0.05)",strokeColor:t.getThemeColor("primary")||"#0054EC",pointColor:t.getThemeColor("secondary")||"rgba(255,136,0,1)",pointStrokeColor:"#fff",data:s}]},f={animation:!0,scaleOverride:!0,scaleStepWidth:Math.ceil(l/10),scaleSteps:10,scaleStartValue:0,showScale:!1,showTooltips:!1,pointDot:!1,scaleShowGridLines:!1,datasetStrokeWidth:1},g=t(u).lineChart(p,f);i.data("sparklineChart",g)})},t(function(){t(".sparkline").sparkline()})}(jQuery),function(t){t.fn.fixedDate=function(){return t(this).each(function(){var e=t(this).attr("autocomplete","off");"0000-00-00"==e.val()&&e.focus(function(){"0000-00-00"==e.val()&&e.val("").datetimepicker("update")}).blur(function(){""==e.val()&&e.val("0000-00-00")})})},t(function(){var e={language:t("html").attr("lang"),weekStart:1,todayBtn:1,autoclose:1,todayHighlight:1,startView:2,forceParse:0,showMeridian:1,format:"yyyy-mm-dd hh:ii",startDate:"1970-1-1"},i=t.extend({},e,{minView:2,format:"yyyy-mm-dd"}),n=t.extend({},e,{eleClass:"only-pick-time",startView:1,minView:0,maxView:1,format:"hh:ii"});t(".datepicker-wrapper").click(function(){t(this).find(".form-date, .form-datetime, .form-time").datetimepicker("show").focus()}),window.datepickerOptions=e,t.fn.datepicker=function(e){return this.datetimepicker(t.extend({},i,e))},t.fn.timepicker=function(e){return this.datetimepicker(t.extend({},n,e))},t.fn.datepickerAll=function(){return this.find(".form-datetime").fixedDate().datetimepicker(e),this.find(".form-date").fixedDate().datepicker(),this.find(".form-time").fixedDate().timepicker(),this},t("body").datepickerAll()})}(jQuery),function(t){var e=function(e,i){i=t.extend({idStart:0,idEnd:9,chosen:!0,datetimepicker:!0,colorPicker:!0,hotkeys:!0},i,e.data());var n=e.find(".template");!n.length&&i.template&&(n=t(i.template));var o=0,s=0,a=function(t){t.is("select.chosen")?t.next(".chosen-container").find("input").focus():t.focus()},r=function(t){var i=e.find("[data-ctrl-index]:focus,.chosen-container-active").first();if(i.length){if(i.is(".chosen-container-active")){if(i.hasClass("chosen-with-drop")&&("down"===t||"up"===t))return;i=i.prev("select.chosen")}var n=i.data("ctrlIndex"),r=i.closest("tr").data("row");"down"===t?r0?r-=1:r=s-1:"left"===t?n>0?n-=1:n=o-1:"right"===t&&(n").html(a);return r.attr("data-row",e).addClass(n.attr("class")).removeClass("template"),i.rowCreator&&i.rowCreator(r,e,i),o?o.after(r):h.append(r),c(r),r};t.extend(l,{createRow:u,template:d});for(var p=i.idStart;p<=i.idEnd;++p)u(p)}else c(e);e.on("click",".btn-copy",function(){var e=t(this),i=t(e.data("copyFrom")).val(),n=t(e.data("copyTo")).val(i).addClass("highlight");setTimeout(function(){n.removeClass("highlight")},2e3)}),i.hotkeys&&t(document).on("keydown",function(t){var e={"Ctrl+#37":"left","Ctrl+#39":"right","#38":"up","#40":"down","Ctrl+#38":"up","Ctrl+#40":"down"},i=[];t.ctrlKey&&i.push("Ctrl"),i.push("#"+t.keyCode);var n=e[i.join("+")];n&&(r(n),t.ctrlKey&&(t.stopPropagation(),t.preventDefault()))}),e.data("zui.batchActionForm",l)};t.fn.batchActionForm=function(i){return this.each(function(){e(t(this),i)})}}(jQuery),function(t,e){"use strict";var i="zui.table",n={zh_cn:{selectedItems:"已选择 {0} 项",attrTotal:"{0}总计 {1}"},zh_tw:{selectedItems:"已选择 {0} 项",attrTotal:"{0}总计 {1}"},en:{selectedItems:"Seleted {0} items",attrTotal:"{0} total {1}"}},o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),s=function(e,o){var a=this;a.name=i;var r=a.$=t(e);o=a.options=t.extend({},s.DEFAULTS,this.$.data(),o);var l=o.lang||"zh_cn";a.lang=t.isPlainObject(l)?t.extend(!0,{},n.en,n[l.lang||t.zui.clientLang()],l):n[l]||n.en,r.attr("id")||(r.attr("id","table-"+t.zui.uuid()),o.hot&&console.warn("ZUI: table hot replace id not defined, the element id attribute should be set.")),r.attr("data-ride")||r.attr("data-ride","table");var h=a.getTable();if(h.length){h.find("thead>tr>th").each(function(){var e=t(this);if(!e.attr("title")){var i=t.trim(e.find("a:first").text()||e.text()||"");i.length&&e.attr("title",i)}}),o.checkable&&(r.on("click",".check-all",function(){a.checkAll(!t(this).hasClass("checked"))}).on("click","tbody>tr",function(e){t(e.target).closest('.btn,a,.not-check,.form-control,input[type="text"],.chosen-container').length||a.checkRow(t(this))}).on("click",'tbody input[type="checkbox"],tbody label[for]',function(e){e.stopPropagation();var i=t(this);i.is("label")&&(i=i.closest(".checkbox-primary").find('input[type="checkbox"]')),a.checkRow(i.closest("tr"),i.is(":checked"))}),o.selectable&&r.selectable(t.extend({},{selector:a.isDataTable?".fixed-left tbody>tr":"tbody>tr",selectClass:"",trigger:".c-id",clickBehavior:"multi",listenClick:!1,select:function(e){a.checkRow(e.target,!0),t.cookie("ajax_dragSelected")||(t.cookie("ajax_dragSelected","on",{expires:config.cookieLife,path:config.webRoot}),t.ajaxSendScore("dragSelected"))},unselect:function(t){a.checkRow(t.target,!1)},rangeStyle:{border:"1px solid #006af1",backgroundColor:"rgba(50,128,252,0.2)",borderRadius:"2px"}},t.isPlainObject(o.selectable)?o.selectable:null)));var c=a.$form=r.is("form")?r:r.find("form");c.length&&(o.ajaxForm?c.ajaxForm(t.isPlainObject(o.ajaxForm)?o.ajaxForm:null):c.on("click","[data-form-action]",function(){c.attr("action",t(this).data("formAction")).submit()})),(o.fixFooter||o.fixHeader)&&(a.pageFooterHeight=t("#footer").outerHeight(),a.updateFixUI(),t(window).on("scroll resize",function(){a.updateFixUI()}).on("sidebar.toggle",function(){setTimeout(function(){a.updateFixUI()},200)})),o.group&&(r.on("click",".group-toggle",function(){a.toggleRowGroup(t(this).closest("tr").data("id"))}),t(document).on("click",".group-collapse-all",function(){a.toggleGroups(!1)}).on("click",".group-expand-all",function(){a.toggleGroups(!0)})),a.defaultStatistic=r.find(".table-statistic").html(),a.updateStatistic(),a.initModals(),a.checkItems={},a.updateCheckUI()}};s.prototype.reload=function(e){var i=this,n=i.options,o=n.replaceId;if(!o)return e&&e();"self"===o&&(o=i.$.attr("id"));var s=t("
      ");i.$.addClass("load-indicator loading"),s.load(window.location.href+" #"+o,function(){i.$.empty().html(s.children().html()).removeClass("load-indicator loading"),i.$.trigger("beforeTableReload"),i.updateStatistic(),i.initModals(),i.$.datepickerAll();var o=i.$.find("tbody>tr"),a=!1;t.each(i.checkItems,function(t,e){e&&(i.checkRow(o.filter('[data-id="'+t+'"]'),!0,!0),a=!0)}),a&&i.updateCheckUI(),i.$.trigger("tableReload");var r=t("#mainMenu>.btn-toolbar>.btn-active-text>.label");r.length&&r.text(i.getTable().find("tbody:first>tr:not(.table-children)").length),i.$.find('[data-ride="pager"]').pager(),e&&e(),n.afterReload&&n.afterReload()})},s.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)}},s.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=t.find("div.datatable")),e},s.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)})},s.prototype.toggleRowGroup=function(i,n){var o=this.$.find('tbody>tr[data-id="'+i+'"]'),s=o.filter(".group-summary"),a=n===e?!s.hasClass("hidden"):!!n;o.not(".group-summary").toggleClass("hidden",!a),s.toggleClass("hidden",a),t("body").toggleClass("table-group-collapsed",!this.$.find("tbody>tr.group-summary.hidden").length)},s.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 s=!1;i.getTable().find("thead th").each(function(e){var i=t(this),n=i.data("statistic");n&&(s=!0,o[e]={format:n,name:i.text()})}),i.statisticCols=!!s&&o}var a=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&&a++,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(a)r.push(i.lang.selectedItems.format(a));else if(i.defaultStatistic)return void n.html(i.defaultStatistic);o&&t.each(o,function(t){var e=o[t],n=e[a?"checkedTotal":"total"];e.format&&(n=e.format.format(n)),r.push(i.lang.attrTotal.format(e.name,n))}),n.html(r.join(", "))}},s.prototype.updateFixUI=function(e){var i=this,n=(new Date).getTime();if(!e&&(i.lastUpdateCall&&clearTimeout(i.lastUpdateCall),!i.lastUpdateTime||n-i.lastUpdateTime<100))return void(i.lastUpdateCall=setTimeout(function(){i.updateFixUI(!0)},30));if(i.lastUpdateTime=n,i.lastUpdateCall&&(clearTimeout(i.lastUpdateCall),i.lastUpdateCall=null),o){var s=i.getTable();if(s.parent().is(".table-responsive")){var a=s.find("thead"),r=0;a.find("th").each(function(){r+=t(this).outerWidth()}),s.css("min-width",r)}}i.options.fixHeader&&!i.isDataTable&&i.fixHeader(),i.options.fixFooter&&i.fixFooter()},s.prototype.fixHeader=function(){var e=this,i=e.getTable(),n=i.find("thead"),o=n[0].getBoundingClientRect(),s=e.options.fixFooter,a=t.isFunction(s)?s(o,n):o.top<("number"==typeof s?s:-5),r=e.$.find(".fix-table-copy-wrapper"),l=i.parent(),h=l.is(".table-responsive");if(a){if(r.length||(r=t('
      ').append(t('
      ').addClass(i.attr("class")).append(n.clone())).insertAfter(i)),h){var c=l[0].getBoundingClientRect();r.css({left:c.left,width:l.width()}),r.find(".fixed-header-copy").css({left:o.left-c.left,position:"relative",minWidth:i.width()}),l.data("fixHeaderScroll")||l.data("fixHeaderScroll",1).on("scroll",function(){e.fixHeader()})}else r.css({left:o.left,width:o.width});var d=r.find("th");n.find("th").each(function(e){d.eq(e).css("width",t(this).outerWidth())})}else r.remove()},s.prototype.fixFooter=function(){var e,i=this,n=i.getTable(),o=i.$.find(".table-footer");if(i.isDataTable)e=n[0].getBoundingClientRect();else{var s=n.find("tbody");if(!s.length)return;e=s[0].getBoundingClientRect(),e=s[0].getBoundingClientRect()}var a=i.options.fixFooter;o.toggleClass("fixed-footer",!!r);var r=t.isFunction(a)?a(e,o):e.bottom>window.innerHeight-50-("number"==typeof a?a:i.pageFooterHeight||5);o.toggleClass("fixed-footer",!!r),n.toggleClass("with-footer-fixed",!!r),n.trigger("fixFooter",r);var l=t("body"),h=l.hasClass("body-modal");if(r){var c=n.parent(),d=c.is(".table-responsive");o.css({bottom:i.pageFooterHeight||0,left:d?c[0].getBoundingClientRect().left:e.left,width:d?c.width():e.width}),h&&l.css("padding-bottom",40)}else o.css({width:"",left:0,bottom:0}),h&&l.css("padding-bottom",0)},s.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()},s.prototype.checkRow=function(t,i,n){var o=this;o.isDataTable&&!t.is(".datatable-row-left")&&(t=o.getTable().find('.datatable-row-left[data-index="'+t.data("index")+'"]'));var s=t.find('input[type="checkbox"]');s.length&&(i===e&&(i=!s.is(":checked")),o.isDataTable?o.getTable().find('.datatable-row[data-index="'+t.data("index")+'"]').toggleClass("checked",i):t.toggleClass("checked",i),this.checkItems[t.data("id")]=i,s.prop("checked",i).trigger("change"),n||o.updateCheckUI())},s.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,s=null,a=0,r=!1,l=n.length;n.each(function(n){var h=t(this),c=h.find('input[type="checkbox"]');r=c.is(":checked");var d=e.isDataTable?i.find('.datatable-row[data-index="'+h.data("index")+'"]'):h;d.toggleClass("checked",r),d.toggleClass("row-check-begin",r&&!o),s&&s.toggleClass("row-check-end",!r&&o),r&&(a+=1),s=d,o=r,l===n+1&&d.toggleClass("row-check-end",r)}),e.$.toggleClass("has-row-checked",a>0).find(".check-all").toggleClass("checked",!(!l||a!==l)),e.updateStatistic(),e.options.onCheckChange&&e.options.onCheckChange()},s.DEFAULTS={checkable:!0,ajaxForm:!1,selectable:!0,fixHeader:!0,fixFooter:!0,iframeWidth:900,replaceId:"self",hot:!1,iframeModalTrigger:".iframe"},t.fn.table=function(e){return this.each(function(){var n=t(this),o=n.data(i),a="object"==typeof e&&e;o||n.data(i,o=new s(this,a)),"string"==typeof e&&o[e]()})},s.NAME=i,t.fn.table.Constructor=s,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){e===!1?t("form").enableForm(e,i,n):t("form.form-disabled").enableForm(!0,i,n)};var s=function(e,i,n){"string"==typeof i&&(n=i,i=null),n=n||"show",t.zui.messager?t.zui.messager[n](e,i):alert(e)};t.ajaxForm=function(a,r){var l=t(a);if(l.length>1)return l.each(function(){t.ajaxForm(this,r)});t.isFunction(r)&&(r={complete:r}),r=t.extend({},n,l.data(),r);var h=r.beforeSubmit,c=r.error,d=r.success,u=r.finish;delete r.finish,delete r.success,delete r.onError,delete r.beforeSubmit,r=t.extend({beforeSubmit:function(n,s,a){if(l.enableForm(!1),(h&&h(n,s,a))!==!1){var r={},c=s.find('[type="file"]');r.fileapi=c.length&&c[0].files!==i,r.formdata=e.FormData!==i;var d=r.fileapi&&s.find('input[type="file"]:enabled').filter(function(){return""!==t(this).val(); +}),u=d.length,p="multipart/form-data",f=s.attr("enctype")==p||s.attr("encoding")==p,g=r.fileapi&&r.formdata,m=u&&!g||f&&!r.formdata;m&&(""==o&&(o=a.url),a.url!=o&&(a.url=o),a.url=a.url.indexOf("&")>=0?a.url+"&HTTP_X_REQUESTED_WITH=XMLHttpRequest":a.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(a){}if(null===i||"object"!=typeof i)return i?alert(i):s("No response.","danger");var h=r.responser?t(r.responser):l.find(".form-responser");h.length||(h=t("#responser"));var c=i.message,p=function(){var n=i.callback;if(n){var o=n.indexOf("("),s=(o>0?n.substr(0,o):n).split("."),a=e,r=s[0];s.length>1&&(r=s[1],"top"===s[0]?a=e.top:"parent"===s[0]&&(a=e.parent));var h=a[r];if(t.isFunction(h)){var c=[];return o>0&&")"==n[n.length-1]&&(c=t.parseJSON("["+n.substring(o+1,n.length-1)+"]")),c.push(i),h.apply(l,c)}}};if("success"===i.result){if(l.enableForm(!0,1),c){var f=l.find('[type="submit"]'),g=!1;f.length&&(f.popover({container:"body",trigger:"manual",content:c,tipClass:"popover-in-modal popover-success popover-form-result",placement:i.placement||r.popoverPlacement||"right"}).popover("show"),setTimeout(function(){f.popover("destroy")},r.popoverTime||2e3),g=!0),h.length&&(h.html(''+c+"").show().delay(3e3).fadeOut(100),g=!0),g||s(c,"success")}if(u)return u(i,!0,l);if((r.closeModal||i.closeModal)&&setTimeout(t.zui.closeModal,r.closeModalTime||2e3),p()===!1)return;var m=r.locate||i.locate;if(m)if("loadInModal"==m){var v=t(".modal");setTimeout(function(){v.load(v.attr("ref"),function(){t(this).find(".modal-dialog").css("width",t(this).data("width")),t.zui.ajustModalPosition()})},1e3)}else if("parent"===m||"top"===m)e[m]&&setTimeout(function(){e[m].location.reload()},1200);else{var y="reload"==m?e.location.href:m;setTimeout(function(){e.location.href=y},1200)}var b=r.ajaxReload||i.ajaxReload;if(b){var w=t(b);w.length&&w.load(e.location.href+" "+b,function(){w.find('[data-toggle="modal"]').modalTrigger()})}}else{if(l.enableForm(),"string"==typeof c)h.length?h.html(''+c+"").show().delay(3e3).fadeOut(100):s(c,"danger");else if("object"==typeof c){var x=!1,C=[];t.each(c,function(e,i){var n=t.isArray(i)?i.join(";"):i,o=t("#"+e);if(!o.length)return void C.push(n);var s=e+"Label",a=t("#"+s);if(!a.length){var r=o.closest(".input-group").length,l=o.closest("td").length;a=t('
      ').appendTo(l?o.closest("td"):r?o.closest(".input-group").parent():o.parent())}a.empty().append(n),o.addClass("has-error");var h=function(){var e=t("#"+s);if(e.length)return e.remove(),o.removeClass("has-error"),!0};o.on("change input mousedown",h);var c=t("#"+e+"_chosen");c.length&&c.find(".chosen-single,.chosen-choices").addClass("has-error").on("mousedown",function(){h()===!0&&t(this).removeClass("has-error")}),x||(o.focus(),x=!0)}),C.length&&s(C.join(";"),"danger")}if(u)return u(i,!1,l);if(p()===!1)return}}},error:function(t,i,n){if((c&&c(t,i,n,l))!==!1){l.enableForm();var o="timeout"==i||"error"==i?e.lang?e.lang.timeout:i:t.responseText+i+n;s(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.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("#hiddenwin"),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(a)),i.$menu.append(a),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].scrollIntoView({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 s=n.getItems().removeClass("active");if(o)s.removeClass("hidden");else{var a=t.trim(e).split(" ");s.each(function(){var e=t(this),n=e.text()+" "+(e.data("key")||e.data("filter"));e.toggleClass("hidden",!i(a,n))})}n.scrollTo(s.not(".hidden").first().addClass("active"))},n.DEFAULTS={selector:".list-group a:not(.not-list-item)",searchBox:".search-box",onSelectItem:null},t.fn.searchList=function(i){return this.each(function(){var o=t(this),s=o.data(e),a="object"==typeof i&&i;s||o.data(e,s=new n(this,a)),"string"==typeof i&&s[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 s=this;s.name=e,s.$=t(n),o=s.options=t.extend({},i.DEFAULTS,this.$.data(),o),s.$.hide(),s.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 s=e.$.val();e.hasEmptyValue=!1,e.$.children("option").each(function(){var e=t(this),o={label:e.text(),value:e.val()},a=""===o.value||"0"===o.value,r=t(i.labelTemplate||'');i.labelClass&&!a&&r.addClass(i.labelClass),i.labelCreator?r=i.labelCreator(r):(r.data("option",o).attr("data-value",o.value),a&&!o.label?r.addClass("empty").append(''):r.text(o.label).toggleClass("active",s===o.value)),n.append(r)})},i.DEFAULTS={},t.fn.labelSelector=function(n){return this.each(function(){var o=t(this),s=o.data(e),a="object"==typeof n&&n;s||o.data(e,s=new i(this,a)),"string"==typeof n&&s[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=ta.fileMaxSize&&(h.val(""),(window.bootbox||window).alert(a.fileSizeError.format(n(a.fileMaxSize)))),r.update()}),r.update()};s.prototype.getFile=function(){var t=this.$input.prop("files");return t&&t[0]},s.prototype.update=function(){var t=this,e=t.$,i=t.getFile(),o=!i;e.toggleClass("normal",!o).toggleClass("empty",o),i?(t.oldName=i.name,e.find(".file-title").text(i.name).attr("title",i.name),e.find(".file-size").text(n(i.size)),e.find(".file-editbox").val(i.name).attr("size",i.name.length),t.options.onSelect&&t.options.onSelect(i,t)):e.find(".file-editbox").val("")},s.DEFAULTS={fileMaxSize:0,fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInput=function(i){return this.each(function(){var n=t(this),o=n.data(e),a="object"==typeof i&&i;o||n.data(e,o=new s(this,a)),"string"==typeof i&&o[i]()})},s.NAME=e,t.fn.fileInput.Constructor=s,t(function(){t('[data-provide="fileInput"]').fileInput()});var a="zui.fileInputList",r=function(e,i){var n=this;n.name=a;var o=n.$=t(e);i=n.options=t.extend({},r.DEFAULTS,this.$.data(),i),n.$template=o.find(".file-input").detach(),n.add()};r.prototype.add=function(){var t=this,e=t.options,i=t.$template.clone();"before"===e.appendWay?t.$.prepend(i):t.$.append(i),i.fileInput({fileMaxSize:e.eachFileMaxSize,fileSizeError:e.fileSizeError,onDelete:function(e){e.$.remove(),t.options.onDelete&&t.options.onDelete(e,t)},onSelect:function(e,i){t.add(),t.options.onSelect&&t.options.onSelect(e,i,t)}})},r.DEFAULTS={fileMaxSize:0,eachFileMaxSize:0,appendWay:"after",fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInputList=function(e){return this.each(function(){var i=t(this),n=i.data(a),o="object"==typeof e&&e;n||i.data(a,n=new r(this,o)),"string"==typeof e&&n[e]()})},r.NAME=a,t.fn.fileInputList.Constructor=r,t(function(){t('[data-provide="fileInputList"]').fileInputList()})}(jQuery),function(t){window.config||(window.config={}),t.createLink=window.createLink=function(t,e,n,o,s){if(o||(o=config.defaultView),s||(s=!1),n)for(n=n.split("&"),i=0;i'+d+"")}}t.val()||(time=e(s.format("hh:mm")),time=time-time%10+10,t.val(n(time)))};t.fn.timeSpanControl=function(i){return this.each(function(){var a=t(this),r=t.extend({},i,a.data()),l=a.find('[name="begin"],.control-time-begin'),h=a.find('[name="end"],.control-time-end'),c=function(){var t=l.val();if(a.find(".hide-empty-begin").toggleClass("hide",!t),t){var i=n(e(t)+30);h.find('option[value="'+i+'"]').length&&h.val(i),r.onChange&&r.onChange(h,i)}};if(a.data("timeSpanControlInit")){if(r.begin){var d=o(r.begin).format("hh:mm");l.find('option[value="'+d+'"]').length&&l.val(d),r.onChange&&r.onChange(l,d)}if(r.end){var u=o(r.end).format("hh:mm");h.find('option[value="'+u+'"]').length&&h.val(u),r.onChange&&r.onChange(h,u)}}else l.on("change",c),s(l,r.begin),s(h,r.end),a.data("timeSpanControlInit",!0);r.end||c()})},t.timeSpanControl={convertTimeToNum:e,convertNumToTime:n,initTimeSelect:s,createTime:o};var a=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 s=o.find('a[data-value="'+e+'"]'),a=s.text();s.parent().addClass("selected"),t("#searchTypeName").text(a),i||t("#searchInput").focus()};t.gotoObject=function(e,i){e||(e=t("#searchType").val()),i||(i=t("#searchInput").val()),i&&e&&(window.location.href=t.createLink(e,"testsuite"===e?"library":"view","id="+i))},t(function(){a(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(){location.href=removeAnchor(location.href)},t.selectLang=window.selectLang=function(e){t.cookie("lang",e,{expires:config.cookieLife,path:config.webRoot}),t.ajaxSendScore("selectLang"),t.refreshPage()},t.selectTheme=window.selectTheme=function(e){t.cookie("theme",e,{expires:config.cookieLife,path:config.webRoot}),t.ajaxSendScore("selectTheme"),t.refreshPage()},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,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;var i="down",n=this.container.find(".chosen-drop"),o=this.container.position(),s=n.outerHeight();return o.top>=s&&o.top+s{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.zui.Messager.DEFAULTS.cssClass="messagger-zt",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);i=t.extend({},n.data(),i);var o=n.find(".histories-list"),s=!0,a=!1;n.on("click",".btn-reverse",function(){o.children("li").reverseOrder(),s=!s,t(this).find(".icon").toggleClass("icon-arrow-up",s).toggleClass("icon-arrow-down",!s);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");a=!a,e.toggleClass("icon-plus",!a).toggleClass("icon-minus",a),o.children("li").toggleClass("show-changes",a)}).on("click",".btn-expand",function(){t(this).closest("li").toggleClass("show-changes")}).on("click",".btn-strip",function(){var e=t(this),n=e.find(".icon"),o=n.hasClass("icon-code");n.toggleClass("icon-code",!o).toggleClass("icon-text",o),e.attr("title",o?i.original:i.textdiff),e.closest("li").toggleClass("show-original",o)}),o.find(".btn-strip").attr("title",i.original);var r=n.find(".modal-comment").modal({show:!1}).on("shown.zui.modal",function(){var t=r.find("#comment");t.length&&(t.focus(),window.editor&&window.editor.comment&&window.editor.comment.focus())}).on("show.zui.modal",function(){var e=r.find("#comment");e.length&&!e.data("keditor")&&t.fn.kindeditor&&e.kindeditor()});n.on("click",".btn-comment",function(t){r.modal("toggle"),t.preventDefault()}).on("click",".btn-edit-comment,.btn-hide-form",function(){t(this).closest("li").toggleClass("show-form")});var l=n.find(".comment-edit-form");l.ajaxForm({success:function(t,e,i,n){setTimeout(function(){l.closest("li").removeClass("show-form")},2e3)}})};t.fn.histories=function(t){return this.each(function(){r(this,t)})},t(function(){t(".histories").histories()});var l=0,h=0;t.toggleSidebar=function(e){var i=t("#sidebar");if(i.length){var n=t("main");if(void 0===e)e=n.hasClass("hide-sidebar");else if(e&&!n.hasClass("hide-sidebar"))return;n.toggleClass("hide-sidebar",!e),clearTimeout(l),t.zui.store.set(h,e);var o=i.children(".cell"),s={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&&(s={overflow:"hidden",maxHeight:t(window).height()-45})),o.css(s)}};var c=t.initSidebar=function(){var e=t("#sidebar");if(e.length){if(e.data("init"))return!0;h="sidebar:"+(e.data("id")||config.currentModule+"/"+config.currentMethod);var i=t("main");i.on("click",".sidebar-toggle",function(){t.toggleSidebar(i.hasClass("hide-sidebar"))});var n=t.zui.store.get(h,e.data("hide")!==!1);n===!1&&e.addClass("no-animate"),t.toggleSidebar(n),n===!1&&setTimeout(function(){e.removeClass("no-animate")},500);var o=function(){var i=e.find(".sidebar-toggle");if(i.length){var n=i[0].getBoundingClientRect(),o=t(window).height(),s=Math.max(0,Math.floor(Math.min(o-40,n.top+n.height)-Math.max(n.top,0))/2)+(n.top<0?0-n.top:0);i.find(".icon").css("top",s)}};return o(),e.on("sidebar.toggle",o),t(window).on("resize",o).on("scroll",o),e.data("init",1),!0}};c()||t(c),t.toggleQueryBox=function(e,i){var n=t(i||"#queryBox");n.length&&(void 0===e&&(e=!n.hasClass("show")),n.toggleClass("show",!!e),n.data("init")||(n.addClass("load-indicator loading").data("init",1),t.get(t.createLink("search","buildForm"),function(t){n.html(t).removeClass("loading")})),t(".querybox-toggle").toggleClass("querybox-opened",e))},t(function(){var e=t("#queryBox");e.length&&(t(document).on("click",".querybox-toggle",function(){t.toggleQueryBox()}),e.hasClass("show")&&t.toggleQueryBox(!0))}),t.extend(t.fn.colorPicker.Constructor.DEFAULTS,{colors:["#3DA7F5","#75C941","#2DBDB2","#797EC9","#FFAF38","#FF4E3E"]}),window.setCheckedCookie=function(){var e=[],i=t('#mainContent .main-table tbody>tr input[type="checkbox"]:checked');i.each(function(){var i=parseInt(t(this).val(),10);NaN!==i&&e.push(i)}),t.cookie("checkedItem",e.join(","),{expires:config.cookieLife,path:config.webRoot})},t.extend(t.fn.modal.bs.Constructor.DEFAULTS,{scrollInside:!0,backdrop:"static",headerHeight:100}),t.extend(t.zui.ModalTrigger.DEFAULTS,{scrollInside:!0,backdrop:"static",headerHeight:40}),t.fn.initIframeModal=function(){return this.each(function(){var e=t(this);if(!e.parents('[data-ride="table"],.skip-iframe-modal').length){var i={type:"iframe"};e.hasClass("export")&&t.extend(i,{width:800,shown:setCheckedCookie},e.data()),e.modalTrigger(i)}})},t(function(){t("a.iframe,.export").initIframeModal()});var d=function(){var e,i,n=t(this),o=t.extend({limitSize:40,suffix:"…"},n.data()),s=n.text();if(s.length>o.limitSize){e=s,i=s.substr(0,o.limitSize)+o.suffix,n.text(i).addClass("limit-text-on");var a=o.toggleBtn?t(o.toggleBtn):n.next(".text-limit-toggle");a.text(a.data("textExpand")),a.on("click",function(){var t=n.toggleClass("limit-text-on").hasClass("limit-text-on");n.text(t?i:e),a.text(a.data(t?"textExpand":"textCollapse"))})}else(o.toggleBtn?t(o.toggleBtn):n.next(".text-limit-toggle")).hide()};t.fn.textLimit=function(){return this.each(d)},t(function(){t(".text-limit").textLimit()}),t.fixedTableHead=window.fixedTableHead=function(e,i){var n=t(e);if(n.is("table")||(n=n.find("table")),n.length){var o=t(i||window),s=null,a=function(){var e=n.children("thead"),i=e[0].getBoundingClientRect(),o=n.next(".fixed-head-table");if(i.top<0){var a=e.width();if(o.length){if(s!==a){s=a;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",a).on("resize",a),a()}},t(document).on("click","tr[data-url]",function(){var e=t(this),i=e.data("href")||e.data("url");i&&(window.location.href=i)}),"yes"===config.onlybody&&self===parent&&(window.location.href=window.location.href.replace("?onlybody=yes","").replace("&onlybody=yes","")),t(function(){t("body").addClass("m-{currentModule}-{currentMethod}".format(config))});var u,p,f,g,m,v=function(){u||(u=t("#subNavbar"),p=t("#pageNav"),f=t("#pageActions"),g=u.children(".nav"),m=g.outerWidth());var e=u.outerWidth(),i=p.outerWidth()||0,n=f.outerWidth()||0;if(i=i?i+15:0,n=n?n+15:0,!i&&!n)return void g.css({maxWidth:null,left:null,position:"static"});var o=Math.max(300,e-i-n),s=Math.min(o,m),a=(e-s)/2,r=i&&a.btn-toolbar");if(e.length){var i,n,o=!1,s=null,a=e.children(),r=a.length;for(a.each(function(e){i=t(this),n=i.is(".divider"),n&&!s&&i.hide(),o||n||(o=!0),s=n?null:i,!n||e!==r-1&&0!==e||i.hide()});i.length&&i.is(".divider");)i=i.hide().prev();o||e.hide()}};t(function(){t(".input-group,.btn-group").fixInputGroup(),k()}),window.holders&&t.each(window.holders,function(e){var i=t("#"+e);i.length&&i.is("input")&&i.attr("placeholder",window.holders[e])});var T=function(){var e,i="en"==config.clientLang?"http://www.zentao.pm/book/zentaomanual/8.html?fullScreen=zentao":"http://www.zentao.net/book/zentaopmshelp.html?fullScreen=zentao",n=t("#navbar > .nav").first(),o=1e4,s=function(){clearTimeout(e),t("#helpContent").removeClass("show-error")},a=t.openHelp=function(){s(),n.children("li.active:not(#helpMenuItem)").removeClass("active").addClass("close-help-tab"),t("#helpMenuItem").addClass("active");var a=t("#helpContent");if(a.length){if(t("body").hasClass("show-help-tab"))return void t("#helpIframe").get(0).contentWindow.location.replace(i)}else{a=t('

      '+lang.timeout+'

      '+i+'

      '),t("#header").after(a);var r=t("#helpIframe").get(0);e=setTimeout(function(){t("#helpContent").addClass("show-error")},o),r.onload=r.onreadystatechange=function(){this.readyState&&"complete"!=this.readyState||s()}}t("body").addClass("show-help-tab")},r=t.closeHelp=function(){t("body").removeClass("show-help-tab"),t("#helpMenuItem").removeClass("active"),n.find("li.close-help-tab").removeClass("close-help-tab").addClass("active").find("a").focus()};t(document).on("click",".open-help-tab",function(e){var i=t("#helpMenuItem");i.length||(i=t('
    • '+t(this).text()+'
    • '),n.append('
    • ').append(i)),a(),e.preventDefault()}).on("click",".close-help-tab",function(t){r(),t.stopPropagation(),t.preventDefault()})};t(T),t(function(){var e=t(".table-responsive"),i=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&&(i(),t(window).on("resize",i))});var S=function(){var e=this.value?this.scrollHeight+2+"px":"32px";this.style.height="auto",this.style.height=e,t(this).closest("tr").find("textarea").each(function(){this.style.height=e})};t.autoResizeTextarea=function(e){t(e).each(S)},t(function(){t("textarea.autosize").each(S),t(document).on("input keyup paste change","textarea.autosize",S)}),t(function(){var e=t("#dropMenu");e.length&&e.on("click",".toggle-right-col",function(t){e.toggleClass("show-right-col"),t.stopPropagation(),t.preventDefault()})});var D="undefined"!=typeof InstallTrigger;t.zui.browser.firefox=D,t("html").toggleClass("is-firefox",D).toggleClass("not-firefox",!D),t(function(){var e=t("#mainContent>.main-col"),i=e.children(".main-actions"),n=i.prev();if(i.length&&n.length){t('
      ').css("height",i.outerHeight()).insertAfter(i);var o=function(){var e=n[0].getBoundingClientRect(),o=e.top+e.height+120>t(window).height();t("body").toggleClass("main-actions-fixed",o),o&&i.width(n.width())};t.resetToolbarPosition=o,o(),t(window).on("resize scroll",o)}}),t(document).on("show.zui.modal",function(e){t("body.body-modal").length&&window.parent&&window.parent!==window&&t(e.target).is(".modal")&&window.parent.$("body").addClass("hide-modal-close")}).on("hidden.zui.modal",function(){t("body.body-modal").length&&window.parent&&window.parent!==window&&window.parent.$("body").removeClass("hide-modal-close")})}(jQuery); \ No newline at end of file