diff --git a/module/mail/model.php b/module/mail/model.php
index ef66049bac..f2e2320e2e 100644
--- a/module/mail/model.php
+++ b/module/mail/model.php
@@ -508,7 +508,6 @@ class mailModel extends model
foreach($toList as $key => $to) if(trim($to) == $account or !trim($to)) unset($toList[$key]);
foreach($ccList as $key => $cc) if(trim($cc) == $account or !trim($cc)) unset($ccList[$key]);
}
-
if(!$toList and !$ccList) return;
if(!$toList and $ccList) $toList = array(array_shift($ccList));
diff --git a/module/project/lang/en.php b/module/project/lang/en.php
index b50ef21c89..b864f3a618 100644
--- a/module/project/lang/en.php
+++ b/module/project/lang/en.php
@@ -19,9 +19,19 @@ $lang->project->begin = 'Begin';
$lang->project->end = 'End';
$lang->project->dateRange = 'Duration';
$lang->project->to = 'To';
+<<<<<<< HEAD
+<<<<<<< HEAD
$lang->project->days = 'Man-Day';
+$lang->project->day = 'day';
+$lang->project->workHour = 'Hours';
+=======
+$lang->project->days = 'Man Day';
+=======
+$lang->project->days = 'Man-Day';
+>>>>>>> 58a5ce3d921a17cce37484db7696956508f5d454
$lang->project->day = ' days';
$lang->project->workHour = ' hours';
+>>>>>>> d3fa148cb3d0ea19eb92b37374b0ec4e2a64ec6f
$lang->project->totalHours = 'Work Hours';
$lang->project->totalDays = 'Work Days';
$lang->project->status = 'Status';
@@ -49,14 +59,32 @@ $lang->project->createStory = "Create Story";
$lang->project->all = 'All';
$lang->project->undone = 'Unfinished';
$lang->project->unclosed = 'Unclosed';
+<<<<<<< HEAD
+<<<<<<< HEAD
+$lang->project->typeDesc = 'No story, bug, build, test task or Burndown is allowed in OPS';
+$lang->project->mine = 'My Responsibility: ';
+=======
+$lang->project->typeDesc = 'No story, bug, build, test task or burndown is allowed in OPS';
+=======
$lang->project->typeDesc = 'No story, bug, build, test or burndown is allowed in OPS';
+<<<<<<< HEAD
$lang->project->mine = 'My: ';
+=======
+>>>>>>> 58a5ce3d921a17cce37484db7696956508f5d454
+$lang->project->mine = 'Mine: ';
+>>>>>>> d3fa148cb3d0ea19eb92b37374b0ec4e2a64ec6f
+>>>>>>> 1f8899a84819dad5ffe811c8eb667fd33e01136f
$lang->project->other = 'Other:';
$lang->project->deleted = 'Deleted';
$lang->project->delayed = 'Delayed';
$lang->project->product = $lang->project->products;
+<<<<<<< HEAD
+$lang->project->readjustTime = 'Change project duration';
+$lang->project->readjustTask = 'Change task duration';
+=======
$lang->project->readjustTime = "Adjust {$lang->projectCommon} begin and end time";
$lang->project->readjustTask = 'Adjust task start date and deadline';
+>>>>>>> 58a5ce3d921a17cce37484db7696956508f5d454
$lang->project->effort = 'Effort';
$lang->project->relatedMember = 'Team Member';
@@ -106,14 +134,30 @@ $lang->project->aclList['custom'] = 'Whitelist (Team members and the whitelist
/* 方法列表。*/
$lang->project->index = "Home";
+<<<<<<< HEAD
+$lang->project->task = 'Tasks';
+<<<<<<< HEAD
+$lang->project->groupTask = 'View by Group';
+=======
+=======
$lang->project->task = 'Task';
+>>>>>>> 58a5ce3d921a17cce37484db7696956508f5d454
$lang->project->groupTask = 'Group View';
+>>>>>>> d3fa148cb3d0ea19eb92b37374b0ec4e2a64ec6f
$lang->project->story = 'Story';
$lang->project->bug = 'Bug';
$lang->project->dynamic = 'Dynamic';
$lang->project->latestDynamic = 'Latest Dynamic';
$lang->project->build = 'Build';
+<<<<<<< HEAD
+<<<<<<< HEAD
$lang->project->testtask = 'Test';
+=======
+$lang->project->testtask = 'Test Task';
+>>>>>>> d3fa148cb3d0ea19eb92b37374b0ec4e2a64ec6f
+=======
+$lang->project->testtask = 'Test';
+>>>>>>> 58a5ce3d921a17cce37484db7696956508f5d454
$lang->project->burn = 'Burndown';
$lang->project->computeBurn = 'Update';
$lang->project->burnData = 'Burndown Data';
@@ -135,7 +179,11 @@ $lang->project->delete = "Delete";
$lang->project->browse = "Browse";
$lang->project->edit = "Edit";
$lang->project->batchEdit = "Batch Edit";
+<<<<<<< HEAD
+$lang->project->manageMembers = 'Manange Team';
+=======
$lang->project->manageMembers = 'Manage Team';
+>>>>>>> d3fa148cb3d0ea19eb92b37374b0ec4e2a64ec6f
$lang->project->unlinkMember = 'Unlink Member';
$lang->project->unlinkStory = 'Unlink Story';
$lang->project->batchUnlinkStory = 'Batch Unlink Story';
@@ -163,7 +211,7 @@ $lang->project->myInvolved = 'Involved';
$lang->project->statusSelects[''] = 'More';
$lang->project->statusSelects['wait'] = 'Wait';
$lang->project->statusSelects['doing'] = 'Doing';
-$lang->project->statusSelects['finishedbyme'] = 'FinishedbyMe';
+$lang->project->statusSelects['finishedbyme'] = 'FinishedByMe';
$lang->project->statusSelects['done'] = 'Done';
$lang->project->statusSelects['closed'] = 'Closed';
$lang->project->statusSelects['cancel'] : = 'Canceled';
@@ -172,8 +220,8 @@ $lang->project->groups[''] = 'Group';
$lang->project->groups['story'] = 'By Story';
$lang->project->groups['status'] = 'By Status';
$lang->project->groups['pri'] = 'By Priority';
-$lang->project->groups['assignedTo'] = 'By AssignedTo';
-$lang->project->groups['finishedBy'] = 'By FinishedBy';
+$lang->project->groups['assignedTo'] = 'By AssignTo';
+$lang->project->groups['finishedBy'] = 'By FinishBy';
$lang->project->groups['closedBy'] = 'By ClosedBy';
$lang->project->groups['type'] = 'By Type';
@@ -192,7 +240,47 @@ $lang->project->aboveAllProduct = "All the above {$lang->productCommon}";
$lang->project->aboveAllProject = "All the above {$lang->projectCommon}";
/* 页面提示。*/
+<<<<<<< HEAD
+<<<<<<< HEAD
+$lang->project->selectProject = "Select {$lang->projectCommon}";
+$lang->project->beginAndEnd = 'Duration';
+$lang->project->begin = 'Begin';
+$lang->project->end = 'End';
+$lang->project->lblStats = 'Man-Hour Summary(h) : ';
+$lang->project->stats = '%s Available, %s Total Estimates, %s Cost, %s Left.';
+$lang->project->taskSummary = "Tasks on this page : %s Total, %s Wait, %s Doing; Hours : %s Est., %s Cost, %s Left.";
+$lang->project->checkedSummary = " %total% Checked, %wait% Wait, %doing% Doing; Hours: %estimate% Est., %consumed% Cost, %left% Left.";
+$lang->project->memberHoursAB = "%s has %s Hours";
+$lang->project->memberHours = '';
+$lang->project->countSummary = '';
+$lang->project->timeSummary = '';
+$lang->project->groupSummaryAB = "Tasks %s :Wait %s Doing %s
Est. %s :Cost %s Left %s
";
+$lang->project->wbs = "Work Breakdown";
+$lang->project->batchWBS = "Batch Work Breakdown";
+$lang->project->howToUpdateBurn = "Help ";
+$lang->project->whyNoStories = "No Story can be linked. Please check whether there is Story in {$lang->projectCommon} linked {$lang->productCommon} and make sure it has been reviewed.";
+$lang->project->productStories = "{$lang->projectCommon} linked story is the subeset of {$lang->productCommon}, which can only be linked after review. Please Link Story。";
+$lang->project->haveDraft = "There are %s draft stories that cannot be linked.";
+$lang->project->doneProjects = 'Done';
+$lang->project->selectDept = 'Select Department';
+$lang->project->selectDeptTitle = 'Select Department';
+$lang->project->copyTeam = 'Copy Team';
+$lang->project->copyFromTeam = "Copy from {$lang->projectCommon} Team: %s";
+$lang->project->noMatched = "No $lang->projectCommon including '%s'can be found.";
+$lang->project->copyTitle = "Choose a {$lang->projectCommon} to copy.";
+$lang->project->copyTeamTitle = "Choose {$lang->projectCommon}Team to copy.";
+$lang->project->copyNoProject = "No {$lang->projectCommon} can be copied.";
+$lang->project->copyFromProject = "Copy from {$lang->projectCommon} %s";
+$lang->project->cancelCopy = 'Cancel Copy';
+$lang->project->byPeriod = 'By Time';
+$lang->project->byUser = 'By User';
+$lang->project->noProject = 'No projects. ';
+$lang->project->noMembers = 'No members. ';
+=======
+$lang->project->linkStoryByPlanTips = 'It will link all stories in this plan to the project.';
+=======
$lang->project->linkStoryByPlanTips = "It will link all stories in this plan to the {$lang->projectCommon}.";
+>>>>>>> 58a5ce3d921a17cce37484db7696956508f5d454
$lang->project->selectProject = "Select {$lang->projectCommon}";
$lang->project->beginAndEnd = 'Duration';
$lang->project->begin = 'Begin';
@@ -227,6 +315,7 @@ $lang->project->byPeriod = 'By Time';
$lang->project->byUser = 'By User';
$lang->project->noProject = "No {$lang->projectCommon}. ";
$lang->project->noMembers = 'No members. ';
+>>>>>>> d3fa148cb3d0ea19eb92b37374b0ec4e2a64ec6f
/* 交互提示。*/
$lang->project->confirmDelete = "Do you want to delete {$lang->projectCommon}[%s]?";
@@ -267,8 +356,13 @@ $lang->project->charts->burn->graph->reference = 'Ideal';
$lang->project->charts->burn->graph->actuality = 'Actual';
$lang->project->placeholder = new stdclass();
+<<<<<<< HEAD
+$lang->project->placeholder->code = 'Alias of project name';
+$lang->project->placeholder->totalLeft = 'Estimates at the beginning of the Project.';
+=======
$lang->project->placeholder->code = "Abbreviation of {$lang->projectCommon} name";
$lang->project->placeholder->totalLeft = "Estimates at the beginning of the {$lang->projectCommon}.";
+>>>>>>> 58a5ce3d921a17cce37484db7696956508f5d454
$lang->project->selectGroup = new stdclass();
$lang->project->selectGroup->done = '(Done)';
diff --git a/module/release/lang/en.php b/module/release/lang/en.php
index beb48bcfde..cf47769209 100644
--- a/module/release/lang/en.php
+++ b/module/release/lang/en.php
@@ -17,7 +17,7 @@ $lang->release->linkBug = "Link Bug";
$lang->release->delete = "Delete";
$lang->release->deleted = 'Deleted';
$lang->release->view = "Overview";
-$lang->release->browse = "Browse";
+$lang->release->browse = "Release";
$lang->release->changeStatus = "Change Status";
$lang->release->batchUnlink = "Batch Unlink";
$lang->release->batchUnlinkStory = "Batch Unlink Story";
@@ -48,7 +48,7 @@ $lang->release->bugs = 'Resolved Bug';
$lang->release->leftBugs = 'Remained Bug';
$lang->release->generatedBugs = 'Remained Bug';
$lang->release->finishStories = 'Finished %s Story';
-$lang->release->resolvedBugs = 'Solved %s Bug';
+$lang->release->resolvedBugs = 'Resolved %s Bug';
$lang->release->createdBugs = 'Generated %s Bug';
$lang->release->export = 'Export as HTML';
$lang->release->yesterday = 'Released Yesterday';
@@ -69,4 +69,8 @@ $lang->release->changeStatusList['normal'] = 'Activate';
$lang->release->changeStatusList['terminate'] = 'Terminate';
$lang->release->action = new stdclass();
+<<<<<<< HEAD
+$lang->release->action->changestatus = array('main' => '$date, by $actor $extra。', 'extra' => 'changeStatusList');
+=======
$lang->release->action->changestatus = array('main' => '$date, $extra by $actor', 'extra' => 'changeStatusList');
+>>>>>>> 58a5ce3d921a17cce37484db7696956508f5d454
diff --git a/module/story/lang/en.php b/module/story/lang/en.php
index 1906223d38..5df2e1be34 100644
--- a/module/story/lang/en.php
+++ b/module/story/lang/en.php
@@ -36,9 +36,15 @@ $lang->story->bugCountAB = 'B';
$lang->story->caseCountAB = 'C';
$lang->story->linkStory = 'Link';
$lang->story->unlinkStory = 'UnLinked';
+<<<<<<< HEAD
+$lang->story->export = "Export Story";
+$lang->story->zeroCase = "Story w/o cases";
+$lang->story->zeroTask = "Display story w/o tasks";
+=======
$lang->story->export = "Export Data";
$lang->story->zeroCase = "Story w/o case";
$lang->story->zeroTask = "Story w/o task";
+>>>>>>> d3fa148cb3d0ea19eb92b37374b0ec4e2a64ec6f
$lang->story->reportChart = "Report";
$lang->story->copyTitle = "Copy Title";
$lang->story->batchChangePlan = "Batch Change Plans";
@@ -70,7 +76,11 @@ $lang->story->stage = 'Stage';
$lang->story->stageAB = 'Stage';
$lang->story->mailto = 'Mail to';
$lang->story->openedBy = 'Creator';
+<<<<<<< HEAD
+$lang->story->openedDate = 'Create';
+=======
$lang->story->openedDate = 'Created';
+>>>>>>> d3fa148cb3d0ea19eb92b37374b0ec4e2a64ec6f
$lang->story->assignedTo = 'Assignee';
$lang->story->assignedDate = 'Assigned';
$lang->story->lastEditedBy = 'Last Edited';
diff --git a/module/task/js/batchedit.js b/module/task/js/batchedit.js
index b181c7fdc6..e7fad9c273 100644
--- a/module/task/js/batchedit.js
+++ b/module/task/js/batchedit.js
@@ -12,7 +12,7 @@ $(document).on('change', 'select', function()
var tbody = $(this).closest('tr').parent();
var value = '';
- for(i = row - 1; i >= 0; i--)
+ for(var i = row - 1; i >= 0; i--)
{
value = tbody.children('tr').eq(i).find('td').eq(index).find('select').val();
if(value != 'ditto') break;
diff --git a/module/testcase/js/showimport.js b/module/testcase/js/showimport.js
new file mode 100644
index 0000000000..e2febaf3f1
--- /dev/null
+++ b/module/testcase/js/showimport.js
@@ -0,0 +1,13 @@
+$(document).on('change', '.moduleChange',function ajaxGetMouletStories(){
+ var moduleID = $(this).val();
+ if(typeof(moduleID) == 'undefined') moduleID = 0;
+ link = createLink('testcase', 'ajaxGetMouletStories', 'moduleID=' + moduleID);
+ $(this).parent('td').next('td').load(link, function(){$(this).parent('td').next('td').find('slect').chosen();});
+})
+
+$(document).on('change', '.storyChange',function ajaxGetStoryMoule(){
+ var storyID = $(this).val();
+ if(typeof(storyID) == 'undefined') storyID = 0;
+ link = createLink('testcase', 'ajaxGetStoryMoule', 'storyID=' + storyID);
+ $(this).parent('td').prev('td').load(link, function(){$(this).parent('td').prev('td').find('slect').chosen();});
+})
diff --git a/module/testcase/lang/en.php b/module/testcase/lang/en.php
index b1ac6ac051..c7e4bbee34 100644
--- a/module/testcase/lang/en.php
+++ b/module/testcase/lang/en.php
@@ -12,7 +12,7 @@
$lang->testcase->id = 'ID';
$lang->testcase->product = $lang->productCommon;
$lang->testcase->module = 'Module';
-$lang->testcase->lib = "Library";
+$lang->testcase->lib = "Case Library";
$lang->testcase->branch = "Branch/Platform";
$lang->testcase->moduleAB = 'Module';
$lang->testcase->story = 'Story';
@@ -50,12 +50,12 @@ $lang->testcase->assignedTo = 'To';
$lang->testcase->colorTag = 'Color Tag';
$lang->testcase->lastRunResult = 'Result';
$lang->testcase->desc = 'Step';
-$lang->testcase->expect = 'Expect';
+$lang->testcase->expect = 'Expectation';
$lang->testcase->allProduct = "All {$lang->productCommon}";
$lang->testcase->fromBug = 'From Bug';
$lang->testcase->toBug = 'To Bug';
$lang->testcase->changed = 'Changed';
-$lang->testcase->bugs = 'Bugs Generated';
+$lang->testcase->bugs = 'Bugs Reported';
$lang->testcase->bugsAB = 'B';
$lang->testcase->results = 'Results';
$lang->testcase->resultsAB = 'R';
@@ -120,11 +120,16 @@ $lang->testcase->deleteStep = 'Delete';
$lang->testcase->insertBefore = 'Inserted Before';
$lang->testcase->insertAfter = 'Inserted After';
-$lang->testcase->assignToMe = 'Assigned To Me';
-$lang->testcase->openedByMe = 'Created By Me';
+$lang->testcase->assignToMe = 'AssignToMe';
+$lang->testcase->openedByMe = 'CreateByMe';
$lang->testcase->allCases = 'All';
+<<<<<<< HEAD
$lang->testcase->allTestcases = 'All Case';
$lang->testcase->needConfirm = 'Story Changed';
+=======
+$lang->testcase->allTestcases = 'All Cases';
+$lang->testcase->needConfirm = 'Changed Story';
+>>>>>>> 1f8899a84819dad5ffe811c8eb667fd33e01136f
$lang->testcase->bySearch = 'Search';
$lang->testcase->unexecuted = 'Wait';
@@ -144,7 +149,7 @@ $lang->testcase->summary = "Case on this page : %s T
$lang->testcase->confirmDelete = 'Do you want to delete this Test Case?';
$lang->testcase->confirmBatchDelete = 'Do you want to batch delete these Test Cases?';
$lang->testcase->ditto = 'Ditto';
-$lang->testcase->dittoNotice = 'This Case does not belong to the Product as the previous one!';
+$lang->testcase->dittoNotice = 'This Case does not belong to the Product as the last one!';
$lang->testcase->reviewList[0] = 'NO';
$lang->testcase->reviewList[1] = 'YES';
diff --git a/module/testcase/view/showimport.html.php b/module/testcase/view/showimport.html.php
index df0a4e4b0b..aa6a3f1f80 100644
--- a/module/testcase/view/showimport.html.php
+++ b/module/testcase/view/showimport.html.php
@@ -58,8 +58,11 @@
?>
title, ENT_QUOTES), "class='form-control'")?> |
- 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'")?> |
+
+ module) ? $case->module : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->module : ''), "class='form-control chosen moduleChange'")?>
+ |
+
+ story) ? $case->story : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->story : ''), "class='form-control chosen storyChange'")?> |
testcase->priList, isset($case->pri) ? $case->pri : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->pri : ''), "class='form-control chosen'")?> |
testcase->typeList, $case->type, "class='form-control chosen'")?> |
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'")?> |
diff --git a/module/testreport/lang/en.php b/module/testreport/lang/en.php
index ee550aac30..97e454f54c 100644
--- a/module/testreport/lang/en.php
+++ b/module/testreport/lang/en.php
@@ -19,7 +19,11 @@ $lang->testreport->owner = 'Owner';
$lang->testreport->members = 'Members';
$lang->testreport->begin = 'Begin';
$lang->testreport->end = 'End';
+<<<<<<< HEAD
+$lang->testreport->stories = 'Story of Test';
+=======
$lang->testreport->stories = 'Test Story';
+>>>>>>> d3fa148cb3d0ea19eb92b37374b0ec4e2a64ec6f
$lang->testreport->bugs = 'Bugs';
$lang->testreport->builds = 'Build Info';
$lang->testreport->goal = 'Project Goal';
@@ -36,7 +40,11 @@ $lang->testreport->all = 'All Report';
$lang->testreport->deleted = 'Deleted';
$lang->testreport->legendBasic = 'Basic Info';
+<<<<<<< HEAD
+$lang->testreport->legendStoryAndBug = 'Story and Bug of Test';
+=======
$lang->testreport->legendStoryAndBug = 'Story&Bug';
+>>>>>>> 58a5ce3d921a17cce37484db7696956508f5d454
$lang->testreport->legendBuild = 'Build Info';
$lang->testreport->legendCase = 'Linked Case';
$lang->testreport->legendLegacyBugs = 'Legacy Bug';
@@ -47,17 +55,49 @@ $lang->testreport->legendMore = 'More';
$lang->testreport->bugSeverityGroups = 'Bug Severity Distribution';
$lang->testreport->bugTypeGroups = 'Bug Type Distribution';
$lang->testreport->bugStatusGroups = 'Bug Status Distribution';
+<<<<<<< HEAD
+$lang->testreport->bugOpenedByGroups = 'Bug ReportBy Distribution';
+=======
$lang->testreport->bugOpenedByGroups = 'Bug CreateBy Distribution';
+>>>>>>> d3fa148cb3d0ea19eb92b37374b0ec4e2a64ec6f
$lang->testreport->bugResolvedByGroups = 'Bug ResolveBy Distribution';
$lang->testreport->bugResolutionGroups = 'Bug Resolution Distribution';
$lang->testreport->bugModuleGroups = 'Bug Module Distribution';
+<<<<<<< HEAD
+$lang->testreport->legacyBugs = 'Legacy Bugs';
+$lang->testreport->bugConfirmedRate = 'Confirmed Bug Rate (Resolution is fixed or postponed / status is resolved or closed)';
+$lang->testreport->bugCreateByCaseRate = 'Bug Created in Case Rate (Bugs reported in cases / Newly added bugs)';
+=======
$lang->testreport->legacyBugs = 'Legacy Bug';
$lang->testreport->bugConfirmedRate = 'Confirmed Bug Rate (Solution is fixed or postponed / status is resolved or closed)';
$lang->testreport->bugCreateByCaseRate = 'Bug Created in Case Rate (Bugs created in cases / Newly added bugs)';
+>>>>>>> 58a5ce3d921a17cce37484db7696956508f5d454
$lang->testreport->caseSummary = ' %s cases in Total : %s performed, %s results, %s failed.';
$lang->testreport->buildSummary = 'Tested %s build.';
+<<<<<<< HEAD
+$lang->testreport->confirmDelete = 'Do you want tot delete this report?';
+$lang->testreport->moreNotice = 'More features can be extended with reference to the ZenTao extension mechanism, or you can contact us for customization.';
+$lang->testreport->exportNotice = "Export By ZenTaoPMS";
+$lang->testreport->noReport = "No report has been generated. Please check it later.";
+$lang->testreport->foundBugTip = "Bugs reported in this build and in the test period.";
+$lang->testreport->legacyBugTip = "Active bugs, or bugs that are resolved beyond the test period.";
+$lang->testreport->fromCaseBugTip = "Bugs reported after case-failure in the test period.";
+$lang->testreport->errorTrunk = "The trunk version cannot create a test report. Please modify the related version!";
+$lang->testreport->moreProduct = "A test report can only be generated for the same product.";
+=======
$lang->testreport->confirmDelete = 'Do you want to delete this report?';
+<<<<<<< HEAD
+$lang->testreport->moreNotice = 'More features can be extended with reference to the ZenTao extension manual, or you can contact us at renee@easysoft.ltd for customization.';
+$lang->testreport->exportNotice = "Exported By ZenTaoPMS";
+$lang->testreport->noReport = "No report has been generated. Please check it later.";
+$lang->testreport->foundBugTip = "Bugs created in this build and created in the test period.";
+$lang->testreport->legacyBugTip = "Active Bugs, or the resolved beyond the test period.";
+$lang->testreport->fromCaseBugTip = "Bugs created after failed cases in the test period.";
+$lang->testreport->errorTrunk = "The trunk cannot create a QA report for. Please modify the linked build!";
+$lang->testreport->moreProduct = "You can only create QA reports for the same product.";
+>>>>>>> d3fa148cb3d0ea19eb92b37374b0ec4e2a64ec6f
+=======
$lang->testreport->moreNotice = 'More features can be extended with reference to the ZenTao manual, or you can contact us at renee@easysoft.ltd for customization.';
$lang->testreport->exportNotice = "Exported By ZenTao";
$lang->testreport->noReport = "No report has been generated yet.";
@@ -66,10 +106,11 @@ $lang->testreport->legacyBugTip = "Active Bugs, or bugs that are resolved afte
$lang->testreport->fromCaseBugTip = "Bugs reported due to failed cases in this test.";
$lang->testreport->errorTrunk = "The trunk cannot generate a QA report. Modify the linked build!";
$lang->testreport->moreProduct = "You can only generate QA reports for the same product.";
+>>>>>>> 58a5ce3d921a17cce37484db7696956508f5d454
$lang->testreport->bugSummary = <<%s Bug(s) generated in total ,
+%s Bug(s) reported in total ,
%s Bug(s) remained unresolve ,
%s Bug(s) failure of case .
-Bug Effective Rate : %s,Bugs created from case Rate: %s
+Bug Effective Rate : %s,Bugs reportted from case rate: %s
EOD;
diff --git a/module/testsuite/lang/en.php b/module/testsuite/lang/en.php
index 950db4f807..5e050b3644 100644
--- a/module/testsuite/lang/en.php
+++ b/module/testsuite/lang/en.php
@@ -18,12 +18,21 @@ $lang->testsuite->browse = "Suite List";
$lang->testsuite->linkCase = "Link Case";
$lang->testsuite->linkVersion = "Version";
$lang->testsuite->unlinkCase = "Unlink";
+<<<<<<< HEAD
+$lang->testsuite->batchUnlinkCases = "Batch unlink case";
+$lang->testsuite->deleted = 'Deleted';
+$lang->testsuite->exportTemplet = 'Export template';
+$lang->testsuite->batchCreateCase = 'Batch create case';
+$lang->testsuite->import = 'Import';
+$lang->testsuite->showImport = 'Show imported data';
+=======
$lang->testsuite->batchUnlinkCases = "Batch Unlink Case";
$lang->testsuite->deleted = 'Deleted';
$lang->testsuite->exportTemplet = 'Export template';
$lang->testsuite->batchCreateCase = 'Batch Create Case';
$lang->testsuite->import = 'Import';
$lang->testsuite->showImport = 'Show Imported Data';
+>>>>>>> d3fa148cb3d0ea19eb92b37374b0ec4e2a64ec6f
$lang->testsuite->successSaved = 'Saved';
$lang->testsuite->common = 'Test Suite';
diff --git a/module/user/js/common.js b/module/user/js/common.js
index 9571002df6..8cbd43f8ca 100644
--- a/module/user/js/common.js
+++ b/module/user/js/common.js
@@ -1,8 +1,8 @@
/**
- * Switch account
- *
- * @param string $account
- * @param string $method
+ * Switch account
+ *
+ * @param string $account
+ * @param string $method
* @access public
* @return void
*/
@@ -34,7 +34,7 @@ function switchAccount(account, method)
}
var mailsuffix = '';
-var account = new Array();
+var account = [];
function setDefaultEmail(num)
{
var mailValue = $('.email_' + num).val();
diff --git a/module/user/model.php b/module/user/model.php
index fd646117f7..8d1c10066f 100644
--- a/module/user/model.php
+++ b/module/user/model.php
@@ -91,6 +91,7 @@ class userModel extends model
$users = $this->dao->select($fields)->from(TABLE_USER)
->where('1')
->beginIF(strpos($params, 'nodeleted') !== false or empty($this->config->user->showDeleted))->andWhere('deleted')->eq('0')->fi()
+ ->andWhere('role')->ne('market')
->orderBy($orderBy)
->fetchAll('account');
if($usersToAppended) $users += $this->dao->select($fields)->from(TABLE_USER)->where('account')->in($usersToAppended)->fetchAll('account');
diff --git a/www/js/zui/min.js b/www/js/zui/min.js
index a0de6bc3e9..015017db94 100644
--- a/www/js/zui/min.js
+++ b/www/js/zui/min.js
@@ -1,5 +1,5 @@
/*!
- * ZUI: Zentao template - v1.9.0 - 2019-03-21
+ * ZUI: Zentao template - v1.9.0 - 2019-04-16
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2019 cnezsoft.com; Licensed MIT
@@ -16,8 +16,8 @@ function(t,e,i){"$:nomunge";function n(){o=e[r](function(){s.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(a," ")),r.json?JSON.parse(t):t}catch(e){}}function s(e,i){var n=r.raw?e:o(e);return t.isFunction(i)?i(n):n}var a=/\+/g,r=t.cookie=function(o,a,l){if(void 0!==a&&!t.isFunction(a)){if(l=t.extend({},r.defaults,l),"number"==typeof l.expires){var h=l.expires,c=l.expires=new Date;c.setTime(+c+864e5*h)}return document.cookie=[e(o),"=",n(a),l.expires?"; expires="+l.expires.toUTCString():"",l.path?"; path="+l.path:"",l.domain?"; domain="+l.domain:"",l.secure?"; secure":""].join("")}for(var d=o?void 0:{},u=document.cookie?document.cookie.split("; "):[],p=0,f=u.length;p=0;t--)delete this.page[i[t]];this.set(s,this.page)}},a.prototype.pageRemove=function(t){"undefined"!=typeof this.page[t]&&(this.page[t]=null,this.pageSave())},a.prototype.pageClear=function(){this.page={},this.pageSave()},a.prototype.pageGet=function(t,e){var i=this.page[t];return void 0===e||null!==i&&void 0!==i?i:e},a.prototype.pageSet=function(t,i){e.isPlainObject(t)?e.extend(!0,this.page,t):this.page[this.serialize(t)]=i,this.pageSave()},a.prototype.check=function(){if(!this.enable&&!this.slience)throw new Error("Browser not support localStorage or enable status been set true.");return this.enable},a.prototype.length=function(){return this.check()?i.getLength?i.getLength():i.length:0},a.prototype.removeItem=function(t){return i.removeItem(t),this},a.prototype.remove=function(t){return this.removeItem(t)},a.prototype.getItem=function(t){return i.getItem(t)},a.prototype.get=function(t,e){var i=this.deserialize(this.getItem(t));return"undefined"!=typeof i&&null!==i||"undefined"==typeof e?i:e},a.prototype.key=function(t){return i.key(t)},a.prototype.setItem=function(t,e){return i.setItem(t,e),this},a.prototype.set=function(t,e){return void 0===e?this.remove(t):(this.setItem(t,this.serialize(e)),this)},a.prototype.clear=function(){return i.clear(),this},a.prototype.forEach=function(t){for(var e=this.length(),n=e-1;n>=0;n--){var o=i.key(n);t(o,this.get(o))}return this},a.prototype.getAll=function(){var t={};return this.forEach(function(e,i){t[e]=i}),t},a.prototype.serialize=function(t){return"string"==typeof t?t:JSON.stringify(t)},a.prototype.deserialize=function(t){if("string"==typeof t)try{return JSON.parse(t)}catch(e){return t||void 0}},e.zui({store:new a})}(window,jQuery),function(t){"use strict";var e="zui.searchBox",i=function(e,n){var o=this;o.name=name,o.$=t(e),o.options=n=t.extend({},i.DEFAULTS,o.$.data(),n);var s=o.$.is(n.inputSelector)?o.$:o.$.find(n.inputSelector);if(s.length){var a=function(){o.changeTimer&&(clearTimeout(o.changeTimer),o.changeTimer=null)},r=function(){a();var t=o.getSearch();if(t!==o.lastValue){var e=""===t;s.toggleClass("empty",e),o.$.callComEvent(o,"onSearchChange",[t,e]),o.lastValue=t}};o.$input=s=s.first(),s.on(n.listenEvent,function(t){o.changeTimer=setTimeout(function(){r()},n.changeDelay)}).on("focus",function(t){s.addClass("focus"),o.$.callComEvent(o,"onFocus",[t])}).on("blur",function(t){s.removeClass("focus"),o.$.callComEvent(o,"onBlur",[t])}).on("keydown",function(t){var e=0,i=t.which;27===i&&n.escToClear?(this.setSearch("",!0),r(),e=1):13===i&&n.onPressEnter&&(r(),o.$.callComEvent(o,"onPressEnter",[t]));var s=o.$.callComEvent(o,"onKeyDown",[t]);s===!1&&(e=1),e&&t.preventDefault()}),o.$.on("click",".search-clear-btn",function(t){o.setSearch("",!0),r(),o.focus(),t.preventDefault()}),r()}else console.error("ZUI: search box init error, cannot find search box input element.")};i.DEFAULTS={inputSelector:'input[type="search"],input[type="text"]',listenEvent:"change input paste",changeDelay:500},i.prototype.getSearch=function(){return this.$input&&t.trim(this.$input.val())},i.prototype.setSearch=function(t,e){var i=this.$input;i&&(i.val(t),e||i.trigger("change"))},i.prototype.focus=function(){this.$input&&this.$input.focus()},t.fn.searchBox=function(n){return this.each(function(){var o=t(this),s=o.data(e),a="object"==typeof n&&n;s||o.data(e,s=new i(this,a)),"string"==typeof n&&s[n]()})},i.NAME=e,t.fn.searchBox.Constructor=i}(jQuery),function(t,e){"use strict";var i="zui.draggable",n={container:"body",move:!0},o=0,s=function(e,i){var s=this;s.$=t(e),s.id=o++,s.options=t.extend({},n,s.$.data(),i),s.init()};s.DEFAULTS=n,s.NAME=i,s.prototype.init=function(){var n,o,s,a,r,l=this,h=l.$,c="before",d="drag",u="finish",p="."+i+"."+l.id,f="mousedown"+p,g="mouseup"+p,m="mousemove"+p,v=l.options,y=v.selector,b=v.handle,w=h,x=t.isFunction(v.move),C=function(t){var e=t.pageX,i=t.pageY;r=!0;var o={left:e-s.x,top:i-s.y};w.removeClass("drag-ready").addClass("dragging"),v.move&&(x?v.move(o,w):w.css(o)),v[d]&&v[d]({event:t,element:w,startOffset:s,pos:o,offset:{x:e-n.x,y:i-n.y},smallOffset:{x:e-a.x,y:i-a.y}}),a.x=e,a.y=i,v.stopPropagation&&t.stopPropagation()},_=function(i){if(t(e).off(p),!r)return void w.removeClass("drag-ready");var o={left:i.pageX-s.x,top:i.pageY-s.y};w.removeClass("drag-ready dragging"),v.move&&(x?v.move(o,w):w.css(o)),v[u]&&v[u]({event:i,element:w,startOffset:s,pos:o,offset:{x:i.pageX-n.x,y:i.pageY-n.y},smallOffset:{x:i.pageX-a.x,y:i.pageY-a.y}}),i.preventDefault(),v.stopPropagation&&i.stopPropagation()},k=function(i){var l=t.zui.getMouseButtonCode(v.mouseButton);if(!(l>-1&&i.button!==l)){var h=t(this);if(y&&(w=b?h.closest(y):h),v[c]){var d=v[c]({event:i,element:w});if(d===!1)return}var u=t(v.container),p=w.offset();o=u.offset(),n={x:i.pageX,y:i.pageY},s={x:i.pageX-p.left+o.left,y:i.pageY-p.top+o.top},a=t.extend({},n),r=!1,w.addClass("drag-ready"),i.preventDefault(),v.stopPropagation&&i.stopPropagation(),t(e).on(m,C).on(g,_)}};b?h.on(f,b,k):y?h.on(f,y,k):h.on(f,k)},s.prototype.destroy=function(){var n="."+i+"."+this.id;this.$.off(n),t(e).off(n),this.$.data(i,null)},t.fn.draggable=function(e){return this.each(function(){var n=t(this),o=n.data(i),a="object"==typeof e&&e;o||n.data(i,o=new s(this,a)),"string"==typeof e&&o[e]()})},t.fn.draggable.Constructor=s}(jQuery,document),function(t,e,i){"use strict";var n="zui.droppable",o={target:".droppable-target",deviation:5,sensorOffsetX:0,sensorOffsetY:0,dropToClass:"drop-to"},s=0,a=function(e,i){var n=this;n.id=s++,n.$=t(e),n.options=t.extend({},o,n.$.data(),i),n.init()};a.DEFAULTS=o,a.NAME=n,a.prototype.trigger=function(e,i){return t.zui.callEvent(this.options[e],i,this)},a.prototype.init=function(){var o,s,a,r,l,h,c,d,u,p,f,g,m,v=this,y=v.$,b=v.options,w=b.deviation,x="."+n+"."+v.id,C="mousedown"+x,_="mouseup"+x,k="mousemove"+x,T=b.selector,S=b.handle,D=b.flex,M=b.container,P=b.canMoveHere,F=b.dropToClass,L=y,z=!1,I=M?t(b.container).first():T?y:t("body"),$=function(e){if(z&&(f={left:e.pageX,top:e.pageY},!(i.abs(f.left-d.left)s&&f.top>a&&f.left-1&&i.button!==n)){var f=t(this);T&&(L=S?f.closest(T):f),L.hasClass("drag-shadow")||b.before&&b.before({event:i,element:L})===!1||(z=!0,o=t.isFunction(b.target)?b.target(L,y):I.find(b.target),s=null,a=null,r=!1,l=!0,h=null,c=L.offset(),u=I.offset(),u.top=u.top-I.scrollTop(),u.left=u.left-I.scrollLeft(),d={left:i.pageX,top:i.pageY},g=t.extend({},d),p={left:d.left-c.left,top:d.top-c.top},L.addClass("drag-from"),t(e).on(k,$).on(_,E),m=setTimeout(function(){t(e).on(C,E)},10),i.preventDefault(),b.stopPropagation&&i.stopPropagation())}};S?y.on(C,S,A):T?y.on(C,T,A):y.on(C,A)},a.prototype.destroy=function(){var i="."+n+"."+this.id;this.$.off(i),t(e).off(i),this.$.data(n,null)},a.prototype.reset=function(){this.destroy(),this.init()},t.fn.droppable=function(e){return this.each(function(){var i=t(this),o=i.data(n),s="object"==typeof e&&e;o||i.data(n,o=new a(this,s)),"string"==typeof e&&o[e]()})},t.fn.droppable.Constructor=a}(jQuery,document,Math),+function(t,e){"use strict";function i(e,i,s){return this.each(function(){var a=t(this),r=a.data(n),l=t.extend({},o.DEFAULTS,a.data(),"object"==typeof e&&e);r||a.data(n,r=new o(this,l)),"string"==typeof e?r[e](i,s):l.show&&r.show(i,s)})}var n="zui.modal",o=function(i,o){var s=this;s.options=o,s.$body=t(document.body),s.$element=t(i),s.$backdrop=s.isShown=null,s.scrollbarWidth=0,o.moveable===e&&(s.options.moveable=s.$element.hasClass("modal-moveable")),o.remote&&s.$element.find(".modal-content").load(o.remote,function(){s.$element.trigger("loaded."+n)})};o.VERSION="3.2.0",o.TRANSITION_DURATION=300,o.BACKDROP_TRANSITION_DURATION=150,o.DEFAULTS={backdrop:!0,keyboard:!0,show:!0,position:"fit"};var s=function(e,i){var n=t(window);i.left=Math.max(0,Math.min(i.left,n.width()-e.outerWidth())),i.top=Math.max(0,Math.min(i.top,n.height()-e.outerHeight())),e.css(i)};o.prototype.toggle=function(t,e){return this.isShown?this.hide():this.show(t,e)},o.prototype.ajustPosition=function(i){var o=this,a=o.options;if(i===e&&(i=a.position),i!==e&&null!==i){t.isFunction(i)&&(i=i(o));var r=o.$element.find(".modal-dialog"),l=t(window).height(),h={maxHeight:"initial",overflow:"visible"},c=r.find(".modal-body").css(h);if(a.scrollInside){var d=a.headerHeight;"number"!=typeof d?d=r.find(".modal-header").height():t.isFunction(d)&&(d=d($header)),h.maxHeight=l-d,c.outerHeight()>h.maxHeight&&(h.overflow="auto")}c.css(h);var u=Math.max(0,(l-r.outerHeight())/2);if("fit"===i?i={top:u>50?Math.floor(2*u/3):u}:"center"===i?i={top:u}:t.isPlainObject(i)||(i={top:i}),r.hasClass("modal-moveable")){var p=null,f=a.rememberPos;f&&(f===!0?p=o.$element.data("modal-pos"):t.zui.store&&(p=t.zui.store.pageGet(n+".rememberPos."+f))),i=t.extend(i,{left:Math.max(0,(t(window).width()-r.outerWidth())/2)},p),"inside"===a.moveable?s(r,i):r.css(i)}else r.css(i)}},o.prototype.setMoveale=function(){t.fn.draggable||console.error("Moveable modal requires draggable.js.");var e=this,i=e.options,o=e.$element.find(".modal-dialog").removeClass("modal-dragged");o.toggleClass("modal-moveable",!!i.moveable),e.$element.data("modal-moveable-setup")||o.draggable({container:e.$element,handle:".modal-header",before:function(){var t=o.css("margin-top");t&&"0px"!==t&&o.css("top",t).css("margin-top","").addClass("modal-dragged")},finish:function(o){var s=i.rememberPos;s&&(e.$element.data("modal-pos",o.pos),t.zui.store&&s!==!0&&t.zui.store.pageSet(n+".rememberPos."+s,o.pos))},move:"inside"!==i.moveable||function(t){s(o,t)}})},o.prototype.show=function(e,i){var s=this,a=t.Event("show."+n,{relatedTarget:e});s.$element.trigger(a),s.$element.toggleClass("modal-scroll-inside",!!s.options.scrollInside),s.isShown||a.isDefaultPrevented()||(s.isShown=!0,s.options.moveable&&s.setMoveale(),s.checkScrollbar(),s.options.backdrop!==!1&&(s.$body.addClass("modal-open"),s.setScrollbar()),s.escape(),s.$element.on("click.dismiss."+n,'[data-dismiss="modal"]',function(t){s.hide(),t.stopPropagation()}),s.backdrop(function(){var a=t.support.transition&&s.$element.hasClass("fade");s.$element.parent().length||s.$element.appendTo(s.$body),s.$element.show().scrollTop(0),a&&s.$element[0].offsetWidth,s.$element.addClass("in").attr("aria-hidden",!1),s.ajustPosition(i),s.enforceFocus();var r=t.Event("shown."+n,{relatedTarget:e});a?s.$element.find(".modal-dialog").one("bsTransitionEnd",function(){s.$element.trigger("focus").trigger(r)}).emulateTransitionEnd(o.TRANSITION_DURATION):s.$element.trigger("focus").trigger(r)}))},o.prototype.hide=function(e){e&&e.preventDefault();var i=this;e=t.Event("hide."+n),i.$element.trigger(e),i.isShown&&!e.isDefaultPrevented()&&(i.isShown=!1,i.options.backdrop!==!1&&(i.$body.removeClass("modal-open"),i.resetScrollbar()),i.escape(),t(document).off("focusin."+n),i.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss."+n),t.support.transition&&i.$element.hasClass("fade")?i.$element.one("bsTransitionEnd",t.proxy(i.hideModal,i)).emulateTransitionEnd(o.TRANSITION_DURATION):i.hideModal())},o.prototype.enforceFocus=function(){t(document).off("focusin."+n).on("focusin."+n,t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},o.prototype.escape=function(){this.isShown&&this.options.keyboard?t(document).on("keydown.dismiss."+n,t.proxy(function(i){if(27==i.which){var o=t.Event("escaping."+n),s=this.$element.triggerHandler(o,"esc");if(s!=e&&!s)return;this.hide()}},this)):this.isShown||t(document).off("keydown.dismiss."+n)},o.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$element.trigger("hidden."+n)})},o.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},o.prototype.backdrop=function(e){var i=this,s=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var a=t.support.transition&&s;if(this.$backdrop=t('').appendTo(this.$body),this.$element.on("mousedown.dismiss."+n,t.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),a&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;a?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(o.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var r=function(){i.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",r).emulateTransitionEnd(o.BACKDROP_TRANSITION_DURATION):r()}else e&&e()},o.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},o.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",t+this.scrollbarWidth)},o.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},o.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var a=t.fn.modal;t.fn.modal=i,t.fn.modal.Constructor=o,t.fn.modal.noConflict=function(){return t.fn.modal=a,this},t(document).on("click."+n+".data-api",'[data-toggle="modal"]',function(e){var o=t(this),s=o.attr("href"),a=null;try{a=t(o.attr("data-target")||s&&s.replace(/.*(?=#[^\s]+$)/,""))}catch(r){return}if(a.length){var l=a.data(n)?"toggle":t.extend({remote:!/#/.test(s)&&s},a.data(),o.data());o.is("a")&&e.preventDefault(),a.one("show."+n,function(t){t.isDefaultPrevented()||a.one("hidden."+n,function(){o.is(":visible")&&o.trigger("focus")})}),i.call(a,l,this,o.data("position"))}})}(jQuery,void 0),function(t,e,i){"use strict";if(!t.fn.modal)throw new Error("Modal trigger requires modal.js");var n="zui.modaltrigger",o="ajax",s=".zui.modal",a="string",r=function(e,i){e=t.extend({},r.DEFAULTS,t.ModalTriggerDefaults,i?i.data():null,e),this.isShown,this.$trigger=i,this.options=e,this.id=t.zui.uuid()};r.DEFAULTS={type:"custom",height:"auto",name:"triggerModal",fade:!0,position:"fit",showHeader:!0,delay:0,backdrop:!0,keyboard:!0,waittime:0,loadingIcon:"icon-spinner-indicator",scrollInside:!1},r.prototype.init=function(i){var r=this;if(i.url&&(!i.type||i.type!=o&&"iframe"!=i.type)&&(i.type=o),i.remote)i.type=o,typeof i.remote===a&&(i.url=i.remote);else if(i.iframe)i.type="iframe",typeof i.iframe===a&&(i.url=i.iframe);else if(i.custom&&(i.type="custom",typeof i.custom===a)){var l;try{l=t(i.custom)}catch(h){}l&&l.length?i.custom=l:t.isFunction(e[i.custom])&&(i.custom=e[i.custom])}var c=t("#"+i.name);c.length&&(r.isShown||c.off(s),c.remove()),c=t(''+("string"==typeof i.loadingIcon&&0===i.loadingIcon.indexOf("icon-")?'
':i.loadingIcon)+'
').appendTo("body").data(n,r);var d=function(e,n){var o=i[e];t.isFunction(o)&&c.on(n+s,o)};d("onShow","show"),d("shown","shown"),d("onHide","hide"),d("hidden","hidden"),d("loaded","loaded"),c.on("shown"+s,function(){r.isShown=!0}).on("hidden"+s,function(){r.isShown=!1}),this.$modal=c,this.$dialog=c.find(".modal-dialog"),i.mergeOptions&&(this.options=i)},r.prototype.show=function(i){var s=t.extend({},this.options,{url:this.$trigger?this.$trigger.attr("href")||this.$trigger.attr("data-url")||this.$trigger.data("url"):this.options.url},i);this.init(s);var r=this,l=this.$modal,h=this.$dialog,c=s.custom,d=h.find(".modal-body").css("padding",""),u=h.find(".modal-header"),p=h.find(".modal-content");l.toggleClass("fade",s.fade).addClass(s.className).toggleClass("modal-loading",!this.isShown).toggleClass("modal-scroll-inside",!!s.scrollInside),h.toggleClass("modal-md","md"===s.size).toggleClass("modal-sm","sm"===s.size).toggleClass("modal-lg","lg"===s.size).toggleClass("modal-fullscreen","fullscreen"===s.size),u.toggle(s.showHeader),u.find(".modal-icon").attr("class","modal-icon icon-"+s.icon),u.find(".modal-title-name").text(s.title||""),s.size&&"fullscreen"===s.size&&(s.width="",s.height="");var f=function(){clearTimeout(this.resizeTask),this.resizeTask=setTimeout(function(){r.ajustPosition(s.position)},100)},g=function(t,e){return"undefined"==typeof t&&(t=s.delay),setTimeout(function(){h=l.find(".modal-dialog"),s.width&&"auto"!=s.width&&h.css("width",s.width),s.height&&"auto"!=s.height&&(h.css("height",s.height),"iframe"===s.type&&d.css("height",h.height()-u.outerHeight())),r.ajustPosition(s.position),l.removeClass("modal-loading"),"iframe"!=s.type&&h.off("resize."+n).on("resize."+n,f),e&&e()},t)};if("custom"===s.type&&c)if(t.isFunction(c)){var m=c({modal:l,options:s,modalTrigger:r,ready:g});typeof m===a&&(d.html(m),g())}else c instanceof t?(d.html(t("").append(c.clone()).html()),g()):(d.html(c),g());else if(s.url){var v=function(){var t=l.callComEvent(r,"broken");t&&(d.html(t),g())};if(l.attr("ref",s.url),"iframe"===s.type){l.addClass("modal-iframe"),this.firstLoad=!0;var y="iframe-"+s.name;u.detach(),d.detach(),p.empty().append(u).append(d),d.css("padding",0).html('
'),s.waittime>0&&(r.waitTimeout=g(s.waittime,v));var b=document.getElementById(y);b.onload=b.onreadystatechange=function(){var i=!!s.scrollInside;if(r.firstLoad&&l.addClass("modal-loading"),!this.readyState||"complete"==this.readyState){r.firstLoad=!1,s.waittime>0&&clearTimeout(r.waitTimeout);try{l.attr("ref",b.contentWindow.location.href);var o=e.frames[y].$;if(o&&"auto"===s.height&&"fullscreen"!=s.size){var a=o("body").addClass("body-modal").toggleClass("body-modal-scroll-inside",i);s.iframeBodyClass&&a.addClass(s.iframeBodyClass);var h=[],c=function(n){l.removeClass("fade");var o=a.outerHeight();if(n===!0&&s.onlyIncreaseHeight&&(o=Math.max(o,d.data("minModalHeight")||0),d.data("minModalHeight",o)),i){var r=s.headerHeight;"number"!=typeof r?r=u.height():t.isFunction(r)&&(r=r(u));var c=t(e).height();o=Math.min(o,c-r)}for(h.length>1&&o===h[0]&&(o=Math.max(o,h[1])),h.push(o);h.length>2;)h.shift();d.css("height",o),s.fade&&l.addClass("fade"),g()};l.callComEvent(r,"loaded",{modalType:"iframe",jQuery:o}),setTimeout(c,100),a.off("resize."+n).on("resize."+n,c),i&&t(e).off("resize."+n).on("resize."+n,c)}else g()}catch(p){g()}}}}else t.ajax(t.extend({url:s.url,success:function(i){try{var n=t(i);n.filter(".modal-dialog").length?h.replaceWith(n):n.filter(".modal-content").length?h.find(".modal-content").replaceWith(n):d.wrapInner(n)}catch(s){e.console&&e.console.warn&&console.warn("ZUI: Cannot recogernize remote content.",{error:s,data:i}),l.html(i)}l.callComEvent(r,"loaded",{modalType:o}),g()},error:v},s.ajaxOptions))}l.modal({show:"show",backdrop:s.backdrop,moveable:s.moveable,rememberPos:s.rememberPos,keyboard:s.keyboard,scrollInside:s.scrollInside})},r.prototype.close=function(i,n){var o=this;(i||n)&&o.$modal.on("hidden"+s,function(){t.isFunction(i)&&i(),typeof n===a&&n.length&&!o.$modal.data("cancel-reload")&&("this"===n?e.location.reload():e.location=n)}),o.$modal.modal("hide")},r.prototype.toggle=function(t){this.isShown?this.close():this.show(t)},r.prototype.ajustPosition=function(e){e=e===i?this.options.position:e,t.isFunction(e)&&(e=e(this)),this.$modal.modal("ajustPosition",e)},t.zui({ModalTrigger:r,modalTrigger:new r}),t.fn.modalTrigger=function(e,i){return t(this).each(function(){var o=t(this),s=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);s||o.data(n,s=new r(l,o)),typeof e==a?s[e](i):l.show&&s.show(i),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}),s.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 h=function(e){return e=t(e?e:".modal.modal-trigger"),e&&e instanceof t?e:null},c=function(i,o,s){var a=i;if(t.isFunction(i)){var r=s;s=o,o=i,i=r}i=h(i),i&&i.length?i.each(function(){t(this).data(n).close(o,s)}):t("body").hasClass("modal-open")||t(".modal.in").length||t("body").hasClass("body-modal")&&e.parent.$.zui.closeModal(a,o,s)},d=function(t,e){e=h(e),e&&e.length&&e.modal("ajustPosition",t)};t.zui({closeModal:c,ajustModalPosition:d}),t(document).on("click."+n+".data-api",'[data-toggle="modal"]',function(e){var i=t(this),o=i.attr("href"),s=null;try{s=t(i.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,""))}catch(a){}s&&s.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(" "),s=o.length;s--;){var a=o[s];if("click"==a)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=a){var r="hover"==a?"mouseenter":"focus",l="hover"==a?"mouseleave":"blur";this.$element.on(r+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,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 s="function"==typeof n.options.placement?n.options.placement.call(n,o[0],n.$element[0]):n.options.placement,a=/\s?auto?\s?/i,r=a.test(s);r&&(s=s.replace(a,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s),n.options.container?o.appendTo(n.options.container):o.insertAfter(n.$element);var l=n.getPosition(),h=o[0].offsetWidth,c=o[0].offsetHeight;if(r){var d=n.$element.parent(),u=s,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;s="bottom"==s&&l.top+l.height+c-p>g?"top":"top"==s&&l.top-p-c<0?"bottom":"right"==s&&l.right+h>f?"left":"left"==s&&l.left-h
'}),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"),s="object"==typeof i&&i;o||n.data("zui.popover",o=new e(this,s)),"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(){t(o).remove(),t(s).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",s="[data-toggle=dropdown]",a=function(e){t(e).on("click."+n,this.toggle)};a.prototype.toggle=function(o){var s=t(this);if(!s.is(".disabled, :disabled")){var a=i(s),r=a.hasClass("open");if(e(),!r){if("ontouchstart"in document.documentElement&&!a.closest(".navbar-nav").length&&t('').insertAfter(t(this)).on("click",e),a.trigger(o=t.Event("show."+n)),o.isDefaultPrevented())return;a.toggleClass("open").trigger("shown."+n),s.focus()}return!1}},a.prototype.keydown=function(e){if(/(38|40|27)/.test(e.keyCode)){var n=t(this);if(e.preventDefault(),e.stopPropagation(),!n.is(".disabled, :disabled")){var o=i(n),a=o.hasClass("open");if(!a||a&&27==e.keyCode)return 27==e.which&&o.find(s).focus(),n.click();var r=t("[role=menu] li:not(.divider):visible a",o);if(r.length){var l=r.index(r.filter(":focus"));38==e.keyCode&&l>0&&l--,40==e.keyCode&&l
',s={type:"default",placement:"top",time:4e3,parent:"body",icon:null,close:!0,fade:!0,scale:!0},a={},r=function(e,r){t.isPlainObject(e)&&(r=e,e=r.message);var l=this;r=l.options=t.extend({},s,r),l.id=r.id||n++;var h=a[l.id];h&&h.destroy(),a[l.id]=l,l.message=(r.icon?'
':"")+e,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 c=!1,d=l.$.find(".messager-actions"),u=function(e){var n=t('
');"close"===e.name&&n.addClass("close"),e.html!==i&&n.html(e.html),e.icon!==i&&n.append('
'),e.text!==i&&n.append('
'+e.text+""),e.tooltip!==i&&n.attr("title",e.tooltip).tooltip(),n.data("action",e),d.append(n)};r.actions&&t.each(r.actions,function(t,e){e.name===i&&(e.name=t),"close"==e.name&&(c=!0),u(e)}),!c&&r.close&&u({name:"close",html:"×"}),l.$.on("click",".action",function(e){var i,n=t(this).data("action");r.onAction&&(i=r.onAction.call(this,n.name,n,l),i===!1)||t.isFunction(n.action)&&(i=n.action.call(this,l),i===!1)||(l.hide(),e.stopPropagation())}),l.$.on("click",function(t){if(r.onAction){var e=r.onAction.call(this,"content",null,l);e===!0&&l.hide()}});var p=l.$.find(".messager-content").html(l.message);r.contentClass&&p.addClass(r.contentClass),l.$.data("zui.messager",l),r.show&&l.message!==i&&l.show()};r.prototype.update=function(e,i){var n=this,o=n.options;n.$.removeClass("messager-"+o.type),i&&(o=t.extend(o,i)),n.$.addClass("messager-"+o.type),e&&(n.message=(o.icon?'
':"")+e,n.$.find(".messager-content").html(n.message))},r.prototype.show=function(n,o){var s=this,a=this.options;if(t.isFunction(n)){var r=o;o=n,r!==i&&(n=r)}if(s.isShow)return void s.hide(function(){s.show(n,o)});s.hiding&&(clearTimeout(s.hiding),s.hiding=null),s.update(n);var l=a.placement,h=t(a.parent),c=h.children(".messagers-holder."+l);if(c.length||(c=t("
").attr("class","messagers-holder "+l).appendTo(h)),c.append(s.$),"center"===l){var d=t(e).height()-c.height();c.css("top",Math.max(-d,d/2))}return s.$.show().addClass("in"),a.time&&(s.hiding=setTimeout(function(){s.hide()},a.time)),s.isShow=!0,o&&o(),s},r.prototype.hide=function(t,e){t===!0&&(e=!0,t=null);var i=this;if(i.$.hasClass("in")){i.$.removeClass("in");var n=function(){var e=i.$.parent();i.$.detach(),e.children().length||e.remove(),t&&t(!0)};e?n():setTimeout(n,200)}else t&&t(!1);i.isShow=!1},r.prototype.destroy=function(){var t=this;t.hide(function(){t.$.remove(),t.$=null},!0),delete a[t.id]},r.all=a,r.DEFAULTS=s;var l=function(){t(".messager").each(function(){var e=t(this).data("zui.messager");e&&e.hide&&e.hide(!0)})},h=function(e,n){"string"==typeof n&&(n={type:n}),n=t.extend({},n),n.id===i&&l();var o=a[n.id]||new r(e,n);return o.show(),o},c=function(t){return"string"==typeof t?{placement:t}:t},d={show:h,hide:l};t.each({primary:0,success:"ok-sign",info:"info-sign",warning:"warning-sign",danger:"exclamation-sign",important:0,special:0},function(e,i){d[e]=function(n,o){return h(n,t.extend({type:e,icon:i||null},c(o)))}}),t.zui({Messager:r,showMessager:h,messager:d})}(jQuery,window,void 0),function(t,e,i,n){"use strict";function o(t){if(t=t.toLowerCase(),t&&c.test(t)){var e;if(4===t.length){var i="#";for(e=1;e<4;e+=1)i+=t.slice(e,e+1).concat(t.slice(e,e+1));t=i}var n=[];for(e=1;e<7;e+=2)n.push(b("0x"+t.slice(e,e+2)));return{r:n[0],g:n[1],b:n[2],a:1}}throw new Error("Wrong hex string! (hex: "+t+")")}function s(e){return typeof e===f&&("transparent"===e.toLowerCase()||m[e.toLowerCase()]||c.test(t.trim(e.toLowerCase())))}function a(t){function e(t){return t=t<0?t+1:t>1?t-1:t,6*t<1?r+(a-r)*t*6:2*t<1?a:3*t<2?r+(a-r)*(2/3-t)*6:r}var i=t.h,n=t.s,o=t.l,s=t.a;i=h(i)%u/u,n=l(h(n)),o=l(h(o)),s=l(h(s));var a=o<=.5?o*(n+1):o+n-o*n,r=2*o-a,c={r:e(i+1/3)*d,g:e(i)*d,b:e(i-1/3)*d,a:s};return c}function r(t,i,n){return v(n)&&(n=0),v(i)&&(i=d),e.min(e.max(t,n),i)}function l(t,e){return r(t,e)}function h(t){return"number"==typeof t?t:parseFloat(t)}var c=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/,d=255,u=360,p=100,f="string",g="object",m={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"},v=function(t){return t===n},y=function(t){return!v(t)},b=function(t){return parseInt(t)},w=function(t){return b(l(h(t),d))},x=function(t,e,i,n){var s=this;if(s.r=s.g=s.b=0,s.a=1,y(n)&&(s.a=l(h(n),1)),y(t)&&y(e)&&y(i))s.r=w(t),s.g=w(e),s.b=w(i);else if(y(t)){var r=typeof t;if(r==f)if(t=t.toLowerCase(),"transparent"===t)s.a=0;else if(m[t])this.rgb(o(m[t]));else if(0===t.indexOf("rgb")){var c=t.substring(t.indexOf("(")+1,t.lastIndexOf(")")).split(",",4);s.rgb({r:c[0],g:c[1],b:c[2],a:c[3]})}else s.rgb(o(t));else if("number"==r&&v(e))s.r=s.g=s.b=w(t);else if(r==g&&y(t.r))s.r=w(t.r),y(t.g)&&(s.g=w(t.g)),y(t.b)&&(s.b=w(t.b)),y(t.a)&&(s.a=l(h(t.a),1));else if(r==g&&y(t.h)){var d={h:l(h(t.h),u),s:1,l:1,a:1};y(t.s)&&(d.s=l(h(t.s),1)),y(t.l)&&(d.l=l(h(t.l),1)),y(t.a)&&(d.a=l(h(t.a),1)),s.rgb(a(d))}}};x.prototype.rgb=function(t){var e=this;if(y(t)){if(typeof t==g)y(t.r)&&(e.r=w(t.r)),y(t.g)&&(e.g=w(t.g)),y(t.b)&&(e.b=w(t.b)),y(t.a)&&(e.a=l(h(t.a),1));else{var i=b(h(t));e.r=i,e.g=i,e.b=i}return e}return{r:e.r,g:e.g,b:e.b,a:e.a}},x.prototype.hue=function(t){var e=this,i=e.toHsl();return v(t)?i.h:(i.h=l(h(t),u),e.rgb(a(i)),e)},x.prototype.darken=function(t){var e=this,i=e.toHsl();return i.l-=t/p,i.l=l(i.l,1),e.rgb(a(i)),e},x.prototype.clone=function(){var t=this;return new x(t.r,t.g,t.b,t.a)},x.prototype.lighten=function(t){return this.darken(-t)},x.prototype.fade=function(t){return this.a=l(t/p,1),this},x.prototype.spin=function(t){var e=this.toHsl(),i=(e.h+t)%u;return e.h=i<0?u+i:i,this.rgb(a(e))},x.prototype.toHsl=function(){var t,i,n=this,o=n.r/d,s=n.g/d,a=n.b/d,r=n.a,l=e.max(o,s,a),h=e.min(o,s,a),c=(l+h)/2,p=l-h;if(l===h)t=i=0;else{switch(i=c>.5?p/(2-l-h):p/(l+h),l){case o:t=(s-a)/p+(s
e.luma()){var n=e;e=t,t=n}return this.a<.5?t:(i=v(i)?.43:h(i),this.luma()0?t.a<1?"rgba("+t.r+","+t.g+","+t.b+","+t.a+")":t.hexStr():"transparent"},x.isColor=s,x.names=m,x.get=function(t){return new x(t)},t.zui({Color:x})}(jQuery,Math,window,void 0),/*!
+function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)}(function(t){function e(t){return r.raw?t:encodeURIComponent(t)}function i(t){return r.raw?t:decodeURIComponent(t)}function n(t){return e(r.json?JSON.stringify(t):String(t))}function o(t){0===t.indexOf('"')&&(t=t.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return t=decodeURIComponent(t.replace(a," ")),r.json?JSON.parse(t):t}catch(e){}}function s(e,i){var n=r.raw?e:o(e);return t.isFunction(i)?i(n):n}var a=/\+/g,r=t.cookie=function(o,a,l){if(void 0!==a&&!t.isFunction(a)){if(l=t.extend({},r.defaults,l),"number"==typeof l.expires){var h=l.expires,c=l.expires=new Date;c.setTime(+c+864e5*h)}return document.cookie=[e(o),"=",n(a),l.expires?"; expires="+l.expires.toUTCString():"",l.path?"; path="+l.path:"",l.domain?"; domain="+l.domain:"",l.secure?"; secure":""].join("")}for(var d=o?void 0:{},u=document.cookie?document.cookie.split("; "):[],p=0,f=u.length;p=0;t--)delete this.page[i[t]];this.set(s,this.page)}},a.prototype.pageRemove=function(t){"undefined"!=typeof this.page[t]&&(this.page[t]=null,this.pageSave())},a.prototype.pageClear=function(){this.page={},this.pageSave()},a.prototype.pageGet=function(t,e){var i=this.page[t];return void 0===e||null!==i&&void 0!==i?i:e},a.prototype.pageSet=function(t,i){e.isPlainObject(t)?e.extend(!0,this.page,t):this.page[this.serialize(t)]=i,this.pageSave()},a.prototype.check=function(){if(!this.enable&&!this.slience)throw new Error("Browser not support localStorage or enable status been set true.");return this.enable},a.prototype.length=function(){return this.check()?i.getLength?i.getLength():i.length:0},a.prototype.removeItem=function(t){return i.removeItem(t),this},a.prototype.remove=function(t){return this.removeItem(t)},a.prototype.getItem=function(t){return i.getItem(t)},a.prototype.get=function(t,e){var i=this.deserialize(this.getItem(t));return"undefined"!=typeof i&&null!==i||"undefined"==typeof e?i:e},a.prototype.key=function(t){return i.key(t)},a.prototype.setItem=function(t,e){return i.setItem(t,e),this},a.prototype.set=function(t,e){return void 0===e?this.remove(t):(this.setItem(t,this.serialize(e)),this)},a.prototype.clear=function(){return i.clear(),this},a.prototype.forEach=function(t){for(var e=this.length(),n=e-1;n>=0;n--){var o=i.key(n);t(o,this.get(o))}return this},a.prototype.getAll=function(){var t={};return this.forEach(function(e,i){t[e]=i}),t},a.prototype.serialize=function(t){return"string"==typeof t?t:JSON.stringify(t)},a.prototype.deserialize=function(t){if("string"==typeof t)try{return JSON.parse(t)}catch(e){return t||void 0}},e.zui({store:new a})}(window,jQuery),function(t){"use strict";var e="zui.searchBox",i=function(e,n){var o=this;o.name=name,o.$=t(e),o.options=n=t.extend({},i.DEFAULTS,o.$.data(),n);var s=o.$.is(n.inputSelector)?o.$:o.$.find(n.inputSelector);if(s.length){var a=function(){o.changeTimer&&(clearTimeout(o.changeTimer),o.changeTimer=null)},r=function(){a();var t=o.getSearch();if(t!==o.lastValue){var e=""===t;s.toggleClass("empty",e),o.$.callComEvent(o,"onSearchChange",[t,e]),o.lastValue=t}};o.$input=s=s.first(),s.on(n.listenEvent,function(t){o.changeTimer=setTimeout(function(){r()},n.changeDelay)}).on("focus",function(t){s.addClass("focus"),o.$.callComEvent(o,"onFocus",[t])}).on("blur",function(t){s.removeClass("focus"),o.$.callComEvent(o,"onBlur",[t])}).on("keydown",function(t){var e=0,i=t.which;27===i&&n.escToClear?(this.setSearch("",!0),r(),e=1):13===i&&n.onPressEnter&&(r(),o.$.callComEvent(o,"onPressEnter",[t]));var s=o.$.callComEvent(o,"onKeyDown",[t]);s===!1&&(e=1),e&&t.preventDefault()}),o.$.on("click",".search-clear-btn",function(t){o.setSearch("",!0),r(),o.focus(),t.preventDefault()}),r()}else console.error("ZUI: search box init error, cannot find search box input element.")};i.DEFAULTS={inputSelector:'input[type="search"],input[type="text"]',listenEvent:"change input paste",changeDelay:500},i.prototype.getSearch=function(){return this.$input&&t.trim(this.$input.val())},i.prototype.setSearch=function(t,e){var i=this.$input;i&&(i.val(t),e||i.trigger("change"))},i.prototype.focus=function(){this.$input&&this.$input.focus()},t.fn.searchBox=function(n){return this.each(function(){var o=t(this),s=o.data(e),a="object"==typeof n&&n;s||o.data(e,s=new i(this,a)),"string"==typeof n&&s[n]()})},i.NAME=e,t.fn.searchBox.Constructor=i}(jQuery),function(t,e){"use strict";var i="zui.draggable",n={container:"body",move:!0},o=0,s=function(e,i){var s=this;s.$=t(e),s.id=o++,s.options=t.extend({},n,s.$.data(),i),s.init()};s.DEFAULTS=n,s.NAME=i,s.prototype.init=function(){var n,o,s,a,r,l=this,h=l.$,c="before",d="drag",u="finish",p="."+i+"."+l.id,f="mousedown"+p,g="mouseup"+p,m="mousemove"+p,v=l.options,y=v.selector,b=v.handle,w=h,x=t.isFunction(v.move),C=function(t){var e=t.pageX,i=t.pageY;r=!0;var o={left:e-s.x,top:i-s.y};w.removeClass("drag-ready").addClass("dragging"),v.move&&(x?v.move(o,w):w.css(o)),v[d]&&v[d]({event:t,element:w,startOffset:s,pos:o,offset:{x:e-n.x,y:i-n.y},smallOffset:{x:e-a.x,y:i-a.y}}),a.x=e,a.y=i,v.stopPropagation&&t.stopPropagation()},_=function(i){if(t(e).off(p),!r)return void w.removeClass("drag-ready");var o={left:i.pageX-s.x,top:i.pageY-s.y};w.removeClass("drag-ready dragging"),v.move&&(x?v.move(o,w):w.css(o)),v[u]&&v[u]({event:i,element:w,startOffset:s,pos:o,offset:{x:i.pageX-n.x,y:i.pageY-n.y},smallOffset:{x:i.pageX-a.x,y:i.pageY-a.y}}),i.preventDefault(),v.stopPropagation&&i.stopPropagation()},k=function(i){var l=t.zui.getMouseButtonCode(v.mouseButton);if(!(l>-1&&i.button!==l)){var h=t(this);if(y&&(w=b?h.closest(y):h),v[c]){var d=v[c]({event:i,element:w});if(d===!1)return}var u=t(v.container),p=w.offset();o=u.offset(),n={x:i.pageX,y:i.pageY},s={x:i.pageX-p.left+o.left,y:i.pageY-p.top+o.top},a=t.extend({},n),r=!1,w.addClass("drag-ready"),i.preventDefault(),v.stopPropagation&&i.stopPropagation(),t(e).on(m,C).on(g,_)}};b?h.on(f,b,k):y?h.on(f,y,k):h.on(f,k)},s.prototype.destroy=function(){var n="."+i+"."+this.id;this.$.off(n),t(e).off(n),this.$.data(i,null)},t.fn.draggable=function(e){return this.each(function(){var n=t(this),o=n.data(i),a="object"==typeof e&&e;o||n.data(i,o=new s(this,a)),"string"==typeof e&&o[e]()})},t.fn.draggable.Constructor=s}(jQuery,document),function(t,e,i){"use strict";var n="zui.droppable",o={target:".droppable-target",deviation:5,sensorOffsetX:0,sensorOffsetY:0,dropToClass:"drop-to"},s=0,a=function(e,i){var n=this;n.id=s++,n.$=t(e),n.options=t.extend({},o,n.$.data(),i),n.init()};a.DEFAULTS=o,a.NAME=n,a.prototype.trigger=function(e,i){return t.zui.callEvent(this.options[e],i,this)},a.prototype.init=function(){var o,s,a,r,l,h,c,d,u,p,f,g,m,v=this,y=v.$,b=v.options,w=b.deviation,x="."+n+"."+v.id,C="mousedown"+x,_="mouseup"+x,k="mousemove"+x,T=b.selector,S=b.handle,D=b.flex,M=b.container,P=b.canMoveHere,F=b.dropToClass,L=y,z=!1,I=M?t(b.container).first():T?y:t("body"),$=function(e){if(z&&(f={left:e.pageX,top:e.pageY},!(i.abs(f.left-d.left)s&&f.top>a&&f.left-1&&i.button!==n)){var f=t(this);T&&(L=S?f.closest(T):f),L.hasClass("drag-shadow")||b.before&&b.before({event:i,element:L})===!1||(z=!0,o=t.isFunction(b.target)?b.target(L,y):I.find(b.target),s=null,a=null,r=!1,l=!0,h=null,c=L.offset(),u=I.offset(),u.top=u.top-I.scrollTop(),u.left=u.left-I.scrollLeft(),d={left:i.pageX,top:i.pageY},g=t.extend({},d),p={left:d.left-c.left,top:d.top-c.top},L.addClass("drag-from"),t(e).on(k,$).on(_,E),m=setTimeout(function(){t(e).on(C,E)},10),i.preventDefault(),b.stopPropagation&&i.stopPropagation())}};S?y.on(C,S,A):T?y.on(C,T,A):y.on(C,A)},a.prototype.destroy=function(){var i="."+n+"."+this.id;this.$.off(i),t(e).off(i),this.$.data(n,null)},a.prototype.reset=function(){this.destroy(),this.init()},t.fn.droppable=function(e){return this.each(function(){var i=t(this),o=i.data(n),s="object"==typeof e&&e;o||i.data(n,o=new a(this,s)),"string"==typeof e&&o[e]()})},t.fn.droppable.Constructor=a}(jQuery,document,Math),+function(t,e){"use strict";function i(e,i,s){return this.each(function(){var a=t(this),r=a.data(n),l=t.extend({},o.DEFAULTS,a.data(),"object"==typeof e&&e);r||a.data(n,r=new o(this,l)),"string"==typeof e?r[e](i,s):l.show&&r.show(i,s)})}var n="zui.modal",o=function(i,o){var s=this;s.options=o,s.$body=t(document.body),s.$element=t(i),s.$backdrop=s.isShown=null,s.scrollbarWidth=0,o.moveable===e&&(s.options.moveable=s.$element.hasClass("modal-moveable")),o.remote&&s.$element.find(".modal-content").load(o.remote,function(){s.$element.trigger("loaded."+n)})};o.VERSION="3.2.0",o.TRANSITION_DURATION=300,o.BACKDROP_TRANSITION_DURATION=150,o.DEFAULTS={backdrop:!0,keyboard:!0,show:!0,position:"fit"};var s=function(e,i){var n=t(window);i.left=Math.max(0,Math.min(i.left,n.width()-e.outerWidth())),i.top=Math.max(0,Math.min(i.top,n.height()-e.outerHeight())),e.css(i)};o.prototype.toggle=function(t,e){return this.isShown?this.hide():this.show(t,e)},o.prototype.ajustPosition=function(i){var o=this,a=o.options;if(i===e&&(i=a.position),i!==e&&null!==i){t.isFunction(i)&&(i=i(o));var r=o.$element.find(".modal-dialog"),l=t(window).height(),h={maxHeight:"initial",overflow:"visible"},c=r.find(".modal-body").css(h);if(a.scrollInside){var d=a.headerHeight;"number"!=typeof d?d=r.find(".modal-header").height():t.isFunction(d)&&(d=d($header)),h.maxHeight=l-d,c.outerHeight()>h.maxHeight&&(h.overflow="auto")}c.css(h);var u=Math.max(0,(l-r.outerHeight())/2);if("fit"===i?i={top:u>50?Math.floor(2*u/3):u}:"center"===i?i={top:u}:t.isPlainObject(i)||(i={top:i}),r.hasClass("modal-moveable")){var p=null,f=a.rememberPos;f&&(f===!0?p=o.$element.data("modal-pos"):t.zui.store&&(p=t.zui.store.pageGet(n+".rememberPos."+f))),i=t.extend(i,{left:Math.max(0,(t(window).width()-r.outerWidth())/2)},p),"inside"===a.moveable?s(r,i):r.css(i)}else r.css(i)}},o.prototype.setMoveale=function(){t.fn.draggable||console.error("Moveable modal requires draggable.js.");var e=this,i=e.options,o=e.$element.find(".modal-dialog").removeClass("modal-dragged");o.toggleClass("modal-moveable",!!i.moveable),e.$element.data("modal-moveable-setup")||o.draggable({container:e.$element,handle:".modal-header",before:function(){var t=o.css("margin-top");t&&"0px"!==t&&o.css("top",t).css("margin-top","").addClass("modal-dragged")},finish:function(o){var s=i.rememberPos;s&&(e.$element.data("modal-pos",o.pos),t.zui.store&&s!==!0&&t.zui.store.pageSet(n+".rememberPos."+s,o.pos))},move:"inside"!==i.moveable||function(t){s(o,t)}})},o.prototype.show=function(e,i){var s=this,a=t.Event("show."+n,{relatedTarget:e});s.$element.trigger(a),s.$element.toggleClass("modal-scroll-inside",!!s.options.scrollInside),s.isShown||a.isDefaultPrevented()||(s.isShown=!0,s.options.moveable&&s.setMoveale(),s.checkScrollbar(),s.options.backdrop!==!1&&(s.$body.addClass("modal-open"),s.setScrollbar()),s.escape(),s.$element.on("click.dismiss."+n,'[data-dismiss="modal"]',function(t){s.hide(),t.stopPropagation()}),s.backdrop(function(){var a=t.support.transition&&s.$element.hasClass("fade");s.$element.parent().length||s.$element.appendTo(s.$body),s.$element.show().scrollTop(0),a&&s.$element[0].offsetWidth,s.$element.addClass("in").attr("aria-hidden",!1),s.ajustPosition(i),s.enforceFocus();var r=t.Event("shown."+n,{relatedTarget:e});a?s.$element.find(".modal-dialog").one("bsTransitionEnd",function(){s.$element.trigger("focus").trigger(r)}).emulateTransitionEnd(o.TRANSITION_DURATION):s.$element.trigger("focus").trigger(r)}))},o.prototype.hide=function(e){e&&e.preventDefault&&e.preventDefault();var i=this;e=t.Event("hide."+n),i.$element.trigger(e),i.isShown&&!e.isDefaultPrevented()&&(i.isShown=!1,i.options.backdrop!==!1&&(i.$body.removeClass("modal-open"),i.resetScrollbar()),i.escape(),t(document).off("focusin."+n),i.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss."+n),t.support.transition&&i.$element.hasClass("fade")?i.$element.one("bsTransitionEnd",t.proxy(i.hideModal,i)).emulateTransitionEnd(o.TRANSITION_DURATION):i.hideModal())},o.prototype.enforceFocus=function(){t(document).off("focusin."+n).on("focusin."+n,t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},o.prototype.escape=function(){this.isShown&&this.options.keyboard?t(document).on("keydown.dismiss."+n,t.proxy(function(i){if(27==i.which){var o=t.Event("escaping."+n),s=this.$element.triggerHandler(o,"esc");if(s!=e&&!s)return;this.hide()}},this)):this.isShown||t(document).off("keydown.dismiss."+n)},o.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$element.trigger("hidden."+n)})},o.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},o.prototype.backdrop=function(e){var i=this,s=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var a=t.support.transition&&s;if(this.$backdrop=t('').appendTo(this.$body),this.$element.on("mousedown.dismiss."+n,t.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),a&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;a?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(o.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var r=function(){i.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",r).emulateTransitionEnd(o.BACKDROP_TRANSITION_DURATION):r()}else e&&e()},o.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},o.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",t+this.scrollbarWidth)},o.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},o.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var a=t.fn.modal;t.fn.modal=i,t.fn.modal.Constructor=o,t.fn.modal.noConflict=function(){return t.fn.modal=a,this},t(document).on("click."+n+".data-api",'[data-toggle="modal"]',function(e){var o=t(this),s=o.attr("href"),a=null;try{a=t(o.attr("data-target")||s&&s.replace(/.*(?=#[^\s]+$)/,""))}catch(r){return}if(a.length){var l=a.data(n)?"toggle":t.extend({remote:!/#/.test(s)&&s},a.data(),o.data());o.is("a")&&e.preventDefault(),a.one("show."+n,function(t){t.isDefaultPrevented()||a.one("hidden."+n,function(){o.is(":visible")&&o.trigger("focus")})}),i.call(a,l,this,o.data("position"))}})}(jQuery,void 0),function(t,e,i){"use strict";if(!t.fn.modal)throw new Error("Modal trigger requires modal.js");var n="zui.modaltrigger",o="ajax",s=".zui.modal",a="string",r=function(e,i){e=t.extend({},r.DEFAULTS,t.ModalTriggerDefaults,i?i.data():null,e),this.isShown,this.$trigger=i,this.options=e,this.id=t.zui.uuid()};r.DEFAULTS={type:"custom",height:"auto",name:"triggerModal",fade:!0,position:"fit",showHeader:!0,delay:0,backdrop:!0,keyboard:!0,waittime:0,loadingIcon:"icon-spinner-indicator",scrollInside:!1},r.prototype.init=function(i){var r=this;if(i.url&&(!i.type||i.type!=o&&"iframe"!=i.type)&&(i.type=o),i.remote)i.type=o,typeof i.remote===a&&(i.url=i.remote);else if(i.iframe)i.type="iframe",typeof i.iframe===a&&(i.url=i.iframe);else if(i.custom&&(i.type="custom",typeof i.custom===a)){var l;try{l=t(i.custom)}catch(h){}l&&l.length?i.custom=l:t.isFunction(e[i.custom])&&(i.custom=e[i.custom])}var c=t("#"+i.name);c.length&&(r.isShown||c.off(s),c.remove()),c=t(''+("string"==typeof i.loadingIcon&&0===i.loadingIcon.indexOf("icon-")?'
':i.loadingIcon)+'
').appendTo("body").data(n,r);var d=function(e,n){var o=i[e];t.isFunction(o)&&c.on(n+s,o)};d("onShow","show"),d("shown","shown"),d("onHide","hide"),d("hidden","hidden"),d("loaded","loaded"),c.on("shown"+s,function(){r.isShown=!0}).on("hidden"+s,function(){r.isShown=!1}),this.$modal=c,this.$dialog=c.find(".modal-dialog"),i.mergeOptions&&(this.options=i)},r.prototype.show=function(i){var s=t.extend({},this.options,{url:this.$trigger?this.$trigger.attr("href")||this.$trigger.attr("data-url")||this.$trigger.data("url"):this.options.url},i);this.init(s);var r=this,l=this.$modal,h=this.$dialog,c=s.custom,d=h.find(".modal-body").css("padding",""),u=h.find(".modal-header"),p=h.find(".modal-content");l.toggleClass("fade",s.fade).addClass(s.className).toggleClass("modal-loading",!this.isShown).toggleClass("modal-scroll-inside",!!s.scrollInside),h.toggleClass("modal-md","md"===s.size).toggleClass("modal-sm","sm"===s.size).toggleClass("modal-lg","lg"===s.size).toggleClass("modal-fullscreen","fullscreen"===s.size),u.toggle(s.showHeader),u.find(".modal-icon").attr("class","modal-icon icon-"+s.icon),u.find(".modal-title-name").text(s.title||""),s.size&&"fullscreen"===s.size&&(s.width="",s.height="");var f=function(){clearTimeout(this.resizeTask),this.resizeTask=setTimeout(function(){r.ajustPosition(s.position)},100)},g=function(t,e){return"undefined"==typeof t&&(t=s.delay),setTimeout(function(){h=l.find(".modal-dialog"),s.width&&"auto"!=s.width&&h.css("width",s.width),s.height&&"auto"!=s.height&&(h.css("height",s.height),"iframe"===s.type&&d.css("height",h.height()-u.outerHeight())),r.ajustPosition(s.position),l.removeClass("modal-loading"),"iframe"!=s.type&&h.off("resize."+n).on("resize."+n,f),e&&e()},t)};if("custom"===s.type&&c)if(t.isFunction(c)){var m=c({modal:l,options:s,modalTrigger:r,ready:g});typeof m===a&&(d.html(m),g())}else c instanceof t?(d.html(t("").append(c.clone()).html()),g()):(d.html(c),g());else if(s.url){var v=function(){var t=l.callComEvent(r,"broken");t&&(d.html(t),g())};if(l.attr("ref",s.url),"iframe"===s.type){l.addClass("modal-iframe"),this.firstLoad=!0;var y="iframe-"+s.name;u.detach(),d.detach(),p.empty().append(u).append(d),d.css("padding",0).html('
'),s.waittime>0&&(r.waitTimeout=g(s.waittime,v));var b=document.getElementById(y);b.onload=b.onreadystatechange=function(){var i=!!s.scrollInside;if(r.firstLoad&&l.addClass("modal-loading"),!this.readyState||"complete"==this.readyState){r.firstLoad=!1,s.waittime>0&&clearTimeout(r.waitTimeout);try{l.attr("ref",b.contentWindow.location.href);var o=e.frames[y].$;if(o&&"auto"===s.height&&"fullscreen"!=s.size){var a=o("body").addClass("body-modal").toggleClass("body-modal-scroll-inside",i);s.iframeBodyClass&&a.addClass(s.iframeBodyClass);var h=[],c=function(n){l.removeClass("fade");var o=a.outerHeight();if(n===!0&&s.onlyIncreaseHeight&&(o=Math.max(o,d.data("minModalHeight")||0),d.data("minModalHeight",o)),i){var r=s.headerHeight;"number"!=typeof r?r=u.height():t.isFunction(r)&&(r=r(u));var c=t(e).height();o=Math.min(o,c-r)}for(h.length>1&&o===h[0]&&(o=Math.max(o,h[1])),h.push(o);h.length>2;)h.shift();d.css("height",o),s.fade&&l.addClass("fade"),g()};l.callComEvent(r,"loaded",{modalType:"iframe",jQuery:o}),setTimeout(c,100),a.off("resize."+n).on("resize."+n,c),i&&t(e).off("resize."+n).on("resize."+n,c)}else g()}catch(p){g()}}}}else t.ajax(t.extend({url:s.url,success:function(i){try{var n=t(i);n.filter(".modal-dialog").length?h.replaceWith(n):n.filter(".modal-content").length?h.find(".modal-content").replaceWith(n):d.wrapInner(n)}catch(s){e.console&&e.console.warn&&console.warn("ZUI: Cannot recogernize remote content.",{error:s,data:i}),l.html(i)}l.callComEvent(r,"loaded",{modalType:o}),g()},error:v},s.ajaxOptions))}l.modal({show:"show",backdrop:s.backdrop,moveable:s.moveable,rememberPos:s.rememberPos,keyboard:s.keyboard,scrollInside:s.scrollInside})},r.prototype.close=function(i,n){var o=this;(i||n)&&o.$modal.on("hidden"+s,function(){t.isFunction(i)&&i(),typeof n===a&&n.length&&!o.$modal.data("cancel-reload")&&("this"===n?e.location.reload():e.location=n)}),o.$modal.modal("hide")},r.prototype.toggle=function(t){this.isShown?this.close():this.show(t)},r.prototype.ajustPosition=function(e){e=e===i?this.options.position:e,t.isFunction(e)&&(e=e(this)),this.$modal.modal("ajustPosition",e)},t.zui({ModalTrigger:r,modalTrigger:new r}),t.fn.modalTrigger=function(e,i){return t(this).each(function(){var o=t(this),s=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);s||o.data(n,s=new r(l,o)),typeof e==a?s[e](i):l.show&&s.show(i),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}),s.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 h=function(e){return e=t(e?e:".modal.modal-trigger"),e&&e instanceof t?e:null},c=function(i,o,s){var a=i;if(t.isFunction(i)){var r=s;s=o,o=i,i=r}i=h(i),i&&i.length?i.each(function(){t(this).data(n).close(o,s)}):t("body").hasClass("modal-open")||t(".modal.in").length||t("body").hasClass("body-modal")&&e.parent.$.zui.closeModal(a,o,s)},d=function(t,e){e=h(e),e&&e.length&&e.modal("ajustPosition",t)};t.zui({closeModal:c,ajustModalPosition:d}),t(document).on("click."+n+".data-api",'[data-toggle="modal"]',function(e){var i=t(this),o=i.attr("href"),s=null;try{s=t(i.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,""))}catch(a){}s&&s.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(" "),s=o.length;s--;){var a=o[s];if("click"==a)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=a){var r="hover"==a?"mouseenter":"focus",l="hover"==a?"mouseleave":"blur";this.$element.on(r+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,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 s="function"==typeof n.options.placement?n.options.placement.call(n,o[0],n.$element[0]):n.options.placement,a=/\s?auto?\s?/i,r=a.test(s);r&&(s=s.replace(a,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s),n.options.container?o.appendTo(n.options.container):o.insertAfter(n.$element);var l=n.getPosition(),h=o[0].offsetWidth,c=o[0].offsetHeight;if(r){var d=n.$element.parent(),u=s,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;s="bottom"==s&&l.top+l.height+c-p>g?"top":"top"==s&&l.top-p-c<0?"bottom":"right"==s&&l.right+h>f?"left":"left"==s&&l.left-h
'}),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"),s="object"==typeof i&&i;o||n.data("zui.popover",o=new e(this,s)),"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(){t(o).remove(),t(s).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",s="[data-toggle=dropdown]",a=function(e){t(e).on("click."+n,this.toggle)};a.prototype.toggle=function(o){var s=t(this);if(!s.is(".disabled, :disabled")){var a=i(s),r=a.hasClass("open");if(e(),!r){if("ontouchstart"in document.documentElement&&!a.closest(".navbar-nav").length&&t('').insertAfter(t(this)).on("click",e),a.trigger(o=t.Event("show."+n)),o.isDefaultPrevented())return;a.toggleClass("open").trigger("shown."+n),s.focus()}return!1}},a.prototype.keydown=function(e){if(/(38|40|27)/.test(e.keyCode)){var n=t(this);if(e.preventDefault(),e.stopPropagation(),!n.is(".disabled, :disabled")){var o=i(n),a=o.hasClass("open");if(!a||a&&27==e.keyCode)return 27==e.which&&o.find(s).focus(),n.click();var r=t("[role=menu] li:not(.divider):visible a",o);if(r.length){var l=r.index(r.filter(":focus"));38==e.keyCode&&l>0&&l--,40==e.keyCode&&l ',s={type:"default",placement:"top",time:4e3,parent:"body",icon:null,close:!0,fade:!0,scale:!0},a={},r=function(e,r){t.isPlainObject(e)&&(r=e,e=r.message);var l=this;r=l.options=t.extend({},s,r),l.id=r.id||n++;var h=a[l.id];h&&h.destroy(),a[l.id]=l,l.message=(r.icon?'
':"")+e,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 c=!1,d=l.$.find(".messager-actions"),u=function(e){var n=t('
');"close"===e.name&&n.addClass("close"),e.html!==i&&n.html(e.html),e.icon!==i&&n.append('
'),e.text!==i&&n.append('
'+e.text+""),e.tooltip!==i&&n.attr("title",e.tooltip).tooltip(),n.data("action",e),d.append(n)};r.actions&&t.each(r.actions,function(t,e){e.name===i&&(e.name=t),"close"==e.name&&(c=!0),u(e)}),!c&&r.close&&u({name:"close",html:"×"}),l.$.on("click",".action",function(e){var i,n=t(this).data("action");r.onAction&&(i=r.onAction.call(this,n.name,n,l),i===!1)||t.isFunction(n.action)&&(i=n.action.call(this,l),i===!1)||(l.hide(),e.stopPropagation())}),l.$.on("click",function(t){if(r.onAction){var e=r.onAction.call(this,"content",null,l);e===!0&&l.hide()}});var p=l.$.find(".messager-content").html(l.message);r.contentClass&&p.addClass(r.contentClass),l.$.data("zui.messager",l),r.show&&l.message!==i&&l.show()};r.prototype.update=function(e,i){var n=this,o=n.options;n.$.removeClass("messager-"+o.type),i&&(o=t.extend(o,i)),n.$.addClass("messager-"+o.type),e&&(n.message=(o.icon?'
':"")+e,n.$.find(".messager-content").html(n.message))},r.prototype.show=function(n,o){var s=this,a=this.options;if(t.isFunction(n)){var r=o;o=n,r!==i&&(n=r)}if(s.isShow)return void s.hide(function(){s.show(n,o)});s.hiding&&(clearTimeout(s.hiding),s.hiding=null),s.update(n);var l=a.placement,h=t(a.parent),c=h.children(".messagers-holder."+l);if(c.length||(c=t("
").attr("class","messagers-holder "+l).appendTo(h)),c.append(s.$),"center"===l){var d=t(e).height()-c.height();c.css("top",Math.max(-d,d/2))}return s.$.show().addClass("in"),a.time&&(s.hiding=setTimeout(function(){s.hide()},a.time)),s.isShow=!0,o&&o(),s},r.prototype.hide=function(t,e){t===!0&&(e=!0,t=null);var i=this;if(i.$.hasClass("in")){i.$.removeClass("in");var n=function(){var e=i.$.parent();i.$.detach(),e.children().length||e.remove(),t&&t(!0)};e?n():setTimeout(n,200)}else t&&t(!1);i.isShow=!1},r.prototype.destroy=function(){var t=this;t.hide(function(){t.$.remove(),t.$=null},!0),delete a[t.id]},r.all=a,r.DEFAULTS=s;var l=function(){t(".messager").each(function(){var e=t(this).data("zui.messager");e&&e.hide&&e.hide(!0)})},h=function(e,n){"string"==typeof n&&(n={type:n}),n=t.extend({},n),n.id===i&&l();var o=a[n.id]||new r(e,n);return o.show(),o},c=function(t){return"string"==typeof t?{placement:t}:t},d={show:h,hide:l};t.each({primary:0,success:"ok-sign",info:"info-sign",warning:"warning-sign",danger:"exclamation-sign",important:0,special:0},function(e,i){d[e]=function(n,o){return h(n,t.extend({type:e,icon:i||null},c(o)))}}),t.zui({Messager:r,showMessager:h,messager:d})}(jQuery,window,void 0),function(t,e,i,n){"use strict";function o(t){if(t=t.toLowerCase(),t&&c.test(t)){var e;if(4===t.length){var i="#";for(e=1;e<4;e+=1)i+=t.slice(e,e+1).concat(t.slice(e,e+1));t=i}var n=[];for(e=1;e<7;e+=2)n.push(b("0x"+t.slice(e,e+2)));return{r:n[0],g:n[1],b:n[2],a:1}}throw new Error("Wrong hex string! (hex: "+t+")")}function s(e){return typeof e===f&&("transparent"===e.toLowerCase()||m[e.toLowerCase()]||c.test(t.trim(e.toLowerCase())))}function a(t){function e(t){return t=t<0?t+1:t>1?t-1:t,6*t<1?r+(a-r)*t*6:2*t<1?a:3*t<2?r+(a-r)*(2/3-t)*6:r}var i=t.h,n=t.s,o=t.l,s=t.a;i=h(i)%u/u,n=l(h(n)),o=l(h(o)),s=l(h(s));var a=o<=.5?o*(n+1):o+n-o*n,r=2*o-a,c={r:e(i+1/3)*d,g:e(i)*d,b:e(i-1/3)*d,a:s};return c}function r(t,i,n){return v(n)&&(n=0),v(i)&&(i=d),e.min(e.max(t,n),i)}function l(t,e){return r(t,e)}function h(t){return"number"==typeof t?t:parseFloat(t)}var c=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/,d=255,u=360,p=100,f="string",g="object",m={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"},v=function(t){return t===n},y=function(t){return!v(t)},b=function(t){return parseInt(t)},w=function(t){return b(l(h(t),d))},x=function(t,e,i,n){var s=this;if(s.r=s.g=s.b=0,s.a=1,y(n)&&(s.a=l(h(n),1)),y(t)&&y(e)&&y(i))s.r=w(t),s.g=w(e),s.b=w(i);else if(y(t)){var r=typeof t;if(r==f)if(t=t.toLowerCase(),"transparent"===t)s.a=0;else if(m[t])this.rgb(o(m[t]));else if(0===t.indexOf("rgb")){var c=t.substring(t.indexOf("(")+1,t.lastIndexOf(")")).split(",",4);s.rgb({r:c[0],g:c[1],b:c[2],a:c[3]})}else s.rgb(o(t));else if("number"==r&&v(e))s.r=s.g=s.b=w(t);else if(r==g&&y(t.r))s.r=w(t.r),y(t.g)&&(s.g=w(t.g)),y(t.b)&&(s.b=w(t.b)),y(t.a)&&(s.a=l(h(t.a),1));else if(r==g&&y(t.h)){var d={h:l(h(t.h),u),s:1,l:1,a:1};y(t.s)&&(d.s=l(h(t.s),1)),y(t.l)&&(d.l=l(h(t.l),1)),y(t.a)&&(d.a=l(h(t.a),1)),s.rgb(a(d))}}};x.prototype.rgb=function(t){var e=this;if(y(t)){if(typeof t==g)y(t.r)&&(e.r=w(t.r)),y(t.g)&&(e.g=w(t.g)),y(t.b)&&(e.b=w(t.b)),y(t.a)&&(e.a=l(h(t.a),1));else{var i=b(h(t));e.r=i,e.g=i,e.b=i}return e}return{r:e.r,g:e.g,b:e.b,a:e.a}},x.prototype.hue=function(t){var e=this,i=e.toHsl();return v(t)?i.h:(i.h=l(h(t),u),e.rgb(a(i)),e)},x.prototype.darken=function(t){var e=this,i=e.toHsl();return i.l-=t/p,i.l=l(i.l,1),e.rgb(a(i)),e},x.prototype.clone=function(){var t=this;return new x(t.r,t.g,t.b,t.a)},x.prototype.lighten=function(t){return this.darken(-t)},x.prototype.fade=function(t){return this.a=l(t/p,1),this},x.prototype.spin=function(t){var e=this.toHsl(),i=(e.h+t)%u;return e.h=i<0?u+i:i,this.rgb(a(e))},x.prototype.toHsl=function(){var t,i,n=this,o=n.r/d,s=n.g/d,a=n.b/d,r=n.a,l=e.max(o,s,a),h=e.min(o,s,a),c=(l+h)/2,p=l-h;if(l===h)t=i=0;else{switch(i=c>.5?p/(2-l-h):p/(l+h),l){case o:t=(s-a)/p+(s
e.luma()){var n=e;e=t,t=n}return this.a<.5?t:(i=v(i)?.43:h(i),this.luma()0?t.a<1?"rgba("+t.r+","+t.g+","+t.b+","+t.a+")":t.hexStr():"transparent"},x.isColor=s,x.names=m,x.get=function(t){return new x(t)},t.zui({Color:x})}(jQuery,Math,window,void 0),/*!
* Chart.js 1.0.2
* Copyright 2015 Nick Downie
* Released under the MIT license
@@ -75,4 +75,4 @@ function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"=
* Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/
*/
function(t){function e(e){if("string"==typeof e.data){var i=e.handler,n=e.data.toLowerCase().split(" ");e.handler=function(e){if(this===e.target||!/textarea|select/i.test(e.target.nodeName)&&"text"!==e.target.type){var o="keypress"!==e.type&&t.hotkeys.specialKeys[e.which],s=String.fromCharCode(e.which).toLowerCase(),a="",r={};e.altKey&&"alt"!==o&&(a+="alt+"),e.ctrlKey&&"ctrl"!==o&&(a+="ctrl+"),e.metaKey&&!e.ctrlKey&&"meta"!==o&&(a+="meta+"),e.shiftKey&&"shift"!==o&&(a+="shift+"),o?r[a+o]=!0:(r[a+s]=!0,r[a+t.hotkeys.shiftNums[s]]=!0,"shift+"===a&&(r[t.hotkeys.shiftNums[s]]=!0));for(var l=0,h=n.length;l","/":"?","\\":"|"}},t.each(["keydown","keyup","keypress"],function(){t.event.special[this]={add:e}})}(jQuery),function(t){"use strict";function e(e,i){if(e===!1)return e;if(!e)return i;e===!0?e={add:!0,"delete":!0,edit:!0,sort:!0}:"string"==typeof e&&(e=e.split(","));var n;return t.isArray(e)&&(n={},t.each(e,function(e,i){t.isPlainObject(i)?n[i.action]=i:n[i]=!0}),e=n),t.isPlainObject(e)&&(n={},t.each(e,function(e,i){i?n[e]=t.extend({type:e},a[e],t.isPlainObject(i)?i:null):n[e]=!1}),e=n),i?t.extend(!0,{},i,e):e}function i(e,i,n){return i=i||e.type,t(n||e.template).addClass("tree-action").attr(t.extend({"data-type":i,title:e.title||""},e.attr)).data("action",e)}var n="zui.tree",o=0,s=function(e,i){this.name=n,this.$=t(e),this.getOptions(i),this._init()},a={sort:{template:''},add:{template:''},edit:{template:''},"delete":{template:''}};s.DEFAULTS={animate:null,initialState:"normal",toggleTemplate:''},s.prototype.add=function(e,i,n,o,s){var a,r=t(e),l=this.options;if(r.is("li")?(a=r.children("ul"),a.length||(a=t(""),r.append(a),this._initList(a,r))):a=r,a){var h=this;t.isArray(i)||(i=[i]),t.each(i,function(e,i){var n=t("").data(i).appendTo(a);void 0!==i.id&&n.attr("data-id",i.id);var o=l.itemWrapper?t(l.itemWrapper===!0?'':l.itemWrapper).appendTo(n):n;if(i.html)o.html(i.html);else if(t.isFunction(h.options.itemCreator)){var s=h.options.itemCreator(n,i);s!==!0&&s!==!1&&o.html(s)}else i.url?o.append(t("",{href:i.url}).text(i.title||i.name)):o.append(t("").text(i.title||i.name));h._initItem(n,i.idx||e,a,i),i.children&&i.children.length&&h.add(n,i.children)}),this._initList(a),n&&!a.hasClass("tree")&&h.expand(a.parent("li"),o,s)}},s.prototype.reload=function(e){var i=this;e&&(i.$.empty(),i.add(i.$,e)),i.isPreserve&&i.store.time&&i.$.find("li:not(.tree-action-item)").each(function(){var e=t(this);i[i.store[e.data("id")]?"expand":"collapse"](e,!0,!0)})},s.prototype._initList=function(n,o,s,a){var r=this;n.hasClass("tree")?(s=0,o=null):(o=(o||n.closest("li")).addClass("has-list"),o.find(".list-toggle").length||o.prepend(this.options.toggleTemplate),s=s||o.data("idx")),n.removeClass("has-active-item");var l=n.attr("data-idx",s||0).children("li:not(.tree-action-item)").each(function(e){r._initItem(t(this),e+1,n)});1!==l.length||l.find("ul").length||l.addClass("tree-single-item"),a=a||(o?o.data():null);var h=e(a?a.actions:null,this.actions);if(h){if(h.add&&h.add.templateInList!==!1){var c=n.children("li.tree-action-item");c.length?c.detach().appendTo(n):t('').append(i(h.add,"add",h.add.templateInList)).appendTo(n)}h.sort&&n.sortable(t.extend({dragCssClass:"tree-drag-holder",trigger:".sort-handler",selector:"li:not(.tree-action-item)",finish:function(t){r.callEvent("action",{action:h.sort,$list:n,target:t.target,item:a})}},h.sort.options,t.isPlainObject(this.options.sortable)?this.options.sortable:null))}o&&(o.hasClass("open")||a&&a.open)&&o.addClass("open in")},s.prototype._initItem=function(n,o,s,a){if(void 0===o){var r=n.prev("li");o=r.length?r.data("idx")+1:1}if(s=s||n.closest("ul"),n.attr("data-idx",o).removeClass("tree-single-item"),!n.data("id")){var l=o;s.hasClass("tree")||(l=s.parent("li").data("id")+"-"+l),n.attr("data-id",l)}n.hasClass("active")&&s.parent("li").addClass("has-active-item"),a=a||n.data();var h=e(a.actions,this.actions);if(h){var c=n.find(".tree-actions");c.length||(c=t('').appendTo(this.options.itemWrapper?n.find(".tree-item-wrapper"):n),t.each(h,function(t,e){e&&c.append(i(e,t))}))}var d=n.children("ul");d.length&&this._initList(d,n,o,a)},s.prototype._init=function(){var i=this.options,s=this;this.actions=e(i.actions),this.$.addClass("tree"),i.animate&&this.$.addClass("tree-animate"),this._initList(this.$);var a=i.initialState,r=t.zui&&t.zui.store&&t.zui.store.enable;r&&(this.selector=n+"::"+(i.name||"")+"#"+(this.$.attr("id")||o++),this.store=t.zui.store[i.name?"get":"pageGet"](this.selector,{})),"preserve"===a&&(r?this.isPreserve=!0:this.options.initialState=a="normal"),this.reload(i.data),r&&(this.isPreserve=!0),"expand"===a?this.expand():"collapse"===a&&this.collapse(),this.$.on("click",'.list-toggle,a[href="#"],.tree-toggle',function(e){var i=t(this),n=i.parent("li");s.callEvent("hit",{target:n,item:n.data()}),s.toggle(n),i.is("a")&&e.preventDefault()}).on("click",".tree-action",function(){var e=t(this),i=e.data();if(i.action&&(i=i.action),"sort"!==i.type){var n=e.closest("li:not(.tree-action-item)");s.callEvent("action",{action:i,target:this,$item:n,item:n.data()})}})},s.prototype.preserve=function(e,i,n){if(this.isPreserve)if(e)i=i||e.data("id"),n=void 0===n&&e.hasClass("open"),n?this.store[i]=n:delete this.store[i],this.store.time=(new Date).getTime(),t.zui.store[this.options.name?"set":"pageSet"](this.selector,this.store);else{var o=this;this.store={},this.$.find("li").each(function(){o.preserve(t(this))})}},s.prototype.expand=function(t,e,i){t?(t.addClass("open"),!e&&this.options.animate?setTimeout(function(){t.addClass("in")},10):t.addClass("in")):t=this.$.find("li.has-list").addClass("open in"),i||this.preserve(t),this.callEvent("expand",t,this)},s.prototype.show=function(e,i,n){var o=this;e.each(function(){var e=t(this);if(o.expand(e,i,n),e)for(var s=e.parent("ul");s&&s.length&&!s.hasClass("tree");){var a=s.parent("li");a.length?(o.expand(a,i,n),s=a.parent("ul")):s=!1}})},s.prototype.collapse=function(t,e,i){t?!e&&this.options.animate?(t.removeClass("in"),setTimeout(function(){t.removeClass("open")},300)):t.removeClass("open in"):t=this.$.find("li.has-list").removeClass("open in"),i||this.preserve(t),this.callEvent("collapse",t,this)},s.prototype.toggle=function(t){var e=t&&t.hasClass("open")||t===!1||void 0===t&&this.$.find("li.has-list.open").length;this[e?"collapse":"expand"](t)},s.prototype.getOptions=function(e){this.options=t.extend({},s.DEFAULTS,this.$.data(),e),null===this.options.animate&&this.$.hasClass("tree-animate")&&(this.options.animate=!0)},s.prototype.toData=function(e,i){t.isFunction(e)&&(i=e,e=null),e=e||this.$;var n=this;return e.children("li:not(.tree-action-item)").map(function(){var e=t(this),o=e.data();delete o["zui.droppable"];var s=e.children("ul");return s.length&&(o.children=n.toData(s)),t.isFunction(i)?i(o,e):o}).get()},s.prototype.callEvent=function(e,i){var n;return t.isFunction(this.options[e])&&(n=this.options[e](i,this)),this.$.trigger(t.Event(e+"."+this.name,i)),n},t.fn.tree=function(e,i){return this.each(function(){var o=t(this),a=o.data(n),r="object"==typeof e&&e;a||o.data(n,a=new s(this,r)),"string"==typeof e&&a[e](i)})},t.fn.tree.Constructor=s,t(function(){t('[data-ride="tree"]').tree()})}(jQuery),function(t){"use strict";var e="zui.colorPicker",i='',n={zh_cn:{errorTip:"不是有效的颜色值"},zh_tw:{errorTip:"不是有效的顏色值"},en:{errorTip:"Not a valid color value"}},o=function(i,n){this.name=e,this.$=t(i),this.getOptions(n),this.init()};o.DEFAULTS={colors:["#00BCD4","#388E3C","#3280fc","#3F51B5","#9C27B0","#795548","#F57C00","#F44336","#E91E63"],pullMenuRight:!0,wrapper:"btn-wrapper",tileSize:30,lineCount:5,optional:!0,tooltip:"top",icon:"caret-down",updateBtn:"auto"},o.prototype.init=function(){var e=this,n=e.options,o=e.$,s=o.parent(),a=!1;s.hasClass("colorpicker")?e.$picker=s:(e.$picker=t(n.template||i),a=!0),e.$picker.addClass(n.wrapper).find(".cp-title").toggle(void 0!==n.title).text(n.title),e.$menu=e.$picker.find(".dropdown-menu").toggleClass("pull-right",n.pullMenuRight),e.$btn=e.$picker.find(".btn.dropdown-toggle"),e.$btn.find(".ic").addClass("icon-"+n.icon),n.btnTip&&e.$picker.attr("data-toggle","tooltip").tooltip({title:n.btnTip,placement:n.tooltip,container:"body"}),o.attr("data-provide",null),a&&o.after(e.$picker),e.colors={},t.each(n.colors,function(i,n){if(t.zui.Color.isColor(n)){var o=new t.zui.Color(n);e.colors[o.toCssStr()]=o}}),e.updateColors(),e.$picker.on("click",".cp-tile",function(){e.setValue(t(this).data("color"))});var r=function(){var i=o.val(),s=t.zui.Color.isColor(i);o.parent().toggleClass("has-error",!(s||n.optional&&""===i)),s?e.setValue(i,!0):n.optional&&""===i?o.tooltip("hide"):o.is(":focus")||o.tooltip("show",n.errorTip)};o.is("input:not([type=hidden])")?(n.tooltip&&o.attr("data-toggle","tooltip").tooltip({trigger:"manual",placement:n.tooltip,tipClass:"tooltip-danger",container:"body"}),o.on("keyup paste input change",r)):o.appendTo(e.$picker),r()},o.prototype.addColor=function(e){e instanceof t.zui.Color||(e=new t.zui.Color(e));var i=e.toCssStr(),n=this.options;this.colors[i]||(this.colors[i]=e);var o=t('',{titile:e}).data("color",e).css({color:e.contrast().toCssStr(),background:i,"border-color":e.luma()>.43?"#ccc":"transparent"}).attr("data-color",i);this.$menu.append(t("").css({width:n.tileSize,height:n.tileSize}).append(o)),n.optional&&this.$menu.find(".cp-tile.empty").parent().detach().appendTo(this.$menu)},o.prototype.updateColors=function(e){var i=(this.$picker,this.$menu.children("li:not(.heading)").remove()),n=this.options,e=e||this.colors,o=this,s=0;if(t.each(e,function(t,e){o.addColor(e),s++}),n.optional){var a=t('').css({width:n.tileSize,height:n.tileSize});this.$menu.append(a),s++}i.css("width",Math.min(s,n.lineCount)*n.tileSize+6)},o.prototype.setValue=function(e,i){var n=this,o=n.options,s=n.$btn;n.$menu.find(".cp-tile.active").removeClass("active");var a="",r=o.updateBtn;if("auto"===r){var l=s.find(".color-bar");r=!l.length||function(t){l.css("background",t||"")}}if(e){var h=new t.zui.Color(e);a=h.toCssStr().toLowerCase(),r&&(t.isFunction(r)?r(a,s,n):s.css({background:a,color:h.contrast().toCssStr(),borderColor:h.luma()>.43?"#ccc":a})),n.colors[a]||n.addColor(h),i||n.$.val().toLowerCase()===a||n.$.val(a).trigger("change"),n.$menu.find('.cp-tile[data-color="'+a+'"]').addClass("active"),n.$.tooltip("hide"),n.$.trigger("colorchange",h)}else r&&(t.isFunction(r)?r(null,s,n):s.attr("style",null)),i||""===n.$.val()||n.$.val(a).trigger("change"),o.optional&&n.$.tooltip("hide"),n.$menu.find(".cp-tile.empty").addClass("active"),n.$.trigger("colorchange",null);o.updateBorder&&t(o.updateBorder).css("border-color",a),o.updateBackground&&t(o.updateBackground).css("background-color",a),o.updateColor&&t(o.updateColor).css("color",a),o.updateText&&t(o.updateText).text(a)},o.prototype.getOptions=function(e){var i=t.extend({},o.DEFAULTS,this.$.data(),e);"string"==typeof i.colors&&(i.colors=i.colors.split(","));var s=(i.lang||t.zui.clientLang()).toLowerCase();i.errorTip||(i.errorTip=n[s].errorTip),t.fn.tooltip||(i.btnTip=!1),this.options=i},t.fn.colorPicker=function(i){return this.each(function(){var n=t(this),s=n.data(e),a="object"==typeof i&&i;s||n.data(e,s=new o(this,a)),"string"==typeof i&&s[i]()})},t.fn.colorPicker.Constructor=o,t(function(){t('[data-provide="colorpicker"]').colorPicker()})}(jQuery),function(t,e){function i(t){return t===e&&(t=n+=1),o[t%o.length]}var n=0,o=["#00a9fc","#ff5d5d","#fdc137","#00da88","#7ec5ff","#8666b8","#bd7b46","#ff9100","#ff3d00","#f57f17","#00e5ff","#00b0ff","#2979ff","#3d5afe","#651fff","#d500f9","#f50057","#ff1744"];jQuery.fn.tableChart=function(){t(this).each(function(){var e=t(this),n=e.data(),o=n.chart||"pie",s=t(n.target);if(s.length){var a=null;if("pie"===o){n=t.extend({scaleShowLabels:!0,scaleLabel:"<%=label%>: <%=value%>"},n);var r=[],l=e.find("tbody > tr").each(function(e){var n=t(this),o=i();n.attr("data-id",e).find(".chart-color-dot").css("background",o),r.push({label:n.find(".chart-label").text(),value:parseInt(n.find(".chart-value").text()),color:o,id:e})});r.length>1?n.scaleLabelPlacement="outside":1===r.length&&(n.scaleLabelPlacement="inside",r.push({label:"",value:r[0].value/2e3,color:"#fff",showLabel:!1})),a=s.pieChart(r,n),s.on("mousemove",function(t){var e=a.getSegmentsAtEvent(t);l.removeClass("active"),e.length&&l.filter('[data-id="'+e[0].id+'"]').addClass("active")})}else if("bar"===o){var h=i(),c=[],d={label:e.find("thead .chart-label").text(),color:h,data:[]},l=e.find("tbody > tr").each(function(e){var i=t(this);c.push(i.find(".chart-label").text()),d.data.push(parseInt(i.find(".chart-value").text())),i.find(".chart-color-dot").css("background",h)}),r={labels:c,datasets:[d]};c.length&&(n.barValueSpacing=5),a=s.barChart(r,n)}else if("line"===o){var h=i(),c=[],d={label:e.find("thead .chart-label").text(),color:h,data:[]},l=e.find("tbody > tr").each(function(e){var i=t(this);c.push(i.find(".chart-label").text()),d.data.push(parseInt(i.find(".chart-value").text())),i.find(".chart-color-dot").css("background",h)}),r={labels:c,datasets:[d]};c.length&&(n.barValueSpacing=5),a=s.lineChart(r,n)}null!==a&&e.data("zui.chart",a)}})},t(".table-chart").tableChart();var s=function(i,n){var o=t(i);if(!o.data("initProgressPie")){o.data("initProgressPie",1);var s=o.is("canvas")?o:o.find("canvas"),a=t.extend({value:0,color:t.getThemeColor("primary")||"#006af1",backColor:t.getThemeColor("pale")||"#E9F2FB",doughnut:!0,doughnutSize:85,width:20,height:20,showTip:!1,name:"",tipTemplate:"<%=value%>%",animation:"auto",realValue:parseFloat(o.find(".progress-value").text())},n,o.data()),r=s.length;r||(s=t(" ').append(a)),i.$menu.append(a),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].scrollIntoView({behavior:"smooth"})},n.prototype.getItems=function(){return this.$.find(this.options.selector).addClass("search-list-item")},n.prototype.getActiveItem=function(){return this.getItems().filter(".active:first")},n.prototype.search=function(e){var n=this,o=void 0===e||null===e||""===e;n.$.toggleClass("has-search-text",!o);var s=n.getItems().removeClass("active");if(o)s.removeClass("hidden");else{var a=t.trim(e).split(" ");s.each(function(){var e=t(this),n=e.text()+" "+(e.data("key")||e.data("filter"));e.toggleClass("hidden",!i(a,n))})}n.scrollTo(s.not(".hidden").first().addClass("active"))},n.DEFAULTS={selector:".list-group a:not(.not-list-item)",searchBox:".search-box",onSelectItem:null},t.fn.searchList=function(i){return this.each(function(){var o=t(this),s=o.data(e),a="object"==typeof i&&i;s||o.data(e,s=new n(this,a)),"string"==typeof i&&s[i]()})},n.NAME=e,t.fn.searchList.Constructor=n,t(function(){t('[data-ride="searchList"]').searchList()})}(jQuery),function(t){"use strict";var e="zui.labelSelector",i=function(n,o){var s=this;s.name=e,s.$=t(n),o=s.options=t.extend({},i.DEFAULTS,this.$.data(),o),s.$.hide(),s.update()};i.prototype.select=function(t){t+="",this.$wrapper.find(".label.active").removeClass("active"),this.$wrapper.find('.label[data-value="'+t+'"]').addClass("active"),this.$.val(t).trigger("change")},i.prototype.update=function(){var e=this,i=e.options,n=e.$wrapper;if(!n){if(i.wrapper)n=t(i.wrapper);else{var o=e.$.next();n=o.hasClass(".label-selector")?o:t('
')}n.parent().length||e.$.after(n),e.$wrapper=n,n.on("click",".label",function(i){var n=e.$.val(),o=t(this).data("value");e.hasEmptyValue!==!1&&o==n&&(o=e.hasEmptyValue),e.select(o),i.preventDefault()})}n.empty();var s=e.$.val();e.hasEmptyValue=!1,e.$.children("option").each(function(){var e=t(this),o={label:e.text(),value:e.val()},a=""===o.value||"0"===o.value,r=t(i.labelTemplate||'
');i.labelClass&&!a&&r.addClass(i.labelClass),i.labelCreator?r=i.labelCreator(r):(r.data("option",o).attr("data-value",o.value),a&&!o.label?r.addClass("empty").append('
'):r.text(o.label).toggleClass("active",s===o.value)),n.append(r)})},i.DEFAULTS={},t.fn.labelSelector=function(n){return this.each(function(){var o=t(this),s=o.data(e),a="object"==typeof n&&n;s||o.data(e,s=new i(this,a)),"string"==typeof n&&s[n]()})},i.NAME=e,t.fn.labelSelector.Constructor=i,t(function(){t('[data-provide="labelSelector"]').labelSelector()})}(jQuery),function(t){"use strict";var e="zui.fileInput",i=t.BYTE_UNITS={B:1,KB:1024,MB:1048576,GB:1073741824,TB:1099511627776},n=t.formatBytes=function(t,e,n){return void 0===e&&(e=2),n||(n=t