diff --git a/module/mr/view/link.html.php b/module/mr/view/link.html.php
index fe834e0272..f9350b3730 100644
--- a/module/mr/view/link.html.php
+++ b/module/mr/view/link.html.php
@@ -37,8 +37,8 @@
- - id}"), $lang->mr->view);?>
- - id}"), $lang->mr->viewDiff);?>
+ - id}"), $lang->mr->view);?>
+ - id}"), $lang->mr->viewDiff);?>
- '>icons['story'], 'text-primary') . ' ' . $lang->productplan->linkedStories;?>
- '>icons['bug'], 'text-red') . ' ' . $lang->productplan->linkedBugs;?>
- '>mr->linkedTasks;?>
diff --git a/module/mr/view/view.html.php b/module/mr/view/view.html.php
index e386b8f05f..190a484577 100644
--- a/module/mr/view/view.html.php
+++ b/module/mr/view/view.html.php
@@ -41,10 +41,10 @@
- mr->view);?>
- - id}"), $lang->mr->viewDiff);?>
- - id}&type=story"), html::icon($lang->icons['story'], 'text-primary') . ' ' . $lang->productplan->linkedStories);?>
- - id}&type=bug"), html::icon($lang->icons['bug'], 'text-red') . ' ' . $lang->productplan->linkedBugs);?>
- - id}&type=task"), html::icon('todo', 'text-info') . ' ' . $lang->mr->linkedTasks);?>
+ - id}"), $lang->mr->viewDiff);?>
+ - id}&type=story"), html::icon($lang->icons['story'], 'text-primary') . ' ' . $lang->productplan->linkedStories);?>
+ - id}&type=bug"), html::icon($lang->icons['bug'], 'text-red') . ' ' . $lang->productplan->linkedBugs);?>
+ - id}&type=task"), html::icon('todo', 'text-info') . ' ' . $lang->mr->linkedTasks);?>
@@ -112,16 +112,16 @@
synced and $rawMR->state == 'opened' and !$rawMR->has_conflicts) common::printIcon('mr', 'accept', "mr=$MR->id", $MR, 'button', 'flow', 'hiddenwin', 'mergeButton btn', false, $acceptDisabled, $lang->mr->acceptMR);?>
synced and $rawMR->state == 'opened'): ?>
has_conflicts or (!empty($compile->id) and $compile->status != 'success') or $MR->approvalStatus == 'approved'):?>
- id&action=approve", $MR, 'button', 'ok', 'hiddenwin', 'mergeButton', true, 'disabled', $lang->mr->approve);?>
+ id&action=approve", $MR, 'button', 'ok', 'hiddenwin', 'mergeButton', true, 'disabled', $lang->mr->approve);?>
- id&action=approve", $MR, 'button', 'ok', 'hiddenwin', 'mergeButton btn iframe showinonlybody', true, '', $lang->mr->approve);?>
+ id&action=approve", $MR, 'button', 'ok', 'hiddenwin', 'mergeButton btn iframe showinonlybody', true, '', $lang->mr->approve);?>
- id&action=reject", $MR, 'button', 'bug', 'hiddenwin', 'mergeButton btn iframe showinonlybody', true, ($MR->approvalStatus == 'rejected' ? 'disabled' : ''), $lang->mr->reject);?>
- id", $MR, 'button', 'off', 'hiddenwin', 'mergeButton');?>
- id", $MR, 'button', 'edit');?>
+ id&action=reject", $MR, 'button', 'bug', 'hiddenwin', 'mergeButton btn iframe showinonlybody', true, ($MR->approvalStatus == 'rejected' ? 'disabled' : ''), $lang->mr->reject);?>
+ id", $MR, 'button', 'off', 'hiddenwin', 'mergeButton');?>
+ id", $MR, 'button', 'edit');?>
synced and $rawMR->state == 'closed') common::printIcon('mr', 'reopen', "mr=$MR->id", $MR, 'button', 'restart', 'hiddenwin', 'mergeButton'); ?>
- id", $MR, 'button', 'trash', 'hiddenwin');?>
+ id", $MR, 'button', 'trash', 'hiddenwin');?>
diff --git a/module/my/control.php b/module/my/control.php
index 0ca06bfc6c..f9b16e7c7a 100755
--- a/module/my/control.php
+++ b/module/my/control.php
@@ -323,7 +323,7 @@ EOF;
{
$this->loadModel('story');
/* Save session. */
- if($this->app->viewType != 'json') $this->session->set('storyList', $this->app->getURI(true), 'my');
+ if($this->app->viewType != 'json') $this->session->set('storyList', $this->app->getURI(true), 'product');
/* Load pager. */
$this->app->loadClass('pager', $static = true);
@@ -387,7 +387,7 @@ EOF;
{
/* Save session. */
$this->loadModel('story');
- if($this->app->viewType != 'json') $this->session->set('storyList', $this->app->getURI(true), 'my');
+ if($this->app->viewType != 'json') $this->session->set('storyList', $this->app->getURI(true), 'product');
/* Load pager. */
$this->app->loadClass('pager', $static = true);
diff --git a/module/my/view/managecontacts.html.php b/module/my/view/managecontacts.html.php
index 939ba5691a..ce0e107594 100644
--- a/module/my/view/managecontacts.html.php
+++ b/module/my/view/managecontacts.html.php
@@ -20,8 +20,7 @@
foreach($lists as $id => $listName)
{
$listClass = ($id == $listID and $mode == 'edit') ? 'btn btn-block active' : 'btn btn-block';
- $shareIcon = in_array($id, $globalContacts) ? ' ' : '';
- echo html::a(inlink('managecontacts', "listID=$id&mode=edit"), $shareIcon . $listName, '', "class='{$listClass}' title='$listName'");
+ echo html::a(inlink('managecontacts', "listID=$id&mode=edit"), $listName, '', "class='{$listClass}' title='$listName'");
}
?>
diff --git a/module/product/model.php b/module/product/model.php
index dfb0b92a18..2f8350ac1d 100644
--- a/module/product/model.php
+++ b/module/product/model.php
@@ -675,8 +675,8 @@ class productModel extends model
$programID = isset($product->program) ? $product->program : 0;
$this->dao->insert(TABLE_PRODUCT)->data($product)->autoCheck()
->batchCheck($this->config->product->create->requiredFields, 'notempty')
- ->checkIF((!empty($product->name) and $this->config->systemMode == 'new'), 'name', 'unique', "`program` = $programID")
- ->checkIF(!empty($product->code), 'code', 'unique')
+ ->checkIF((!empty($product->name) and $this->config->systemMode == 'new'), 'name', 'unique', "`program` = $programID and `deleted` = '0'")
+ ->checkIF(!empty($product->code), 'code', 'unique', "`deleted` = '0'")
->checkFlow()
->exec();
@@ -767,8 +767,8 @@ class productModel extends model
$programID = isset($product->program) ? $product->program : '';
$this->dao->update(TABLE_PRODUCT)->data($product)->autoCheck()
->batchCheck($this->config->product->edit->requiredFields, 'notempty')
- ->checkIF((!empty($product->name) and $this->config->systemMode == 'new'), 'name', 'unique', "id != $productID and `program` = $programID")
- ->checkIF(!empty($product->code), 'code', 'unique', "id != $productID")
+ ->checkIF((!empty($product->name) and $this->config->systemMode == 'new'), 'name', 'unique', "id != $productID and `program` = $programID and `deleted` = '0'")
+ ->checkIF(!empty($product->code), 'code', 'unique', "id != $productID and `deleted` = '0'")
->checkFlow()
->where('id')->eq($productID)
->exec();
diff --git a/module/program/control.php b/module/program/control.php
index 51100a9ef7..6c7f8403e6 100644
--- a/module/program/control.php
+++ b/module/program/control.php
@@ -28,7 +28,6 @@ class program extends control
*/
public function browse($status = 'all', $orderBy = 'order_asc', $recTotal = 0, $recPerPage = 10, $pageID = 1, $param = 0)
{
- $this->lang->program->featureBar = array('all' => $this->lang->program->featureBar['all']);
if(common::hasPriv('program', 'create')) $this->lang->pageActions = html::a($this->createLink('program', 'create'), "
" . $this->lang->program->create, '', "class='btn btn-primary create-program-btn'");
$this->session->set('programList', $this->app->getURI(true), 'program');
@@ -54,8 +53,9 @@ class program extends control
else
{
/* Get top programs and projects. */
- $topObjects = $this->program->getList($status, $orderBy, $pager, 'top');
- $programs = $this->program->getList($status, $orderBy, NULL, 'child', array_keys($topObjects));
+ $topObjects = $this->program->getList($status == 'unclosed' ? 'doing,suspended,wait' : $status, $orderBy, $pager, 'top');
+ if(!$topObjects) $topObjects = array(0);
+ $programs = $this->program->getList($status == 'closed' ? 'closed' : 'all', $orderBy, NULL, 'child', array_keys($topObjects));
/* Get summary. */
$topCount = $indCount = 0;
@@ -193,7 +193,7 @@ class program extends control
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->loadModel('action')->create('program', $programID, 'opened');
- return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $programID, 'locate' => inlink('browse')));
+ return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $programID, 'locate' => $this->session->programList));
}
$extra = str_replace(array(',', ' '), array('&', ''), $extra);
diff --git a/module/program/lang/de.php b/module/program/lang/de.php
index ddc8622604..6505b7fb48 100644
--- a/module/program/lang/de.php
+++ b/module/program/lang/de.php
@@ -140,7 +140,7 @@ $lang->program->statusList['suspended'] = 'Suspended';
$lang->program->statusList['closed'] = 'Closed';
$lang->program->featureBar['all'] = 'All';
-$lang->program->featureBar['undone'] = 'Unfinished';
+$lang->program->featureBar['unclosed'] = 'Unclosed';
$lang->program->featureBar['wait'] = 'Waiting';
$lang->program->featureBar['doing'] = 'Doing';
$lang->program->featureBar['suspended'] = 'Suspended';
diff --git a/module/program/lang/en.php b/module/program/lang/en.php
index c1bff24805..3e390eff22 100644
--- a/module/program/lang/en.php
+++ b/module/program/lang/en.php
@@ -140,7 +140,7 @@ $lang->program->statusList['suspended'] = 'Suspended';
$lang->program->statusList['closed'] = 'Closed';
$lang->program->featureBar['all'] = 'All';
-$lang->program->featureBar['undone'] = 'Unfinished';
+$lang->program->featureBar['unclosed'] = 'Unclosed';
$lang->program->featureBar['wait'] = 'Waiting';
$lang->program->featureBar['doing'] = 'Doing';
$lang->program->featureBar['suspended'] = 'Suspended';
diff --git a/module/program/lang/fr.php b/module/program/lang/fr.php
index 3b123757f2..ed25ecbfb4 100644
--- a/module/program/lang/fr.php
+++ b/module/program/lang/fr.php
@@ -140,7 +140,7 @@ $lang->program->statusList['suspended'] = 'Suspended';
$lang->program->statusList['closed'] = 'Closed';
$lang->program->featureBar['all'] = 'All';
-$lang->program->featureBar['undone'] = 'Non Terminées';
+$lang->program->featureBar['unclosed'] = 'Unclosed';
$lang->program->featureBar['wait'] = 'En Attente';
$lang->program->featureBar['doing'] = 'En Cours';
$lang->program->featureBar['suspended'] = 'Suspendues';
diff --git a/module/program/lang/zh-cn.php b/module/program/lang/zh-cn.php
index 0ec1b2a72a..b4bd65c3a6 100644
--- a/module/program/lang/zh-cn.php
+++ b/module/program/lang/zh-cn.php
@@ -114,6 +114,7 @@ $lang->program->accessDenied = '你无权访问该项目集';
$lang->program->beyondParentBudget = '已超出所属项目集的剩余预算';
$lang->program->checkedProjects = '已选择%s项';
+
$lang->program->endList[31] = '一个月';
$lang->program->endList[93] = '三个月';
$lang->program->endList[186] = '半年';
@@ -140,7 +141,7 @@ $lang->program->statusList['suspended'] = '已挂起';
$lang->program->statusList['closed'] = '已关闭';
$lang->program->featureBar['all'] = '所有';
-$lang->program->featureBar['undone'] = '未完成';
+$lang->program->featureBar['unclosed'] = '未关闭';
$lang->program->featureBar['wait'] = '未开始';
$lang->program->featureBar['doing'] = '进行中';
$lang->program->featureBar['suspended'] = '已挂起';
diff --git a/module/program/model.php b/module/program/model.php
index caf71c1072..0f66c08f7e 100644
--- a/module/program/model.php
+++ b/module/program/model.php
@@ -166,8 +166,8 @@ class programModel extends model
->where('type')->in('program,project')
->andWhere('deleted')->eq(0)
->andWhere('vision')->eq($this->config->vision)
- ->beginIF($status != 'all')->andWhere('status')->eq($status)->fi()
- ->beginIF(!$this->cookie->showClosed)->andWhere('status')->ne('closed')->fi()
+ ->beginIF($status != 'all')->andWhere('status')->in($status)->fi()
+ ->beginIF(!$this->cookie->showClosed and $status == 'all')->andWhere('status')->ne('closed')->fi()
->beginIF($this->app->rawMethod == 'browse' and $type === 'top')->andWhere('parent')->eq(0)->fi()
->beginIF($this->app->rawMethod == 'browse' and ($type === 'child' or !$this->app->user->admin))->andWhere('id')->in($objectIdList)->fi()
->beginIF(!$this->app->user->admin and $this->app->rawMethod != 'browse')->andWhere('id')->in($userViewIdList)->fi()
@@ -547,6 +547,24 @@ class programModel extends model
$path = $program->path;
}
+ if($queryID)
+ {
+ $query = $this->loadModel('search')->getQuery($queryID);
+ if($query)
+ {
+ $this->session->set('projectQuery', $query->sql);
+ $this->session->set('projectForm', $query->form);
+ }
+ else
+ {
+ $this->session->set('projectQuery', ' 1 = 1');
+ }
+ }
+ else
+ {
+ if($this->session->projectQuery == false) $this->session->set('projectQuery', ' 1 = 1');
+ }
+
$query = str_replace('`id`','t1.id', $this->session->projectQuery);
$projectList = $this->dao->select('distinct t1.*')->from(TABLE_PROJECT)->alias('t1')
->leftJoin(TABLE_TEAM)->alias('t2')->on('t1.id=t2.root')
@@ -742,7 +760,7 @@ class programModel extends model
->checkIF($program->begin != '', 'begin', 'date')
->checkIF($program->end != '', 'end', 'date')
->checkIF($program->end != '', 'end', 'gt', $program->begin)
- ->checkIF(!empty($program->name), 'name', 'unique', "`type`='program' and `parent` = $program->parent")
+ ->checkIF(!empty($program->name), 'name', 'unique', "`type`='program' and `parent` = $program->parent and `deleted` = '0'")
->checkFlow()
->exec();
@@ -848,7 +866,7 @@ class programModel extends model
->checkIF($program->begin != '', 'begin', 'date')
->checkIF($program->end != '', 'end', 'date')
->checkIF($program->end != '', 'end', 'gt', $program->begin)
- ->checkIF(!empty($program->name), 'name', 'unique', "id!=$programID and `type`='program' and `parent` = $program->parent")
+ ->checkIF(!empty($program->name), 'name', 'unique', "id!=$programID and `type`='program' and `parent` = $program->parent and `deleted` = '0'")
->checkFlow()
->where('id')->eq($programID)
->limit(1)
diff --git a/module/program/view/browse.html.php b/module/program/view/browse.html.php
index d876502bce..26d7fe1e81 100644
--- a/module/program/view/browse.html.php
+++ b/module/program/view/browse.html.php
@@ -28,7 +28,7 @@
$label";?>
- $lang->program->showClosed), '', $this->cookie->showClosed ? 'checked=checked' : '');?>
+ $lang->program->showClosed), '', $this->cookie->showClosed ? 'checked=checked' : '');?>
$lang->project->edit), '', $this->cookie->editProject ? 'checked=checked' : '');?>
user->search;?>
diff --git a/module/programplan/model.php b/module/programplan/model.php
index 846479d064..7d8772b0d8 100755
--- a/module/programplan/model.php
+++ b/module/programplan/model.php
@@ -186,6 +186,8 @@ class programplanModel extends model
$data->percent = $plan->percent;
$data->attribute = zget($this->lang->stage->typeList, $plan->attribute);
$data->milestone = zget($this->lang->programplan->milestoneList, $plan->milestone);
+ $data->owner_id = $plan->PM;
+ $data->status = $this->processStatus('execution', $plan);
$data->begin = $start;
$data->deadline = $end;
$data->realBegan = helper::isZeroDate($plan->realBegan) ? '' : substr($plan->realBegan, 0, 10);
@@ -204,7 +206,7 @@ class programplanModel extends model
$stageIndex[$plan->id] = array('planID' => $plan->id, 'parent' => $plan->parent, 'progress' => array('totalConsumed' => 0, 'totalReal' => 0));
}
- $taskSign = "
[ T ] ";
+ $taskSign = "
[ T ] ";
$taskPri = "
%s ";
/* Judge whether to display tasks under the stage. */
@@ -231,8 +233,6 @@ class programplanModel extends model
}
}
- $minStartDate = '';
- $maxDeadline = '';
foreach($tasks as $task)
{
$execution = zget($plans, $task->execution, array());
@@ -254,6 +254,8 @@ class programplanModel extends model
$data->type = 'task';
$data->text = $taskSign . $priIcon . $task->name;
$data->percent = '';
+ $data->status = $this->processStatus('task', $task);
+ $data->owner_id = $task->assignedTo;
$data->attribute = '';
$data->milestone = '';
$data->begin = $start;
@@ -274,25 +276,7 @@ class programplanModel extends model
if($data->start_date) $data->start_date = date('d-m-Y', strtotime($data->start_date));
if($data->start_date == '' or $data->endDate == '') $data->duration = 0;
- if(strpos($selectCustom, 'task') !== false)
- {
- $datas['data'][$data->id] = $data;
- if(isset($datas['data'][$task->execution]))
- {
- $changed = false;
- if($start and strtotime($start) < strtotime($datas['data'][$task->execution]->start_date))
- {
- $changed = true;
- $datas['data'][$task->execution]->start_date = date('d-m-Y', strtotime($start));
- }
- if($end and $end > $datas['data'][$task->execution]->endDate)
- {
- $changed = true;
- $datas['data'][$task->execution]->endDate = $end;
- }
- if($changed) $datas['data'][$task->execution]->duration = helper::diffDate($datas['data'][$task->execution]->endDate, $datas['data'][$task->execution]->start_date) + 1;
- }
- }
+ if(strpos($selectCustom, 'task') !== false) $datas['data'][$data->id] = $data;
foreach($stageIndex as $index => $stage)
{
if($stage['planID'] == $task->execution)
diff --git a/module/programplan/view/gantt.html.php b/module/programplan/view/gantt.html.php
index 72099b9ad6..98c18d897b 100644
--- a/module/programplan/view/gantt.html.php
+++ b/module/programplan/view/gantt.html.php
@@ -19,12 +19,12 @@
.gantt-fullscreen #mainMenu,
.gantt-fullscreen #footer {display: none!important;}
.gantt-fullscreen #mainContent {position: fixed; top: 0; right: 0; bottom: 0; left: 0}
-.gantt_task_content{display: none;}
.checkbox-primary {margin-top: 0px; margin-left: 10px;}
form {display: block; margin-top: 0em; margin-block-end: 1em;}
-.gantt_task_progress {background: rgba(0,0,0,.1)}
+.gantt_task_content span.task-label, .gantt_task_content span.label-pri{display: none;}
#ganttPris > span {display: inline-block; line-height: 20px; min-width: 20px; border-radius: 2px;}
.gantt_task_line {background: #execution->gantt->color[0]?>; border-color: #execution->gantt->color[0]?>;}
+.gantt_task_progress {background: rgba(0,0,0,.1)}
.gantt_task_line.pri-1 {background: #execution->gantt->color[1]?>; border-color: #execution->gantt->color[1]?>}
.gantt_task_line.pri-2 {background: #execution->gantt->color[2]?>; border-color: #execution->gantt->color[2]?>}
.gantt_task_line.pri-3 {background: #execution->gantt->color[3]?>; border-color: #execution->gantt->color[3]?>}
@@ -50,14 +50,16 @@ form {display: block; margin-top: 0em; margin-block-end: 1em;}
.gantt_task_link.start_to_finish .gantt_line_wrapper div { background-color: #975000; }
.gantt_task_link.start_to_finish:hover .gantt_line_wrapper div { box-shadow: 0 0 5px 0px #975000; }
.gantt_task_link.start_to_finish .gantt_link_arrow_left { border-right-color: #975000; }
+.gantt_critical_task{background:#e63030 !important; border-color:#9d3a3a !important;}
.gantt_marker .gantt_marker_content {left: -15px; background-color: #f51e1e;}
+.gantt_row.task-item{cursor: pointer;}
createLink('programplan', 'ajaxCustom'));?>
rawModule);?>
rawMethod);?>
').append(t('').addClass(i.attr("class")).append(n.clone())).insertAfter(i)),h){var d=c[0].getBoundingClientRect();l.css({left:d.left,width:c.width(),overflow:"hidden"}),l.find(".fixed-header-copy").css({left:o.left-d.left,position:"relative",minWidth:i.width()}),a||c.data("fixHeaderScroll")||(c.data("fixHeaderScroll",1),i.width()>c.width()&&c.on("scroll",function(){e.fixHeader()}))}else l.css({left:o.left,width:o.width});var u=l.find("th");n.find("th").each(function(e){u.eq(e).css("width",t(this).outerWidth())})}else l.remove()},r.prototype.fixFooter=function(){var e,i=this,n=i.getTable(),o=i.$.find(".table-footer");if(i.isDataTable)e=n[0].getBoundingClientRect();else{var a=n.find("tbody");if(!a.length)return;e=a[0].getBoundingClientRect()}var s=i.options.fixFooter;o.toggleClass("fixed-footer",!!r);var r="function"==typeof s?s(e,o):e.bottom>window.innerHeight-50-("number"==typeof s?s:i.pageFooterHeight||5);o.toggleClass("fixed-footer",!!r),n.toggleClass("with-footer-fixed",!!r),n.trigger("fixFooter",r);var l=t("body"),c=l.hasClass("body-modal");if(r){var h=n.parent(),d=h.is(".table-responsive");o.css({bottom:i.pageFooterHeight||0,left:d?h[0].getBoundingClientRect().left:e.left,width:d?h.width():e.width}),c&&l.css("padding-bottom",40)}else o.css({width:"",left:0,bottom:0}),c&&l.css("padding-bottom",0)},r.prototype.checkAll=function(e){var i=this,n=i.$.find(i.isDataTable?".fixed-left tbody>tr":"tbody>tr");n.each(function(){i.checkRow(t(this),e,!0)}),i.updateCheckUI()},r.prototype.checkRow=function(i,n,o){var a=this,s=a.getTable();a.isDataTable&&!i.is(".datatable-row-left")&&(i=s.find('.datatable-row-left[data-index="'+i.data("index")+'"]'));var r=i.find('input[type="checkbox"]');if(r.length&&!r.is(":disabled")){n===e&&(n=!r.is(":checked")),a.isDataTable?s.find('.datatable-row[data-index="'+i.data("index")+'"]').toggleClass("checked",n):i.toggleClass("checked",n);var l=i.data("id");this.checkItems[l]=n,r.prop("checked",n).trigger("change"),o||(i.hasClass("table-parent")&&s.find((a.isDataTable?".fixed-left ":"")+"tbody>tr.parent-"+l).each(function(){a.checkRow(t(this),n,!0)}),a.updateCheckUI())}},r.prototype.updateCheckUI=function(){var e=this,i=e.getTable(),n=i.find(e.isDataTable?".fixed-left tbody>tr":"tbody>tr").not(".group-summary"),o=!1,a=null,s=0,r=!1,l=n.length;n.each(function(n){var c=t(this),h=c.find('input[type="checkbox"]');if(!h.length)return void l--;r=h.is(":checked");var d=e.isDataTable?i.find('.datatable-row[data-index="'+c.data("index")+'"]'):c;d.toggleClass("checked",r),d.toggleClass("row-check-begin",r&&!o),a&&a.toggleClass("row-check-end",!r&&o),r&&(s+=1),a=d,o=r,l===n+1&&d.toggleClass("row-check-end",r)}),e.$.toggleClass("has-row-checked",s>0).find(".check-all").toggleClass("checked",!(!l||s!==l)),e.updateStatistic(),e.options.onCheckChange&&e.options.onCheckChange(),i.trigger("checkChange")},r.DEFAULTS={checkable:!0,checkOnClickRow:!0,ajaxForm:!1,selectable:!0,fixHeader:!a,fixFooter:!a,iframeWidth:900,replaceId:"self",nestLevelIndent:18,nested:!1,preserveNested:!0,hot:!1,iframeModalTrigger:".iframe:not(.disabled,[disabled])"},t.fn.table=function(e){return this.each(function(){var n=t(this),o=n.data(i),a="object"==typeof e&&e;o||n.data(i,o=new r(this,a)),"string"==typeof e&&o[e]();
-})},r.NAME=i,t.fn.table.Constructor=r,t(function(){t('[data-ride="table"]').table()})}(jQuery,void 0),function(t,e,i){t.fn._ajaxForm=t.fn.ajaxForm;var n={timeout:e.config?e.config.timeout:0,dataType:"json",method:"post"},o="";t.fn.enableForm=function(e,n,o){return e===i&&(e=!0),this.each(function(){var i=t(this);n||i.find('[type="submit"]').attr("disabled",e?null:"disabled"),!o&&i.hasClass("load-indicator")&&i.toggleClass("loading",!e),i.toggleClass("form-disabled",!e)})},t.enableForm=function(e,i,n,o){"string"==typeof e||e instanceof t?e=t(e):(o=n,n=i,i=e,e=t("form")),e.enableForm(i!==!1,n,o)},t.disableForm=function(e,i,n){t.enableForm(e,!1,i,n)};var a=function(e,i,n){i=i||"show",t.zui.messager?(n?n.html=!0:n={html:!0},e=e.toString().replace(/\n/g,"
"),t.zui.messager[i](e,n)):alert(e)};t.ajaxForm=function(s,r){var l=t(s);if(l.length>1)return l.each(function(){t.ajaxForm(this,r)});"function"==typeof r&&(r={complete:r}),r=t.extend({},n,l.data(),r);var c=r.beforeSubmit,h=r.error,d=r.success,u=r.finish;delete r.finish,delete r.success,delete r.onError,delete r.beforeSubmit,r=t.extend({beforeSubmit:function(n,a,s){if((c&&c(n,a,s))===!1)return!1;l.removeClass("form-watched").enableForm(!1);var r={},h=a.find('[type="file"]');r.fileapi=h.length&&h[0].files!==i,r.formdata=e.FormData!==i;var d=r.fileapi&&a.find('input[type="file"]:enabled').filter(function(){return""!==t(this).val()}),u=d.length,p="multipart/form-data",f=a.attr("enctype")==p||a.attr("encoding")==p,g=r.fileapi&&r.formdata,m=u&&!g||f&&!r.formdata;m&&(""==o&&(o=s.url),s.url!=o&&(s.url=o),s.url=s.url.indexOf("&")>=0?s.url+"&HTTP_X_REQUESTED_WITH=XMLHttpRequest":s.url+"?HTTP_X_REQUESTED_WITH=XMLHttpRequest")},success:function(i,n,o){if((d&&d(i,n,o,l))!==!1){try{"string"==typeof i&&(i=JSON.parse(i))}catch(s){}if(null===i||"object"!=typeof i)return i?alert(i):a("No response.","danger");var c=r.responser?t(r.responser):l.find(".form-responser");c.length||(c=t("#responser"));var h=i.message,p=function(){var n=i.callback;if(n)if("object"==typeof n){var o=n.target?e[n.target]:e,a=o[n.name];a.apply(l,Array.isArray(n.params)?n.params:[n.params])}else{var s=n.indexOf("("),r=(s>0?n.substr(0,s):n).split("."),c=e,h=r[0];r.length>1&&(h=r[1],"top"===r[0]?c=e.top:"parent"===r[0]&&(c=e.parent));var a=c[h];if("function"==typeof a){var d=[];return s>0&&")"==n[n.length-1]&&(d=t.parseJSON("["+n.substring(s+1,n.length-1)+"]")),d.push(i),a.apply(l,d)}}};if("success"===i.result){var f=r.locate||i.locate,g=r.closeModal||i.closeModal,m=r.ajaxReload||i.ajaxReload;if(l.enableForm(!0,!!(f||g||m)),h){var v=l.find('[type="submit"]').first(),y=!1;v.length&&(v.popover({container:"body",trigger:"manual",content:h,tipClass:"popover-in-modal popover-success popover-form-result",placement:i.placement||v.data("placement")||r.popoverPlacement||"right"}).popover("show"),setTimeout(function(){v.popover("destroy")},r.popoverTime||2e3),y=!0),c.length&&(c.html('
'+h+"").show().delay(3e3).fadeOut(100),y=!0),y||a(h,"success")}if(u)return u(i,!0,l);if(g&&setTimeout(t.zui.closeModal,"number"==typeof g?g:r.closeModalTime||2e3),p()===!1)return;if(f)if("loadInModal"==f){var b=t(".modal");setTimeout(function(){b.load(b.attr("ref"),function(){t(this).find(".modal-dialog").css("width",t(this).data("width")),t.zui.ajustModalPosition()})},1e3)}else"parent"===f||"top"===f?e[f]&&setTimeout(function(){e[f].location.reload()},1200):"reload"===f?setTimeout(function(){e.location.href=e.location.href},1200):setTimeout(function(){t.apps?t.apps.open(f):e.location.href=f},1200);if(m){var w=t(m);w.length&&w.load(e.location.href+" "+m,function(){w.find('[data-toggle="modal"]').modalTrigger()})}}else{if(l.enableForm(),"string"==typeof h)c.length?c.html('
'+h+"").show().delay(3e3).fadeOut(100):a(h,"danger");else if("object"==typeof h){var x=!1,C=[];t.each(h,function(e,i){var n=t.isArray(i)?i.join(""):i,o=t("#"+e);if(!o.length)return void C.push(n);var a=e+"Label",s=t("#"+a);if(!s.length){var r=o.closest(".input-group").length,l=o.closest("td").length;s=t('
').appendTo(l?o.closest("td"):r?o.closest(".input-group").parent():o.parent())}s.empty().append(n),o.addClass("has-error");var c=function(){var e=t("#"+a);if(e.length)return e.remove(),o.removeClass("has-error"),!0};o.on("change input mousedown",c);var h=t("#"+e+"_chosen");if(h.length&&h.find(".chosen-single,.chosen-choices").addClass("has-error").on("mousedown",function(){c()===!0&&t(this).removeClass("has-error")}),!x&&!o.data("datetimepicker")){var d=o[0];if(o.hasClass("chosen"))o.trigger("chosen:activate").trigger("chosen:open"),d=o.parent().find(".chosen-container")[0];else if(o.is("textarea")&&o.data("keditor")){var u=o.data("keditor");u.focus(),u.edit.doc.body.focus(),d=o.parent().find(".ke-container")[0]}else o.focus();d.scrollIntoView&&d.scrollIntoView(),x=!0}}),C.length&&a(C.join(""),"danger")}if(u)return u(i,!1,l);if(p()===!1)return}}},error:function(t,i,n){if((h&&h(t,i,n,l))!==!1){l.enableForm();var o="timeout"==i||"error"==i?e.lang?e.lang.timeout:i:t.responseText+i+n;a(o,"danger")}}},r),l._ajaxForm(r).data("zui.ajaxform",!0),l.on("click","[data-form-action]",function(){l.attr("action",t(this).data("formAction")).submit()})},t.setAjaxForm=function(e,i,n){t.ajaxForm(e,t.isPlainObject(i)?i:{finish:i,beforeSubmit:n})},t.fn.ajaxForm=function(e){return this.each(function(){t.ajaxForm(this,e)})},t.fn.setInputRequired=function(){return this.each(function(){var e=t(this),i=e.parent();i.is(".input-control,td")?i.addClass("required"):e.is(".chosen")?e.attr("required",null).next(".chosen-container").addClass("required"):i.addClass("required"),e.attr("required",null);var n=i.closest(".input-group");n.length&&1===n.find(".required,input[required],select[required]").length&&n.addClass("required")})},t(function(){t('.form-ajax,form[data-type="ajax"]').ajaxForm(),setTimeout(function(){var i=e.config.requiredFields,n=t("form");i&&(i=i.split(",")),i&&i.length&&t.each(i,function(t,e){n.find("#"+e).attr("required","required")}),n.find("input[required],select[required],textarea[required]").setInputRequired()},400),t('form[target="hiddenwin"]').on("submit",function(){var e=t(this);e.data("zui.ajaxform")||e.enableForm(!1).data("disabledTime",(new Date).getTime())}).on("click",function(){var e=t(this),i=e.data("disabledTime");i&&(new Date).getTime()-i>1e4&&e.enableForm(!0).data("disabledTime",null)})})}(jQuery,window,void 0),function(t){"use strict";var e="zui.searchList",i=function(t,e){if(t&&t.length)for(var i=0;i
').append(s)),i.$menu.append(s),i.$menu.removeClass("loading"),i.isLoaded=!0,e&&e(!0)},error:function(){i.$menu.removeClass("loading").append('
"),e&&e(!1)}},n.ajax))},n.prototype.scrollTo=function(t){t.length&&t[0].scrollIntoViewIfNeeded&&t[0].scrollIntoViewIfNeeded({behavior:"smooth"})},n.prototype.getItems=function(){return this.$.find(this.options.selector).addClass("search-list-item")},n.prototype.getActiveItem=function(){return this.getItems().filter(".active:first")},n.prototype.search=function(e){var n=this,o=void 0===e||null===e||""===e;n.$.toggleClass("has-search-text",!o);var a=n.getItems().removeClass("active");if(o)a.removeClass("hidden");else{var s=e.trim().split(" ");a.each(function(){var e=t(this),n=(e.text()+" "+(e.data("key")||e.data("filter")||"")).trim();e.toggleClass("hidden",!i(s,n))})}n.scrollTo(a.not(".hidden").first().addClass("active")),n.$.trigger("onSearchComplete",e)},n.DEFAULTS={selector:".list-group a:not(.not-list-item)",searchBox:".search-box",onSelectItem:null},t.fn.searchList=function(i){return this.each(function(){var o=t(this),a=o.data(e),s="object"==typeof i&&i;a||o.data(e,a=new n(this,s)),"string"==typeof i&&a[i]()})},n.NAME=e,t.fn.searchList.Constructor=n,t(function(){t('[data-ride="searchList"]').searchList()})}(jQuery),function(t){"use strict";var e="zui.labelSelector",i=function(n,o){var a=this;a.name=e,a.$=t(n),o=a.options=t.extend({},i.DEFAULTS,this.$.data(),o),a.$.hide(),a.update()};i.prototype.select=function(t){t+="",this.$wrapper.find(".label.active").removeClass("active"),this.$wrapper.find('.label[data-value="'+t+'"]').addClass("active"),this.$.val(t).trigger("change")},i.prototype.update=function(){var e=this,i=e.options,n=e.$wrapper;if(!n){if(i.wrapper)n=t(i.wrapper);else{var o=e.$.next();n=o.hasClass(".label-selector")?o:t('
')}n.parent().length||e.$.after(n),e.$wrapper=n,n.on("click",".label",function(i){var n=e.$.val(),o=t(this).data("value");e.hasEmptyValue!==!1&&o==n&&(o=e.hasEmptyValue),e.select(o),i.preventDefault()})}n.empty();var a=e.$.val();e.hasEmptyValue=!1,e.$.children("option").each(function(){var e=t(this),o={label:e.text(),value:e.val()},s=(""===o.value||"0"===o.value)&&!o.label,r=t(i.labelTemplate||'
');i.labelClass&&!s&&r.addClass(i.labelClass),i.labelCreator?r=i.labelCreator(r):(r.data("option",o).attr("data-value",o.value),s?r.addClass("empty").append('
'):r.text(o.label).toggleClass("active",a===o.value)),n.append(r)})},i.DEFAULTS={},t.fn.labelSelector=function(n){return this.each(function(){var o=t(this),a=o.data(e),s="object"==typeof n&&n;a||o.data(e,a=new i(this,s)),"string"==typeof n&&a[n]()})},i.NAME=e,t.fn.labelSelector.Constructor=i,t(function(){t('[data-provide="labelSelector"]').labelSelector()})}(jQuery),function(t){"use strict";var e="zui.fileInput",i=t.BYTE_UNITS={B:1,KB:1024,MB:1048576,GB:1073741824,TB:1099511627776},n=t.formatBytes=function(t,e,n){return void 0===e&&(e=2),n||(n=t