diff --git a/module/backup/js/index.js b/module/backup/js/index.js index d01da68c2e..4fc17c37f2 100644 --- a/module/backup/js/index.js +++ b/module/backup/js/index.js @@ -8,7 +8,7 @@ $(function() $('.restore').click(function() { - url = $(this).attr('href') + '&confirm=yes'; + url = $(this).attr('href'); bootbox.confirm(confirmRestore, function(result) { if(result) diff --git a/module/backup/view/index.html.php b/module/backup/view/index.html.php index e913832a12..ec6158c16c 100644 --- a/module/backup/view/index.html.php +++ b/module/backup/view/index.html.php @@ -49,7 +49,7 @@ 1) echo "rowspan='$rowspan'"?>> name"), $lang->backup->restore, 'hiddenwin', "class='restore'"); + if(common::hasPriv('backup', 'restore')) echo html::a(inlink('restore', "file={$backupFile->name}&confirm=yes"), $lang->backup->restore, 'hiddenwin', "class='restore'"); if(common::hasPriv('backup', 'delete')) echo html::a(inlink('delete', "file=$backupFile->name"), $lang->delete, 'hiddenwin'); ?> diff --git a/module/block/control.php b/module/block/control.php index 7da592887f..7373da8e12 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -423,7 +423,7 @@ class block extends control $this->session->set('todoList', $uri); $this->session->set('bugList', $uri); $this->session->set('taskList', $uri); - $this->view->todos = $this->loadModel('todo')->getList('all', $this->app->user->account, 'wait, doing', $this->viewType == 'json' ? 0 : $this->params->num); + $this->view->todos = $this->loadModel('todo')->getList('all', $this->app->user->account, 'wait, doing', $this->viewType == 'json' ? 0 : (int)$this->params->num); } /** @@ -436,7 +436,8 @@ class block extends control { $this->session->set('taskList', $this->server->http_referer); $this->session->set('storyList', $this->server->http_referer); - $this->view->tasks = $this->loadModel('task')->getUserTasks($this->app->user->account, $this->params->type, $this->viewType == 'json' ? 0 : $this->params->num, null, $this->params->orderBy); + if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die(); + $this->view->tasks = $this->loadModel('task')->getUserTasks($this->app->user->account, $this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->num, null, $this->params->orderBy); } /** @@ -448,7 +449,8 @@ class block extends control public function printBugBlock() { $this->session->set('bugList', $this->server->http_referer); - $this->view->bugs = $this->loadModel('bug')->getUserBugs($this->app->user->account, $this->params->type, $this->params->orderBy, $this->viewType == 'json' ? 0 : $this->params->num); + if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die(); + $this->view->bugs = $this->loadModel('bug')->getUserBugs($this->app->user->account, $this->params->type, $this->params->orderBy, $this->viewType == 'json' ? 0 : (int)$this->params->num); } /** @@ -475,7 +477,7 @@ class block extends control ->andWhere('t3.deleted')->eq(0) ->andWhere('t2.deleted')->eq(0) ->orderBy($this->params->orderBy) - ->beginIF($this->viewType != 'json')->limit($this->params->num)->fi() + ->beginIF($this->viewType != 'json')->limit((int)$this->params->num)->fi() ->fetchAll(); } elseif($this->params->type == 'openedbyme') @@ -483,7 +485,7 @@ class block extends control $cases = $this->dao->findByOpenedBy($this->app->user->account)->from(TABLE_CASE) ->andWhere('deleted')->eq(0) ->orderBy($this->params->orderBy) - ->beginIF($this->viewType != 'json')->limit($this->params->num)->fi() + ->beginIF($this->viewType != 'json')->limit((int)$this->params->num)->fi() ->fetchAll(); } $this->view->cases = $cases; @@ -498,6 +500,7 @@ class block extends control public function printTesttaskBlock() { $this->session->set('testtaskList', $this->server->http_referer); + if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die(); $this->app->loadLang('testtask'); $products = $this->loadModel('product')->getPairs(); $this->view->testtasks = $this->dao->select('t1.*,t2.name as productName,t3.name as buildName,t4.name as projectName')->from(TABLE_TESTTASK)->alias('t1') @@ -510,7 +513,7 @@ class block extends control ->andWhere('t1.product = t5.product') ->beginIF($this->params->type != 'all')->andWhere('t1.status')->eq($this->params->type)->fi() ->orderBy('t1.id desc') - ->beginIF($this->viewType != 'json')->limit($this->params->num)->fi() + ->beginIF($this->viewType != 'json')->limit((int)$this->params->num)->fi() ->fetchAll(); } @@ -523,8 +526,9 @@ class block extends control public function printStoryBlock() { $this->session->set('storyList', $this->server->http_referer); + if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die(); $this->app->loadClass('pager', $static = true); - $num = isset($this->params->num) ? $this->params->num : 0; + $num = isset($this->params->num) ? (int)$this->params->num : 0; $pager = pager::init(0, $num , 1); $type = isset($this->params->type) ? $this->params->type : 'assignedTo'; $orderBy = isset($this->params->type) ? $this->params->orderBy : 'id_asc'; @@ -547,7 +551,7 @@ class block extends control ->where('t1.deleted')->eq('0') ->andWhere('t1.product')->in(array_keys($products)) ->orderBy('t1.begin desc') - ->beginIF($this->viewType != 'json')->limit($this->params->num)->fi() + ->beginIF($this->viewType != 'json')->limit((int)$this->params->num)->fi() ->fetchAll(); } @@ -568,7 +572,7 @@ class block extends control ->where('t1.deleted')->eq('0') ->andWhere('t1.product')->in(array_keys($products)) ->orderBy('t1.id desc') - ->beginIF($this->viewType != 'json')->limit($this->params->num)->fi() + ->beginIF($this->viewType != 'json')->limit((int)$this->params->num)->fi() ->fetchAll(); } @@ -588,7 +592,7 @@ class block extends control ->where('t1.deleted')->eq('0') ->andWhere('t1.project')->in(array_keys($projects)) ->orderBy('t1.id desc') - ->beginIF($this->viewType != 'json')->limit($this->params->num)->fi() + ->beginIF($this->viewType != 'json')->limit((int)$this->params->num)->fi() ->fetchAll(); } @@ -601,7 +605,8 @@ class block extends control public function printProductBlock() { $this->app->loadClass('pager', $static = true); - $num = isset($this->params->num) ? $this->params->num : 0; + if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die(); + $num = isset($this->params->num) ? (int)$this->params->num : 0; $type = isset($this->params->type) ? $this->params->type : ''; $pager = pager::init(0, $num , 1); $this->view->productStats = $this->loadModel('product')->getStats('order_desc', $this->viewType != 'json' ? $pager : '', $type); @@ -616,7 +621,8 @@ class block extends control public function printProjectBlock() { $this->app->loadClass('pager', $static = true); - $num = isset($this->params->num) ? $this->params->num : 0; + if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die(); + $num = isset($this->params->num) ? (int)$this->params->num : 0; $type = isset($this->params->type) ? $this->params->type : 'all'; $pager = pager::init(0, $num, 1); $this->view->projectStats = $this->loadModel('project')->getProjectStats($type, $productID = 0, $branch = 0, $itemCounts = 30, $orderBy = 'order_desc', $this->viewType != 'json' ? $pager : ''); diff --git a/module/testcase/control.php b/module/testcase/control.php index fc4919dab4..3a113ce3b0 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -601,7 +601,7 @@ class testcase extends control $this->view->moduleOptionMenu = $moduleOptionMenu; $this->view->stories = $this->story->getProductStoryPairs($productID, $case->branch); } - if(!$this->config->testcase->needReview) unset($this->lang->testcase->statusList['wait']); + if(!$this->testcase->forceReview()) unset($this->lang->testcase->statusList['wait']); $position[] = $this->lang->testcase->common; $position[] = $this->lang->testcase->edit; @@ -709,7 +709,7 @@ class testcase extends control } } - if(!$this->config->testcase->needReview) unset($this->lang->testcase->statusList['wait']); + if(!$this->testcase->forceReview()) unset($this->lang->testcase->statusList['wait']); /* Judge whether the editedTasks is too large and set session. */ $countInputVars = count($cases) * (count(explode(',', $this->config->testcase->custom->batchEditFields)) + 3); @@ -1184,7 +1184,6 @@ class testcase extends control { if($_POST) { - if(!$this->config->testcase->needReview) unset($this->lang->testcase->statusList['wait']); $product = $this->loadModel('product')->getById($productID); if($product->type != 'normal') $fields['branch'] = $this->lang->product->branchName[$product->type]; @@ -1195,14 +1194,12 @@ class testcase extends control $fields['keywords'] = $this->lang->testcase->keywords; $fields['type'] = $this->lang->testcase->type; $fields['pri'] = $this->lang->testcase->pri; - $fields['status'] = $this->lang->testcase->status; $fields['stage'] = $this->lang->testcase->stage; $fields['precondition'] = $this->lang->testcase->precondition; $fields[''] = ''; $fields['typeValue'] = $this->lang->testcase->lblTypeValue; $fields['stageValue'] = $this->lang->testcase->lblStageValue; - $fields['statusValue'] = $this->lang->testcase->lblStatusValue; if($product->type != 'normal') $fields['branchValue'] = $this->lang->product->branchName[$product->type]; $branches = $this->loadModel('branch')->getPairs($productID); @@ -1221,7 +1218,6 @@ class testcase extends control { $row->typeValue = join("\n", $this->lang->testcase->typeList); $row->stageValue = join("\n", $this->lang->testcase->stageList); - $row->statusValue = join("\n", $this->lang->testcase->statusList); if($product->type != 'normal') $row->branchValue = join("\n", $branches); } $rows[] = $row; @@ -1499,7 +1495,6 @@ class testcase extends control echo js::alert($this->lang->error->noData); die(js::locate($this->createLink('testcase', 'browse', "productID=$productID&branch=$branch"))); } - if(!$this->config->testcase->needReview) unset($this->lang->testcase->statusList['wait']); /* Judge whether the editedTasks is too large and set session. */ $countInputVars = count($caseData) * 12 + $stepVars; diff --git a/module/testcase/model.php b/module/testcase/model.php index 8b217fd08a..16178d9537 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -980,7 +980,6 @@ class testcaseModel extends model $caseData->title = $data->title[$key]; $caseData->pri = (int)$data->pri[$key]; $caseData->type = $data->type[$key]; - $caseData->status = $data->status[$key]; $caseData->stage = join(',', $data->stage[$key]); $caseData->keywords = $data->keywords[$key]; $caseData->frequency = 1; @@ -1002,9 +1001,15 @@ class testcaseModel extends model $forceReview = $this->forceReview(); foreach($cases as $key => $caseData) { + $caseID = 0; if(!empty($_POST['id'][$key]) and empty($_POST['insert'])) { - $caseID = $data->id[$key]; + $caseID = $data->id[$key]; + if(!isset($oldCases[$caseID])) $caseID = 0; + } + + if($caseID) + { $stepChanged = false; $steps = array(); $oldStep = isset($oldSteps[$caseID]) ? $oldSteps[$caseID] : array(); @@ -1090,7 +1095,7 @@ class testcaseModel extends model $caseData->openedDate = $now; $caseData->branch = isset($data->branch[$key]) ? $data->branch[$key] : $branch; if($caseData->story) $caseData->storyVersion = zget($storyVersionPairs, $caseData->story, 1); - if($forceReview) $caseData->status = 'wait'; + $caseData->status = $forceReview ? 'wait' : 'normal'; $this->dao->insert(TABLE_CASE)->data($caseData)->autoCheck()->exec(); if(!dao::isError()) @@ -1309,7 +1314,7 @@ class testcaseModel extends model case 'actions': common::printIcon('testtask', 'runCase', "runID=0&caseID=$case->id&version=$case->version", '', 'list', 'play', '', 'runCase iframe', false, "data-width='95%'"); common::printIcon('testtask', 'results', "runID=0&caseID=$case->id", '', 'list', '', '', 'results iframe', '', "data-width='90%'"); - if($config->testcase->needReview) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'list', 'review', '', 'iframe'); + if($config->testcase->needReview or !empty($config->testcase->forceReview)) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'list', 'review', '', 'iframe'); common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list'); common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase¶m=$case->id", $case, 'list', 'copy'); diff --git a/module/testcase/view/browse.html.php b/module/testcase/view/browse.html.php index aa0b334162..b924363056 100644 --- a/module/testcase/view/browse.html.php +++ b/module/testcase/view/browse.html.php @@ -67,7 +67,7 @@ js::set('batchDelete', $lang->testcase->confirmBatchDelete); $misc = common::hasPriv('testcase', 'batchDelete') ? "onclick=\"confirmBatchDelete('$actionLink')\"" : $class; echo "
  • " . html::a('#', $lang->delete, '', $misc) . "
  • "; - if(common::hasPriv('testcase', 'batchReview') and $config->testcase->needReview) + if(common::hasPriv('testcase', 'batchReview') and ($config->testcase->needReview or !empty($config->testcase->forceReview))) { echo "'; } - elseif($config->testcase->needReview) + elseif($config->testcase->needReview or !empty($config->testcase->forceReview)) { echo '
  • ' . html::a('javascript:;', $lang->testcase->review, '', $class) . '
  • '; } diff --git a/module/testcase/view/browsedata.html.php b/module/testcase/view/browsedata.html.php index 60b33fa40f..30c6d5733e 100644 --- a/module/testcase/view/browsedata.html.php +++ b/module/testcase/view/browsedata.html.php @@ -30,7 +30,7 @@ testcase->bugsAB;?> testcase->resultsAB;?> testcase->stepNumberAB;?> - {sorter:false}'>actions;?> + {sorter:false}'>actions;?> @@ -79,7 +79,7 @@ id&version=$case->version", '', 'list', 'play', '', 'runCase iframe', false, "data-width='95%'"); common::printIcon('testtask', 'results', "runID=0&caseID=$case->id", '', 'list', 'list-alt', '', 'results iframe', false, "data-width='95%'"); - if($config->testcase->needReview) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'list', 'review', '', 'iframe'); + if($config->testcase->needReview or !empty($config->testcase->forceReview)) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'list', 'review', '', 'iframe'); common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list'); common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase¶m=$case->id", $case, 'list', 'copy'); diff --git a/module/testcase/view/caseheader.html.php b/module/testcase/view/caseheader.html.php index aecada0390..d46f742a64 100644 --- a/module/testcase/view/caseheader.html.php +++ b/module/testcase/view/caseheader.html.php @@ -89,7 +89,7 @@ hidden)) continue; $menuType = $menuItem->name; - if(!$config->testcase->needReview and $menuType == 'wait') continue; + if(!$config->testcase->needReview and empty($config->testcase->forceReview) and $menuType == 'wait') continue; if($this->config->global->flow == 'onlyTest' and (strpos(',needconfirm,group,zerocase,', ',' . $menuType . ',') !== false)) continue; if($hasBrowsePriv and strpos($menuType, 'QUERY') === 0) { diff --git a/module/testcase/view/import.html.php b/module/testcase/view/import.html.php index 00c7543f75..5f8a96a6d4 100644 --- a/module/testcase/view/import.html.php +++ b/module/testcase/view/import.html.php @@ -1,9 +1,9 @@
    -
    + - + + + + + +
    + diff --git a/module/testcase/view/showimport.html.php b/module/testcase/view/showimport.html.php index 9d0bbef51a..a0822c1332 100644 --- a/module/testcase/view/showimport.html.php +++ b/module/testcase/view/showimport.html.php @@ -6,99 +6,97 @@
    - - - - - - - - - - - - - - - - - - - - - - $case):?> - title)) continue;?> - - - - - - - - - - - - - - - - - - - - - - - -
    testcase->id?>testcase->title?>testcase->branch?>testcase->module?>testcase->story?>testcase->pri?>testcase->type?>testcase->status?>testcase->stage?>testcase->keywords?>testcase->precondition?> - - - - - -
    testcase->stepDesc?>testcase->stepExpect?>
    -
    - id)) - { - echo $case->id . html::hidden("id[$key]", $case->id); - $insert = false; - } - else - { - echo $key . " {$lang->testcase->new}"; - } - echo html::hidden("product[$key]", $productID); - ?> - title, "class='form-control' style='margin-top:2px' autocomplete='off'")?>branch) and $case->branch !== '') ? $case->branch : (!empty($case->id) ? $cases[$case->id]->branch : $branch), "class='form-control chosen'")?>module) ? $case->module : (!empty($case->id) ? $cases[$case->id]->module : ''), "class='form-control chosen'")?>story) ? $case->story : (!empty($case->id) ? $cases[$case->id]->story : ''), "class='form-control chosen'")?>testcase->priList, isset($case->pri) ? $case->pri : (!empty($case->id) ? $cases[$case->id]->pri : ''), "class='form-control'")?>testcase->typeList, isset($case->type) ? $case->type : (!empty($case->id) ? $cases[$case->id]->type : ''), "class='form-control'")?>testcase->statusList, isset($case->status) ? $case->status : (!empty($case->id) ? $cases[$case->id]->status : 'normal'), "class='form-control'")?>testcase->stageList, !empty($case->stage) ? $case->stage : (!empty($case->id) ? $cases[$case->id]->stage : ''), "multiple='multiple' class='form-control chosen'")?>keywords) ? $case->keywords : "", "class='form-control' autocomplete='off'")?>precondition) ? htmlspecialchars($case->precondition) : "", "class='form-control'")?> - - - $desc):?> - - - - - - +
    + + + + + + + + + + + + + + + + + + + + $case):?> + title)) continue;?> + + + + + + + + + + + + + + + -
    testcase->id?>testcase->title?>testcase->branch?>testcase->module?>testcase->story?>testcase->pri?>testcase->type?>testcase->stage?>testcase->keywords?>testcase->precondition?> + + + + + +
    testcase->stepDesc?>testcase->stepExpect?>
    +
    + id)) + { + echo $case->id . html::hidden("id[$key]", $case->id); + $insert = false; + } + else + { + echo $key . " {$lang->testcase->new}"; + } + echo html::hidden("product[$key]", $productID); + ?> + title, ENT_QUOTES), "class='form-control'")?>branch) and $case->branch !== '') ? $case->branch : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->branch : $branch), "class='form-control chosen'")?>module) ? $case->module : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->module : ''), "class='form-control chosen'")?>story) ? $case->story : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->story : ''), "class='form-control chosen'")?>testcase->priList, isset($case->pri) ? $case->pri : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->pri : ''), "class='form-control'")?>testcase->typeList, $case->type, "class='form-control'")?>testcase->stageList, !empty($case->stage) ? $case->stage : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->stage : ''), "multiple='multiple' class='form-control chosen'")?>keywords) ? $case->keywords : "", "class='form-control' autocomplete='off'")?>precondition) ? htmlspecialchars($case->precondition) : "", "class='form-control'")?> + + + $desc):?> + + + + + + + +
    + +
    - -
    - {$lang->save}"; - } - else - { - echo html::submitButton(); - } - echo '   ' . html::backButton() - ?> -
    +
    + {$lang->save}"; + } + else + { + echo html::submitButton(); + } + echo '   ' . html::backButton() + ?> +
    diff --git a/www/js/zui/min.js b/www/js/zui/min.js index 27103961f6..844bd8ce80 100644 --- a/www/js/zui/min.js +++ b/www/js/zui/min.js @@ -1,5 +1,5 @@ /*! - * ZUI: zui for zentao - v1.6.0 - 2017-05-10 + * ZUI: zui for zentao - v1.6.0 - 2017-05-11 * http://zui.sexy * GitHub: https://github.com/easysoft/zui.git * Copyright (c) 2017 cnezsoft.com; Licensed MIT @@ -12,11 +12,11 @@ * MIT & GPL http://benalman.com/about/license/ */ function(t,e,a){"$:nomunge";function i(){o=e[r](function(){n.each(function(){var e=t(this),a=e.width(),i=e.height(),o=t.data(this,d);a===o.w&&i===o.h||e.trigger(l,[o.w=a,o.h=i])}),i()},s[c])}var o,n=t([]),s=t.resize=t.extend(t.resize,{}),r="setTimeout",l="resize",d=l+"-special-event",c="delay",p="throttleWindow";s[c]=250,s[p]=!0,t.event.special[l]={setup:function(){if(!s[p]&&this[r])return!1;var e=t(this);n=n.add(e),t.data(this,d,{w:e.width(),h:e.height()}),1===n.length&&i()},teardown:function(){if(!s[p]&&this[r])return!1;var e=t(this);n=n.not(e),e.removeData(d),n.length||clearTimeout(o)},add:function(e){function i(e,i,n){var s=t(this),r=t.data(this,d)||{};r.w=i!==a?i:s.width(),r.h=n!==a?n:s.height(),o.apply(this,arguments)}if(!s[p]&&this[r])return!1;var o;return t.isFunction(e)?(o=e,i):(o=e.handler,void(e.handler=i))}}}(jQuery,this),function(){"use strict";Date.ONEDAY_TICKS=864e5,Date.prototype.format||(Date.prototype.format=function(t){var e={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),"S+":this.getMilliseconds()};/(y+)/i.test(t)&&(t=t.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(var a in e)new RegExp("("+a+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[a]:("00"+e[a]).substr((""+e[a]).length)));return t}),Date.prototype.addMilliseconds||(Date.prototype.addMilliseconds=function(t){return this.setTime(this.getTime()+t),this}),Date.prototype.addDays||(Date.prototype.addDays=function(t){return this.addMilliseconds(t*Date.ONEDAY_TICKS),this}),Date.prototype.clone||(Date.prototype.clone=function(){var t=new Date;return t.setTime(this.getTime()),t}),Date.isLeapYear||(Date.isLeapYear=function(t){return t%4===0&&t%100!==0||t%400===0}),Date.getDaysInMonth||(Date.getDaysInMonth=function(t,e){return[31,Date.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]}),Date.prototype.isLeapYear||(Date.prototype.isLeapYear=function(){return Date.isLeapYear(this.getFullYear())}),Date.prototype.clearTime||(Date.prototype.clearTime=function(){return this.setHours(0),this.setMinutes(0),this.setSeconds(0),this.setMilliseconds(0),this}),Date.prototype.getDaysInMonth||(Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth())}),Date.prototype.addMonths||(Date.prototype.addMonths=function(t){var e=this.getDate();return this.setDate(1),this.setMonth(this.getMonth()+t),this.setDate(Math.min(e,this.getDaysInMonth())),this}),Date.prototype.getLastWeekday||(Date.prototype.getLastWeekday=function(t){t=t||1;for(var e=this.clone();e.getDay()!=t;)e.addDays(-1);return e.clearTime(),e}),Date.prototype.isSameDay||(Date.prototype.isSameDay=function(t){return t.toDateString()===this.toDateString()}),Date.prototype.isSameWeek||(Date.prototype.isSameWeek=function(t){var e=this.getLastWeekday(),a=e.clone().addDays(7);return t>=e&&t=0;t--)delete this.page[a[t]];this.set(n,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 a=this.page[t];return void 0===e||null!==a&&void 0!==a?a:e},s.prototype.pageSet=function(t,a){e.isPlainObject(t)?e.extend(!0,this.page,t):this.page[this.serialize(t)]=a,this.pageSave()},s.prototype.check=function(){if(!this.enable&&!this.slience)throw new Error("Browser not support localStorage or enable status been set true.");return this.enable},s.prototype.length=function(){return this.check()?a.getLength?a.getLength():a.length:0},s.prototype.removeItem=function(t){return a.removeItem(t),this},s.prototype.remove=function(t){return this.removeItem(t)},s.prototype.getItem=function(t){return a.getItem(t)},s.prototype.get=function(t,e){var a=this.deserialize(this.getItem(t));return"undefined"!=typeof a&&null!==a||"undefined"==typeof e?a:e},s.prototype.key=function(t){return a.key(t)},s.prototype.setItem=function(t,e){return a.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 a.clear(),this},s.prototype.forEach=function(t){for(var e=this.length(),i=e-1;i>=0;i--){var o=a.key(i);t(o,this.get(o))}return this},s.prototype.getAll=function(){var t={};return this.forEach(function(e,a){t[e]=a}),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,e,a,i){"use strict";function o(t){if(t=t.toLowerCase(),t&&c.test(t)){var e;if(4===t.length){var a="#";for(e=1;e<4;e+=1)a+=t.slice(e,e+1).concat(t.slice(e,e+1));t=a}var i=[];for(e=1;e<7;e+=2)i.push(y("0x"+t.slice(e,e+2)));return{r:i[0],g:i[1],b:i[2],a:1}}throw new Error("Wrong hex string! (hex: "+t+")")}function n(e){return typeof e===u&&("transparent"===e.toLowerCase()||v[e.toLowerCase()]||c.test(t.trim(e.toLowerCase())))}function s(t){function e(t){return t=t<0?t+1:t>1?t-1:t,6*t<1?r+(s-r)*t*6:2*t<1?s:3*t<2?r+(s-r)*(2/3-t)*6:r}var a=t.h,i=t.s,o=t.l,n=t.a;a=d(a)%h/h,i=l(d(i)),o=l(d(o)),n=l(d(n));var s=o<=.5?o*(i+1):o+i-o*i,r=2*o-s,c={r:e(a+1/3)*p,g:e(a)*p,b:e(a-1/3)*p,a:n};return c}function r(t,a,i){return m(i)&&(i=0),m(a)&&(a=p),e.min(e.max(t,i),a)}function l(t,e){return r(t,e)}function d(t){return"number"==typeof t?t:parseFloat(t)}var c=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/,p=255,h=360,f=100,u="string",g="object",v={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},m=function(t){return t===i},b=function(t){return!m(t)},y=function(t){return parseInt(t)},w=function(t){return y(l(d(t),p))},C=function(t,e,a,i){var n=this;if(n.r=n.g=n.b=0,n.a=1,b(i)&&(n.a=l(d(i),1)),b(t)&&b(e)&&b(a))n.r=w(t),n.g=w(e),n.b=w(a);else if(b(t)){var r=typeof t;if(r==u)t=t.toLowerCase(),"transparent"===t?n.a=0:v[t]?this.rgb(o(v[t])):n.rgb(o(t));else if("number"==r&&m(e))n.r=n.g=n.b=w(t);else if(r==g&&b(t.r))n.r=w(t.r),b(t.g)&&(n.g=w(t.g)),b(t.b)&&(n.b=w(t.b)),b(t.a)&&(n.a=l(d(t.a),1));else if(r==g&&b(t.h)){var c={h:l(d(t.h),h),s:1,l:1,a:1};b(t.s)&&(c.s=l(d(t.s),1)),b(t.l)&&(c.l=l(d(t.l),1)),b(t.a)&&(c.a=l(d(t.a),1)),n.rgb(s(c))}}};C.prototype.rgb=function(t){var e=this;if(b(t)){if(typeof t==g)b(t.r)&&(e.r=w(t.r)),b(t.g)&&(e.g=w(t.g)),b(t.b)&&(e.b=w(t.b)),b(t.a)&&(e.a=l(d(t.a),1));else{var a=y(d(t));e.r=a,e.g=a,e.b=a}return e}return{r:e.r,g:e.g,b:e.b,a:e.a}},C.prototype.hue=function(t){var e=this,a=e.toHsl();return m(t)?a.h:(a.h=l(d(t),h),e.rgb(s(a)),e)},C.prototype.darken=function(t){var e=this,a=e.toHsl();return a.l-=t/f,a.l=l(a.l,1),e.rgb(s(a)),e},C.prototype.clone=function(){var t=this;return new C(t.r,t.g,t.b,t.a)},C.prototype.lighten=function(t){return this.darken(-t)},C.prototype.fade=function(t){return this.a=l(t/f,1),this},C.prototype.spin=function(t){var e=this.toHsl(),a=(e.h+t)%h;return e.h=a<0?h+a:a,this.rgb(s(e))},C.prototype.toHsl=function(){var t,a,i=this,o=i.r/p,n=i.g/p,s=i.b/p,r=i.a,l=e.max(o,n,s),d=e.min(o,n,s),c=(l+d)/2,f=l-d;if(l===d)t=a=0;else{switch(a=c>.5?f/(2-l-d):f/(l+d),l){case o:t=(n-s)/f+(ne.luma()){var i=e;e=t,t=i}return this.a<.5?t:(a=m(a)?.43:d(a),this.luma()0?t.a<1?"rgba("+t.r+","+t.g+","+t.b+","+t.a+")":t.hexStr():"transparent"},C.isColor=n,C.names=v,C.get=function(t){return new C(t)},t.zui({Color:C})}(jQuery,Math,window,void 0),/*! - * ZUI: Generated from less code - v1.6.0 - 2017-05-10 + * ZUI: Generated from less code - v1.6.0 - 2017-05-11 * http://zui.sexy * GitHub: https://github.com/easysoft/zui.git * Copyright (c) 2017 cnezsoft.com; Licensed MIT */ -function(t){"use strict";var e=0,a=["primary","red","yellow","green","blue","purple","brown","dark"],i={primary:"#3280fc",secondary:"#145ccd",pale:"#ebf2f9",fore:"#353535",back:"#fff",grayDarker:"#222222",grayDark:"#333333",gray:"#808080",grayLight:"#dddddd",grayLighter:"#e5e5e5",grayPale:"#f1f1f1",white:"#fff",black:"#000",red:"#ea644a",yellow:"#f1a325",green:"#38b03f",blue:"#03b8cf",purple:"#8666b8",brown:"#bd7b46",greenPale:"#ddf4df",yellowPale:"#fff0d5",redPale:"#ffe5e0",bluePale:"#ddf3f5",brownPale:"#f7ebe1",purplePale:"#f5eeff",light:"#fff",dark:"#353535",success:"#38b03f",warning:"#f1a325",danger:"#ea644a",info:"#03b8cf",important:"#bd7b46",special:"#8666b8",successPale:"#ddf4df",warningPale:"#fff0d5",dangerPale:"#ffe5e0",infoPale:"#ddf3f5",importantPale:"#f7ebe1",specialPale:"#f5eeff"};i.get=function(o){"undefined"!=typeof o&&"random"!==o||(o=a[e++%a.length]);var n=i[o]?i[o]:o;return t.zui.Color?new t.zui.Color(n):n},t.zui({colorset:i}),t.zui.Color&&t.extend(t.zui.Color,i)}(jQuery),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var a in e)if(void 0!==t.style[a])return{end:e[a]};return!1}t.fn.emulateTransitionEnd=function(e){var a=!1,i=this;t(this).one("bsTransitionEnd",function(){a=!0});var o=function(){a||t(i).trigger(t.support.transition.end)};return setTimeout(o,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(t){"use strict";t.fn.fixOlPd=function(e){return e=e||10,this.each(function(){var a=t(this);a.css("paddingLeft",Math.ceil(Math.log10(a.children().length))*e+10)})},t(function(){t(".ol-pd-fix,.article ol").fixOlPd()})}(jQuery),+function(t){"use strict";var e=function(a,i){this.$element=t(a),this.options=t.extend({},e.DEFAULTS,i),this.isLoading=!1};e.DEFAULTS={loadingText:"loading..."},e.prototype.setState=function(e){var a="disabled",i=this.$element,o=i.is("input")?"val":"html",n=i.data();e+="Text",n.resetText||i.data("resetText",i[o]()),i[o](n[e]||this.options[e]),setTimeout(t.proxy(function(){"loadingText"==e?(this.isLoading=!0,i.addClass(a).attr(a,a)):this.isLoading&&(this.isLoading=!1,i.removeClass(a).removeAttr(a))},this),0)},e.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var a=this.$element.find("input");"radio"==a.prop("type")&&(a.prop("checked")&&this.$element.hasClass("active")?t=!1:e.find(".active").removeClass("active")),t&&a.prop("checked",!this.$element.hasClass("active")).trigger("change")}t&&this.$element.toggleClass("active")};var a=t.fn.button;t.fn.button=function(a){return this.each(function(){var i=t(this),o=i.data("zui.button"),n="object"==typeof a&&a;o||i.data("zui.button",o=new e(this,n)),"toggle"==a?o.toggle():a&&o.setState(a)})},t.fn.button.Constructor=e,t.fn.button.noConflict=function(){return t.fn.button=a,this},t(document).on("click.zui.button.data-api","[data-toggle^=button]",function(e){var a=t(e.target);a.hasClass("btn")||(a=a.closest(".btn")),a.button("toggle"),e.preventDefault()})}(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...'},a=function(){var t=this.isIE()||this.isIE10()||!1;if(t)for(var e=10;e>5;e--)if(this.isIE(e)){t=e;break}this.ie=t,this.cssHelper()};a.prototype.cssHelper=function(){var e=this.ie,a=t("html");a.toggleClass("ie",e).removeClass("ie-6 ie-7 ie-8 ie-9 ie-10"),e&&a.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)},a.prototype.tip=function(a){var i=t("#browseHappyTip");i.length||(i=t('
    '),i.prependTo("body")),i.find(".content").html(a||this.browseHappyTip||e[t.zui.clientLang()||"zh_cn"])},a.prototype.isIE=function(t){if(10===t)return this.isIE10();var e=document.createElement("b");return e.innerHTML="",1===e.getElementsByTagName("i").length},a.prototype.isIE10=function(){return!1},t.zui({browser:new a}),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="zui.collapse",a=function(e,i){this.$element=t(e),this.options=t.extend({},a.DEFAULTS,i),this.transitioning=null,this.options.parent&&(this.$parent=t(this.options.parent)),this.options.toggle&&this.toggle()};a.DEFAULTS={toggle:!0},a.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},a.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var a=t.Event("show."+e);if(this.$element.trigger(a),!a.isDefaultPrevented()){var i=this.$parent&&this.$parent.find(".in");if(i&&i.length){var o=i.data(e);if(o&&o.transitioning)return;i.collapse("hide"),o||i.data(e,null)}var n=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[n](0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("in")[n]("auto"),this.transitioning=0,this.$element.trigger("shown."+e)};if(!t.support.transition)return s.call(this);var r=t.camelCase(["scroll",n].join("-"));this.$element.one(t.support.transition.end,t.proxy(s,this)).emulateTransitionEnd(350)[n](this.$element[0][r])}}},a.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var a=t.Event("hide."+e);if(this.$element.trigger(a),!a.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.trigger("hidden."+e).removeClass("collapsing").addClass("collapse")};return t.support.transition?void this.$element[i](0).one(t.support.transition.end,t.proxy(o,this)).emulateTransitionEnd(350):o.call(this)}}},a.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var i=t.fn.collapse;t.fn.collapse=function(i){return this.each(function(){var o=t(this),n=o.data(e),s=t.extend({},a.DEFAULTS,o.data(),"object"==typeof i&&i);n||o.data(e,n=new a(this,s)),"string"==typeof i&&n[i]()})},t.fn.collapse.Constructor=a,t.fn.collapse.noConflict=function(){return t.fn.collapse=i,this},t(document).on("click."+e+".data-api","[data-toggle=collapse]",function(a){var i,o=t(this),n=o.attr("data-target")||a.preventDefault()||(i=o.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""),s=t(n),r=s.data(e),l=r?"toggle":o.data(),d=o.attr("data-parent"),c=d&&t(d);r&&r.transitioning||(c&&c.find('[data-toggle=collapse][data-parent="'+d+'"]').not(o).addClass("collapsed"),o[s.hasClass("in")?"addClass":"removeClass"]("collapsed")),s.collapse(l)})}(window.jQuery),+function(t){"use strict";function e(){t(o).remove(),t(n).each(function(e){var o=a(t(this));o.hasClass("open")&&(o.trigger(e=t.Event("hide."+i)),e.isDefaultPrevented()||o.removeClass("open").trigger("hidden."+i))})}function a(e){var a=e.attr("data-target");a||(a=e.attr("href"),a=a&&/#/.test(a)&&a.replace(/.*(?=#[^\s]*$)/,""));var i;try{i=a&&t(a)}catch(o){}return i&&i.length?i:e.parent()}var i="zui.dropdown",o=".dropdown-backdrop",n="[data-toggle=dropdown]",s=function(e){t(e).on("click."+i,this.toggle)};s.prototype.toggle=function(o){var n=t(this);if(!n.is(".disabled, :disabled")){var s=a(n),r=s.hasClass("open");if(e(),!r){if("ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t('