diff --git a/module/bug/js/common.js b/module/bug/js/common.js index 3e95235c75..90ddf72002 100644 --- a/module/bug/js/common.js +++ b/module/bug/js/common.js @@ -247,11 +247,16 @@ function loadProductStories(productID) */ function loadProductProjects(productID) { + required = $('#project_chosen').hasClass('required'); branch = $('#branch').val(); if(typeof(branch) == 'undefined') branch = 0; link = createLink('product', 'ajaxGetProjects', 'productID=' + productID + '&projectID=' + oldProjectID + '&branch=' + branch); - $('#projectIdBox').load(link, function(){$(this).find('select').chosen()}); + $('#projectIdBox').load(link, function() + { + $(this).find('select').chosen(); + if(required) $(this).addClass('required'); + }); } /** diff --git a/module/build/view/view.html.php b/module/build/view/view.html.php index 754b7ef277..da89fa4ad9 100644 --- a/module/build/view/view.html.php +++ b/module/build/view/view.html.php @@ -28,16 +28,16 @@ tbody tr td:first-child input{display:none;}
- + {$build->id} " . $build->name . " ", '', "data-toggle='dropdown' class='btn btn-link btn-active-text'");?> - "; foreach($buildPairs as $id => $name) - { + { echo 'id ? " class='active'" : '') . '>'; echo html::a($this->createLink('build', 'view', "buildID=$id"), $name); echo ''; - } + } echo ''; ?> @@ -246,7 +246,7 @@ tbody tr td:first-child input{display:none;} build->batchUnlink, '', 'btn');?>
-
build->resolvedBugs, $countBugs);?>
+
build->resolvedBugs, $countBugs);?>
app->rawParams['type'] = 'bug'; @@ -313,7 +313,7 @@ tbody tr td:first-child input{display:none;} +
show('right', 'pagerjs');?> diff --git a/module/entry/view/browse.html.php b/module/entry/view/browse.html.php index 58a9fff9ed..87a98b62c8 100644 --- a/module/entry/view/browse.html.php +++ b/module/entry/view/browse.html.php @@ -13,7 +13,7 @@ entry->confirmDelete);?>
-
+ diff --git a/module/my/view/testtask.html.php b/module/my/view/testtask.html.php index 01771a8aaf..71d826fe78 100644 --- a/module/my/view/testtask.html.php +++ b/module/my/view/testtask.html.php @@ -26,7 +26,7 @@ ?> -
+

testtask->noTesttask;?>

diff --git a/module/product/control.php b/module/product/control.php index 16c09aad2d..241fe0a34b 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -616,7 +616,7 @@ class product extends control if($number === '') { - die(html::select('project', $projects, $projectID, 'class=form-control onchange=loadProjectRelated(this.value)')); + die(html::select('project', $projects, $projectID, "class='form-control' onchange='loadProjectRelated(this.value)'")); } else { diff --git a/module/release/view/view.html.php b/module/release/view/view.html.php index 19e4d29698..637469f0ee 100644 --- a/module/release/view/view.html.php +++ b/module/release/view/view.html.php @@ -148,7 +148,7 @@ } ?>
-
release->finishStories, $countStories);?>
+
release->finishStories, $countStories);?>
app->rawParams['type'] = 'story'; @@ -226,7 +226,7 @@
release->batchUnlink, '', 'btn');?>
-
release->resolvedBugs, $countBugs);?>
+
release->resolvedBugs, $countBugs);?>
app->rawParams['type'] = 'bug'; @@ -317,7 +317,7 @@
release->batchUnlink, '', 'btn');?>
-
release->createdBugs, $countLeftBugs);?>
+
release->createdBugs, $countLeftBugs);?>
app->rawParams['type'] = 'leftBug'; diff --git a/module/task/control.php b/module/task/control.php index d76f89ebac..f3520285a9 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -43,7 +43,7 @@ class task extends control * @access public * @return void */ - public function create($projectID = 0, $storyID = '', $moduleID = 0, $taskID = 0, $todoID = 0) + public function create($projectID = 0, $storyID = 0, $moduleID = 0, $taskID = 0, $todoID = 0) { $this->project->getLimitedProject(); $limitedProjects = !empty($_SESSION['limitedProjects']) ? $_SESSION['limitedProjects'] : ''; @@ -580,9 +580,9 @@ class task extends control $muletipleTasks = $this->dao->select('root')->from(TABLE_TEAM)->where('type')->eq('task')->andWhere('root')->in($taskIDList)->fetchPairs(); $tasks = $this->task->getByList($taskIDList); + $this->loadModel('action'); foreach($tasks as $taskID => $task) { - $this->loadModel('action'); if(in_array($taskID, $muletipleTasks) and $task->assignedTo != $this->app->user->account) continue; $changes = $this->task->assign($taskID); diff --git a/module/task/view/create.html.php b/module/task/view/create.html.php index fede9e1420..426bbdbc8f 100644 --- a/module/task/view/create.html.php +++ b/module/task/view/create.html.php @@ -78,7 +78,7 @@ task->noticeLinkStory, html::a($this->createLink('project', 'linkStory', "projectID=$project->id"), $lang->project->linkStory, '_blank', 'class="text-primary"'), html::a("javascript:loadStories($project->id)", $lang->refresh, '', 'class="text-primary"'));?>
- story => $stories[$task->story]), $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?> + story, "class='form-control chosen' onchange='setStoryRelated();'");?> preview;?>
diff --git a/module/testsuite/view/browse.html.php b/module/testsuite/view/browse.html.php index 99d06722d2..b9c4a1b10c 100644 --- a/module/testsuite/view/browse.html.php +++ b/module/testsuite/view/browse.html.php @@ -26,7 +26,7 @@
-
+

diff --git a/module/testtask/view/browseunits.html.php b/module/testtask/view/browseunits.html.php index 3cbdad0f14..ba183ad4e9 100644 --- a/module/testtask/view/browseunits.html.php +++ b/module/testtask/view/browseunits.html.php @@ -27,7 +27,7 @@ " . $lang->testtask->importUnitResult, '', "class='btn btn-primary'");?>

-
+

diff --git a/module/user/control.php b/module/user/control.php index 52b143739e..6b252267e9 100644 --- a/module/user/control.php +++ b/module/user/control.php @@ -1024,10 +1024,13 @@ class user extends control */ public function ajaxGetContactUsers($contactListID) { - $list = $contactListID ? $this->user->getContactListByID($contactListID) : ''; + $list = $contactListID ? $this->user->getContactListByID($contactListID) : ''; + $users = $this->user->getPairs('devfirst|nodeleted', $list ? $list->userList : '', $this->config->maxCount); if(isset($this->config->user->moreLink)) $this->config->moreLinks['mailto[]'] = $this->config->user->moreLink; + if(!$contactListID) return print(html::select('mailto[]', $users, '', "class='form-control chosen' multiple data-placeholder='{$this->lang->chooseUsersToMail}'")); + return print(html::select('mailto[]', $users, $list->userList, "class='form-control chosen' multiple data-placeholder='{$this->lang->chooseUsersToMail}'")); } diff --git a/module/user/model.php b/module/user/model.php index 2fd6973bfc..a840d90217 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -66,6 +66,7 @@ class userModel extends model * * @param string $params noletter|noempty|nodeleted|noclosed|withguest|pofirst|devfirst|qafirst|pmfirst|realname, can be sets of theme * @param string $usersToAppended account1,account2 + * @param int $maxCount * @access public * @return array */ @@ -96,6 +97,7 @@ class userModel extends model ->orderBy($orderBy) ->beginIF($maxCount)->limit($maxCount)->fi() ->fetchAll('account'); + if($maxCount and $maxCount == count($users)) { if(is_array($usersToAppended)) $usersToAppended = join(',', $usersToAppended); diff --git a/module/webhook/view/browse.html.php b/module/webhook/view/browse.html.php index 6747eb01bf..13c9f952a8 100644 --- a/module/webhook/view/browse.html.php +++ b/module/webhook/view/browse.html.php @@ -13,7 +13,7 @@ webhook->confirmDelete);?>

