diff --git a/Makefile b/Makefile index 2435ae32e8..db4f18f7fd 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ VERSION = $(shell head -n 1 VERSION) +LITEVERSION = $(shell head -n 1 extension/lite/LITEVERSION) XUANVERSION = $(shell head -n 1 xuanxuan/XUANVERSION) XVERSION = $(shell head -n 1 xuanxuan/XVERSION) @@ -20,6 +21,8 @@ clean: rm -rf buildroot/ rm -fr lampp rm -fr zentaoxx + rm -fr tmp/ + rm -f *.sh common: mkdir zentaopms cp -fr api zentaopms/ @@ -132,7 +135,8 @@ zentaoxx: sed -i 's/commonModel::getLicensePropertyValue/extCommonModel::getLicensePropertyValue/g' zentaoxx/extension/xuan/im/model/conference.php sed -i 's/xxb_/zt_/g' zentaoxx/db/*.sql sed -i "s#\$this->app->getModuleRoot() . 'im/apischeme.json'#\$this->app->getExtensionRoot() . 'xuan/im/apischeme.json'#g" zentaoxx/extension/xuan/im/model.php - sed -i "/getModuleExtPath(/ r tools/fixxuan" zentaoxx/framework/xuanxuan.class.php + sed -i "s/'..\/..\/common\/view\/header.html.php'/\$$app->getModuleRoot() . 'common\/view\/header.html.php'/g" zentaoxx/extension/xuan/conference/view/admin.html.php + sed -i "s/'..\/..\/common\/view\/footer.html.php'/\$$app->getModuleRoot() . 'common\/view\/footer.html.php'/g" zentaoxx/extension/xuan/conference/view/admin.html.php echo "ALTER TABLE \`zt_user\` ADD \`pinyin\` varchar(255) NOT NULL DEFAULT '' AFTER \`realname\`;" >> zentaoxx/db/xuanxuan.sql mkdir zentaoxx/tools; cp tools/cn2tw.php zentaoxx/tools; cd zentaoxx/tools; php cn2tw.php cp tools/en2de.php zentaoxx/tools; cd zentaoxx/tools; php en2de.php ../ @@ -232,7 +236,7 @@ enrpm: rpmbuild -ba ~/rpmbuild/SPECS/zentaopms.spec cp ~/rpmbuild/RPMS/noarch/zentaoalm-${VERSION}-1.noarch.rpm ./ rm -rf ~/rpmbuild -ci: +ciCommon: git pull make common @@ -247,7 +251,23 @@ ci: rm -fr zentaopms zentaoxx zentaoxx.*.zip make en rm -fr zentaopms zentaoxx zentaoxx.*.zip - php tools/mergezentaopms.php $(VERSION) - rm -f zentaobiz*.zip zentaomax*.zip $(BUILD_PATH)/ZenTaoPMS.$(VERSION).zip $(RELEASE_PATH)/ZenTaoALM.$(VERSION)*.zip $(RELEASE_PATH)/ZenTaoPMS.$(VERSION)*.zip $(RELEASE_PATH)/*.deb $(RELEASE_PATH)/*.rpm - cp ZenTaoPMS.$(VERSION).zip $(BUILD_PATH) +ci: + make ciCommon + php tools/packZip.php $(VERSION) + sh zip.sh + rm -rf tmp/ + php tools/packDeb.php $(VERSION) + sh deb.sh + rm -rf tmp/ + php tools/packRpm.php $(VERSION) + sh rpm.sh + rm -rf tmp/ + rm -f zentaobiz*.zip zentaomax*.zip $(BUILD_PATH)/ZenTaoPMS.$(VERSION).zip $(RELEASE_PATH)/ZenTaoALM.$(VERSION)*.zip $(RELEASE_PATH)/ZenTaoPMS.$(VERSION)*.zip $(RELEASE_PATH)/*.deb $(RELEASE_PATH)/*.rpm *.sh + cp ZenTaoPMS.$(VERSION).zip $(BUILD_PATH) mv *.zip *.deb *.rpm $(RELEASE_PATH) +lite: + make ciCommon + php tools/packZip.php $(VERSION) $(LITEVERSION) + rm -f zentaobiz*.zip zentaomax*.zip $(BUILD_PATH)/ZenTaoPMS.$(VERSION).zip $(RELEASE_PATH)/ZenTaoALM.$(VERSION)*.zip $(RELEASE_PATH)/ZenTaoPMS.$(VERSION)*.zip $(RELEASE_PATH)/ZenTaoALM.$(LITEVERSION)*.zip $(RELEASE_PATH)/ZenTaoPMS.$(LITEVERSION)*.zip *.sh + cp ZenTaoPMS.$(VERSION).zip $(BUILD_PATH) + mv *.zip $(RELEASE_PATH) diff --git a/api/v1/entries/storyrecordestimate.php b/api/v1/entries/storyrecordestimate.php new file mode 100644 index 0000000000..bb4a86197b --- /dev/null +++ b/api/v1/entries/storyrecordestimate.php @@ -0,0 +1,61 @@ + + * @package entries + * @version 1 + * @link http://www.zentao.net + */ +class storyRecordEstimateEntry extends Entry +{ + /** + * GET method. + * + * @param int $storyID + * @access public + * @return void + */ + public function get($storyID) + { + if($this->config->edition == 'open') return $this->send400('ZenTaoPMS does not have story effort function.'); + + $control = $this->loadController('effort', 'createForObject'); + $control->createForObject('story', $storyID); + + $data = $this->getData(); + if(!$data) return $this->error('error'); + if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message); + + $effort = $data->data->efforts; + + $this->send(200, array('effort' => $effort)); + } + + /** + * POST method. + * + * @param int $storyID + * @access public + * @return void + */ + public function post($storyID) + { + if($this->config->edition == 'open') return $this->send400('ZenTaoPMS does not have story effort function.'); + + $fields = 'id,dates,consumed,objectType,objectID,work'; + $this->batchSetPost($fields); + $control = $this->loadController('effort', 'createForObject'); + $control->createForObject('story', $storyID); + + $data = $this->getData(); + if(!$data) return $this->send400('error'); + if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message); + + $story = $this->loadModel('story')->getById($storyID); + + $this->send(200, $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList')); + } +} diff --git a/api/v1/entries/taskbatchcreate.php b/api/v1/entries/taskbatchcreate.php index 22731a0cc1..6a65f4c898 100644 --- a/api/v1/entries/taskbatchcreate.php +++ b/api/v1/entries/taskbatchcreate.php @@ -82,5 +82,4 @@ class taskBatchCreateEntry extends Entry $task = $this->loadModel('task')->getById($taskID); return $this->send(200, array('task' => $task)); } - } diff --git a/api/v1/entries/taskrecordestimate.php b/api/v1/entries/taskrecordestimate.php index f3e1f9c518..9b0dae7740 100644 --- a/api/v1/entries/taskrecordestimate.php +++ b/api/v1/entries/taskrecordestimate.php @@ -36,8 +36,8 @@ class taskRecordEstimateEntry extends Entry if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message); $effort = array(); - if($this->config->edition != 'open' and $data->data->efforts) $effort = $data->data->efforts; - if($this->config->edition == 'open' and $data->data->esitimates) $effort = $data->data->esitimates; + if($this->config->edition != 'open' and $data->data->efforts) $effort = $data->data->efforts; + if($this->config->edition == 'open' and $data->data->estimates) $effort = $data->data->estimates; $this->send(200, array('effort' => $effort)); } @@ -71,6 +71,7 @@ class taskRecordEstimateEntry extends Entry if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message); $task = $this->loadModel('task')->getById($taskID); + $this->send(200, $this->format($task, 'deadline:date,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,realStarted:time,finishedBy:user,finishedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,lastEditedBy:user,lastEditedDate:time,deleted:bool,mailto:userList')); } } diff --git a/build/rpm/zentaopms.spec b/build/rpm/zentaopms.spec index f85ca245ed..aa3380fd29 100644 --- a/build/rpm/zentaopms.spec +++ b/build/rpm/zentaopms.spec @@ -1,3 +1,5 @@ +%define __os_install_post %{nil} + Name:zentaopms Version:7.1.stable Release:1 diff --git a/config/routes.php b/config/routes.php index fcfe3dd41e..0b12c61896 100644 --- a/config/routes.php +++ b/config/routes.php @@ -39,19 +39,19 @@ $routes['/products/:id/releases'] = 'releases'; $routes['/projects/:id/releases'] = 'projectReleases'; $routes['/releases/:id'] = 'release'; -$routes['/stories'] = 'stories'; -$routes['/products/:id/stories'] = 'stories'; -$routes['/projects/:id/stories'] = 'projectStories'; -$routes['/executions/:id/stories'] = 'executionStories'; -$routes['/stories/:id'] = 'story'; -$routes['/stories/:id/change'] = 'storyChange'; -$routes['/stories/:id/close'] = 'storyClose'; -$routes['/stories/:id/active'] = 'storyActive'; -$routes['/stories/:id/assign'] = 'storyAssignto'; -$routes['/stories/:id/recordEstimate'] = 'storyRecordEstimate'; -$routes['/stories/:id/child'] = 'storyChild'; -$routes['/stories/:id/recall'] = 'storyRecall'; -$routes['/stories/:id/review'] = 'storyReview'; +$routes['/stories'] = 'stories'; +$routes['/products/:id/stories'] = 'stories'; +$routes['/projects/:id/stories'] = 'projectStories'; +$routes['/executions/:id/stories'] = 'executionStories'; +$routes['/stories/:id'] = 'story'; +$routes['/stories/:id/change'] = 'storyChange'; +$routes['/stories/:id/close'] = 'storyClose'; +$routes['/stories/:id/active'] = 'storyActive'; +$routes['/stories/:id/assign'] = 'storyAssignto'; +$routes['/stories/:id/estimate'] = 'storyRecordEstimate'; +$routes['/stories/:id/child'] = 'storyChild'; +$routes['/stories/:id/recall'] = 'storyRecall'; +$routes['/stories/:id/review'] = 'storyReview'; $routes['/module/:id/stories'] = 'moduleStories'; @@ -73,16 +73,15 @@ $routes['/executions/:id'] = 'execution'; $routes['/executions/:id/tasks/batchCreate'] = 'taskBatchCreate'; $routes['/tasks/batchCreate'] = 'taskBatchCreate'; -$routes['/executions/:id/tasks'] = 'tasks'; -$routes['/tasks'] = 'tasks'; -$routes['/tasks/:id'] = 'task'; -$routes['/tasks/:id/assignto'] = 'taskAssignTo'; -$routes['/tasks/:id/start'] = 'taskStart'; -$routes['/tasks/:id/pause'] = 'taskPause'; -$routes['/tasks/:id/finish'] = 'taskFinish'; -$routes['/tasks/:id/close'] = 'taskClose'; -$routes['/tasks/:id/recordEstimate'] = 'taskRecordEstimate'; -$routes['/tasks/:id/getEstimate'] = 'taskRecordEstimate'; +$routes['/executions/:id/tasks'] = 'tasks'; +$routes['/tasks'] = 'tasks'; +$routes['/tasks/:id'] = 'task'; +$routes['/tasks/:id/assignto'] = 'taskAssignTo'; +$routes['/tasks/:id/start'] = 'taskStart'; +$routes['/tasks/:id/pause'] = 'taskPause'; +$routes['/tasks/:id/finish'] = 'taskFinish'; +$routes['/tasks/:id/close'] = 'taskClose'; +$routes['/tasks/:id/estimate'] = 'taskRecordEstimate'; $routes['/users'] = 'users'; $routes['/users/:id'] = 'user'; diff --git a/config/zentaopms.php b/config/zentaopms.php index d98d661166..c7ef2cd14a 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -217,6 +217,7 @@ $config->openMethods[] = 'kanban.importbuild'; $config->openMethods[] = 'kanban.activatecard'; $config->openMethods[] = 'kanban.finishcard'; $config->openMethods[] = 'kanban.deleteobjectcard'; +$config->openMethods[] = 'admin.ignore'; /* Define the tables. */ define('TABLE_COMPANY', '`' . $config->db->prefix . 'company`'); diff --git a/extension/lite/project/ext/lang/zh-cn/lite.php b/extension/lite/project/ext/lang/zh-cn/lite.php index 4f6daf40dd..109b554f69 100644 --- a/extension/lite/project/ext/lang/zh-cn/lite.php +++ b/extension/lite/project/ext/lang/zh-cn/lite.php @@ -1,6 +1,6 @@ project->leftStories = '剩余目标'; -$lang->project->doingExecutions = '进行中的看板'; +$lang->project->doingExecutions = '进行中的看板(最近1个)'; $lang->project->select = "请选择{$lang->project->common}"; $lang->project->noProject = "暂时没有{$lang->project->common}。"; diff --git a/module/action/model.php b/module/action/model.php index 436fec69bc..af3fc79bff 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -431,7 +431,7 @@ class actionModel extends model $name = $this->dao->select('name')->from(TABLE_TESTTASK)->where('id')->eq($action->extra)->fetch('name'); if($name) $action->extra = common::hasPriv('testtask', 'view') ? html::a(helper::createLink('testtask', 'view', "taskID=$action->extra"), $name) : $name; } - elseif($actionName == 'tostory') + elseif($action->objectType != 'feedback' and $actionName == 'tostory') { $title = $this->dao->select('title')->from(TABLE_STORY)->where('id')->eq($action->extra)->fetch('title'); if($title) $action->extra = common::hasPriv('story', 'view') ? html::a(helper::createLink('story', 'view', "storyID=$action->extra"), "#$action->extra " . $title) : "#$action->extra " . $title; @@ -462,7 +462,7 @@ class actionModel extends model } $action->extra = trim(trim($action->extra), ','); } - elseif($actionName == 'totask' or $actionName == 'linkchildtask' or $actionName == 'unlinkchildrentask' or $actionName == 'linkparenttask' or $actionName == 'unlinkparenttask' or $actionName == 'deletechildrentask') + elseif($action->objectType != 'feedback' and (strpos(',totask,linkchildtask,unlinkchildrentask,linkparenttask,unlinkparenttask,deletechildrentask,', ",$actionName,") !== false)) { $name = $this->dao->select('name')->from(TABLE_TASK)->where('id')->eq($action->extra)->fetch('name'); if($name) $action->extra = common::hasPriv('task', 'view') ? html::a(helper::createLink('task', 'view', "taskID=$action->extra"), "#$action->extra " . $name) : "#$action->extra " . $name; diff --git a/module/admin/control.php b/module/admin/control.php index cd0dc6f8a0..b29a8ec5b1 100644 --- a/module/admin/control.php +++ b/module/admin/control.php @@ -47,10 +47,10 @@ class admin extends control */ public function ignore() { + $account = $this->app->user->account; $this->loadModel('setting'); - $this->setting->deleteItems('owner=system&module=common§ion=global&key=community'); $this->setting->deleteItems('owner=system&module=common§ion=global&key=ztPrivateKey'); - $this->setting->setItem('system.common.global.community', 'na'); + $this->setting->setItem("$account.common.global.community", 'na'); echo js::locate(inlink('index'), 'parent'); } diff --git a/module/api/css/index.css b/module/api/css/index.css index 2b3b4a18de..0a5dd949bf 100644 --- a/module/api/css/index.css +++ b/module/api/css/index.css @@ -113,3 +113,12 @@ .paramsTable th {text-align: left!important; font-size: 14px;} .paramsTable td {text-align: left;} + +.tree-group {position: relative;} +.tree-group > .module-name {white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; display: block;} +.tree li.active > .tree-group a {font-weight: 700; color: #0c64eb;} +.tree-actions {display: inline-block; margin-left: 5px; vertical-align: middle;} +.tree-group .tree-actions {display: none; position: absolute; right: 0; top: 0; background-color: #fff; white-space: nowrap;} +.tree-group:hover .tree-actions {display: block} +.tree-actions a {display: inline-block; margin-left: 5px; font-size: 13px; opacity: .6;} +.tree li.active > .tree-group a {font-weight: 700; color: #0c64eb;} diff --git a/module/block/control.php b/module/block/control.php index d8a6a8e4e1..7a5c2d85bf 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -1705,11 +1705,11 @@ class block extends control $hasViewPriv = array(); if(common::hasPriv('todo', 'view')) $hasViewPriv['todo'] = true; if(common::hasPriv('task', 'view')) $hasViewPriv['task'] = true; - if(common::hasPriv('bug', 'view')) $hasViewPriv['bug'] = true; - if(common::hasPriv('story', 'view')) $hasViewPriv['story'] = true; - if(common::hasPriv('risk', 'view') and $this->config->edition == 'max') $hasViewPriv['risk'] = true; - if(common::hasPriv('issue', 'view') and $this->config->edition == 'max') $hasViewPriv['issue'] = true; - if(common::hasPriv('meeting', 'view') and $this->config->edition == 'max') $hasViewPriv['meeting'] = true; + if(common::hasPriv('bug', 'view') and $this->config->vision != 'lite') $hasViewPriv['bug'] = true; + if(common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['story'] = true; + if(common::hasPriv('risk', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['risk'] = true; + if(common::hasPriv('issue', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['issue'] = true; + if(common::hasPriv('meeting', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['meeting'] = true; $params = $this->get->param; $params = json_decode(base64_decode($params)); diff --git a/module/bug/model.php b/module/bug/model.php index d07cfe6a95..6c663c6fd2 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1783,6 +1783,8 @@ class bugModel extends model public function getProductMemberPairs($productID) { + if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getTeamMembersPairs(); + $projects = $this->loadModel('product')->getProjectPairsByProduct($productID); $users = $this->dao->select("t2.id, t2.account, t2.realname")->from(TABLE_TEAM)->alias('t1') diff --git a/module/common/model.php b/module/common/model.php index 5f6c449edc..974e31c88c 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -485,8 +485,6 @@ class commonModel extends model /* The standalone lite version removes the lite interface button */ if(trim($config->visions, ',') == 'lite') return true; - if($app->config->systemMode != 'new') return print("
{$lang->visionList['rnd']}
"); - if(count($userVisions) < 2) return print("
{$lang->visionList[$currentVision]}
"); if(count($configVisions) < 2) return print("
{$lang->visionList[$currentVision]}
"); @@ -579,7 +577,7 @@ class commonModel extends model $params = "objectType=&objectID=0&libID=0"; $createMethod = 'selectLibType'; $isOnlyBody = true; - $attr = "class='iframe' data-width='650px'"; + $attr = "class='iframe' data-width='700px'"; break; case 'project': if($config->vision == 'lite') diff --git a/module/convert/css/initjirauser.en.css b/module/convert/css/initjirauser.en.css new file mode 100644 index 0000000000..bd756c15c4 --- /dev/null +++ b/module/convert/css/initjirauser.en.css @@ -0,0 +1 @@ +#createForm table th {width: 125px;} diff --git a/module/convert/lang/en.php b/module/convert/lang/en.php index 7a45fbe4a7..b28d08d0f9 100644 --- a/module/convert/lang/en.php +++ b/module/convert/lang/en.php @@ -121,7 +121,7 @@ $lang->convert->jira->next = 'Next'; $lang->convert->jira->importFromDB = 'Import From Database'; $lang->convert->jira->importFromFile = 'Import From File'; $lang->convert->jira->mapJira2Zentao = 'Map Jira To Zentao'; -$lang->convert->jira->dbNameNotice = "Database"; +$lang->convert->jira->dbNameNotice = "Please enter the Jira database name."; $lang->convert->jira->importNotice = 'Notice: Importing data is risky! Make sure to complete the following steps in sequence before merging.'; $lang->convert->jira->dbDesc = '

If your Jira uses MySQL database, please choose this way.

'; $lang->convert->jira->fileDesc = '

Choose this method if your Jira uses a non-MySQL database.

'; diff --git a/module/convert/view/importnotice.html.php b/module/convert/view/importnotice.html.php index aa762711f1..094d0887c1 100644 --- a/module/convert/view/importnotice.html.php +++ b/module/convert/view/importnotice.html.php @@ -35,7 +35,7 @@ li .form-control {margin-top: 10px}
  • convert->jira->importSteps[$method][5];?> - convert->jira->dbNameNotice}");?> +
    convert->jira->dbNameNotice}'");?>
  • diff --git a/module/convert/view/initjirauser.html.php b/module/convert/view/initjirauser.html.php index 91959aa079..a3164f8ee3 100644 --- a/module/convert/view/initjirauser.html.php +++ b/module/convert/view/initjirauser.html.php @@ -23,14 +23,14 @@ - + convert->jira->passwordNotice;?> user->password2;?> - + user->group;?> diff --git a/module/convert/view/mapjira2zentao.html.php b/module/convert/view/mapjira2zentao.html.php index 3ba45e3332..47a9d55006 100644 --- a/module/convert/view/mapjira2zentao.html.php +++ b/module/convert/view/mapjira2zentao.html.php @@ -26,19 +26,9 @@ -
    - goback, '', "class='btn btn-wide'"); - } - ?> - convert->jira->next, "data-placement='bottom'");?> -
    - + @@ -54,11 +44,8 @@ -
    convert->jira->jiraObject;?>
    -
    - - - + + @@ -74,11 +61,8 @@ -
    convert->jira->jiraLinkType;?>
    -
    - - - + + @@ -96,11 +80,8 @@ -
    convert->jira->jiraResolution;?>
    -
    - - - + + @@ -122,7 +103,21 @@ + + + + + +
    convert->jira->jiraStatus;?>
    + convert->jira->next, "data-placement='bottom'");?> + goback, '', "class='btn btn-wide'"); + } + ?> +
    - diff --git a/module/doc/control.php b/module/doc/control.php index 5bc5930f08..280558756a 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -351,6 +351,8 @@ class doc extends control $this->view->title = $libName . $this->lang->doc->create; + $this->view->objectType = $objectType; + $this->view->objectID = $objectID; $this->view->libID = $libID; $this->view->libs = $libs; $this->view->gobackLink = $gobackLink; diff --git a/module/doc/js/create.js b/module/doc/js/create.js index d6e045d74d..bc3b5b57a6 100644 --- a/module/doc/js/create.js +++ b/module/doc/js/create.js @@ -59,6 +59,8 @@ $(function() } }, 200); }); + + if($(".createCustomLib").length == 1) $(".createCustomLib").click(); // Fix bug #15139. }) function toggleEditor(type) diff --git a/module/doc/js/selectlibtype.js b/module/doc/js/selectlibtype.js index d0983905aa..2b1db0b934 100644 --- a/module/doc/js/selectlibtype.js +++ b/module/doc/js/selectlibtype.js @@ -8,6 +8,13 @@ function redirectParentWindow(objectType) { config.onlybody = 'no'; - var link = createLink('doc', 'create', 'objectType=' + objectType + '&objectID=0&libID=0') + '#app=doc'; + if(objectType == 'api') + { + var link = createLink('api', 'create', 'libID=0') + '#app=doc'; + } + else + { + var link = createLink('doc', 'create', 'objectType=' + objectType + '&objectID=0&libID=0') + '#app=doc'; + } window.parent.$.apps.open(link); } diff --git a/module/doc/lang/en.php b/module/doc/lang/en.php index 263a30f556..f21f1e0258 100644 --- a/module/doc/lang/en.php +++ b/module/doc/lang/en.php @@ -127,6 +127,8 @@ if($config->systemMode == 'new') $lang->doc->libTypeList['project'] = 'Project L $lang->doc->libTypeList['execution'] = $lang->execution->common . ' Library'; $lang->doc->libTypeList['custom'] = 'Custom Library'; +$lang->doc->libGlobalList['api'] = 'Api Libray'; + $lang->doc->libIconList['product'] = 'icon-product'; $lang->doc->libIconList['execution'] = 'icon-stack'; $lang->doc->libIconList['custom'] = 'icon-folder-o'; diff --git a/module/doc/lang/zh-cn.php b/module/doc/lang/zh-cn.php index cfbd42c599..279b396419 100644 --- a/module/doc/lang/zh-cn.php +++ b/module/doc/lang/zh-cn.php @@ -127,6 +127,8 @@ if($config->systemMode == 'new') $lang->doc->libTypeList['project'] = '项目文 $lang->doc->libTypeList['execution'] = $lang->execution->common . '文档库'; $lang->doc->libTypeList['custom'] = '自定义文档库'; +$lang->doc->libGlobalList['api'] = '接口文档库'; + $lang->doc->libIconList['product'] = 'icon-product'; $lang->doc->libIconList['execution'] = 'icon-stack'; $lang->doc->libIconList['custom'] = 'icon-folder-o'; diff --git a/module/doc/model.php b/module/doc/model.php index c3cbdba155..2b1aea9e20 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -2305,10 +2305,16 @@ EOT; foreach($moduleDocs[0] as $doc) { $treeMenu[0] .= 'id == $docID ? ' class="active"' : ' class="independent"') . '>'; + $treeMenu[0] .= "
    " . html::a(inlink('index', "libID=$rootID&moduelID=0&apiID={$doc->id}"), "  " . $doc->title, '', "data-app='{$this->app->tab}' class='doc-title' title='{$doc->title}'") . ''; - $treeMenu[0] .= html::a(inlink('index', "libID=$rootID&moduelID=0&apiID={$doc->id}"), "  " . $doc->title, '', "data-app='{$this->app->tab}' class='doc-title' title='{$doc->title}'"); + if(common::hasPriv('api', 'edit')) + { + $treeMenu[0] .= "
    "; + $treeMenu[0] .= html::a(helper::createLink('api', 'edit', "docID={$doc->id}"), "", '', "title={$this->lang->doc->edit} data-app='{$this->app->tab}'"); + $treeMenu[0] .= '
    '; + } - $treeMenu[0] .= ''; + $treeMenu[0] .= '
    '; } } diff --git a/module/doc/view/browse.html.php b/module/doc/view/browse.html.php index 6df4aa395b..5e242d730b 100644 --- a/module/doc/view/browse.html.php +++ b/module/doc/view/browse.html.php @@ -19,16 +19,7 @@
    -

    - doc->noDoc;?> - - doc->noEditedDoc;?> - - doc->noOpenedDoc;?> - - doc->noCollectedDoc;?> - -

    +

    doc->noDoc;?>

    diff --git a/module/doc/view/create.html.php b/module/doc/view/create.html.php index 83f3ec807b..55190bbf02 100644 --- a/module/doc/view/create.html.php +++ b/module/doc/view/create.html.php @@ -45,6 +45,9 @@ $("a[href^='###']").click(function()

    doc->create;?>

    + + ' . $lang->doc->createLib, '', 'class="iframe hidden createCustomLib"');?> +
    diff --git a/module/doc/view/index.html.php b/module/doc/view/index.html.php index 8ef737c7c9..76807bdacd 100644 --- a/module/doc/view/index.html.php +++ b/module/doc/view/index.html.php @@ -23,6 +23,11 @@
  • createLink('doc', 'browse', "browseType=byediteddate"), '', '', "title='{$lang->more}'");?>
  • + +
    +

    doc->noDoc;?>

    +
    +
    @@ -45,6 +50,7 @@
    +
    @@ -129,6 +135,11 @@
  • createLink('doc', 'browse', "browseType=openedbyme"), '', '', "title='{$lang->more}'");?>
  • + +
    +

    doc->noDoc;?>

    +
    +
    @@ -151,6 +162,7 @@
    +
    @@ -161,6 +173,11 @@
  • createLink('doc', 'browse', "browseType=collectedbyme"), '', '', "title='{$lang->more}'");?>
  • + +
    +

    doc->noDoc;?>

    +
    +
    @@ -181,6 +198,7 @@
    + diff --git a/module/doc/view/selectlibtype.html.php b/module/doc/view/selectlibtype.html.php index 13712afe88..dea3ce77c7 100644 --- a/module/doc/view/selectlibtype.html.php +++ b/module/doc/view/selectlibtype.html.php @@ -21,7 +21,8 @@ - + doc->libTypeList + $lang->doc->libGlobalList;?> + diff --git a/module/execution/control.php b/module/execution/control.php index 916ddde0c9..e27e25e6c4 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -613,7 +613,7 @@ class execution extends control $bugModules = array(); foreach($products as $productID => $productName) { - $productModules = $this->tree->getOptionMenu($productID, 'bug', 0); + $productModules = $this->tree->getOptionMenu($productID, 'bug', 0, 'all'); foreach($productModules as $moduleID => $moduleName) { if(empty($moduleID)) @@ -2549,8 +2549,6 @@ class execution extends control if($executionType == 'stage') { if(!isset($_POST['products'])) return print(js::alert($this->lang->execution->noLinkProduct) . js::locate($this->createLink('execution', 'manageProducts', "executionID=$executionID&from=$from"))); - - if(count($_POST['products']) > 1) return print(js::alert($this->lang->execution->oneProduct) . js::locate($this->createLink('execution', 'manageProducts', "executionID=$executionID&from=$from"))); } $oldProducts = $this->product->getProducts($executionID); diff --git a/module/execution/js/kanban.js b/module/execution/js/kanban.js index 958232cac8..688ce2b762 100644 --- a/module/execution/js/kanban.js +++ b/module/execution/js/kanban.js @@ -1020,6 +1020,7 @@ function updateKanban(kanbanData, regionID = 0) { setTimeout(function() { + $.zui.closeModal(); if(regionID) { updateRegion(regionID, kanbanData[regionID]); diff --git a/module/index/js/index.js b/module/index/js/index.js index 0e45e36856..1dcc343279 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -267,6 +267,7 @@ var $bar = $('#appBar-' + appCode); if(!$bar.length) { + if (typeof(app.text) == 'undefined') return false; var $link= $('') .attr('data-app', appCode) .attr('class', 'show-in-app') diff --git a/module/install/css/common.css b/module/install/css/common.css index a20948a759..9d5cdec9ec 100644 --- a/module/install/css/common.css +++ b/module/install/css/common.css @@ -1,6 +1,6 @@ body {background: #f1f1f1;} .container {padding: 0;} -.modal-dialog {width: 100%;} +.modal-dialog {width: 100%; margin-top: 20px;} .modal-footer {text-align: center; margin-top: 0;} .w-350px {width: 350px;} diff --git a/module/install/model.php b/module/install/model.php index c4ab6ccb7b..5961e2d9b2 100644 --- a/module/install/model.php +++ b/module/install/model.php @@ -502,10 +502,14 @@ class installModel extends model */ public function grantPriv() { + $data = fixer::input('post') + ->stripTags('company') + ->get(); + $requiredFields = explode(',', $this->config->install->step5RequiredFields); foreach($requiredFields as $field) { - if(empty($this->post->{$field})) + if(empty($data->{$field})) { dao::$errors[] = $this->lang->install->errorEmpty[$field]; return false; @@ -514,7 +518,7 @@ class installModel extends model /* Insert a company. */ $company = new stdclass(); - $company->name = $this->post->company; + $company->name = $data->company; $company->admins = ",{$this->post->account},"; $this->dao->insert(TABLE_COMPANY)->data($company)->autoCheck()->exec(); if(!dao::isError()) diff --git a/module/kanban/control.php b/module/kanban/control.php index c5605006db..68b493e551 100644 --- a/module/kanban/control.php +++ b/module/kanban/control.php @@ -867,6 +867,7 @@ class kanban extends control $this->view->card = $card; $this->view->actions = $this->action->getList('kanbancard', $cardID); $this->view->users = $users; + $this->view->kanban = $kanban; $this->display(); } @@ -1317,6 +1318,9 @@ class kanban extends control */ public function viewArchivedCard($regionID) { + $region = $this->kanban->getRegionByID($regionID); + + $this->view->kanban = $this->kanban->getByID($region->kanban); $this->view->cards = $this->kanban->getCardsByObject('region', $regionID, 1); $this->view->users = $this->loadModel('user')->getPairs('noletter|nodeleted'); $this->view->userIdPairs = $this->user->getPairs('noletter|nodeleted|showid'); diff --git a/module/kanban/css/view.css b/module/kanban/css/view.css index 56180ca8a7..99f10912c9 100644 --- a/module/kanban/css/view.css +++ b/module/kanban/css/view.css @@ -28,7 +28,7 @@ .region .kanban .form-actions .btn {margin-right: 10px; min-width: 50px;} .region .kanban-board + .kanban-board {margin-top: 20px;} -.region .kanban-board > .kanban-header > .kanban-group-header {padding: 8px 2px; width: 20px;} +.region .kanban-board > .kanban-header > .kanban-group-header {padding: 7px 0; width: 20px; text-align: center;} .region .kanban-board > .kanban-header > .kanban-group-header:hover {cursor: move;} .region .kanban-board.sort > .kanban-header {padding-left: 0;} @@ -40,7 +40,7 @@ .region .kanban-header-col > .title > .count {opacity: .5; font-weight: bold; color: #8b91a2;} .region .kanban-header-col > .title > .error {color: #333333; padding-left: 2px; font-size: 10px; padding-top: 1px; padding-right: 2px;} .kanban-affixed .kanban-header-col > .title > .text {color: #fff!important} -.region .kanban-header-col > .actions {position: relative; right: -5px;} +.region .kanban-header-col > .actions {position: relative;} .region .kanban-header-parent-col > .actions {position: absolute; right: 0px;} .region .kanban-header-sub-cols .actions {position: absolute; right: 0px;} @@ -56,8 +56,6 @@ .region .kanban-lane-col {max-height: unset !important; overflow: auto; position: relative;} .region .kanban-lane-col.has-scrollbar > .kanban-lane-actions {position: absolute; background-color: inherit; bottom: 0; left: 0; right: 0;} -.region .kanban-lane-items {overflow: overlay !important; padding-bottom: 10px;} - .kanban-item {position: relative} .kanban-item > .kanban-card > .title {display: block; line-height: 18px;} .kanban-item > .kanban-card > .title:hover {color: #2272eb} @@ -79,7 +77,7 @@ .kanban-item .has-color .actions .icon-more-v, .kanban-item .has-color .info > .label-pri, .kanban-item .has-color .info > .estimate, -.kanban-item .has-color .info > .user .lable-teamSumCount, +.kanban-item .has-color .info > .user .label-teamSumCount, .kanban-item .has-color .info > .label-light {color: #FFFFFF;} .kanban-item .has-color .info > .label-pri {border-color: #FFFFFF;} .kanban-item .has-color .progress-box > .progress-number {color: #FFFFFF;} @@ -100,8 +98,14 @@ .kanban-col[data-type=ADD] {display: none;} .kanban-col[data-type=EMPTY] {display: none;} .kanban-col {padding-right: 0px !important;} +.kanban-col.drag-shadow {background-color: #ededed !important; border-color: #ededed!important; box-shadow: 0 4px 10px 0 rgb(0,0,0, 0.05), 0 4px 20px 0 rgb(0,0,0, .3); min-height: 30px!important;} +.kanban-col.drag-shadow .kanban-header-col {min-height: 30px!important;} +.kanban-header-has-parent .kanban-header-cols > .kanban-col.drag-shadow, +.kanban-col.kanban-header-parent-col.drag-shadow {min-height: 64px!important;} +.kanban-col.drag-shadow > .actions {visibility: hidden!important;} .kanban-item .title {padding-right: 10px;} .gray .actions {display:none;} +.kanban-cols-sorting .kanban-item {visibility: hidden!important;} .kanban-card .header .executionName {display: flex; width: 100%; float: left;} .kanban-card .header .executionName .title {padding-right: 0px; margin-right: 5px; overflow: hidden; white-space: nowrap;} diff --git a/module/kanban/js/view.js b/module/kanban/js/view.js index 531b664c2c..7d87f0342e 100644 --- a/module/kanban/js/view.js +++ b/module/kanban/js/view.js @@ -40,7 +40,7 @@ function fullScreen() $('.action').hide(); $('.kanban-group-header').hide(); $(".title").attr("disabled", true).css("pointer-events", "none"); - $('#kanban').sortable('destroy'); + window.sortableDisabled = true; $.cookie('isFullScreen', 1); }; @@ -82,7 +82,7 @@ function exitFullScreen() $('.action').show(); $('.kanban-group-header').show(); $(".title").attr("disabled", false).css("pointer-events", "auto"); - initSortable(); + window.sortableDisabled = false; $.cookie('isFullScreen', 0); } @@ -130,10 +130,7 @@ function renderHeaderCol($column, column, $header, kanbanData) } } - var regionID = $column.closest('.kanban').data('id'); - var groupID = $column.closest('.kanban-board').data('id'); var laneID = column.$kanbanData.lanes[0].id ? column.$kanbanData.lanes[0].id : 0; - var columnID = $column.closest('.kanban-col').data('id'); var printMoreBtn = (columnPrivs.includes('setColumn') || columnPrivs.includes('setWIP') || columnPrivs.includes('createColumn') || columnPrivs.includes('copyColumn') || columnPrivs.includes('archiveColumn') || columnPrivs.includes('deleteColumn') || columnPrivs.includes('splitColumn')); /* Render more menu. */ @@ -146,7 +143,7 @@ function renderHeaderCol($column, column, $header, kanbanData) var $actions = $column.children('.actions'); if(column.parent != -1) { - addItemBtn = ['', '', ''].join(''); + addItemBtn = [''].join(''); } var moreAction = ' '; @@ -238,7 +235,6 @@ function renderLaneName($lane, lane, $kanban, columns, kanban) function renderUsersAvatar(users, itemID, size) { var avatarSizeClass = 'avatar-' + (size || 'md'); - //var link = createLink('kanban', 'assigncard', 'id=' + itemID, '', true); if(users.length == 0 || (users.length == 1 && users[0] == '')) { @@ -1019,19 +1015,20 @@ function handleKanbanAction(action, $element, event, kanban) function processMinusBtn() { - var columnCount = $('#splitTable .child-column').size(); + var $table = $('#splitTable'); + var columnCount = $table.find('.child-column').length; if(columnCount > 2 && columnCount < 10) { - $('#splitTable .btn-plus').show(); - $('#splitTable .btn-close').show(); + $table.find('.btn-plus').show(); + $table.find('.btn-close').show(); } else if(columnCount <= 2) { - $('#splitTable .btn-close').hide(); + $table.find('.btn-close').hide(); } else if(columnCount >= 10) { - $('#splitTable .btn-plus').hide(); + $table.find('.btn-plus').hide(); } } @@ -1192,6 +1189,28 @@ function calcColHeight(col, lane, colCards, colHeight, kanban) return (displayCards * (options.cardHeight + options.cardSpace) + options.cardSpace); } +/** Handle sort cards */ +function handleSortCards(event) +{ + var newLaneID = event.element.closest('.kanban-lane').data('id'); + var newColID = event.element.closest('.kanban-col').data('id'); + var orders = []; + event.list.each(function(_, item){orders.push(item.item.data('id'));}); + var url = createLink('kanban', 'sortCard', 'kanbanID=' + kanbanID + '&laneID=' + newLaneID + '&columnID=' + newColID + '&cards=' + orders.join(',')); + + $.getJSON(url, function(response) + { + if(response.result === 'fail') + { + if(typeof response.message === 'string' && response.message.length) + { + bootbox.alert(response.message); + } + setTimeout(function(){return location.reload()}, 3000); + } + }); +} + /* Define menu creators */ window.menuCreators = { @@ -1228,12 +1247,13 @@ function initKanban($kanban) onRenderLaneName: renderLaneName, onRenderHeaderCol: renderHeaderCol, onRenderCount: renderCount, + sortable: handleSortCards, droppable: { target: findDropColumns, finish: handleFinishDrop, mouseButton: 'left' - } + }, }); $kanban.on('click', '.action-cancel', hideKanbanAction); @@ -1354,7 +1374,6 @@ $(function() $('.color0 .cardcolor').css('border', '1px solid #fff'); }); - /* Init sortable */ initSortable(); @@ -1364,31 +1383,30 @@ $(function() function initSortable() { var sortType = ''; - var oldLaneID = ''; - var oldColID = ''; var $cards = null; $('#kanban').sortable( { - selector: '.region, .kanban-board, .kanban-lane, .kanban-item.sort, .kanban-col', - trigger: '.region.sort > .region-header, .kanban-board.sort > .kanban-header > .kanban-group-header, .kanban-lane.sort > .kanban-lane-name, .kanban-item.sort, .kanban-header-col.sort', + selector: '.region, .kanban-board, .kanban-lane, .kanban-col', + trigger: '.region.sort > .region-header, .kanban-board.sort > .kanban-header > .kanban-group-header, .kanban-lane.sort > .kanban-lane-name, .kanban-header-col.sort', container: function($ele) { return $ele.parent(); }, targetSelector: function($ele) { + var $parent = $ele.parent(); /* Sort regions. */ if($ele.hasClass('region')) { sortType = 'region'; - return $ele.parent().children('.region'); + return $parent.children('.region'); } /* Sort boards. */ if($ele.hasClass('kanban-board')) { sortType = 'board'; - return $ele.parent().children('.kanban-board'); + return $parent.children('.kanban-board'); } /* Sort lanes. */ @@ -1397,23 +1415,19 @@ function initSortable() sortType = 'lane'; $cards = $ele.find('.kanban-item'); - return $ele.parent().children('.kanban-lane'); + return $parent.children('.kanban-lane'); } /* Sort columns. */ if($ele.hasClass('kanban-col')) { sortType = 'column'; - return $ele.parent().children('.kanban-col'); - } - - /* Sort cards. */ - if($ele.hasClass('kanban-item')) - { - sortType = 'card'; - return $ele.parent().children('.kanban-item'); + return $parent.children('.kanban-col'); } }, + before: function() { + return !window.sortableDisabled; + }, start: function(e) { if(sortType == 'region') @@ -1428,17 +1442,11 @@ function initSortable() $('.region').find('.kanban').hide(); hideKanbanAction(); } - - if(sortType == 'column') + else if(sortType === 'column') { - $('.kanban-item').addClass('hidden'); - } - - if(sortType == 'card') - { - oldLaneID = e.element.closest('.kanban-lane').data('id'); - oldColID = e.element.closest('.kanban-col').data('id'); + e.element.closest('.kanban-board').addClass('kanban-cols-sorting'); } + $('#kanban').attr('data-sort-by', sortType); }, finish: function(e) { @@ -1464,7 +1472,7 @@ function initSortable() url = createLink('kanban', 'sortRegion', 'regions=' + orders.join(',')); } - if(sortType == 'board') + else if(sortType == 'board') { regionID = e.element.closest('.region').data('id'); e.list.each(function(index, data) @@ -1474,7 +1482,7 @@ function initSortable() url = createLink('kanban', 'sortGroup', 'region=' + regionID + '&groups=' + orders.join(',')); } - if(sortType == 'lane') + else if(sortType == 'lane') { var groupID = e.element.closest('.kanban-board').data('id'); e.list.each(function(index, data) @@ -1485,7 +1493,7 @@ function initSortable() regionID = e.element.closest('.region').data('id'); url = createLink('kanban', 'sortLane', 'region=' + regionID + '&lanes=' + orders.join(',')); } - if(sortType == 'column') + else if(sortType == 'column') { var groupID = e.element.closest('.kanban-board').data('id'); e.list.each(function(index, data) @@ -1496,35 +1504,28 @@ function initSortable() regionID = e.element.closest('.region').data('id'); url = createLink('kanban', 'sortColumn', 'region=' + regionID + '&kanbanID=' + kanban.id + '&columns=' + orders.join(',')); } - if(sortType == 'card') - { - var newLaneID = e.element.closest('.kanban-lane').data('id'); - var newColID = e.element.closest('.kanban-col').data('id'); - e.list.each(function(index, data) - { - if(data.item.data('item') != undefined && data.item.data('item').column == newColID && data.item.data('item').lane == newLaneID) orders.push(data.item.data('item').id); - }); - if(newLaneID == oldLaneID && newColID == oldColID && orders.length > 0) url = createLink('kanban', 'sortCard', 'kanbanID=' + kanbanID + '&laneID=' + newLaneID + '&columnID=' + newColID + '&cards=' + orders.join(',')); - } if(!url) return true; $.getJSON(url, function(response) { - if(response.result == 'fail' && response.message.length) + if(response.result == 'fail') { - bootbox.alert(response.message); + if(typeof response.message === 'string' && response.message.length) + { + bootbox.alert(response.message); + } setTimeout(function(){return location.reload()}, 3000); } else if (sortType == 'column') { updateRegion(regionID, response[regionID]); } - $('.kanban-item').removeClass('hidden'); }); }, always: function(e) { if(sortType == 'lane') $cards.show(); + $('#kanban').find('.kanban-cols-sorting').removeClass('kanban-cols-sorting'); } }); } diff --git a/module/kanban/model.php b/module/kanban/model.php index a8e8f6a520..4eb3bb6a69 100644 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -2507,8 +2507,7 @@ class kanbanModel extends model $otherCardList = ''; $otherLanes = $this->dao->select('t2.id, t2.cards')->from(TABLE_KANBANLANE)->alias('t1') ->leftJoin(TABLE_KANBANCELL)->alias('t2')->on('t1.id=t2.lane') - ->where('t1.deleted')->eq(0) - ->andWhere('t1.id')->ne($lane->id) + ->where('t1.id')->ne($lane->id) ->andWhere('t1.execution')->eq($executionID) ->andWhere('t2.`type`')->eq($lane->type) ->fetchPairs(); diff --git a/module/kanban/view/editcard.html.php b/module/kanban/view/editcard.html.php index 22c6b4eb4a..1a39158fa1 100644 --- a/module/kanban/view/editcard.html.php +++ b/module/kanban/view/editcard.html.php @@ -71,7 +71,7 @@ - progress):?> + performable):?> - progress):?> + performable):?> diff --git a/module/productplan/model.php b/module/productplan/model.php index 72554d9352..3f492c6dd2 100644 --- a/module/productplan/model.php +++ b/module/productplan/model.php @@ -449,7 +449,7 @@ class productplanModel extends model $stories = $this->dao->select('*')->from(TABLE_STORY)->where("CONCAT(',', plan, ',')")->like("%,{$plan->parent},%")->fetchAll('id'); foreach($stories as $storyID => $story) { - $storyPlan = str_replace(",{$plan->parent},", ",$planID,", ",$storyPlan,"); + $storyPlan = str_replace(",{$plan->parent},", ",$planID,", ",$story->plan,"); $storyPlan = trim($storyPlan, ','); $this->dao->update(TABLE_STORY)->set('plan')->eq($storyPlan)->where('id')->eq($storyID)->exec(); diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php index f8f21a8871..b73ddad11a 100644 --- a/module/project/lang/zh-cn.php +++ b/module/project/lang/zh-cn.php @@ -167,7 +167,7 @@ $lang->project->typeList['other'] = '其他项目'; $lang->project->waitProjects = '未开始的项目'; $lang->project->doingProjects = '进行中的项目'; -$lang->project->doingExecutions = '进行中的执行'; +$lang->project->doingExecutions = '进行中的执行(最近1个)'; $lang->project->closedProjects = '已关闭的项目(最近2个)'; $lang->project->noProgram = '无项目集归属项目'; diff --git a/module/stakeholder/control.php b/module/stakeholder/control.php index b3d0e9afbd..c77a81302d 100644 --- a/module/stakeholder/control.php +++ b/module/stakeholder/control.php @@ -70,15 +70,22 @@ class stakeholder extends control return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate)); } + $members = array(); if($this->app->tab == 'program') { $this->loadModel('program')->setMenu($objectID); - $this->view->members = $this->loadModel('program')->getTeamMemberPairs($objectID); + $members = $this->loadModel('program')->getTeamMemberPairs($objectID); } else { $this->loadModel('project')->setMenu($objectID); - $this->view->members = $this->loadModel('user')->getTeamMemberPairs($objectID, 'project'); + $members = $this->loadModel('user')->getTeamMemberPairs($objectID, 'project'); + } + + $stakeholders = $this->loadModel('stakeholder')->getStakeHolderPairs($objectID); + foreach($members as $account => $realname) + { + if(isset($stakeholders[$account])) unset($members[$account]); } $this->view->title = $this->lang->stakeholder->create; @@ -86,6 +93,7 @@ class stakeholder extends control $this->view->companys = $this->loadModel('company')->getOutsideCompanies(); $this->view->programID = $this->app->tab == 'program' ? $objectID : 0; $this->view->projectID = $this->app->tab == 'project' ? $objectID : 0; + $this->view->members = $members; $this->display(); } @@ -206,6 +214,12 @@ class stakeholder extends control { $members = $this->loadModel('user')->getTeamMemberPairs($projectID, 'project'); } + $stakeholders = $this->loadModel('stakeholder')->getStakeHolderPairs($programID ? $programID : $projectID); + foreach($members as $account => $realname) + { + if(isset($stakeholders[$account])) unset($members[$account]); + } + echo html::select('user', $members, $user, "class='form-control chosen'"); } @@ -229,8 +243,13 @@ class stakeholder extends control $members = $this->loadModel('user')->getTeamMemberPairs($projectID, 'project'); } - $users = $this->loadModel('user')->getPairs('noclosed'); + $users = $this->loadModel('user')->getPairs('noclosed'); $companyUsers = array('' => '') + array_diff($users, $members); + $stakeholders = $this->loadModel('stakeholder')->getStakeHolderPairs($programID ? $programID : $projectID); + foreach($companyUsers as $account => $realname) + { + if(isset($stakeholders[$account])) unset($companyUsers[$account]); + } echo html::select('user', $companyUsers, $user, "class='form-control chosen'"); } @@ -241,9 +260,14 @@ class stakeholder extends control * @access public * @return void */ - public function ajaxGetOutsideUser() + public function ajaxGetOutsideUser($objectID = 0) { - $users = $this->loadModel('user')->getPairs('noclosed|outside|noletter'); + $users = $this->loadModel('user')->getPairs('noclosed|outside|noletter'); + $stakeholders = $this->loadModel('stakeholder')->getStakeHolderPairs($objectID); + foreach($users as $account => $realname) + { + if(isset($stakeholders[$account])) unset($users[$account]); + } echo html::select('user', $users, '', "class='form-control chosen' onchange=changeUser(this.value);"); } diff --git a/module/stakeholder/js/create.js b/module/stakeholder/js/create.js index d99a081f7e..501390e135 100644 --- a/module/stakeholder/js/create.js +++ b/module/stakeholder/js/create.js @@ -9,9 +9,9 @@ $(function() var link = createLink('stakeholder', 'ajaxGetMembers', 'user=&program=' + programID + '&projectID=' + projectID); $.post(link, function(data) { - $('#user').replaceWith(data); + $('#user').replaceWith(data); $('#user_chosen').remove(); - $('#user').chosen(); + $('#user').chosen(); }) } @@ -22,9 +22,9 @@ $(function() var link = createLink('stakeholder', 'ajaxGetCompanyUser', 'user=&programID=' + programID + '&projectID=' + projectID); $.post(link, function(data) { - $('#user').replaceWith(data); + $('#user').replaceWith(data); $('#user_chosen').remove(); - $('#user').chosen(); + $('#user').chosen(); }) } @@ -32,19 +32,20 @@ $(function() { $('#user').closest('tr').find('.input-group-addon').removeClass('hidden'); if($('input[name*=newUser]').prop('checked')) $('.user-info').removeClass('hidden'); - var link = createLink('stakeholder', 'ajaxGetOutsideUser'); + var objectID = programID ? programID : projectID; + var link = createLink('stakeholder', 'ajaxGetOutsideUser', 'objectID=' + objectID); $.post(link, function(data) { - $('#user').replaceWith(data); + $('#user').replaceWith(data); $('#user_chosen').remove(); - $('#user').chosen(); + $('#user').chosen(); }) } - }) + }) $("input[name='new[]']").change(function() { - if($(this).prop('checked')) + if($(this).prop('checked')) { $('#company').replaceWith(""); $('#company_chosen').remove(); @@ -54,15 +55,15 @@ $(function() var link = createLink('company', 'ajaxGetOutsideCompany'); $.post(link, function(data) { - $('#company').replaceWith(data); - $('#company').chosen(); + $('#company').replaceWith(data); + $('#company').chosen(); }) } }) $('input[name*=newUser]').change(function() { - if($(this).prop('checked')) + if($(this).prop('checked')) { $('#user').attr('disabled', true).trigger("chosen:updated"); $('.user-info').removeClass('hidden'); diff --git a/module/story/view/tasks.html.php b/module/story/view/tasks.html.php index 8f6d580a05..e862017de0 100644 --- a/module/story/view/tasks.html.php +++ b/module/story/view/tasks.html.php @@ -28,7 +28,7 @@ include '../../common/view/chart.html.php'; $task):?> - + diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php index 3d7bd87761..9d43318036 100644 --- a/module/story/view/view.html.php +++ b/module/story/view/view.html.php @@ -486,7 +486,7 @@ $class = isonlybody() ? 'showinonlybody' : 'iframe'; echo "
  • " . html::a($this->createLink('task', 'view', "taskID=$task->id", '', true), $taskInfo, '', "class=$class data-width='80%'"); $execution = isset($story->executions[$task->execution]) ? $story->executions[$task->execution] : ''; - $execName = (isset($execution->type) and $execution->type == 'kanban' and isonlybody()) ? $executionName : html::a($this->createLink('execution', 'view', "executionID=$executionID"), $executionName, '', "class='text-muted'"); + $execName = (isset($execution->type) and $execution->type == 'kanban' and isonlybody()) ? $executionName : html::a($this->createLink('execution', 'view', "executionID=$task->execution"), $executionName, '', "class='text-muted'"); echo $execName . '
  • '; } } diff --git a/module/testreport/view/blockstories.html.php b/module/testreport/view/blockstories.html.php index cf23529ecb..c707607c45 100644 --- a/module/testreport/view/blockstories.html.php +++ b/module/testreport/view/blockstories.html.php @@ -17,7 +17,7 @@ - + diff --git a/module/tutorial/control.php b/module/tutorial/control.php index f09b4f00f4..5ec68c3d0c 100644 --- a/module/tutorial/control.php +++ b/module/tutorial/control.php @@ -127,6 +127,8 @@ class tutorial extends control if(($module == 'story' or $module == 'task' or $module == 'bug') and $method == 'create') $target = 'self'; if($module == 'execution' and $method == 'linkStory') $target = 'self'; if($module == 'execution' and $method == 'managemembers') $target = 'self'; + + if(helper::isAjaxRequest()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => helper::createLink('tutorial', 'wizard', "module=$module&method=$method¶ms=" . helper::safe64Encode($params)))); return print(js::locate(helper::createLink('tutorial', 'wizard', "module=$module&method=$method¶ms=" . helper::safe64Encode($params)), $target)); } echo $this->fetch($module, $method, $params); diff --git a/module/upgrade/css/common.css b/module/upgrade/css/common.css index 41a9a00363..e70ddc30f0 100644 --- a/module/upgrade/css/common.css +++ b/module/upgrade/css/common.css @@ -1,6 +1,6 @@ body {background: #f1f1f1; padding: 0;} .container {padding: 0;} -.modal-dialog {width: 800px;} +.modal-dialog {width: 800px; margin-top: 20px;} .modal-footer {text-align: center; margin-top: 0;} .table,.alert {margin: 0;} diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 9fea8b78e4..93892462e5 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -1260,7 +1260,7 @@ class upgradeModel extends model if(file_exists($fullPath)) { $isDir = is_dir($fullPath); - if(($isDir and !$zfile->removeDir($fullPath)) or + if(!is_writable($fullPath) or ($isDir and !$zfile->removeDir($fullPath)) or (!$isDir and !$zfile->removeFile($fullPath))) { $result[] = 'rm -f ' . ($isDir ? '-r ' : '') . $fullPath; @@ -3774,7 +3774,7 @@ class upgradeModel extends model $this->dao->update(TABLE_CONFIG)->set('module')->eq('common')->set('section')->eq('xuanxuan')->where('id')->eq($keyID)->exec(); $this->saveLogs($this->dao->get()); - $this->setting->setItem('system.common.xuanxuan.turnon', '1'); + $this->setting->setItem('system.common.xuanxuan.turnon', '0'); $this->setting->setItem('system.common.xxserver.noticed', '1'); } diff --git a/module/user/model.php b/module/user/model.php index eadbe7e435..4ad6e0849c 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -126,7 +126,7 @@ class userModel extends model } else { - $firstLetter = ucfirst(substr($user->account, 0, 1)) . ':'; + $firstLetter = ucfirst(mb_substr($user->account, 0, 1)) . ':'; if(strpos($params, 'noletter') !== false or !empty($this->config->isINT)) $firstLetter = ''; $users[$account] = $firstLetter . (($user->deleted and strpos($params, 'realname') === false) ? $user->account : ($user->realname ? $user->realname : $user->account)); } diff --git a/test/class/dept.class.php b/test/class/dept.class.php index b88ccf7f6e..402a2f4de2 100644 --- a/test/class/dept.class.php +++ b/test/class/dept.class.php @@ -209,6 +209,14 @@ class deptTest return $objects; } + /** + * function getAllChildId test by dept + * + * @param string $deptID + * @param string $count + * @access public + * @return array + */ public function getAllChildIdTest($deptID, $count) { $objects = $this->objectModel->getAllChildId($deptID); @@ -219,74 +227,132 @@ class deptTest return $objects; } - public function getParentsTest($deptID) + /** + * function getParents test by dept + * + * @param string $deptID + * @param string $count + * @access public + * @return array + */ + public function getParentsTest($deptID, $count) { $objects = $this->objectModel->getParents($deptID); if(dao::isError()) return dao::getError(); + if($count == '1') return count($objects); + return $objects; } + /** + * function updateOrder test by dept + * + * @param array $orders + * @access public + * @return array + */ public function updateOrderTest($orders) { + global $tester; + $objects = $this->objectModel->updateOrder($orders); if(dao::isError()) return dao::getError(); + $objects = $tester->dao->select('*')->from(TABLE_DEPT)->where('id')->eq($orders[0])->fetchAll('id'); + return $objects; } - public function manageChildTest($parentDeptID, $childs) + /** + * function manageChild test by dept + * + * @param string $parentDeptID + * @param array $childs + * @param string $count + * @access public + * @return arrray + */ + public function manageChildTest($parentDeptID, $childs, $count) { $objects = $this->objectModel->manageChild($parentDeptID, $childs); if(dao::isError()) return dao::getError(); + if($count == '1') return count($objects); return $objects; } - public function getUsersTest($browseType = 'inside', $deptID = 0, $pager = null, $orderBy = 'id') + /** + * function getUsers test by dept + * + * @param string $browseType + * @param string $deptID + * @param string $count + * @param string $orderBy + * @param null $pager + * @access public + * @return array + */ + public function getUsersTest($browseType = 'inside', $deptID = 0, $count, $orderBy = 'id', $pager = null) { - $objects = $this->objectModel->getUsers($browseType = 'inside', $deptID = 0, $pager = null, $orderBy = 'id'); + $objects = $this->objectModel->getUsers($browseType, $deptID, $pager, $orderBy); + + if(dao::isError()) return dao::getError(); + if($count == '1') return count($objects); + + return $objects; + } + + /** + * function getDeptUserPairs test by dept + * + * @param int $deptID + * @param int $count + * @param string $key + * @param string $type + * @param string $params + * @access public + * @return array + */ + public function getDeptUserPairsTest($deptID = 0, $count, $key = 'account', $type = 'inside', $params = '') + { + $objects = $this->objectModel->getDeptUserPairs($deptID, $key, $type, $params); + + if(dao::isError()) return dao::getError(); + if($count == '1') return count($objects); + + return $objects; + } + + /** + * function delete test by dept + * + * @param int $deptID + * @access public + * @return int + */ + public function deleteTest($deptID) + { + global $tester; + + $this->objectModel->delete($deptID); + + $objects = $tester->dao->select('*')->from(TABLE_DEPT)->fetchAll(); if(dao::isError()) return dao::getError(); - return $objects; + return count($objects); } - public function getDeptUserPairsTest($deptID = 0, $key = 'account', $type = 'inside', $params = '') - { - $objects = $this->objectModel->getDeptUserPairs($deptID = 0, $key = 'account', $type = 'inside', $params = ''); - - if(dao::isError()) return dao::getError(); - - return $objects; - } - - public function deleteTest($deptID, $null = null) - { - $objects = $this->objectModel->delete($deptID, $null = null); - - if(dao::isError()) return dao::getError(); - - return $objects; - } - - public function fixDeptPathTest() - { - $objects = $this->objectModel->fixDeptPath(); - - if(dao::isError()) return dao::getError(); - - return $objects; - } - - public function getDataStructureTest() + public function getDataStructureTest($count) { $objects = $this->objectModel->getDataStructure(); if(dao::isError()) return dao::getError(); + if($count == '1') return count($objects); return $objects; } diff --git a/test/class/story.class.php b/test/class/story.class.php index cedcfe87d2..b275ec1197 100644 --- a/test/class/story.class.php +++ b/test/class/story.class.php @@ -210,28 +210,35 @@ class storyTest if(dao::isError()) return dao::getError(); - global $tester; - return $tester->loadModel('story')->getById($storyID); - } - - public function updateStoryVersionTest($story) - { - $objects = $this->objectModel->updateStoryVersion($story); - - if(dao::isError()) return dao::getError(); - - return $objects; + return $this->objectModel->getById($storyID); } + /** + * Test update story order of plan. + * + * @param int $storyID + * @param string $planIDList + * @param string $oldPlanIDList + * @access public + * @return void + */ public function updateStoryOrderOfPlanTest($storyID, $planIDList = '', $oldPlanIDList = '') { - $objects = $this->objectModel->updateStoryOrderOfPlan($storyID, $planIDList = '', $oldPlanIDList = ''); + $this->objectModel->updateStoryOrderOfPlan($storyID, $planIDList, $oldPlanIDList); if(dao::isError()) return dao::getError(); - return $objects; + global $tester; + return $tester->dao->select('*')->from(TABLE_PLANSTORY)->where('plan')->in($planIDList)->fetchAll(); } + /** + * Test compute estimate. + * + * @param int $storyID + * @access public + * @return void + */ public function computeEstimateTest($storyID) { $objects = $this->objectModel->computeEstimate($storyID); @@ -241,13 +248,22 @@ class storyTest return $objects; } - public function batchUpdateTest() + /** + * Test batch update stories. + * + * @access public + * @return void + */ + public function batchUpdateTest($params) { - $objects = $this->objectModel->batchUpdate(); + $_POST = $params; + $allStories = $this->objectModel->batchUpdate(); + unset($_POST); if(dao::isError()) return dao::getError(); - return $objects; + $storyIdList = array_keys($allStories); + return $this->objectModel->getByList($storyIdList); } public function reviewTest($storyID) diff --git a/test/class/todo.class.php b/test/class/todo.class.php new file mode 100755 index 0000000000..feb204e7c1 --- /dev/null +++ b/test/class/todo.class.php @@ -0,0 +1,362 @@ +objectModel = $tester->loadModel('todo'); + } + + /** + * Test create a todo. + * + * @param string $account + * @param array $param + * @access public + * @return object + */ + public function createTest($account, $param = array()) + { + $config = array('day' => '', 'specify' => array('month' => 0, 'day' => 1), 'type' => 'day', 'beforeDays' => 0, 'end' => ''); + if(isset($param->date)) $param->date = $param->date == 'today' ? date('Y-m-d',time()) : date('Y-m-d',strtotime('+3 days')); + + $createFields['config'] = $config; + $createFields['type'] = 'custom'; + $createFields['name'] = ''; + $createFields['pri'] = 3; + $createFields['desc'] = ''; + $createFields['status'] = 'wait'; + $createFields['begin'] = '0830'; + $createFields['end'] = '0900'; + + foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue; + + foreach($param as $key => $value) $_POST[$key] = $value; + + $objectID = $this->objectModel->create(date('Y').date('m'), $account); + + unset($_POST); + + if(dao::isError()) return array_values(dao::getError())[0][0]; + + $object = $objectID ? $this->objectModel->getByID($objectID) : 0; + return $object; + } + + /** + * Test batch create todos. + * + * @param array $param + * @access public + * @return array + */ + public function batchCreateTest($param = array()) + { + $createFields['date'] = date('Y-m-d',time()); + + foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue; + + foreach($param as $key => $value) $_POST[$key] = $value; + + $objects = $this->objectModel->batchCreate(); + + $todos = $this->objectModel->getByList($objects); + + unset($_POST); + + if(dao::isError()) return dao::getError(); + + return $todos; + } + + /** + * Test update a todo. + * + * @param int $todoID + * @param array $param + * @access public + * @return array + */ + public function updateTest($todoID, $param) + { + global $tester; + $object = $tester->dbh->query("SELECT * FROM " . TABLE_TODO ." WHERE id = $todoID")->fetch(); + + foreach($object as $field => $value) + { + if(in_array($field, array_keys($param))) + { + $_POST[$field] = $param[$field]; + } + else + { + $_POST[$field] = $value; + } + } + + $change = $this->objectModel->update($todoID); + if($change == array()) $change = '没有数据更新'; + + unset($_POST); + if(dao::isError()) return dao::getError(); + + return $change; + } + + /** + * Test batch update todos. + * + * @param array $param + * @param int $todoID + * @access public + * @return array + */ + public function batchUpdateTest($param, $todoID) + { + $todoIDList = array('1' => '1', '2' => '2', '3' => '3'); + $dates = array('1' => date('Y-m-d',strtotime('+1 month')), '2' => date('Y-m-d',strtotime('-1 month +1 day')), '3' => date('Y-m-d',strtotime('-1 month +2 day'))); + $types = array('1' => 'custom', '2' => 'bug', '3' => 'task'); + $pris = array('1' => '1', '2' => '2', '3' => '3'); + $names = array('1' => '自定义1的待办', '2' => 'BUG2的待办', '3' => '任务3的待办'); + $descs = array('1' => '这是一个待办的描述1', '2' => '这是一个待办的描述2', '3' => '这是一个待办的描述3'); + $begins = array('1' => '1000', '2' => '1002', '3' => '1004'); + $ends = array('1' => '1400', '2' => '1402', '3' => '1404'); + $status = array('1' => 'wait', '2' => 'doing', '3' => 'done'); + + $batchUpdateFields['todoIDList'] = $todoIDList; + $batchUpdateFields['dates'] = $dates; + $batchUpdateFields['types'] = $types; + $batchUpdateFields['pris'] = $pris; + $batchUpdateFields['names'] = $names; + $batchUpdateFields['descs'] = $descs; + $batchUpdateFields['begins'] = $begins; + $batchUpdateFields['ends'] = $ends; + $batchUpdateFields['status'] = $status; + + foreach($batchUpdateFields as $field => $value) $_POST[$field] = $value; + + foreach($param as $key => $value) $_POST[$key] = $value; + + $changes = $this->objectModel->batchUpdate(); + + unset($_POST); + + if(dao::isError()) return dao::getError(); + + return $changes[$todoID]; + } + + /** + * Test start a todo. + * + * @param int $todoID + * @access public + * @return object + */ + public function startTest($todoID) + { + $this->objectModel->start($todoID); + $object = $this->objectModel->getByID($todoID); + + if(dao::isError()) return dao::getError(); + + return $object; + } + + /** + * Test finish a todo. + * + * @param int $todoID + * @access public + * @return object + */ + public function finishTest($todoID) + { + $this->objectModel->finish($todoID); + $object = $this->objectModel->getByID($todoID); + + if(dao::isError()) return dao::getError(); + + return $object; + } + + /** + * Test get info of a todo. + * + * @param int $todoID + * @param bool $setImgSize + * @access public + * @return object + */ + public function getByIdTest($todoID, $setImgSize = false) + { + $object = $this->objectModel->getById($todoID); + + if(dao::isError()) return dao::getError(); + + return $object; + } + + /** + * Test get todo list of a user. + * + * @param string $type + * @param string $account + * @param string $status + * @param int $limit + * @param mixed $pager + * @param string $orderBy + * @param status $status + * @param begin" $begin" + * @access public + * @return void + */ + public function getListTest($type = 'today', $account = '', $status = 'all', $limit = 0, $pager = null, $orderBy = "date, status, begin") + { + $objects = $this->objectModel->getList($type, $account, $status, $limit, $pager, $orderBy); + + if(dao::isError()) return dao::getError(); + + return count($objects); + } + + /** + * Test get todo by id list. + * + * @parami array $todoIDList + * @access public + * @return void + */ + public function getByListTest($todoIDList = 0) + { + $objects = $this->objectModel->getByList($todoIDList); + + $name = ''; + foreach($objects as $todo) $name .= ',' . $todo->name; + $name = trim($name, ','); + + if(dao::isError()) return dao::getError(); + + return $name; + } + + /** + * isClickableTest + * + * @param object $todo + * @param string $action + * @access public + * @return int + */ + public function isClickableTest($todo, $action) + { + $object = $this->objectModel->isClickable($todo, $action); + + if(dao::isError()) return dao::getError(); + + return $object ? 1 : 2; + } + + public function createByCycleTest($todo) + { + $todo->cycle = '1'; + $todo->type = 'cycle'; + $todo->pri = 3; + $todo->desc = ''; + $todo->status = 'wait'; + $todo->begin = '0830'; + $todo->end = '0900'; + $todo->account = 'admin'; + $todo->idvalue = '0'; + $todo->vision = 'rnd'; + $todo->assignedTo = 'admin'; + $todo->assignedBy = 'admin'; + $todo->assignedDate = date('Y-m-d', time()); + $todo->date = date('Y-m-d', time()); + + $todo->config = str_replace('2022-03-23', date('Y-m-d', time()), $todo->config); + + $this->objectModel->createByCycle(array('1' => $todo)); + + global $tester; + $objects = $tester->dao->select('id')->from(TABLE_TODO)->where('idvalue')->eq('100001')->andWhere('name')->eq($todo->name)->andWhere('config')->eq($todo->config)->andWhere('deleted')->eq('0')->fetchAll(); + + if(dao::isError()) return dao::getError(); + + return count($objects); + } + + /** + * Test activate todo. + * + * @param int $todoID + * @access public + * @return object + */ + public function activateTest($todoID) + { + $this->objectModel->activate($todoID); + + if(dao::isError()) return dao::getError(); + + $object = $this->objectModel->getById($todoID); + return $object; + } + + /** + * Test close a todo. + * + * @param int $todoID + * @access public + * @return object + */ + public function closeTest($todoID) + { + $this->objectModel->close($todoID); + + if(dao::isError()) return dao::getError(); + + $object = $this->objectModel->getById($todoID); + return $object; + } + + /** + * Test assign todo. + * + * @param int $todoID + * @param array $param + * @access public + * @return object + */ + public function assignToTest($todoID, $param = array()) + { + foreach($param as $key => $value) $_POST[$key] = $value; + + if(!isset($_POST['future']) and !isset($_POST['date'])) $_POST['date'] = date('Y-m-d', time()); + + $this->objectModel->assignTo($todoID); + + unset($_POST); + + if(dao::isError()) return dao::getError(); + + $object = $this->objectModel->getById($todoID); + return $object; + } + + /** + * Test get todo count. + * + * @param string $account + * @access public + * @return int + */ + public function getCountTest($account = '') + { + $count = $this->objectModel->getCount($account); + + if(dao::isError()) return dao::getError(); + + return $count; + } +} diff --git a/test/data/childstory.yaml b/test/data/childstory.yaml new file mode 100644 index 0000000000..d29bd61ef0 --- /dev/null +++ b/test/data/childstory.yaml @@ -0,0 +1,283 @@ +title: table zt_story +desc: "需求" +author: automated export +version: "1.0" +fields: + - field: id + range: 401-10000 + - field: parent + note: "父需求ID" + range: 351-400 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: product + note: "所属产品" + range: 88{2},89-100{4} + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: branch + note: "分支/平台" + range: 0 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: module + note: "所属模块" + range: 2171-10000 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: plan + note: "所属计划" + range: 0 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: source + note: "需求来源" + range: customer,user,po,market,service,operation,support,competitor,partner,dev,tester,bug,forum,other + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: sourceNote + note: "来源备注" + range: 1-10000 + prefix: "这里是需求来源备注" + postfix: "" + loop: 0 + format: "" + - field: fromBug + note: "来源Bug" + range: 0 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: title + note: "需求名称" + fields: + - field: field1 + range: [用户子需求,软件子需求] + - field: field2 + range: 1-10000 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: keywords + note: "关键词" + range: 1-10000 + prefix: "关键词" + postfix: "" + loop: 0 + format: "" + - field: type + note: "需求类型" + range: requirement,story + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: pri + note: "优先级" + range: 1-4 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: estimate + note: "预计工时" + range: 0-20:2 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: status + note: "当前状态" + range: draft,active,closed,changed + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: subStatus + note: "子状态" + range: 0 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: color + note: "标题颜色" + from: common.color.v1.yaml + use: color + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: stage + note: "所处阶段" + range: wait,planned,projected,developing,developed,testing,tested,verified,released,closed + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: stagedBy + note: "设置阶段者" + from: common.user.v1.yaml + use: user + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: mailto + note: "抄送给" + from: common.user.v1.yaml + use: user + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: openedBy + note: "由谁创建" + from: common.user.v1.yaml + use: user + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: openedDate + note: "创建日期" + from: common.date.v1.yaml + use: dateA + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: assignedTo + note: "指派给" + from: common.user.v1.yaml + use: user + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: assignedDate + note: "指派日期" + from: common.date.v1.yaml + use: dateA + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: lastEditedBy + note: "最后修改者" + from: common.user.v1.yaml + use: user + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: lastEditedDate + note: "最后修改日期" + from: common.date.v1.yaml + use: dateA + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: reviewedBy + note: "评审者" + from: common.user.v1.yaml + use: user + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: reviewedDate + note: "评审日期" + from: common.date.v1.yaml + use: dateA + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: closedBy + note: "关闭者" + from: common.user.v1.yaml + use: user + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: closedDate + note: "关闭日期" + from: common.date.v1.yaml + use: dateA + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: closedReason + note: "关闭原因" + range: done,subdivided,duplicate,postponed,willnotdo,cancel,bydesign + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: toBug + note: "转Bug" + range: 0 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: childStories + note: "细分需求" + range: 0 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: linkStories + note: "相关需求" + range: 0 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: duplicateStory + note: "重复需求ID" + range: 0 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: version + note: "版本号" + range: 1{50} + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: URChanged + note: "用户需求变更" + range: 0 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: deleted + note: "是否删除" + range: 0 + prefix: "" + postfix: "" + loop: 0 + format: "" diff --git a/test/data/storyspec.yaml b/test/data/storyspec.yaml index c0f48a312a..ba6d4ce4c5 100644 --- a/test/data/storyspec.yaml +++ b/test/data/storyspec.yaml @@ -5,14 +5,14 @@ version: "1.0" fields: - field: story note: "需求ID" - range: 1-20 + range: 1-30 prefix: "" postfix: "" loop: 0 format: "" - field: version note: "版本" - range: 1{20},2{20},3{20} + range: 1{30},2{30},3{20} prefix: "" postfix: "" loop: 0 diff --git a/test/data/todo.yaml b/test/data/todo.yaml index 2bc762286c..bc232b8951 100644 --- a/test/data/todo.yaml +++ b/test/data/todo.yaml @@ -23,10 +23,11 @@ fields: format: "" - field: date note: "日期" - range: "(M)-(w)" - type: timestamp - prefix: "DateTime" + range: "(-1M)-(+1w):-1D" + prefix: "" postfix: "" + loop: 0 + type: timestamp format: "YY/MM/DD" - field: begin note: "开始" @@ -125,9 +126,9 @@ fields: note: "指派日期" range: "(M)-(w):60m" type: timestamp - prefix: "DateTime" + prefix: "" postfix: "" - format: "YY/MM/DD hh:mm:ss" + format: "YY-MM-DD hh:mm:ss" - field: finishedBy note: "由谁完成" from: common.user.v1.yaml diff --git a/test/data/todocycle.yaml b/test/data/todocycle.yaml new file mode 100644 index 0000000000..17a82f50e4 --- /dev/null +++ b/test/data/todocycle.yaml @@ -0,0 +1,149 @@ +title: table zt_todo +desc: "待办" +author: ly +version: "1.0" +fields: + - field: id + note: "ID" + range: 2001-10000 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: account + note: "用户名" + range: admin + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: date + note: "日期" + range: "(M)-(w)" + type: timestamp + prefix: "" + postfix: "" + format: "YY-MM-DD" + - field: begin + note: "开始" + range: "1000-1059:2" + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: end + note: "结束" + range: "1400-1459:2" + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: type + note: "类型" + range: cycle + prefix: "" + postfix: "" + - field: cycle + note: "周期" + range: 1,0 + prefix: "" + postfix: "" + - field: idvalue + note: "关联编号" + range: 0,2001,0,2003,0 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: pri + note: "优先级" + range: 3 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: name + note: "待办名称" + range: 天周期{2},周周期{2},月周期 + prefix: "" + postfix: "待办" + loop: 0 + format: "" + - field: desc + note: "描述" + range: 1-10000 + prefix: "这是一个待办的描述" + postfix: "" + loop: 0 + format: "" + - field: status + note: "状态" + range: wait + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: private + note: "私人事务" + range: 0 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: config + note: "配置" + range: "" + prefix: "" + postfix: "" + format: "" + - field: assignedTo + note: "指派给" + range: admin + prefix: "" + postfix: "" + format: "" + - field: assignedBy + note: "由谁指派" + range: admin + prefix: "" + postfix: "" + format: "" + - field: assignedDate + note: "指派日期" + range: "(M)-(w):60m" + type: timestamp + prefix: "" + postfix: "" + format: "YY/MM/DD hh:mm:ss" + - field: finishedBy + note: "由谁完成" + from: common.user.v1.yaml + use: user + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: finishedDate + note: "完成时间" + from: common.date.v1.yaml + use: dateA + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: closedBy + note: "由谁关闭" + from: common.user.v1.yaml + use: user + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: closedDate + note: "关闭时间" + from: common.date.v1.yaml + use: dateA + prefix: "" + postfix: "" + loop: 0 + format: "" diff --git a/test/data/zentao/config.php b/test/data/zentao/config.php index 3692bf7150..67aeaef55c 100644 --- a/test/data/zentao/config.php +++ b/test/data/zentao/config.php @@ -4,6 +4,7 @@ $builder = new stdclass(); $builder->company = array('rows' => 2, 'extends' => array('company')); $builder->user = array('rows' => 1000, 'extends' => array('user')); $builder->todo = array('rows' => 2000, 'extends' => array('todo')); +$builder->todocycle = array('rows' => 5, 'extends' => array('todo','todocycle')); $builder->effort = array('rows' => 100, 'extends' => array('effort')); $builder->usergroup = array('rows' => 600, 'extends' => array('usergroup')); $builder->usercontact = array('rows' => 61, 'extends' => array('usercontact')); @@ -16,9 +17,10 @@ $builder->project = array('rows' => 90, 'extends' => array('project', 'pro $builder->sprint = array('rows' => 600, 'extends' => array('project', 'execution')); $builder->story = array('rows' => 400, 'extends' => array('story')); +$builder->childstory = array('rows' => 50, 'extends' => array('story','childstory')); $builder->storymodule = array('rows' => 800, 'extends' => array('module','storymodule')); $builder->storyplan = array('rows' => 400, 'extends' => array('planstory')); -$builder->storyspec = array('rows' => 60, 'extends' => array('storyspec')); +$builder->storyspec = array('rows' => 80, 'extends' => array('storyspec')); $builder->relation = array('rows' => 12, 'extends' => array('relation')); $builder->task = array('rows' => 600, 'extends' => array('task','task')); $builder->taskmore = array('rows' => 300, 'extends' => array('task','moretask')); diff --git a/test/data/zentao/processor.php b/test/data/zentao/processor.php index 8c586f75b5..643efc1709 100644 --- a/test/data/zentao/processor.php +++ b/test/data/zentao/processor.php @@ -48,6 +48,7 @@ class Processor $this->initStory(); $this->initBug(); $this->initTest(); + $this->initTodo(); $this->dao->commit(); } @@ -313,6 +314,22 @@ class Processor $this->dao->query("INSERT INTO `zt_userquery` (`id`, `account`, `module`, `title`, `form`, `sql`, `shortcut`) VALUES (3, 'admin', 'user', '用户测试条件', 'a:48:{s:13:\"fieldrealname\";s:0:\"\";s:10:\"fieldemail\";s:0:\"\";s:9:\"fielddept\";s:0:\"\";s:12:\"fieldaccount\";s:0:\"\";s:9:\"fieldrole\";s:0:\"\";s:10:\"fieldphone\";s:0:\"\";s:9:\"fieldjoin\";s:0:\"\";s:12:\"fieldvisions\";s:3:\"rnd\";s:7:\"fieldid\";s:0:\"\";s:13:\"fieldcommiter\";s:1:\"0\";s:11:\"fieldgender\";s:1:\"m\";s:7:\"fieldqq\";s:0:\"\";s:10:\"fieldskype\";s:0:\"\";s:13:\"fielddingding\";s:0:\"\";s:11:\"fieldweixin\";s:0:\"\";s:10:\"fieldslack\";s:0:\"\";s:13:\"fieldwhatsapp\";s:0:\"\";s:12:\"fieldaddress\";s:0:\"\";s:12:\"fieldzipcode\";s:0:\"\";s:6:\"andOr1\";s:3:\"AND\";s:6:\"field1\";s:8:\"realname\";s:9:\"operator1\";s:7:\"include\";s:6:\"value1\";s:9:\"白名单\";s:6:\"andOr2\";s:3:\"and\";s:6:\"field2\";s:5:\"email\";s:9:\"operator2\";s:7:\"include\";s:6:\"value2\";s:0:\"\";s:6:\"andOr3\";s:3:\"and\";s:6:\"field3\";s:4:\"dept\";s:9:\"operator3\";s:6:\"belong\";s:6:\"value3\";s:0:\"\";s:10:\"groupAndOr\";s:3:\"and\";s:6:\"andOr4\";s:3:\"AND\";s:6:\"field4\";s:7:\"account\";s:9:\"operator4\";s:7:\"include\";s:6:\"value4\";s:0:\"\";s:6:\"andOr5\";s:3:\"and\";s:6:\"field5\";s:4:\"role\";s:9:\"operator5\";s:1:\"=\";s:6:\"value5\";s:0:\"\";s:6:\"andOr6\";s:3:\"and\";s:6:\"field6\";s:5:\"phone\";s:9:\"operator6\";s:7:\"include\";s:6:\"value6\";s:0:\"\";s:6:\"module\";s:4:\"user\";s:9:\"actionURL\";s:74:\"/index.php?m=company&f=browse&browseType=all¶m=myQueryID&type=bysearch\";s:10:\"groupItems\";s:1:\"3\";s:8:\"formType\";s:4:\"lite\";}', '(( 1 AND `realname` LIKE \'%白名单%\' ) AND ( 1 ))', '0');"); } + private function initTodo() + { + $toDay = date('y-m-d'); + $addDay = date('Y-m-d',strtotime("+1 day")); + + $str = '{"day":"1","specify":{"month":"0","day":"1"},"type":"day","beforeDays":1,"end":"","begin":"'.$toDay.'"}'; + $str2 = '{"specify":{"month":"0","day":"1"},"week":"3","type":"week","beforeDays":1,"end":"","begin":"'.$toDay.'"}'; + $str3 = '{"specify":{"month":"0","day":"1"},"month":"17","type":"month","beforeDays":0,"end":"","begin":"'.$toDay.'"}'; + + $this->dao->update(TABLE_TODO)->SET('config')->eq($str)->where('id')->eq('2001')->exec(); + $this->dao->update(TABLE_TODO)->SET('date')->eq($addDay)->where('id')->eq('2002')->exec(); + $this->dao->update(TABLE_TODO)->SET('config')->eq($str2)->where('id')->eq('2003')->exec(); + $this->dao->update(TABLE_TODO)->SET('config')->eq($str3)->where('id')->eq('2005')->exec(); + + } + /** * Init initUpdateKanban. * diff --git a/test/model/dept/buildmenuquery.php b/test/model/dept/buildmenuquery.php index 26f251f56f..bba0e82479 100755 --- a/test/model/dept/buildmenuquery.php +++ b/test/model/dept/buildmenuquery.php @@ -1,3 +1,4 @@ +#!/usr/bin/env php buildMenuQuery(); cid=1 pid=1 +不输入部门id >> SELECT * FROM `zt_dept` ORDER BY `grade` desc,`order` +输入部门id >> ,2, + */ $deptIDList = array('', '2'); $dept = new deptTest(); r($dept->buildMenuQueryTest($deptIDList[0])) && p() && e('SELECT * FROM `zt_dept` ORDER BY `grade` desc,`order` '); //不输入部门id -r($dept->buildMenuQueryTest($deptIDList[1])) && p() && e(',2,'); //输入部门id +r($dept->buildMenuQueryTest($deptIDList[1])) && p() && e(',2,'); //输入部门id \ No newline at end of file diff --git a/test/model/dept/creategroupmanagememberlink.php b/test/model/dept/creategroupmanagememberlink.php index ece877b4bc..67067ce421 100755 --- a/test/model/dept/creategroupmanagememberlink.php +++ b/test/model/dept/creategroupmanagememberlink.php @@ -1,3 +1,4 @@ +#!/usr/bin/env php createGroupManageMemberLink(); cid=1 pid=1 +权限分组2开发部链接组成 >> dept2 + */ $deptIDList = array('2', '5'); $groupIDList = array('2', '12'); $dept = new deptTest(); -r($dept->createGroupManageMemberLinkTest($deptIDList[0], $groupIDList[0])) && p() && e('>开发部<'); //权限分组2开发部链接组成 -r($dept->createGroupManageMemberLinkTest($deptIDList[1], $groupIDList[1])) && p() && e('>开发部1<'); //权限分组12开发部1链接组成 +r($dept->createGroupManageMemberLinkTest($deptIDList[0], $groupIDList[0])) && p() && e('dept2'); //权限分组2开发部链接组成 \ No newline at end of file diff --git a/test/model/dept/createmanagelink.php b/test/model/dept/createmanagelink.php index 89e6b8f117..9566e72922 100755 --- a/test/model/dept/createmanagelink.php +++ b/test/model/dept/createmanagelink.php @@ -1,3 +1,4 @@ +#!/usr/bin/env php createManageLink(); cid=1 pid=1 +编辑链接 >> 编辑 +下级部门 >> 下级部门 +删除链接 >> 删除 +数量 >> orders[5] + */ $deptID = '5'; $dept = new deptTest(); r($dept->createManageLinkTest($deptID)) && p() && e('编辑'); //编辑链接 -r($dept->createManageLinkTest($deptID)) && p() && e('删除'); //删除链接 r($dept->createManageLinkTest($deptID)) && p() && e('下级部门'); //下级部门 -r($dept->createManageLinkTest($deptID)) && p() && e('orders[5]'); //数量 +r($dept->createManageLinkTest($deptID)) && p() && e('删除'); //删除链接 +r($dept->createManageLinkTest($deptID)) && p() && e('orders[5]'); //数量 \ No newline at end of file diff --git a/test/model/dept/createmanageprojectadminlink.php b/test/model/dept/createmanageprojectadminlink.php index 29132c1ca7..769dbedcb9 100755 --- a/test/model/dept/createmanageprojectadminlink.php +++ b/test/model/dept/createmanageprojectadminlink.php @@ -1,3 +1,4 @@ +#!/usr/bin/env php createManageProjectAdminLink(); cid=1 pid=1 +权限分组2开发部链接组成 >> dept2 + */ $deptIDList = array('2', '5'); $groupIDList = array('2', '12'); $dept = new deptTest(); -r($dept->createManageProjectAdminLinkTest($deptIDList[0], $groupIDList[0])) && p() && e('开发部'); //权限分组2开发部链接组成 -r($dept->createManageProjectAdminLinkTest($deptIDList[1], $groupIDList[1])) && p() && e('开发部1'); //权限分组2开发部链接组成 - +r($dept->createManageProjectAdminLinkTest($deptIDList[0], $groupIDList[0])) && p() && e('dept2'); //权限分组2开发部链接组成 \ No newline at end of file diff --git a/test/model/dept/creatememberlink.php b/test/model/dept/creatememberlink.php index 9742d30dc3..c0a780f82f 100755 --- a/test/model/dept/creatememberlink.php +++ b/test/model/dept/creatememberlink.php @@ -1,3 +1,4 @@ +#!/usr/bin/env php createMemberLink(); cid=1 pid=1 + >> >开发部< + */ $deptID = '2'; $dept = new deptTest(); -r($dept->createMemberLinkTest($deptID)) && p() && e('>开发部<'); +r($dept->createMemberLinkTest($deptID)) && p() && e('>开发部<'); \ No newline at end of file diff --git a/test/model/dept/delete.php b/test/model/dept/delete.php index cbb2dd61fb..5ed257cd6b 100755 --- a/test/model/dept/delete.php +++ b/test/model/dept/delete.php @@ -1,3 +1,4 @@ +#!/usr/bin/env php delete(); cid=1 pid=1 +删除后统计数量 >> 99 + */ -$dept = new deptTest(); +$deptID = '11'; -r() && p() && e(); \ No newline at end of file +$dept = new deptTest(); +r($dept->deleteTest($deptID)) && p() && e('99'); //删除后统计数量 + +system("./ztest init"); \ No newline at end of file diff --git a/test/model/dept/fixdeptpath.php b/test/model/dept/fixdeptpath.php deleted file mode 100755 index 4aee295eda..0000000000 --- a/test/model/dept/fixdeptpath.php +++ /dev/null @@ -1,16 +0,0 @@ -fixDeptPath(); -cid=1 -pid=1 - -*/ - -$dept = new deptTest(); - -r() && p() && e(); \ No newline at end of file diff --git a/test/model/dept/getallchildid.php b/test/model/dept/getallchildid.php index 4e30222b4c..c2fd07038b 100755 --- a/test/model/dept/getallchildid.php +++ b/test/model/dept/getallchildid.php @@ -1,3 +1,4 @@ +#!/usr/bin/env php getAllChildId(); cid=1 pid=1 +有子部门查询 >> 5 +无子部门查询 >> 5 +子部门数量统计 >> 3 +无子部门数量统计 >> 1 + */ $deptIDList = array('2', '5'); @@ -18,4 +24,4 @@ $dept = new deptTest(); r($dept->getAllChildIdTest($deptIDList[0], $count[0])) && p('1') && e('5'); //有子部门查询 r($dept->getAllChildIdTest($deptIDList[1], $count[0])[0]) && p() && e('5'); //无子部门查询 r($dept->getAllChildIdTest($deptIDList[0], $count[1])) && p() && e('3'); //子部门数量统计 -r($dept->getAllChildIdTest($deptIDList[1], $count[1])) && p() && e('1'); //无子部门数量统计 +r($dept->getAllChildIdTest($deptIDList[1], $count[1])) && p() && e('1'); //无子部门数量统计 \ No newline at end of file diff --git a/test/model/dept/getbyid.php b/test/model/dept/getbyid.php index e76988a999..068c116476 100755 --- a/test/model/dept/getbyid.php +++ b/test/model/dept/getbyid.php @@ -1,3 +1,4 @@ +#!/usr/bin/env php getByID(); cid=1 pid=1 - */ +查找id为1的部门 >> 产品部 +查找id不存在的部门 >> 0 + +*/ $deptIDList = array('1','0'); $dept = new deptTest(); r($dept->getByIDTest($deptIDList[0])) && p('name') && e('产品部'); //查找id为1的部门 -r($dept->getByIDTest($deptIDList[1])) && p() && e('0'); //查找id不存在的部门 +r($dept->getByIDTest($deptIDList[1])) && p() && e('0'); //查找id不存在的部门 \ No newline at end of file diff --git a/test/model/dept/getdatastructure.php b/test/model/dept/getdatastructure.php index 7351844601..6e9d9daef6 100755 --- a/test/model/dept/getdatastructure.php +++ b/test/model/dept/getdatastructure.php @@ -1,3 +1,4 @@ +#!/usr/bin/env php getDataStructure(); cid=1 pid=1 +全部查询 >> 100,其他部门63 +全部查询统计 >> 78 + */ -$dept = new deptTest(); +$count = array('0', '1'); -r() && p() && e(); \ No newline at end of file +$dept = new deptTest(); +r($dept->getDataStructureTest($count[0])) && p('77:id,name') && e('100,其他部门63'); //全部查询 +r($dept->getDataStructureTest($count[1])) && p() && e('78'); //全部查询统计 \ No newline at end of file diff --git a/test/model/dept/getdeptpairs.php b/test/model/dept/getdeptpairs.php index 65ae2d6f7d..e8ff4a1730 100755 --- a/test/model/dept/getdeptpairs.php +++ b/test/model/dept/getdeptpairs.php @@ -1,3 +1,4 @@ +#!/usr/bin/env php getDeptPairs(); cid=1 pid=1 +查询全部部门统计 >> 100 +查询id为2的部门 >> 开发部 +查询id为2的部门数量 >> 100 + */ $deptIDlist = array('0', '2'); @@ -17,4 +22,4 @@ $count = array('0', '1'); $dept = new deptTest(); r($dept->getDeptPairsTest($deptIDlist[0], $count[1])) && p() && e('100'); //查询全部部门统计 r($dept->getDeptPairsTest($deptIDlist[1], $count[0])) && p('2') && e('开发部'); //查询id为2的部门 -r($dept->getDeptPairsTest($deptIDlist[1], $count[1])) && p() && e('100'); //查询id为2的部门数量 +r($dept->getDeptPairsTest($deptIDlist[1], $count[1])) && p() && e('100'); //查询id为2的部门数量 \ No newline at end of file diff --git a/test/model/dept/getdeptuserpairs.php b/test/model/dept/getdeptuserpairs.php index a54edacc0f..e34959b13b 100755 --- a/test/model/dept/getdeptuserpairs.php +++ b/test/model/dept/getdeptuserpairs.php @@ -1,3 +1,4 @@ +#!/usr/bin/env php getDeptUserPairs(); cid=1 pid=1 +查询所有内部用户 >> 测试1 +查询所有外部用户 >> 用户1 +根据部门查询用户 >> 测试10 +键值为account查询 >> 测试40 +键值为out查询 >> 测试10 +type为out查询 >> 测试10 +查询所有内部用户统计 >> 999 +查询所有外部用户统计 >> 1 +根据部门查询用户统计 >> 30 +查询全部用户统计 >> 1000 + */ -$dept = new deptTest(); +$deptIDList = array('0', '2', '5'); +$key = array('id', 'account', 'out'); +$type = array('inside', 'outside', 'out'); +$count = array('0', '1'); +$params = 'all'; -r() && p() && e(); \ No newline at end of file +$dept = new deptTest(); +r($dept->getDeptUserPairsTest($deptIDList[0], $count[0], $key[0], $type[0])) && p('101') && e('测试1'); //查询所有内部用户 +r($dept->getDeptUserPairsTest($deptIDList[0], $count[0], $key[0], $type[1])) && p('901') && e('用户1'); //查询所有外部用户 +r($dept->getDeptUserPairsTest($deptIDList[1], $count[0], $key[0], $type[0])) && p('11') && e('测试10'); //根据部门查询用户 +r($dept->getDeptUserPairsTest($deptIDList[2], $count[0], $key[1], $type[0])) && p('user40') && e('测试40'); //键值为account查询 +r($dept->getDeptUserPairsTest($deptIDList[1], $count[0], $key[2], $type[0])) && p('user10') && e('测试10'); //键值为out查询 +r($dept->getDeptUserPairsTest($deptIDList[1], $count[0], $key[1], $type[2])) && p('user10') && e('测试10'); //type为out查询 +r($dept->getDeptUserPairsTest($deptIDList[0], $count[1], $key[0], $type[0])) && p() && e('999'); //查询所有内部用户统计 +r($dept->getDeptUserPairsTest($deptIDList[0], $count[1], $key[0], $type[1])) && p() && e('1'); //查询所有外部用户统计 +r($dept->getDeptUserPairsTest($deptIDList[1], $count[1], $key[0], $type[0])) && p() && e('30'); //根据部门查询用户统计 +r($dept->getDeptUserPairsTest($deptIDList[0], $count[1], $key[0], $type[0], $params)) && p() && e('1000'); //查询全部用户统计 \ No newline at end of file diff --git a/test/model/dept/getoptionmenu.php b/test/model/dept/getoptionmenu.php index e24e3fe83e..c86a8c9b7c 100755 --- a/test/model/dept/getoptionmenu.php +++ b/test/model/dept/getoptionmenu.php @@ -1,3 +1,4 @@ +#!/usr/bin/env php getOptionMenu(); cid=1 pid=1 +父级部门查询 >> /产品部 +多级部门查询 >> 开发部 +全部部门查询 >> /开发部/开发部1 +父级部门查询统计 >> 2 +多级部门查询统计 >> 4 +全部部门查询统计 >> 101 + */ $deptIDList = array('0', '1', '2'); @@ -20,4 +28,4 @@ r($dept->getOptionMenuTest($deptIDList[2], $count[0])) && p('2') && e('开发部 r($dept->getOptionMenuTest($deptIDList[0], $count[0])) && p('5') && e('/开发部/开发部1'); //全部部门查询 r($dept->getOptionMenuTest($deptIDList[1], $count[1])) && p() && e('2'); //父级部门查询统计 r($dept->getOptionMenuTest($deptIDList[2], $count[1])) && p() && e('4'); //多级部门查询统计 -r($dept->getOptionMenuTest($deptIDList[0], $count[1])) && p() && e('101'); //全部部门查询统计 +r($dept->getOptionMenuTest($deptIDList[0], $count[1])) && p() && e('101'); //全部部门查询统计 \ No newline at end of file diff --git a/test/model/dept/getparents.php b/test/model/dept/getparents.php index 6a7e5dc36b..298943238f 100755 --- a/test/model/dept/getparents.php +++ b/test/model/dept/getparents.php @@ -1,3 +1,4 @@ +#!/usr/bin/env php getParents(); cid=1 pid=1 +父级部门查询父级 >> 2,开发部,0 +子级部门查询父级 >> 2,开发部,0 +父级部门查询父级统计 >> 1 +子级部门查询父级统计 >> 2 + */ -$dept = new deptTest(); +$deptIDList = array('2', '5'); +$count = array('0', '1'); -r() && p() && e(); \ No newline at end of file +$dept = new deptTest(); +r($dept->getParentsTest($deptIDList[0], $count[0])) && p('0:id,name,parent') && e('2,开发部,0'); //父级部门查询父级 +r($dept->getParentsTest($deptIDList[1], $count[0])) && p('0:id,name,parent') && e('2,开发部,0'); //子级部门查询父级 +r($dept->getParentsTest($deptIDList[0], $count[1])) && p() && e('1'); //父级部门查询父级统计 +r($dept->getParentsTest($deptIDList[1], $count[1])) && p() && e('2'); //子级部门查询父级统计 \ No newline at end of file diff --git a/test/model/dept/getsons.php b/test/model/dept/getsons.php index 19043e6ecf..ecd3b9c9a5 100755 --- a/test/model/dept/getsons.php +++ b/test/model/dept/getsons.php @@ -1,3 +1,4 @@ +#!/usr/bin/env php getSons(); cid=1 pid=1 +有子部门查询 >> 开发部1,2,,2,5, +无子部门查询 >> 0 +子部门数量统计 >> 2 + */ $deptIDList = array('2', '5'); @@ -17,4 +22,4 @@ $count = array('0', '1'); $dept = new deptTest(); r($dept->getSonsTest($deptIDList[0], $count[0])) && p('0:name,parent,path') && e('开发部1,2,,2,5,'); //有子部门查询 r($dept->getSonsTest($deptIDList[1], $count[0])) && p() && e('0'); //无子部门查询 -r($dept->getSonsTest($deptIDList[0], $count[1])) && p() && e('2'); //子部门数量统计 +r($dept->getSonsTest($deptIDList[0], $count[1])) && p() && e('2'); //子部门数量统计 \ No newline at end of file diff --git a/test/model/dept/gettreemenu.php b/test/model/dept/gettreemenu.php index ddf49144f0..880afb673a 100755 --- a/test/model/dept/gettreemenu.php +++ b/test/model/dept/gettreemenu.php @@ -1,3 +1,4 @@ +#!/usr/bin/env php getTreeMenu(); cid=1 pid=1 +全部部门树结构查询 >> 产品部 +无子部门树结构查询 >> 下级部门 +有子部门树结构查询 >> 删除 + */ $deptIDList = array('0', '1', '2'); $userFunc = array('deptmodel', 'createManageLink'); $dept = new deptTest(); -r($dept->getTreeMenuTest($deptIDList[0], $userFunc)) && p() && e('
  • 开发部 getTreeMenuTest($deptIDList[1], $userFunc)) && p() && e('
  • 产品部 getTreeMenuTest($deptIDList[2], $userFunc)) && p() && e('
  • 开发部部1 getTreeMenuTest($deptIDList[0], $userFunc)) && p() && e('产品部'); //全部部门树结构查询 +r($dept->getTreeMenuTest($deptIDList[1], $userFunc)) && p() && e('下级部门'); //无子部门树结构查询 +r($dept->getTreeMenuTest($deptIDList[2], $userFunc)) && p() && e('删除'); //有子部门树结构查询 \ No newline at end of file diff --git a/test/model/dept/getusers.php b/test/model/dept/getusers.php index 76a43aa9a9..2018fe30ed 100755 --- a/test/model/dept/getusers.php +++ b/test/model/dept/getusers.php @@ -1,3 +1,4 @@ +#!/usr/bin/env php getUsers(); cid=1 pid=1 +全部用户查询 >> outside100,100,其他100 +外部用户查询 >> outside1,91,用户1 +根据部门查询用户 >> user10,2,测试10 +根据account排序 >> user40,5,测试40 +全部用户查询统计 >> 999 +外部用户查询统计 >> 1 +根据部门查询用户统计 >> 10 + */ -$dept = new deptTest(); +$deptIDList = array('0', '2', '5'); +$browseType = array('inside', 'outside'); +$count = array('0', '1'); +$orderBy = array('id', 'account'); -r() && p() && e(); \ No newline at end of file +$dept = new deptTest(); +r($dept->getUsersTest($browseType[0], $deptIDList[0], $count[0], $orderBy[0])) && p('998:account,dept,realname') && e('outside100,100,其他100'); //全部用户查询 +r($dept->getUsersTest($browseType[1], $deptIDList[0], $count[0], $orderBy[0])) && p('0:account,dept,realname') && e('outside1,91,用户1'); //外部用户查询 +r($dept->getUsersTest($browseType[0], $deptIDList[1], $count[0], $orderBy[0])) && p('0:account,dept,realname') && e('user10,2,测试10'); //根据部门查询用户 +r($dept->getUsersTest($browseType[0], $deptIDList[2], $count[0], $orderBy[1])) && p('0:account,dept,realname') && e('user40,5,测试40'); //根据account排序 +r($dept->getUsersTest($browseType[0], $deptIDList[0], $count[1], $orderBy[0])) && p() && e('999'); //全部用户查询统计 +r($dept->getUsersTest($browseType[1], $deptIDList[0], $count[1], $orderBy[0])) && p() && e('1'); //外部用户查询统计 +r($dept->getUsersTest($browseType[0], $deptIDList[1], $count[1], $orderBy[0])) && p() && e('10'); //根据部门查询用户统计 \ No newline at end of file diff --git a/test/model/dept/managechild.php b/test/model/dept/managechild.php index b623acdf8b..2c94aec739 100755 --- a/test/model/dept/managechild.php +++ b/test/model/dept/managechild.php @@ -1,3 +1,4 @@ +#!/usr/bin/env php manageChild(); cid=1 pid=1 +三级部门下添加四级部门 >> 102 +三级部门下添加四级部门统计 >> 3 +无父级部门下添加子级部门 >> 108 +无父级部门下添加子级部门统计 >> 3 +无部门名称 >> 0 + */ +$parentDeptID = '28'; +$depts = array('四级部门一', '四级部门二', '四级部门三'); +$count = array('0', '1'); $dept = new deptTest(); +r($dept->manageChildTest($parentDeptID, $depts, $count[0])) && p('1') && e('102'); //三级部门下添加四级部门 +r($dept->manageChildTest($parentDeptID, $depts, $count[1])) && p() && e('3'); //三级部门下添加四级部门统计 +r($dept->manageChildTest('', $depts, $count[0])) && p('1') && e('108'); //无父级部门下添加子级部门 +r($dept->manageChildTest('', $depts, $count[1])) && p() && e('3'); //无父级部门下添加子级部门统计 +r($dept->manageChildTest($parentDeptID, $depts = array(), $count[0])) && p() && e('0'); //无部门名称 -r() && p() && e(); \ No newline at end of file +system("./ztest init"); \ No newline at end of file diff --git a/test/model/dept/update.php b/test/model/dept/update.php index fc49d6cb27..a59452b4d7 100755 --- a/test/model/dept/update.php +++ b/test/model/dept/update.php @@ -1,3 +1,4 @@ +#!/usr/bin/env php update(); cid=1 pid=1 +修改父级 >> 修改后部门,0,,16,,dev1 +修改子级 >> 子级部门修改,1,,1,18,,dev2 +不输入上级部门 >> 『上级部门』应当是数字。 +部门名称为空 >> 『部门名称』不能为空。 +无负责人 >> 无负责人部门,1,,1,20,, + */ $deptIDList = array('16', '17', '18', '19', '20'); @@ -20,10 +27,10 @@ $noName = array('parent' => '0', 'manager' => 'test2'); $noManager = array('parent' => '1', 'name' => '无负责人部门'); $dept = new deptTest(); -r($dept->updateTest($deptIDList[0], $parentDept)) && p('16:name,parent,path,manager') && e('修改后部门,0,,16,,dev1'); -r($dept->updateTest($deptIDList[2], $childDept)) && p('18:name,parent,path,manager') && e('子级部门修改,1,,1,18,,dev2'); -r($dept->updateTest($deptIDList[1], $noParent)) && p('parent:0') && e('『上级部门』应当是数字。'); -r($dept->updateTest($deptIDList[3], $noName)) && p('name:0') && e('『部门名称』不能为空。'); -r($dept->updateTest($deptIDList[4], $noManager)) && p('20:name,parent,path,manager') && e('无负责人部门,1,,1,20,,'); +r($dept->updateTest($deptIDList[0], $parentDept)) && p('16:name,parent,path,manager') && e('修改后部门,0,,16,,dev1'); //修改父级 +r($dept->updateTest($deptIDList[2], $childDept)) && p('18:name,parent,path,manager') && e('子级部门修改,1,,1,18,,dev2'); //修改子级 +r($dept->updateTest($deptIDList[1], $noParent)) && p('parent:0') && e('『上级部门』应当是数字。'); //不输入上级部门 +r($dept->updateTest($deptIDList[3], $noName)) && p('name:0') && e('『部门名称』不能为空。'); //部门名称为空 +r($dept->updateTest($deptIDList[4], $noManager)) && p('20:name,parent,path,manager') && e('无负责人部门,1,,1,20,,'); //无负责人 -system("./ztest init"); +system("./ztest init"); \ No newline at end of file diff --git a/test/model/dept/updateorder.php b/test/model/dept/updateorder.php index 033fb82296..f7154b85f2 100755 --- a/test/model/dept/updateorder.php +++ b/test/model/dept/updateorder.php @@ -1,3 +1,4 @@ +#!/usr/bin/env php updateOrder(); cid=1 pid=1 +修改部门排序 >> 17 + */ -$dept = new deptTest(); +$orders = array('17'); -r() && p() && e(); \ No newline at end of file +$dept = new deptTest(); +r($dept->updateOrderTest($orders)) && p('17:order') && e('17'); //修改部门排序 \ No newline at end of file diff --git a/test/model/story/change.php b/test/model/story/change.php index 355d1c2986..b26bfd786d 100644 --- a/test/model/story/change.php +++ b/test/model/story/change.php @@ -22,13 +22,13 @@ $story2['reviewer'] = array('admin', 'test2'); $story2['title'] = ''; $story3 = $story1; -$story3['reviewer'] = array('admin', 'test2'); +$story3['needNotReview'] = true; -$result1 = $story->changeTest(1, $story1); -$result2 = $story->changeTest(2, $story2); -$result3 = $story->changeTest(3, $story3); +$result1 = $story->changeTest(1, $story1); +$result2 = $story->changeTest(2, $story2); +$result3 = $story->changeTest(26, $story3); r($result1[0]) && p() && e('『由谁评审』不能为空。'); // 不勾选【不需要评审】,不传入由谁评审时的变更,给出提示 r($result2) && p('title:0') && e('『研发需求名称』不能为空。'); // 变更时不填写需求名称,给出提示 -r($result3) && p('status,title,spec,verify,estimate,lastEditedBy') && e('changed,测试需求1变更标题,测试需求1的变更描述,测试需求1的变更验收标准,1,admin'); // 正常变更需求,判断返回的status、title等信息 +r($result3) && p('status,title,spec,verify,estimate,lastEditedBy,version') && e('changed,测试需求1变更标题,测试需求1的变更描述,测试需求1的变更验收标准,1,admin,3'); // 正常变更需求,判断返回的status、title等信息 system("./ztest init"); diff --git a/test/model/story/updatestoryorderofplan.php b/test/model/story/updatestoryorderofplan.php index 76c6cd3bb9..5d671358f8 100644 --- a/test/model/story/updatestoryorderofplan.php +++ b/test/model/story/updatestoryorderofplan.php @@ -12,5 +12,11 @@ pid=1 */ $story = new storyTest(); +$planStories1 = $story->updateStoryOrderOfPlanTest(1, 1); +$planStories2 = $story->updateStoryOrderOfPlanTest(1, 2, 1); -r() && p() && e(); \ No newline at end of file +r($planStories1) && p("0:plan,story,order") && e('1,1,21'); // 把需求1迁移到计划1下,获取更新后的planstory +r(count($planStories1)) && p() && e('4'); // 把需求1迁移到计划1下,获取更新后的planstory数量 +r($planStories2) && p("0:plan,story,order") && e('2,1,1'); // 把需求1迁移到计划2下,获取更新后的planstory +r(count($planStories2)) && p() && e('1'); // 把需求1迁移到计划2下,获取更新后的planstory数量 +system("./ztest init"); diff --git a/test/model/todo/activate.php b/test/model/todo/activate.php new file mode 100755 index 0000000000..bdf2c70a19 --- /dev/null +++ b/test/model/todo/activate.php @@ -0,0 +1,25 @@ +#!/usr/bin/env php +activate(); +cid=1 +pid=1 + +激活一个状态为wait的todo >> wait +激活一个状态为doing的todo >> wait +激活一个状态为done的todo >> wait +*/ + +$todoIDList = array('1', '2', '3'); + +$todo = new todoTest(); + +r($todo->activateTest($todoIDList[0])) && p('status') && e('wait'); // 激活一个状态为wait的todo +r($todo->activateTest($todoIDList[1])) && p('status') && e('wait'); // 激活一个状态为doing的todo +r($todo->activateTest($todoIDList[2])) && p('status') && e('wait'); // 激活一个状态为done的todo +system("./ztest init"); diff --git a/test/model/todo/assignto.php b/test/model/todo/assignto.php new file mode 100755 index 0000000000..019e3ac838 --- /dev/null +++ b/test/model/todo/assignto.php @@ -0,0 +1,41 @@ +#!/usr/bin/env php +assignTo(); +cid=1 +pid=1 + +指派todo 1给test1 >> test1,20300101,1000,1400 +指派todo 2给test1 >> test1,2400,2400 +指派todo 3给test1 >> test1,1002,1402 + +*/ + +$todoIDList = array('1', '2', '3'); + +$todo1 = new stdclass(); +$todo1->assignedTo = 'test1'; +$todo1->future = 'on'; +$todo1->begin = 1000; +$todo1->end = 1400; + +$todo2 = new stdclass(); +$todo2->assignedTo = 'test1'; +$todo2->lblDisableDate = 'on'; + +$todo3 = new stdclass(); +$todo3->assignedTo = 'test1'; +$todo3->begin = 1002; +$todo3->end = 1402; + +$todo = new todoTest(); + +r($todo->assignToTest($todoIDList[0], $todo1)) && p('assignedTo,date,begin,end') && e('test1,20300101,1000,1400'); // 指派todo 1给test1 +r($todo->assignToTest($todoIDList[1], $todo2)) && p('assignedTo,begin,end') && e('test1,2400,2400'); // 指派todo 2给test1 +r($todo->assignToTest($todoIDList[2], $todo3)) && p('assignedTo,begin,end') && e('test1,1002,1402'); // 指派todo 3给test1 +system("./ztest init"); diff --git a/test/model/todo/batchcreate.php b/test/model/todo/batchcreate.php new file mode 100755 index 0000000000..99aeef7af8 --- /dev/null +++ b/test/model/todo/batchcreate.php @@ -0,0 +1,41 @@ +#!/usr/bin/env php +batchCreate(); +cid=1 +pid=1 + +批量创建有个没有名字的待办 >> 批量创建待办1,desc1,1,custom,0;批量创建待办2,desc2,2,custom,0;批量创建待办3,desc4,4,custom,0 +批量创建的待办 >> 测试单转Bug13,desc1,1,bug,313;用户需求版本三41,desc2,2,story,1;开发任务11,desc3,3,task,1;测试单1,desc4,4,testtask,1 + +*/ + +$names = array('批量创建待办1','批量创建待办2','', '批量创建待办3', '', '', '', ''); +$types = array('custom', 'custom', 'custom', 'custom', 'custom', 'custom', 'custom', 'custom'); +$pris = array('1', '2', '3', '4', '1', '2', '3', '4'); +$descs = array('desc1', 'desc2', 'desc3', 'desc4', '' , '', '', ''); +$begins = array('0830', '0900', '0930', '1000', '1030', '1100', '1130', '1200'); +$ends = array('0900', '0930', '1000','1030', '1100', '1130', '1200', '1230'); +$bugs = array('2' => '313'); + +$noname_create = array('types' => $types, 'pris' => $pris, 'names' => $names, 'descs' => $descs, 'begins' => $begins, 'ends' => $ends); + +$names = array('批量创建待办4','批量创建待办5','批量创建待办6', '批量创建待办7', '', '', '', ''); +$types = array('bug', 'story', 'task', 'testtask', 'custom', 'custom', 'custom', 'custom'); +$bugs = array('1' => '313'); +$stories = array('2' => '1'); +$tasks = array('3' => '1'); +$testtasks = array('4' => '1'); + +$except_create = array('types' => $types, 'pris' => $pris, 'names' => $names, 'descs' => $descs, 'begins' => $begins, 'ends' => $ends, 'bugs' => $bugs, 'stories' => $stories, 'tasks' => $tasks, 'testtasks' => $testtasks); + +$todo = new todoTest(); + +r($todo->batchCreateTest($noname_create)) && p('2001:name,desc,pri,type,idvalue;2002:name,desc,pri,type,idvalue;2003:name,desc,pri,type,idvalue') && e(''); // 批量创建有个没有名字的待办 +r($todo->batchCreateTest($except_create)) && p('2004:name,desc,pri,type,idvalue;2005:name,desc,pri,type,idvalue;2006:name,desc,pri,type,idvalue;2007:name,desc,pri,type,idvalue') && e(''); // 批量创建的待办 +system("./ztest init"); diff --git a/test/model/todo/batchupdate.php b/test/model/todo/batchupdate.php new file mode 100755 index 0000000000..f0827a0bcb --- /dev/null +++ b/test/model/todo/batchupdate.php @@ -0,0 +1,34 @@ +#!/usr/bin/env php +batchUpdate(); +cid=1 +pid=1 + +批量修改todo类型 >> type,task,custom +批量修改todo优先级 >> pri,2,1 +批量修改todo状态 >> status,wait,doing + +*/ + +$types = array('1' => 'custom', '2' => 'bug', '3' => 'custom'); +$pris = array('1' => '1', '2' => '1', '3' => '3'); +$status = array('1' => 'doing', '2' => 'doing', '3' => 'done'); +$bugs = array('2' => '1'); +$tasks = array('3' => '2'); + +$changeType = array('types' => $types, 'bugs' => $bugs); +$changePri = array('pris' => $pris, 'bugs' => $bugs, 'tasks' => $tasks); +$changeStatus = array('status' => $status, 'bugs' => $bugs, 'tasks' => $tasks); + +$todo = new todoTest(); + +r($todo->batchUpdateTest($changeType, '3')) && p('0:field,old,new') && e('type,task,custom'); // 批量修改todo类型 +r($todo->batchUpdateTest($changePri, '2')) && p('0:field,old,new') && e('pri,2,1'); // 批量修改todo优先级 +r($todo->batchUpdateTest($changeStatus, '1')) && p('0:field,old,new') && e('status,wait,doing'); // 批量修改todo状态 +system("./ztest init"); diff --git a/test/model/todo/close.php b/test/model/todo/close.php new file mode 100755 index 0000000000..6fa2f73d80 --- /dev/null +++ b/test/model/todo/close.php @@ -0,0 +1,26 @@ +#!/usr/bin/env php +close(); +cid=1 +pid=1 + +关闭一个状态为wait的todo >> closed +关闭一个状态为doing的todo >> closed +关闭一个状态为done的todo >> closed + +*/ + +$todoIDList = array('1', '2', '3'); + +$todo = new todoTest(); + +r($todo->closeTest($todoIDList[0])) && p('status') && e('closed'); // 关闭一个状态为wait的todo +r($todo->closeTest($todoIDList[1])) && p('status') && e('closed'); // 关闭一个状态为doing的todo +r($todo->closeTest($todoIDList[2])) && p('status') && e('closed'); // 关闭一个状态为done的todo +system("./ztest init"); diff --git a/test/model/todo/create.php b/test/model/todo/create.php new file mode 100755 index 0000000000..afb87877ce --- /dev/null +++ b/test/model/todo/create.php @@ -0,0 +1,65 @@ +#!/usr/bin/env php +create(); +cid=1 +pid=1 + +创建没有名字的待办 >> 『待办名称』不能为空。 +创建自定义待办 >> 时间待定的月周期待办,custom,wait +创建bug待办 >> 测试单转Bug13,bug,doing +创建task待办 >> 开发任务11,task,done +创建story待办 >> 用户需求1,story,closed + +*/ + +$accountList = array('admin', 'dev1', 'test1'); + +$b_noname = new stdclass(); +$b_noname->name = ''; +$b_noname->date = 'today'; +$b_noname->type = 'custom'; + +$todo1 = new stdclass(); +$todo1->name = '时间待定的月周期待办'; +$todo1->type = 'custom'; +$todo1->date = '+3 days'; +$todo1->config = array('day' => '', 'specify' => array('month' => 0, 'day' => 1), 'month' => array(1,3,5), 'type' => 'month', 'beforeDays' => 2, 'end' => '2025-01-01'); + +$todo2 = new stdclass(); +$todo2->name = 'bug待办'; +$todo2->type = 'bug'; +$todo2->date = 'today'; +$todo2->bug = '313'; +$todo2->status = 'doing'; +$todo2->uid = '313'; + +$todo3 = new stdclass(); +$todo3->name = 'task待办'; +$todo3->type = 'task'; +$todo3->date = 'today'; +$todo3->task = '1'; +$todo3->status = 'done'; +$todo3->uid = '1'; + +$todo4 = new stdclass(); +$todo4->name = 'story待办'; +$todo4->type = 'story'; +$todo4->date = 'today'; +$todo4->story = '1'; +$todo4->status = 'closed'; +$todo4->uid = '1'; + +$todo = new todoTest(); + +r($todo->createTest($accountList[0], $b_noname)) && p() && e('『待办名称』不能为空。'); //创建没有名字的待办 +r($todo->createTest($accountList[1], $todo1)) && p('name,type,status') && e('时间待定的月周期待办,custom,wait'); //创建自定义待办 +r($todo->createTest($accountList[2], $todo2)) && p('name,type,status') && e('测试单转Bug13,bug,doing'); //创建bug待办 +r($todo->createTest($accountList[0], $todo3)) && p('name,type,status') && e('开发任务11,task,done'); //创建task待办 +r($todo->createTest($accountList[0], $todo4)) && p('name,type,status') && e('用户需求1,story,closed'); //创建story待办 +system("./ztest init"); diff --git a/test/model/todo/createbycycle.php b/test/model/todo/createbycycle.php new file mode 100755 index 0000000000..9df8306ce0 --- /dev/null +++ b/test/model/todo/createbycycle.php @@ -0,0 +1,29 @@ +#!/usr/bin/env php +createByCycle(); +cid=1 +pid=1 + +*/ + +$todo1 = new stdclass(); +$todo1->name = 'cycle生成的待办1'; +$todo1->config = '{"specify":{"month":"0","day":"1"},"days":"1","type":"day","beforeDays":11,"end":"","begin":"2022-03-23"}'; + +$todo2 = new stdclass(); +$todo2->name = 'cycle生成的待办2'; +$todo2->config = '{"specify":{"month":"0","day":"1"},"week":"2,4,7","type":"week","beforeDays":31,"end":"","begin":"2022-03-23"}'; + +$todo3 = new stdclass(); +$todo3->name = 'cycle生成的待办3'; +$todo3->config = '{"specify":{"month":"0","day":"1"},"month":"1,8,13,15,27,29,30","type":"month","beforeDays":301,"end":"","begin":"2022-03-23"}'; + +$todo = new todoTest(); + +r($todo->createByCycleTest($todo1)) && p() && e(''); diff --git a/test/model/todo/finish.php b/test/model/todo/finish.php new file mode 100755 index 0000000000..d68cb798da --- /dev/null +++ b/test/model/todo/finish.php @@ -0,0 +1,26 @@ +#!/usr/bin/env php +finish(); +cid=1 +pid=1 + +结束一个状态为wait的todo >> done +结束一个状态为doing的todo >> done +结束一个状态为done的todo >> done + +*/ + +$todoIDList = array('1', '2', '3'); + +$todo = new todoTest(); + +r($todo->finishTest($todoIDList[0])) && p('status') && e('done'); // 结束一个状态为wait的todo +r($todo->finishTest($todoIDList[1])) && p('status') && e('done'); // 结束一个状态为doing的todo +r($todo->finishTest($todoIDList[2])) && p('status') && e('done'); // 结束一个状态为done的todo +system("./ztest init"); diff --git a/test/model/todo/getbyid.php b/test/model/todo/getbyid.php new file mode 100755 index 0000000000..edba4adc28 --- /dev/null +++ b/test/model/todo/getbyid.php @@ -0,0 +1,29 @@ +#!/usr/bin/env php +getById(); +cid=1 +pid=1 + +获取id为1的todo信息 >> 自定义1的待办,custom,wait +获取id为2的todo信息 >> BUG1,bug,doing +获取id为3的todo信息 >> 开发任务12,task,done +获取id为4的todo信息 >> 用户需求3,story,closed +获取id不存在的todo信息 >> 0 + +*/ + +$todoIDList = array('1', '2', '3', '4', '100001'); + +$todo = new todoTest(); + +r($todo->getByIdTest($todoIDList[0])) && p('name,type,status') && e('自定义1的待办,custom,wait'); // 获取id为1的todo信息 +r($todo->getByIdTest($todoIDList[1])) && p('name,type,status') && e('BUG1,bug,doing'); // 获取id为2的todo信息 +r($todo->getByIdTest($todoIDList[2])) && p('name,type,status') && e('开发任务12,task,done'); // 获取id为3的todo信息 +r($todo->getByIdTest($todoIDList[3])) && p('name,type,status') && e('用户需求3,story,closed'); // 获取id为4的todo信息 +r($todo->getByIdTest($todoIDList[4])) && p('name,type,status') && e('0'); // 获取id不存在的todo信息 diff --git a/test/model/todo/getbylist.php b/test/model/todo/getbylist.php new file mode 100755 index 0000000000..286dcb5cfb --- /dev/null +++ b/test/model/todo/getbylist.php @@ -0,0 +1,27 @@ +#!/usr/bin/env php +getByList(); +cid=1 +pid=1 + +获取todo 1 2 3 4的名称 >> 自定义1的待办,BUG2的待办,任务3的待办,需求4的待办 +获取todo 5 6 7 8的名称 >> 测试单5的待办,自定义6的待办,BUG7的待办,任务8的待办 +获取todo 9 10 11 12的名称 >> 需求9的待办,测试单10的待办,自定义11的待办,BUG12的待办 + +*/ + +$todoIDList1 = array('1', '2', '3', '4'); +$todoIDList2 = array('5', '6', '7', '8'); +$todoIDList3 = array('9', '10', '11', '12'); + +$todo = new todoTest(); + +r($todo->getByListTest($todoIDList1)) && p() && e('自定义1的待办,BUG2的待办,任务3的待办,需求4的待办'); // 获取todo 1 2 3 4的名称 +r($todo->getByListTest($todoIDList2)) && p() && e('测试单5的待办,自定义6的待办,BUG7的待办,任务8的待办'); // 获取todo 5 6 7 8的名称 +r($todo->getByListTest($todoIDList3)) && p() && e('需求9的待办,测试单10的待办,自定义11的待办,BUG12的待办'); // 获取todo 9 10 11 12的名称 diff --git a/test/model/todo/getcount.php b/test/model/todo/getcount.php new file mode 100755 index 0000000000..2e16529e06 --- /dev/null +++ b/test/model/todo/getcount.php @@ -0,0 +1,29 @@ +#!/usr/bin/env php +getCount(); +cid=1 +pid=1 + +获取用户admin的所有待办个数 >> 2 +获取用户user1的所有待办个数 >> 2 +获取用户user2的所有待办个数 >> 2 +获取用户user3的所有待办个数 >> 2 +获取不存在的用户所有待办个数 >> 0 + +*/ + +$accountList = array('admin', 'user1', 'user2', 'user3', 'user10001'); + +$todo = new todoTest(); + +r($todo->getCountTest($accountList[0])) && p() && e('2'); // 获取用户admin的所有待办个数 +r($todo->getCountTest($accountList[1])) && p() && e('2'); // 获取用户user1的所有待办个数 +r($todo->getCountTest($accountList[2])) && p() && e('2'); // 获取用户user2的所有待办个数 +r($todo->getCountTest($accountList[3])) && p() && e('2'); // 获取用户user3的所有待办个数 +r($todo->getCountTest($accountList[4])) && p() && e('0'); // 获取不存在的用户所有待办个数 diff --git a/test/model/todo/getlist.php b/test/model/todo/getlist.php new file mode 100755 index 0000000000..8b9ba7bdbc --- /dev/null +++ b/test/model/todo/getlist.php @@ -0,0 +1,64 @@ +#!/usr/bin/env php +getList(); +cid=1 +pid=1 + +获取type为today 当前用户的代办数量 >> 0 +获取type为yesterday 当前用户的代办数量 >> 0 +获取type为thisweek 当前用户的代办数量 >> 0 +获取type为lastweek 当前用户的代办数量 >> 1 +获取type为thismonth 当前用户的代办数量 >> 1 +获取type为lastmonth 当前用户的代办数量 >> 1 +获取type为thisseason 当前用户的代办数量 >> 2 +获取type为thisyear 当前用户的代办数量 >> 2 +获取type为future 当前用户的代办数量 >> 0 +获取type为before 当前用户的代办数量 >> 2 +获取type为cycle 当前用户的代办数量 >> 0 +获取type为today user1的代办数量 >> 0 +获取type为yesterday user1的代办数量 >> 0 +获取type为thisweek user1的代办数量 >> 0 +获取type为lastweek user1的代办数量 >> 1 +获取type为thismonth user1的代办数量 >> 1 +获取type为lastmonth user1的代办数量 >> 1 +获取type为thisseason user1的代办数量 >> 2 +获取type为thisyear user1的代办数量 >> 2 +获取type为future user1的代办数量 >> 0 +获取type为before user1的代办数量 >> 2 +获取type为cycle user1的代办数量 >> 0 + +*/ + +$typeList = array('today', 'yesterday', 'thisweek', 'lastweek', 'thismonth', 'lastmonth', 'thisseason', 'thisyear', 'future', 'before', 'cycle'); +$account = 'user1'; + +$todo = new todoTest(); + +r($todo->getListTest($typeList[0])) && p() && e('0'); // 获取type为today 当前用户的代办数量 +r($todo->getListTest($typeList[1])) && p() && e('0'); // 获取type为yesterday 当前用户的代办数量 +r($todo->getListTest($typeList[2])) && p() && e('0'); // 获取type为thisweek 当前用户的代办数量 +r($todo->getListTest($typeList[3])) && p() && e('1'); // 获取type为lastweek 当前用户的代办数量 +r($todo->getListTest($typeList[4])) && p() && e('1'); // 获取type为thismonth 当前用户的代办数量 +r($todo->getListTest($typeList[5])) && p() && e('1'); // 获取type为lastmonth 当前用户的代办数量 +r($todo->getListTest($typeList[6])) && p() && e('2'); // 获取type为thisseason 当前用户的代办数量 +r($todo->getListTest($typeList[7])) && p() && e('2'); // 获取type为thisyear 当前用户的代办数量 +r($todo->getListTest($typeList[8])) && p() && e('0'); // 获取type为future 当前用户的代办数量 +r($todo->getListTest($typeList[9])) && p() && e('2'); // 获取type为before 当前用户的代办数量 +r($todo->getListTest($typeList[10])) && p() && e('0'); // 获取type为cycle 当前用户的代办数量 +r($todo->getListTest($typeList[0], $account)) && p() && e('0'); // 获取type为today user1的代办数量 +r($todo->getListTest($typeList[1], $account)) && p() && e('0'); // 获取type为yesterday user1的代办数量 +r($todo->getListTest($typeList[2], $account)) && p() && e('0'); // 获取type为thisweek user1的代办数量 +r($todo->getListTest($typeList[3], $account)) && p() && e('1'); // 获取type为lastweek user1的代办数量 +r($todo->getListTest($typeList[4], $account)) && p() && e('1'); // 获取type为thismonth user1的代办数量 +r($todo->getListTest($typeList[5], $account)) && p() && e('1'); // 获取type为lastmonth user1的代办数量 +r($todo->getListTest($typeList[6], $account)) && p() && e('2'); // 获取type为thisseason user1的代办数量 +r($todo->getListTest($typeList[7], $account)) && p() && e('2'); // 获取type为thisyear user1的代办数量 +r($todo->getListTest($typeList[8], $account)) && p() && e('0'); // 获取type为future user1的代办数量 +r($todo->getListTest($typeList[9], $account)) && p() && e('2'); // 获取type为before user1的代办数量 +r($todo->getListTest($typeList[10], $account)) && p() && e('0'); // 获取type为cycle user1的代办数量 diff --git a/test/model/todo/start.php b/test/model/todo/start.php new file mode 100755 index 0000000000..e87837b801 --- /dev/null +++ b/test/model/todo/start.php @@ -0,0 +1,26 @@ +#!/usr/bin/env php +start(); +cid=1 +pid=1 + +开始一个状态为wait的todo >> doing +开始一个状态为doing的todo >> doing +开始一个状态为done的todo >> doing + +*/ + +$todoIDList = array('1', '2', '3'); + +$todo = new todoTest(); + +r($todo->startTest($todoIDList[0])) && p('status') && e('doing'); // 开始一个状态为wait的todo +r($todo->startTest($todoIDList[1])) && p('status') && e('doing'); // 开始一个状态为doing的todo +r($todo->startTest($todoIDList[2])) && p('status') && e('doing'); // 开始一个状态为done的todo +system("./ztest init"); diff --git a/test/model/todo/update.php b/test/model/todo/update.php new file mode 100755 index 0000000000..8695409916 --- /dev/null +++ b/test/model/todo/update.php @@ -0,0 +1,34 @@ +#!/usr/bin/env php +update(); +cid=1 +pid=1 + +测试更新todo名称 >> name,自定义1的待办,john +测试更新todo类型 >> type,custom,bug +测试更新todo名称和类型 >> type,bug,custom;name,BUG2的待办,jack +测试不更新todo任何数据 >> 没有数据更新 + +*/ + +$todoIDList = array('1', '2'); + +$t_upname = array('name' => 'john'); +$t_uptype = array('type' => 'bug', 'idvalue' => '1'); +$t_typename = array('name' => 'jack', 'type' => 'custom'); +$t_unname = array('name' => 'john'); + + +$todo = new todoTest(); + +r($todo->updateTest($todoIDList[0], $t_upname)) && p('0:field,old,new') && e('name,自定义1的待办,john'); // 测试更新todo名称 +r($todo->updateTest($todoIDList[0], $t_uptype)) && p('0:field,old,new') && e('type,custom,bug'); // 测试更新todo类型 +r($todo->updateTest($todoIDList[1], $t_typename)) && p('0:field,old,new;1:field,old,new') && e('type,bug,custom;name,BUG2的待办,jack'); // 测试更新todo名称和类型 +r($todo->updateTest($todoIDList[0], $t_unname)) && p() && e('没有数据更新'); // 测试不更新todo任何数据 +system("./ztest init"); diff --git a/test/ztest b/test/ztest index e81c41c96c..79f3381bcd 100755 --- a/test/ztest +++ b/test/ztest @@ -43,6 +43,11 @@ switch($argv[1]) case 'company': ztfRun('model/company'); break; + case 'todo': + ztfRun('model/todo'); + case 'dept': + ztfRun('model/dept'); + break; case 'model': ztfRun('model'); break; diff --git a/tools/compatibility/PHPCompatibility/PHPCompatibility/Sniffs/FunctionDeclarations/NewNullableTypesSniff.php b/tools/compatibility/PHPCompatibility/PHPCompatibility/Sniffs/FunctionDeclarations/NewNullableTypesSniff.php index 8dc0c41606..6a06934112 100644 --- a/tools/compatibility/PHPCompatibility/PHPCompatibility/Sniffs/FunctionDeclarations/NewNullableTypesSniff.php +++ b/tools/compatibility/PHPCompatibility/PHPCompatibility/Sniffs/FunctionDeclarations/NewNullableTypesSniff.php @@ -20,7 +20,7 @@ use PHP_CodeSniffer_Tokens as Tokens; * * PHP version 7.1 * - * @link https://www.php.net/manual/en/migration71.new-features.php#migration71.new-features.nullable-types + * @link https://www.php.net/manual/en/migration71.new-features.php#migration71.new-features.nullabel-types * @link https://wiki.php.net/rfc/nullable_types * @link https://www.php.net/manual/en/functions.arguments.php#example-146 * diff --git a/tools/fixxuan b/tools/fixxuan deleted file mode 100644 index 9f7d3708db..0000000000 --- a/tools/fixxuan +++ /dev/null @@ -1,13 +0,0 @@ - if(!empty($moduleExtPaths)) - { - $extActionFile = $moduleExtPaths['common'] . $methodName . '.php'; - if(file_exists($extActionFile)) - { - $control = $extActionFile; - } - else - { - $extActionFile = $moduleExtPaths['xuan'] . $methodName . '.php'; - if(file_exists($extActionFile)) $control = $extActionFile; - } - } diff --git a/tools/mergezentaopms.php b/tools/mergezentaopms.php deleted file mode 100755 index f252c29ffa..0000000000 --- a/tools/mergezentaopms.php +++ /dev/null @@ -1,110 +0,0 @@ -visions = \",lite,\";' > visions.php\n"; + $command .= "echo $liteVersionAB > $dirName/VERSION\n"; + $command .= "zip -r ../../$packPrefix.{$liteVersionAB}.php{$phpVersion}.zip $dirName\n"; + } + + $command .= "rm -rf $dirName/\n"; + + file_put_contents($shellName, $command); + + $shellList[] = $shellName; + } +} + +/* Execute the shells. */ +$lines = ''; +foreach($shellList as $shellName) +{ + echo $shellName . "\n"; + $lines .= "sh $shellName &\n"; +} +$lines .= "wait\necho 'Zip packages has done.'"; +file_put_contents('zip.sh', $lines); diff --git a/www/js/zui/kanban/min.css b/www/js/zui/kanban/min.css index 71433fc054..6764bae4fd 100644 --- a/www/js/zui/kanban/min.css +++ b/www/js/zui/kanban/min.css @@ -1,6 +1,6 @@ /*! - * ZUI: ZUI Kanban View - v1.10.0 - 2022-03-04 + * ZUI: ZUI Kanban View - v1.10.0 - 2022-03-23 * http://openzui.com * GitHub: https://github.com/easysoft/zui.git * Copyright (c) 2022 cnezsoft.com; Licensed MIT - */.kanban{min-height:300px}.kanban-header{position:relative;background-color:rgba(0,0,0,.07)}.use-flex .kanban-cols{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-width:0;flex-direction:row;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-flex:1;-webkit-flex:auto;-ms-flex:auto;flex:auto}.kanban-col{min-width:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.no-flex .kanban-col{position:absolute;top:0;bottom:0}.kanban-col+.kanban-col{border-left:2px solid #fff}.kanban-header-cols{position:absolute;top:0;right:0;bottom:0;left:auto}.kanban-header-col{position:relative}.kanban-header-col>.title>.icon{display:inline-block;vertical-align:middle}.kanban-header-col>.title>.text{display:inline-block;margin:0 5px;overflow:hidden;font-weight:700;text-overflow:clip;white-space:nowrap;vertical-align:middle}.kanban-header-col>.title>.count{position:relative;top:1px;display:inline-block;color:#8b91a2;vertical-align:middle}.kanban-affixed .kanban-header-col>.title>.count{color:#ededed}.use-flex .kanban-header-col{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-width:0;min-height:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0 30px;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row}.use-flex .kanban-header-col>.title{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;max-width:100%;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;-webkit-box-flex:1;-webkit-flex:auto;-ms-flex:auto;flex:auto;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.no-flex .kanban-header-col>.title{position:absolute;top:50%;right:30px;left:30px;margin-top:-10px;line-height:20px;text-align:center;white-space:nowrap}.kanban-header-col>.actions{position:absolute;top:0;right:0}.kanban-header-col>.actions>.btn,.kanban-header-col>.actions>a{min-width:20px}.kanban-header-col>.actions>.btn>.icon,.kanban-header-col>.actions>a>.icon{opacity:.5}.kanban-affixed .kanban-header-col>.actions>.btn,.kanban-affixed .kanban-header-col>.actions>a{color:#fff}.kanban-header-parent-col>.kanban-header-col,.kanban-header-parent-col>.kanban-header-sub-cols{height:50%}.use-flex .kanban-header-parent-col{padding:0;flex-direction:column;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;-webkit-box-align:stretch;-webkit-align-items:stretch;-ms-flex-align:stretch;align-items:stretch}.kanban-header-sub-cols{position:relative;margin-top:-1px;margin-left:-2px;border-top:2px solid #fff}.use-flex .kanban-header-sub-cols{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;flex-direction:row;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row}.use-flex .kanban-header-sub-cols>.kanban-col{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.kanban-col:first-child>.kanban-header-sub-cols{margin-left:0}.kanban-lane,.kanban-sub-lane{position:relative;background-color:#f1f3f5}.use-flex .kanban-lane,.use-flex .kanban-sub-lane{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-height:0;flex-direction:row;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.kanban-lane+.kanban-lane{margin-top:2px}.kanban-lane>*{opacity:1;-webkit-transition:opacity .1s;-o-transition:opacity .1s;transition:opacity .1s}.kanban-lane.virtual-pending>*{opacity:0}.kanban-lane .has-sub-lane{background:0 0}.no-flex .kanban-lane-cols{position:absolute;top:0;right:0;bottom:0}.no-flex .kanban-sub-lane-cols{position:absolute;top:0;right:0;bottom:0;left:0}.kanban-sub-lane{-webkit-box-flex:1;-webkit-flex:auto;-ms-flex:auto;flex:auto}.kanban-lane-name{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:20px;overflow:hidden;color:#fff;text-align:center;background-color:#3dc6fd;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-flex:0;-webkit-flex:none;-ms-flex:none;flex:none}.kanban-lane-name>.text{position:absolute;top:5px;bottom:5px;left:0;display:block;overflow:hidden;line-height:20px;text-align:center;white-space:nowrap;-webkit-writing-mode:tb-rl;-ms-writing-mode:tb-rl;writing-mode:tb-rl;-webkit-writing-mode:vertical-rl;writing-mode:vertical-rl}.no-flex .kanban-lane-name{position:absolute;top:0;bottom:0;left:0}.kanban-sub-lanes{min-width:0}.use-flex .kanban-sub-lanes{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;flex-direction:column;-webkit-box-flex:1;-webkit-flex:auto;-ms-flex:auto;flex:auto;-webkit-box-align:stretch;-webkit-align-items:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-pack:stretch;-webkit-justify-content:stretch;-ms-flex-pack:stretch;justify-content:stretch;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column}.no-flex .kanban-sub-lanes{position:absolute;top:0;right:0;bottom:0}.kanban-sub-lanes.no-sub-lane{background-color:#f1f3f5}.kanban-dragging .kanban-lane-col{-webkit-transition:-webkit-box-shadow .1s;-o-transition:box-shadow .1s;transition:-webkit-box-shadow .1s;transition:box-shadow .1s;transition:box-shadow .1s,-webkit-box-shadow .1s}.kanban-lane-col.drop-target{-webkit-box-shadow:inset 0 0 0 3px rgba(255,152,0,.25);box-shadow:inset 0 0 0 3px rgba(255,152,0,.25)}.kanban-lane-col.drop-to{-webkit-box-shadow:inset 0 0 1px 4px rgba(255,152,0,.75);box-shadow:inset 0 0 1px 4px rgba(255,152,0,.75)}.kanban-lane-col.drop-to .kanban-lane-actions>.btn{background-color:rgba(255,152,0,.25);border:1px dotted #ff9800}.kanban-lane-col.drop-to .kanban-lane-actions>.btn>span{opacity:0}.kanban-lane-col[data-type=EMPTY]{background-color:#fff}.kanban-lane-items{height:100%;overflow:auto}.kanban-lane-actions{padding:10px 15px}.use-flex .kanban-items-grid{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-align-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start}.kanban-card{position:relative;padding:8px 10px;background:#fff;border:1px solid #fff;border-radius:4px;-webkit-box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);-webkit-transition:-webkit-box-shadow .2s,-webkit-transform .2s;-o-transition:box-shadow .2s,-o-transform .2s;transition:-webkit-box-shadow .2s,-webkit-transform .2s;transition:box-shadow .2s,transform .2s;transition:box-shadow .2s,transform .2s,-webkit-box-shadow .2s,-webkit-transform .2s,-o-transform .2s}.dragging>.kanban-card{background-color:#aaa;opacity:.2}.kanban-card:hover{border-color:rgba(0,0,0,.1);-webkit-box-shadow:0 4px 10px 0 rgba(0,0,0,.09);box-shadow:0 4px 10px 0 rgba(0,0,0,.09)}.drag-shadow>.kanban-card{z-index:10;border-color:rgba(0,0,0,.2);-webkit-box-shadow:0 4px 10px 0 rgba(0,0,0,.05),0 4px 20px 0 rgba(0,0,0,.3);box-shadow:0 4px 10px 0 rgba(0,0,0,.05),0 4px 20px 0 rgba(0,0,0,.3);-webkit-transition:-webkit-box-shadow .2s,-webkit-transform .4s!important;-o-transition:box-shadow .2s,-o-transform .4s!important;transition:-webkit-box-shadow .2s,-webkit-transform .4s!important;transition:box-shadow .2s,transform .4s!important;transition:box-shadow .2s,transform .4s,-webkit-box-shadow .2s,-webkit-transform .4s,-o-transform .4s!important}.drag-shadow>.kanban-card.in{-webkit-transform:scale(1.1) rotate(5deg);-ms-transform:scale(1.1) rotate(5deg);-o-transform:scale(1.1) rotate(5deg);transform:scale(1.1) rotate(5deg)}.kanban-dragging{cursor:move} \ No newline at end of file + */.kanban{min-height:300px}.kanban-header{position:relative;z-index:1;background-color:rgba(0,0,0,.07)}.use-flex .kanban-cols{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-width:0;flex-direction:row;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-flex:1;-webkit-flex:auto;-ms-flex:auto;flex:auto}.kanban-col{min-width:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.no-flex .kanban-col{position:absolute;top:0;bottom:0}.kanban-col+.kanban-col{border-left:2px solid #fff}.kanban-header-cols{position:absolute;top:0;right:0;bottom:0;left:auto}.kanban-header-col{position:relative}.kanban-header-col>.title>.icon{display:inline-block;vertical-align:middle}.kanban-header-col>.title>.text{display:inline-block;margin:0 5px;overflow:hidden;font-weight:700;text-overflow:clip;white-space:nowrap;vertical-align:middle}.kanban-header-col>.title>.count{position:relative;top:1px;display:inline-block;color:#8b91a2;vertical-align:middle}.kanban-affixed .kanban-header-col>.title>.count{color:#ededed}.use-flex .kanban-header-col{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-width:0;min-height:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0 30px;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row}.use-flex .kanban-header-col>.title{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;max-width:100%;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;-webkit-box-flex:1;-webkit-flex:auto;-ms-flex:auto;flex:auto;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.no-flex .kanban-header-col>.title{position:absolute;top:50%;right:30px;left:30px;margin-top:-10px;line-height:20px;text-align:center;white-space:nowrap}.kanban-header-col>.actions{position:absolute;top:0;right:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.kanban-header-col>.actions>.btn,.kanban-header-col>.actions>a{min-width:20px;padding:5px;border-radius:0}.kanban-header-col>.actions>.btn>.icon,.kanban-header-col>.actions>a>.icon{opacity:.5}.kanban-affixed .kanban-header-col>.actions>.btn,.kanban-affixed .kanban-header-col>.actions>.btn>.icon,.kanban-affixed .kanban-header-col>.actions>a,.kanban-affixed .kanban-header-col>.actions>a>.icon{color:#fff}.kanban-header-parent-col>.kanban-header-col,.kanban-header-parent-col>.kanban-header-sub-cols{height:50%}.use-flex .kanban-header-parent-col{padding:0;flex-direction:column;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;-webkit-box-align:stretch;-webkit-align-items:stretch;-ms-flex-align:stretch;align-items:stretch}.kanban-header-sub-cols{position:relative;margin-top:-1px;margin-left:-2px;border-top:2px solid #fff;border-right:none}.use-flex .kanban-header-sub-cols{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;flex-direction:row;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row}.use-flex .kanban-header-sub-cols>.kanban-col{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.kanban-col:first-child>.kanban-header-sub-cols{margin-left:0}.kanban-lane,.kanban-sub-lane{position:relative;background-color:#f1f3f5}.use-flex .kanban-lane,.use-flex .kanban-sub-lane{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-height:0;flex-direction:row;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.kanban-lane+.kanban-lane{margin-top:2px}.kanban-lane>*{opacity:1;-webkit-transition:opacity .1s;-o-transition:opacity .1s;transition:opacity .1s}.kanban-lane.virtual-pending>*{opacity:0}.kanban-lane .has-sub-lane{background:0 0}.no-flex .kanban-lane-cols{position:absolute;top:0;right:0;bottom:0}.no-flex .kanban-sub-lane-cols{position:absolute;top:0;right:0;bottom:0;left:0}.kanban-sub-lane{-webkit-box-flex:1;-webkit-flex:auto;-ms-flex:auto;flex:auto}.kanban-lane-name{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:20px;overflow:hidden;color:#fff;text-align:center;background-color:#3dc6fd;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-flex:0;-webkit-flex:none;-ms-flex:none;flex:none}.kanban-lane-name>.text{position:absolute;top:5px;bottom:5px;left:0;display:block;overflow:hidden;line-height:20px;text-align:center;white-space:nowrap;-webkit-writing-mode:tb-rl;-ms-writing-mode:tb-rl;writing-mode:tb-rl;-webkit-writing-mode:vertical-rl;writing-mode:vertical-rl}.no-flex .kanban-lane-name{position:absolute;top:0;bottom:0;left:0}.kanban-sub-lanes{min-width:0}.use-flex .kanban-sub-lanes{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;flex-direction:column;-webkit-box-flex:1;-webkit-flex:auto;-ms-flex:auto;flex:auto;-webkit-box-align:stretch;-webkit-align-items:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-pack:stretch;-webkit-justify-content:stretch;-ms-flex-pack:stretch;justify-content:stretch;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column}.no-flex .kanban-sub-lanes{position:absolute;top:0;right:0;bottom:0}.kanban-sub-lanes.no-sub-lane{background-color:#f1f3f5}.kanban-dragging .kanban-lane-col{-webkit-transition:-webkit-box-shadow .1s;-o-transition:box-shadow .1s;transition:-webkit-box-shadow .1s;transition:box-shadow .1s;transition:box-shadow .1s,-webkit-box-shadow .1s}.kanban-lane-col.drop-target{-webkit-box-shadow:inset 0 0 0 3px rgba(255,152,0,.25);box-shadow:inset 0 0 0 3px rgba(255,152,0,.25)}.kanban-lane-col.drop-to{-webkit-box-shadow:inset 0 0 1px 4px rgba(255,152,0,.75);box-shadow:inset 0 0 1px 4px rgba(255,152,0,.75)}.kanban-lane-col.drop-to .kanban-lane-actions>.btn{background-color:rgba(255,152,0,.25);border:1px dotted #ff9800}.kanban-lane-col.drop-to .kanban-lane-actions>.btn>span{opacity:0}.kanban-lane-col[data-type=EMPTY]{background-color:#fff}.kanban-lane-items{height:100%;overflow:auto;overflow:overlay!important}.kanban-lane-actions{padding:10px 15px}.use-flex .kanban-items-grid{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-align-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start}.kanban-card{position:relative;padding:8px 10px;background:#fff;border:1px solid #fff;border-radius:4px;-webkit-box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);-webkit-transition:-webkit-box-shadow .2s,-webkit-transform .2s;-o-transition:box-shadow .2s,-o-transform .2s;transition:-webkit-box-shadow .2s,-webkit-transform .2s;transition:box-shadow .2s,transform .2s;transition:box-shadow .2s,transform .2s,-webkit-box-shadow .2s,-webkit-transform .2s,-o-transform .2s}.dragging>.kanban-card{background-color:#aaa;opacity:.2}.kanban-card:hover{border-color:rgba(0,0,0,.1);-webkit-box-shadow:0 4px 10px 0 rgba(0,0,0,.09);box-shadow:0 4px 10px 0 rgba(0,0,0,.09)}.drag-shadow>.kanban-card{z-index:10;border-color:rgba(0,0,0,.2);-webkit-box-shadow:0 4px 10px 0 rgba(0,0,0,.05),0 4px 20px 0 rgba(0,0,0,.3);box-shadow:0 4px 10px 0 rgba(0,0,0,.05),0 4px 20px 0 rgba(0,0,0,.3);opacity:1!important;-webkit-transition:-webkit-box-shadow .2s,-webkit-transform .4s!important;-o-transition:box-shadow .2s,-o-transform .4s!important;transition:-webkit-box-shadow .2s,-webkit-transform .4s!important;transition:box-shadow .2s,transform .4s!important;transition:box-shadow .2s,transform .4s,-webkit-box-shadow .2s,-webkit-transform .4s,-o-transform .4s!important}.drag-shadow>.kanban-card.in{-webkit-transform:scale(1.1) rotate(5deg);-ms-transform:scale(1.1) rotate(5deg);-o-transform:scale(1.1) rotate(5deg);transform:scale(1.1) rotate(5deg)}.drag-shadow>.kanban-card a{pointer-events:none}.kanban-dragging{cursor:move} \ No newline at end of file diff --git a/www/js/zui/kanban/min.js b/www/js/zui/kanban/min.js index 32ac8843be..2524129c33 100644 --- a/www/js/zui/kanban/min.js +++ b/www/js/zui/kanban/min.js @@ -1,7 +1,7 @@ /*! - * ZUI: ZUI Kanban View - v1.10.0 - 2022-03-04 + * ZUI: ZUI Kanban View - v1.10.0 - 2022-03-23 * http://openzui.com * GitHub: https://github.com/easysoft/zui.git * Copyright (c) 2022 cnezsoft.com; Licensed MIT */ -!function(){"use strict";function a(a,e){return n&&!e?requestAnimationFrame(a):setTimeout(a,e||0)}function e(a){return n?cancelAnimationFrame(a):void clearTimeout(a)}var n="function"==typeof window.requestAnimationFrame;$.zui({asap:a,clearAsap:e})}(),function(a){"use strict";function e(e,n){"string"==typeof e&&(e=a(e)),e instanceof a&&(e=e[0]);var t=e.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight,d=window.innerWidth||document.documentElement.clientWidth;if(n)return t.left>=0&&t.top>=0&&t.left+t.width<=d&&t.top+t.height<=r;var i=t.top<=r&&t.top+t.height>=0,o=t.left<=d&&t.left+t.width>=0;return i&&o}var n="zui.virtualRender",t=function(e,r){"function"==typeof r&&(r={render:r});var d=this;d.name=n,d.$=a(e),d.options=r=a.extend({},t.DEFAULTS,this.$.data(),r),d.rendered=!1;var i=r.container;"function"==typeof i&&(i=i(d));var o=a(i?i:window);d.tryRender()||(d.$container=o,d.scrollListener=d.tryRender.bind(d),r.pendingClass&&d.$.addClass(r.pendingClass),o.on("scroll",d.scrollListener))};t.prototype.tryRender=function(){var n=this;return!(n.rendered||!e(n.$))&&(n.renderTaskID&&a.zui.clearAsap(n.renderTaskID),n.renderTaskID=a.zui.asap(function(){n.renderTaskID=null;var a=n.options.render(n.$);a!==!1&&(n.rendered=!0,n.destroy())},n.options.delay),!0)},t.prototype.destroy=function(){var e=this;e.renderTaskID&&a.zui.clearAsap(e.renderTaskID),e.scrollListener&&(e.$container.off("scroll",e.scrollListener),e.scrollListener=null);var t=e.options.pendingClass;t&&e.$.removeClass(t),e.$.removeData(n)},t.DEFAULTS={pendingClass:"virtual-pending"},a.fn.virtualRender=function(e){return this.each(function(){var r=a(this),d=r.data(n);if(d){if("string"==typeof e)return d[e]();d.destroy()}r.data(n,d=new t(this,e))})},a.zui.isElementInViewport=e}(jQuery),function(a){"use strict";var e="zui.kanban",n="object"==typeof CSS&&CSS.supports("display","flex"),t=function(n,r){var d=this;if(d.name=e,d.$=a(n).addClass("kanban"),r=d.setOptions(a.extend({},t.DEFAULTS,this.$.data(),r)),r.onAction){var i=function(e){var n=a(this);r.onAction(n.data("action"),n,e,d)};d.$.on("click",".action",i).on("dblclick",".action-dbc",i)}if("auto"===r.droppable&&(r.droppable=!r.readonly),r.droppable){var o=0,s={dropOnMouseleave:!0,selector:".kanban-item",target:'.kanban-lane-col:not([data-type="EMPTY"])',drop:function(a){"function"==typeof r.droppable?r.droppable(a):r.onAction&&r.onAction("dropItem",a.element,a,d)},start:function(e){d.$.addClass("kanban-dragging"),o&&clearTimeout(o),o=setTimeout(function(){a(e.shadowElement).addClass("in"),o=0},50)},always:function(){d.$.removeClass("kanban-dragging"),o&&(clearTimeout(o),o=0)}};"object"==typeof r.droppable&&a.extend(s,r.droppable),d.$.droppable(s)}r.onCreate&&r.onCreate(d)};t.prototype.setOptions=function(e){var t=this,r=a.extend({},t.options,{data:t.data},e);t.options=r,r.useFlex&&!n&&(r.useFlex=!1),t.$.toggleClass("no-flex",!r.useFlex).toggleClass("use-flex",!!r.useFlex);var d=!!a.fn.virtualRender&&r.virtualize;return d&&("object"!=typeof d&&(d={lane:!0}),t.virtualize=a.extend({},d)),t.data=r.data||[],t.render(t.data),r},t.prototype.render=function(a){var e=this;a&&(e.data=a),e.data&&!Array.isArray(e.data)&&(e.data=[e.data]);var n=e.options,t=e.data||[];n.beforeRender&&n.beforeRender(e,t),e.$.toggleClass("kanban-readonly",!!n.readonly).toggleClass("kanban-no-lane-name",!!n.noLaneName),e.$.children(".kanban-board").addClass("kanban-expired"),e.maxKanbanBoardWidth=0;for(var r=0;r1&&e.$.children(".kanban-board").css("min-width",e.maxKanbanBoardWidth),n.onRender&&n.onRender(e)},t.prototype.layoutKanban=function(a,e){for(var n=this,t=n.options,r=t.noLaneName?0:t.laneNameWidth,d=0,i={},o=!1,s=[],l=0;l0&&t.subLaneSpace&&(k.$height+=t.subLaneSpace)}}else for(var y=k.items||k.cards||{},C=0;C-1){var r=n.data[t];e=a.extend(r,e),n.data[t]=e}else n.data.push(e)}e.id||(e.id=a.zui.uuid());var d=e.id,i=n.options,o=n.$,s=o.children('.kanban-board[data-id="'+d+'"]');s.length?s.removeClass("kanban-expired"):s=a('
    ').appendTo(o),n.layoutKanban(e,s),n.renderKanbanHeader(e,s),s.children(".kanban-lane").addClass("kanban-expired");for(var l=e.lanes||[],c=0;c
    ').prependTo(n),r.useFlex||i.addClass("clearfix")),i.css("height",(d?2:1)*r.headerHeight).toggleClass("kanban-header-has-parent",!!d);var o=i.children(".kanban-cols");o.css("left",e.$layout.laneNameWidth).children(".kanban-col").addClass("kanban-expired");for(var s=e.columns,l=e.$layout.columnsMap||{},c=null,p=null,u=0;u.kanban-col").addClass("kanban-expired"):o=a(['
    ','
    ','
    ','','',i.showCount?'':"","
    ","
    ",'
    ',"
    ","
    "].join("")),s&&s.length?s.after(o):n.prepend(o),o.data("col",e).attr("data-type",e.type);var l=r.$layout.columnWidth;i.useFlex?o.css("flex",e.subs.length+" "+e.subs.length+" "+l*e.subs.length+"%"):o.css({width:l*e.subs.length+"%",left:e.$index*l+"%"});var c=o.children(".kanban-header-col");c.find(".title>.icon").attr("class","icon icon-"+(e.icon||""));var p=c.find(".title>.text").text(e.name).attr("title",e.name);if(e.color&&p.css("color",e.color),i.showCount){var u=void 0!==e.count?e.count:e.$cardsCount;i.showZeroCount||u||(u="");var h=c.find(".title>.count").text(u);i.onRenderCount&&i.onRenderCount(h,u,e,d)}i.onRenderHeaderCol&&i.onRenderHeaderCol(o,e,n,r)},t.prototype.renderHeaderCol=function(e,n,t,r,d){var i=this,o=i.options;if(e.parentType&&t){var s=n.children('.kanban-header-parent-col[data-id="'+t.id+'"]');n=s.children(".kanban-header-sub-cols")}var l=n.children('.kanban-header-col[data-id="'+e.id+'"]'),c=r?n.children('.kanban-header-col[data-id="'+r.id+'"]:not(.kanban-expired)'):null;l.length?l.removeClass("kanban-expired"):l=a(['
    ','
    ','','',o.showCount?'':"","
    ",'
    ',"
    "].join("")),c&&c.length?c.after(l):n.prepend(l),l.data("col",e).attr("data-type",e.type);var p=t?100/t.subs.length:d.$layout.columnWidth;o.useFlex?l.css("flex","1 1 "+p+"%"):l.css({left:(t?e.$subIndex:e.$index)*p+"%",width:p+"%"}),l.find(".title>.icon").attr("class","icon icon-"+(e.icon||""));var u=l.find(".title>.text").text(e.name).attr("title",e.name);if(e.color&&u.css("color",e.color),o.showCount){var h=void 0!==e.count?e.count:e.$cardsCount;o.showZeroCount||h||(h="");var b=l.find(".title>.count").text(h);o.onRenderCount&&o.onRenderCount(b,h,e,i)}o.onRenderHeaderCol&&o.onRenderHeaderCol(l,e,n,d)},t.prototype.renderLane=function(e,t,r,d){var i=this,o=i.options;r=r||i.$.children('.kanban-board[data-id="'+e.kanban+'"]');var s=r.children('.kanban-lane[data-id="'+e.id+'"]');s.length?s.removeClass("kanban-expired"):(s=a('
    ').appendTo(r),n||s.addClass("clearfix"));var l=e.subLanes?e.subLanes.length:0;s.attr("data-index",e.$index).data("lane",e).toggleClass("has-sub-lane",l>0).css({height:e.$height||"auto"}),i.virtualizeRender(d,"lane",s,function(){if(!o.noLaneName){var n=s.children('.kanban-lane-name[data-id="'+e.id+'"]');n.length||(n=a('
    ').prependTo(s)),n.empty().css("width",o.laneNameWidth).attr("title",e.name).append(a('').text(e.name)),e.color&&n.css("background-color",e.color),o.onRenderLaneName&&o.onRenderLaneName(n,e,r,t,d)}s.children(".kanban-cols,.kanban-sub-lanes").addClass("kanban-expired");var l;l=e.subLanes?i.renderSubLanes(e,t,s,d):i.renderLaneCols(t,e.items||e.cards||{},s,e,d),o.useFlex||l.css("left",d.$layout.laneNameWidth),s.children(".kanban-expired").remove()},{lane:e,columns:t,kanban:d})},t.prototype.virtualizeRender=function(e,n,t,r,d){var i=this,o=i.virtualize,s=o?o[n]:null;return s?("function"==typeof s&&(s=s(d,t)),"number"==typeof s&&t.height(s),void t.virtualRender(a.extend({render:r},i.options.virtualRenderOptions))):r()},t.prototype.renderSubLanes=function(e,n,t,r){var d=this,i=t.children(".kanban-sub-lanes");i.length?i.removeClass("kanban-expired"):i=a('
    ').appendTo(t),i.children(".kanban-sub-lane").addClass("kanban-expired");for(var o=0;o').appendTo(r),n||o.addClass("clearfix")),o.attr("data-index",i).data("lane",e).css({height:e.$height||"auto"}),o.children(".kanban-col").addClass("kanban-expired");var s=e.items||e.cards;s&&this.renderLaneCols(t,s,o,e,d),o.children(".kanban-expired").remove()},t.prototype.renderLaneCols=function(e,n,t,r,d){var i=this,o=t.children(".kanban-cols");o.length?o.removeClass("kanban-expired"):o=a('
    ').appendTo(t),o.children(".kanban-col").addClass("kanban-expired");for(var s=null,l=0;l0?e[i-1]:null;o.$index=i,o.$col=a,o.$lane=t,this.renderCard(o,d,s,a,t,r)}var l=a.cardsPerRow||t.cardsPerRow||r.cardsPerRow||this.options.cardsPerRow;d.css("padding",this.options.cardSpace/2).toggleClass("kanban-items-grid",l>1).attr("data-cards-per-row",l),d.children(".kanban-expired").remove()},t.prototype.renderLaneCol=function(e,n,t){var r=this,d=r.options,i=n.children('.kanban-lane-col[data-id="'+e.id+'"]'),o=t?n.children('.kanban-lane-col[data-id="'+t.id+'"]:not(.kanban-expired)'):null;i.length?i.removeClass("kanban-expired"):(i=a(['
    ','
    ',"
    "].join("")),r.options.readonly||i.append(['
    ','","
    "].join("")),d.laneItemsClass&&i.find(".kanban-lane-items").addClass(d.laneItemsClass),d.laneColClass&&i.addClass(d.laneColClass)),o&&o.length?o.after(i):n.prepend(i),i.attr({"data-parent":e.parentType?e.parentType:null,"data-type":e.type}).data("col",e);var s=e.$kanbanData.$layout.columnWidth;return d.useFlex?i.css("flex","1 1 "+s+"%"):i.css({left:e.$index*s+"%",width:s+"%"}),i},t.prototype.renderCard=function(e,n,t,r,d,i){var o=this.options,s=n.children('.kanban-item[data-id="'+e.id+'"]'),l=t?n.children('.kanban-item[data-id="'+t.id+'"]:not(.kanban-expired)'):null;s.length?s.removeClass("kanban-expired"):(s=a('
    '),o.wrapCard&&s.append('
    ')),l&&l.length?l.after(s):n.prepend(s);var c=r.cardsPerRow||d.cardsPerRow||i.cardsPerRow||o.cardsPerRow;s.data("item",e).css({padding:o.cardSpace/2,width:c>1?100/c+"%":""});var p=o.wrapCard?s.children(".kanban-card"):s;p.css("height",o.cardHeight);var u=o.cardRender||o.itemRender;if(u)u(e,p,r,d,i);else{var h=p.find(".title");h.length||(h=a('
    ').appendTo(p)),h.text(e.name||e.title)}return p},t.DEFAULTS={minColWidth:100,maxColHeight:400,minColHeight:90,minSubColHeight:40,subLaneSpace:2,laneNameWidth:20,headerHeight:32,cardHeight:40,cardSpace:10,cardsPerRow:1,wrapCard:!0,fluidBoardWidth:!0,addItemText:"添加条目",useFlex:!0,droppable:"auto",laneColClass:"",showCount:!0},a.fn.kanban=function(n){return this.each(function(){var r=a(this),d=r.data(e),i="object"==typeof n&&n;d||r.data(e,d=new t(this,i)),"string"==typeof n&&d[n]()})},t.NAME=e,a.fn.kanban.Constructor=t}(jQuery); \ No newline at end of file +!function(){"use strict";function a(a,e){return n&&!e?requestAnimationFrame(a):setTimeout(a,e||0)}function e(a){return n?cancelAnimationFrame(a):void clearTimeout(a)}var n="function"==typeof window.requestAnimationFrame;$.zui({asap:a,clearAsap:e})}(),function(a){"use strict";function e(e,n){"string"==typeof e&&(e=a(e)),e instanceof a&&(e=e[0]);var t=e.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight,d=window.innerWidth||document.documentElement.clientWidth;if(n)return t.left>=0&&t.top>=0&&t.left+t.width<=d&&t.top+t.height<=r;var i=t.top<=r&&t.top+t.height>=0,o=t.left<=d&&t.left+t.width>=0;return i&&o}var n="zui.virtualRender",t=function(e,r){"function"==typeof r&&(r={render:r});var d=this;d.name=n,d.$=a(e),d.options=r=a.extend({},t.DEFAULTS,this.$.data(),r),d.rendered=!1;var i=r.container;"function"==typeof i&&(i=i(d));var o=a(i?i:window);d.tryRender()||(d.$container=o,d.scrollListener=d.tryRender.bind(d),r.pendingClass&&d.$.addClass(r.pendingClass),o.on("scroll",d.scrollListener))};t.prototype.tryRender=function(){var n=this;return!(n.rendered||!e(n.$))&&(n.renderTaskID&&a.zui.clearAsap(n.renderTaskID),n.renderTaskID=a.zui.asap(function(){n.renderTaskID=null;var a=n.options.render(n.$);a!==!1&&(n.rendered=!0,n.destroy())},n.options.delay),!0)},t.prototype.destroy=function(){var e=this;e.renderTaskID&&a.zui.clearAsap(e.renderTaskID),e.scrollListener&&(e.$container.off("scroll",e.scrollListener),e.scrollListener=null);var t=e.options.pendingClass;t&&e.$.removeClass(t),e.$.removeData(n)},t.DEFAULTS={pendingClass:"virtual-pending"},a.fn.virtualRender=function(e){return this.each(function(){var r=a(this),d=r.data(n);if(d){if("string"==typeof e)return d[e]();d.destroy()}r.data(n,d=new t(this,e))})},a.zui.isElementInViewport=e}(jQuery),function(a){"use strict";var e="zui.kanban",n="object"==typeof CSS&&CSS.supports("display","flex"),t=function(n,r){var d=this;if(d.name=e,d.$=a(n).addClass("kanban"),r=d.setOptions(a.extend({},t.DEFAULTS,this.$.data(),r)),r.onAction){var i=function(e){var n=a(this);r.onAction(n.data("action"),n,e,d)};d.$.on("click",".action",i).on("dblclick",".action-dbc",i)}var o=r.droppable;if("auto"===o&&(o=!r.readonly),o){var s=r.sortable;"function"==typeof s?s={finish:s}:"object"!=typeof s&&(s={});var l=0;"function"==typeof o?o={drop:o}:"object"!=typeof o&&(o={});var c={dropOnMouseleave:!0,selector:".kanban-item",target:".kanban-lane-col:not(.kanban-col-sorting)",before:function(e){if(o.before){var n=o.before(e);if(n===!1)return n}if(s){d._sortResult=null;var t=e.element.closest(".kanban-lane-items");t.closest(".kanban-col").addClass("kanban-col-sorting");var r=t.data("zui.sortable");r||t.sortable(a.extend({},s,{selector:".kanban-item",trigger:".kanban-card",dragCssClass:"kanban-item-sorting",noShadow:!0,finish:function(a){a.list.length>1&&(d._sortResult=a)}})).triggerHandler(e.event)}},drop:function(a){o.drop&&o.drop(a),r.onAction&&r.onAction("dropItem",a.element,a,d)},start:function(e){d.$.addClass("kanban-dragging"),l&&clearTimeout(l),l=setTimeout(function(){a(e.shadowElement).addClass("in"),l=0},50),o.start&&o.start(e)},always:function(a){if(d.$.removeClass("kanban-dragging"),l&&(clearTimeout(l),l=0),s){var e=a.element.closest(".kanban-lane-items");e.closest(".kanban-col").removeClass("kanban-col-sorting"),e.sortable("destroy"),!a.isIn&&d._sortResult&&s.finish&&s.finish(d._sortResult)}o.always&&o.always(a)}};c=a.extend({},o,c),d.$.droppable(c)}r.onCreate&&r.onCreate(d)};t.prototype.setOptions=function(e){var t=this,r=a.extend({},t.options,{data:t.data},e);t.options=r,r.useFlex&&!n&&(r.useFlex=!1),t.$.toggleClass("no-flex",!r.useFlex).toggleClass("use-flex",!!r.useFlex);var d=!!a.fn.virtualRender&&r.virtualize;return d&&("object"!=typeof d&&(d={lane:!0}),t.virtualize=a.extend({},d)),t.data=r.data||[],t.render(t.data),r},t.prototype.render=function(a){var e=this;a&&(e.data=a),e.data&&!Array.isArray(e.data)&&(e.data=[e.data]);var n=e.options,t=e.data||[];n.beforeRender&&n.beforeRender(e,t),e.$.toggleClass("kanban-readonly",!!n.readonly).toggleClass("kanban-no-lane-name",!!n.noLaneName),e.$.children(".kanban-board").addClass("kanban-expired"),e.maxKanbanBoardWidth=0;for(var r=0;r1&&e.$.children(".kanban-board").css("min-width",e.maxKanbanBoardWidth),n.onRender&&n.onRender(e)},t.prototype.layoutKanban=function(a,e){for(var n=this,t=n.options,r=t.noLaneName?0:t.laneNameWidth,d=0,i={},o=!1,s=[],l=0;l0&&t.subLaneSpace&&(k.$height+=t.subLaneSpace)}}else for(var y=k.items||k.cards||{},C=0;C-1){var r=n.data[t];e=a.extend(r,e),n.data[t]=e}else n.data.push(e)}e.id||(e.id=a.zui.uuid());var d=e.id,i=n.options,o=n.$,s=o.children('.kanban-board[data-id="'+d+'"]');s.length?s.removeClass("kanban-expired"):s=a('
    ').appendTo(o),n.layoutKanban(e,s),n.renderKanbanHeader(e,s),s.children(".kanban-lane").addClass("kanban-expired");for(var l=e.lanes||[],c=0;c
    ').prependTo(n),r.useFlex||i.addClass("clearfix")),i.css("height",(d?2:1)*r.headerHeight).toggleClass("kanban-header-has-parent",!!d);var o=i.children(".kanban-cols");o.css("left",e.$layout.laneNameWidth).children(".kanban-col").addClass("kanban-expired");for(var s=e.columns,l=e.$layout.columnsMap||{},c=null,u=null,h=0;h.kanban-col").addClass("kanban-expired"):o=a(['
    ','
    ','
    ','','',i.showCount?'':"","
    ","
    ",'
    ',"
    ","
    "].join("")),s&&s.length?s.after(o):n.prepend(o),o.data("col",e).attr("data-type",e.type);var l=r.$layout.columnWidth;i.useFlex?o.css("flex",e.subs.length+" "+e.subs.length+" "+l*e.subs.length+"%"):o.css({width:l*e.subs.length+"%",left:e.$index*l+"%"});var c=o.children(".kanban-header-col");c.find(".title>.icon").attr("class","icon icon-"+(e.icon||""));var u=c.find(".title>.text").text(e.name).attr("title",e.name);if(e.color&&u.css("color",e.color),i.showCount){var h=void 0!==e.count?e.count:e.$cardsCount;i.showZeroCount||h||(h="");var p=c.find(".title>.count").text(h);i.onRenderCount&&i.onRenderCount(p,h,e,d)}i.onRenderHeaderCol&&i.onRenderHeaderCol(o,e,n,r)},t.prototype.renderHeaderCol=function(e,n,t,r,d){var i=this,o=i.options;if(e.parentType&&t){var s=n.children('.kanban-header-parent-col[data-id="'+t.id+'"]');n=s.children(".kanban-header-sub-cols")}var l=n.children('.kanban-header-col[data-id="'+e.id+'"]'),c=r?n.children('.kanban-header-col[data-id="'+r.id+'"]:not(.kanban-expired)'):null;l.length?l.removeClass("kanban-expired"):l=a(['
    ','
    ','','',o.showCount?'':"","
    ",'
    ',"
    "].join("")),c&&c.length?c.after(l):n.prepend(l),l.data("col",e).attr("data-type",e.type);var u=t?100/t.subs.length:d.$layout.columnWidth;o.useFlex?l.css("flex","1 1 "+u+"%"):l.css({left:(t?e.$subIndex:e.$index)*u+"%",width:u+"%"}),l.find(".title>.icon").attr("class","icon icon-"+(e.icon||""));var h=l.find(".title>.text").text(e.name).attr("title",e.name);if(e.color&&h.css("color",e.color),o.showCount){var p=void 0!==e.count?e.count:e.$cardsCount;o.showZeroCount||p||(p="");var b=l.find(".title>.count").text(p);o.onRenderCount&&o.onRenderCount(b,p,e,i)}o.onRenderHeaderCol&&o.onRenderHeaderCol(l,e,n,d)},t.prototype.renderLane=function(e,t,r,d){var i=this,o=i.options;r=r||i.$.children('.kanban-board[data-id="'+e.kanban+'"]');var s=r.children('.kanban-lane[data-id="'+e.id+'"]');s.length?s.removeClass("kanban-expired"):(s=a('
    ').appendTo(r),n||s.addClass("clearfix"));var l=e.subLanes?e.subLanes.length:0;s.attr("data-index",e.$index).data("lane",e).toggleClass("has-sub-lane",l>0).css({height:e.$height||"auto"}),i.virtualizeRender(d,"lane",s,function(){if(!o.noLaneName){var n=s.children('.kanban-lane-name[data-id="'+e.id+'"]');n.length||(n=a('
    ').prependTo(s)),n.empty().css("width",o.laneNameWidth).attr("title",e.name).append(a('').text(e.name)),e.color&&n.css("background-color",e.color),o.onRenderLaneName&&o.onRenderLaneName(n,e,r,t,d)}s.children(".kanban-cols,.kanban-sub-lanes").addClass("kanban-expired");var l;l=e.subLanes?i.renderSubLanes(e,t,s,d):i.renderLaneCols(t,e.items||e.cards||{},s,e,d),o.useFlex||l.css("left",d.$layout.laneNameWidth),s.children(".kanban-expired").remove()},{lane:e,columns:t,kanban:d})},t.prototype.virtualizeRender=function(e,n,t,r,d){var i=this,o=i.virtualize,s=o?o[n]:null;return s?("function"==typeof s&&(s=s(d,t)),"number"==typeof s&&t.height(s),void t.virtualRender(a.extend({render:r},i.options.virtualRenderOptions))):r()},t.prototype.renderSubLanes=function(e,n,t,r){var d=this,i=t.children(".kanban-sub-lanes");i.length?i.removeClass("kanban-expired"):i=a('
    ').appendTo(t),i.children(".kanban-sub-lane").addClass("kanban-expired");for(var o=0;o').appendTo(r),n||o.addClass("clearfix")),o.attr("data-index",i).data("lane",e).css({height:e.$height||"auto"}),o.children(".kanban-col").addClass("kanban-expired");var s=e.items||e.cards;s&&this.renderLaneCols(t,s,o,e,d),o.children(".kanban-expired").remove()},t.prototype.renderLaneCols=function(e,n,t,r,d){var i=this,o=t.children(".kanban-cols");o.length?o.removeClass("kanban-expired"):o=a('
    ').appendTo(t),o.children(".kanban-col").addClass("kanban-expired");for(var s=null,l=0;l0?e[i-1]:null;o.$index=i,o.$col=a,o.$lane=t,this.renderCard(o,d,s,a,t,r)}var l=a.cardsPerRow||t.cardsPerRow||r.cardsPerRow||this.options.cardsPerRow;d.css("padding",this.options.cardSpace/2).toggleClass("kanban-items-grid",l>1).attr("data-cards-per-row",l),d.children(".kanban-expired").remove()},t.prototype.renderLaneCol=function(e,n,t){var r=this,d=r.options,i=n.children('.kanban-lane-col[data-id="'+e.id+'"]'),o=t?n.children('.kanban-lane-col[data-id="'+t.id+'"]:not(.kanban-expired)'):null;i.length?i.removeClass("kanban-expired"):(i=a(['
    ','
    ',"
    "].join("")),r.options.readonly||i.append(['
    ','","
    "].join("")),d.laneItemsClass&&i.find(".kanban-lane-items").addClass(d.laneItemsClass),d.laneColClass&&i.addClass(d.laneColClass)),o&&o.length?o.after(i):n.prepend(i),i.attr({"data-parent":e.parentType?e.parentType:null,"data-type":e.type}).data("col",e);var s=e.$kanbanData.$layout.columnWidth;return d.useFlex?i.css("flex","1 1 "+s+"%"):i.css({left:e.$index*s+"%",width:s+"%"}),i},t.prototype.renderCard=function(e,n,t,r,d,i){var o=this.options,s=n.children('.kanban-item[data-id="'+e.id+'"]'),l=t?n.children('.kanban-item[data-id="'+t.id+'"]:not(.kanban-expired)'):null;s.length?s.removeClass("kanban-expired"):(s=a('
    '),o.wrapCard&&s.append('
    ')),l&&l.length?l.after(s):n.prepend(s);var c=r.cardsPerRow||d.cardsPerRow||i.cardsPerRow||o.cardsPerRow;s.data("item",e).css({padding:o.cardSpace/2,width:c>1?100/c+"%":""});var u=o.wrapCard?s.children(".kanban-card"):s;u.css("height",o.cardHeight);var h=o.cardRender||o.itemRender;if(h)h(e,u,r,d,i);else{var p=u.find(".title");p.length||(p=a('
    ').appendTo(u)),p.text(e.name||e.title)}return u},t.DEFAULTS={minColWidth:100,maxColHeight:400,minColHeight:90,minSubColHeight:40,subLaneSpace:2,laneNameWidth:20,headerHeight:32,cardHeight:40,cardSpace:10,cardsPerRow:1,wrapCard:!0,fluidBoardWidth:!0,addItemText:"添加条目",useFlex:!0,droppable:"auto",laneColClass:"",showCount:!0},a.fn.kanban=function(n){return this.each(function(){var r=a(this),d=r.data(e),i="object"==typeof n&&n;d||r.data(e,d=new t(this,i)),"string"==typeof n&&d[n]()})},t.NAME=e,a.fn.kanban.Constructor=t}(jQuery); \ No newline at end of file diff --git a/www/js/zui/min.js b/www/js/zui/min.js index 83423dc4d9..5100e3a605 100644 --- a/www/js/zui/min.js +++ b/www/js/zui/min.js @@ -1,7 +1,7 @@ /*! - * ZUI: ZUI for Zentao - v1.10.0 - 2022-03-02 + * ZUI: ZUI for Zentao - v1.10.0 - 2022-03-23 * http://openzui.com - * GitHub: https://github.com/easysoft/zui.git + * GitHub: https://github.com/easysoft/zui.git * Copyright (c) 2022 cnezsoft.com; Licensed MIT */ !function(t,e,i){"use strict";if("undefined"==typeof t)throw new Error("ZUI requires jQuery");Number.isNaN||"function"!=typeof isNaN||(Number.isNaN=isNaN),Number.parseInt||"function"!=typeof parseInt||(Number.parseInt=parseInt),Number.parseFloat||"function"!=typeof parseFloat||(Number.parseFloat=parseFloat),t.zui||(t.zui=function(e){t.isPlainObject(e)&&t.extend(t.zui,e)});var n={all:-1,left:0,middle:1,right:2},o=0;t.zui({uuid:function(t){var e=1e5*(Date.now()-1580890015292)+10*Math.floor(1e4*Math.random())+o++%10;return t?e:e.toString(36)},callEvent:function(t,e,n){if("function"==typeof t){n!==i&&(t=t.bind(n));var o=t(e);return e&&(e.result=o),!(o!==i&&!o)}return 1},strCode:function(t){var e=0;if("string"!=typeof t&&(t=String(t)),t&&t.length)for(var i=0;i=e.innerWidth?0:t.zui.getScrollbarSize()},fixBodyScrollbar:function(){if(t.zui.checkBodyScrollbar()){var e=t("body"),i=parseInt(e.css("padding-right")||0,10);return t.zui._scrollbarWidth&&e.css({paddingRight:i+t.zui._scrollbarWidth,overflowY:"hidden"}),!0}},resetBodyScrollbar:function(){t("body").css({paddingRight:"",overflowY:""})}}),t.fn.callEvent=function(e,n,o){var a=t(this),s=e.indexOf(".zui."),r=s<0?e:e.substring(0,s),l=t.Event(r,n);if(o===i&&s>0&&(o=a.data(e.substring(s+1))),o&&o.options){var c=o.options[r];"function"==typeof c&&(l.result=t.zui.callEvent(c,l,o))}return a.trigger(l),l},t.fn.callComEvent=function(t,e,n){n===i||Array.isArray(n)||(n=[n]);var o,a=this;a.trigger(e,n);var s=t.options[e];return s&&(o=s.apply(t,n)),o}}(jQuery,window,void 0),function(){"use strict";function t(t,e){return i&&!e?requestAnimationFrame(t):setTimeout(t,e||0)}function e(t){return i?cancelAnimationFrame(t):void clearTimeout(t)}var i="function"==typeof window.requestAnimationFrame;$.zui({asap:t,clearAsap:e})}(),function(t){"use strict";t.fn.fixOlPd=function(e){return e=e||10,this.each(function(){var i=t(this);i.css("paddingLeft",Math.ceil(Math.log10(i.children().length))*e+10)})},t(function(){t(".ol-pd-fix,.article ol").fixOlPd()})}(jQuery),+function(t){"use strict";var e='[data-dismiss="alert"]',i="zui.alert",n=function(i){t(i).on("click",e,this.close)};n.prototype.close=function(e){function n(){s.trigger("closed."+i).remove()}var o=t(this),a=o.attr("data-target");a||(a=o.attr("href"),a=a&&a.replace(/.*(?=#[^\s]*$)/,""));var s=t(a);e&&e.preventDefault(),s.length||(s=o.hasClass("alert")?o:o.parent()),s.trigger(e=t.Event("close."+i)),e.isDefaultPrevented()||(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one(t.support.transition.end,n).emulateTransitionEnd(150):n())};var o=t.fn.alert;t.fn.alert=function(e){return this.each(function(){var o=t(this),a=o.data(i);a||o.data(i,a=new n(this)),"string"==typeof e&&a[e].call(o)})},t.fn.alert.Constructor=n,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click."+i+".data-api",e,n.prototype.close)}(window.jQuery),function(t,e){"use strict";var i="zui.pager",n={page:1,recTotal:0,recPerPage:10},o={zh_cn:{pageOfText:"第 {0} 页",prev:"上一页",next:"下一页",first:"第一页",last:"最后一页","goto":"跳转",pageOf:"第 {page} 页",totalPage:"共 {totalPage} 页",totalCount:"共 {recTotal} 项",pageSize:"每页 {recPerPage} 项",itemsRange:"第 {start} ~ {end} 项",pageOfTotal:"第 {page}/{totalPage} 页"},zh_tw:{pageOfText:"第 {0} 頁",prev:"上一頁",next:"下一頁",first:"第一頁",last:"最後一頁","goto":"跳轉",pageOf:"第 {page} 頁",totalPage:"共 {totalPage} 頁",totalCount:"共 {recTotal} 項",pageSize:"每頁 {recPerPage} 項",itemsRange:"第 {start} ~ {end} 項",pageOfTotal:"第 {page}/{totalPage} 頁"},en:{pageOfText:"Page {0}",prev:"Prev",next:"Next",first:"First",last:"Last","goto":"Goto",pageOf:"Page {page}",totalPage:"{totalPage} pages",totalCount:"Total: {recTotal} items",pageSize:"{recPerPage} per page",itemsRange:"From {start} to {end}",pageOfTotal:"Page {page} of {totalPage}"}},a=function(e,n){var s=this;s.name=i,s.$=t(e),n=s.options=t.extend({},a.DEFAULTS,this.$.data(),n),s.langName=n.lang||t.zui.clientLang(),s.lang=t.zui.getLangData(i,s.langName,o),s.state={},s.set(n.page,n.recTotal,n.recPerPage,!0),s.$.on("click",".pager-goto-btn",function(){var e=t(this).closest(".pager-goto"),i=parseInt(e.find(".pager-goto-input").val());NaN!==i&&s.set(i)}).on("click",".pager-item",function(){var e=t(this).data("page");"number"==typeof e&&e>0&&s.set(e)}).on("click",".pager-size-menu [data-size]",function(){var e=t(this).data("size");"number"==typeof e&&e>0&&s.set(-1,-1,e)})};a.prototype.set=function(e,i,o,a){var s=this;"object"==typeof e&&null!==e&&(o=e.recPerPage,i=e.recTotal,e=e.page);var r=s.state;r||(r=t.extend({},n));var l=t.extend({},r);return"number"==typeof o&&o>0&&(r.recPerPage=o),"number"==typeof i&&i>=0&&(r.recTotal=i),"number"==typeof e&&e>=0&&(r.page=e),r.totalPage=r.recTotal&&r.recPerPage?Math.ceil(r.recTotal/r.recPerPage):1,r.page=Math.max(0,Math.min(r.page,r.totalPage)),r.pageRecCount=r.recTotal,r.page&&r.recTotal&&(r.page1&&(r.pageRecCount=r.recTotal-r.recPerPage*(r.page-1))),r.skip=r.page>1?(r.page-1)*r.recPerPage:0,r.start=r.skip+1,r.end=r.skip+r.pageRecCount,r.prev=r.page>1?r.page-1:0,r.next=r.page').attr("href",i?a.createLink(i,a.state):"###").html(n);return o||(s=t("
  • ").append(s).toggleClass("active",i===a.state.page).toggleClass("disabled",!i||i===a.state.page)),s},a.prototype.createNavItems=function(t){var i=this,n=i.$,o=i.state,a=o.totalPage,s=o.page,r=function(t,o){if(t===!1)return void n.append(i.createLinkItem(0,o||i.options.navEllipsisItem));o===e&&(o=t);for(var a=t;a<=o;++a)n.append(i.createLinkItem(a))};t===e&&(t=i.options.maxNavCount||10),r(1),a>1&&(a<=t?r(2,a):sa-t+2?(r(!1),r(a-t+2,a)):(r(!1),r(s-Math.ceil((t-4)/2),s+Math.floor((t-4)/2)),r(!1),r(a)))},a.prototype.createGoto=function(){var e=this,i=this.state,n=t('
    ");return n},a.prototype.createSizeMenu=function(){var e=this,i=this.state,n=t(''),o=e.options.pageSizeOptions;"string"==typeof o&&(o=o.split(","));for(var a=0;a'+s+"
  • ").toggleClass("active",s===i.recPerPage);n.append(r)}return t('
    ').addClass(e.options.menuDirection).append(n)},a.prototype.createElement=function(e,i,n){var o=this,a=o.createLinkItem.bind(o),s=o.lang;switch(e){case"prev":return a(n.prev,s.prev);case"prev_icon":return a(n.prev,'');case"next":return a(n.next,s.next);case"next_icon":return a(n.next,'');case"first":return a(1,s.first);case"first_icon":return a(1,'');case"last":return a(n.totalPage,s.last);case"last_icon":return a(n.totalPage,'');case"space":case"|":return t('
  • ');case"nav":case"pages":return void o.createNavItems();case"total_text":return t(('
    '+s.totalCount+"
    ").format(n));case"page_text":return t(('
    '+s.pageOf+"
    ").format(n));case"total_page_text":return t(('
    '+s.totalPage+"
    ").format(n));case"page_of_total_text":return t(('
    '+s.pageOfTotal+"
    ").format(n));case"page_size_text":return t(('
    '+s.pageSize+"
    ").format(n));case"items_range_text":return t(('
    '+s.itemsRange+"
    ").format(n));case"goto":return o.createGoto();case"size_menu":return o.createSizeMenu();default:return t("
  • ").html(e.format(n))}},a.prototype.createLink=function(i,n){i===e&&(i=this.state.page),n===e&&(n=this.state);var o=this.options.linkCreator;return"string"==typeof o?o.format(t.extend({},n,{page:i})):"function"==typeof o?o(i,n):"#page="+i},a.prototype.render=function(e){var i=this,n=i.state,o=i.options.elementCreator||i.createElement,a=t.isPlainObject(o);e=e||i.elements||i.options.elements,"string"==typeof e&&(e=e.split(",")),i.elements=e,i.$.empty();for(var s=0;s").append(c)),i.$.append(c))}var h=null;return i.$.children("li").each(function(){var e=t(this),i=!!e.children(".pager-item").length;h?h.toggleClass("pager-item-right",!i):i&&e.addClass("pager-item-left"),h=i?e:null}),h&&h.addClass("pager-item-right"),i.$.callComEvent(i,"onRender",[n]),i},a.DEFAULTS=t.extend({elements:["first_icon","prev_icon","pages","next_icon","last_icon","page_of_total_text","items_range_text","total_text"],prevIcon:"icon-double-angle-left",nextIcon:"icon-double-angle-right",firstIcon:"icon-step-backward",lastIcon:"icon-step-forward",navEllipsisItem:'',maxNavCount:10,menuDirection:"dropdown",pageSizeOptions:[10,20,30,50,100]},n),t.fn.pager=function(e){return this.each(function(){var n=t(this),o=n.data(i),s="object"==typeof e&&e;o||n.data(i,o=new a(this,s)),"string"==typeof e&&o[e]()})},a.NAME=i,a.LANG=o,t.fn.pager.Constructor=a,t(function(){t('[data-ride="pager"]').pager()})}(jQuery,void 0),+function(t){"use strict";var e="zui.tab",i=function(e){this.element=t(e)};i.prototype.show=function(){var i=this.element,n=i.closest("ul:not(.dropdown-menu)"),o=i.attr("data-target")||i.attr("data-tab");if(o||(o=i.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),!i.parent("li").hasClass("active")){var a=n.find(".active:last a")[0],s=t.Event("show."+e,{relatedTarget:a});if(i.trigger(s),!s.isDefaultPrevented()){var r=t(o);this.activate(i.parent("li"),n),this.activate(r,r.parent(),function(){i.trigger({type:"shown."+e,relatedTarget:a})})}}},i.prototype.activate=function(e,i,n){function o(){a.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),e.addClass("active"),s?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active"),n&&n()}var a=i.find("> .active"),s=n&&t.support.transition&&a.hasClass("fade");s?a.one(t.support.transition.end,o).emulateTransitionEnd(150):o(),a.removeClass("in")};var n=t.fn.tab;t.fn.tab=function(n){return this.each(function(){var o=t(this),a=o.data(e);a||o.data(e,a=new i(this)),"string"==typeof n&&a[n]()})},t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=n,this},t(document).on("click.zui.tab.data-api",'[data-toggle="tab"], [data-tab]',function(e){e.preventDefault(),t(this).tab("show")})}(window.jQuery),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,n=this;t(this).one("bsTransitionEnd",function(){i=!0});var o=function(){i||t(n).trigger(t.support.transition.end)};return setTimeout(o,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(t){"use strict";var e="zui.collapse",i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.transitioning=null,this.options.parent&&(this.$parent=t(this.options.parent)),this.options.toggle&&this.toggle()};i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var i=t.Event("show."+e);if(this.$element.trigger(i),!i.isDefaultPrevented()){var n=this.$parent&&this.$parent.find(".in");if(n&&n.length){var o=n.data(e);if(o&&o.transitioning)return;n.collapse("hide"),o||n.data(e,null)}var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("in")[a]("auto"),this.transitioning=0,this.$element.trigger("shown."+e)};if(!t.support.transition)return s.call(this);var r=t.camelCase(["scroll",a].join("-"));this.$element.one(t.support.transition.end,s.bind(this)).emulateTransitionEnd(350)[a](this.$element[0][r])}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var i=t.Event("hide."+e);if(this.$element.trigger(i),!i.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.trigger("hidden."+e).removeClass("collapsing").addClass("collapse")};return t.support.transition?void this.$element[n](0).one(t.support.transition.end,o.bind(this)).emulateTransitionEnd(350):o.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var n=t.fn.collapse;t.fn.collapse=function(n){return this.each(function(){var o=t(this),a=o.data(e),s=t.extend({},i.DEFAULTS,o.data(),"object"==typeof n&&n);a||o.data(e,a=new i(this,s)),"string"==typeof n&&a[n]()})},t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=n,this},t(document).on("click."+e+".data-api","[data-toggle=collapse]",function(i){var n,o=t(this),a=o.attr("data-target")||i.preventDefault()||(n=o.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""),s=t(a),r=s.data(e),l=r?"toggle":o.data(),c=o.attr("data-parent"),h=c&&t(c);r&&r.transitioning||(h&&h.find('[data-toggle=collapse][data-parent="'+c+'"]').not(o).addClass("collapsed"),o[s.hasClass("in")?"addClass":"removeClass"]("collapsed")),s.collapse(l)})}(window.jQuery),function(t,e){"use strict";var i=1200,n=992,o=768,a=e(t),s=function(){var t=a.width();e("html").toggleClass("screen-desktop",t>=n&&t=i).toggleClass("screen-tablet",t>=o&&t=n)},r="",l=navigator.userAgent;l.match(/(iPad|iPhone|iPod)/i)?r+=" os-ios":l.match(/android/i)?r+=" os-android":l.match(/Win/i)?r+=" os-windows":l.match(/Mac/i)?r+=" os-mac":l.match(/Linux/i)?r+=" os-linux":l.match(/X11/i)&&(r+=" os-unix"),"ontouchstart"in document.documentElement&&(r+=" is-touchable"),e("html").addClass(r),a.resize(s),s()}(window,jQuery),function(t){"use strict";var e={zh_cn:'您的浏览器版本过低,无法体验所有功能,建议升级或者更换浏览器。 了解更多...',zh_tw:'您的瀏覽器版本過低,無法體驗所有功能,建議升級或者更换瀏覽器。了解更多...',en:'Your browser is too old, it has been unable to experience the colorful internet. We strongly recommend that you upgrade a better one. Learn more...'},i=function(){for(var t=!1,e=11;e>5;e--)if(this.isIE(e)){t=e;break}this.ie=t,this.cssHelper()};i.prototype.cssHelper=function(){var e=this.ie,i=t("html");i.toggleClass("ie",e).removeClass("ie-6 ie-7 ie-8 ie-9 ie-10"),e&&i.addClass("ie-"+e).toggleClass("gt-ie-7 gte-ie-8 support-ie",e>=8).toggleClass("lte-ie-7 lt-ie-8 outdated-ie",e<8).toggleClass("gt-ie-8 gte-ie-9",e>=9).toggleClass("lte-ie-8 lt-ie-9",e<9).toggleClass("gt-ie-9 gte-ie-10",e>=10).toggleClass("lte-ie-9 lt-ie-10",e<10).toggleClass("gt-ie-10 gte-ie-11",e>=11).toggleClass("lte-ie-10 lt-ie-11",e<11)},i.prototype.tip=function(i){var n=t("#browseHappyTip");n.length||(n=t('
    '),n.prependTo("body")),i||(i=t.zui.getLangData("zui.browser",t.zui.clientLang(),e),"object"==typeof i&&(i=i.tip)),n.find(".content").html(i)},i.prototype.isIE=function(t){if(11===t)return this.isIE11();if(10===t)return this.isIE10();if(!t&&(this.isIE11()||this.isIE10()))return!0;var e=document.createElement("b");return e.innerHTML="",1===e.getElementsByTagName("i").length},i.prototype.isIE10=function(){return navigator.appVersion.indexOf("MSIE 10")!==-1},i.prototype.isIE11=function(){var t=navigator.userAgent;return t.indexOf("Trident")!==-1&&t.indexOf("rv:11")!==-1},t.zui({browser:new i}),t(function(){t("body").hasClass("disabled-browser-tip")||t.zui.browser.ie&&t.zui.browser.ie<8&&t.zui.browser.tip()})}(jQuery),function(t){"use strict";var e=864e5,i=function(t){return t instanceof Date||("number"==typeof t&&t<1e10&&(t*=1e3),t=new Date(t)),t},n=function(t){return i(t).getTime()},o=function(t,e){t=i(t),void 0===e&&(e="yyyy-MM-dd hh:mm:ss");var n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds(),"q+":Math.floor((t.getMonth()+3)/3),"S+":t.getMilliseconds()};/(y+)/i.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));for(var o in n)new RegExp("("+o+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?n[o]:("00"+n[o]).substr((""+n[o]).length)));return e},a=function(t,e){return t.setTime(t.getTime()+e),t},s=function(t,i){return a(t,i*e)},r=function(t){return new Date(i(t).getTime())},l=function(t){return t%4===0&&t%100!==0||t%400===0},c=function(t,e){return[31,l(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},h=function(t){return c(t.getFullYear(),t.getMonth())},d=function(t){return t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t},u=function(t,e){var i=t.getDate();return t.setDate(1),t.setMonth(t.getMonth()+e),t.setDate(Math.min(i,h(t))),t},p=function(t,e){e=e||1;for(var i=new Date(t.getTime());i.getDay()!=e;)i=s(i,-1);return d(i)},f=function(t,e){return t.toDateString()===e.toDateString()},g=function(t,e){var i=p(t),n=s(r(i),7);return e>=i&&e1){var i;if(2==arguments.length&&"object"==typeof e)for(var n in e)void 0!==e[n]&&(i=new RegExp("({"+n+"})","g"),t=t.replace(i,e[n]));else for(var o=1;othis.length)&&(e=this.length),this.substring(e-t.length,e)===t}),String.prototype.startsWith||Object.defineProperty(String.prototype,"startsWith",{value:function(t,e){return e=!e||e<0?0:+e,this.substring(e,e+t.length)===t}}),String.prototype.includes||(String.prototype.includes=function(){return String.prototype.indexOf.apply(this,arguments)!==-1}))}(),/*! @@ -16,8 +16,8 @@ function(t,e,i){"$:nomunge";function n(){o=e[r](function(){a.each(function(){var * Copyright 2006, 2014 Klaus Hartl * Released under the MIT license */ -function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)}(function(t){function e(t){return r.raw?t:encodeURIComponent(t)}function i(t){return r.raw?t:decodeURIComponent(t)}function n(t){return e(r.json?JSON.stringify(t):String(t))}function o(t){0===t.indexOf('"')&&(t=t.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return t=decodeURIComponent(t.replace(s," ")),r.json?JSON.parse(t):t}catch(e){}}function a(t,e){var i=r.raw?t:o(t);return"function"==typeof e?e(i):i}var s=/\+/g,r=t.cookie=function(o,s,l){if(void 0!==s&&"function"!=typeof s){if(l=t.extend({},r.defaults,l),"number"==typeof l.expires){var c=l.expires,h=l.expires=new Date;h.setTime(+h+864e5*c)}return document.cookie=[e(o),"=",n(s),l.expires?"; expires="+l.expires.toUTCString():"",l.path?"; path="+l.path:"",l.domain?"; domain="+l.domain:"",l.secure?"; secure":""].join("")}for(var d=o?void 0:{},u=document.cookie?document.cookie.split("; "):[],p=0,f=u.length;p=0;t--)delete this.page[i[t]];this.set(a,this.page)}},s.prototype.pageRemove=function(t){"undefined"!=typeof this.page[t]&&(this.page[t]=null,this.pageSave())},s.prototype.pageClear=function(){this.page={},this.pageSave()},s.prototype.pageGet=function(t,e){var i=this.page[t];return void 0===e||null!==i&&void 0!==i?i:e},s.prototype.pageSet=function(t,i){e.isPlainObject(t)?e.extend(!0,this.page,t):this.page[this.serialize(t)]=i,this.pageSave()},s.prototype.check=function(){if(!this.enable&&!this.silence)throw new Error("Browser not support localStorage or enable status been set true.");return this.enable},s.prototype.length=function(){return this.check()?i.getLength?i.getLength():i.length:0},s.prototype.removeItem=function(t){return i.removeItem(t),this},s.prototype.remove=function(t){return this.removeItem(t)},s.prototype.getItem=function(t){return i.getItem(t)},s.prototype.get=function(t,e){var i=this.deserialize(this.getItem(t));return"undefined"!=typeof i&&null!==i||"undefined"==typeof e?i:e},s.prototype.key=function(t){return i.key(t)},s.prototype.setItem=function(t,e){return i.setItem(t,e),this},s.prototype.set=function(t,e){return void 0===e?this.remove(t):(this.setItem(t,this.serialize(e)),this)},s.prototype.clear=function(){return i.clear(),this},s.prototype.forEach=function(t){for(var e=this.length(),n=e-1;n>=0;n--){var o=i.key(n);t(o,this.get(o))}return this},s.prototype.getAll=function(){var t={};return this.forEach(function(e,i){t[e]=i}),t},s.prototype.serialize=function(t){return"string"==typeof t?t:JSON.stringify(t)},s.prototype.deserialize=function(t){if("string"==typeof t)try{return JSON.parse(t)}catch(e){return t||void 0}},e.zui({store:new s})}(window,jQuery),function(t){"use strict";var e="zui.searchBox",i=function(e,n){var o=this;o.name=name,o.$=t(e),o.options=n=t.extend({},i.DEFAULTS,o.$.data(),n);var a=o.$.is(n.inputSelector)?o.$:o.$.find(n.inputSelector);if(a.length){var s=function(){o.changeTimer&&(clearTimeout(o.changeTimer),o.changeTimer=null)},r=function(){s();var t=o.getSearch();if(t!==o.lastValue){var e=""===t;a.toggleClass("empty",e),o.$.callComEvent(o,"onSearchChange",[t,e]),o.lastValue=t}};o.$input=a=a.first(),a.on(n.listenEvent,function(t){o.changeTimer=setTimeout(function(){r()},n.changeDelay)}).on("focus",function(t){a.addClass("focus"),o.$.callComEvent(o,"onFocus",[t])}).on("blur",function(t){a.removeClass("focus"),o.$.callComEvent(o,"onBlur",[t])}).on("keydown",function(t){var e=0,i=t.which;27===i&&n.escToClear?(this.setSearch("",!0),r(),e=1):13===i&&n.onPressEnter&&(r(),o.$.callComEvent(o,"onPressEnter",[t]));var a=o.$.callComEvent(o,"onKeyDown",[t]);a===!1&&(e=1),e&&t.preventDefault()}),o.$.on("click",".search-clear-btn",function(t){o.setSearch("",!0),r(),o.focus(),t.preventDefault()}),r()}else console.error("ZUI: search box init error, cannot find search box input element.")};i.DEFAULTS={inputSelector:'input[type="search"],input[type="text"]',listenEvent:"change input paste",changeDelay:500},i.prototype.getSearch=function(){return this.$input&&t.trim(this.$input.val())},i.prototype.setSearch=function(t,e){var i=this.$input;i&&(i.val(t),e||i.trigger("change"))},i.prototype.focus=function(){this.$input&&this.$input.focus()},t.fn.searchBox=function(n){return this.each(function(){var o=t(this),a=o.data(e),s="object"==typeof n&&n;a||o.data(e,a=new i(this,s)),"string"==typeof n&&a[n]()})},i.NAME=e,t.fn.searchBox.Constructor=i}(jQuery),function(t,e){"use strict";var i="zui.draggable",n={container:"body",move:!0},o=0,a=function(e,i){var a=this;a.$=t(e),a.id=o++,a.options=t.extend({},n,a.$.data(),i),a.init()};a.DEFAULTS=n,a.NAME=i,a.prototype.init=function(){var n,o,a,s,r,l=this,c=l.$,h="before",d="drag",u="finish",p="."+i+"."+l.id,f="mousedown"+p,g="mouseup"+p,m="mousemove"+p,v=l.options,y=v.selector,b=v.handle,w=c,x="function"==typeof v.move,C=function(t){var e=t.pageX,i=t.pageY;r=!0;var o={left:e-a.x,top:i-a.y};w.removeClass("drag-ready").addClass("dragging"),v.move&&(x?v.move(o,w):w.css(o)),v[d]&&v[d]({event:t,element:w,startOffset:a,pos:o,offset:{x:e-n.x,y:i-n.y},smallOffset:{x:e-s.x,y:i-s.y}}),s.x=e,s.y=i,v.stopPropagation&&t.stopPropagation()},_=function(i){if(t(e).off(p),!r)return void w.removeClass("drag-ready");var o={left:i.pageX-a.x,top:i.pageY-a.y};w.removeClass("drag-ready dragging"),v.move&&(x?v.move(o,w):w.css(o)),v[u]&&v[u]({event:i,element:w,startOffset:a,pos:o,offset:{x:i.pageX-n.x,y:i.pageY-n.y},smallOffset:{x:i.pageX-s.x,y:i.pageY-s.y}}),i.preventDefault(),v.stopPropagation&&i.stopPropagation()},k=function(i){var l=t.zui.getMouseButtonCode(v.mouseButton);if(!(l>-1&&i.button!==l)){var c=t(this);if(y&&(w=b?c.closest(y):c),v[h]){var d=v[h]({event:i,element:w});if(d===!1)return}var u=t(v.container),p=w.offset();o=u.offset(),n={x:i.pageX,y:i.pageY},a={x:i.pageX-p.left+o.left,y:i.pageY-p.top+o.top},s=t.extend({},n),r=!1,w.addClass("drag-ready"),i.preventDefault(),v.stopPropagation&&i.stopPropagation(),t(e).on(m,C).on(g,_)}};b?c.on(f,b,k):y?c.on(f,y,k):c.on(f,k)},a.prototype.destroy=function(){var n="."+i+"."+this.id;this.$.off(n),t(e).off(n),this.$.data(i,null)},t.fn.draggable=function(e){return this.each(function(){var n=t(this),o=n.data(i),s="object"==typeof e&&e;o||n.data(i,o=new a(this,s)),"string"==typeof e&&o[e]()})},t.fn.draggable.Constructor=a}(jQuery,document),function(t,e,i){"use strict";var n="zui.droppable",o={target:".droppable-target",deviation:5,sensorOffsetX:0,sensorOffsetY:0,dropToClass:"drop-to",dropTargetClass:"drop-target"},a=0,s=function(e,i){var n=this;n.id=a++,n.$=t(e),n.options=t.extend({},o,n.$.data(),i),n.init()};s.DEFAULTS=o,s.NAME=n,s.prototype.trigger=function(e,i){return t.zui.callEvent(this.options[e],i,this)},s.prototype.init=function(){var o,a,s,r,l,c,h,d,u,p,f,g,m,v,y=this,b=y.$,w=y.options,x=w.deviation,C="."+n+"."+y.id,_="mousedown"+C,k="mouseup"+C,T="mousemove"+C,S=w.selector,D=w.handle,M=w.flex,L=w.canMoveHere,z=w.dropToClass,P=b,$=!1;w.dropOnMouseleave&&(k+=" mouseleave"+C);var I=function(e){if($&&(g={left:e.pageX,top:e.pageY},!(i.abs(g.left-u.left)a&&g.top>s&&g.left-1&&i.button!==n)){var g=t(this);S&&(P=D?g.closest(S):g),P.hasClass("drag-shadow")||w.before&&w.before({event:i,element:P})===!1||($=!0,o=w.container?"function"==typeof w.container?w.container(P,b):t(w.container).first():S?b:t("body"),a="function"==typeof w.target?w.target(P,b):o.find(w.target),s=null,r=null,l=!1,c=!0,h=null,d=P.offset(),p=o.offset(),p.top=p.top-o.scrollTop(),p.left=p.left-o.scrollLeft(),u={left:i.pageX,top:i.pageY},m=t.extend({},u),f={left:u.left-d.left,top:u.top-d.top},P.addClass("drag-from"),t(e).on(T,I).on(k,F),v=setTimeout(function(){t(e).on(_,F)},10),i.preventDefault(),w.stopPropagation&&i.stopPropagation())}};D?b.on(_,D,A):S?b.on(_,S,A):b.on(_,A)},s.prototype.destroy=function(){var i="."+n+"."+this.id;this.$.off(i),t(e).off(i),this.$.data(n,null)},s.prototype.reset=function(){this.destroy(),this.init()},t.fn.droppable=function(e){return this.each(function(){var i=t(this),o=i.data(n),a="object"==typeof e&&e;o||i.data(n,o=new s(this,a)),"string"==typeof e&&o[e]()})},t.fn.droppable.Constructor=s}(jQuery,document,Math),+function(t,e){"use strict";function i(e,i,a){return this.each(function(){var s=t(this),r=s.data(n),l=t.extend({},o.DEFAULTS,s.data(),"object"==typeof e&&e);r||s.data(n,r=new o(this,l)),"string"==typeof e?r[e](i,a):l.show&&r.show(i,a)})}var n="zui.modal",o=function(i,o){var a=this;a.options=o,a.$body=t(document.body),a.$element=t(i),a.$backdrop=a.isShown=null,a.scrollbarWidth=0,o.moveable===e&&(a.options.moveable=a.$element.hasClass("modal-moveable")),o.remote&&a.$element.find(".modal-content").load(o.remote,function(){a.$element.trigger("loaded."+n)}),o.scrollInside&&t(window).on("resize."+n,function(){a.isShown&&a.adjustPosition(e,100)})};o.VERSION="3.2.0",o.TRANSITION_DURATION=300,o.BACKDROP_TRANSITION_DURATION=150,o.DEFAULTS={backdrop:!0,keyboard:!0,show:!0,position:"fit"};var a=function(e,i){var n=t(window);i.left=Math.max(0,Math.min(i.left,n.width()-e.outerWidth())),i.top=Math.max(0,Math.min(i.top,n.height()-e.outerHeight())),e.css(i)};o.prototype.toggle=function(t,e){return this.isShown?this.hide():this.show(t,e)},o.prototype.adjustPosition=function(i,o){var s=this;if(clearTimeout(s.reposTask),o)return void(s.reposTask=setTimeout(s.adjustPosition.bind(s,i,0),o));var r=s.options;if(i===e&&(i=r.position),i!==e&&null!==i){"function"==typeof i&&(i=i(s));var l=s.$element.find(".modal-dialog"),c=t(window).height(),h={maxHeight:"initial",overflow:"visible"},d=l.find(".modal-body").css(h);if(r.scrollInside&&d.length){var u=r.headerHeight,p=r.footerHeight,f=l.find(".modal-header"),g=l.find(".modal-footer");"number"!=typeof u&&(u=f.length?f.outerHeight():"function"==typeof u?u(f):0),"number"!=typeof p&&(p=g.length?g.outerHeight():"function"==typeof p?p(g):0),h.maxHeight=c-u-p,h.overflow=d[0].scrollHeight>h.maxHeight?"auto":"visible",d.css(h)}var m=Math.max(0,(c-l.outerHeight())/2);if("fit"===i?i={top:m>50?Math.floor(2*m/3):m}:"center"===i?i={top:m}:t.isPlainObject(i)||(i={top:i}),l.hasClass("modal-moveable")){var v=null,y=r.rememberPos;y&&(y===!0?v=s.$element.data("modal-pos"):t.zui.store&&(v=t.zui.store.pageGet(n+".rememberPos."+y))),i=t.extend(i,{left:Math.max(0,(t(window).width()-l.outerWidth())/2)},v),"inside"===r.moveable?a(l,i):l.css(i)}else l.css(i)}},o.prototype.setMoveable=function(){t.fn.draggable||console.error("Moveable modal requires draggable.js.");var e=this,i=e.options,o=e.$element.find(".modal-dialog").removeClass("modal-dragged");o.toggleClass("modal-moveable",!!i.moveable),e.$element.data("modal-moveable-setup")||o.draggable({container:e.$element,handle:".modal-header",before:function(){var t=o.css("margin-top");t&&"0px"!==t&&o.css("top",t).css("margin-top","").addClass("modal-dragged")},finish:function(o){var a=i.rememberPos;a&&(e.$element.data("modal-pos",o.pos),t.zui.store&&a!==!0&&t.zui.store.pageSet(n+".rememberPos."+a,o.pos))},move:"inside"!==i.moveable||function(t){a(o,t)}})},o.prototype.show=function(e,i){var a=this,s=t.Event("show."+n,{relatedTarget:e});a.$element.trigger(s),a.$element.toggleClass("modal-scroll-inside",!!a.options.scrollInside),a.isShown||s.isDefaultPrevented()||(a.isShown=!0,a.options.moveable&&a.setMoveable(),a.options.backdrop!==!1&&(a.setScrollbar(),a.$body.addClass("modal-open")),a.escape(),a.$element.on("click.dismiss."+n,'[data-dismiss="modal"]',function(t){a.hide(),t.stopPropagation()}),a.backdrop(function(){var s=t.support.transition&&a.$element.hasClass("fade");a.$element.parent().length||a.$element.appendTo(a.$body),a.$element.show().scrollTop(0),s&&a.$element[0].offsetWidth,a.$element.addClass("in").attr("aria-hidden",!1),a.adjustPosition(i),a.enforceFocus();var r=t.Event("shown."+n,{relatedTarget:e});s?a.$element.find(".modal-dialog").one("bsTransitionEnd",function(){a.$element.trigger("focus").trigger(r)}).emulateTransitionEnd(o.TRANSITION_DURATION):a.$element.trigger("focus").trigger(r)}))},o.prototype.hide=function(e){e&&e.preventDefault&&e.preventDefault();var i=this;e=t.Event("hide."+n),i.$element.trigger(e),i.isShown&&!e.isDefaultPrevented()&&(i.isShown=!1,i.options.backdrop!==!1&&(i.$body.removeClass("modal-open"),i.resetScrollbar()),i.escape(),t(document).off("focusin."+n),i.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss."+n),t.support.transition&&i.$element.hasClass("fade")?i.$element.one("bsTransitionEnd",i.hideModal.bind(i)).emulateTransitionEnd(o.TRANSITION_DURATION):i.hideModal())},o.prototype.enforceFocus=function(){t(document).off("focusin."+n).on("focusin."+n,function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")}.bind(this))},o.prototype.escape=function(){this.isShown&&this.options.keyboard?t(document).on("keydown.dismiss."+n,function(i){if(27==i.which){var o=t.Event("escaping."+n),a=this.$element.triggerHandler(o,"esc");if(a!=e&&!a)return;this.hide()}}.bind(this)):this.isShown||t(document).off("keydown.dismiss."+n)},o.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$element.trigger("hidden."+n)})},o.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},o.prototype.backdrop=function(e){var i=this,a=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var s=t.support.transition&&a;if(this.$backdrop=t('').appendTo("body").data(n,i);var s=function(t,i,n){n=n||e[t],"function"==typeof n&&o.on(i+a,n)};s("onShow","show"),s("shown","shown"),s("onHide","hide",function(t){if("iframe"===e.type&&i.$iframeBody){var n=i.$iframeBody.triggerHandler("modalhide"+a,[i]);n===!1&&t.preventDefault()}var o=e.onHide;if(o)return o(t)}),s("hidden","hidden"),s("loaded","loaded"),o.on("shown"+a,function(){i.isShown=!0}).on("hidden"+a,function(){i.isShown=!1}),this.$modal=o,this.$dialog=o.find(".modal-dialog"),e.mergeOptions&&(this.options=e)},r.prototype.show=function(i){var a=this,l=t.extend({},r.DEFAULTS,a.options,{url:a.$trigger?a.$trigger.attr("href")||a.$trigger.attr("data-url")||a.$trigger.data("url"):a.options.url},i),c=a.isShown;l=a.initOptions(l),c||a.init(l);var h=a.$modal,d=h.find(".modal-dialog"),u=l.custom,p=d.find(".modal-body").css("padding","").toggleClass("load-indicator loading",!!c),f=d.find(".modal-header"),g=d.find(".modal-content");h.toggleClass("fade",l.fade).addClass(l.className).toggleClass("modal-loading",!c).toggleClass("modal-scroll-inside",!!l.scrollInside),d.toggleClass("modal-md","md"===l.size).toggleClass("modal-sm","sm"===l.size).toggleClass("modal-lg","lg"===l.size).toggleClass("modal-fullscreen","fullscreen"===l.size),f.toggle(l.showHeader),f.find(".modal-icon").attr("class","modal-icon icon-"+l.icon),f.find(".modal-title-name").text(l.title||""),l.size&&"fullscreen"===l.size&&(l.width="",l.height="");var m=function(){clearTimeout(this.resizeTask),this.resizeTask=setTimeout(function(){a.adjustPosition(l.position)},100)},v=function(t,e){return"undefined"==typeof t&&(t=l.delay),setTimeout(function(){d=h.find(".modal-dialog"),l.width&&"auto"!=l.width&&d.css("width",l.width),l.height&&"auto"!=l.height&&(d.css("height",l.height),"iframe"===l.type&&p.css("height",d.height()-f.outerHeight())),a.adjustPosition(l.position),h.removeClass("modal-loading").removeClass("modal-updating"),c&&p.removeClass("loading"),"iframe"!=l.type&&(p=d.off("resize."+n).find(".modal-body").off("resize."+n),l.scrollInside&&(p=p.children().off("resize."+n)),(p.length?p:d).on("resize."+n,m)),e&&e()},t)};if("custom"===l.type&&u)if("function"==typeof u){var y=u({modal:h,options:l,modalTrigger:a,ready:v});typeof y===s&&(p.html(y),v())}else u instanceof t?(p.html(t("
    ").append(u.clone()).html()),v()):(p.html(u),v());else if(l.url){var b=function(){var t=h.callComEvent(a,"broken");"string"==typeof t&&p.html(t),v()};if(h.attr("ref",l.url),"iframe"===l.type){h.addClass("modal-iframe"),this.firstLoad=!0;var w="iframe-"+l.name;f.detach(),p.detach(),g.empty().append(f).append(p),p.css("padding",0).html(''),l.waittime>0&&(a.waitTimeout=v(l.waittime,b));var x=document.getElementById(w);x.onload=x.onreadystatechange=function(i){var o=!!l.scrollInside;if(a.firstLoad&&h.addClass("modal-loading"),!this.readyState||"complete"==this.readyState){a.firstLoad=!1,l.waittime>0&&clearTimeout(a.waitTimeout);try{h.attr("ref",x.contentWindow.location.href);var s=e.frames[w];s.modalWidthReset&&(l.width=s.modalWidthReset);var r=s.$;if(r&&"auto"===l.height&&"fullscreen"!=l.size){var c=r("body").addClass("body-modal").toggleClass("body-modal-scroll-inside",o);a.$iframeBody=c,l.iframeBodyClass&&c.addClass(l.iframeBodyClass);var d=[],u=function(i){h.removeClass("fade");var n=c.outerHeight();if(i===!0&&l.onlyIncreaseHeight&&(n=Math.max(n,p.data("minModalHeight")||0),p.data("minModalHeight",n)),o){var a=l.headerHeight;"number"!=typeof a?a=f.outerHeight():"function"==typeof a&&(a=a(f));var s=t(e).height();n=Math.min(n,s-a)}for(d.length>1&&n===d[0]&&(n=Math.max(n,d[1])),d.push(n);d.length>2;)d.shift();p.css("height",n),l.fade&&h.addClass("fade"),v()};h.callComEvent(a,"loaded",{modalType:"iframe",jQuery:r}),setTimeout(u,100),c.off("resize."+n).on("resize."+n,u),o&&t(e).off("resize."+n).on("resize."+n,u)}else v();var g=l.handleLinkInIframe;g&&r("body").on("click","string"==typeof g?g:"a[href]",function(){t(this).is('[data-toggle="modal"]')||h.addClass("modal-updating")}),l.iframeStyle&&r("head").append("")}catch(i){v()}}}}else t.ajax(t.extend({url:l.url,success:function(i){try{var s=t(i);s.filter(".modal-dialog").length?d.parent().empty().append(s):s.filter(".modal-content").length?d.find(".modal-content").replaceWith(s):p.wrapInner(s)}catch(r){e.console&&e.console.warn&&console.warn("ZUI: Cannot recogernize remote content.",{error:r,data:i}),h.html(i)}h.callComEvent(a,"loaded",{modalType:o}),v(),l.scrollInside&&t(e).off("resize."+n).on("resize."+n,m)},error:b},l.ajaxOptions))}c||h.modal({show:"show",backdrop:l.backdrop,moveable:l.moveable,rememberPos:l.rememberPos,keyboard:l.keyboard,scrollInside:l.scrollInside})},r.prototype.close=function(t,i){var n=this;(t||i)&&n.$modal.on("hidden"+a,function(){"function"==typeof t&&t(),typeof i===s&&i.length&&!n.$modal.data("cancel-reload")&&("this"===i?e.location.reload():e.location=i)}),n.$modal.modal("hide")},r.prototype.toggle=function(t){this.isShown?this.close():this.show(t)},r.prototype.adjustPosition=function(t){t=t===i?this.options.position:t,"function"==typeof t&&(t=t(this)),this.$modal.modal("adjustPosition",t)},t.zui({ModalTrigger:r,modalTrigger:new r}),t.fn.modalTrigger=function(e,i){return t(this).each(function(){var o=t(this),a=o.data(n),l=t.extend({title:o.attr("title")||o.text(),url:o.attr("href"),type:o.hasClass("iframe")?"iframe":""},o.data(),t.isPlainObject(e)&&e);return a?void(typeof e==s?a[e](i):l.show&&a.show(i)):(o.data(n,a=new r(l,o)),void o.on((l.trigger||"click")+".toggle."+n,function(e){l=t.extend(l,{url:o.attr("href")||o.attr("data-url")||o.data("url")||l.url}),a.toggle(l),o.is("a")&&e.preventDefault()}))})};var l=t.fn.modal;t.fn.modal=function(e,i){return t(this).each(function(){var n=t(this);n.hasClass("modal")?l.call(n,e,i):n.modalTrigger(e,i)})},t.fn.modal.bs=l;var c=function(e){return e?e=t(e):(e=t(".modal.modal-trigger"),!e.length),e&&e instanceof t?e:null},h=function(i,o,a){var s=i;if("function"==typeof i){var r=a;a=o,o=i,i=r}i=c(i),i&&i.length?i.each(function(){t(this).data(n).close(o,a)}):t("body").hasClass("modal-open")||t(".modal.in").length||t("body").hasClass("body-modal")&&e.parent.$.zui.closeModal(s,o,a)},d=function(t,e){e=c(e),e&&e.length&&e.modal("adjustPosition",t)},u=function(e,i){"string"==typeof e&&(e={url:e});var o=c(i);o&&o.length&&o.each(function(){t(this).data(n).show(e)})};t.zui({reloadModal:u,closeModal:h,ajustModalPosition:d,adjustModalPosition:d}),t(document).on("click."+n+".data-api",'[data-toggle="modal"]',function(e){var i=t(this),o=i.attr("href"),a=null;try{a=t(i.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,""))}catch(s){}a&&a.length||(i.data(n)?i.trigger(".toggle."+n):i.modalTrigger({show:!0})),i.is("a")&&e.preventDefault()}).on("click."+n+".data-api",'[data-dismiss="modal"]',function(){t.zui.closeModal()})}(window.jQuery,window,void 0),+function(t){"use strict";var e=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.init("tooltip",t,e)};e.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'
    ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.prototype.init=function(e,i,n){this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(n);for(var o=this.options.trigger.split(" "),a=o.length;a--;){var s=o[a];if("click"==s)this.$element.on("click."+this.type,this.options.selector,this.toggle.bind(this));else if("manual"!=s){var r="hover"==s?"mouseenter":"focus",l="hover"==s?"mouseleave":"blur";this.$element.on(r+"."+this.type,this.options.selector,this.enter.bind(this)),this.$element.on(l+"."+this.type,this.options.selector,this.leave.bind(this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},e.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,n){i[t]!=n&&(e[t]=n)}),e},e.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type);return clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show()},e.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type);return clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()},e.prototype.show=function(e){var i=t.Event("show.zui."+this.type);if((e||this.hasContent())&&this.enabled){var n=this;if(n.$element.trigger(i),i.isDefaultPrevented())return;var o=n.tip();n.setContent(e),n.options.animation&&o.addClass("fade");var a="function"==typeof n.options.placement?n.options.placement.call(n,o[0],n.$element[0]):n.options.placement,s=/\s?auto?\s?/i,r=s.test(a);r&&(a=a.replace(s,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(a),n.options.container?o.appendTo(n.options.container):o.insertAfter(n.$element);var l=n.getPosition(),c=o[0].offsetWidth,h=o[0].offsetHeight;if(r){var d=n.$element.parent(),u=a,p=document.documentElement.scrollTop||document.body.scrollTop,f="body"==n.options.container?window.innerWidth:d.outerWidth(),g="body"==n.options.container?window.innerHeight:d.outerHeight(),m="body"==n.options.container?0:d.offset().left;a="bottom"==a&&l.top+l.height+h-p>g?"top":"top"==a&&l.top-p-h<0?"bottom":"right"==a&&l.right+c>f?"left":"left"==a&&l.left-c

    '}),e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),e.prototype.constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var t=this.tip(),e=this.getTarget();if(e)return e.find(".arrow").length<1&&t.addClass("no-arrow"),void t.html(e.html());var i=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](i),t.find(".popover-content")[this.options.html?"html":"text"](n),t.removeClass("fade top bottom left right in"),this.options.tipId&&t.attr("id",this.options.tipId),this.options.tipClass&&t.addClass(this.options.tipClass),t.find(".popover-title").html()||t.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTarget()||this.getTitle()||this.getContent()},e.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},e.prototype.getTarget=function(){var e=this.$element,i=this.options,n=e.attr("data-target")||("function"==typeof i.target?i.target.call(e[0]):i.target);return!!n&&("$next"==n?e.next(".popover"):t(n))},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},e.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var i=t.fn.popover;t.fn.popover=function(i){return this.each(function(){var n=t(this),o=n.data("zui.popover"),a="object"==typeof i&&i;o||n.data("zui.popover",o=new e(this,a)),"string"==typeof i&&o[i]()})},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(window.jQuery),+function(t){"use strict";function e(e){t(o).remove(),t(a).each(function(e){var o=i(t(this));o.hasClass("open")&&(o.trigger(e=t.Event("hide."+n)),e.isDefaultPrevented()||o.removeClass("open").trigger("hidden."+n))})}function i(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var n;try{n=i&&t(i)}catch(o){}return n&&n.length?n:e.parent()}var n="zui.dropdown",o=".dropdown-backdrop",a="[data-toggle=dropdown]",s=function(e){t(e).on("click."+n,this.toggle)};s.prototype.toggle=function(o){var a=t(this);if(!a.is(".disabled, :disabled")){var s=i(a),r=s.hasClass("open");if(e(),!r){if("ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t('',a={icons:{},type:"default",placement:"top",time:4e3,parent:"body",close:!0,fade:!0,scale:!0},s={},r=function(e,r){t.isPlainObject(e)?r=t.extend({},r,e):e&&(r?r.content=e:r={content:e});var l=this;r=l.options=t.extend({},a,r),l.id=r.id||n++;var c=s[l.id];c&&c.destroy(),s[l.id]=l,l.$=t(o.format(r)).toggleClass("fade",r.fade).toggleClass("scale",r.scale).attr("id","messager-"+l.id),r.cssClass&&l.$.addClass(r.cssClass);var h=!1,d=l.$.find(".messager-actions"),u=function(e){var n=t('",'",""].join("")).appendTo(i),e.$actions.on("click",".picker-action",function(i){var n=t(this).data("type");"select-all"===n?e.selectAll():"deselect-all"===n&&e.deselectAll()})),e.$message=t('
    ').appendTo(i),e.$dropMenu=i,e.$optionsList=a}e.updateList(e.search,!1,function(){e.triggerEvent("showedDrop",{picker:e},"","chosen:showing_dropdown")}),e.$dropMenu.addClass("picker-drop-show")}},r.prototype.hideDropList=function(e){var i=this;if(i.triggerEvent("hidingDrop",{picker:i})!==!1){i.dropListShowed=!1,i.$activeOption=null,i.activeValue=null,i.$search.val(""),i.search="",delete o[i.id],i.$dropMenu&&i.$dropMenu.removeClass("picker-drop-show"),i.options.disableScrollOnShow&&t.zui.resetBodyScrollbar(),e&&this.$search.blur(),i.triggerEvent("hiddenDrop",{picker:i},"","chosen:hiding_dropdown");var n=i.options.autoClearDrop;n&&i.destroyDropList(n)}},r.prototype.updateFromSelect=function(e){var i=this,n=i.options,o=[];void 0===e&&(e=!0),i.$formItem.children("option").each(function(){var e=t(this),i=e.text(),a=e.val();if(i.length||a.length){var s={};s[n.valueKey]=a,s[n.textKey]=i,s[n.keysKey]=e.data(n.keysKey),o.push(s)}var r=n.allowSingleDeselect;"auto"!==r&&null!==r&&void 0!==r||a.length||(n.allowSingleDeselect=!0)}),i.selectOptionsBackup=o.slice(),i.setList(o,e)},r.prototype.setList=function(t,e){var i=this,n=i.options,o=e?[]:i.list||[],a=e?{}:i.listMap||{};"string"==typeof t&&(t=t.split(n.multiValueSplitter));for(var s=0;s')}):p&&u.find('option[value="'+e+'"]').length||u.append('
  • doc->libType;?>doc->libTypeList, key($lang->doc->libTypeList));?>
    confirm);?>
    kanbancard->progress;?> diff --git a/module/kanban/view/viewarchivedcard.html.php b/module/kanban/view/viewarchivedcard.html.php index 0ab8484033..551ca80854 100644 --- a/module/kanban/view/viewarchivedcard.html.php +++ b/module/kanban/view/viewarchivedcard.html.php @@ -25,6 +25,7 @@ [lang^='en'] #archivedCards .card-actions > .btn {width: 55px;} #archivedCards .card-actions > .btn + .btn {margin-top: 10px;} #archivedCards .info > .time {background-color: rgba(0, 0, 0, 0.15);} +#archivedCards .info > .users {padding-right: 10px;} #archivedCards .info > .users > span {display: inline-block; color: transparent; width: 2px; height: 2px; background-color: #8990a2; position:sticky; top: 3px; margin: 0 7px; border-radius: 50%; line-height: 32px;} #archivedCards .info > .users > span:before {left: -4px; content: ''; display: block; position: absolute; width: 2px; height: 2px; background-color: #8990a2; top: 0px; border-radius: 50%;} #archivedCards .info > .users > span:after {right: -4px; content: ''; display: block; position: absolute; width: 2px; height: 2px; background-color: #8990a2; top: 0px; border-radius: 50%;} @@ -40,6 +41,8 @@ #archivedCards .card-item .has-color .info > .estimate, #archivedCards .card-item .has-color .info > .label-light {color: #FFFFFF;} #archivedCards .card-item .has-color .info > .label-pri {border-color: #FFFFFF;} +#archivedCards .progress-box {width: 97%;} +#performable {padding: 25px 10px !important;}
    @@ -117,9 +120,17 @@
    + performable):?> +
    +
    +
    +
    +
    progress, 2) . ' %';?>
    +
    + -
    +
    performable) echo "id='performable'";?>>
    "; } - common::printLink('kanban', 'editCard', "cardID=$card->id", '', '', "class='btn btn-link iframe' data-width='80%' title='{$lang->kanbancard->edit}'", true, true); + common::printLink('kanban', 'editCard', "cardID=$card->id", '', '', "class='btn btn-link' data-width='80%' title='{$lang->kanbancard->edit}'", true, true); if($kanban->performable) { - if($card->status == 'done') echo html::a(helper::createLink('kanban', 'activateCard', "cardID={$card->id}&kanbanID={$kanban->id}"), '', '', "class='btn btn-link iframe' title='{$lang->kanban->activateCard}'"); + if($card->status == 'done') echo html::a(helper::createLink('kanban', 'activateCard', "cardID={$card->id}&kanbanID={$kanban->id}"), '', '', "class='btn btn-link' title='{$lang->kanban->activateCard}'"); if($card->status == 'doing') echo html::a(helper::createLink('kanban', 'finishCard', "cardID={$card->id}&kanbanID={$kanban->id}"), '', '', "class='btn btn-link iframe' title='{$lang->kanban->finishCard}'"); } @@ -114,7 +114,7 @@
    kanbancard->estimate;?> estimate, 2) . ' ' . $lang->kanbancard->lblHour;?>
    kanbancard->progress;?> progress, 2) . ' %';?>
    id;?>name;?>name;?> task->priList, $task->pri, $task->pri)?>'>pri == '0' ? '' : zget($lang->task->priList, $task->pri, $task->pri);?> processStatus('task', $task);?> assignedTo, $task->assignedTo);?>
    id) . html::hidden('stories[]', $story->id)?>story->priList, $story->pri);?>story->priList, $story->pri);?> createLink('story', 'view', "storyID=$story->id", '', true), $story->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?> openedBy);?> assignedTo);?>
    ').addClass(i.attr("class")).append(n.clone())).insertAfter(i)),h){var d=c[0].getBoundingClientRect();l.css({left:d.left,width:c.width(),overflow:"hidden"}),l.find(".fixed-header-copy").css({left:o.left-d.left,position:"relative",minWidth:i.width()}),a||c.data("fixHeaderScroll")||(c.data("fixHeaderScroll",1),i.width()>c.width()&&c.on("scroll",function(){e.fixHeader()}))}else l.css({left:o.left,width:o.width});var u=l.find("th");n.find("th").each(function(e){u.eq(e).css("width",t(this).outerWidth())})}else l.remove()},r.prototype.fixFooter=function(){var e,i=this,n=i.getTable(),o=i.$.find(".table-footer");if(i.isDataTable)e=n[0].getBoundingClientRect();else{var a=n.find("tbody");if(!a.length)return;e=a[0].getBoundingClientRect()}var s=i.options.fixFooter;o.toggleClass("fixed-footer",!!r);var r="function"==typeof s?s(e,o):e.bottom>window.innerHeight-50-("number"==typeof s?s:i.pageFooterHeight||5);o.toggleClass("fixed-footer",!!r),n.toggleClass("with-footer-fixed",!!r),n.trigger("fixFooter",r);var l=t("body"),c=l.hasClass("body-modal");if(r){var h=n.parent(),d=h.is(".table-responsive");o.css({bottom:i.pageFooterHeight||0,left:d?h[0].getBoundingClientRect().left:e.left,width:d?h.width():e.width}),c&&l.css("padding-bottom",40)}else o.css({width:"",left:0,bottom:0}),c&&l.css("padding-bottom",0)},r.prototype.checkAll=function(e){var i=this,n=i.$.find(i.isDataTable?".fixed-left tbody>tr":"tbody>tr");n.each(function(){i.checkRow(t(this),e,!0)}),i.updateCheckUI()},r.prototype.checkRow=function(t,i,n){var o=this;o.isDataTable&&!t.is(".datatable-row-left")&&(t=o.getTable().find('.datatable-row-left[data-index="'+t.data("index")+'"]'));var a=t.find('input[type="checkbox"]');a.length&&!a.is(":disabled")&&(i===e&&(i=!a.is(":checked")),o.isDataTable?o.getTable().find('.datatable-row[data-index="'+t.data("index")+'"]').toggleClass("checked",i):t.toggleClass("checked",i),this.checkItems[t.data("id")]=i,a.prop("checked",i).trigger("change"),n||o.updateCheckUI())},r.prototype.updateCheckUI=function(){var e=this,i=e.getTable(),n=i.find(e.isDataTable?".fixed-left tbody>tr":"tbody>tr").not(".group-summary"),o=!1,a=null,s=0,r=!1,l=n.length;n.each(function(n){var c=t(this),h=c.find('input[type="checkbox"]');if(!h.length)return void l--;r=h.is(":checked");var d=e.isDataTable?i.find('.datatable-row[data-index="'+c.data("index")+'"]'):c;d.toggleClass("checked",r),d.toggleClass("row-check-begin",r&&!o),a&&a.toggleClass("row-check-end",!r&&o),r&&(s+=1),a=d,o=r,l===n+1&&d.toggleClass("row-check-end",r)}),e.$.toggleClass("has-row-checked",s>0).find(".check-all").toggleClass("checked",!(!l||s!==l)),e.updateStatistic(),e.options.onCheckChange&&e.options.onCheckChange(),i.trigger("checkChange")},r.DEFAULTS={checkable:!0,checkOnClickRow:!0,ajaxForm:!1,selectable:!0,fixHeader:!a,fixFooter:!a,iframeWidth:900,replaceId:"self",nestLevelIndent:18,nested:!1,preserveNested:!0,hot:!1,iframeModalTrigger:".iframe"},t.fn.table=function(e){return this.each(function(){var n=t(this),o=n.data(i),a="object"==typeof e&&e;o||n.data(i,o=new r(this,a)),"string"==typeof e&&o[e]()})},r.NAME=i,t.fn.table.Constructor=r,t(function(){t('[data-ride="table"]').table()})}(jQuery,void 0),function(t,e,i){t.fn._ajaxForm=t.fn.ajaxForm;var n={timeout:e.config?e.config.timeout:0,dataType:"json",method:"post"},o="";t.fn.enableForm=function(e,n,o){return e===i&&(e=!0),this.each(function(){var i=t(this);n||i.find('[type="submit"]').attr("disabled",e?null:"disabled"),!o&&i.hasClass("load-indicator")&&i.toggleClass("loading",!e),i.toggleClass("form-disabled",!e)})},t.enableForm=function(e,i,n,o){"string"==typeof e||e instanceof t?e=t(e):(o=n,n=i,i=e,e=t("form")),e.enableForm(i!==!1,n,o)},t.disableForm=function(e,i,n){t.enableForm(e,!1,i,n)};var a=function(e,i,n){"string"==typeof i&&(n=i,i=null),n=n||"show",t.zui.messager?t.zui.messager[n](e,i):alert(e)};t.ajaxForm=function(s,r){var l=t(s);if(l.length>1)return l.each(function(){t.ajaxForm(this,r)});"function"==typeof r&&(r={complete:r}),r=t.extend({},n,l.data(),r);var c=r.beforeSubmit,h=r.error,d=r.success,u=r.finish;delete r.finish,delete r.success,delete r.onError,delete r.beforeSubmit,r=t.extend({beforeSubmit:function(n,a,s){if(l.removeClass("form-watched").enableForm(!1),(c&&c(n,a,s))!==!1){var r={},h=a.find('[type="file"]');r.fileapi=h.length&&h[0].files!==i,r.formdata=e.FormData!==i;var d=r.fileapi&&a.find('input[type="file"]:enabled').filter(function(){return""!==t(this).val()}),u=d.length,p="multipart/form-data",f=a.attr("enctype")==p||a.attr("encoding")==p,g=r.fileapi&&r.formdata,m=u&&!g||f&&!r.formdata;m&&(""==o&&(o=s.url),s.url!=o&&(s.url=o),s.url=s.url.indexOf("&")>=0?s.url+"&HTTP_X_REQUESTED_WITH=XMLHttpRequest":s.url+"?HTTP_X_REQUESTED_WITH=XMLHttpRequest")}},success:function(i,n,o){if((d&&d(i,n,o,l))!==!1){try{"string"==typeof i&&(i=JSON.parse(i))}catch(s){}if(null===i||"object"!=typeof i)return i?alert(i):a("No response.","danger");var c=r.responser?t(r.responser):l.find(".form-responser");c.length||(c=t("#responser"));var h=i.message,p=function(){var n=i.callback;if(n){var o=n.indexOf("("),a=(o>0?n.substr(0,o):n).split("."),s=e,r=a[0];a.length>1&&(r=a[1],"top"===a[0]?s=e.top:"parent"===a[0]&&(s=e.parent));var c=s[r];if("function"==typeof c){var h=[];return o>0&&")"==n[n.length-1]&&(h=t.parseJSON("["+n.substring(o+1,n.length-1)+"]")), h.push(i),c.apply(l,h)}}};if("success"===i.result){var f=r.locate||i.locate,g=r.closeModal||i.closeModal,m=r.ajaxReload||i.ajaxReload;if(l.enableForm(!0,!!(f||g||m)),h){var v=l.find('[type="submit"]').first(),y=!1;v.length&&(v.popover({container:"body",trigger:"manual",content:h,tipClass:"popover-in-modal popover-success popover-form-result",placement:i.placement||v.data("placement")||r.popoverPlacement||"right"}).popover("show"),setTimeout(function(){v.popover("destroy")},r.popoverTime||2e3),y=!0),c.length&&(c.html(''+h+"").show().delay(3e3).fadeOut(100),y=!0),y||a(h,"success")}if(u)return u(i,!0,l);if(g&&setTimeout(t.zui.closeModal,r.closeModalTime||2e3),p()===!1)return;if(f)if("loadInModal"==f){var b=t(".modal");setTimeout(function(){b.load(b.attr("ref"),function(){t(this).find(".modal-dialog").css("width",t(this).data("width")),t.zui.ajustModalPosition()})},1e3)}else"parent"===f||"top"===f?e[f]&&setTimeout(function(){e[f].location.reload()},1200):"reload"===f?setTimeout(function(){e.location.href=e.location.href},1200):setTimeout(function(){t.tabs?t.tabs.open(f):e.location.href=f},1200);if(m){var w=t(m);w.length&&w.load(e.location.href+" "+m,function(){w.find('[data-toggle="modal"]').modalTrigger()})}}else{if(l.enableForm(),"string"==typeof h)c.length?c.html(''+h+"").show().delay(3e3).fadeOut(100):a(h,"danger");else if("object"==typeof h){var x=!1,C=[];t.each(h,function(e,i){var n=t.isArray(i)?i.join(""):i,o=t("#"+e);if(!o.length)return void C.push(n);var a=e+"Label",s=t("#"+a);if(!s.length){var r=o.closest(".input-group").length,l=o.closest("td").length;s=t('
    ').appendTo(l?o.closest("td"):r?o.closest(".input-group").parent():o.parent())}s.empty().append(n),o.addClass("has-error");var c=function(){var e=t("#"+a);if(e.length)return e.remove(),o.removeClass("has-error"),!0};o.on("change input mousedown",c);var h=t("#"+e+"_chosen");if(h.length&&h.find(".chosen-single,.chosen-choices").addClass("has-error").on("mousedown",function(){c()===!0&&t(this).removeClass("has-error")}),!x){if(o.hasClass("chosen"))o.trigger("chosen:activate");else if(o.is("textarea")&&o.data("keditor")){var d=o.data("keditor");d.focus(),d.edit.doc.body.focus()}else o.focus();x=!0}}),C.length&&a(C.join(";"),"danger")}if(u)return u(i,!1,l);if(p()===!1)return}}},error:function(t,i,n){if((h&&h(t,i,n,l))!==!1){l.enableForm();var o="timeout"==i||"error"==i?e.lang?e.lang.timeout:i:t.responseText+i+n;a(o,"danger")}}},r),l._ajaxForm(r).data("zui.ajaxform",!0),l.on("click","[data-form-action]",function(){l.attr("action",t(this).data("formAction")).submit()})},t.setAjaxForm=function(e,i,n){t.ajaxForm(e,t.isPlainObject(i)?i:{finish:i,beforeSubmit:n})},t.fn.ajaxForm=function(e){return this.each(function(){t.ajaxForm(this,e)})},t.fn.setInputRequired=function(){return this.each(function(){var e=t(this),i=e.parent();i.is(".input-control,td")?i.addClass("required"):e.is(".chosen")?e.attr("required",null).next(".chosen-container").addClass("required"):i.addClass("required"),e.attr("required",null);var n=i.closest(".input-group");n.length&&1===n.find(".required,input[required],select[required]").length&&n.addClass("required")})},t(function(){t('.form-ajax,form[data-type="ajax"]').ajaxForm(),setTimeout(function(){var i=e.config.requiredFields,n=t("form");i&&(i=i.split(",")),i&&i.length&&t.each(i,function(t,e){n.find("#"+e).attr("required","required")}),n.find("input[required],select[required],textarea[required]").setInputRequired()},400),t('form[target="hiddenwin"]').on("submit",function(){var e=t(this);e.data("zui.ajaxform")||e.enableForm(!1).data("disabledTime",(new Date).getTime())}).on("click",function(){var e=t(this),i=e.data("disabledTime");i&&(new Date).getTime()-i>1e4&&e.enableForm(!0).data("disabledTime",null)})})}(jQuery,window,void 0),function(t){"use strict";var e="zui.searchList",i=function(t,e){if(t&&t.length)for(var i=0;i
    ').append(s)),i.$menu.append(s),i.$menu.removeClass("loading"),i.isLoaded=!0,e&&e(!0)},error:function(){i.$menu.removeClass("loading").append('
    '+(n.errorText||window.lang&&window.lang.timeout)+"
    "),e&&e(!1)}},n.ajax))},n.prototype.scrollTo=function(t){t.length&&t[0].scrollIntoViewIfNeeded&&t[0].scrollIntoViewIfNeeded({behavior:"smooth"})},n.prototype.getItems=function(){return this.$.find(this.options.selector).addClass("search-list-item")},n.prototype.getActiveItem=function(){return this.getItems().filter(".active:first")},n.prototype.search=function(e){var n=this,o=void 0===e||null===e||""===e;n.$.toggleClass("has-search-text",!o);var a=n.getItems().removeClass("active");if(o)a.removeClass("hidden");else{var s=t.trim(e).split(" ");a.each(function(){var e=t(this),n=(e.text()+" "+(e.data("key")||e.data("filter")||"")).trim();e.toggleClass("hidden",!i(s,n))})}n.scrollTo(a.not(".hidden").first().addClass("active"))},n.DEFAULTS={selector:".list-group a:not(.not-list-item)",searchBox:".search-box",onSelectItem:null},t.fn.searchList=function(i){return this.each(function(){var o=t(this),a=o.data(e),s="object"==typeof i&&i;a||o.data(e,a=new n(this,s)),"string"==typeof i&&a[i]()})},n.NAME=e,t.fn.searchList.Constructor=n,t(function(){t('[data-ride="searchList"]').searchList()})}(jQuery),function(t){"use strict";var e="zui.labelSelector",i=function(n,o){var a=this;a.name=e,a.$=t(n),o=a.options=t.extend({},i.DEFAULTS,this.$.data(),o),a.$.hide(),a.update()};i.prototype.select=function(t){t+="",this.$wrapper.find(".label.active").removeClass("active"),this.$wrapper.find('.label[data-value="'+t+'"]').addClass("active"),this.$.val(t).trigger("change")},i.prototype.update=function(){var e=this,i=e.options,n=e.$wrapper;if(!n){if(i.wrapper)n=t(i.wrapper);else{var o=e.$.next();n=o.hasClass(".label-selector")?o:t('
    ')}n.parent().length||e.$.after(n),e.$wrapper=n,n.on("click",".label",function(i){var n=e.$.val(),o=t(this).data("value");e.hasEmptyValue!==!1&&o==n&&(o=e.hasEmptyValue),e.select(o),i.preventDefault()})}n.empty();var a=e.$.val();e.hasEmptyValue=!1,e.$.children("option").each(function(){var e=t(this),o={label:e.text(),value:e.val()},s=""===o.value||"0"===o.value,r=t(i.labelTemplate||'');i.labelClass&&!s&&r.addClass(i.labelClass),i.labelCreator?r=i.labelCreator(r):(r.data("option",o).attr("data-value",o.value),s&&!o.label?r.addClass("empty").append(''):r.text(o.label).toggleClass("active",a===o.value)),n.append(r)})},i.DEFAULTS={},t.fn.labelSelector=function(n){return this.each(function(){var o=t(this),a=o.data(e),s="object"==typeof n&&n;a||o.data(e,a=new i(this,s)),"string"==typeof n&&a[n]()})},i.NAME=e,t.fn.labelSelector.Constructor=i,t(function(){t('[data-provide="labelSelector"]').labelSelector()})}(jQuery),function(t){"use strict";var e="zui.fileInput",i=t.BYTE_UNITS={B:1,KB:1024,MB:1048576,GB:1073741824,TB:1099511627776},n=t.formatBytes=function(t,e,n){return void 0===e&&(e=2),n||(n=ts.fileMaxSize&&(c.val(""),(window.bootbox||window).alert(s.fileSizeError.format(n(s.fileMaxSize)))),r.update()}),r.update()};a.prototype.getFile=function(){var t=this.$input.prop("files");return t&&t[0]},a.prototype.update=function(){var t=this,e=t.$,i=t.getFile(),o=!i;e.toggleClass("normal",!o).toggleClass("empty",o),i?(t.oldName=i.name,e.find(".file-title").text(i.name).attr("title",i.name),e.find(".file-size").text(n(i.size)),e.find(".file-editbox").val(i.name).attr("size",i.name.length),t.options.onSelect&&t.options.onSelect(i,t)):e.find(".file-editbox").val("")},a.DEFAULTS={fileMaxSize:0,fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInput=function(i){return this.each(function(){var n=t(this),o=n.data(e),s="object"==typeof i&&i;o||n.data(e,o=new a(this,s)),"string"==typeof i&&o[i]()})},a.NAME=e,t.fn.fileInput.Constructor=a,t(function(){t('[data-provide="fileInput"]').fileInput()});var s="zui.fileInputList",r=function(e,i){var n=this;n.name=s;var o=n.$=t(e);i=n.options=t.extend({},r.DEFAULTS,this.$.data(),i),n.$template=o.find(".file-input").detach(),n.add()};r.prototype.add=function(){var t=this,e=t.options,i=t.$template.clone();"before"===e.appendWay?t.$.prepend(i):t.$.append(i),i.fileInput({fileMaxSize:e.eachFileMaxSize,fileSizeError:e.fileSizeError,onDelete:function(e){e.$.remove(),t.options.onDelete&&t.options.onDelete(e,t)},onSelect:function(e,i){t.add(),t.options.onSelect&&t.options.onSelect(e,i,t)}})},r.DEFAULTS={fileMaxSize:0,eachFileMaxSize:0,appendWay:"after",fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInputList=function(e){return this.each(function(){var i=t(this),n=i.data(s),o="object"==typeof e&&e;n||i.data(s,n=new r(this,o)),"string"==typeof e&&n[e]()})},r.NAME=s,t.fn.fileInputList.Constructor=r,t(function(){t('[data-provide="fileInputList"]').fileInputList()})}(jQuery),function(t){window.config||(window.config={}),t.createLink=window.createLink=function(e,n,o,a,s,r,l){if("object"==typeof e)return t.createLink(e.moduleName,e.methodName,e.vars,e.viewType,e.isOnlyBody,e.hash,e.tid);if(t.tabSession&&!l&&(l=t.tabSession.getTid()),a||(a=config.defaultView),s||(s=!1),o)for("string"==typeof o&&(o=o.split("&")),i=0;i'+d+"")}}t.val()||(time=e(a.format("hh:mm")),time=time-time%10+10,t.val(n(time)))};t.fn.timeSpanControl=function(i){return this.each(function(){var s=t(this),r=t.extend({},i,s.data()),l=s.find('[name="begin"],.control-time-begin'),c=s.find('[name="end"],.control-time-end'),h=function(){var t=l.val();if(s.find(".hide-empty-begin").toggleClass("hide",!t),t){var i=n(e(t)+30);c.find('option[value="'+i+'"]').length&&c.val(i),r.onChange&&r.onChange(c,i)}};if(s.data("timeSpanControlInit")){if(r.begin){var d=o(r.begin).format("hh:mm");l.find('option[value="'+d+'"]').length&&l.val(d),r.onChange&&r.onChange(l,d)}if(r.end){var u=o(r.end).format("hh:mm");c.find('option[value="'+u+'"]').length&&c.val(u),r.onChange&&r.onChange(c,u)}}else l.on("change",h),a(l,r.begin),a(c,r.end),s.data("timeSpanControlInit",!0);r.end||h()})},t.timeSpanControl={convertTimeToNum:e,convertNumToTime:n,initTimeSelect:a,createTime:o};var s=t.setSearchType=function(e,i){var n=t("#searchType");e||(e=n.val()),e=e||"bug",n.val(e);var o=t("#searchTypeMenu");o.find("li.selected").removeClass("selected");var a=o.find('a[data-value="'+e+'"]'),s=a.text();a.parent().addClass("selected"),t("#searchTypeName").text(s),i||t("#searchInput").focus()};t.gotoObject=function(e,i){if(e||(e=t("#searchType").val()),i||(i=t("#searchInput").val()),i&&e)if(i=i.replace(/[^\d]/g,"")){var n=e.split("-");e=n[0];var o=n.length>1?n[1]:"testsuite"===e?"library":"view",a=t.createLink(e,o,"id="+i);t.apps?t.apps.open(a):window.location.href=a}else{var s={zh_cn:"请输入数字ID进行搜索",zh_tw:"請輸入數值ID行搜索"};alert(lang.searchTip||s[t.zui.clientLang()]||"Please enter a numberic id to search")}t("#searchInput").val(i).focus()},t(function(){s(null,!0),t(document).on("keydown",function(e){e.ctrlKey&&71===e.keyCode&&(t("#searchInput").val("").focus(),e.stopPropagation(),e.preventDefault())})}),t.removeAnchor=window.removeAnchor=function(t){var e=t.lastIndexOf("#");return e>-1?t.substr(0,e):t},t.refreshPage=function(t){t?window.parent.location.reload():window.location.reload()},t.selectLang=window.selectLang=function(e){t.cookie("lang",e,{expires:config.cookieLife,path:config.webRoot}),t.ajaxSendScore("selectLang"),t.refreshPage(1)},t.selectTheme=window.selectTheme=function(e){t.cookie("theme",e,{expires:config.cookieLife,path:config.webRoot}),t.ajaxSendScore("selectTheme"),t.refreshPage(1)},t.zui.Picker&&(t.zui.Picker.DEFAULTS.optionRender=function(e,i,n){if("user"===n.options.type){var o=n.options.users;if(!o)return;var a=o[i.value];if(!a)return;if(e.find(".picker-option-text").text(a.realname||a.account),e.hasClass("picker-user-option"))return;return e.prepend(t('
    ').avatar({user:a})),a.deptName&&e.append(t('').text(a.deptName)),a.roleName&&e.append(t('').text(a.roleName)),e.addClass("picker-user-option")}},t.zui.setUserPickerInfos=function(e){t.zui.Picker.DEFAULTS.users=t.extend({},t.zui.Picker.DEFAULTS.users,e)},t(function(){t(".picker-select[data-pickertype!='remote']").picker({chosenMode:!0}),t("[data-pickertype='remote']").each(function(){var e=t(this).attr("data-pickerremote");t(this).picker({chosenMode:!0,remote:e})}),window.pickerUsers&&t.zui.setUserPickerInfos(window.pickerUsers),t(".user-picker").picker({type:"user"})})),t.chosenDefaultOptions={middle_highlight:!0,disable_search_threshold:1,compact_search:!0,allow_single_deselect:!0,placeholder_text_single:" ",placeholder_text_multiple:" ",search_contains:!0,max_drop_width:500,max_drop_height:245,no_wrap:!0,drop_direction:function(){var e=t(this.container).closest(".table-responsive:not(.scroll-none)");if(e.length){if(this.drop_directionFixed)return this.drop_directionFixed;e.css("position","relative");var i="down",n=this.container.find(".chosen-drop"),o=this.container.position(),a=n.outerHeight();return o.top>=a&&o.top+31+a>e.outerHeight()&&(i="up"),this.drop_directionFixed=i,i}return"auto"}},t.chosenSimpleOptions=t.extend({},t.chosenDefaultOptions,{disable_search_threshold:6}),t.fn._chosen=t.fn.chosen,t.fn.chosen=function(e){return"string"==typeof e?this._chosen(e):this.each(function(){var i=t(this).addClass("chosen-controled");return i._chosen(t.extend({},i.hasClass("chosen-simple")?t.chosenSimpleOptions:t.chosenDefaultOptions,i.data(),e))})},t.fn.chosen.Constructor=t.fn._chosen.Constructor,t(function(){t(".chosen,.chosen-simple").each(function(){var e=t(this);e.closest(".template").length||e.chosen()})}),t.extend(t.fn.pager.Constructor.DEFAULTS,{maxNavCount:8,prevIcon:"icon-angle-left",nextIcon:"icon-angle-right",firstIcon:"icon-first-page",lastIcon:"icon-last-page",navEllipsisItem:"…",menuDirection:"dropup",pageSizeOptions:[5,10,15,20,25,30,35,40,45,50,100,200,500,1e3,2e3],elements:["total_text","size_menu","first_icon","prev_icon",'
    {page}/{totalPage}
    ',"next_icon","last_icon"],onPageChange:function(e,i){e.recPerPage!==i.recPerPage&&t.cookie(this.options.pageCookie,e.recPerPage,{expires:config.cookieLife,path:config.webRoot}),e.recPerPage!==i.recPerPage&&(window.location.href=this.createLink())}}),t.extend(!0,t.zui.Messager.DEFAULTS,{cssClass:"messagger-zt",icons:{success:"check-circle",info:"chat-line",warning:"exclamation-sign",danger:"exclamation-sign"}}),t.fn.reverseOrder=function(){return this.each(function(){var e=t(this);e.prependTo(e.parent())})};var r=function(e,i){var n=t(e);if(!n.data("historiesInited")){n.data("historiesInited",1),i=t.extend({},n.data(),i);var o=n.find(".histories-list"),a=!0,s=!1;n.on("click",".btn-reverse",function(){o.children("li").reverseOrder(),a=!a,t(this).find(".icon").toggleClass("icon-arrow-up",a).toggleClass("icon-arrow-down",!a);var e="#lastComment",i=t(e);i.length&&window.KindEditor&&(window.KindEditor.remove(e),i.kindeditor())}).on("click",".btn-expand-all",function(){var e=t(this).find(".icon");s=!s,e.toggleClass("icon-plus",!s).toggleClass("icon-minus",s),o.children("li").toggleClass("show-changes",s)}).on("click",".btn-expand",function(){t(this).closest("li").toggleClass("show-changes")}).on("click",".btn-strip",function(){var e=t(this),n=e.find(".icon"),o=n.hasClass("icon-code");n.toggleClass("icon-code",!o).toggleClass("icon-text",o),e.attr("title",o?i.original:i.textdiff),e.closest("li").toggleClass("show-original",o)}),o.find(".btn-strip").attr("title",i.original);var r=n.find(".modal-comment").modal({show:!1}).on("shown.zui.modal",function(){var t=r.find("#comment");t.length&&(t.focus(),window.editor&&window.editor.comment&&window.editor.comment.focus())}).on("show.zui.modal",function(){var e=r.find("#comment");e.length&&!e.data("keditor")&&t.fn.kindeditor&&e.kindeditor()});n.on("click",".btn-comment",function(t){r.modal("toggle"),t.preventDefault()}).on("click",".btn-edit-comment,.btn-hide-form",function(){t(this).closest("li").toggleClass("show-form")});var l=n.find(".comment-edit-form");l.ajaxForm({success:function(t,e,i,n){setTimeout(function(){l.closest("li").removeClass("show-form")},2e3)}})}};t.fn.histories=function(t){return this.each(function(){r(this,t)})},t(function(){t(".histories").histories()});var l=0,c=0;t.toggleSidebar=function(e){var i=t("#sidebar");if(i.length){var n=t("main");if(void 0===e)e=n.hasClass("hide-sidebar");else if(e&&!n.hasClass("hide-sidebar"))return;n.toggleClass("hide-sidebar",!e),clearTimeout(l),t.zui.store.set(c,e);var o=i.children(".cell"),a={overflow:"visible",maxHeight:"initial"};e?(i.addClass("showing"),l=setTimeout(function(){i.removeClass("showing"),i.trigger("sidebar.toggle",e)},210)):(i.trigger("sidebar.toggle",e),t(window).width()<1900&&(a={overflow:"hidden",maxHeight:t(window).height()-45})),o.css(a)}};var h=t.initSidebar=function(){var e=t("#sidebar");if(e.length){if(e.data("init"))return!0;c="sidebar:"+(e.data("id")||config.currentModule+"/"+config.currentMethod);var i=t("main");if(i.length){i.on("click",".sidebar-toggle",function(){t.toggleSidebar(i.hasClass("hide-sidebar"))});var n=t.zui.store.get(c,e.data("hide")!==!1);n===!1&&e.addClass("no-animate"),t.toggleSidebar(n),n===!1&&setTimeout(function(){e.removeClass("no-animate")},500);var o=e.find(".sidebar-toggle");if(o.length){var a=function(){var e=o[0].getBoundingClientRect(),i=t(window).height(),n=Math.max(0,Math.floor(Math.min(i-40,e.top+e.height)-Math.max(e.top,0))/2)+(e.top<0?0-e.top:0);o.removeClass("fade").find(".icon").css("top",n+(t.zui.browser.isIE()?(i-80)/2:0))};a(),e.data("init",1).on("sidebar.toggle",a);var s=t.zui.browser.isIE()?1500:0,r=0,l=null,h=function(){var t=Date.now();return l&&(clearTimeout(l),l=null),t-rtr input[type="checkbox"]:checked');i.each(function(){var i=parseInt(t(this).val(),10);NaN!==i&&e.push(i)}),t.cookie("checkedItem",e.join(","),{expires:config.cookieLife,path:config.webRoot})},t.extend(t.fn.modal.bs.Constructor.DEFAULTS,{scrollInside:!0,backdrop:"static",headerHeight:100}),t.extend(t.zui.ModalTrigger.DEFAULTS,{scrollInside:!0,backdrop:"static",headerHeight:40}),t.fn.initIframeModal=function(){return this.each(function(){var e=t(this);if(!e.parents('[data-ride="table"],.skip-iframe-modal').length){var i={type:"iframe"};e.hasClass("export")&&t.extend(i,{width:800,shown:setCheckedCookie},e.data()),e.modalTrigger(i)}})},t(function(){t("a.iframe,.export").initIframeModal()});var d=function(){var e,i,n=t(this),o=t.extend({limitSize:40,suffix:"…"},n.data()),a=n.text();if(a.length>o.limitSize){e=a,i=a.substr(0,o.limitSize)+o.suffix,n.text(i).addClass("limit-text-on");var s=o.toggleBtn?t(o.toggleBtn):n.next(".text-limit-toggle");s.text(s.data("textExpand")),s.on("click",function(){var t=n.toggleClass("limit-text-on").hasClass("limit-text-on");n.text(t?i:e),s.text(s.data(t?"textExpand":"textCollapse"))})}else(o.toggleBtn?t(o.toggleBtn):n.next(".text-limit-toggle")).hide()};t.fn.textLimit=function(){return this.each(d)},t(function(){t(".text-limit").textLimit()}),t.fixedTableHead=window.fixedTableHead=function(e,i){var n=t(e);if(n.is("table")||(n=n.find("table")),n.length){var o=t(i||window),a=null,s=function(){var e=n.children("thead"),i=e[0].getBoundingClientRect(),o=n.next(".fixed-head-table");if(i.top<0){var s=e.width();if(o.length){if(a!==s){a=s;var r=o.find("th");e.find("th").each(function(e){r.eq(e).width(t(this).width())})}}else{var o=t("
    ").addClass(n.attr("class")),l=e.clone(),r=l.find("th");e.find("th").each(function(e){r.eq(e).width(t(this).width())}),o.append(l).insertAfter(n)}o.css({left:i.left,width:i.width}).show()}else o.hide()};o.on("scroll",s).on("resize",s),s()}},t(document).on("click","tr[data-url]",function(){var e=t(this),i=e.data("href")||e.data("url");i&&(window.location.href=i)}),"yes"===config.onlybody&&self===parent&&(window.location.href=window.location.href.replace("?onlybody=yes","").replace("&onlybody=yes","")),t(function(){t("body").addClass("m-{currentModule}-{currentMethod}".format(config))});var u,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),a=Math.min(o,m),s=(e-a)/2,r=i&&s.btn-toolbar");if(e.length){var i,n,o=e.children(),a=o.length,s=!1,r=null;if(a)for(o.each(function(e){i=t(this),n=i.is(".divider"),n&&!r&&i.hide(),s||n||(s=!0),r=n?null:i,!n||e!==a-1&&0!==e||i.hide()});i.length&&i.is(".divider");)i=i.hide().prev();s||e.hide()}};t(function(){t(".input-group,.btn-group").fixInputGroup(),k()}),window.holders&&t.each(window.holders,function(e){var i=t("#"+e);i.length&&i.is("input")&&i.attr("placeholder",window.holders[e])}),t(function(){var e=t(".table-responsive"),i=t.fixTableResponsive=function(){e.each(function(){this.scrollHeight-3<=this.clientHeight&&this.scrollWidth-3<=this.clientWidth?t(this).addClass("scroll-none").css("overflow","visible"):t(this).removeClass("scroll-none").css("overflow","auto")})};e.length&&(t(window).on("resize",i),setTimeout(i,100))});var T=function(){var e=this,i=t(e),n=i.closest("tr").find("textarea");if(n.length){var o=32;n.each(function(){var e=t(this).closest("td"),i=e.css("height");e.css("height",this.style.height),this.style.height="auto";var n=this.value?this.scrollHeight+2:32;o=Math.max(o,n),e.css("height",i)}),n.css("height",o)}else{e.style.height="auto";var a=e.value?e.scrollHeight+2:32;e.style.height=a+"px"}};t.autoResizeTextarea=function(e){t(e).each(T)},t(function(){t("textarea.autosize").each(T),t(document).on("input paste change","textarea.autosize",T)}),t(function(){var e=t("#dropMenu,.drop-menu");e.length&&e.on("click",".toggle-right-col",function(e){t(this).closest("#dropMenu,.drop-menu").toggleClass("show-right-col"),e.stopPropagation(),e.preventDefault()})});var S="undefined"!=typeof InstallTrigger;t.zui.browser.firefox=S,t("html").toggleClass("is-firefox",S).toggleClass("not-firefox",!S),t(function(){var e=t("#mainContent>.main-col"),i=e.children(".main-actions");if(i.length){var n=i.prev();if(i.length&&n.length){t('
    ').css("height",i.outerHeight()).insertAfter(i);var o=0,a=function(){var e=n[0].getBoundingClientRect(),s=e.top+e.height+120>t(window).height();if(t("body").toggleClass("main-actions-fixed",s),s){var r=n.width();r?i.width(r):o<10&&setTimeout(a,1e3)}o++};t.resetToolbarPosition=a,a(),t(window).on("resize scroll",a)}}}),t(document).on("show.zui.modal",function(e){t("body.body-modal").length&&window.parent&&window.parent!==window&&t(e.target).is(".modal")&&window.parent.$("body").addClass("hide-modal-close")}).on("hidden.zui.modal",function(){t("body.body-modal").length&&window.parent&&window.parent!==window&&window.parent.$("body").removeClass("hide-modal-close")}),t(function(){var e=t(".dropdown-menu.with-search");e.length&&(e.find(".menu-search").on("click",function(t){return t.stopPropagation(),!1}),e.on("keyup change paste","input",function(){var e=t(this),i=e.closest(".dropdown-menu.with-search"),n=e.val().toLowerCase(),o=i.find(".option");""==n?o.removeClass("hide"):o.each(function(){var e=t(this);e.toggleClass("hide",e.text().toString().toLowerCase().indexOf(n)<0&&e.data("key").toString().toLowerCase().indexOf(n)<0)})}),e.parents(".dropdown-submenu").one("mouseenter",function(){ -var e=t(this).find(".dropdown-list")[0];e&&e.getBoundingClientRect&&setTimeout(function(){var t=270,i=e.getBoundingClientRect();i.top<0&&(t=Math.min(270,i.height)+i.top),e.style.maxHeight=Math.min(270,t)+"px"},50)})),t(".dropdown-menu.with-search .menu-search").on("click",function(t){return t.stopPropagation(),!1})})}(jQuery),function(t){function e(){var e=window.parent,i=config.currentModule,n=config.currentMethod,o="index"===i&&"index"===n,a="#_single"===location.hash||o||!t("#mainHeader,#editorNav").length||"tutorial"===i||"install"===i||"upgrade"===i||"user"===i&&("login"===n||"deny"===n)||"my"===i&&"changepassword"===n||t("body").hasClass("allow-self-open"),s=location.href;if(e===window&&!a){var r=location.pathname+location.search+location.hash;return void(location.href=t.createLink("index","index","")+"#app="+encodeURIComponent(r))}if(e!==window&&e.$.apps){o&&e.location.reload();var l=window.name;if(0===l.indexOf("app-")){t.apps=window.apps=e.$.apps;var c=l.substring(4);t.appCode=c,t(document).on("click",function(t){var i=e.document.getElementById(window.name);if(i){var n=e.document.getElementById(i.name)||i;n&&n.dispatchEvent(new Event(t.type,{bubbles:!0}))}}).on("click","a,.open-in-app,.show-in-app",function(e){var i=t(this);if(!i.is("[data-modal],[data-toggle],[data-ride],[data-tab],.iframe,.not-in-app,[target]")&&!i.data("zui.modaltrigger")){var n=i.hasClass("show-in-app")?"":i.attr("href")||(i.is("a")?"":i.data("url")),o=i.data("app")||i.data("group");if(n){if(0===n.indexOf("javascript:")||"#"===n[0])return;var a=t.parseLink(n);if(a.external)return;if("index"===a.moduleName&&"index"===a.methodName)return window.location.reload(),void e.preventDefault()}else if(!o)return;o||(o=t.apps.getAppCode(n)),o&&("help"===o&&(t.apps.appsMap.help.text=i.text(),t.apps.appsMap.help.url||(t.apps.appsMap.help.url=n)),t.apps.open(n,o)&&e.preventDefault())}}),t.apps.updateUrl(c,s,document.title)}}}function i(){var e=t("#navbar>.nav");if(e.length){var i=t("#heading"),n=+i.css("left").replace("px",""),o=i.outerWidth(),a=e.width(),s=t("#mainHeader>.container").width()-2*n,r=Math.floor((s-a)/2);e.css("marginLeft",r>>0;if(0===o)return!1;for(var a=0|e,s=Math.max(a>=0?a:o-Math.abs(a),0);s1&&("?"===e[0]&&(e=e.substr(1)),e.split("&").forEach(function(t){var e=t.split("=",2);if(e.length>1)try{i[e[0]]=decodeURIComponent(e[1])}catch(n){i[e[0]]=""}else i[e[0]]=""})),t?i[t]:i},t.parseLink=function(e){if(!e)return{};var i=0===e.indexOf("http:")||0===e.indexOf("https:");if(i){var n=window.location.origin;if(e.indexOf(n)<0)return{external:!0,url:e};e=e.substr((n+config.webRoot).length)}var o=e.split("#"),a=o[0].split("?"),s=a[1],r=s?t.getSearchParam("",s):{},l=a[0],c={url:e,isOnlyBody:"yes"===r.onlybody,vars:[],hash:o[1]||"",params:r,tid:r.tid||""};if("GET"===config.requestType){c.moduleName=r[config.moduleVar]||"index",c.methodName=r[config.methodVar]||"index",c.viewType=r[config.viewVar]||config.defaultView;for(var h in r)h!==config.moduleVar&&h!==config.methodVar&&h!==config.viewVar&&"onlybody"!==h&&"tid"!==h&&c.vars.push([h,r[h]])}else{var d=l.lastIndexOf("/");d===l.length-1&&(l=l.substr(0,d),d=l.lastIndexOf("/")),d>=0&&(l=l.substr(d+1));var u=l.lastIndexOf(".");u>=0?(c.viewType=l.substr(u+1),l=l.substr(0,u)):c.viewType=config.defaultView;var p=l.split(config.requestFix);if(c.moduleName=p[0]||"index",c.methodName=p[1]||"index",p.length>2)for(var f=2;f.nav>li").length>10&&(i(),t(window).on("resize",i)),setTimeout(n,1e3)})}(jQuery),function(t){"use strict";function e(e,i){"object"!=typeof i&&(i={user:i});var n=t(e);i=t.extend({},n.data(),i);var o=i.user;"string"==typeof o&&(o={account:o});var a={},s=i.size;s&&(a.width=s,a.height=s,a.lineHeight=s,Number.isNaN(+s)||n.addClass("size-"+s));var r=!!o.avatar;if(n.toggleClass("has-image",r).toggleClass("has-text",!r),n.empty(),r)n.append(t("").attr("src",o.avatar));else{var l=t.zui.strCode(o.account)*(i.hueDistance||43)%360;a.background="hsl("+l+","+(i.saturation||"40%")+","+(i.lightness||"60%")+")",Number.isNaN(+s)||(a.fontSize=Math.round(s/2)+"px");var c=o.name||o.realname||o.account;c=/^[\u4e00-\u9fa5\s]+$/.test(c)?c.length<=2?c:c.substring(c.length-2):/^[A-Za-z\d\s]+$/.test(c)?c[0].toUpperCase():c.length<=2?c:c.substring(0,2),n.append(t('').text(c))}return n.css(a)}t.fn.avatar=function(t){return this.each(function(){e(this,t)})}}(jQuery),$.zui.lang("de",{"zui.pager":{pageOfText:"Seite {0}",prev:"Zurück",next:"Nächste Seite",first:"Erste Seite",last:"Letzte Seite","goto":"Goto",pageOf:"Seite {page}",totalPage:"{totalPage} Seiten",totalCount:"Total: {recTotal} Artikel",pageSize:"{recPerPage} Artikel pro Seite",itemsRange:"Seiten {start} bis {end}",pageOfTotal:"Seite {page}/{totalPage}"},"zui.boards":{append2end:"Gehen Sie zum Ende"},"zui.browser":{tip:"Online. Sorgenfrei. Aktualisiere deinen Browser noch heute!"},"zui.calendar":{weekNames:["Son","Mon","Die","Mit","Don","Fri","Sam"],monthNames:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",year:"{0}Jahr",month:"{0}Monat",yearMonth:"{0}-{1}"},"zui.chosenIcons":{emptyIcon:"[Kein Icon]",commonIcons:"Gemeinsame Symbole",webIcons:"Web-Symbol",editorIcons:"Editor-Symbol",directionalIcons:"Pfeil Zusammenfluss",otherIcons:"Andere Symbole"},"zui.colorPicker":{errorTip:"Kein gültiger Farbwert"},"zui.datagrid":{errorCannotGetDataFromRemote:"Daten vom Remote-Server ({0}) können nicht abgerufen werden.",errorCannotHandleRemoteData:"Die vom Remote-Server zurückgegebenen Daten können nicht verarbeitet werden."},"zui.guideViewer":{prevStep:"Vorheriger Schritt",nextStep:"Nächster Schritt"},"zui.tabs":{reload:"Neu laden",close:"Schliessen",closeOthers:"Schließen Sie andere Registerkarten",closeRight:"Schließen Sie die rechte Registerkarte",reopenLast:"Letzten geschlossenen Tab wiederherstellen",errorCannotFetchFromRemote:"Inhalt kann nicht vom Remote-Server abgerufen werden ({0})."},"zui.uploader":{},datetimepicker:{days:["Sonntag","Montag","Diensteg","Mittwoch","Donnerstag","Freitag","Samstag"],daysShort:["Son","Mon","Die","Mit","Don","Fri","Sam"],daysMin:["Son","Mon","Die","Mit","Don","Fri","Sam"],months:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",suffix:[],meridiem:[]},chosen:{no_results_text:"Nicht gefunden"},bootbox:{OK:"OK",CANCEL:"Stornieren",CONFIRM:"Bestätigen"}}),$.zui.lang("fr",{"zui.pager":{pageOfText:"Page {0}",prev:"Prev",next:"Suivant",first:"First",last:"Last","goto":"Goto",pageOf:"Page {page}",totalPage:"{totalPage} pages",totalCount:"Total: {recTotal} items",pageSize:"{recPerPage} per page",itemsRange:"De {start} à {end}",pageOfTotal:"Page {page} de {totalPage}"},"zui.boards":{append2end:"Aller jusqu'au bout"},"zui.browser":{tip:"Naviguez sans crainte sur Internet. Mettez votre navigateur à jour dès aujourd'hui!"},"zui.calendar":{weekNames:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],monthNames:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",year:"{0} Année",month:"{0} Mois",yearMonth:"{0}-{1}"},"zui.chosenIcons":{emptyIcon:"[Aucune icône]",commonIcons:"Icônes communes",webIcons:"Icône Web",editorIcons:"Icône de l'éditeur",directionalIcons:"Flèche confluence",otherIcons:"Autres icônes"},"zui.colorPicker":{errorTip:"Pas une valeur de couleur valide"},"zui.datagrid":{errorCannotGetDataFromRemote:"Impossible d'obtenir les données du serveur distant ({0}).",errorCannotHandleRemoteData:"Impossible de traiter les données renvoyées par le serveur distant."},"zui.guideViewer":{prevStep:"Étape précédente",nextStep:"Prochaine étape"},"zui.tabs":{reload:"Recharger",close:"Fermer",closeOthers:"Fermez les autres onglets",closeRight:"Fermer l'onglet de droite",reopenLast:"Restaurer le dernier onglet fermé",errorCannotFetchFromRemote:"Impossible d'obtenir le contenu du serveur distant ({0})."},"zui.uploader":{},datetimepicker:{days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],daysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],daysMin:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],months:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],monthsShort:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",suffix:[],meridiem:[]},chosen:{no_results_text:"Pas trouvé"},bootbox:{OK:"D'accord",CANCEL:"Annuler",CONFIRM:"Confirmer"}}); +var e=t(this).find(".dropdown-list")[0];e&&e.getBoundingClientRect&&setTimeout(function(){var t=270,i=e.getBoundingClientRect();i.top<0&&(t=Math.min(270,i.height)+i.top),e.style.maxHeight=Math.min(270,t)+"px"},50)})),t(".dropdown-menu.with-search .menu-search").on("click",function(t){return t.stopPropagation(),!1})})}(jQuery),function(t){function e(){var e=window.parent,i=config.currentModule,n=config.currentMethod,o="index"===i&&"index"===n,a="#_single"===location.hash||o||!t("#mainHeader,#editorNav").length||"tutorial"===i||"install"===i||"upgrade"===i||"user"===i&&("login"===n||"deny"===n)||"my"===i&&"changepassword"===n||t("body").hasClass("allow-self-open"),s=location.href;if(e===window&&!a){var r=location.pathname+location.search+location.hash;return void(location.href=t.createLink("index","index","")+"#app="+encodeURIComponent(r))}if(e!==window&&e.$.apps){o&&e.location.reload();var l=window.name;if(0===l.indexOf("app-")){t.apps=window.apps=e.$.apps;var c=l.substring(4);t.appCode=c,t(document).on("click",function(t){var i=e.document.getElementById(window.name);if(i){var n=e.document.getElementById(i.name)||i;n&&n.dispatchEvent(new Event(t.type,{bubbles:!0}))}}).on("click","a,.open-in-app,.show-in-app",function(e){var i=t(this);if(!i.is("[data-modal],[data-toggle],[data-ride],[data-tab],.iframe,.not-in-app,[target]")&&!i.data("zui.modaltrigger")){var n=i.hasClass("show-in-app")?"":i.attr("href")||(i.is("a")?"":i.data("url")),o=i.data("app")||i.data("group");if(n){if(0===n.indexOf("javascript:")||"#"===n[0])return;var a=t.parseLink(n);if(a.external)return;if("index"===a.moduleName&&"index"===a.methodName)return window.location.reload(),void e.preventDefault()}else if(!o)return;o||(o=t.apps.getAppCode(n)),o&&("help"===o&&(t.apps.appsMap.help.text=i.text(),t.apps.appsMap.help.url||(t.apps.appsMap.help.url=n)),t.apps.open(n,o)&&e.preventDefault())}}),t.apps.updateUrl(c,s,document.title)}}}function i(){var e=t("#navbar>.nav");if(e.length){var i=t("#heading"),n=+i.css("left").replace("px",""),o=i.outerWidth(),a=e.width(),s=t("#mainHeader>.container").width()-2*n,r=Math.floor((s-a)/2);e.css("marginLeft",r>>0;if(0===o)return!1;for(var a=0|e,s=Math.max(a>=0?a:o-Math.abs(a),0);s1&&("?"===e[0]&&(e=e.substr(1)),e.split("&").forEach(function(t){var e=t.split("=",2);if(e.length>1)try{i[e[0]]=decodeURIComponent(e[1])}catch(n){i[e[0]]=""}else i[e[0]]=""})),t?i[t]:i},t.parseLink=function(e){if(!e)return{};var i=0===e.indexOf("http:")||0===e.indexOf("https:");if(i){var n=window.location.origin;if(e.indexOf(n)<0)return{external:!0,url:e};e=e.substr((n+config.webRoot).length)}var o=e.split("#"),a=o[0].split("?"),s=a[1],r=s?t.getSearchParam("",s):{},l=a[0],c={url:e,isOnlyBody:"yes"===r.onlybody,vars:[],hash:o[1]||"",params:r,tid:r.tid||""};if("GET"===config.requestType){c.moduleName=r[config.moduleVar]||"index",c.methodName=r[config.methodVar]||"index",c.viewType=r[config.viewVar]||config.defaultView;for(var h in r)h!==config.moduleVar&&h!==config.methodVar&&h!==config.viewVar&&"onlybody"!==h&&"tid"!==h&&c.vars.push([h,r[h]])}else{var d=l.lastIndexOf("/");d===l.length-1&&(l=l.substr(0,d),d=l.lastIndexOf("/")),d>=0&&(l=l.substr(d+1));var u=l.lastIndexOf(".");u>=0?(c.viewType=l.substr(u+1),l=l.substr(0,u)):c.viewType=config.defaultView;var p=l.split(config.requestFix);if(c.moduleName=p[0]||"index",c.methodName=p[1]||"index",p.length>2)for(var f=2;f.nav>li").length>10&&(i(),t(window).on("resize",i)),setTimeout(n,1e3)})}(jQuery),function(t){"use strict";function e(e,i){"object"!=typeof i&&(i={user:i});var n=t(e);i=t.extend({},n.data(),i);var o=i.user;"string"==typeof o&&(o={account:o});var a={},s=i.size;s&&(a.width=s,a.height=s,a.lineHeight=s,Number.isNaN(+s)||n.addClass("size-"+s));var r=!!o.avatar;if(n.toggleClass("has-image",r).toggleClass("has-text",!r),n.empty(),r)n.append(t("").attr("src",o.avatar));else{var l=t.zui.strCode(o.account)*(i.hueDistance||43)%360;a.background="hsl("+l+","+(i.saturation||"40%")+","+(i.lightness||"60%")+")",Number.isNaN(+s)||(a.fontSize=Math.round(s/2)+"px");var c=o.name||o.realname||o.account;c=/^[\u4e00-\u9fa5\s]+$/.test(c)?c.length<=2?c:c.substring(c.length-2):/^[A-Za-z\d\s]+$/.test(c)?c[0].toUpperCase():c.length<=2?c:c.substring(0,2),n.append(t('').text(c))}return n.css(a)}t.fn.avatar=function(t){return this.each(function(){e(this,t)})}}(jQuery),$.zui.lang("de",{"zui.pager":{pageOfText:"Seite {0}",prev:"Zurück",next:"Nächste Seite",first:"Erste Seite",last:"Letzte Seite","goto":"Goto",pageOf:"Seite {page}",totalPage:"{totalPage} Seiten",totalCount:"Total: {recTotal} Artikel",pageSize:"{recPerPage} Artikel pro Seite",itemsRange:"Seiten {start} bis {end}",pageOfTotal:"Seite {page}/{totalPage}"},"zui.boards":{append2end:"Gehen Sie zum Ende"},"zui.browser":{tip:"Online. Sorgenfrei. Aktualisiere deinen Browser noch heute!"},"zui.calendar":{weekNames:["Son","Mon","Die","Mit","Don","Fri","Sam"],monthNames:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",year:"{0}Jahr",month:"{0}Monat",yearMonth:"{0}-{1}"},"zui.chosenIcons":{emptyIcon:"[Kein Icon]",commonIcons:"Gemeinsame Symbole",webIcons:"Web-Symbol",editorIcons:"Editor-Symbol",directionalIcons:"Pfeil Zusammenfluss",otherIcons:"Andere Symbole"},"zui.colorPicker":{errorTip:"Kein gültiger Farbwert"},"zui.datagrid":{errorCannotGetDataFromRemote:"Daten vom Remote-Server ({0}) können nicht abgerufen werden.",errorCannotHandleRemoteData:"Die vom Remote-Server zurückgegebenen Daten können nicht verarbeitet werden."},"zui.guideViewer":{prevStep:"Vorheriger Schritt",nextStep:"Nächster Schritt"},"zui.tabs":{reload:"Neu laden",close:"Schliessen",closeOthers:"Schließen Sie andere Registerkarten",closeRight:"Schließen Sie die rechte Registerkarte",reopenLast:"Letzten geschlossenen Tab wiederherstellen",errorCannotFetchFromRemote:"Inhalt kann nicht vom Remote-Server abgerufen werden ({0})."},"zui.uploader":{},datetimepicker:{days:["Sonntag","Montag","Diensteg","Mittwoch","Donnerstag","Freitag","Samstag"],daysShort:["Son","Mon","Die","Mit","Don","Fri","Sam"],daysMin:["Son","Mon","Die","Mit","Don","Fri","Sam"],months:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",suffix:[],meridiem:[]},chosen:{no_results_text:"Nicht gefunden"},bootbox:{OK:"OK",CANCEL:"Stornieren",CONFIRM:"Bestätigen"}}),$.zui.lang("fr",{"zui.pager":{pageOfText:"Page {0}",prev:"Prev",next:"Suivant",first:"First",last:"Last","goto":"Goto",pageOf:"Page {page}",totalPage:"{totalPage} pages",totalCount:"Total: {recTotal} items",pageSize:"{recPerPage} per page",itemsRange:"De {start} à {end}",pageOfTotal:"Page {page} de {totalPage}"},"zui.boards":{append2end:"Aller jusqu'au bout"},"zui.browser":{tip:"Naviguez sans crainte sur Internet. Mettez votre navigateur à jour dès aujourd'hui!"},"zui.calendar":{weekNames:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],monthNames:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",year:"{0} Année",month:"{0} Mois",yearMonth:"{0}-{1}"},"zui.chosenIcons":{emptyIcon:"[Aucune icône]",commonIcons:"Icônes communes",webIcons:"Icône Web",editorIcons:"Icône de l'éditeur",directionalIcons:"Flèche confluence",otherIcons:"Autres icônes"},"zui.colorPicker":{errorTip:"Pas une valeur de couleur valide"},"zui.datagrid":{errorCannotGetDataFromRemote:"Impossible d'obtenir les données du serveur distant ({0}).",errorCannotHandleRemoteData:"Impossible de traiter les données renvoyées par le serveur distant."},"zui.guideViewer":{prevStep:"Étape précédente",nextStep:"Prochaine étape"},"zui.tabs":{reload:"Recharger",close:"Fermer",closeOthers:"Fermez les autres onglets",closeRight:"Fermer l'onglet de droite",reopenLast:"Restaurer le dernier onglet fermé",errorCannotFetchFromRemote:"Impossible d'obtenir le contenu du serveur distant ({0})."},"zui.uploader":{},datetimepicker:{days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],daysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],daysMin:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],months:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],monthsShort:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",suffix:[],meridiem:[]},chosen:{no_results_text:"Pas trouvé"},bootbox:{OK:"D'accord",CANCEL:"Annuler",CONFIRM:"Confirmer"}}); \ No newline at end of file diff --git a/xuanxuan/extension/xuan/common/ext/lang/en/xuanxuan.php b/xuanxuan/extension/xuan/common/ext/lang/en/xuanxuan.php index a414c4f60c..0a37d4f9e3 100644 --- a/xuanxuan/extension/xuan/common/ext/lang/en/xuanxuan.php +++ b/xuanxuan/extension/xuan/common/ext/lang/en/xuanxuan.php @@ -12,6 +12,15 @@ $lang->admin->menu->xuanxuan['menuOrder'][0] = 'index'; $lang->admin->menu->xuanxuan['menuOrder'][5] = 'setting'; $lang->admin->menu->xuanxuan['menuOrder'][10] = 'update'; +global $config; +if($config->edition != 'open') +{ + $lang->admin->menu->xuanxuan['subModule'] = 'client,setting,conference'; + $lang->admin->menu->xuanxuan['subMenu']->conference = array('link' => 'Conference|conference|admin'); + $lang->admin->menu->xuanxuan['menuOrder'][7] = 'conference'; + $lang->navGroup->conference = 'admin'; +} + $lang->navGroup->im = 'admin'; $lang->navGroup->setting = 'admin'; $lang->navGroup->client = 'admin'; diff --git a/xuanxuan/extension/xuan/common/ext/lang/zh-cn/xuanxuan.php b/xuanxuan/extension/xuan/common/ext/lang/zh-cn/xuanxuan.php index b6303f7842..f6582077ba 100644 --- a/xuanxuan/extension/xuan/common/ext/lang/zh-cn/xuanxuan.php +++ b/xuanxuan/extension/xuan/common/ext/lang/zh-cn/xuanxuan.php @@ -12,6 +12,15 @@ $lang->admin->menu->xuanxuan['menuOrder'][0] = 'index'; $lang->admin->menu->xuanxuan['menuOrder'][5] = 'setting'; $lang->admin->menu->xuanxuan['menuOrder'][10] = 'update'; +global $config; +if($config->edition != 'open') +{ + $lang->admin->menu->xuanxuan['subModule'] = 'client,setting,conference'; + $lang->admin->menu->xuanxuan['subMenu']->conference = array('link' => '音视频|conference|admin'); + $lang->admin->menu->xuanxuan['menuOrder'][7] = 'conference'; + $lang->navGroup->conference = 'admin'; +} + $lang->navGroup->im = 'admin'; $lang->navGroup->setting = 'admin'; $lang->navGroup->client = 'admin'; diff --git a/xuanxuan/extension/xuan/common/ext/model/hook/loadConfigFromDB.xuanxuan.php b/xuanxuan/extension/xuan/common/ext/model/hook/loadConfigFromDB.xuanxuan.php index 82e7770031..6e49cb585d 100644 --- a/xuanxuan/extension/xuan/common/ext/model/hook/loadConfigFromDB.xuanxuan.php +++ b/xuanxuan/extension/xuan/common/ext/model/hook/loadConfigFromDB.xuanxuan.php @@ -5,7 +5,7 @@ $xxConfig = array(); foreach($xxItems as $xxItem) $xxConfig[$xxItem->key] = $xxItem->value; if(empty($xxConfig['key'])) { - $this->setting->setItem('system.common.xuanxuan.turnon', 1); + $this->setting->setItem('system.common.xuanxuan.turnon', 0); $this->setting->setItem('system.common.xuanxuan.key', $this->setting->computeSN()); } if(!isset($xxConfig['chatPort'])) $this->setting->setItem('system.common.xuanxuan.chatPort', 11444); diff --git a/xuanxuan/extension/xuan/dev/ext/lang/en/xuanxuan.php b/xuanxuan/extension/xuan/dev/ext/lang/en/xuanxuan.php index ce23a46f0f..f3eb7122d7 100644 --- a/xuanxuan/extension/xuan/dev/ext/lang/en/xuanxuan.php +++ b/xuanxuan/extension/xuan/dev/ext/lang/en/xuanxuan.php @@ -1,11 +1,11 @@ dev->groupList['xuanxuan']= 'Client'; +$lang->dev->groupList['xuanxuan']= 'Chat'; -$lang->dev->tableList['im_chatuser'] = 'Client Users'; -$lang->dev->tableList['im_message'] = 'Client Message'; -$lang->dev->tableList['im_messagestatus'] = 'Client Message Status'; -$lang->dev->tableList['im_chat'] = 'Client Chat'; -$lang->dev->tableList['im_client'] = 'Client Upgrade'; -$lang->dev->tableList['im_conference'] = 'Client Conference'; -$lang->dev->tableList['im_conferenceaction'] = 'Client Conference Action'; -$lang->dev->tableList['im_queue'] = 'Client Queue'; +$lang->dev->tableList['im_chatuser'] = 'Chat Users'; +$lang->dev->tableList['im_message'] = 'Chat Message'; +$lang->dev->tableList['im_messagestatus'] = 'Chat Message Status'; +$lang->dev->tableList['im_chat'] = 'Chats'; +$lang->dev->tableList['im_client'] = 'Chat Client Upgrade'; +$lang->dev->tableList['im_conference'] = 'Chat Conference'; +$lang->dev->tableList['im_conferenceaction'] = 'Chat Conference Action'; +$lang->dev->tableList['im_queue'] = 'Chat Push Queue'; diff --git a/xuanxuan/extension/xuan/dev/ext/lang/zh-cn/xuanxuan.php b/xuanxuan/extension/xuan/dev/ext/lang/zh-cn/xuanxuan.php index c76a34ec36..f7fee3ef79 100644 --- a/xuanxuan/extension/xuan/dev/ext/lang/zh-cn/xuanxuan.php +++ b/xuanxuan/extension/xuan/dev/ext/lang/zh-cn/xuanxuan.php @@ -1,11 +1,11 @@ dev->groupList['xuanxuan']= '客户端'; +$lang->dev->groupList['xuanxuan']= '聊天'; -$lang->dev->tableList['im_chatuser'] = '客户端用户'; -$lang->dev->tableList['im_message'] = '客户端消息'; -$lang->dev->tableList['im_messagestatus'] = '客户端状态'; -$lang->dev->tableList['im_chat'] = '客户端会话'; -$lang->dev->tableList['im_client'] = '客户端版本更新'; +$lang->dev->tableList['im_chatuser'] = '聊天用户'; +$lang->dev->tableList['im_message'] = '聊天消息'; +$lang->dev->tableList['im_messagestatus'] = '聊天状态'; +$lang->dev->tableList['im_chat'] = '聊天会话'; +$lang->dev->tableList['im_client'] = '聊天版本更新'; $lang->dev->tableList['im_conference'] = '音视频会议'; -$lang->dev->tableList['im_conferenceaction'] = '会议action'; -$lang->dev->tableList['im_queue'] = '客户端推送'; +$lang->dev->tableList['im_conferenceaction'] = '会议动作'; +$lang->dev->tableList['im_queue'] = '聊天推送'; diff --git a/xuanxuan/extension/xuan/im/ext/lang/en/xuanxuan.php b/xuanxuan/extension/xuan/im/ext/lang/en/xuanxuan.php index e1328f898d..a6b95567f9 100644 --- a/xuanxuan/extension/xuan/im/ext/lang/en/xuanxuan.php +++ b/xuanxuan/extension/xuan/im/ext/lang/en/xuanxuan.php @@ -1,12 +1,12 @@ im->common = 'Desktop'; +$lang->im->common = 'Chat'; $lang->im->turnon = 'On'; $lang->im->help = 'Help'; $lang->im->settings = 'Settings'; $lang->im->xxdServer = 'ZenTao Server'; $lang->im->downloadXXD = 'Download XXD'; $lang->im->zentaoIntegrate = 'ZenTao Integrated'; -$lang->im->zentaoClient = 'ZenTao Desktop is added!'; +$lang->im->zentaoClient = 'ZenTao Desktop Client is added!'; $lang->im->getChatUsers = 'Get Chat Users'; $lang->im->getChatGroups = 'Get Chat Groups'; $lang->im->notifyMSG = 'Notification'; @@ -25,7 +25,6 @@ $lang->im->turnonList = array(); $lang->im->turnonList[1] = 'Enable'; $lang->im->turnonList[0] = 'Disable'; -$lang->im->info = "ZenTao Desktop is powered by Xuanxuan, a secure and open source Instant Messenger by Nature Easy Soft. It is a self-hosted and cross-platform tool with numerous plug-ins and robust features. In Xuanxuan, you can code your own plug-ins. Click HERE for more."; $lang->im->xxClientConfirm = 'Click Download ZenTao Desktop at the right bottom to download it!'; $lang->im->xxServerConfirm = 'Go to User dropmenu to download the ZenTao Desktop Server!'; diff --git a/xuanxuan/extension/xuan/im/ext/lang/zh-cn/xuanxuan.php b/xuanxuan/extension/xuan/im/ext/lang/zh-cn/xuanxuan.php index 3197a8210e..b821b40e23 100644 --- a/xuanxuan/extension/xuan/im/ext/lang/zh-cn/xuanxuan.php +++ b/xuanxuan/extension/xuan/im/ext/lang/zh-cn/xuanxuan.php @@ -1,10 +1,10 @@ im->common = '客户端'; +$lang->im->common = '聊天'; $lang->im->turnon = '是否打开'; $lang->im->help = '使用说明'; $lang->im->settings = '服务器设置'; $lang->im->xxdServer = '禅道服务器'; -$lang->im->downloadXXD = '下载喧喧服务端'; +$lang->im->downloadXXD = '下载聊天服务端'; $lang->im->zentaoIntegrate = '禅道集成'; $lang->im->zentaoClient = '新增禅道客户端!'; $lang->im->getChatUsers = '获取用户'; @@ -25,7 +25,6 @@ $lang->im->turnonList = array(); $lang->im->turnonList[1] = '是'; $lang->im->turnonList[0] = '否'; -$lang->im->info = "禅道客户端由易软天创旗下另外一款免费、开源、安全的IM产品喧喧驱动,支持私有部署,跨平台操作,内置大量插件,功能丰富,在喧喧里,您甚至还可以为自己编写个性化的插件,点击查看。"; $lang->im->xxClientConfirm = '与禅道深度集成,支持成员沟通,小组讨论,文件传输,任务指派,更加方便的项目管理,更加流畅的团队协作!点击界面右上角用户下拉菜单中下载禅道客户端。'; $lang->im->xxServerConfirm = '与禅道深度集成,支持成员沟通,小组讨论,文件传输,任务指派,更加方便的项目管理,更加流畅的团队协作!进入后台-客户端进行下载配置。'; diff --git a/xuanxuan/extension/xuan/index/ext/view/index.xuanxuan.html.hook.php b/xuanxuan/extension/xuan/index/ext/view/index.xuanxuan.html.hook.php index a10a4022be..9fdc05f312 100644 --- a/xuanxuan/extension/xuan/index/ext/view/index.xuanxuan.html.hook.php +++ b/xuanxuan/extension/xuan/index/ext/view/index.xuanxuan.html.hook.php @@ -33,8 +33,8 @@ $(document).on('hideapp', function(e, app) loadModel('im'); - -if(isset($this->config->xuanxuan->turnon) && $this->config->xuanxuan->turnon) +$xxdStatus = $this->im->getXxdStatus(); +if(isset($this->config->xuanxuan->turnon) && $this->config->xuanxuan->turnon && $xxdStatus == 'online') { $xuanConfig = new stdclass(); $token = $this->im->userGetAuthToken($this->app->user->id, 'zentaoweb'); @@ -42,7 +42,7 @@ if(isset($this->config->xuanxuan->turnon) && $this->config->xuanxuan->turnon) $backendUrl = $this->im->getServer('zentao'); $xuanConfig->clientUrl = $clientUrl; - $xuanConfig->server = parse_url($backendUrl, PHP_URL_HOST); + $xuanConfig->server = ($this->config->xuanxuan->https == 'on' ? 'https' : 'http') . '://' . parse_url($backendUrl, PHP_URL_HOST) . ':' . $this->config->xuanxuan->commonPort; $xuanConfig->account = $this->app->user->account; $xuanConfig->authKey = $token->token; $xuanConfig->debug = $this->config->debug; diff --git a/xuanxuan/extension/xuan/message/ext/lang/en/xuanxuan.php b/xuanxuan/extension/xuan/message/ext/lang/en/xuanxuan.php index 102a12133a..7fbcf17e93 100644 --- a/xuanxuan/extension/xuan/message/ext/lang/en/xuanxuan.php +++ b/xuanxuan/extension/xuan/message/ext/lang/en/xuanxuan.php @@ -1,5 +1,5 @@ message->typeList['xuanxuan'] = 'Client'; +$lang->message->typeList['xuanxuan'] = 'Chat'; $lang->message->sender = 'ZenTao'; diff --git a/xuanxuan/extension/xuan/message/ext/lang/zh-cn/xuanxuan.php b/xuanxuan/extension/xuan/message/ext/lang/zh-cn/xuanxuan.php index b394f3801c..6666cd2421 100644 --- a/xuanxuan/extension/xuan/message/ext/lang/zh-cn/xuanxuan.php +++ b/xuanxuan/extension/xuan/message/ext/lang/zh-cn/xuanxuan.php @@ -1,5 +1,5 @@ message->typeList['xuanxuan'] = '客户端'; +$lang->message->typeList['xuanxuan'] = '聊天'; $lang->message->sender = '禅道项目管理'; diff --git a/xuanxuan/extension/xuan/setting/ext/lang/en/xuanxuan.php b/xuanxuan/extension/xuan/setting/ext/lang/en/xuanxuan.php index b70f36c6c9..4e4aded2e4 100644 --- a/xuanxuan/extension/xuan/setting/ext/lang/en/xuanxuan.php +++ b/xuanxuan/extension/xuan/setting/ext/lang/en/xuanxuan.php @@ -1,8 +1,7 @@ setting->common = 'Settings'; -$lang->setting->xuanxuan = 'Client'; +$lang->setting->xuanxuan = 'Chat'; $lang->setting->downloadXXD = 'Download XXD'; $lang->setting->langs['zh-cn'] = 'Simplified Chinese'; $lang->setting->langs['zh-tw'] = 'Traditional Chinese'; $lang->setting->langs['en'] = 'English'; - diff --git a/xuanxuan/extension/xuan/setting/ext/lang/zh-cn/xuanxuan.php b/xuanxuan/extension/xuan/setting/ext/lang/zh-cn/xuanxuan.php index de73c4ff45..4bec3c60f2 100644 --- a/xuanxuan/extension/xuan/setting/ext/lang/zh-cn/xuanxuan.php +++ b/xuanxuan/extension/xuan/setting/ext/lang/zh-cn/xuanxuan.php @@ -1,7 +1,7 @@ setting->common = '设置'; -$lang->setting->xuanxuan = '客户端集成'; -$lang->setting->downloadXXD = '下载喧喧服务端'; +$lang->setting->xuanxuan = '聊天集成'; +$lang->setting->downloadXXD = '下载聊天服务端'; $lang->setting->langs['zh-cn'] = '简体'; $lang->setting->langs['zh-tw'] = '繁體'; $lang->setting->langs['en'] = 'English'; diff --git a/xuanxuan/extension/xuan/setting/ext/view/xuanxuan.html.php b/xuanxuan/extension/xuan/setting/ext/view/xuanxuan.html.php index 2ddc26353a..b612a25dfc 100644 --- a/xuanxuan/extension/xuan/setting/ext/view/xuanxuan.html.php +++ b/xuanxuan/extension/xuan/setting/ext/view/xuanxuan.html.php @@ -146,9 +146,6 @@ - -
    im->info;?>
    -
    getModuleRoot() . 'common/view/footer.html.php';?>