- +
diff --git a/www/js/my.full.js b/www/js/my.full.js index be69ed9922..f9c19969af 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -141,7 +141,7 @@ function setMailto(mailto, contactListID) { $('#' + mailto).replaceWith(users); $('#' + mailto + '_chosen').remove(); - $('.picker').remove(); + $('.picker').remove(); if($("[data-pickertype='remote']").length == 0 && $('.picker-select').length == 0) { diff --git a/www/js/zui/min.js b/www/js/zui/min.js index 3753cd7029..a0015a60d4 100644 --- a/www/js/zui/min.js +++ b/www/js/zui/min.js @@ -74,6 +74,6 @@ function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"= * Original idea by: * 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],a=String.fromCharCode(e.which).toLowerCase(),s="",r={};e.altKey&&"alt"!==o&&(s+="alt+"),e.ctrlKey&&"ctrl"!==o&&(s+="ctrl+"),e.metaKey&&!e.ctrlKey&&"meta"!==o&&(s+="meta+"),e.shiftKey&&"shift"!==o&&(s+="shift+"),o?r[s+o]=!0:(r[s+a]=!0,r[s+t.hotkeys.shiftNums[a]]=!0,"shift+"===s&&(r[t.hotkeys.shiftNums[a]]=!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},s[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,a=function(e,i){this.name=n,this.$=t(e),this.getOptions(i),this._init()},s={sort:{template:''},add:{template:''},edit:{template:''},"delete":{template:''}};a.DEFAULTS={animate:null,initialState:"normal",toggleTemplate:''},a.prototype.add=function(e,i,n,o,a){var s,r=t(e),l=this.options;if(r.is("li")?(s=r.children("ul"),s.length||(s=t("
').addClass(i.attr("class")).append(n.clone())).insertAfter(i)),c){var d=h[0].getBoundingClientRect();l.css({left:d.left,width:h.width()}),l.find(".fixed-header-copy").css({left:o.left-d.left,position:"relative",minWidth:i.width()}),a||h.data("fixHeaderScroll")||(h.data("fixHeaderScroll",1),i.width()>h.width()&&h.on("scroll",function(){e.fixHeader()}))}else l.css({left:o.left,width:o.width});var u=l.find("th");n.find("th").each(function(e){u.eq(e).css("width",t(this).outerWidth())})}else l.remove()},r.prototype.fixFooter=function(){var e,i=this,n=i.getTable(),o=i.$.find(".table-footer");if(i.isDataTable)e=n[0].getBoundingClientRect();else{var a=n.find("tbody");if(!a.length)return;e=a[0].getBoundingClientRect()}var s=i.options.fixFooter;o.toggleClass("fixed-footer",!!r);var r=t.isFunction(s)?s(e,o):e.bottom>window.innerHeight-50-("number"==typeof s?s:i.pageFooterHeight||5);o.toggleClass("fixed-footer",!!r),n.toggleClass("with-footer-fixed",!!r),n.trigger("fixFooter",r);var l=t("body"),h=l.hasClass("body-modal");if(r){var c=n.parent(),d=c.is(".table-responsive");o.css({bottom:i.pageFooterHeight||0,left:d?c[0].getBoundingClientRect().left:e.left,width:d?c.width():e.width}),h&&l.css("padding-bottom",40)}else o.css({width:"",left:0,bottom:0}),h&&l.css("padding-bottom",0)},r.prototype.checkAll=function(e){var i=this,n=i.$.find(i.isDataTable?".fixed-left tbody>tr":"tbody>tr");n.each(function(){i.checkRow(t(this),e,!0)}),i.updateCheckUI()},r.prototype.checkRow=function(t,i,n){var o=this;o.isDataTable&&!t.is(".datatable-row-left")&&(t=o.getTable().find('.datatable-row-left[data-index="'+t.data("index")+'"]'));var a=t.find('input[type="checkbox"]');a.length&&(i===e&&(i=!a.is(":checked")),o.isDataTable?o.getTable().find('.datatable-row[data-index="'+t.data("index")+'"]').toggleClass("checked",i):t.toggleClass("checked",i),this.checkItems[t.data("id")]=i,a.prop("checked",i).trigger("change"),n||o.updateCheckUI())},r.prototype.updateCheckUI=function(){var e=this,i=e.getTable(),n=i.find(e.isDataTable?".fixed-left tbody>tr":"tbody>tr").not(".group-summary"),o=!1,a=null,s=0,r=!1,l=n.length;n.each(function(n){var h=t(this),c=h.find('input[type="checkbox"]');r=c.is(":checked");var d=e.isDataTable?i.find('.datatable-row[data-index="'+h.data("index")+'"]'):h;d.toggleClass("checked",r),d.toggleClass("row-check-begin",r&&!o),a&&a.toggleClass("row-check-end",!r&&o),r&&(s+=1),a=d,o=r,l===n+1&&d.toggleClass("row-check-end",r)}),e.$.toggleClass("has-row-checked",s>0).find(".check-all").toggleClass("checked",!(!l||s!==l)),e.updateStatistic(),e.options.onCheckChange&&e.options.onCheckChange()},r.DEFAULTS={checkable:!0,checkOnClickRow:!0,ajaxForm:!1,selectable:!0,fixHeader:!a,fixFooter:!a,iframeWidth:900,replaceId:"self",hot:!1,iframeModalTrigger:".iframe"},t.fn.table=function(e){return this.each(function(){var n=t(this),o=n.data(i),a="object"==typeof e&&e;o||n.data(i,o=new r(this,a)),"string"==typeof e&&o[e]()})},r.NAME=i,t.fn.table.Constructor=r,t(function(){t('[data-ride="table"]').table()})}(jQuery,void 0),function(t,e,i){t.fn._ajaxForm=t.fn.ajaxForm;var n={timeout:e.config?e.config.timeout:0,dataType:"json",method:"post"},o="",a="ja"===t.zui.clientLang()?"":";";t.fn.enableForm=function(e,n,o){return e===i&&(e=!0),this.each(function(){var i=t(this);n||i.find('[type="submit"]').attr("disabled",e?null:"disabled"),!o&&i.hasClass("load-indicator")&&i.toggleClass("loading",!e),i.toggleClass("form-disabled",!e); -})},t.enableForm=function(e,i,n,o){"string"==typeof e||e instanceof t?e=t(e):(o=n,n=i,i=e,e=t("form")),e.enableForm(i!==!1,n,o)},t.disableForm=function(e,i,n){t.enableForm(e,!1,i,n)};var s=function(e,i,n){"string"==typeof i&&(n=i,i=null),n=n||"show",t.zui.messager?t.zui.messager[n](e,i):alert(e)};t.ajaxForm=function(r,l){var h=t(r);if(h.length>1)return h.each(function(){t.ajaxForm(this,l)});t.isFunction(l)&&(l={complete:l}),l=t.extend({},n,h.data(),l);var c=l.beforeSubmit,d=l.error,u=l.success,p=l.finish;delete l.finish,delete l.success,delete l.onError,delete l.beforeSubmit,l=t.extend({beforeSubmit:function(n,a,s){if(h.enableForm(!1),(c&&c(n,a,s))!==!1){var r={},l=a.find('[type="file"]');r.fileapi=l.length&&l[0].files!==i,r.formdata=e.FormData!==i;var d=r.fileapi&&a.find('input[type="file"]:enabled').filter(function(){return""!==t(this).val()}),u=d.length,p="multipart/form-data",f=a.attr("enctype")==p||a.attr("encoding")==p,g=r.fileapi&&r.formdata,m=u&&!g||f&&!r.formdata;m&&(""==o&&(o=s.url),s.url!=o&&(s.url=o),s.url=s.url.indexOf("&")>=0?s.url+"&HTTP_X_REQUESTED_WITH=XMLHttpRequest":s.url+"?HTTP_X_REQUESTED_WITH=XMLHttpRequest")}},success:function(i,n,o){if((u&&u(i,n,o,h))!==!1){try{"string"==typeof i&&(i=JSON.parse(i))}catch(r){}if(null===i||"object"!=typeof i)return i?alert(i):s("No response.","danger");var c=l.responser?t(l.responser):h.find(".form-responser");c.length||(c=t("#responser"));var d=i.message,f=function(){var n=i.callback;if(n){var o=n.indexOf("("),a=(o>0?n.substr(0,o):n).split("."),s=e,r=a[0];a.length>1&&(r=a[1],"top"===a[0]?s=e.top:"parent"===a[0]&&(s=e.parent));var l=s[r];if(t.isFunction(l)){var c=[];return o>0&&")"==n[n.length-1]&&(c=t.parseJSON("["+n.substring(o+1,n.length-1)+"]")),c.push(i),l.apply(h,c)}}};if("success"===i.result){var g=l.locate||i.locate;if(h.enableForm(!0,!!g),d){var m=h.find('[type="submit"]').first(),v=!1;m.length&&(m.popover({container:"body",trigger:"manual",content:d,tipClass:"popover-in-modal popover-success popover-form-result",placement:i.placement||l.popoverPlacement||"right"}).popover("show"),setTimeout(function(){m.popover("destroy")},l.popoverTime||2e3),v=!0),c.length&&(c.html(''+d+"").show().delay(3e3).fadeOut(100),v=!0),v||s(d,"success")}if(p)return p(i,!0,h);if((l.closeModal||i.closeModal)&&setTimeout(t.zui.closeModal,l.closeModalTime||2e3),f()===!1)return;if(g)if("loadInModal"==g){var y=t(".modal");setTimeout(function(){y.load(y.attr("ref"),function(){t(this).find(".modal-dialog").css("width",t(this).data("width")),t.zui.ajustModalPosition()})},1e3)}else if("parent"===g||"top"===g)e[g]&&setTimeout(function(){e[g].location.reload()},1200);else{var b="reload"==g?e.location.href:g;setTimeout(function(){e.location.href=b},1200)}var w=l.ajaxReload||i.ajaxReload;if(w){var x=t(w);x.length&&x.load(e.location.href+" "+w,function(){x.find('[data-toggle="modal"]').modalTrigger()})}}else{if(h.enableForm(),"string"==typeof d)c.length?c.html(''+d+"").show().delay(3e3).fadeOut(100):s(d,"danger");else if("object"==typeof d){var C=!1,_=[];t.each(d,function(e,i){var n=t.isArray(i)?i.join(a):i,o=t("#"+e);if(!o.length)return void _.push(n);var s=e+"Label",r=t("#"+s);if(!r.length){var l=o.closest(".input-group").length,h=o.closest("td").length;r=t('
').appendTo(h?o.closest("td"):l?o.closest(".input-group").parent():o.parent())}r.empty().append(n),o.addClass("has-error");var c=function(){var e=t("#"+s);if(e.length)return e.remove(),o.removeClass("has-error"),!0};o.on("change input mousedown",c);var d=t("#"+e+"_chosen");if(d.length&&d.find(".chosen-single,.chosen-choices").addClass("has-error").on("mousedown",function(){c()===!0&&t(this).removeClass("has-error")}),!C){if(o.hasClass("chosen"))o.trigger("chosen:activate");else if(o.is("textarea")&&o.data("keditor")){var u=o.data("keditor");u.focus(),u.edit.doc.body.focus()}else o.focus();C=!0}}),_.length&&s(_.join(";"),"danger")}if(p)return p(i,!1,h);if(f()===!1)return}}},error:function(t,i,n){if((d&&d(t,i,n,h))!==!1){h.enableForm();var o="timeout"==i||"error"==i?e.lang?e.lang.timeout:i:t.responseText+i+n;s(o,"danger")}}},l),h._ajaxForm(l).data("zui.ajaxform",!0),h.on("click","[data-form-action]",function(){h.attr("action",t(this).data("formAction")).submit()})},t.setAjaxForm=function(e,i,n){t.ajaxForm(e,t.isPlainObject(i)?i:{onFinish:i,beforeSubmit:n})},t.fn.ajaxForm=function(e){return this.each(function(){t.ajaxForm(this,e)})},t.fn.setInputRequired=function(){return this.each(function(){var e=t(this),i=e.parent();i.is(".input-control,td")?i.addClass("required"):e.is(".chosen")?e.attr("required",null).next(".chosen-container").addClass("required"):i.addClass("required"),e.attr("required",null);var n=i.closest(".input-group");n.length&&1===n.find(".required,input[required],select[required]").length&&n.addClass("required")})},t(function(){t('.form-ajax,form[data-type="ajax"]').ajaxForm(),setTimeout(function(){var i=e.config.requiredFields,n=t("form");i&&(i=i.split(",")),i&&i.length&&t.each(i,function(t,e){n.find("#"+e).attr("required","required")}),n.find("input[required],select[required],textarea[required]").setInputRequired()},400),t("#hiddenwin"),t('form[target="hiddenwin"]').on("submit",function(){var e=t(this);e.data("zui.ajaxform")||e.enableForm(!1).data("disabledTime",(new Date).getTime())}).on("click",function(){var e=t(this),i=e.data("disabledTime");i&&(new Date).getTime()-i>1e4&&e.enableForm(!0).data("disabledTime",null)})})}(jQuery,window,void 0),function(t){"use strict";var e="zui.searchList",i=function(t,e){if(t&&t.length)for(var i=0;i
').append(s)),i.$menu.append(s),i.$menu.removeClass("loading"),i.isLoaded=!0,e&&e(!0)},error:function(){i.$menu.removeClass("loading").append('
'+(n.errorText||window.lang&&window.lang.timeout)+"
"),e&&e(!1)}},n.ajax))},n.prototype.scrollTo=function(t){t.length&&t[0].scrollIntoViewIfNeeded&&t[0].scrollIntoViewIfNeeded({behavior:"smooth"})},n.prototype.getItems=function(){return this.$.find(this.options.selector).addClass("search-list-item")},n.prototype.getActiveItem=function(){return this.getItems().filter(".active:first")},n.prototype.search=function(e){var n=this,o=void 0===e||null===e||""===e;n.$.toggleClass("has-search-text",!o);var a=n.getItems().removeClass("active");if(o)a.removeClass("hidden");else{var s=t.trim(e).split(" ");a.each(function(){var e=t(this),n=e.text()+" "+(e.data("key")||e.data("filter"));e.toggleClass("hidden",!i(s,n))})}n.scrollTo(a.not(".hidden").first().addClass("active"))},n.DEFAULTS={selector:".list-group a:not(.not-list-item)",searchBox:".search-box",onSelectItem:null},t.fn.searchList=function(i){return this.each(function(){var o=t(this),a=o.data(e),s="object"==typeof i&&i;a||o.data(e,a=new n(this,s)),"string"==typeof i&&a[i]()})},n.NAME=e,t.fn.searchList.Constructor=n,t(function(){t('[data-ride="searchList"]').searchList()})}(jQuery),function(t){"use strict";var e="zui.labelSelector",i=function(n,o){var a=this;a.name=e,a.$=t(n),o=a.options=t.extend({},i.DEFAULTS,this.$.data(),o),a.$.hide(),a.update()};i.prototype.select=function(t){t+="",this.$wrapper.find(".label.active").removeClass("active"),this.$wrapper.find('.label[data-value="'+t+'"]').addClass("active"),this.$.val(t).trigger("change")},i.prototype.update=function(){var e=this,i=e.options,n=e.$wrapper;if(!n){if(i.wrapper)n=t(i.wrapper);else{var o=e.$.next();n=o.hasClass(".label-selector")?o:t('
')}n.parent().length||e.$.after(n),e.$wrapper=n,n.on("click",".label",function(i){var n=e.$.val(),o=t(this).data("value");e.hasEmptyValue!==!1&&o==n&&(o=e.hasEmptyValue),e.select(o),i.preventDefault()})}n.empty();var a=e.$.val();e.hasEmptyValue=!1,e.$.children("option").each(function(){var e=t(this),o={label:e.text(),value:e.val()},s=""===o.value||"0"===o.value,r=t(i.labelTemplate||'');i.labelClass&&!s&&r.addClass(i.labelClass),i.labelCreator?r=i.labelCreator(r):(r.data("option",o).attr("data-value",o.value),s&&!o.label?r.addClass("empty").append(''):r.text(o.label).toggleClass("active",a===o.value)),n.append(r)})},i.DEFAULTS={},t.fn.labelSelector=function(n){return this.each(function(){var o=t(this),a=o.data(e),s="object"==typeof n&&n;a||o.data(e,a=new i(this,s)),"string"==typeof n&&a[n]()})},i.NAME=e,t.fn.labelSelector.Constructor=i,t(function(){t('[data-provide="labelSelector"]').labelSelector()})}(jQuery),function(t){"use strict";var e="zui.fileInput",i=t.BYTE_UNITS={B:1,KB:1024,MB:1048576,GB:1073741824,TB:1099511627776},n=t.formatBytes=function(t,e,n){return void 0===e&&(e=2),n||(n=ts.fileMaxSize&&(h.val(""),(window.bootbox||window).alert(s.fileSizeError.format(n(s.fileMaxSize)))),r.update()}),r.update()};a.prototype.getFile=function(){var t=this.$input.prop("files");return t&&t[0]},a.prototype.update=function(){var t=this,e=t.$,i=t.getFile(),o=!i;e.toggleClass("normal",!o).toggleClass("empty",o),i?(t.oldName=i.name,e.find(".file-title").text(i.name).attr("title",i.name),e.find(".file-size").text(n(i.size)),e.find(".file-editbox").val(i.name).attr("size",i.name.length),t.options.onSelect&&t.options.onSelect(i,t)):e.find(".file-editbox").val("")},a.DEFAULTS={fileMaxSize:0,fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInput=function(i){return this.each(function(){var n=t(this),o=n.data(e),s="object"==typeof i&&i;o||n.data(e,o=new a(this,s)),"string"==typeof i&&o[i]()})},a.NAME=e,t.fn.fileInput.Constructor=a,t(function(){t('[data-provide="fileInput"]').fileInput()});var s="zui.fileInputList",r=function(e,i){var n=this;n.name=s;var o=n.$=t(e);i=n.options=t.extend({},r.DEFAULTS,this.$.data(),i),n.$template=o.find(".file-input").detach(),n.add()};r.prototype.add=function(){var t=this,e=t.options,i=t.$template.clone();"before"===e.appendWay?t.$.prepend(i):t.$.append(i),i.fileInput({fileMaxSize:e.eachFileMaxSize,fileSizeError:e.fileSizeError,onDelete:function(e){e.$.remove(),t.options.onDelete&&t.options.onDelete(e,t)},onSelect:function(e,i){t.add(),t.options.onSelect&&t.options.onSelect(e,i,t)}})},r.DEFAULTS={fileMaxSize:0,eachFileMaxSize:0,appendWay:"after",fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInputList=function(e){return this.each(function(){var i=t(this),n=i.data(s),o="object"==typeof e&&e;n||i.data(s,n=new r(this,o)),"string"==typeof e&&n[e]()})},r.NAME=s,t.fn.fileInputList.Constructor=r,t(function(){t('[data-provide="fileInputList"]').fileInputList()})}(jQuery),function(t){window.config||(window.config={}),t.createLink=window.createLink=function(t,e,n,o,a,s){if(o||(o=config.defaultView),a||(a=!1),n)for(n=n.split("&"),i=0;i0?"&":"?")+"pgm="+s),l},t(function(){var e=t("#main,#mainContent,#mainRow,.auto-fade-in");e.length&&e.hasClass("fade")&&setTimeout(function(){e.addClass("in")},e.data("fadeTime")||200)}),t.ajaxSendScore=function(e){t.get(t.createLink("score","ajax","method="+e))};var e=function(t){var e=0;if(t){var i=t.split(":");e+=60*parseInt(i[0]),e+=parseInt(i[1])}return e},n=function(t){t%=1440;var e=Math.floor(t/60),i=t%60;return e<10&&(e="0"+e),i<10&&(i="0"+i),e+":"+i},o=function(t){if("string"==typeof t&&(t=e(t)),"number"==typeof t)if(t<1e5){var i=new Date;i.setHours(Math.floor(t/60)%24),i.setMinutes(t%60),t=i}else t=new Date(t);return t},a=function(t,i){for(var a=i?o(i):new Date,s=a.getHours(),r=10*Math.floor(a.getMinutes()/10)+10,l=0;l<24;++l){var h=(l+s)%24;if(!(h<5))for(var c=0;c<6;++c){var d=n(60*h+10*c+r);t.append('")}}t.val()||(time=e(a.format("hh:mm")),time=time-time%10+10,t.val(n(time)))};t.fn.timeSpanControl=function(i){return this.each(function(){var s=t(this),r=t.extend({},i,s.data()),l=s.find('[name="begin"],.control-time-begin'),h=s.find('[name="end"],.control-time-end'),c=function(){var t=l.val();if(s.find(".hide-empty-begin").toggleClass("hide",!t),t){var i=n(e(t)+30);h.find('option[value="'+i+'"]').length&&h.val(i),r.onChange&&r.onChange(h,i)}};if(s.data("timeSpanControlInit")){if(r.begin){var d=o(r.begin).format("hh:mm");l.find('option[value="'+d+'"]').length&&l.val(d),r.onChange&&r.onChange(l,d)}if(r.end){var u=o(r.end).format("hh:mm");h.find('option[value="'+u+'"]').length&&h.val(u),r.onChange&&r.onChange(h,u)}}else l.on("change",c),a(l,r.begin),a(h,r.end),s.data("timeSpanControlInit",!0);r.end||c()})},t.timeSpanControl={convertTimeToNum:e,convertNumToTime:n,initTimeSelect:a,createTime:o};var s=t.setSearchType=function(e,i){var n=t("#searchType");e||(e=n.val()),e=e||"bug",n.val(e);var o=t("#searchTypeMenu");o.find("li.selected").removeClass("selected");var a=o.find('a[data-value="'+e+'"]'),s=a.text();a.parent().addClass("selected"),t("#searchTypeName").text(s),i||t("#searchInput").focus()};t.gotoObject=function(e,i){if(e||(e=t("#searchType").val()),i||(i=t("#searchInput").val()),i&&e)if(i=i.replace(/[^\d]/g,""))window.location.href=t.createLink(e,"testsuite"===e?"library":"view","id="+i);else{var n={zh_cn:"请输入数字ID进行搜索",zh_tw:"請輸入數值ID行搜索"};alert(lang.searchTip||n[t.zui.clientLang()]||"Please enter a numberic id to search")}t("#searchInput").val(i).focus()},t(function(){s(null,!0),t(document).on("keydown",function(e){e.ctrlKey&&71===e.keyCode&&(t("#searchInput").val("").focus(),e.stopPropagation(),e.preventDefault())})}),t.removeAnchor=window.removeAnchor=function(t){var e=t.lastIndexOf("#");return e>-1?t.substr(0,e):t},t.refreshPage=function(){location.href=removeAnchor(location.href)},t.selectLang=window.selectLang=function(e){t.cookie("lang",e,{expires:config.cookieLife,path:config.webRoot}),t.ajaxSendScore("selectLang"),t.refreshPage()},t.selectTheme=window.selectTheme=function(e){t.cookie("theme",e,{expires:config.cookieLife,path:config.webRoot}),t.ajaxSendScore("selectTheme"),t.refreshPage()},t.zui.Picker&&t.zui.Picker.enableChosen(),t.chosenDefaultOptions={middle_highlight:!0,disable_search_threshold:1,compact_search:!0,allow_single_deselect:!0,placeholder_text_single:" ",placeholder_text_multiple:" ",search_contains:!0,max_drop_width:500,max_drop_height:245,no_wrap:!0,drop_direction:function(){var e=t(this.container).closest(".table-responsive:not(.scroll-none)");if(e.length){if(this.drop_directionFixed)return this.drop_directionFixed;var i="down",n=this.container.find(".chosen-drop"),o=this.container.position(),a=n.outerHeight();return o.top>=a&&o.top+a{page}/{totalPage}
',"next_icon","last_icon"],onPageChange:function(e,i){e.recPerPage!==i.recPerPage&&t.cookie(this.options.pageCookie,e.recPerPage,{expires:config.cookieLife,path:config.webRoot}),e.recPerPage!==i.recPerPage&&(window.location.href=this.createLink())}}),t.extend(!0,t.zui.Messager.DEFAULTS,{cssClass:"messagger-zt",icons:{success:"check-circle",info:"chat-line",warning:"exclamation-sign",danger:"exclamation-sign"}}),t.fn.reverseOrder=function(){return this.each(function(){var e=t(this);e.prependTo(e.parent())})};var r=function(e,i){var n=t(e);if(!n.data("historiesInited")){n.data("historiesInited",1),i=t.extend({},n.data(),i);var o=n.find(".histories-list"),a=!0,s=!1;n.on("click",".btn-reverse",function(){o.children("li").reverseOrder(),a=!a,t(this).find(".icon").toggleClass("icon-arrow-up",a).toggleClass("icon-arrow-down",!a);var e="#lastComment",i=t(e);i.length&&window.KindEditor&&(window.KindEditor.remove(e),i.kindeditor())}).on("click",".btn-expand-all",function(){var e=t(this).find(".icon");s=!s,e.toggleClass("icon-plus",!s).toggleClass("icon-minus",s),o.children("li").toggleClass("show-changes",s)}).on("click",".btn-expand",function(){t(this).closest("li").toggleClass("show-changes")}).on("click",".btn-strip",function(){var e=t(this),n=e.find(".icon"),o=n.hasClass("icon-code");n.toggleClass("icon-code",!o).toggleClass("icon-text",o),e.attr("title",o?i.original:i.textdiff),e.closest("li").toggleClass("show-original",o)}),o.find(".btn-strip").attr("title",i.original);var r=n.find(".modal-comment").modal({show:!1}).on("shown.zui.modal",function(){var t=r.find("#comment");t.length&&(t.focus(),window.editor&&window.editor.comment&&window.editor.comment.focus())}).on("show.zui.modal",function(){var e=r.find("#comment");e.length&&!e.data("keditor")&&t.fn.kindeditor&&e.kindeditor()});n.on("click",".btn-comment",function(t){r.modal("toggle"),t.preventDefault()}).on("click",".btn-edit-comment,.btn-hide-form",function(){t(this).closest("li").toggleClass("show-form")});var l=n.find(".comment-edit-form");l.ajaxForm({success:function(t,e,i,n){setTimeout(function(){l.closest("li").removeClass("show-form")},2e3)}})}};t.fn.histories=function(t){return this.each(function(){r(this,t)})},t(function(){t(".histories").histories()});var l=0,h=0;t.toggleSidebar=function(e){var i=t("#sidebar");if(i.length){var n=t("main");if(void 0===e)e=n.hasClass("hide-sidebar");else if(e&&!n.hasClass("hide-sidebar"))return;n.toggleClass("hide-sidebar",!e),clearTimeout(l),t.zui.store.set(h,e);var o=i.children(".cell"),a={overflow:"visible",maxHeight:"initial"};e?(i.addClass("showing"),l=setTimeout(function(){i.removeClass("showing"),i.trigger("sidebar.toggle",e)},210)):(i.trigger("sidebar.toggle",e),t(window).width()<1900&&(a={overflow:"hidden",maxHeight:t(window).height()-45})),o.css(a)}};var c=t.initSidebar=function(){var e=t("#sidebar");if(e.length){if(e.data("init"))return!0;h="sidebar:"+(e.data("id")||config.currentModule+"/"+config.currentMethod);var i=t("main");if(i.length){i.on("click",".sidebar-toggle",function(){t.toggleSidebar(i.hasClass("hide-sidebar"))});var n=t.zui.store.get(h,e.data("hide")!==!1);n===!1&&e.addClass("no-animate"),t.toggleSidebar(n),n===!1&&setTimeout(function(){e.removeClass("no-animate")},500);var o=e.find(".sidebar-toggle");if(o.length){var a=function(){var e=o[0].getBoundingClientRect(),i=t(window).height(),n=Math.max(0,Math.floor(Math.min(i-40,e.top+e.height)-Math.max(e.top,0))/2)+(e.top<0?0-e.top:0);o.removeClass("fade").find(".icon").css("top",n+(t.zui.browser.isIE()?(i-80)/2:0))};a(),e.data("init",1).on("sidebar.toggle",a);var s=t.zui.browser.isIE()?1500:0,r=0,l=null,c=function(){var t=Date.now();return l&&(clearTimeout(l),l=null),t-rtr input[type="checkbox"]:checked');i.each(function(){var i=parseInt(t(this).val(),10);NaN!==i&&e.push(i)}),t.cookie("checkedItem",e.join(","),{expires:config.cookieLife,path:config.webRoot})},t.extend(t.fn.modal.bs.Constructor.DEFAULTS,{scrollInside:!0,backdrop:"static",headerHeight:100}),t.extend(t.zui.ModalTrigger.DEFAULTS,{scrollInside:!0,backdrop:"static",headerHeight:40}),t.fn.initIframeModal=function(){return this.each(function(){var e=t(this);if(!e.parents('[data-ride="table"],.skip-iframe-modal').length){var i={type:"iframe"};e.hasClass("export")&&t.extend(i,{width:800,shown:setCheckedCookie},e.data()),e.modalTrigger(i)}})},t(function(){t("a.iframe,.export").initIframeModal()});var d=function(){var e,i,n=t(this),o=t.extend({limitSize:40,suffix:"…"},n.data()),a=n.text();if(a.length>o.limitSize){e=a,i=a.substr(0,o.limitSize)+o.suffix,n.text(i).addClass("limit-text-on");var s=o.toggleBtn?t(o.toggleBtn):n.next(".text-limit-toggle");s.text(s.data("textExpand")),s.on("click",function(){var t=n.toggleClass("limit-text-on").hasClass("limit-text-on");n.text(t?i:e),s.text(s.data(t?"textExpand":"textCollapse"))})}else(o.toggleBtn?t(o.toggleBtn):n.next(".text-limit-toggle")).hide()};t.fn.textLimit=function(){return this.each(d)},t(function(){t(".text-limit").textLimit()}),t.fixedTableHead=window.fixedTableHead=function(e,i){var n=t(e);if(n.is("table")||(n=n.find("table")),n.length){var o=t(i||window),a=null,s=function(){var e=n.children("thead"),i=e[0].getBoundingClientRect(),o=n.next(".fixed-head-table");if(i.top<0){var s=e.width();if(o.length){if(a!==s){a=s;var r=o.find("th");e.find("th").each(function(e){r.eq(e).width(t(this).width())})}}else{var o=t("
").addClass(n.attr("class")),l=e.clone(),r=l.find("th");e.find("th").each(function(e){r.eq(e).width(t(this).width())}),o.append(l).insertAfter(n)}o.css({left:i.left,width:i.width}).show()}else o.hide()};o.on("scroll",s).on("resize",s),s()}},t(document).on("click","tr[data-url]",function(){var e=t(this),i=e.data("href")||e.data("url");i&&(window.location.href=i)}),"yes"===config.onlybody&&self===parent&&(window.location.href=window.location.href.replace("?onlybody=yes","").replace("&onlybody=yes","")),t(function(){t("body").addClass("m-{currentModule}-{currentMethod}".format(config))});var u,p,f,g,m,v=function(){u||(u=t("#subNavbar"),p=t("#pageNav"),f=t("#pageActions"),g=u.children(".nav"),m=g.outerWidth());var e=u.outerWidth(),i=p.outerWidth()||0,n=f.outerWidth()||0;if(i=i?i+15:0,n=n?n+15:0,!i&&!n)return void g.css({maxWidth:null,left:null,position:"static"});var o=Math.max(300,e-i-n),a=Math.min(o,m),s=(e-a)/2,r=i&&s.btn-toolbar");if(e.length){var i,n,o=e.children(),a=o.length,s=!1,r=null;if(a)for(o.each(function(e){i=t(this),n=i.is(".divider"),n&&!r&&i.hide(),s||n||(s=!0),r=n?null:i,!n||e!==a-1&&0!==e||i.hide()});i.length&&i.is(".divider");)i=i.hide().prev();s||e.hide()}};t(function(){t(".input-group,.btn-group").fixInputGroup(),T()}),window.holders&&t.each(window.holders,function(e){var i=t("#"+e);i.length&&i.is("input")&&i.attr("placeholder",window.holders[e])});var S=function(){var e,i="en"==config.clientLang?"//www.zentao.pm/book/zentaomanual/8.html?fullScreen=zentao":"ja"==config.clientLang?"//www.zentao.jp/book/zentaomanual/8.html?fullScreen=zentao":"//www.zentao.net/book/zentaopmshelp.html?fullScreen=zentao",n=t("#navbar > .nav").first(),o=1e4,a=function(){clearTimeout(e),t("#helpContent").removeClass("show-error")},s=t.openHelp=function(s){s=s||i,a(),n.children("li.active:not(#helpMenuItem)").removeClass("active").addClass("close-help-tab"),t("#helpMenuItem").addClass("active");var r=t("#helpContent");if(r.length){if(t("body").hasClass("show-help-tab"))return void t("#helpIframe").get(0).contentWindow.location.replace(s)}else{r=t('

'+lang.timeout+'

'+s+'

'),t("#header").after(r);var l=t("#helpIframe").get(0);e=setTimeout(function(){t("#helpContent").addClass("show-error")},o),l.onload=l.onreadystatechange=function(){this.readyState&&"complete"!=this.readyState||a()}}t("body").addClass("show-help-tab")},r=t.closeHelp=function(){t("body").removeClass("show-help-tab"),t("#helpMenuItem").removeClass("active"),n.find("li.close-help-tab").removeClass("close-help-tab").addClass("active").find("a").focus()};t(document).on("click",".open-help-tab",function(e){var i=t(this),o=t("#helpMenuItem");o.length||(o=t('
  • '+i.text()+'
  • '),n.append('
  • ').append(o)),s(i.attr("href")),e.preventDefault()}).on("click",".close-help-tab",function(t){r(),t.stopPropagation(),t.preventDefault()})};t(S),t(function(){var e=t(".table-responsive"),i=function(){e.each(function(){this.scrollHeight-3<=this.clientHeight&&this.scrollWidth-3<=this.clientWidth?t(this).addClass("scroll-none").css("overflow","visible"):t(this).removeClass("scroll-none").css("overflow","auto")})};e.length&&(i(),t(window).on("resize",i))});var D=function(){var e=this,i=t(e),n=i.closest("tr").find("textarea");if(n.length){var o=32;n.each(function(){this.style.height="auto";var t=this.value?this.scrollHeight+2:32;o=Math.max(o,t)}),n.css("height",o)}else{e.style.height="auto";var a=e.value?e.scrollHeight+2:32;e.style.height=a+"px"}};t.autoResizeTextarea=function(e){ -t(e).each(D)},t(function(){t("textarea.autosize").each(D),t(document).on("input keyup paste change","textarea.autosize",D)}),t(function(){var e=t("#dropMenu,.drop-menu");e.length&&e.on("click",".toggle-right-col",function(e){t(this).closest("#dropMenu,.drop-menu").toggleClass("show-right-col"),e.stopPropagation(),e.preventDefault()})});var M="undefined"!=typeof InstallTrigger;t.zui.browser.firefox=M,t("html").toggleClass("is-firefox",M).toggleClass("not-firefox",!M),t(function(){var e=t("#mainContent>.main-col"),i=e.children(".main-actions");if(i.length){var n=i.prev();if(i.length&&n.length){t('
    ').css("height",i.outerHeight()).insertAfter(i);var o=function(){var e=n[0].getBoundingClientRect(),o=e.top+e.height+120>t(window).height();t("body").toggleClass("main-actions-fixed",o),o&&i.width(n.width())};t.resetToolbarPosition=o,o(),t(window).on("resize scroll",o)}}}),t(document).on("show.zui.modal",function(e){t("body.body-modal").length&&window.parent&&window.parent!==window&&t(e.target).is(".modal")&&window.parent.$("body").addClass("hide-modal-close")}).on("hidden.zui.modal",function(){t("body.body-modal").length&&window.parent&&window.parent!==window&&window.parent.$("body").removeClass("hide-modal-close")}),t(function(){var e=t(".dropdown-menu.with-search");e.length&&(e.find(".menu-search").on("click",function(t){return t.stopPropagation(),!1}),e.on("keyup change paste","input",function(){var e=t(this),i=e.closest(".dropdown-menu.with-search"),n=e.val().toLowerCase(),o=i.find(".option");""==n?o.removeClass("hide"):o.each(function(){var e=t(this);e.toggleClass("hide",e.text().toString().toLowerCase().indexOf(n)<0&&e.data("key").toString().toLowerCase().indexOf(n)<0)})}),e.parents(".dropdown-submenu").one("mouseenter",function(){var e=t(this).find(".dropdown-list")[0];e&&e.getBoundingClientRect&&setTimeout(function(){var t=270,i=e.getBoundingClientRect();i.top<0&&(t=Math.min(270,i.height)+i.top),e.style.maxHeight=Math.min(270,t)+"px"},50)})),t(".dropdown-menu.with-search .menu-search").on("click",function(t){return t.stopPropagation(),!1})})}(jQuery),$.zui.lang("de",{"zui.pager":{pageOfText:"Seite {0}",prev:"Zurück",next:"Nächste Seite",first:"Erste Seite",last:"Letzte Seite","goto":"Goto",pageOf:"Seite {page}",totalPage:"{totalPage} Seiten",totalCount:"Total: {recTotal} Artikel",pageSize:"{recPerPage} Artikel pro Seite",itemsRange:"Seiten {start} bis {end}",pageOfTotal:"Seite {page}/{totalPage}"},"zui.boards":{append2end:"Gehen Sie zum Ende"},"zui.browser":{tip:"Online. Sorgenfrei. Aktualisiere deinen Browser noch heute!"},"zui.calendar":{weekNames:["Son","Mon","Die","Mit","Don","Fri","Sam"],monthNames:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",year:"{0}Jahr",month:"{0}Monat",yearMonth:"{0}-{1}"},"zui.chosenIcons":{emptyIcon:"[Kein Icon]",commonIcons:"Gemeinsame Symbole",webIcons:"Web-Symbol",editorIcons:"Editor-Symbol",directionalIcons:"Pfeil Zusammenfluss",otherIcons:"Andere Symbole"},"zui.colorPicker":{errorTip:"Kein gültiger Farbwert"},"zui.datagrid":{errorCannotGetDataFromRemote:"Daten vom Remote-Server ({0}) können nicht abgerufen werden.",errorCannotHandleRemoteData:"Die vom Remote-Server zurückgegebenen Daten können nicht verarbeitet werden."},"zui.guideViewer":{prevStep:"Vorheriger Schritt",nextStep:"Nächster Schritt"},"zui.tabs":{reload:"Neu laden",close:"Schliessen",closeOthers:"Schließen Sie andere Registerkarten",closeRight:"Schließen Sie die rechte Registerkarte",reopenLast:"Letzten geschlossenen Tab wiederherstellen",errorCannotFetchFromRemote:"Inhalt kann nicht vom Remote-Server abgerufen werden ({0})."},"zui.uploader":{},datetimepicker:{days:["Sonntag","Montag","Diensteg","Mittwoch","Donnerstag","Freitag","Samstag"],daysShort:["Son","Mon","Die","Mit","Don","Fri","Sam"],daysMin:["Son","Mon","Die","Mit","Don","Fri","Sam"],months:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",suffix:[],meridiem:[]},chosen:{no_results_text:"Nicht gefunden"},bootbox:{OK:"OK",CANCEL:"Stornieren",CONFIRM:"Bestätigen"}}),$.zui.lang("fr",{"zui.pager":{pageOfText:"Page {0}",prev:"Prev",next:"Suivant",first:"First",last:"Last","goto":"Goto",pageOf:"Page {page}",totalPage:"{totalPage} pages",totalCount:"Total: {recTotal} items",pageSize:"{recPerPage} per page",itemsRange:"De {start} à {end}",pageOfTotal:"Page {page} de {totalPage}"},"zui.boards":{append2end:"Aller jusqu'au bout"},"zui.browser":{tip:"Naviguez sans crainte sur Internet. Mettez votre navigateur à jour dès aujourd'hui!"},"zui.calendar":{weekNames:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],monthNames:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",year:"{0} Année",month:"{0} Mois",yearMonth:"{0}-{1}"},"zui.chosenIcons":{emptyIcon:"[Aucune icône]",commonIcons:"Icônes communes",webIcons:"Icône Web",editorIcons:"Icône de l'éditeur",directionalIcons:"Flèche confluence",otherIcons:"Autres icônes"},"zui.colorPicker":{errorTip:"Pas une valeur de couleur valide"},"zui.datagrid":{errorCannotGetDataFromRemote:"Impossible d'obtenir les données du serveur distant ({0}).",errorCannotHandleRemoteData:"Impossible de traiter les données renvoyées par le serveur distant."},"zui.guideViewer":{prevStep:"Étape précédente",nextStep:"Prochaine étape"},"zui.tabs":{reload:"Recharger",close:"Fermer",closeOthers:"Fermez les autres onglets",closeRight:"Fermer l'onglet de droite",reopenLast:"Restaurer le dernier onglet fermé",errorCannotFetchFromRemote:"Impossible d'obtenir le contenu du serveur distant ({0})."},"zui.uploader":{},datetimepicker:{days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],daysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],daysMin:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],months:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],monthsShort:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",suffix:[],meridiem:[]},chosen:{no_results_text:"Pas trouvé"},bootbox:{OK:"D'accord",CANCEL:"Annuler",CONFIRM:"Confirmer"}}); \ No newline at end of file +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],a=String.fromCharCode(e.which).toLowerCase(),s="",r={};e.altKey&&"alt"!==o&&(s+="alt+"),e.ctrlKey&&"ctrl"!==o&&(s+="ctrl+"),e.metaKey&&!e.ctrlKey&&"meta"!==o&&(s+="meta+"),e.shiftKey&&"shift"!==o&&(s+="shift+"),o?r[s+o]=!0:(r[s+a]=!0,r[s+t.hotkeys.shiftNums[a]]=!0,"shift+"===s&&(r[t.hotkeys.shiftNums[a]]=!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},s[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,a=function(e,i){this.name=n,this.$=t(e),this.getOptions(i),this._init()},s={sort:{template:''},add:{template:''},edit:{template:''},"delete":{template:''}};a.DEFAULTS={animate:null,initialState:"normal",toggleTemplate:''},a.prototype.add=function(e,i,n,o,a){var s,r=t(e),l=this.options;if(r.is("li")?(s=r.children("ul"),s.length||(s=t("
      "),r.append(s),this._initList(s,r))):s=r,s){var h=this;t.isArray(i)||(i=[i]),t.each(i,function(e,i){var n=t("
    • ").data(i).appendTo(s);void 0!==i.id&&n.attr("data-id",i.id);var o=l.itemWrapper?t(l.itemWrapper===!0?'
    • ').append(i(h.add,"add",h.add.templateInList)).appendTo(n)}h.sort&&n.sortable(t.extend({dragCssClass:"tree-drag-holder",trigger:".sort-handler",selector:"li:not(.tree-action-item)",finish:function(t){r.callEvent("action",{action:h.sort,$list:n,target:t.target,item:s})}},h.sort.options,t.isPlainObject(this.options.sortable)?this.options.sortable:null))}o&&(o.hasClass("open")||s&&s.open)&&o.addClass("open in")},a.prototype._initItem=function(n,o,a,s){if(void 0===o){var r=n.prev("li");o=r.length?r.data("idx")+1:1}if(a=a||n.closest("ul"),n.attr("data-idx",o).removeClass("tree-single-item"),!n.data("id")){var l=o;a.hasClass("tree")||(l=a.parent("li").data("id")+"-"+l),n.attr("data-id",l)}n.hasClass("active")&&a.parent("li").addClass("has-active-item"),s=s||n.data();var h=e(s.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,s)},a.prototype._init=function(){var i=this.options,a=this;this.actions=e(i.actions),this.$.addClass("tree"),i.animate&&this.$.addClass("tree-animate"),this._initList(this.$);var s=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"===s&&(r?this.isPreserve=!0:this.options.initialState=s="normal"),this.reload(i.data),r&&(this.isPreserve=!0),"expand"===s?this.expand():"collapse"===s?this.collapse():"active"===s&&this.expandSelect(".active"),this.$.on("click",'.list-toggle,a[href="#"],.tree-toggle',function(e){var i=t(this),n=i.parent("li");a.callEvent("hit",{target:n,item:n.data()}),a.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)");a.callEvent("action",{action:i,target:this,$item:n,item:n.data()})}})},a.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))})}},a.prototype.expandSelect=function(t){this.show(t,!0)},a.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)},a.prototype.show=function(e,i,n){var o=this;e instanceof t||(e=o.$.find("li").filter(e)),e.each(function(){var e=t(this);if(o.expand(e,i,n),e)for(var a=e.parent("ul");a&&a.length&&!a.hasClass("tree");){var s=a.parent("li");s.length?(o.expand(s,i,n),a=s.parent("ul")):a=!1}})},a.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)},a.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)},a.prototype.getOptions=function(e){this.options=t.extend({},a.DEFAULTS,this.$.data(),e),null===this.options.animate&&this.$.hasClass("tree-animate")&&(this.options.animate=!0)},a.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 a=e.children("ul");return a.length&&(o.children=n.toData(a)),t.isFunction(i)?i(o,e):o}).get()},a.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),s=o.data(n),r="object"==typeof e&&e;s||o.data(n,s=new a(this,r)),"string"==typeof e&&s[e](i)})},t.fn.tree.Constructor=a,t(function(){t('[data-ride="tree"]').tree()})}(jQuery),function(t){"use strict";var e="zui.colorPicker",i='
      ',n={zh_cn:{errorTip:"不是有效的颜色值"},zh_tw:{errorTip:"不是有效的顏色值"},en:{errorTip:"Not a valid color value"}},o=function(i,n){this.name=e,this.$=t(i),this.getOptions(n),this.init()};o.prototype.init=function(){var e=this,n=e.options,o=e.$,a=o.parent(),s=!1;a.hasClass("colorpicker")?e.$picker=a:(e.$picker=t(n.template||i),s=!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),s&&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(),a=t.zui.Color.isColor(i);o.parent().toggleClass("has-error",!(a||n.optional&&""===i)),a?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.$menu,n=this.options,e=e||this.colors,o=this,a=0;if(i.children("li:not(.heading)").remove(),t.each(e,function(t,e){o.addColor(e),a++}),n.optional){var s=t('
    • ').css({width:n.tileSize,height:n.tileSize});this.$menu.append(s),a++}i.css("width",Math.min(a,n.lineCount)*n.tileSize+6)},o.prototype.setValue=function(e,i){var n=this,o=n.options,a=n.$btn,s="";n.$menu.find(".cp-tile.active").removeClass("active");var r=o.updateBtn;if("auto"===r){var l=a.find(".color-bar");r=!l.length||function(t){l.css("background",t||"")}}if(e){var h=new t.zui.Color(e);s=h.toCssStr().toLowerCase(),r&&(t.isFunction(r)?r(s,a,n):a.css({background:s,color:h.contrast().toCssStr(),borderColor:h.luma()>.43?"#ccc":s})),n.colors[s]||n.addColor(h),i||n.$.val().toLowerCase()===s||n.$.val(s).trigger("change"),n.$menu.find('.cp-tile[data-color="'+s+'"]').addClass("active"),n.$.tooltip("hide"),n.$.trigger("colorchange",h)}else r&&(t.isFunction(r)?r(null,a,n):a.attr("style",null)),i||""===n.$.val()||n.$.val(s).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",s),o.updateBackground&&t(o.updateBackground).css("background-color",s),o.updateColor&&t(o.updateColor).css("color",s),o.updateText&&t(o.updateText).text(s)},o.prototype.getOptions=function(i){var a=t.extend({},o.DEFAULTS,this.$.data(),i);"string"==typeof a.colors&&(a.colors=a.colors.split(","));var s=a.lang||t.zui.clientLang(),r=this.lang=t.zui.getLangData?t.zui.getLangData(e,s,n):n[s]||n.en;a.errorTip||(a.errorTip=r.errorTip),t.fn.tooltip||(a.btnTip=!1),this.options=a},o.DEFAULTS={colors:["#00BCD4","#388E3C","#3280fc","#3F51B5","#9C27B0","#795548","#F57C00","#F44336","#E91E63"],pullMenuRight:!0,wrapper:"btn-wrapper",tileSize:30,lineCount:5,optional:!0,tooltip:"top",icon:"caret-down",updateBtn:"auto"},o.LANG=n,t.fn.colorPicker=function(e){return this.each(function(){var i=t(this),n=i.data(name),a="object"==typeof e&&e;n||i.data(name,n=new o(this,a)),"string"==typeof e&&n[e]()})},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",a=t(n.target);if(a.length){var s=null;if("pie"===o){n=t.extend({scaleShowLabels:!0,scaleLabel:"<%=label%>: <%=value%>"},n);var r=[],l=e.find("tbody > tr").each(function(e){var n=t(this),o=i();n.attr("data-id",e).find(".chart-color-dot").css("background",o),r.push({label:n.find(".chart-label").text(),value:parseFloat(n.data("value")||n.find(".chart-value").text()),color:o,id:e})});r.length>1?n.scaleLabelPlacement="outside":1===r.length&&(n.scaleLabelPlacement="inside",r.push({label:"",value:r[0].value/2e3,color:"#fff",showLabel:!1})),s=a.pieChart(r,n),a.on("mousemove",function(t){var e=s.getSegmentsAtEvent(t);l.removeClass("active"),e.length&&l.filter('[data-id="'+e[0].id+'"]').addClass("active")})}else if("bar"===o){var h=i(),c=[],d={label:e.find("thead .chart-label").text(),color:h,data:[]},l=e.find("tbody > tr").each(function(e){var i=t(this);c.push(i.find(".chart-label").text()),d.data.push(i.data("value")||parseFloat(i.find(".chart-value").text())),i.find(".chart-color-dot").css("background",h)}),r={labels:c,datasets:[d]};c.length&&(n.barValueSpacing=5),s=a.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),s=a.lineChart(r,n)}null!==s&&e.data("zui.chart",s)}})},t(".table-chart").tableChart();var a=function(i,n){var o=t(i);if(!o.data("pieChart")){var a=o.is("canvas")?o:o.find("canvas"),s=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=a.length;r||(a=t("").appendTo(o)),a.attr("width")!==e?s.width=a.attr("width"):a.attr("width",s.width),a.attr("height")!==e?s.height=a.attr("height"):a.attr("height",s.height),r||8!=t.zui.browser.ie||G_vmlCanvasManager.initElement(a[0]),"auto"===s.animation&&(s.animation=s.width>30),s.value=Math.max(0,Math.min(100,s.value)),o.addClass("progress-pie-"+s.width);var l=[{value:s.value,label:s.name,color:s.color,circleBeginEnd:!0},{value:100-s.value,label:"",color:s.backColor}],h=a[s.doughnut?"doughnutChart":"pieChart"](l,t.extend({segmentShowStroke:!1,animation:s.animation,showTooltips:s.showTip,tooltipTemplate:s.tipTemplate,percentageInnerCutout:s.doughnutSize,reverseDrawOrder:!0,animationEasing:"easeInOutQuart",onAnimationProgress:s.realValue?function(t){o.find(".progress-value").text(Math.floor(s.realValue*t))}:e,onAnimationComplete:s.realValue?function(t){o.find(".progress-value").text(s.realValue)}:e},s.chartOptions));o.data("pieChart",h)}};jQuery.fn.progressPie=function(e){t(this).each(function(){var i=t(this);if(!i.closest(".hidden").length){var n=i.closest(".tab-pane");n.length&&!n.hasClass("active")?t('[data-toggle="tab"][data-target="#'+n.attr("id")+'"]').one("shown.zui.tab",function(){a(i,e)}):a(this,e)}})},t(function(){t(".table-chart").tableChart();var e=t(".progress-pie");e.length>100?setTimeout(function(){e.progressPie()},1e3):e.progressPie()})}(jQuery,void 0),function(t){jQuery.fn.sparkline=function(e){t(this).each(function(){var i=t(this),n=t.extend({values:i.attr("values"),width:i.width()-4,height:i.height()-4},i.data(),e),o=n.height,a=[],s=n.width,r=n.values.split(","),l=0;for(var h in r){var c=parseFloat(r[h]);NaN!=c&&(a.push(c),l=Math.max(c,l))}var d=(Math.min(l,30),Math.min(s,Math.max(10,a.length*s/30))),u=i.children("canvas");u.length||(i.append(''),u=i.children("canvas")),u.attr("width",d).attr("height",o);var p={labels:a,datasets:[{fillColor:t.getThemeColor("pale")||"rgba(0,0,255,0.05)",strokeColor:t.getThemeColor("primary")||"#0054EC",pointColor:t.getThemeColor("secondary")||"rgba(255,136,0,1)",pointStrokeColor:"#fff",data:a}]},f={animation:!0,scaleOverride:!0,scaleStepWidth:Math.ceil(l/10),scaleSteps:10,scaleStartValue:0,showScale:!1,showTooltips:!1,pointDot:!1,scaleShowGridLines:!1,datasetStrokeWidth:1},g=t(u).lineChart(p,f);i.data("sparklineChart",g)})},t(function(){t(".sparkline").sparkline()})}(jQuery),function(t){t.fn.fixedDate=function(){return t(this).each(function(){var e=t(this).attr("autocomplete","off");"0000-00-00"==e.val()&&e.focus(function(){"0000-00-00"==e.val()&&e.val("").datetimepicker("update")}).blur(function(){""==e.val()&&e.val("0000-00-00")})})},window.datepickerOptions={language:t("html").attr("lang"),weekStart:1,todayBtn:1,autoclose:1,todayHighlight:1,startView:2,forceParse:0,showMeridian:1,format:"yyyy-mm-dd hh:ii",startDate:"1970-1-1"},t.extend(t.fn.datetimepicker.defaults,window.datepickerOptions),t(function(){var e={minView:2,format:"yyyy-mm-dd"},i={eleClass:"only-pick-time",startView:1,minView:0,maxView:1,format:"hh:ii"},n={minView:3,startView:3,format:"yyyy-mm"};t(".datepicker-wrapper").click(function(){t(this).find(".form-date, .form-datetime, .form-time, .form-month").datetimepicker("show").focus()}),t.fn.datepicker=function(i){return this.datetimepicker(t.extend({},e,i))},t.fn.timepicker=function(e){return this.datetimepicker(t.extend({},i,e))},t.fn.monthpicker=function(e){return this.datetimepicker(t.extend({},n,e))},t.fn.datepickerAll=function(){return this.find(".form-datetime").fixedDate().datetimepicker(),this.find(".form-date").fixedDate().datepicker(),this.find(".form-time").fixedDate().timepicker(),this.find(".form-month").fixedDate().monthpicker(),this},t("body").datepickerAll()})}(jQuery),function(t){var e=function(e,i){i=t.extend({idStart:0,idEnd:9,chosen:!0,datetimepicker:!0,colorPicker:!0,hotkeys:!0},i,e.data());var n=e.find(".template");!n.length&&i.template&&(n=t(i.template));var o=0,a=0,s=function(t){t.is("select.chosen")?t.next(".chosen-container").find("input").focus():t.focus()},r=function(t){var i=e.find("[data-ctrl-index]:focus,.chosen-container-active").first();if(i.length){if(i.is(".chosen-container-active")){if(i.hasClass("chosen-with-drop")&&("down"===t||"up"===t))return;i=i.prev("select.chosen")}var n=i.data("ctrlIndex"),r=i.closest("tr").data("row");"down"===t?r0?r-=1:r=a-1:"left"===t?n>0?n-=1:n=o-1:"right"===t&&(n").html(s);return r.attr("data-row",e).addClass(n.attr("class")).removeClass("template"),i.rowCreator&&i.rowCreator(r,e,i),o?o.after(r):h.append(r),c(r),r};t.extend(l,{createRow:u,template:d});for(var p=i.idStart;p<=i.idEnd;++p)u(p)}else c(e);e.on("click",".btn-copy",function(){var e=t(this),i=t(e.data("copyFrom")).val(),n=t(e.data("copyTo")).val(i).addClass("highlight");setTimeout(function(){n.removeClass("highlight")},2e3)}),i.hotkeys&&t(document).on("keydown",function(t){var e={"Ctrl+#37":"left","Ctrl+#39":"right","#38":"up","#40":"down","Ctrl+#38":"up","Ctrl+#40":"down"},i=[];t.ctrlKey&&i.push("Ctrl"),i.push("#"+t.keyCode);var n=e[i.join("+")];n&&(r(n),t.ctrlKey&&(t.stopPropagation(),t.preventDefault()))}),e.data("zui.batchActionForm",l)};t.fn.batchActionForm=function(i){return this.each(function(){e(t(this),i)})}}(jQuery),function(t,e){"use strict";var i="zui.table",n={zh_cn:{selectedItems:"已选择 {0} 项",attrTotal:"{0}总计 {1}"},zh_tw:{selectedItems:"已选择 {0} 项",attrTotal:"{0}总计 {1}"},en:{selectedItems:"Seleted {0} items",attrTotal:"{0} total {1}"},de:{selectedItems:"{0} ausgewählt",attrTotal:"{0} insgesamt {1}"},fr:{selectedItems:"{0} sélectionnés",attrTotal:"{0} total {1}"}},o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),a=t.zui.browser.isIE(),s=a?200:100,r=function(e,o){var a=this;a.name=i;var s=a.$=t(e);o=a.options=t.extend({},r.DEFAULTS,this.$.data(),o),a.langName=o.lang||t.zui.clientLang(),a.lang=t.zui.getLangData(i,a.langName,n),s.attr("id")||(s.attr("id","table-"+t.zui.uuid()),a.noID=!0,o.hot&&console.warn("ZUI: table hot replace id not defined, the element id attribute should be set.")),s.attr("data-ride")||s.attr("data-ride","table");var l=a.getTable();if(l.length){l.find("thead>tr>th").each(function(){var e=t(this);if(!e.attr("title")){var i=t.trim(e.find("a:first").text()||e.text()||"");i.length&&e.attr("title",i)}}),o.checkable&&(s.on("click",".check-all",function(){a.checkAll(!t(this).hasClass("checked"))}),o.checkOnClickRow&&s.on("click","tbody>tr",function(e){t(e.target).closest('.btn,a,.not-check,.form-control,input[type="text"],.chosen-container').length||a.checkRow(t(this))}),s.on("click",'tbody input[type="checkbox"],tbody label[for]',function(e){e.stopPropagation();var i=t(this);i.is("label")&&(i=i.closest(".checkbox-primary").find('input[type="checkbox"]')),a.checkRow(i.closest("tr"),i.is(":checked"))}),o.selectable&&s.selectable(t.extend({},{selector:a.isDataTable?".fixed-left tbody>tr":"tbody>tr",selectClass:"",trigger:".c-id",clickBehavior:"multi",listenClick:!1,start:function(){this.syncSelectionsFromClass()},select:function(e){a.checkRow(e.target,!0),t.cookie("ajax_dragSelected")||(t.cookie("ajax_dragSelected","on",{expires:config.cookieLife,path:config.webRoot}),t.ajaxSendScore("dragSelected"))},unselect:function(t){a.checkRow(t.target,!1)},rangeStyle:{border:"1px solid #006af1",backgroundColor:"rgba(50,128,252,0.2)",borderRadius:"2px"}},t.isPlainObject(o.selectable)?o.selectable:null)));var h=a.$form=s.is("form")?s:s.find("form");h.length&&(o.ajaxForm?h.ajaxForm(t.isPlainObject(o.ajaxForm)?o.ajaxForm:null):h.on("click","[data-form-action]",function(){h.attr("action",t(this).data("formAction")).submit()})),(o.fixFooter||o.fixHeader)&&(a.pageFooterHeight=t("#footer").outerHeight(),a.updateFixUI(!0),t(window).on("scroll resize",function(){a.updateFixUI()}).on("sidebar.toggle",function(){setTimeout(function(){a.updateFixUI()},200)})),o.group&&(s.on("click",".group-toggle",function(){a.toggleRowGroup(t(this).closest("tr").data("id"))}),t(document).on("click",".group-collapse-all",function(){a.toggleGroups(!1)}).on("click",".group-expand-all",function(){a.toggleGroups(!0)})),a.defaultStatistic=s.find(".table-statistic").html(),a.updateStatistic(),a.initModals(),a.checkItems={},a.updateCheckUI()}};r.prototype.reload=function(e){var i=this,n=i.options,o=n.replaceId;if(!o)return e&&e();var a=i.$.attr("id");if("self"===o){if(i.noID)return;o=a}var s=t("
      ");i.$.addClass("load-indicator loading"),s.load(window.location.href+" #"+o,function(r){if(a===o)i.$.empty().html(s.children().html()),i.$.find('[data-ride="pager"]').pager();else{i.$.find("#"+o).empty().html(s.children().html());try{var l=t(r),h=l.find("#"+o).closest('[data-ride="table"],#'+a);if(h.length){var c=h.find(".table-statistic");c.length&&(i.defaultStatistic=c.html());var d=i.$.find('[data-ride="pager"]').data("zui.pager"),u=h.find('[data-ride="pager"]');d&&u.length&&d.set(u.data())}}catch(p){console.error(p)}}i.$.removeClass("load-indicator loading").trigger("beforeTableReload"),i.updateStatistic(),i.initModals(),i.$.datepickerAll();var f=i.$.find("tbody>tr"),g=!1;t.each(i.checkItems,function(t,e){e&&(i.checkRow(f.filter('[data-id="'+t+'"]'),!0,!0),g=!0)}),g&&i.updateCheckUI(),i.$.trigger("tableReload");var m=t("#mainMenu>.btn-toolbar>.btn-active-text>.label");m.length&&m.text(i.getTable().find("tbody:first>tr:not(.table-children)").length),e&&e(),n.afterReload&&n.afterReload()})},r.prototype.initModals=function(){var e=this,i=e.options,n=e.$.find(i.iframeModalTrigger);if(n.length){var o={type:"iframe",onHide:i.replaceId?function(){var n=t.cookie("selfClose");(1==n||i.hot)&&(t("#triggerModal").data("cancel-reload",1),e.reload(function(){t.cookie("selfClose",0)}))}:null};n.modalTrigger(o)}},r.prototype.getTable=function(){var t=this.$;if(this.isDataTable)return t.find("div.datatable");var e=t.is("table")?t:t.find("table:not(.fixed-header-copy)").first();return e.is(".datatable")&&(this.isDataTable=!0,e=t.find("div.datatable")),e},r.prototype.toggleGroups=function(e){var i=this,n={};i.$.find("tbody>tr").each(function(){var o=t(this).closest("tr").data("id");n[o]||i.toggleRowGroup(o,e)})},r.prototype.toggleRowGroup=function(i,n){var o=this.$.find('tbody>tr[data-id="'+i+'"]'),a=o.filter(".group-summary"),s=n===e?!a.hasClass("hidden"):!!n;o.not(".group-summary").toggleClass("hidden",!s),a.toggleClass("hidden",s),t("body").toggleClass("table-group-collapsed",!this.$.find("tbody>tr.group-summary.hidden").length)},r.prototype.updateStatistic=function(){var i=this,n=i.$.find(".table-statistic");if(n.length){if(i.defaultStatistic===e&&(i.defaultStatistic=n.html()),i.options.statisticCreator)return void n.html(i.options.statisticCreator(i)||i.defaultStatistic);var o=i.statisticCols;if(!o&&o!==!1){o={};var a=!1;i.getTable().find("thead th").each(function(e){var i=t(this),n=i.data("statistic");n&&(a=!0,o[e]={format:n,name:i.text()})}),i.statisticCols=!!a&&o}var s=0;o&&t.each(o,function(t){o[t].total=0,o[t].checkedTotal=0}),i.$.find(i.isDataTable?".fixed-left tbody>tr":"tbody>tr").each(function(){var e=t(this),i=e.hasClass("checked"),n=e.children("td");i&&s++,o&&t.each(o,function(t){var e=parseFloat(n.eq(t).text());isNaN(e)&&(e=0),o[t].total+=e,i&&(o[t].checkedTotal+=e)})});var r=[];if(s)r.push(i.lang.selectedItems.format(s));else if(i.defaultStatistic)return void n.html(i.defaultStatistic);o&&t.each(o,function(t){var e=o[t],n=e[s?"checkedTotal":"total"];e.format&&(n=e.format.format(n)),r.push(i.lang.attrTotal.format(e.name,n))}),n.html(r.join(", "))}},r.prototype.updateFixUI=function(e){var i=this,n=(new Date).getTime();if(!e&&(i.lastUpdateCall&&clearTimeout(i.lastUpdateCall),!i.lastUpdateTime||n-i.lastUpdateTime').append(t('
      ').addClass(i.attr("class")).append(n.clone())).insertAfter(i)),c){var d=h[0].getBoundingClientRect();l.css({left:d.left,width:h.width()}),l.find(".fixed-header-copy").css({left:o.left-d.left,position:"relative",minWidth:i.width()}),a||h.data("fixHeaderScroll")||(h.data("fixHeaderScroll",1),i.width()>h.width()&&h.on("scroll",function(){e.fixHeader()}))}else l.css({left:o.left,width:o.width});var u=l.find("th");n.find("th").each(function(e){u.eq(e).css("width",t(this).outerWidth())})}else l.remove()},r.prototype.fixFooter=function(){var e,i=this,n=i.getTable(),o=i.$.find(".table-footer");if(i.isDataTable)e=n[0].getBoundingClientRect();else{var a=n.find("tbody");if(!a.length)return;e=a[0].getBoundingClientRect()}var s=i.options.fixFooter;o.toggleClass("fixed-footer",!!r);var r=t.isFunction(s)?s(e,o):e.bottom>window.innerHeight-50-("number"==typeof s?s:i.pageFooterHeight||5);o.toggleClass("fixed-footer",!!r),n.toggleClass("with-footer-fixed",!!r),n.trigger("fixFooter",r);var l=t("body"),h=l.hasClass("body-modal");if(r){var c=n.parent(),d=c.is(".table-responsive");o.css({bottom:i.pageFooterHeight||0,left:d?c[0].getBoundingClientRect().left:e.left,width:d?c.width():e.width}),h&&l.css("padding-bottom",40)}else o.css({width:"",left:0,bottom:0}),h&&l.css("padding-bottom",0)},r.prototype.checkAll=function(e){var i=this,n=i.$.find(i.isDataTable?".fixed-left tbody>tr":"tbody>tr");n.each(function(){i.checkRow(t(this),e,!0)}),i.updateCheckUI()},r.prototype.checkRow=function(t,i,n){var o=this;o.isDataTable&&!t.is(".datatable-row-left")&&(t=o.getTable().find('.datatable-row-left[data-index="'+t.data("index")+'"]'));var a=t.find('input[type="checkbox"]');a.length&&(i===e&&(i=!a.is(":checked")),o.isDataTable?o.getTable().find('.datatable-row[data-index="'+t.data("index")+'"]').toggleClass("checked",i):t.toggleClass("checked",i),this.checkItems[t.data("id")]=i,a.prop("checked",i).trigger("change"),n||o.updateCheckUI())},r.prototype.updateCheckUI=function(){var e=this,i=e.getTable(),n=i.find(e.isDataTable?".fixed-left tbody>tr":"tbody>tr").not(".group-summary"),o=!1,a=null,s=0,r=!1,l=n.length;n.each(function(n){var h=t(this),c=h.find('input[type="checkbox"]');r=c.is(":checked");var d=e.isDataTable?i.find('.datatable-row[data-index="'+h.data("index")+'"]'):h;d.toggleClass("checked",r),d.toggleClass("row-check-begin",r&&!o),a&&a.toggleClass("row-check-end",!r&&o),r&&(s+=1),a=d,o=r,l===n+1&&d.toggleClass("row-check-end",r)}),e.$.toggleClass("has-row-checked",s>0).find(".check-all").toggleClass("checked",!(!l||s!==l)),e.updateStatistic(),e.options.onCheckChange&&e.options.onCheckChange()},r.DEFAULTS={checkable:!0,checkOnClickRow:!0,ajaxForm:!1,selectable:!0,fixHeader:!a,fixFooter:!a,iframeWidth:900,replaceId:"self",hot:!1,iframeModalTrigger:".iframe"},t.fn.table=function(e){return this.each(function(){var n=t(this),o=n.data(i),a="object"==typeof e&&e;o||n.data(i,o=new r(this,a)),"string"==typeof e&&o[e]()})},r.NAME=i,t.fn.table.Constructor=r,t(function(){t('[data-ride="table"]').table()})}(jQuery,void 0),function(t,e,i){t.fn._ajaxForm=t.fn.ajaxForm;var n={timeout:e.config?e.config.timeout:0,dataType:"json",method:"post"},o="",a="ja"===t.zui.clientLang()?"":";";t.fn.enableForm=function(e,n,o){return e===i&&(e=!0),this.each(function(){ +var i=t(this);n||i.find('[type="submit"]').attr("disabled",e?null:"disabled"),!o&&i.hasClass("load-indicator")&&i.toggleClass("loading",!e),i.toggleClass("form-disabled",!e)})},t.enableForm=function(e,i,n,o){"string"==typeof e||e instanceof t?e=t(e):(o=n,n=i,i=e,e=t("form")),e.enableForm(i!==!1,n,o)},t.disableForm=function(e,i,n){t.enableForm(e,!1,i,n)};var s=function(e,i,n){"string"==typeof i&&(n=i,i=null),n=n||"show",t.zui.messager?t.zui.messager[n](e,i):alert(e)};t.ajaxForm=function(r,l){var h=t(r);if(h.length>1)return h.each(function(){t.ajaxForm(this,l)});t.isFunction(l)&&(l={complete:l}),l=t.extend({},n,h.data(),l);var c=l.beforeSubmit,d=l.error,u=l.success,p=l.finish;delete l.finish,delete l.success,delete l.onError,delete l.beforeSubmit,l=t.extend({beforeSubmit:function(n,a,s){if(h.enableForm(!1),(c&&c(n,a,s))!==!1){var r={},l=a.find('[type="file"]');r.fileapi=l.length&&l[0].files!==i,r.formdata=e.FormData!==i;var d=r.fileapi&&a.find('input[type="file"]:enabled').filter(function(){return""!==t(this).val()}),u=d.length,p="multipart/form-data",f=a.attr("enctype")==p||a.attr("encoding")==p,g=r.fileapi&&r.formdata,m=u&&!g||f&&!r.formdata;m&&(""==o&&(o=s.url),s.url!=o&&(s.url=o),s.url=s.url.indexOf("&")>=0?s.url+"&HTTP_X_REQUESTED_WITH=XMLHttpRequest":s.url+"?HTTP_X_REQUESTED_WITH=XMLHttpRequest")}},success:function(i,n,o){if((u&&u(i,n,o,h))!==!1){try{"string"==typeof i&&(i=JSON.parse(i))}catch(r){}if(null===i||"object"!=typeof i)return i?alert(i):s("No response.","danger");var c=l.responser?t(l.responser):h.find(".form-responser");c.length||(c=t("#responser"));var d=i.message,f=function(){var n=i.callback;if(n){var o=n.indexOf("("),a=(o>0?n.substr(0,o):n).split("."),s=e,r=a[0];a.length>1&&(r=a[1],"top"===a[0]?s=e.top:"parent"===a[0]&&(s=e.parent));var l=s[r];if(t.isFunction(l)){var c=[];return o>0&&")"==n[n.length-1]&&(c=t.parseJSON("["+n.substring(o+1,n.length-1)+"]")),c.push(i),l.apply(h,c)}}};if("success"===i.result){var g=l.locate||i.locate;if(h.enableForm(!0,!!g),d){var m=h.find('[type="submit"]').first(),v=!1;m.length&&(m.popover({container:"body",trigger:"manual",content:d,tipClass:"popover-in-modal popover-success popover-form-result",placement:i.placement||l.popoverPlacement||"right"}).popover("show"),setTimeout(function(){m.popover("destroy")},l.popoverTime||2e3),v=!0),c.length&&(c.html(''+d+"").show().delay(3e3).fadeOut(100),v=!0),v||s(d,"success")}if(p)return p(i,!0,h);if((l.closeModal||i.closeModal)&&setTimeout(t.zui.closeModal,l.closeModalTime||2e3),f()===!1)return;if(g)if("loadInModal"==g){var y=t(".modal");setTimeout(function(){y.load(y.attr("ref"),function(){t(this).find(".modal-dialog").css("width",t(this).data("width")),t.zui.ajustModalPosition()})},1e3)}else if("parent"===g||"top"===g)e[g]&&setTimeout(function(){e[g].location.reload()},1200);else{var b="reload"==g?e.location.href:g;setTimeout(function(){e.location.href=b},1200)}var w=l.ajaxReload||i.ajaxReload;if(w){var x=t(w);x.length&&x.load(e.location.href+" "+w,function(){x.find('[data-toggle="modal"]').modalTrigger()})}}else{if(h.enableForm(),"string"==typeof d)c.length?c.html(''+d+"").show().delay(3e3).fadeOut(100):s(d,"danger");else if("object"==typeof d){var C=!1,_=[];t.each(d,function(e,i){var n=t.isArray(i)?i.join(a):i,o=t("#"+e);if(!o.length)return void _.push(n);var s=e+"Label",r=t("#"+s);if(!r.length){var l=o.closest(".input-group").length,h=o.closest("td").length;r=t('
      ').appendTo(h?o.closest("td"):l?o.closest(".input-group").parent():o.parent())}r.empty().append(n),o.addClass("has-error");var c=function(){var e=t("#"+s);if(e.length)return e.remove(),o.removeClass("has-error"),!0};o.on("change input mousedown",c);var d=t("#"+e+"_chosen");if(d.length&&d.find(".chosen-single,.chosen-choices").addClass("has-error").on("mousedown",function(){c()===!0&&t(this).removeClass("has-error")}),!C){if(o.hasClass("chosen"))o.trigger("chosen:activate");else if(o.is("textarea")&&o.data("keditor")){var u=o.data("keditor");u.focus(),u.edit.doc.body.focus()}else o.focus();C=!0}}),_.length&&s(_.join(";"),"danger")}if(p)return p(i,!1,h);if(f()===!1)return}}},error:function(t,i,n){if((d&&d(t,i,n,h))!==!1){h.enableForm();var o="timeout"==i||"error"==i?e.lang?e.lang.timeout:i:t.responseText+i+n;s(o,"danger")}}},l),h._ajaxForm(l).data("zui.ajaxform",!0),h.on("click","[data-form-action]",function(){h.attr("action",t(this).data("formAction")).submit()})},t.setAjaxForm=function(e,i,n){t.ajaxForm(e,t.isPlainObject(i)?i:{onFinish:i,beforeSubmit:n})},t.fn.ajaxForm=function(e){return this.each(function(){t.ajaxForm(this,e)})},t.fn.setInputRequired=function(){return this.each(function(){var e=t(this),i=e.parent();i.is(".input-control,td")?i.addClass("required"):e.is(".chosen")?e.attr("required",null).next(".chosen-container").addClass("required"):i.addClass("required"),e.attr("required",null);var n=i.closest(".input-group");n.length&&1===n.find(".required,input[required],select[required]").length&&n.addClass("required")})},t(function(){t('.form-ajax,form[data-type="ajax"]').ajaxForm(),setTimeout(function(){var i=e.config.requiredFields,n=t("form");i&&(i=i.split(",")),i&&i.length&&t.each(i,function(t,e){n.find("#"+e).attr("required","required")}),n.find("input[required],select[required],textarea[required]").setInputRequired()},400),t("#hiddenwin"),t('form[target="hiddenwin"]').on("submit",function(){var e=t(this);e.data("zui.ajaxform")||e.enableForm(!1).data("disabledTime",(new Date).getTime())}).on("click",function(){var e=t(this),i=e.data("disabledTime");i&&(new Date).getTime()-i>1e4&&e.enableForm(!0).data("disabledTime",null)})})}(jQuery,window,void 0),function(t){"use strict";var e="zui.searchList",i=function(t,e){if(t&&t.length)for(var i=0;i
      ').append(s)),i.$menu.append(s),i.$menu.removeClass("loading"),i.isLoaded=!0,e&&e(!0)},error:function(){i.$menu.removeClass("loading").append('
      '+(n.errorText||window.lang&&window.lang.timeout)+"
      "),e&&e(!1)}},n.ajax))},n.prototype.scrollTo=function(t){t.length&&t[0].scrollIntoViewIfNeeded&&t[0].scrollIntoViewIfNeeded({behavior:"smooth"})},n.prototype.getItems=function(){return this.$.find(this.options.selector).addClass("search-list-item")},n.prototype.getActiveItem=function(){return this.getItems().filter(".active:first")},n.prototype.search=function(e){var n=this,o=void 0===e||null===e||""===e;n.$.toggleClass("has-search-text",!o);var a=n.getItems().removeClass("active");if(o)a.removeClass("hidden");else{var s=t.trim(e).split(" ");a.each(function(){var e=t(this),n=e.text()+" "+(e.data("key")||e.data("filter"));e.toggleClass("hidden",!i(s,n))})}n.scrollTo(a.not(".hidden").first().addClass("active"))},n.DEFAULTS={selector:".list-group a:not(.not-list-item)",searchBox:".search-box",onSelectItem:null},t.fn.searchList=function(i){return this.each(function(){var o=t(this),a=o.data(e),s="object"==typeof i&&i;a||o.data(e,a=new n(this,s)),"string"==typeof i&&a[i]()})},n.NAME=e,t.fn.searchList.Constructor=n,t(function(){t('[data-ride="searchList"]').searchList()})}(jQuery),function(t){"use strict";var e="zui.labelSelector",i=function(n,o){var a=this;a.name=e,a.$=t(n),o=a.options=t.extend({},i.DEFAULTS,this.$.data(),o),a.$.hide(),a.update()};i.prototype.select=function(t){t+="",this.$wrapper.find(".label.active").removeClass("active"),this.$wrapper.find('.label[data-value="'+t+'"]').addClass("active"),this.$.val(t).trigger("change")},i.prototype.update=function(){var e=this,i=e.options,n=e.$wrapper;if(!n){if(i.wrapper)n=t(i.wrapper);else{var o=e.$.next();n=o.hasClass(".label-selector")?o:t('
      ')}n.parent().length||e.$.after(n),e.$wrapper=n,n.on("click",".label",function(i){var n=e.$.val(),o=t(this).data("value");e.hasEmptyValue!==!1&&o==n&&(o=e.hasEmptyValue),e.select(o),i.preventDefault()})}n.empty();var a=e.$.val();e.hasEmptyValue=!1,e.$.children("option").each(function(){var e=t(this),o={label:e.text(),value:e.val()},s=""===o.value||"0"===o.value,r=t(i.labelTemplate||'');i.labelClass&&!s&&r.addClass(i.labelClass),i.labelCreator?r=i.labelCreator(r):(r.data("option",o).attr("data-value",o.value),s&&!o.label?r.addClass("empty").append(''):r.text(o.label).toggleClass("active",a===o.value)),n.append(r)})},i.DEFAULTS={},t.fn.labelSelector=function(n){return this.each(function(){var o=t(this),a=o.data(e),s="object"==typeof n&&n;a||o.data(e,a=new i(this,s)),"string"==typeof n&&a[n]()})},i.NAME=e,t.fn.labelSelector.Constructor=i,t(function(){t('[data-provide="labelSelector"]').labelSelector()})}(jQuery),function(t){"use strict";var e="zui.fileInput",i=t.BYTE_UNITS={B:1,KB:1024,MB:1048576,GB:1073741824,TB:1099511627776},n=t.formatBytes=function(t,e,n){return void 0===e&&(e=2),n||(n=ts.fileMaxSize&&(h.val(""),(window.bootbox||window).alert(s.fileSizeError.format(n(s.fileMaxSize)))),r.update()}),r.update()};a.prototype.getFile=function(){var t=this.$input.prop("files");return t&&t[0]},a.prototype.update=function(){var t=this,e=t.$,i=t.getFile(),o=!i;e.toggleClass("normal",!o).toggleClass("empty",o),i?(t.oldName=i.name,e.find(".file-title").text(i.name).attr("title",i.name),e.find(".file-size").text(n(i.size)),e.find(".file-editbox").val(i.name).attr("size",i.name.length),t.options.onSelect&&t.options.onSelect(i,t)):e.find(".file-editbox").val("")},a.DEFAULTS={fileMaxSize:0,fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInput=function(i){return this.each(function(){var n=t(this),o=n.data(e),s="object"==typeof i&&i;o||n.data(e,o=new a(this,s)),"string"==typeof i&&o[i]()})},a.NAME=e,t.fn.fileInput.Constructor=a,t(function(){t('[data-provide="fileInput"]').fileInput()});var s="zui.fileInputList",r=function(e,i){var n=this;n.name=s;var o=n.$=t(e);i=n.options=t.extend({},r.DEFAULTS,this.$.data(),i),n.$template=o.find(".file-input").detach(),n.add()};r.prototype.add=function(){var t=this,e=t.options,i=t.$template.clone();"before"===e.appendWay?t.$.prepend(i):t.$.append(i),i.fileInput({fileMaxSize:e.eachFileMaxSize,fileSizeError:e.fileSizeError,onDelete:function(e){e.$.remove(),t.options.onDelete&&t.options.onDelete(e,t)},onSelect:function(e,i){t.add(),t.options.onSelect&&t.options.onSelect(e,i,t)}})},r.DEFAULTS={fileMaxSize:0,eachFileMaxSize:0,appendWay:"after",fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInputList=function(e){return this.each(function(){var i=t(this),n=i.data(s),o="object"==typeof e&&e;n||i.data(s,n=new r(this,o)),"string"==typeof e&&n[e]()})},r.NAME=s,t.fn.fileInputList.Constructor=r,t(function(){t('[data-provide="fileInputList"]').fileInputList()})}(jQuery),function(t){window.config||(window.config={}),t.createLink=window.createLink=function(t,e,n,o,a,s){if(o||(o=config.defaultView),a||(a=!1),n)for(n=n.split("&"),i=0;i0?"&":"?")+"pgm="+s),l},t(function(){var e=t("#main,#mainContent,#mainRow,.auto-fade-in");e.length&&e.hasClass("fade")&&setTimeout(function(){e.addClass("in")},e.data("fadeTime")||200)}),t.ajaxSendScore=function(e){t.get(t.createLink("score","ajax","method="+e))};var e=function(t){var e=0;if(t){var i=t.split(":");e+=60*parseInt(i[0]),e+=parseInt(i[1])}return e},n=function(t){t%=1440;var e=Math.floor(t/60),i=t%60;return e<10&&(e="0"+e),i<10&&(i="0"+i),e+":"+i},o=function(t){if("string"==typeof t&&(t=e(t)),"number"==typeof t)if(t<1e5){var i=new Date;i.setHours(Math.floor(t/60)%24),i.setMinutes(t%60),t=i}else t=new Date(t);return t},a=function(t,i){for(var a=i?o(i):new Date,s=a.getHours(),r=10*Math.floor(a.getMinutes()/10)+10,l=0;l<24;++l){var h=(l+s)%24;if(!(h<5))for(var c=0;c<6;++c){var d=n(60*h+10*c+r);t.append('")}}t.val()||(time=e(a.format("hh:mm")),time=time-time%10+10,t.val(n(time)))};t.fn.timeSpanControl=function(i){return this.each(function(){var s=t(this),r=t.extend({},i,s.data()),l=s.find('[name="begin"],.control-time-begin'),h=s.find('[name="end"],.control-time-end'),c=function(){var t=l.val();if(s.find(".hide-empty-begin").toggleClass("hide",!t),t){var i=n(e(t)+30);h.find('option[value="'+i+'"]').length&&h.val(i),r.onChange&&r.onChange(h,i)}};if(s.data("timeSpanControlInit")){if(r.begin){var d=o(r.begin).format("hh:mm");l.find('option[value="'+d+'"]').length&&l.val(d),r.onChange&&r.onChange(l,d)}if(r.end){var u=o(r.end).format("hh:mm");h.find('option[value="'+u+'"]').length&&h.val(u),r.onChange&&r.onChange(h,u)}}else l.on("change",c),a(l,r.begin),a(h,r.end),s.data("timeSpanControlInit",!0);r.end||c()})},t.timeSpanControl={convertTimeToNum:e,convertNumToTime:n,initTimeSelect:a,createTime:o};var s=t.setSearchType=function(e,i){var n=t("#searchType");e||(e=n.val()),e=e||"bug",n.val(e);var o=t("#searchTypeMenu");o.find("li.selected").removeClass("selected");var a=o.find('a[data-value="'+e+'"]'),s=a.text();a.parent().addClass("selected"),t("#searchTypeName").text(s),i||t("#searchInput").focus()};t.gotoObject=function(e,i){if(e||(e=t("#searchType").val()),i||(i=t("#searchInput").val()),i&&e)if(i=i.replace(/[^\d]/g,""))window.location.href=t.createLink(e,"testsuite"===e?"library":"view","id="+i);else{var n={zh_cn:"请输入数字ID进行搜索",zh_tw:"請輸入數值ID行搜索"};alert(lang.searchTip||n[t.zui.clientLang()]||"Please enter a numberic id to search")}t("#searchInput").val(i).focus()},t(function(){s(null,!0),t(document).on("keydown",function(e){e.ctrlKey&&71===e.keyCode&&(t("#searchInput").val("").focus(),e.stopPropagation(),e.preventDefault())})}),t.removeAnchor=window.removeAnchor=function(t){var e=t.lastIndexOf("#");return e>-1?t.substr(0,e):t},t.refreshPage=function(){location.href=removeAnchor(location.href)},t.selectLang=window.selectLang=function(e){t.cookie("lang",e,{expires:config.cookieLife,path:config.webRoot}),t.ajaxSendScore("selectLang"),t.refreshPage()},t.selectTheme=window.selectTheme=function(e){t.cookie("theme",e,{expires:config.cookieLife,path:config.webRoot}),t.ajaxSendScore("selectTheme"),t.refreshPage()},t.zui.Picker&&t.zui.Picker.enableChosen(),t.chosenDefaultOptions={middle_highlight:!0,disable_search_threshold:1,compact_search:!0,allow_single_deselect:!0,placeholder_text_single:" ",placeholder_text_multiple:" ",search_contains:!0,max_drop_width:500,max_drop_height:245,no_wrap:!0,drop_direction:function(){var e=t(this.container).closest(".table-responsive:not(.scroll-none)");if(e.length){if(this.drop_directionFixed)return this.drop_directionFixed;var i="down",n=this.container.find(".chosen-drop"),o=this.container.position(),a=n.outerHeight();return o.top>=a&&o.top+a{page}/{totalPage}',"next_icon","last_icon"],onPageChange:function(e,i){e.recPerPage!==i.recPerPage&&t.cookie(this.options.pageCookie,e.recPerPage,{expires:config.cookieLife,path:config.webRoot}),e.recPerPage!==i.recPerPage&&(window.location.href=this.createLink())}}),t.extend(!0,t.zui.Messager.DEFAULTS,{cssClass:"messagger-zt",icons:{success:"check-circle",info:"chat-line",warning:"exclamation-sign",danger:"exclamation-sign"}}),t.fn.reverseOrder=function(){return this.each(function(){var e=t(this);e.prependTo(e.parent())})};var r=function(e,i){var n=t(e);if(!n.data("historiesInited")){n.data("historiesInited",1),i=t.extend({},n.data(),i);var o=n.find(".histories-list"),a=!0,s=!1;n.on("click",".btn-reverse",function(){o.children("li").reverseOrder(),a=!a,t(this).find(".icon").toggleClass("icon-arrow-up",a).toggleClass("icon-arrow-down",!a);var e="#lastComment",i=t(e);i.length&&window.KindEditor&&(window.KindEditor.remove(e),i.kindeditor())}).on("click",".btn-expand-all",function(){var e=t(this).find(".icon");s=!s,e.toggleClass("icon-plus",!s).toggleClass("icon-minus",s),o.children("li").toggleClass("show-changes",s)}).on("click",".btn-expand",function(){t(this).closest("li").toggleClass("show-changes")}).on("click",".btn-strip",function(){var e=t(this),n=e.find(".icon"),o=n.hasClass("icon-code");n.toggleClass("icon-code",!o).toggleClass("icon-text",o),e.attr("title",o?i.original:i.textdiff),e.closest("li").toggleClass("show-original",o)}),o.find(".btn-strip").attr("title",i.original);var r=n.find(".modal-comment").modal({show:!1}).on("shown.zui.modal",function(){var t=r.find("#comment");t.length&&(t.focus(),window.editor&&window.editor.comment&&window.editor.comment.focus())}).on("show.zui.modal",function(){var e=r.find("#comment");e.length&&!e.data("keditor")&&t.fn.kindeditor&&e.kindeditor()});n.on("click",".btn-comment",function(t){r.modal("toggle"),t.preventDefault()}).on("click",".btn-edit-comment,.btn-hide-form",function(){t(this).closest("li").toggleClass("show-form")});var l=n.find(".comment-edit-form");l.ajaxForm({success:function(t,e,i,n){setTimeout(function(){l.closest("li").removeClass("show-form")},2e3)}})}};t.fn.histories=function(t){return this.each(function(){r(this,t)})},t(function(){t(".histories").histories()});var l=0,h=0;t.toggleSidebar=function(e){var i=t("#sidebar");if(i.length){var n=t("main");if(void 0===e)e=n.hasClass("hide-sidebar");else if(e&&!n.hasClass("hide-sidebar"))return;n.toggleClass("hide-sidebar",!e),clearTimeout(l),t.zui.store.set(h,e);var o=i.children(".cell"),a={overflow:"visible",maxHeight:"initial"};e?(i.addClass("showing"),l=setTimeout(function(){i.removeClass("showing"),i.trigger("sidebar.toggle",e)},210)):(i.trigger("sidebar.toggle",e),t(window).width()<1900&&(a={overflow:"hidden",maxHeight:t(window).height()-45})),o.css(a)}};var c=t.initSidebar=function(){var e=t("#sidebar");if(e.length){if(e.data("init"))return!0;h="sidebar:"+(e.data("id")||config.currentModule+"/"+config.currentMethod);var i=t("main");if(i.length){i.on("click",".sidebar-toggle",function(){t.toggleSidebar(i.hasClass("hide-sidebar"))});var n=t.zui.store.get(h,e.data("hide")!==!1);n===!1&&e.addClass("no-animate"),t.toggleSidebar(n),n===!1&&setTimeout(function(){e.removeClass("no-animate")},500);var o=e.find(".sidebar-toggle");if(o.length){var a=function(){var e=o[0].getBoundingClientRect(),i=t(window).height(),n=Math.max(0,Math.floor(Math.min(i-40,e.top+e.height)-Math.max(e.top,0))/2)+(e.top<0?0-e.top:0);o.removeClass("fade").find(".icon").css("top",n+(t.zui.browser.isIE()?(i-80)/2:0))};a(),e.data("init",1).on("sidebar.toggle",a);var s=t.zui.browser.isIE()?1500:0,r=0,l=null,c=function(){var t=Date.now();return l&&(clearTimeout(l),l=null),t-rtr input[type="checkbox"]:checked');i.each(function(){var i=parseInt(t(this).val(),10);NaN!==i&&e.push(i)}),t.cookie("checkedItem",e.join(","),{expires:config.cookieLife,path:config.webRoot})},t.extend(t.fn.modal.bs.Constructor.DEFAULTS,{scrollInside:!0,backdrop:"static",headerHeight:100}),t.extend(t.zui.ModalTrigger.DEFAULTS,{scrollInside:!0,backdrop:"static",headerHeight:40}),t.fn.initIframeModal=function(){return this.each(function(){var e=t(this);if(!e.parents('[data-ride="table"],.skip-iframe-modal').length){var i={type:"iframe"};e.hasClass("export")&&t.extend(i,{width:800,shown:setCheckedCookie},e.data()),e.modalTrigger(i)}})},t(function(){t("a.iframe,.export").initIframeModal()});var d=function(){var e,i,n=t(this),o=t.extend({limitSize:40,suffix:"…"},n.data()),a=n.text();if(a.length>o.limitSize){e=a,i=a.substr(0,o.limitSize)+o.suffix,n.text(i).addClass("limit-text-on");var s=o.toggleBtn?t(o.toggleBtn):n.next(".text-limit-toggle");s.text(s.data("textExpand")),s.on("click",function(){var t=n.toggleClass("limit-text-on").hasClass("limit-text-on");n.text(t?i:e),s.text(s.data(t?"textExpand":"textCollapse"))})}else(o.toggleBtn?t(o.toggleBtn):n.next(".text-limit-toggle")).hide()};t.fn.textLimit=function(){return this.each(d)},t(function(){t(".text-limit").textLimit()}),t.fixedTableHead=window.fixedTableHead=function(e,i){var n=t(e);if(n.is("table")||(n=n.find("table")),n.length){var o=t(i||window),a=null,s=function(){var e=n.children("thead"),i=e[0].getBoundingClientRect(),o=n.next(".fixed-head-table");if(i.top<0){var s=e.width();if(o.length){if(a!==s){a=s;var r=o.find("th");e.find("th").each(function(e){r.eq(e).width(t(this).width())})}}else{var o=t("
      ").addClass(n.attr("class")),l=e.clone(),r=l.find("th");e.find("th").each(function(e){r.eq(e).width(t(this).width())}),o.append(l).insertAfter(n)}o.css({left:i.left,width:i.width}).show()}else o.hide()};o.on("scroll",s).on("resize",s),s()}},t(document).on("click","tr[data-url]",function(){var e=t(this),i=e.data("href")||e.data("url");i&&(window.location.href=i)}),"yes"===config.onlybody&&self===parent&&(window.location.href=window.location.href.replace("?onlybody=yes","").replace("&onlybody=yes","")),t(function(){t("body").addClass("m-{currentModule}-{currentMethod}".format(config))});var u,p,f,g,m,v=function(){u||(u=t("#subNavbar"),p=t("#pageNav"),f=t("#pageActions"),g=u.children(".nav"),m=g.outerWidth());var e=u.outerWidth(),i=p.outerWidth()||0,n=f.outerWidth()||0;if(i=i?i+15:0,n=n?n+15:0,!i&&!n)return void g.css({maxWidth:null,left:null,position:"static"});var o=Math.max(300,e-i-n),a=Math.min(o,m),s=(e-a)/2,r=i&&s.btn-toolbar");if(e.length){var i,n,o=e.children(),a=o.length,s=!1,r=null;if(a)for(o.each(function(e){i=t(this),n=i.is(".divider"),n&&!r&&i.hide(),s||n||(s=!0),r=n?null:i,!n||e!==a-1&&0!==e||i.hide()});i.length&&i.is(".divider");)i=i.hide().prev();s||e.hide()}};t(function(){t(".input-group,.btn-group").fixInputGroup(),T()}),window.holders&&t.each(window.holders,function(e){var i=t("#"+e);i.length&&i.is("input")&&i.attr("placeholder",window.holders[e])});var S=function(){var e,i="en"==config.clientLang?"//www.zentao.pm/book/zentaomanual/8.html?fullScreen=zentao":"ja"==config.clientLang?"//www.zentao.jp/book/zentaomanual/8.html?fullScreen=zentao":"//www.zentao.net/book/zentaopmshelp.html?fullScreen=zentao",n=t("#navbar > .nav").first(),o=1e4,a=function(){clearTimeout(e),t("#helpContent").removeClass("show-error")},s=t.openHelp=function(s){s=s||i,a(),n.children("li.active:not(#helpMenuItem)").removeClass("active").addClass("close-help-tab"),t("#helpMenuItem").addClass("active");var r=t("#helpContent");if(r.length){if(t("body").hasClass("show-help-tab"))return void t("#helpIframe").get(0).contentWindow.location.replace(s)}else{r=t('

      '+lang.timeout+'

      '+s+'

      '),t("#header").after(r);var l=t("#helpIframe").get(0);e=setTimeout(function(){t("#helpContent").addClass("show-error")},o),l.onload=l.onreadystatechange=function(){this.readyState&&"complete"!=this.readyState||a()}}t("body").addClass("show-help-tab")},r=t.closeHelp=function(){t("body").removeClass("show-help-tab"),t("#helpMenuItem").removeClass("active"),n.find("li.close-help-tab").removeClass("close-help-tab").addClass("active").find("a").focus()};t(document).on("click",".open-help-tab",function(e){var i=t(this),o=t("#helpMenuItem");o.length||(o=t('
    • '+i.text()+'
    • '),n.append('
    • ').append(o)),s(i.attr("href")),e.preventDefault()}).on("click",".close-help-tab",function(t){r(),t.stopPropagation(),t.preventDefault()})};t(S),t(function(){var e=t(".table-responsive"),i=function(){e.each(function(){this.scrollHeight-3<=this.clientHeight&&this.scrollWidth-3<=this.clientWidth?t(this).addClass("scroll-none").css("overflow","visible"):t(this).removeClass("scroll-none").css("overflow","auto")})};e.length&&(i(),t(window).on("resize",i))});var D=function(){var e=this,i=t(e),n=i.closest("tr").find("textarea");if(n.length){var o=32;n.each(function(){this.style.height="auto";var t=this.value?this.scrollHeight+2:32; +o=Math.max(o,t)}),n.css("height",o)}else{e.style.height="auto";var a=e.value?e.scrollHeight+2:32;e.style.height=a+"px"}};t.autoResizeTextarea=function(e){t(e).each(D)},t(function(){t("textarea.autosize").each(D),t(document).on("input keyup paste change","textarea.autosize",D)}),t(function(){var e=t("#dropMenu,.drop-menu");e.length&&e.on("click",".toggle-right-col",function(e){t(this).closest("#dropMenu,.drop-menu").toggleClass("show-right-col"),e.stopPropagation(),e.preventDefault()})});var M="undefined"!=typeof InstallTrigger;t.zui.browser.firefox=M,t("html").toggleClass("is-firefox",M).toggleClass("not-firefox",!M),t(function(){var e=t("#mainContent>.main-col"),i=e.children(".main-actions");if(i.length){var n=i.prev();if(i.length&&n.length){t('
      ').css("height",i.outerHeight()).insertAfter(i);var o=function(){var e=n[0].getBoundingClientRect(),o=e.top+e.height+120>t(window).height();t("body").toggleClass("main-actions-fixed",o),o&&i.width(n.width())};t.resetToolbarPosition=o,o(),t(window).on("resize scroll",o)}}}),t(document).on("show.zui.modal",function(e){t("body.body-modal").length&&window.parent&&window.parent!==window&&t(e.target).is(".modal")&&window.parent.$("body").addClass("hide-modal-close")}).on("hidden.zui.modal",function(){t("body.body-modal").length&&window.parent&&window.parent!==window&&window.parent.$("body").removeClass("hide-modal-close")}),t(function(){var e=t(".dropdown-menu.with-search");e.length&&(e.find(".menu-search").on("click",function(t){return t.stopPropagation(),!1}),e.on("keyup change paste","input",function(){var e=t(this),i=e.closest(".dropdown-menu.with-search"),n=e.val().toLowerCase(),o=i.find(".option");""==n?o.removeClass("hide"):o.each(function(){var e=t(this);e.toggleClass("hide",e.text().toString().toLowerCase().indexOf(n)<0&&e.data("key").toString().toLowerCase().indexOf(n)<0)})}),e.parents(".dropdown-submenu").one("mouseenter",function(){var e=t(this).find(".dropdown-list")[0];e&&e.getBoundingClientRect&&setTimeout(function(){var t=270,i=e.getBoundingClientRect();i.top<0&&(t=Math.min(270,i.height)+i.top),e.style.maxHeight=Math.min(270,t)+"px"},50)})),t(".dropdown-menu.with-search .menu-search").on("click",function(t){return t.stopPropagation(),!1})})}(jQuery),$.zui.lang("de",{"zui.pager":{pageOfText:"Seite {0}",prev:"Zurück",next:"Nächste Seite",first:"Erste Seite",last:"Letzte Seite","goto":"Goto",pageOf:"Seite {page}",totalPage:"{totalPage} Seiten",totalCount:"Total: {recTotal} Artikel",pageSize:"{recPerPage} Artikel pro Seite",itemsRange:"Seiten {start} bis {end}",pageOfTotal:"Seite {page}/{totalPage}"},"zui.boards":{append2end:"Gehen Sie zum Ende"},"zui.browser":{tip:"Online. Sorgenfrei. Aktualisiere deinen Browser noch heute!"},"zui.calendar":{weekNames:["Son","Mon","Die","Mit","Don","Fri","Sam"],monthNames:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",year:"{0}Jahr",month:"{0}Monat",yearMonth:"{0}-{1}"},"zui.chosenIcons":{emptyIcon:"[Kein Icon]",commonIcons:"Gemeinsame Symbole",webIcons:"Web-Symbol",editorIcons:"Editor-Symbol",directionalIcons:"Pfeil Zusammenfluss",otherIcons:"Andere Symbole"},"zui.colorPicker":{errorTip:"Kein gültiger Farbwert"},"zui.datagrid":{errorCannotGetDataFromRemote:"Daten vom Remote-Server ({0}) können nicht abgerufen werden.",errorCannotHandleRemoteData:"Die vom Remote-Server zurückgegebenen Daten können nicht verarbeitet werden."},"zui.guideViewer":{prevStep:"Vorheriger Schritt",nextStep:"Nächster Schritt"},"zui.tabs":{reload:"Neu laden",close:"Schliessen",closeOthers:"Schließen Sie andere Registerkarten",closeRight:"Schließen Sie die rechte Registerkarte",reopenLast:"Letzten geschlossenen Tab wiederherstellen",errorCannotFetchFromRemote:"Inhalt kann nicht vom Remote-Server abgerufen werden ({0})."},"zui.uploader":{},datetimepicker:{days:["Sonntag","Montag","Diensteg","Mittwoch","Donnerstag","Freitag","Samstag"],daysShort:["Son","Mon","Die","Mit","Don","Fri","Sam"],daysMin:["Son","Mon","Die","Mit","Don","Fri","Sam"],months:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",suffix:[],meridiem:[]},chosen:{no_results_text:"Nicht gefunden"},bootbox:{OK:"OK",CANCEL:"Stornieren",CONFIRM:"Bestätigen"}}),$.zui.lang("fr",{"zui.pager":{pageOfText:"Page {0}",prev:"Prev",next:"Suivant",first:"First",last:"Last","goto":"Goto",pageOf:"Page {page}",totalPage:"{totalPage} pages",totalCount:"Total: {recTotal} items",pageSize:"{recPerPage} per page",itemsRange:"De {start} à {end}",pageOfTotal:"Page {page} de {totalPage}"},"zui.boards":{append2end:"Aller jusqu'au bout"},"zui.browser":{tip:"Naviguez sans crainte sur Internet. Mettez votre navigateur à jour dès aujourd'hui!"},"zui.calendar":{weekNames:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],monthNames:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",year:"{0} Année",month:"{0} Mois",yearMonth:"{0}-{1}"},"zui.chosenIcons":{emptyIcon:"[Aucune icône]",commonIcons:"Icônes communes",webIcons:"Icône Web",editorIcons:"Icône de l'éditeur",directionalIcons:"Flèche confluence",otherIcons:"Autres icônes"},"zui.colorPicker":{errorTip:"Pas une valeur de couleur valide"},"zui.datagrid":{errorCannotGetDataFromRemote:"Impossible d'obtenir les données du serveur distant ({0}).",errorCannotHandleRemoteData:"Impossible de traiter les données renvoyées par le serveur distant."},"zui.guideViewer":{prevStep:"Étape précédente",nextStep:"Prochaine étape"},"zui.tabs":{reload:"Recharger",close:"Fermer",closeOthers:"Fermez les autres onglets",closeRight:"Fermer l'onglet de droite",reopenLast:"Restaurer le dernier onglet fermé",errorCannotFetchFromRemote:"Impossible d'obtenir le contenu du serveur distant ({0})."},"zui.uploader":{},datetimepicker:{days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],daysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],daysMin:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],months:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],monthsShort:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",suffix:[],meridiem:[]},chosen:{no_results_text:"Pas trouvé"},bootbox:{OK:"D'accord",CANCEL:"Annuler",CONFIRM:"Confirmer"}}); \ No newline at end of file diff --git a/www/js/zui/picker/zui.picker.min.css b/www/js/zui/picker/zui.picker.min.css index 3bfc486d3a..c35725181d 100644 --- a/www/js/zui/picker/zui.picker.min.css +++ b/www/js/zui/picker/zui.picker.min.css @@ -1,5 +1,5 @@ /*! - * ZUI: 选择器 - v1.9.2 - 2020-07-31 + * ZUI: 选择器 - v1.9.2 - 2020-08-06 * http://openzui.com * GitHub: https://github.com/easysoft/zui.git * Copyright (c) 2020 cnezsoft.com; Licensed MIT diff --git a/www/js/zui/picker/zui.picker.min.js b/www/js/zui/picker/zui.picker.min.js index 28ed428bbc..57030b47d8 100644 --- a/www/js/zui/picker/zui.picker.min.js +++ b/www/js/zui/picker/zui.picker.min.js @@ -1,7 +1,7 @@ /*! - * ZUI: 选择器 - v1.9.2 - 2020-08-06 + * ZUI: 选择器 - v1.9.2 - 2020-08-07 * http://openzui.com * GitHub: https://github.com/easysoft/zui.git * Copyright (c) 2020 cnezsoft.com; Licensed MIT */ -!function(e,t,i){"use strict";var o="zui.picker",n={},r={lang:null,remote:null,remoteConverter:null,remoteOnly:!1,onRemoteError:null,textKey:"text",valueKey:"value",keysKey:"keys",multi:"auto",formItem:"auto",list:null,allowSingleDeselect:null,showMultiSelectedOptions:!1,autoSelectFirst:!1,optionItemFormatter:null,maxSelectedCount:0,maxListCount:50,hideEmptyTextOption:!0,searchValueKey:!0,emptyResultHint:null,hideOnWindowScroll:!0,inheritFormItemClasses:!1,emptySearchResultHint:null,accurateSearchHint:null,remoteErrorHint:null,deleteByBackspace:!0,disableScrollOnShow:!0,maxDropHeight:250,dropDirection:"auto",dropWidth:"100%",maxAutoDropWidth:450,multiValueSplitter:",",searchDelay:200,fixLabelFor:!0,hotkey:!0,onSelect:null,onDeselect:null,beforeChange:null,onChange:null,onReady:null,onNoResults:null,onShowingDrop:null,onHidingDrop:null,onShowedDrop:null,onHiddenDrop:null},s={zh_cn:{emptyResultHint:"没有可选项",emptySearchResultHint:"没有找到 “{0}”",accurateSearchHint:"请提供更多关键词缩小匹配范围",remoteErrorHint:"无法从服务器获取结果 - {0}"},zh_tw:{emptyResultHint:"沒有可選項",emptySearchResultHint:"沒有找到 “{0}”",accurateSearchHint:"請提供更多關鍵詞縮小匹配範圍",remoteErrorHint:"無法從服務器獲取結果 - {0}"},en:{emptyResultHint:"No options",emptySearchResultHint:'Cannot found "{0}"',accurateSearchHint:"Suggest to provide more keywords",remoteErrorHint:"Unable to get result from server: {0}"}},l=function(t,i){var n=this;n.name=o,n.$=e(t),n.id="pk_"+(n.$.attr("id")||e.zui.uuid()),i=n.options=e.extend({},l.DEFAULTS,this.$.data(),i);var r=e.zui.clientLang?e.zui.clientLang():"en",a=i.lang||r;n.lang=e.zui.getLangData?e.zui.getLangData(o,a,s):s[a]||s[r];var p,c,u=i.formItem,d='.form-item,input[type="hidden"],select,input[type="text"]';if(p="self"===u?n.$:"auto"!==u&&u?n.$.find(u):n.$.is(d)?n.$:n.$.find(d).first(),!p.length)return console.error&&console.error("Cannot found form item for picker.");if(p.is('input[type="hidden"]'))c="hidden";else if(p.is("select"))c="select";else{if(!p.is('input[type="text"]'))return console.error&&console.error("Unknown form type for picker.");c="text"}i.inheritFormItemClasses&&f.addClass(p.attr("class")),n.formType=c,n.$formItem=p.removeClass("picker").hide(),n.selfFormItem=p.is(n.$);var h=i.multi;h&&"auto"!==h||(h="select"===c&&"multiple"===p.attr("multiple")),h=!!h,n.multi=h;var v=i.list;v?n.setList("function"==typeof v?v({search:n.search,limit:i.maxListCount}):v,!0):"select"===c?n.updateFromSelect():n.setList([],!0);var f;f=!n.selfFormItem&&n.$.hasClass("picker")?n.$:e('
      ').insertAfter(n.$),f.addClass("picker").toggleClass("picker-multi",h).toggleClass("picker-single",!h);var g=f.children(".picker-selections");g.length?g.empty():g=e('
      ');var m=n.id+"-search",y=e('').appendTo(g);if(!h){var k=e('
      ');i.allowSingleDeselect&&k.append(''),k.appendTo(g),n.$singleSelection=k}f.toggleClass("picker-input-empty",!y.val().length).append(g),n.$container=f,n.$selections=g,n.$search=y,n.search="";var S=i.placeholder;if(void 0===S&&(S=p.attr("placeholder")),"string"==typeof S&&S.length&&g.append(e('
      ').text(S)),i.placeholder=S,i.fixLabelFor){var x=p.attr("id");x&&e('label[for="'+x+'"]').attr("for",m)}var w=void 0!==i.defaultValue?i.defaultValue:p.val();if(n.setValue(w,!0),y.on("focus",function(){f.addClass("picker-focus"),n.showDropList()}).on("blur",function(){f.removeClass("picker-focus")}).on("input change",function(){var e=y.val();h&&y.width(14*e.length),f.toggleClass("picker-input-empty",!e.length),n.tryUpdateList(e)}),i.hotkey&&y.on("keydown",function(e){var t=e.key||e.which;if(n.dropListShowed){var o=n.activeValue,r="string"==typeof o;if("Enter"===t||13===t)r&&(n.select(o),n.multi||y.blur(),e.preventDefault());else if("ArrowDown"===t||40===t){var s,l=n.$activeOption;if(l&&(s=l.next(".picker-option"),n.multi))for(;s.length&&s.hasClass("picker-option-selected");)s=s.next(".picker-option");s&&s.length||(s=n.$optionsList.children(n.multi?".picker-option:not(.picker-option-selected)":".picker-option").first()),s.length&&n.activeOption(s),e.preventDefault()}else if("ArrowUp"===t||30===t){var a,l=n.$activeOption;if(l&&(a=l.prev(".picker-option"),n.multi))for(;a.length&&a.hasClass("picker-option-selected");)a=a.prev(".picker-option");a&&a.length||(a=n.$optionsList.children(n.multi?".picker-option:not(.picker-option-selected)":".picker-option").last()),a.length&&n.activeOption(a),e.preventDefault()}else i.deleteByBackspace&&n.multi&&("Backspace"===t||8===t)&&n.value&&n.value.length&&n.deselect(n.value[n.value.length-1])}}),h){g.on("mousedown",function(e){if(n.dropListShowed)return e.preventDefault(),void e.stopPropagation()}).on("mouseup",function(t){g.hasClass("sortable-sorting")||e(t.target).closest(".picker-selection-remove").length||n.dropListShowed||n.focus()});var L=i.sortValuesByDnd;if(L&&e.fn.sortable){f.addClass("picker-sortable");var C={selector:".picker-selection",stopPropagation:!0,start:function(){n.hideDropList()},finish:function(t){var i=[];e.each(t.list,function(e,t){i.push(t.item.data("value"))}),n.setValue(i,!1,!0)}};"object"==typeof L&&e.extend(C,L),g.sortable(C)}}g.on("click",".picker-selection-remove",function(t){if(n.multi){var i=e(this).closest(".picker-selection");n.deselect(i.data("value"))}else n.deselect();t.stopPropagation()}),p.on("chosen:updated",function(){n.updateFromSelect(),n.setValue(p.val()),n.updateList()}).on("chosen:activate",n.focus).on("chosen:open",n.showDropList).on("chosen:close",n.hideDropList),f.addClass("picker-ready"),setTimeout(function(){n.triggerEvent("ready",{picker:n},"","chosen:ready")},0)};l.prototype.destroy=function(){var t=this,i=t.options;t.hideDropList();var n=t.$search;n.off("focus blur input change"),i.hotkey&&n.off("keydown"),n.remove();var r=t.$selections;r.off("click"),t.multi&&r.off("mousedown mouseup"),r.remove();var s=t.$formItem;t.selectOptionsBackup&&(s.empty(),e.each(t.selectOptionsBackup,function(t,o){var n={value:o[i.valueKey]},r=o[i.keysKey];void 0!==r&&(n["data-"+i.keysKey]=r),s.append(e("