+
+
icons['company']);?> company->view;?>
+
edit, '', 'id="editCompany" class="btn btn-primary iframe" data-width="580"', true, true);?>
diff --git a/module/group/css/browse.css b/module/group/css/browse.css
index 2ade25db87..853b9cf02e 100644
--- a/module/group/css/browse.css
+++ b/module/group/css/browse.css
@@ -1 +1,2 @@
.user{display:block; width:80px; float:left; overflow:hidden}
+.c-actions{width: 220px;}
diff --git a/module/group/view/browse.html.php b/module/group/view/browse.html.php
index 3617e4e7b3..4b0529ae40 100644
--- a/module/group/view/browse.html.php
+++ b/module/group/view/browse.html.php
@@ -11,57 +11,60 @@
*/
?>
-
group->confirmDelete);?>
-
-
icons['group']);?> group->browse;?>
-
+
+
+ group->browse;?>
+
+
createLink('group', 'managePriv', 'type=byModule', '', true), $lang->group->managePrivByModule, '', 'class="btn btn-primary iframe"');?>
-
-
+
+
+
+
+ | group->id;?> |
+ group->name;?> |
+ group->desc;?> |
+ group->users;?> |
+ actions;?> |
+
+
+
+
+ id]);?>
- | group->id;?> |
- group->name;?> |
- group->desc;?> |
- group->users;?> |
- actions;?> |
+ id;?> |
+ name;?> |
+ desc;?> |
+ |
+
+ group->managepriv = $lang->group->managePrivByGroup;?>
+ id", $group, 'list', 'plus');?>
+ id", $group, 'list', 'plus');?>
+ group->managemember = $lang->group->manageMember;?>
+ id", $group, 'list', 'plus', '', 'iframe', 'yes');?>
+ id", $group, 'list', '', '', 'iframe', 'yes', "data-width='550'");?>
+ id", $group, 'list', '', '', 'iframe', 'yes', "data-width='550'");?>
+ role != 'limited')
+ {
+ $deleteURL = $this->createLink('group', 'delete', "groupID=$group->id&confirm=yes");
+ echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"groupList\", confirmDelete)", '', '', "title='{$lang->group->delete}' class='btn'");
+ }
+ else
+ {
+ echo "";
+ }
+ ?>
+ |
-
-
-
- id]);?>
-
- | id;?> |
- name;?> |
- desc;?> |
- |
-
- group->managepriv = $lang->group->managePrivByGroup;?>
- id", $group, 'list', 'eye-open');?>
- id", $group, 'list', 'lock');?>
- group->managemember = $lang->group->manageMember;?>
- id", $group, 'list', 'group', '', 'iframe', 'yes');?>
- id", $group, 'list', '', '', 'iframe', 'yes', "data-width='550'");?>
- id", $group, 'list', '', '', 'iframe', 'yes', "data-width='550'");?>
- role != 'limited')
- {
- $deleteURL = $this->createLink('group', 'delete', "groupID=$group->id&confirm=yes");
- echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"groupList\", confirmDelete)", '', '', "title='{$lang->group->delete}' class='btn-icon'");
- }
- else
- {
- echo "";
- }
- ?>
- |
-
-
-
-
+
+
+
+
diff --git a/module/group/view/copy.html.php b/module/group/view/copy.html.php
index 47faefdfda..c17383e81f 100644
--- a/module/group/view/copy.html.php
+++ b/module/group/view/copy.html.php
@@ -11,29 +11,26 @@
*/
?>
-
-
-
icons['group']);?>
-
group->copy;?>
-
icons['copy']);?>
+
-
-
diff --git a/module/my/view/editprofile.html.php b/module/my/view/editprofile.html.php
index 0433c18f66..1f250130a9 100644
--- a/module/my/view/editprofile.html.php
+++ b/module/my/view/editprofile.html.php
@@ -18,99 +18,91 @@
my->editProfile;?>
diff --git a/module/my/view/profile.html.php b/module/my/view/profile.html.php
index 34afc6dfc9..bfa0b46301 100644
--- a/module/my/view/profile.html.php
+++ b/module/my/view/profile.html.php
@@ -64,7 +64,7 @@
| user->join;?> |
- join;?> |
+ join);?> |
| user->visits;?> |
diff --git a/module/project/js/common.js b/module/project/js/common.js
index 39a7476669..0e74cbba0b 100644
--- a/module/project/js/common.js
+++ b/module/project/js/common.js
@@ -150,6 +150,8 @@ function loadBranches(product)
var $inputgroup = $(product).closest('.input-group');
if($inputgroup.find('select').size() >= 2) $inputgroup.find('select:last').remove();
+ if($inputgroup.find('.chosen-container').size() >= 2) $inputgroup.find('.chosen-container:last').remove();
+
var index = $inputgroup.find('select:first').attr('id').replace('products' , '');
$.get(createLink('branch', 'ajaxGetBranches', "productID=" + $(product).val()), function(data)
{
diff --git a/module/todo/css/edit.css b/module/todo/css/edit.css
index e69de29bb2..f0de69d394 100644
--- a/module/todo/css/edit.css
+++ b/module/todo/css/edit.css
@@ -0,0 +1,2 @@
+.todoType {margin-top: 6px;}
+.dateSwitcher {margin-top: 6px;}
diff --git a/module/todo/css/view.css b/module/todo/css/view.css
index aff5b64dc7..0873d4764f 100644
--- a/module/todo/css/view.css
+++ b/module/todo/css/view.css
@@ -1 +1,3 @@
#wrap .outer>table#actionbox>caption {margin-top:0px;}
+.table-data tbody > tr > th {width: 80px;}
+.modal-footer {text-align: center;}
diff --git a/module/todo/view/edit.html.php b/module/todo/view/edit.html.php
index 138735f527..5b90b3dc31 100644
--- a/module/todo/view/edit.html.php
+++ b/module/todo/view/edit.html.php
@@ -78,7 +78,7 @@
"),w.setUTCDate(w.getUTCDate()+1);this.picker.find(".datetimepicker-days tbody").empty().append(k.join("")),k=[];for(var T="",S="",D="",M=0;M<24;M++){var P=e(a,o,r,M);C="",P.valueOf()+36e5<=this.startDate||P.valueOf()>this.endDate?C+=" disabled":l==M&&(C+=" active"),this.showMeridian&&2==s[this.language].meridiem.length?(S=M<12?s[this.language].meridiem[0]:s[this.language].meridiem[1],S!=D&&(""!=D&&k.push(""),k.push('
")):(T=M+":00",k.push('
'+T+""))}this.picker.find(".datetimepicker-hours td").html(k.join("")),k=[],T="",S="",D="";for(var M=0;M<60;M+=this.minuteStep){var P=e(a,o,r,l,M,0);C="",P.valueOf()
this.endDate?C+=" disabled":Math.floor(h/this.minuteStep)==Math.floor(M/this.minuteStep)&&(C+=" active"),this.showMeridian&&2==s[this.language].meridiem.length?(S=l<12?s[this.language].meridiem[0]:s[this.language].meridiem[1],S!=D&&(""!=D&&k.push(""),k.push('")):(T=M+":00",k.push(''+l+":"+(M<10?"0"+M:M)+""))}this.picker.find(".datetimepicker-minutes td").html(k.join(""));var F=this.date.getUTCFullYear(),L=this.picker.find(".datetimepicker-months").find("th:eq(1)").text(a).end().find("span").removeClass("active");F==a&&L.eq(this.date.getUTCMonth()).addClass("active"),(au)&&L.addClass("disabled"),a==c&&L.slice(0,d).addClass("disabled"),a==u&&L.slice(p+1).addClass("disabled"),k="",a=10*parseInt(a/10,10);var z=this.picker.find(".datetimepicker-years").find("th:eq(1)").text(a+"-"+(a+9)).end().find("td");a-=1;for(var M=-1;M<11;M++)k+='u?" disabled":"")+'">'+a+"",a+=1;z.html(k),this.place()}},updateNavArrows:function(){var t=new Date(this.viewDate),e=t.getUTCFullYear(),i=t.getUTCMonth(),s=t.getUTCDate(),n=t.getUTCHours();switch(this.viewMode){case 0:this.startDate!==-(1/0)&&e<=this.startDate.getUTCFullYear()&&i<=this.startDate.getUTCMonth()&&s<=this.startDate.getUTCDate()&&n<=this.startDate.getUTCHours()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&e>=this.endDate.getUTCFullYear()&&i>=this.endDate.getUTCMonth()&&s>=this.endDate.getUTCDate()&&n>=this.endDate.getUTCHours()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:this.startDate!==-(1/0)&&e<=this.startDate.getUTCFullYear()&&i<=this.startDate.getUTCMonth()&&s<=this.startDate.getUTCDate()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&e>=this.endDate.getUTCFullYear()&&i>=this.endDate.getUTCMonth()&&s>=this.endDate.getUTCDate()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 2:this.startDate!==-(1/0)&&e<=this.startDate.getUTCFullYear()&&i<=this.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&e>=this.endDate.getUTCFullYear()&&i>=this.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 3:case 4:this.startDate!==-(1/0)&&e<=this.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&e>=this.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}},mousewheel:function(e){if(e.preventDefault(),e.stopPropagation(),!this.wheelPause){this.wheelPause=!0;var i=e.originalEvent,s=i.wheelDelta,n=s>0?1:0===s?0:-1;this.wheelViewModeNavigationInverseDirection&&(n=-n),this.showMode(n),setTimeout(t.proxy(function(){this.wheelPause=!1},this),this.wheelViewModeNavigationDelay)}},click:function(i){i.stopPropagation(),i.preventDefault();var s=t(i.target).closest("span, td, th, legend");if(1==s.length){if(s.is(".disabled"))return void this.element.trigger({type:"outOfRange",date:this.viewDate,startDate:this.startDate,endDate:this.endDate});switch(s[0].nodeName.toLowerCase()){case"th":switch(s[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var a=n.modes[this.viewMode].navStep*("prev"==s[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveHour(this.viewDate,a);break;case 1:this.viewDate=this.moveDate(this.viewDate,a);break;case 2:this.viewDate=this.moveMonth(this.viewDate,a);break;case 3:case 4:this.viewDate=this.moveYear(this.viewDate,a)}this.fill();break;case"today":var o=new Date;o=e(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds(),0),othis.endDate&&(o=this.endDate),this.viewMode=this.startViewMode,this.showMode(0),this._setDate(o),this.fill(),this.autoclose&&this.hide()}break;case"span":if(!s.is(".disabled")){var r=this.viewDate.getUTCFullYear(),l=this.viewDate.getUTCMonth(),h=this.viewDate.getUTCDate(),c=this.viewDate.getUTCHours(),d=this.viewDate.getUTCMinutes(),u=this.viewDate.getUTCSeconds();if(s.is(".month")?(this.viewDate.setUTCDate(1),l=s.parent().find("span").index(s),h=this.viewDate.getUTCDate(),this.viewDate.setUTCMonth(l),this.element.trigger({type:"changeMonth",date:this.viewDate}),this.viewSelect>=3&&this._setDate(e(r,l,h,c,d,u,0))):s.is(".year")?(this.viewDate.setUTCDate(1),r=parseInt(s.text(),10)||0,this.viewDate.setUTCFullYear(r),this.element.trigger({type:"changeYear",date:this.viewDate}),this.viewSelect>=4&&this._setDate(e(r,l,h,c,d,u,0))):s.is(".hour")?(c=parseInt(s.text(),10)||0,(s.hasClass("hour_am")||s.hasClass("hour_pm"))&&(12==c&&s.hasClass("hour_am")?c=0:12!=c&&s.hasClass("hour_pm")&&(c+=12)),this.viewDate.setUTCHours(c),this.element.trigger({type:"changeHour",date:this.viewDate}),this.viewSelect>=1&&this._setDate(e(r,l,h,c,d,u,0))):s.is(".minute")&&(d=parseInt(s.text().substr(s.text().indexOf(":")+1),10)||0,this.viewDate.setUTCMinutes(d),this.element.trigger({type:"changeMinute",date:this.viewDate}),this.viewSelect>=0&&this._setDate(e(r,l,h,c,d,u,0))),0!=this.viewMode){var p=this.viewMode;this.showMode(-1),this.fill(),p==this.viewMode&&this.autoclose&&this.hide()}else this.fill(),this.autoclose&&this.hide()}break;case"td":if(s.is(".day")&&!s.is(".disabled")){var h=parseInt(s.text(),10)||1,r=this.viewDate.getUTCFullYear(),l=this.viewDate.getUTCMonth(),c=this.viewDate.getUTCHours(),d=this.viewDate.getUTCMinutes(),u=this.viewDate.getUTCSeconds();s.is(".old")?0===l?(l=11,r-=1):l-=1:s.is(".new")&&(11==l?(l=0,r+=1):l+=1),this.viewDate.setUTCFullYear(r),this.viewDate.setUTCMonth(l,h),this.element.trigger({type:"changeDay",date:this.viewDate}),this.viewSelect>=2&&this._setDate(e(r,l,h,c,d,u,0))}var p=this.viewMode;this.showMode(-1),this.fill(),p==this.viewMode&&this.autoclose&&this.hide()}}},_setDate:function(t,e){e&&"date"!=e||(this.date=t),e&&"view"!=e||(this.viewDate=t),this.fill(),this.setValue();var i;this.isInput?i=this.element:this.component&&(i=this.element.find("input")),i&&(i.change(),this.autoclose&&(!e||"date"==e)),this.element.trigger({type:"changeDate",date:this.date}),null===t&&(this.date=this.viewDate)},moveMinute:function(t,e){if(!e)return t;var i=new Date(t.valueOf());return i.setUTCMinutes(i.getUTCMinutes()+e*this.minuteStep),i},moveHour:function(t,e){if(!e)return t;var i=new Date(t.valueOf());return i.setUTCHours(i.getUTCHours()+e),i},moveDate:function(t,e){if(!e)return t;var i=new Date(t.valueOf());return i.setUTCDate(i.getUTCDate()+e),i},moveMonth:function(t,e){if(!e)return t;var i,s,n=new Date(t.valueOf()),a=n.getUTCDate(),o=n.getUTCMonth(),r=Math.abs(e);if(e=e>0?1:-1,1==r)s=e==-1?function(){return n.getUTCMonth()==o}:function(){return n.getUTCMonth()!=i},i=o+e,n.setUTCMonth(i),(i<0||i>11)&&(i=(i+12)%12);else{for(var l=0;l=this.startDate&&t<=this.endDate},keydown:function(t){if(this.picker.is(":not(:visible)"))return void(27==t.keyCode&&this.show());var e,i,s,n=!1;switch(t.keyCode){case 27:this.hide(),t.preventDefault();break;case 37:case 39:if(!this.keyboardNavigation)break;e=37==t.keyCode?-1:1,viewMode=this.viewMode,t.ctrlKey?viewMode+=2:t.shiftKey&&(viewMode+=1),4==viewMode?(i=this.moveYear(this.date,e),s=this.moveYear(this.viewDate,e)):3==viewMode?(i=this.moveMonth(this.date,e),s=this.moveMonth(this.viewDate,e)):2==viewMode?(i=this.moveDate(this.date,e),s=this.moveDate(this.viewDate,e)):1==viewMode?(i=this.moveHour(this.date,e),s=this.moveHour(this.viewDate,e)):0==viewMode&&(i=this.moveMinute(this.date,e),s=this.moveMinute(this.viewDate,e)),this.dateWithinRange(i)&&(this.date=i,this.viewDate=s,this.setValue(),this.update(),t.preventDefault(),n=!0);break;case 38:case 40:if(!this.keyboardNavigation)break;e=38==t.keyCode?-1:1,viewMode=this.viewMode,t.ctrlKey?viewMode+=2:t.shiftKey&&(viewMode+=1),4==viewMode?(i=this.moveYear(this.date,e),s=this.moveYear(this.viewDate,e)):3==viewMode?(i=this.moveMonth(this.date,e),s=this.moveMonth(this.viewDate,e)):2==viewMode?(i=this.moveDate(this.date,7*e),s=this.moveDate(this.viewDate,7*e)):1==viewMode?this.showMeridian?(i=this.moveHour(this.date,6*e),s=this.moveHour(this.viewDate,6*e)):(i=this.moveHour(this.date,4*e),s=this.moveHour(this.viewDate,4*e)):0==viewMode&&(i=this.moveMinute(this.date,4*e),s=this.moveMinute(this.viewDate,4*e)),this.dateWithinRange(i)&&(this.date=i,this.viewDate=s,this.setValue(),this.update(),t.preventDefault(),n=!0);break;case 13:if(0!=this.viewMode){var a=this.viewMode;this.showMode(-1),this.fill(),a==this.viewMode&&this.autoclose&&this.hide()}else this.fill(),this.autoclose&&this.hide();t.preventDefault();break;case 9:this.hide()}if(n){var o;this.isInput?o=this.element:this.component&&(o=this.element.find("input")),o&&o.change(),this.element.trigger({type:"changeDate",date:this.date})}},showMode:function(t){if(t){var e=Math.max(0,Math.min(n.modes.length-1,this.viewMode+t));e>=this.minView&&e<=this.maxView&&(this.element.trigger({type:"changeMode",date:this.viewDate,oldViewMode:this.viewMode,newViewMode:e}),this.viewMode=e)}this.picker.find(">div").hide().filter(".datetimepicker-"+n.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()},reset:function(t){this._setDate(null,"date")}},t.fn.datetimepicker=function(e){var s=Array.apply(null,arguments);return s.shift(),this.each(function(){var n=t(this),a=n.data("datetimepicker"),o="object"==typeof e&&e;a||n.data("datetimepicker",a=new i(this,t.extend({},t.fn.datetimepicker.defaults,n.data(),o))),"string"==typeof e&&"function"==typeof a[e]&&a[e].apply(a,s)})},t.fn.datetimepicker.defaults={pickerPosition:"auto-right"},t.fn.datetimepicker.Constructor=i;var s=t.fn.datetimepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridiem:["am","pm"],suffix:["st","nd","rd","th"],today:"Today"}};s["zh-cn"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["周日","周一","周二","周三","周四","周五","周六","周日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今日",suffix:[],meridiem:[]},s["zh-tw"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["周日","周一","周二","周三","周四","周五","周六","周日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今天",suffix:[],meridiem:["上午","下午"]};var n={modes:[{clsName:"minutes",navFnc:"Hours",navStep:1},{clsName:"hours",navFnc:"Date",navStep:1},{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(t){return t%4===0&&t%100!==0||t%400===0},getDaysInMonth:function(t,e){return[31,n.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},getDefaultFormat:function(t,e){if("standard"==t)return"input"==e?"yyyy-mm-dd hh:ii":"yyyy-mm-dd hh:ii:ss";if("php"==t)return"input"==e?"Y-m-d H:i":"Y-m-d H:i:s";throw new Error("Invalid format type.")},validParts:function(t){if("standard"==t)return/hh?|HH?|p|P|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g;if("php"==t)return/[dDjlNwzFmMnStyYaABgGhHis]/g;throw new Error("Invalid format type.")},nonpunctuation:/[^ -\/:-@\[-`{-~\t\n\rTZ]+/g,parseFormat:function(t,e){var i=t.replace(this.validParts(e),"\0").split("\0"),s=t.match(this.validParts(e));if(!i||!i.length||!s||0==s.length)throw new Error("Invalid date format.");return{separators:i,parts:s}},parseDate:function(n,a,o,r){if(n instanceof Date){var l=new Date(n.valueOf()-6e4*n.getTimezoneOffset());return l.setMilliseconds(0),l}if(/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(n)&&(a=this.parseFormat("yyyy-mm-dd",r)),/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}$/.test(n)&&(a=this.parseFormat("yyyy-mm-dd hh:ii",r)),/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}\:\d{1,2}[Z]{0,1}$/.test(n)&&(a=this.parseFormat("yyyy-mm-dd hh:ii:ss",r)),/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(n)){var h,c,d=/([-+]\d+)([dmwy])/,u=n.match(/([-+]\d+)([dmwy])/g);n=new Date;for(var p=0;p | | |
',contTemplate:' |
',footTemplate:' |
'};n.template=''+n.headTemplate+n.contTemplate+n.footTemplate+'
'+n.headTemplate+n.contTemplate+n.footTemplate+'
'+n.headTemplate+""+n.footTemplate+'
'+n.headTemplate+n.contTemplate+n.footTemplate+'
'+n.headTemplate+n.contTemplate+n.footTemplate+"
",t.fn.datetimepicker.DPGlobal=n,t.fn.datetimepicker.noConflict=function(){return t.fn.datetimepicker=old,this},t(document).on("focus.datetimepicker.data-api click.datetimepicker.data-api",'[data-provide="datetimepicker"]',function(e){
+!function(t){function e(){return new Date(Date.UTC.apply(Date,arguments))}var i=function(e,i){var a=this;this.element=t(e),this.language=(i.language||this.element.data("date-language")||(t.zui&&t.zui.clientLang?t.zui.clientLang().replace("_","-"):"zh-cn")).toLowerCase(),this.language=this.language in s?this.language:"en",this.isRTL=s[this.language].rtl||!1,this.formatType=i.formatType||this.element.data("format-type")||"standard",this.format=n.parseFormat(i.format||this.element.data("date-format")||s[this.language].format||n.getDefaultFormat(this.formatType,"input"),this.formatType),this.isInline=!1,this.isVisible=!1,this.isInput=this.element.is("input"),this.component=!!this.element.is(".date")&&this.element.find(".input-group-addon .icon-th, .input-group-addon .icon-time, .input-group-addon .icon-calendar").parent(),this.componentReset=!!this.element.is(".date")&&this.element.find(".input-group-addon .icon-remove").parent(),this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.linkField=i.linkField||this.element.data("link-field")||!1,this.linkFormat=n.parseFormat(i.linkFormat||this.element.data("link-format")||n.getDefaultFormat(this.formatType,"link"),this.formatType),this.minuteStep=i.minuteStep||this.element.data("minute-step")||5,this.pickerPosition=i.pickerPosition||this.element.data("picker-position")||"bottom-right",this.showMeridian=i.showMeridian||this.element.data("show-meridian")||!1,this.initialDate=i.initialDate||new Date,this.pickerClass=i.eleClass,this.pickerId=i.eleId,this._attachEvents(),this.formatViewType="datetime","formatViewType"in i?this.formatViewType=i.formatViewType:"formatViewType"in this.element.data()&&(this.formatViewType=this.element.data("formatViewType")),this.minView=0,"minView"in i?this.minView=i.minView:"minView"in this.element.data()&&(this.minView=this.element.data("min-view")),this.minView=n.convertViewMode(this.minView),this.maxView=n.modes.length-1,"maxView"in i?this.maxView=i.maxView:"maxView"in this.element.data()&&(this.maxView=this.element.data("max-view")),this.maxView=n.convertViewMode(this.maxView),this.wheelViewModeNavigation=!1,"wheelViewModeNavigation"in i?this.wheelViewModeNavigation=i.wheelViewModeNavigation:"wheelViewModeNavigation"in this.element.data()&&(this.wheelViewModeNavigation=this.element.data("view-mode-wheel-navigation")),this.wheelViewModeNavigationInverseDirection=!1,"wheelViewModeNavigationInverseDirection"in i?this.wheelViewModeNavigationInverseDirection=i.wheelViewModeNavigationInverseDirection:"wheelViewModeNavigationInverseDirection"in this.element.data()&&(this.wheelViewModeNavigationInverseDirection=this.element.data("view-mode-wheel-navigation-inverse-dir")),this.wheelViewModeNavigationDelay=100,"wheelViewModeNavigationDelay"in i?this.wheelViewModeNavigationDelay=i.wheelViewModeNavigationDelay:"wheelViewModeNavigationDelay"in this.element.data()&&(this.wheelViewModeNavigationDelay=this.element.data("view-mode-wheel-navigation-delay")),this.startViewMode=2,"startView"in i?this.startViewMode=i.startView:"startView"in this.element.data()&&(this.startViewMode=this.element.data("start-view")),this.startViewMode=n.convertViewMode(this.startViewMode),this.viewMode=this.startViewMode,this.viewSelect=this.minView,"viewSelect"in i?this.viewSelect=i.viewSelect:"viewSelect"in this.element.data()&&(this.viewSelect=this.element.data("view-select")),this.viewSelect=n.convertViewMode(this.viewSelect),this.forceParse=!0,"forceParse"in i?this.forceParse=i.forceParse:"dateForceParse"in this.element.data()&&(this.forceParse=this.element.data("date-force-parse")),this.picker=t(n.template).appendTo(this.isInline?this.element:"body").on({click:t.proxy(this.click,this),mousedown:t.proxy(this.mousedown,this)}),this.wheelViewModeNavigation&&(t.fn.mousewheel?this.picker.on({mousewheel:t.proxy(this.mousewheel,this)}):console.log("Mouse Wheel event is not supported. Please include the jQuery Mouse Wheel plugin before enabling this option")),this.isInline?this.picker.addClass("datetimepicker-inline"):this.picker.addClass("datetimepicker-dropdown-"+this.pickerPosition+" dropdown-menu"),this.isRTL&&(this.picker.addClass("datetimepicker-rtl"),this.picker.find(".prev span, .next span").toggleClass("icon-arrow-left icon-arrow-right")),t(document).on("mousedown",function(e){0===t(e.target).closest(".datetimepicker").length&&a.hide()}),this.autoclose=!1,"autoclose"in i?this.autoclose=i.autoclose:"dateAutoclose"in this.element.data()&&(this.autoclose=this.element.data("date-autoclose")),this.keyboardNavigation=!0,"keyboardNavigation"in i?this.keyboardNavigation=i.keyboardNavigation:"dateKeyboardNavigation"in this.element.data()&&(this.keyboardNavigation=this.element.data("date-keyboard-navigation")),this.todayBtn=i.todayBtn||this.element.data("date-today-btn")||!1,this.todayHighlight=i.todayHighlight||this.element.data("date-today-highlight")||!1,this.weekStart=(i.weekStart||this.element.data("date-weekstart")||s[this.language].weekStart||0)%7,this.weekEnd=(this.weekStart+6)%7,this.startDate=-(1/0),this.endDate=1/0,this.daysOfWeekDisabled=[],this.setStartDate(i.startDate||this.element.data("date-startdate")),this.setEndDate(i.endDate||this.element.data("date-enddate")),this.setDaysOfWeekDisabled(i.daysOfWeekDisabled||this.element.data("date-days-of-week-disabled")),this.fillDow(),this.fillMonths(),this.update(),this.showMode(),this.isInline&&this.show()};i.prototype={constructor:i,_events:[],_attachEvents:function(){this._detachEvents(),this.isInput?this._events=[[this.element,{focus:t.proxy(this.show,this),keyup:t.proxy(this.update,this),keydown:t.proxy(this.keydown,this)}]]:this.component&&this.hasInput?(this._events=[[this.element.find("input"),{focus:t.proxy(this.show,this),keyup:t.proxy(this.update,this),keydown:t.proxy(this.keydown,this)}],[this.component,{click:t.proxy(this.show,this)}]],this.componentReset&&this._events.push([this.componentReset,{click:t.proxy(this.reset,this)}])):this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:t.proxy(this.show,this)}]];for(var e,i,s=0;s=this.startDate&&t<=this.endDate?(this.date=t,this.setValue(),this.viewDate=this.date,this.fill()):this.element.trigger({type:"outOfRange",date:t,startDate:this.startDate,endDate:this.endDate})},setFormat:function(t){this.format=n.parseFormat(t,this.formatType);var e;this.isInput?e=this.element:this.component&&(e=this.element.find("input")),e&&e.val()&&this.setValue()},setValue:function(){var e=this.getFormattedDate();this.isInput?this.element.val(e):(this.component&&this.element.find("input").val(e),this.element.data("date",e)),this.linkField&&t("#"+this.linkField).val(this.getFormattedDate(this.linkFormat))},getFormattedDate:function(t){return void 0==t&&(t=this.format),n.formatDate(this.date,t,this.language,this.formatType)},setStartDate:function(t){this.startDate=t||-(1/0),this.startDate!==-(1/0)&&(this.startDate=n.parseDate(this.startDate,this.format,this.language,this.formatType)),this.update(),this.updateNavArrows()},setEndDate:function(t){this.endDate=t||1/0,this.endDate!==1/0&&(this.endDate=n.parseDate(this.endDate,this.format,this.language,this.formatType)),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(e){this.daysOfWeekDisabled=e||[],t.isArray(this.daysOfWeekDisabled)||(this.daysOfWeekDisabled=this.daysOfWeekDisabled.split(/,\s*/)),this.daysOfWeekDisabled=t.map(this.daysOfWeekDisabled,function(t){return parseInt(t,10)}),this.update(),this.updateNavArrows()},place:function(){if(!this.isInline){var e=0;t("div").each(function(){var i=parseInt(t(this).css("zIndex"),10);i>e&&(e=i)});var i,s,n,a=e+10;this.component?(i=this.component.offset(),n=i.left,"bottom-left"!==this.pickerPosition&&"top-left"!==this.pickerPosition&&"auto-left"!==this.pickerPosition||(n+=this.component.outerWidth()-this.picker.outerWidth())):(i=this.element.offset(),n=i.left);var o=0===this.pickerPosition.indexOf("auto-"),r=o?(i.top+this.picker.outerHeight()>t(window).height()+t(window).scrollTop()?"top":"bottom")+(0===this.pickerPosition.lastIndexOf("-left")?"-left":"-right"):this.pickerPosition;s="top-left"===r||"top-right"===r?i.top-this.picker.outerHeight():i.top+this.height,this.picker.css({top:s,left:n,zIndex:a}).attr("class","datetimepicker dropdown-menu datetimepicker-dropdown-"+r),this.pickerClass&&this.picker.addClass(this.pickerClass),this.pickerId&&this.picker.attr("id",this.pickerId)}},update:function(){var t,e=!1;arguments&&arguments.length&&("string"==typeof arguments[0]||arguments[0]instanceof Date)?(t=arguments[0],e=!0):(t=this.element.data("date")||(this.isInput?this.element.val():this.element.find("input").val())||this.initialDate,("string"==typeof t||t instanceof String)&&(t=t.replace(/^\s+|\s+$/g,""))),t||(t=new Date,e=!1),this.date=n.parseDate(t,this.format,this.language,this.formatType),e&&this.setValue(),this.datethis.endDate?this.viewDate=new Date(this.endDate):this.viewDate=new Date(this.date),this.fill()},fillDow:function(){for(var t=this.weekStart,e="";t'+s[this.language].daysMin[t++%7]+"";e+="
",this.picker.find(".datetimepicker-days thead").append(e)},fillMonths:function(){for(var t="",e=0;e<12;)t+=''+s[this.language].monthsShort[e++]+"";this.picker.find(".datetimepicker-months td").html(t)},fill:function(){if(null!=this.date&&null!=this.viewDate){var i=new Date(this.viewDate),a=i.getUTCFullYear(),o=i.getUTCMonth(),r=i.getUTCDate(),l=i.getUTCHours(),h=i.getUTCMinutes(),c=this.startDate!==-(1/0)?this.startDate.getUTCFullYear():-(1/0),d=this.startDate!==-(1/0)?this.startDate.getUTCMonth():-(1/0),u=this.endDate!==1/0?this.endDate.getUTCFullYear():1/0,p=this.endDate!==1/0?this.endDate.getUTCMonth():1/0,f=new e(this.date.getUTCFullYear(),this.date.getUTCMonth(),this.date.getUTCDate()).valueOf(),g=new Date;if(this.picker.find(".datetimepicker-days thead th:eq(1)").text(s[this.language].months[o]+" "+a),"time"==this.formatViewType){var m=l%12?l%12:12,v=(m<10?"0":"")+m,y=(h<10?"0":"")+h,b=s[this.language].meridiem[l<12?0:1];this.picker.find(".datetimepicker-hours thead th:eq(1)").text(v+":"+y+" "+b.toUpperCase()),this.picker.find(".datetimepicker-minutes thead th:eq(1)").text(v+":"+y+" "+b.toUpperCase())}else this.picker.find(".datetimepicker-hours thead th:eq(1)").text(r+" "+s[this.language].months[o]+" "+a),this.picker.find(".datetimepicker-minutes thead th:eq(1)").text(r+" "+s[this.language].months[o]+" "+a);this.picker.find("tfoot th.today").text(s[this.language].today).toggle(this.todayBtn!==!1),this.updateNavArrows(),this.fillMonths();var w=e(a,o-1,28,0,0,0,0),x=n.getDaysInMonth(w.getUTCFullYear(),w.getUTCMonth());w.setUTCDate(x),w.setUTCDate(x-(w.getUTCDay()-this.weekStart+7)%7);var _=new Date(w);_.setUTCDate(_.getUTCDate()+42),_=_.valueOf();for(var C,k=[];w.valueOf()<_;)w.getUTCDay()==this.weekStart&&k.push(""),C="",w.getUTCFullYear()a||w.getUTCFullYear()==a&&w.getUTCMonth()>o)&&(C+=" new"),this.todayHighlight&&w.getUTCFullYear()==g.getFullYear()&&w.getUTCMonth()==g.getMonth()&&w.getUTCDate()==g.getDate()&&(C+=" today"),w.valueOf()==f&&(C+=" active"),(w.valueOf()+864e5<=this.startDate||w.valueOf()>this.endDate||t.inArray(w.getUTCDay(),this.daysOfWeekDisabled)!==-1)&&(C+=" disabled"),k.push('| '+w.getUTCDate()+" | "),w.getUTCDay()==this.weekEnd&&k.push("
"),w.setUTCDate(w.getUTCDate()+1);this.picker.find(".datetimepicker-days tbody").empty().append(k.join("")),k=[];for(var T="",S="",D="",M=0;M<24;M++){var P=e(a,o,r,M);C="",P.valueOf()+36e5<=this.startDate||P.valueOf()>this.endDate?C+=" disabled":l==M&&(C+=" active"),this.showMeridian&&2==s[this.language].meridiem.length?(S=M<12?s[this.language].meridiem[0]:s[this.language].meridiem[1],S!=D&&(""!=D&&k.push(""),k.push('")):(T=M+":00",k.push(''+T+""))}this.picker.find(".datetimepicker-hours td").html(k.join("")),k=[],T="",S="",D="";for(var M=0;M<60;M+=this.minuteStep){var P=e(a,o,r,l,M,0);C="",P.valueOf()this.endDate?C+=" disabled":Math.floor(h/this.minuteStep)==Math.floor(M/this.minuteStep)&&(C+=" active"),this.showMeridian&&2==s[this.language].meridiem.length?(S=l<12?s[this.language].meridiem[0]:s[this.language].meridiem[1],S!=D&&(""!=D&&k.push(""),k.push('")):(T=M+":00",k.push(''+l+":"+(M<10?"0"+M:M)+""))}this.picker.find(".datetimepicker-minutes td").html(k.join(""));var F=this.date.getUTCFullYear(),L=this.picker.find(".datetimepicker-months").find("th:eq(1)").text(a).end().find("span").removeClass("active");F==a&&L.eq(this.date.getUTCMonth()).addClass("active"),(au)&&L.addClass("disabled"),a==c&&L.slice(0,d).addClass("disabled"),a==u&&L.slice(p+1).addClass("disabled"),k="",a=10*parseInt(a/10,10);var z=this.picker.find(".datetimepicker-years").find("th:eq(1)").text(a+"-"+(a+9)).end().find("td");a-=1;for(var M=-1;M<11;M++)k+='u?" disabled":"")+'">'+a+"",a+=1;z.html(k),this.place()}},updateNavArrows:function(){var t=new Date(this.viewDate),e=t.getUTCFullYear(),i=t.getUTCMonth(),s=t.getUTCDate(),n=t.getUTCHours();switch(this.viewMode){case 0:this.startDate!==-(1/0)&&e<=this.startDate.getUTCFullYear()&&i<=this.startDate.getUTCMonth()&&s<=this.startDate.getUTCDate()&&n<=this.startDate.getUTCHours()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&e>=this.endDate.getUTCFullYear()&&i>=this.endDate.getUTCMonth()&&s>=this.endDate.getUTCDate()&&n>=this.endDate.getUTCHours()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:this.startDate!==-(1/0)&&e<=this.startDate.getUTCFullYear()&&i<=this.startDate.getUTCMonth()&&s<=this.startDate.getUTCDate()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&e>=this.endDate.getUTCFullYear()&&i>=this.endDate.getUTCMonth()&&s>=this.endDate.getUTCDate()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 2:this.startDate!==-(1/0)&&e<=this.startDate.getUTCFullYear()&&i<=this.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&e>=this.endDate.getUTCFullYear()&&i>=this.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 3:case 4:this.startDate!==-(1/0)&&e<=this.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&e>=this.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}},mousewheel:function(e){if(e.preventDefault(),e.stopPropagation(),!this.wheelPause){this.wheelPause=!0;var i=e.originalEvent,s=i.wheelDelta,n=s>0?1:0===s?0:-1;this.wheelViewModeNavigationInverseDirection&&(n=-n),this.showMode(n),setTimeout(t.proxy(function(){this.wheelPause=!1},this),this.wheelViewModeNavigationDelay)}},click:function(i){i.stopPropagation(),i.preventDefault();var s=t(i.target).closest("span, td, th, legend");if(1==s.length){if(s.is(".disabled"))return void this.element.trigger({type:"outOfRange",date:this.viewDate,startDate:this.startDate,endDate:this.endDate});switch(s[0].nodeName.toLowerCase()){case"th":switch(s[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var a=n.modes[this.viewMode].navStep*("prev"==s[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveHour(this.viewDate,a);break;case 1:this.viewDate=this.moveDate(this.viewDate,a);break;case 2:this.viewDate=this.moveMonth(this.viewDate,a);break;case 3:case 4:this.viewDate=this.moveYear(this.viewDate,a)}this.fill();break;case"today":var o=new Date;o=e(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds(),0),othis.endDate&&(o=this.endDate),this.viewMode=this.startViewMode,this.showMode(0),this._setDate(o),this.fill(),this.autoclose&&this.hide()}break;case"span":if(!s.is(".disabled")){var r=this.viewDate.getUTCFullYear(),l=this.viewDate.getUTCMonth(),h=this.viewDate.getUTCDate(),c=this.viewDate.getUTCHours(),d=this.viewDate.getUTCMinutes(),u=this.viewDate.getUTCSeconds();if(s.is(".month")?(this.viewDate.setUTCDate(1),l=s.parent().find("span").index(s),h=this.viewDate.getUTCDate(),this.viewDate.setUTCMonth(l),this.element.trigger({type:"changeMonth",date:this.viewDate}),this.viewSelect>=3&&this._setDate(e(r,l,h,c,d,u,0))):s.is(".year")?(this.viewDate.setUTCDate(1),r=parseInt(s.text(),10)||0,this.viewDate.setUTCFullYear(r),this.element.trigger({type:"changeYear",date:this.viewDate}),this.viewSelect>=4&&this._setDate(e(r,l,h,c,d,u,0))):s.is(".hour")?(c=parseInt(s.text(),10)||0,(s.hasClass("hour_am")||s.hasClass("hour_pm"))&&(12==c&&s.hasClass("hour_am")?c=0:12!=c&&s.hasClass("hour_pm")&&(c+=12)),this.viewDate.setUTCHours(c),this.element.trigger({type:"changeHour",date:this.viewDate}),this.viewSelect>=1&&this._setDate(e(r,l,h,c,d,u,0))):s.is(".minute")&&(d=parseInt(s.text().substr(s.text().indexOf(":")+1),10)||0,this.viewDate.setUTCMinutes(d),this.element.trigger({type:"changeMinute",date:this.viewDate}),this.viewSelect>=0&&this._setDate(e(r,l,h,c,d,u,0))),0!=this.viewMode){var p=this.viewMode;this.showMode(-1),this.fill(),p==this.viewMode&&this.autoclose&&this.hide()}else this.fill(),this.autoclose&&this.hide()}break;case"td":if(s.is(".day")&&!s.is(".disabled")){var h=parseInt(s.text(),10)||1,r=this.viewDate.getUTCFullYear(),l=this.viewDate.getUTCMonth(),c=this.viewDate.getUTCHours(),d=this.viewDate.getUTCMinutes(),u=this.viewDate.getUTCSeconds();s.is(".old")?0===l?(l=11,r-=1):l-=1:s.is(".new")&&(11==l?(l=0,r+=1):l+=1),this.viewDate.setUTCFullYear(r),this.viewDate.setUTCMonth(l,h),this.element.trigger({type:"changeDay",date:this.viewDate}),this.viewSelect>=2&&this._setDate(e(r,l,h,c,d,u,0))}var p=this.viewMode;this.showMode(-1),this.fill(),p==this.viewMode&&this.autoclose&&this.hide()}}},_setDate:function(t,e){e&&"date"!=e||(this.date=t),e&&"view"!=e||(this.viewDate=t),this.fill(),this.setValue();var i;this.isInput?i=this.element:this.component&&(i=this.element.find("input")),i&&(i.change(),this.autoclose&&(!e||"date"==e)),this.element.trigger({type:"changeDate",date:this.date}),null===t&&(this.date=this.viewDate)},moveMinute:function(t,e){if(!e)return t;var i=new Date(t.valueOf());return i.setUTCMinutes(i.getUTCMinutes()+e*this.minuteStep),i},moveHour:function(t,e){if(!e)return t;var i=new Date(t.valueOf());return i.setUTCHours(i.getUTCHours()+e),i},moveDate:function(t,e){if(!e)return t;var i=new Date(t.valueOf());return i.setUTCDate(i.getUTCDate()+e),i},moveMonth:function(t,e){if(!e)return t;var i,s,n=new Date(t.valueOf()),a=n.getUTCDate(),o=n.getUTCMonth(),r=Math.abs(e);if(e=e>0?1:-1,1==r)s=e==-1?function(){return n.getUTCMonth()==o}:function(){return n.getUTCMonth()!=i},i=o+e,n.setUTCMonth(i),(i<0||i>11)&&(i=(i+12)%12);else{for(var l=0;l=this.startDate&&t<=this.endDate},keydown:function(t){if(this.picker.is(":not(:visible)"))return void(27==t.keyCode&&this.show());var e,i,s,n=!1;switch(t.keyCode){case 27:this.hide(),t.preventDefault();break;case 37:case 39:if(!this.keyboardNavigation)break;e=37==t.keyCode?-1:1,viewMode=this.viewMode,t.ctrlKey?viewMode+=2:t.shiftKey&&(viewMode+=1),4==viewMode?(i=this.moveYear(this.date,e),s=this.moveYear(this.viewDate,e)):3==viewMode?(i=this.moveMonth(this.date,e),s=this.moveMonth(this.viewDate,e)):2==viewMode?(i=this.moveDate(this.date,e),s=this.moveDate(this.viewDate,e)):1==viewMode?(i=this.moveHour(this.date,e),s=this.moveHour(this.viewDate,e)):0==viewMode&&(i=this.moveMinute(this.date,e),s=this.moveMinute(this.viewDate,e)),this.dateWithinRange(i)&&(this.date=i,this.viewDate=s,this.setValue(),this.update(),t.preventDefault(),n=!0);break;case 38:case 40:if(!this.keyboardNavigation)break;e=38==t.keyCode?-1:1,viewMode=this.viewMode,t.ctrlKey?viewMode+=2:t.shiftKey&&(viewMode+=1),4==viewMode?(i=this.moveYear(this.date,e),s=this.moveYear(this.viewDate,e)):3==viewMode?(i=this.moveMonth(this.date,e),s=this.moveMonth(this.viewDate,e)):2==viewMode?(i=this.moveDate(this.date,7*e),s=this.moveDate(this.viewDate,7*e)):1==viewMode?this.showMeridian?(i=this.moveHour(this.date,6*e),s=this.moveHour(this.viewDate,6*e)):(i=this.moveHour(this.date,4*e),s=this.moveHour(this.viewDate,4*e)):0==viewMode&&(i=this.moveMinute(this.date,4*e),s=this.moveMinute(this.viewDate,4*e)),this.dateWithinRange(i)&&(this.date=i,this.viewDate=s,this.setValue(),this.update(),t.preventDefault(),n=!0);break;case 13:if(0!=this.viewMode){var a=this.viewMode;this.showMode(-1),this.fill(),a==this.viewMode&&this.autoclose&&this.hide()}else this.fill(),this.autoclose&&this.hide();t.preventDefault();break;case 9:this.hide()}if(n){var o;this.isInput?o=this.element:this.component&&(o=this.element.find("input")),o&&o.change(),this.element.trigger({type:"changeDate",date:this.date})}},showMode:function(t){if(t){var e=Math.max(0,Math.min(n.modes.length-1,this.viewMode+t));e>=this.minView&&e<=this.maxView&&(this.element.trigger({type:"changeMode",date:this.viewDate,oldViewMode:this.viewMode,newViewMode:e}),this.viewMode=e)}this.picker.find(">div").hide().filter(".datetimepicker-"+n.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()},reset:function(t){this._setDate(null,"date")}},t.fn.datetimepicker=function(e){var s=Array.apply(null,arguments);return s.shift(),this.each(function(){var n=t(this),a=n.data("datetimepicker"),o="object"==typeof e&&e;a||n.data("datetimepicker",a=new i(this,t.extend({},t.fn.datetimepicker.defaults,n.data(),o))),"string"==typeof e&&"function"==typeof a[e]&&a[e].apply(a,s)})},t.fn.datetimepicker.defaults={pickerPosition:"auto-right"},t.fn.datetimepicker.Constructor=i;var s=t.fn.datetimepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridiem:["am","pm"],suffix:["st","nd","rd","th"],today:"Today"}};s["zh-cn"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["周日","周一","周二","周三","周四","周五","周六","周日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今日",suffix:[],meridiem:[]},s["zh-tw"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["周日","周一","周二","周三","周四","周五","周六","周日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今天",suffix:[],meridiem:["上午","下午"]};var n={modes:[{clsName:"minutes",navFnc:"Hours",navStep:1},{clsName:"hours",navFnc:"Date",navStep:1},{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(t){return t%4===0&&t%100!==0||t%400===0},getDaysInMonth:function(t,e){return[31,n.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},getDefaultFormat:function(t,e){if("standard"==t)return"input"==e?"yyyy-mm-dd hh:ii":"yyyy-mm-dd hh:ii:ss";if("php"==t)return"input"==e?"Y-m-d H:i":"Y-m-d H:i:s";throw new Error("Invalid format type.")},validParts:function(t){if("standard"==t)return/hh?|HH?|p|P|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g;if("php"==t)return/[dDjlNwzFmMnStyYaABgGhHis]/g;throw new Error("Invalid format type.")},nonpunctuation:/[^ -\/:-@\[-`{-~\t\n\rTZ]+/g,parseFormat:function(t,e){var i=t.replace(this.validParts(e),"\0").split("\0"),s=t.match(this.validParts(e));if(!i||!i.length||!s||0==s.length)throw new Error("Invalid date format.");return{separators:i,parts:s}},parseDate:function(n,a,o,r){if(n instanceof Date){var l=new Date(n.valueOf()-6e4*n.getTimezoneOffset());return l.setMilliseconds(0),l}if(/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(n)&&(a=this.parseFormat("yyyy-mm-dd",r)),/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}$/.test(n)&&(a=this.parseFormat("yyyy-mm-dd hh:ii",r)),/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}\:\d{1,2}[Z]{0,1}$/.test(n)&&(a=this.parseFormat("yyyy-mm-dd hh:ii:ss",r)),/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(n)){var h,c,d=/([-+]\d+)([dmwy])/,u=n.match(/([-+]\d+)([dmwy])/g);n=new Date;for(var p=0;p | | |
',contTemplate:' |
',footTemplate:' |
'};n.template=''+n.headTemplate+n.contTemplate+n.footTemplate+'
'+n.headTemplate+n.contTemplate+n.footTemplate+'
'+n.headTemplate+""+n.footTemplate+'
'+n.headTemplate+n.contTemplate+n.footTemplate+'
'+n.headTemplate+n.contTemplate+n.footTemplate+"
",t.fn.datetimepicker.DPGlobal=n,t.fn.datetimepicker.noConflict=function(){return t.fn.datetimepicker=old,this},t(document).on("focus.datetimepicker.data-api click.datetimepicker.data-api",'[data-provide="datetimepicker"]',function(e){
var i=t(this);i.data("datetimepicker")||(e.preventDefault(),i.datetimepicker("show"))}),t(function(){t('[data-provide="datetimepicker-inline"]').datetimepicker()})}(window.jQuery),/*!
Chosen, a Select Box Enhancer for jQuery and Prototype
by Patrick Filler for Harvest, http://getharvest.com
@@ -34,7 +34,8 @@ Copyright (c) 2011 Harvest http://getharvest.com
MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
*/
-function(){var t,e,i,s,n,a={}.hasOwnProperty,o=function(t,e){function i(){this.constructor=t}for(var s in e)a.call(e,s)&&(t[s]=e[s]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},r={zh_cn:{no_results_text:"没有找到"},zh_tw:{no_results_text:"沒有找到"},en:{no_results_text:"No results match"}};s=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.add_node=function(t){return"OPTGROUP"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},e.prototype.add_group=function(e){var i,s,n,a,o,r;for(i=this.parsed.length,this.parsed.push({array_index:i,group:!0,label:this.escapeExpression(e.label),children:0,disabled:e.disabled,title:e.title,search_keys:t.trim(e.getAttribute("data-keys")||"").replace(/,/g," ")}),o=e.childNodes,r=[],n=0,a=o.length;n\"\'\`]/.test(t)?(e={"<":"<",">":">",'"':""","'":"'","`":"`"},i=/&(?!\w+;)|[\<\>\"\'\`]/g,t.replace(i,function(t){return e[t]||"&"})):t},e}(),s.select_to_array=function(t){var e,i,n,a,o;for(i=new s,o=t.childNodes,n=0,a=o.length;n0?(e=document.createElement("li"),e.className="group-result",e.title=t.title,e.innerHTML=t.search_text,this.outerHTML(e)):""},e.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},e.prototype.reset_single_select_options=function(){var t,e,i,s,n;for(s=this.results_data,n=[],e=0,i=s.length;e"+i.search_text.substr(l+r.length),i.search_text=h.substr(0,l)+""+h.substr(l)):i.search_keys_match&&i.search_keys.length&&(l=i.search_keys.search(c),h=i.search_keys.substr(0,l+r.length)+""+i.search_keys.substr(l+r.length),i.search_text+=' '+h.substr(0,l)+""+h.substr(l)+""),null!=o&&(o.group_match=!0)):null!=i.group_array_index&&this.results_data[i.group_array_index].search_match&&(i.search_match=!0)));return this.result_clear_highlight(),a<1&&r.length?(this.update_results_content(""),this.no_results(r)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight(t))},e.prototype.search_string_match=function(t,e){var i,s,n,a;if(e.test(t))return!0;if(this.enable_split_word_search&&(t.indexOf(" ")>=0||0===t.indexOf("["))&&(s=t.replace(/\[|\]/g,"").split(" "),s.length))for(n=0,a=s.length;n0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(t.preventDefault(),this.results_showing)return this.result_select(t);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},e.prototype.clipboard_event_checker=function(t){var e=this;return setTimeout(function(){return e.results_search()},50)},e.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.classList.contains("form-control")?"100%":""+this.form_field.offsetWidth+"px"},e.prototype.include_option_in_results=function(t){return!(this.is_multiple&&!this.display_selected_options&&t.selected)&&(!(!this.display_disabled_options&&t.disabled)&&!t.empty)},e.prototype.search_results_touchstart=function(t){return this.touch_started=!0,this.search_results_mouseover(t)},e.prototype.search_results_touchmove=function(t){return this.touch_started=!1,this.search_results_mouseout(t)},e.prototype.search_results_touchend=function(t){if(this.touch_started)return this.search_results_mouseup(t)},e.prototype.outerHTML=function(t){var e;return t.outerHTML?t.outerHTML:(e=document.createElement("div"),e.appendChild(t),e.innerHTML)},e.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!/iP(od|hone)/i.test(window.navigator.userAgent)&&(!/Android/i.test(window.navigator.userAgent)||!/Mobile/i.test(window.navigator.userAgent))},e.default_multiple_text="",e.default_single_text="",e.default_no_result_text="No results match",e}(),t=jQuery,t.fn.extend({chosen:function(s){return e.browser_is_supported()?this.each(function(e){var n,a;n=t(this),a=n.data("chosen"),"destroy"===s&&a?a.destroy():a||n.data("chosen",new i(this,s))}):this}}),i=function(e){function i(){return n=i.__super__.constructor.apply(this,arguments)}return o(i,e),i.prototype.setup=function(){return this.form_field_jq=t(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},i.prototype.set_up_html=function(){var e,i;e=["chosen-container"],e.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl");var s=this.form_field.getAttribute("data-css-class");return s&&e.push(s),i={"class":e.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(i.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=t("",i),this.is_multiple?this.container.html(''):this.container.html(''+this.default_text+'
'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.options.drop_width&&this.dropdown.css("width",this.options.drop_width).addClass("chosen-drop-size-limited"),this.results_build(),this.set_tab_index(),this.set_label_behavior(),this.form_field_jq.trigger("chosen:ready",{chosen:this})},i.prototype.register_observers=function(){var t=this;return this.container.bind("mousedown.chosen",function(e){t.container_mousedown(e)}),this.container.bind("mouseup.chosen",function(e){t.container_mouseup(e)}),this.container.bind("mouseenter.chosen",function(e){t.mouse_enter(e)}),this.container.bind("mouseleave.chosen",function(e){t.mouse_leave(e)}),this.search_results.bind("mouseup.chosen",function(e){t.search_results_mouseup(e)}),this.search_results.bind("mouseover.chosen",function(e){t.search_results_mouseover(e)}),this.search_results.bind("mouseout.chosen",function(e){t.search_results_mouseout(e)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(e){t.search_results_mousewheel(e)}),this.search_results.bind("touchstart.chosen",function(e){t.search_results_touchstart(e)}),this.search_results.bind("touchmove.chosen",function(e){t.search_results_touchmove(e)}),this.search_results.bind("touchend.chosen",function(e){t.search_results_touchend(e)}),this.form_field_jq.bind("chosen:updated.chosen",function(e){t.results_update_field(e)}),this.form_field_jq.bind("chosen:activate.chosen",function(e){t.activate_field(e)}),this.form_field_jq.bind("chosen:open.chosen",function(e){t.container_mousedown(e)}),this.form_field_jq.bind("chosen:close.chosen",function(e){t.input_blur(e)}),this.search_field.bind("blur.chosen",function(e){t.input_blur(e)}),this.search_field.bind("keyup.chosen",function(e){t.keyup_checker(e)}),this.search_field.bind("keydown.chosen",function(e){t.keydown_checker(e)}),this.search_field.bind("focus.chosen",function(e){t.input_focus(e)}),this.search_field.bind("cut.chosen",function(e){t.clipboard_event_checker(e)}),this.search_field.bind("paste.chosen",function(e){t.clipboard_event_checker(e)}),this.is_multiple?this.search_choices.bind("click.chosen",function(e){t.choices_click(e)}):this.container.bind("click.chosen",function(t){t.preventDefault()})},i.prototype.destroy=function(){return t(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},i.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},i.prototype.container_mousedown=function(e){if(!this.is_disabled&&(e&&"mousedown"===e.type&&!this.results_showing&&e.preventDefault(),null==e||!t(e.target).hasClass("search-choice-close")))return this.active_field?this.is_multiple||!e||t(e.target)[0]!==this.selected_item[0]&&!t(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),t(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field()},i.prototype.container_mouseup=function(t){if("ABBR"===t.target.nodeName&&!this.is_disabled)return this.results_reset(t)},i.prototype.search_results_mousewheel=function(t){var e;if(t.originalEvent&&(e=-t.originalEvent.wheelDelta||t.originalEvent.detail),null!=e)return t.preventDefault(),"DOMMouseScroll"===t.type&&(e=40*e),this.search_results.scrollTop(e+this.search_results.scrollTop())},i.prototype.blur_test=function(t){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},i.prototype.close_field=function(){return t(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},i.prototype.activate_field=function(){this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val())},i.prototype.test_active_click=function(e){var i;return i=t(e.target).closest(".chosen-container"),i.length&&this.container[0]===i[0]?this.active_field=!0:this.close_field()},i.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=s.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},i.prototype.result_do_highlight=function(t,e){var i,s,n,a,o,r,l=-1;t.length&&(this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass("highlighted"),n=parseInt(this.search_results.css("maxHeight"),10),r=this.result_highlight.outerHeight(),o=this.search_results.scrollTop(),a=n+o,s=this.result_highlight.position().top+this.search_results.scrollTop(),i=s+r,this.middle_highlight&&(e||"always"===this.middle_highlight||i>=a||s=a?l=i-n>0?i-n:0:s-1&&this.search_results.scrollTop(l))},i.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},i.prototype.results_show=function(){if(this.is_multiple&&this.max_selected_options<=this.choices_count())return this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1;this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(1);var e=this.drop_direction;if("auto"===e)if(this.drop_directionFixed)e=this.drop_directionFixed;else{var i=this.container.find(".chosen-drop"),s=this.container.offset();s.top+i.outerHeight()+30>t(window).height()+t(window).scrollTop()&&(e="up"),this.drop_directionFixed=e}return this.container.toggleClass("chosen-up","up"===e),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this})},i.prototype.update_results_content=function(t){return this.search_results.html(t)},i.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this}),this.drop_directionFixed=0),this.results_showing=!1},i.prototype.set_tab_index=function(t){var e;if(this.form_field.tabIndex)return e=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=e},i.prototype.set_label_behavior=function(){var e=this;if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=t("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0)return this.form_field_label.bind("click.chosen",function(t){return e.is_multiple?e.container_mousedown(t):e.activate_field()})},i.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},i.prototype.search_results_mouseup=function(e){var i;i=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first(),i.length&&(this.result_highlight=i,this.result_select(e))},i.prototype.search_results_mouseover=function(e){var i;if(i=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first())return this.result_do_highlight(i)},i.prototype.search_results_mouseout=function(e){if(t(e.target).hasClass("active-result"))return this.result_clear_highlight()},i.prototype.choice_build=function(e){var i,s,n=this;return i=t("",{"class":"search-choice"}).html(""+e.html+""),e.disabled?i.addClass("search-choice-disabled"):(s=t("",{"class":"search-choice-close","data-option-array-index":e.array_index}),s.bind("click.chosen",function(t){return n.choice_destroy_link_click(t)}),i.append(s)),this.search_container.before(i)},i.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(t(e.target))},i.prototype.choice_destroy=function(t){if(this.result_deselect(t[0].getAttribute("data-option-array-index")))return this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),t.parents("li").first().remove(),this.search_field_scale()},i.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field)return this.results_hide()},i.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},i.prototype.result_select=function(t){var e,i;if(this.result_highlight)return e=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?e.removeClass("active-result"):this.reset_single_select_options(),i=this.results_data[e[0].getAttribute("data-option-array-index")],i.selected=!0,this.form_field.options[i.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(i):this.single_set_selected_text(i.text),(t.metaKey||t.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[i.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,this.search_field_scale())},i.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").attr("title",t).text(t)},i.prototype.result_deselect=function(t){var e;return e=this.results_data[t],!this.form_field.options[e.options_index].disabled&&(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[e.options_index].value}),this.search_field_scale(),!0)},i.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after(''),this.selected_item.addClass("chosen-single-with-deselect")},i.prototype.get_search_text=function(){return this.search_field.val()===this.default_text?"":t("").text(t.trim(this.search_field.val())).html()},i.prototype.winnow_results_set_highlight=function(t){var e,i;if(i=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),e=i.length?i.first():this.search_results.find(".active-result").first(),null!=e)return this.result_do_highlight(e,t)},i.prototype.no_results=function(e){var i;return i=t(''+this.results_none_found+' ""'),i.find("span").first().html(e),this.search_results.append(i),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},i.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},i.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void 0:this.results_show()},i.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result"),t.length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},i.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last(),t.length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},i.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},i.prototype.keydown_checker=function(t){var e,i;switch(e=null!=(i=t.which)?i:t.keyCode,this.search_field_scale(),8!==e&&this.pending_backstroke&&this.clear_backstroke(),e){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(t),this.mouse_on_container=!1;break;case 13:t.preventDefault();break;case 38:t.preventDefault(),this.keyup_arrow();break;case 40:t.preventDefault(),this.keydown_arrow()}},i.prototype.search_field_scale=function(){var e,i,s,n,a,o,r,l,h;if(this.is_multiple){for(s=0,r=0,a="position:absolute; left: -1000px; top: -1000px; display:none;",o=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],l=0,h=o.length;l",{style:a}),e.text(this.search_field.val()),t("body").append(e),r=e.width()+25,e.remove(),i=this.container.outerWidth(),r>i-10&&(r=i-10),this.search_field.css({width:r+"px"})}},i}(e)}.call(this),function(t){"use strict";var e="zui.selectable",i=function(i,s){this.name=e,this.$=t(i),this.id=t.zui.uuid(),this.selectOrder=1,this.selections={},this.getOptions(s),this._init()},s=function(t,e,i){return t>=i.left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height},n=function(t,e){var i=Math.max(t.left,e.left),n=Math.max(t.top,e.top),a=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height);return s(i,n,t)&&s(a,o,t)&&s(i,n,e)&&s(a,o,e)};i.DEFAULTS={selector:"li,tr,div",trigger:"",selectClass:"active",rangeStyle:{border:"1px solid "+(t.zui.colorset?t.zui.colorset.primary:"#3280fc"),backgroundColor:t.zui.colorset?new t.zui.Color(t.zui.colorset.primary).fade(20).toCssStr():"rgba(50, 128, 252, 0.2)"},clickBehavior:"toggle",ignoreVal:3,listenClick:!0},i.prototype.getOptions=function(e){this.options=t.extend({},i.DEFAULTS,this.$.data(),e)},i.prototype.select=function(t){this.toggle(t,!0)},i.prototype.unselect=function(t){this.toggle(t,!1)},i.prototype.toggle=function(e,i,s){var n,a,o=this.options.selector,r=this;if(void 0===e)return void this.$.find(o).each(function(){r.toggle(this,i)});if("object"==typeof e?(n=t(e).closest(o),a=n.data("id")):(a=e,n=r.$.find('.slectable-item[data-id="'+a+'"]')),n&&n.length){if(a||(a=t.zui.uuid(),n.attr("data-id",a)),void 0!==i&&null!==i||(i=!r.selections[a]),!!i!=!!r.selections[a]){var l;t.isFunction(s)&&(l=s(i)),l!==!0&&(r.selections[a]=!!i&&r.selectOrder++,r.callEvent(i?"select":"unselect",{id:a,selections:r.selections,target:n,selected:r.getSelectedArray()},r))}r.options.selectClass&&n.toggleClass(r.options.selectClass,i)}},i.prototype.getSelectedArray=function(){var e=[];return t.each(this.selections,function(t,i){i&&e.push(t)}),e},i.prototype.syncSelectionsFromClass=function(){var e=this;e.$children=e.$.find(e.options.selector);e.selections={},e.$children.each(function(){var i=t(this);e.selections[i.data("id")]=i.hasClass(e.options.selectClass)})},i.prototype._init=function(){var e,i,s,a,o,r,l,h=this.options,c=this,d=h.ignoreVal,u=!0,p="."+this.name+"."+this.id,f=t.isFunction(h.checkFunc)?h.checkFunc:null,g=t.isFunction(h.rangeFunc)?h.rangeFunc:null,m=!1,v=null,y="mousedown"+p,b=function(){a&&c.$children.each(function(){var e=t(this),i=e.offset();i.width=e.outerWidth(),i.height=e.outerHeight();var s=g?g.call(this,a,i):n(a,i);if(f){var o=f.call(c,{intersect:s,target:e,range:a,targetRange:i});o===!0?c.select(e):o===!1&&c.unselect(e)}else s?c.select(e):c.multiKey||c.unselect(e)})},w=function(n){m&&(o=n.pageX,r=n.pageY,a={width:Math.abs(o-e),height:Math.abs(r-i),left:o>e?e:o,top:r>i?i:r},u&&a.width').css(t.extend({zIndex:1060,position:"absolute",top:e,left:i,pointerEvents:"none"},c.options.rangeStyle)).appendTo(t("body")))),s.css(a),clearTimeout(l),l=setTimeout(b,10),u=!1))},_=function(e){t(document).off(p),clearTimeout(v),m&&(m=!1,s&&s.remove(),u||a&&(clearTimeout(l),b(),a=null),c.callEvent("finish",{selections:c.selections,selected:c.getSelectedArray()}),e.preventDefault())},x=function(n){if(m)return _(n);var a=t.zui.getMouseButtonCode(h.mouseButton);if(!(a>-1&&n.button!==a||c.altKey||3===n.which||c.callEvent("start",n)===!1)){var o=c.$children=c.$.find(h.selector);o.addClass("slectable-item");var r=c.multiKey?"multi":h.clickBehavior;if("single"===r&&c.unselect(),h.listenClick&&("multi"===r?c.toggle(n.target):"single"===r?c.select(n.target):"toggle"===r&&c.toggle(n.target,null,function(t){c.unselect()})),c.callEvent("startDrag",n)===!1)return void c.callEvent("finish",{selections:c.selections,selected:c.getSelectedArray()});e=n.pageX,i=n.pageY,s=null,u=!0,m=!0,t(document).on("mousemove"+p,w).on("mouseup"+p,_),v=setTimeout(function(){t(document).on(y,_)},10),n.preventDefault()}},C=h.container&&"default"!==h.container?t(h.container):this.$;h.trigger?C.on(y,h.trigger,x):C.on(y,x),t(document).on("keydown",function(t){var e=t.keyCode;17===e||91==e?c.multiKey=e:18===e&&(c.altKey=!0)}).on("keyup",function(t){c.multiKey=!1,c.altKey=!1})},i.prototype.callEvent=function(e,i){var s=t.Event(e+"."+this.name);this.$.trigger(s,i);var n=s.result,a=this.options[e];return t.isFunction(a)&&(n=a.apply(this,t.isArray(i)?i:[i])),n},t.fn.selectable=function(s){return this.each(function(){var n=t(this),a=n.data(e),o="object"==typeof s&&s;a||n.data(e,a=new i(this,o)),"string"==typeof s&&a[s]()})},t.fn.selectable.Constructor=i,t(function(){t('[data-ride="selectable"]').selectable()})}(jQuery),/*!
+function(){var t,e,i,s,n,a={}.hasOwnProperty,o=function(t,e){function i(){this.constructor=t}for(var s in e)a.call(e,s)&&(t[s]=e[s]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},r={zh_cn:{no_results_text:"没有找到"},zh_tw:{no_results_text:"沒有找到"},en:{no_results_text:"No results match"}};s=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.add_node=function(t){return"OPTGROUP"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},e.prototype.add_group=function(e){var i,s,n,a,o,r;for(i=this.parsed.length,this.parsed.push({array_index:i,group:!0,label:this.escapeExpression(e.label),children:0,disabled:e.disabled,title:e.title,search_keys:t.trim(e.getAttribute("data-keys")||"").replace(/,/g," ")}),o=e.childNodes,r=[],n=0,a=o.length;n
\"\'\`]/.test(t)?(e={"<":"<",">":">",'"':""","'":"'","`":"`"},i=/&(?!\w+;)|[\<\>\"\'\`]/g,t.replace(i,function(t){return e[t]||"&"})):t},e}(),s.select_to_array=function(t){var e,i,n,a,o;for(i=new s,o=t.childNodes,n=0,a=o.length;n0?(e=document.createElement("li"),e.className="group-result",e.title=t.title,e.innerHTML=t.search_text,this.outerHTML(e)):""},e.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},e.prototype.reset_single_select_options=function(){var t,e,i,s,n;for(s=this.results_data,n=[],e=0,i=s.length;e"+i.search_text.substr(l+r.length),i.search_text=h.substr(0,l)+""+h.substr(l)):i.search_keys_match&&i.search_keys.length&&(l=i.search_keys.search(c),h=i.search_keys.substr(0,l+r.length)+""+i.search_keys.substr(l+r.length),i.search_text+=' '+h.substr(0,l)+""+h.substr(l)+""),null!=o&&(o.group_match=!0)):null!=i.group_array_index&&this.results_data[i.group_array_index].search_match&&(i.search_match=!0)));return this.result_clear_highlight(),a<1&&r.length?(this.update_results_content(""),this.no_results(r)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight(t))},e.prototype.search_string_match=function(t,e){var i,s,n,a;if(e.test(t))return!0;if(this.enable_split_word_search&&(t.indexOf(" ")>=0||0===t.indexOf("["))&&(s=t.replace(/\[|\]/g,"").split(" "),s.length))for(n=0,a=s.length;n0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(t.preventDefault(),this.results_showing)return this.result_select(t);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},e.prototype.clipboard_event_checker=function(t){var e=this;return setTimeout(function(){return e.results_search()},50)},e.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.classList.contains("form-control")?"100%":""+this.form_field.offsetWidth+"px"},e.prototype.include_option_in_results=function(t){return!(this.is_multiple&&!this.display_selected_options&&t.selected)&&(!(!this.display_disabled_options&&t.disabled)&&!t.empty)},e.prototype.search_results_touchstart=function(t){return this.touch_started=!0,this.search_results_mouseover(t)},e.prototype.search_results_touchmove=function(t){return this.touch_started=!1,this.search_results_mouseout(t)},e.prototype.search_results_touchend=function(t){if(this.touch_started)return this.search_results_mouseup(t)},e.prototype.outerHTML=function(t){var e;return t.outerHTML?t.outerHTML:(e=document.createElement("div"),e.appendChild(t),e.innerHTML)},e.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!/iP(od|hone)/i.test(window.navigator.userAgent)&&(!/Android/i.test(window.navigator.userAgent)||!/Mobile/i.test(window.navigator.userAgent))},e.default_multiple_text="",e.default_single_text="",e.default_no_result_text="No results match",e}(),t=jQuery,t.fn.extend({chosen:function(s){return e.browser_is_supported()?this.each(function(e){var n,a;n=t(this),a=n.data("chosen"),"destroy"===s&&a?a.destroy():a||n.data("chosen",new i(this,s))}):this}}),i=function(e){function i(){return n=i.__super__.constructor.apply(this,arguments)}return o(i,e),i.prototype.setup=function(){return this.form_field_jq=t(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},i.prototype.set_up_html=function(){var e,i;e=["chosen-container"],e.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl");var s=this.form_field.getAttribute("data-css-class");return s&&e.push(s),i={"class":e.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(i.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=t("",i),this.is_multiple?this.container.html(''):this.container.html(''+this.default_text+'
'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.options.drop_width&&this.dropdown.css("width",this.options.drop_width).addClass("chosen-drop-size-limited"),this.results_build(),this.set_tab_index(),this.set_label_behavior(),this.form_field_jq.trigger("chosen:ready",{chosen:this})},i.prototype.register_observers=function(){var t=this;return this.container.bind("mousedown.chosen",function(e){t.container_mousedown(e)}),this.container.bind("mouseup.chosen",function(e){t.container_mouseup(e)}),this.container.bind("mouseenter.chosen",function(e){t.mouse_enter(e)}),this.container.bind("mouseleave.chosen",function(e){t.mouse_leave(e)}),this.search_results.bind("mouseup.chosen",function(e){t.search_results_mouseup(e)}),this.search_results.bind("mouseover.chosen",function(e){t.search_results_mouseover(e)}),this.search_results.bind("mouseout.chosen",function(e){t.search_results_mouseout(e)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(e){t.search_results_mousewheel(e)}),this.search_results.bind("touchstart.chosen",function(e){t.search_results_touchstart(e)}),this.search_results.bind("touchmove.chosen",function(e){t.search_results_touchmove(e)}),this.search_results.bind("touchend.chosen",function(e){t.search_results_touchend(e)}),this.form_field_jq.bind("chosen:updated.chosen",function(e){t.results_update_field(e)}),this.form_field_jq.bind("chosen:activate.chosen",function(e){t.activate_field(e)}),this.form_field_jq.bind("chosen:open.chosen",function(e){t.container_mousedown(e)}),this.form_field_jq.bind("chosen:close.chosen",function(e){t.input_blur(e)}),this.search_field.bind("blur.chosen",function(e){t.input_blur(e)}),this.search_field.bind("keyup.chosen",function(e){t.keyup_checker(e)}),this.search_field.bind("keydown.chosen",function(e){t.keydown_checker(e)}),this.search_field.bind("focus.chosen",function(e){t.input_focus(e)}),this.search_field.bind("cut.chosen",function(e){t.clipboard_event_checker(e)}),this.search_field.bind("paste.chosen",function(e){t.clipboard_event_checker(e)}),this.is_multiple?this.search_choices.bind("click.chosen",function(e){t.choices_click(e)}):this.container.bind("click.chosen",function(t){t.preventDefault()})},i.prototype.destroy=function(){return t(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},i.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},i.prototype.container_mousedown=function(e){if(!this.is_disabled&&(e&&"mousedown"===e.type&&!this.results_showing&&e.preventDefault(),null==e||!t(e.target).hasClass("search-choice-close")))return this.active_field?this.is_multiple||!e||t(e.target)[0]!==this.selected_item[0]&&!t(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),t(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field()},i.prototype.container_mouseup=function(t){if("ABBR"===t.target.nodeName&&!this.is_disabled)return this.results_reset(t)},i.prototype.search_results_mousewheel=function(t){var e;if(t.originalEvent&&(e=-t.originalEvent.wheelDelta||t.originalEvent.detail),null!=e)return t.preventDefault(),"DOMMouseScroll"===t.type&&(e=40*e),this.search_results.scrollTop(e+this.search_results.scrollTop())},i.prototype.blur_test=function(t){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},i.prototype.close_field=function(){return t(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},i.prototype.activate_field=function(){this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val())},i.prototype.test_active_click=function(e){var i;return i=t(e.target).closest(".chosen-container"),i.length&&this.container[0]===i[0]?this.active_field=!0:this.close_field()},i.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=s.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},i.prototype.result_do_highlight=function(t,e){var i,s,n,a,o,r,l=-1;t.length&&(this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass("highlighted"),n=parseInt(this.search_results.css("maxHeight"),10),r=this.result_highlight.outerHeight(),o=this.search_results.scrollTop(),a=n+o,s=this.result_highlight.position().top+this.search_results.scrollTop(),i=s+r,this.middle_highlight&&(e||"always"===this.middle_highlight||i>=a||s=a?l=i-n>0?i-n:0:s-1&&this.search_results.scrollTop(l))},i.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},i.prototype.results_show=function(){if(this.is_multiple&&this.max_selected_options<=this.choices_count())return this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1;this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(1);var e=this.drop_direction;if("auto"===e)if(this.drop_directionFixed)e=this.drop_directionFixed;else{var i=this.container.find(".chosen-drop"),s=this.container.offset();s.top+i.outerHeight()+30>t(window).height()+t(window).scrollTop()&&(e="up"),this.drop_directionFixed=e}return this.container.toggleClass("chosen-up","up"===e),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this})},i.prototype.update_results_content=function(t){return this.search_results.html(t)},i.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this}),this.drop_directionFixed=0),this.results_showing=!1},i.prototype.set_tab_index=function(t){var e;if(this.form_field.tabIndex)return e=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=e},i.prototype.set_label_behavior=function(){var e=this;if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=t("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0)return this.form_field_label.bind("click.chosen",function(t){return e.is_multiple?e.container_mousedown(t):e.activate_field()})},i.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},i.prototype.search_results_mouseup=function(e){var i;i=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first(),i.length&&(this.result_highlight=i,this.result_select(e))},i.prototype.search_results_mouseover=function(e){var i;if(i=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first())return this.result_do_highlight(i)},i.prototype.search_results_mouseout=function(e){if(t(e.target).hasClass("active-result"))return this.result_clear_highlight()},i.prototype.choice_build=function(e){var i,s,n=this;return i=t("",{"class":"search-choice"}).html(""+e.html+""),e.disabled?i.addClass("search-choice-disabled"):(s=t("",{"class":"search-choice-close","data-option-array-index":e.array_index}),s.bind("click.chosen",function(t){return n.choice_destroy_link_click(t)}),i.append(s)),this.search_container.before(i)},i.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(t(e.target))},i.prototype.choice_destroy=function(t){if(this.result_deselect(t[0].getAttribute("data-option-array-index")))return this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),t.parents("li").first().remove(),this.search_field_scale()},i.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field)return this.results_hide()},i.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},i.prototype.result_select=function(t){var e,i;if(this.result_highlight)return e=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?e.removeClass("active-result"):this.reset_single_select_options(),i=this.results_data[e[0].getAttribute("data-option-array-index")],i.selected=!0,this.form_field.options[i.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(i):this.single_set_selected_text(i.text),(t.metaKey||t.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[i.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,this.search_field_scale())},i.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").attr("title",t).text(t)},i.prototype.result_deselect=function(t){var e;return e=this.results_data[t],!this.form_field.options[e.options_index].disabled&&(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[e.options_index].value}),this.search_field_scale(),!0)},i.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after(''),this.selected_item.addClass("chosen-single-with-deselect")},i.prototype.get_search_text=function(){return this.search_field.val()===this.default_text?"":t("").text(t.trim(this.search_field.val())).html()},i.prototype.winnow_results_set_highlight=function(t){var e,i;if(i=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),e=i.length?i.first():this.search_results.find(".active-result").first(),null!=e)return this.result_do_highlight(e,t)},i.prototype.no_results=function(e){var i;return i=t(''+this.results_none_found+' ""'),i.find("span").first().html(e),this.search_results.append(i),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},i.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},i.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void 0:this.results_show()},i.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result"),t.length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},i.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last(),t.length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},i.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},i.prototype.keydown_checker=function(t){var e,i;switch(e=null!=(i=t.which)?i:t.keyCode,this.search_field_scale(),8!==e&&this.pending_backstroke&&this.clear_backstroke(),e){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(t),this.mouse_on_container=!1;break;case 13:t.preventDefault();break;case 38:t.preventDefault(),this.keyup_arrow();break;case 40:t.preventDefault(),this.keydown_arrow()}},i.prototype.search_field_scale=function(){var e,i,s,n,a,o,r,l,h;if(this.is_multiple){for(s=0,r=0,a="position:absolute; left: -1000px; top: -1000px; display:none;",o=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],l=0,h=o.length;l",{style:a}),e.text(this.search_field.val()),t("body").append(e),r=e.width()+25,e.remove(),i=this.container.outerWidth(),r>i-10&&(r=i-10),this.search_field.css({width:r+"px"})}},i}(e)}.call(this),function(t){"use strict";var e="zui.selectable",i=function(i,s){this.name=e,this.$=t(i),this.id=t.zui.uuid(),this.selectOrder=1,this.selections={},this.getOptions(s),this._init()},s=function(t,e,i){return t>=i.left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height},n=function(t,e){var i=Math.max(t.left,e.left),n=Math.max(t.top,e.top),a=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height);return s(i,n,t)&&s(a,o,t)&&s(i,n,e)&&s(a,o,e)};i.DEFAULTS={selector:"li,tr,div",trigger:"",selectClass:"active",rangeStyle:{border:"1px solid "+(t.zui.colorset?t.zui.colorset.primary:"#3280fc"),backgroundColor:t.zui.colorset?new t.zui.Color(t.zui.colorset.primary).fade(20).toCssStr():"rgba(50, 128, 252, 0.2)"},clickBehavior:"toggle",ignoreVal:3,listenClick:!0},i.prototype.getOptions=function(e){this.options=t.extend({},i.DEFAULTS,this.$.data(),e)},i.prototype.select=function(t){this.toggle(t,!0)},i.prototype.unselect=function(t){this.toggle(t,!1)},i.prototype.toggle=function(e,i,s){var n,a,o=this.options.selector,r=this;if(void 0===e)return void this.$.find(o).each(function(){r.toggle(this,i)});if("object"==typeof e?(n=t(e).closest(o),a=n.data("id")):(a=e,n=r.$.find('.slectable-item[data-id="'+a+'"]')),n&&n.length){if(a||(a=t.zui.uuid(),n.attr("data-id",a)),void 0!==i&&null!==i||(i=!r.selections[a]),!!i!=!!r.selections[a]){var l;t.isFunction(s)&&(l=s(i)),l!==!0&&(r.selections[a]=!!i&&r.selectOrder++,r.callEvent(i?"select":"unselect",{id:a,selections:r.selections,target:n,selected:r.getSelectedArray()},r))}r.options.selectClass&&n.toggleClass(r.options.selectClass,i)}},i.prototype.getSelectedArray=function(){var e=[];return t.each(this.selections,function(t,i){i&&e.push(t)}),e},i.prototype.syncSelectionsFromClass=function(){var e=this;e.$children=e.$.find(e.options.selector);e.selections={},e.$children.each(function(){var i=t(this);e.selections[i.data("id")]=i.hasClass(e.options.selectClass)})},i.prototype._init=function(){var e,i,s,a,o,r,l,h=this.options,c=this,d=h.ignoreVal,u=!0,p="."+this.name+"."+this.id,f=t.isFunction(h.checkFunc)?h.checkFunc:null,g=t.isFunction(h.rangeFunc)?h.rangeFunc:null,m=!1,v=null,y="mousedown"+p,b=function(){a&&c.$children.each(function(){var e=t(this),i=e.offset();i.width=e.outerWidth(),i.height=e.outerHeight();var s=g?g.call(this,a,i):n(a,i);if(f){var o=f.call(c,{intersect:s,target:e,range:a,targetRange:i});o===!0?c.select(e):o===!1&&c.unselect(e)}else s?c.select(e):c.multiKey||c.unselect(e)})},w=function(n){m&&(o=n.pageX,r=n.pageY,a={width:Math.abs(o-e),height:Math.abs(r-i),left:o>e?e:o,top:r>i?i:r},u&&a.width').css(t.extend({zIndex:1060,position:"absolute",top:e,left:i,pointerEvents:"none"},c.options.rangeStyle)).appendTo(t("body")))),s.css(a),clearTimeout(l),l=setTimeout(b,10),u=!1))},x=function(e){t(document).off(p),clearTimeout(v),m&&(m=!1,s&&s.remove(),u||a&&(clearTimeout(l),b(),a=null),c.callEvent("finish",{selections:c.selections,selected:c.getSelectedArray()}),e.preventDefault())},_=function(n){if(m)return x(n);var a=t.zui.getMouseButtonCode(h.mouseButton);if(!(a>-1&&n.button!==a||c.altKey||3===n.which||c.callEvent("start",n)===!1)){var o=c.$children=c.$.find(h.selector);o.addClass("slectable-item");var r=c.multiKey?"multi":h.clickBehavior;if("single"===r&&c.unselect(),h.listenClick&&("multi"===r?c.toggle(n.target):"single"===r?c.select(n.target):"toggle"===r&&c.toggle(n.target,null,function(t){c.unselect()})),c.callEvent("startDrag",n)===!1)return void c.callEvent("finish",{selections:c.selections,selected:c.getSelectedArray()});e=n.pageX,i=n.pageY,s=null,u=!0,m=!0,t(document).on("mousemove"+p,w).on("mouseup"+p,x),v=setTimeout(function(){t(document).on(y,x)},10),n.preventDefault()}},C=h.container&&"default"!==h.container?t(h.container):this.$;h.trigger?C.on(y,h.trigger,_):C.on(y,_),t(document).on("keydown",function(t){var e=t.keyCode;17===e||91==e?c.multiKey=e:18===e&&(c.altKey=!0)}).on("keyup",function(t){c.multiKey=!1,c.altKey=!1})},i.prototype.callEvent=function(e,i){var s=t.Event(e+"."+this.name);this.$.trigger(s,i);var n=s.result,a=this.options[e];return t.isFunction(a)&&(n=a.apply(this,t.isArray(i)?i:[i])),n},t.fn.selectable=function(s){return this.each(function(){var n=t(this),a=n.data(e),o="object"==typeof s&&s;a||n.data(e,a=new i(this,o)),"string"==typeof s&&a[s]()})},t.fn.selectable.Constructor=i,t(function(){t('[data-ride="selectable"]').selectable()})}(jQuery),+function(t,e,i){
+"use strict";if(!t.fn.droppable)return void console.error("Sortable requires droppable.js");var s="zui.sortable",n={selector:"li,div",dragCssClass:"invisible",sortingClass:"sortable-sorting"},a="order",o=function(e,i){var s=this;s.$=t(e),s.options=t.extend({},n,s.$.data(),i),s.init()};o.DEFAULTS=n,o.NAME=s,o.prototype.init=function(){var e=this,i=e.$,s=e.options,n=s.selector,o=s.sortingClass,r=s.dragCssClass,l=s.reverse,h=function(i){i=i||e.getItems(1);var s=[];i.each(function(){var e=t(this).data(a);"number"==typeof e&&s.push(e)}),s.sort(function(t,e){return t-e});for(var n=i.length;s.length
c?n[l?"after":"before"](s):n[l?"before":"after"](s);var d=e.getItems(1);h(d),e.trigger(a,{list:d,element:s})}},finish:function(t){r&&t.element&&t.element.removeClass(r),i.removeClass(o),e.trigger("finish",{list:e.getItems(1),element:t.element})}})},o.prototype.destroy=function(){this.$.droppable("destroy"),this.$.data(s,null)},o.prototype.reset=function(){this.destroy(),this.init()},o.prototype.getItems=function(e){var i=this.$.children(this.options.selector).not(".drag-shadow");return e?i:i.map(function(){var e=t(this);return{item:e,order:e.data("order")}})},o.prototype.trigger=function(e,i){return t.zui.callEvent(this.options[e],i,this)},t.fn.sortable=function(e){return this.each(function(){var i=t(this),n=i.data(s),a="object"==typeof e&&e;n?"object"==typeof e&&n.reset():i.data(s,n=new o(this,a)),"string"==typeof e&&n[e]()})},t.fn.sortable.Constructor=o}(jQuery,window,document),/*!
* jQuery Form Plugin
* version: 4.2.2
* Requires jQuery v1.7.2 or later
@@ -55,5 +56,5 @@ function(){var t,e,i,s,n,a={}.hasOwnProperty,o=function(t,e){function i(){this.c
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
-!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=function(e,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(e)),t(i),i}:t(jQuery)}(function(t){"use strict";function e(e){var i=e.data;e.isDefaultPrevented()||(e.preventDefault(),t(e.target).closest("form").ajaxSubmit(i))}function i(e){var i=e.target,s=t(i);if(!s.is("[type=submit],[type=image]")){var n=s.closest("[type=submit]");if(0===n.length)return;i=n[0]}var a=i.form;if(a.clk=i,"image"===i.type)if(void 0!==e.offsetX)a.clk_x=e.offsetX,a.clk_y=e.offsetY;else if("function"==typeof t.fn.offset){var o=s.offset();a.clk_x=e.pageX-o.left,a.clk_y=e.pageY-o.top}else a.clk_x=e.pageX-i.offsetLeft,a.clk_y=e.pageY-i.offsetTop;setTimeout(function(){a.clk=a.clk_x=a.clk_y=null},100)}function s(){if(t.fn.ajaxSubmit.debug){var e="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e)}}var n=/\r?\n/g,a={};a.fileapi=void 0!==t('').get(0).files,a.formdata=void 0!==window.FormData;var o=!!t.fn.prop;t.fn.attr2=function(){if(!o)return this.attr.apply(this,arguments);var t=this.prop.apply(this,arguments);return t&&t.jquery||"string"==typeof t?t:this.attr.apply(this,arguments)},t.fn.ajaxSubmit=function(e,i,n,r){function l(i){var s,n,a=t.param(i,e.traditional).split("&"),o=a.length,r=[];for(s=0;s',T).val(d.extraData[l].value).appendTo(C)[0]):o.push(h('',T).val(d.extraData[l]).appendTo(C)[0]));d.iframeTarget||g.appendTo(S),m.attachEvent?m.attachEvent("onload",r):m.addEventListener("load",r,!1),setTimeout(t,15);try{C.submit()}catch(h){document.createElement("form").submit.apply(C)}}finally{C.setAttribute("action",i),C.setAttribute("enctype",a),e?C.setAttribute("target",e):p.removeAttr("target"),h(o).remove()}}function r(t){if(!y.aborted&&!$){if((z=n(m))||(s("cannot access response document"),t=M),t===D&&y)return y.abort("timeout"),void k.reject(y,"timeout");if(t===M&&y)return y.abort("server abort"),void k.reject(y,"error","server abort");if(z&&z.location.href!==d.iframeSrc||_){m.detachEvent?m.detachEvent("onload",r):m.removeEventListener("load",r,!1);var e,i="success";try{if(_)throw"timeout";var a="xml"===d.dataType||z.XMLDocument||v.isXMLDoc(z);if(s("isXml="+a),!a&&window.opera&&(null===z.body||!z.body.innerHTML)&&--E)return s("requeing onLoad callback, DOM not available"),void setTimeout(r,250);var o=z.body?z.body:z.documentElement;y.responseText=o?o.innerHTML:null,y.responseXML=z.XMLDocument?z.XMLDocument:z,a&&(d.dataType="xml"),y.getResponseHeader=function(t){return{"content-type":d.dataType}[t.toLowerCase()]},o&&(y.status=Number(o.getAttribute("status"))||y.status,y.statusText=o.getAttribute("statusText")||y.statusText);var l=(d.dataType||"").toLowerCase(),h=/(json|script|text)/.test(l);if(h||d.textarea){var c=z.getElementsByTagName("textarea")[0];if(c)y.responseText=c.value,y.status=Number(c.getAttribute("status"))||y.status,y.statusText=c.getAttribute("statusText")||y.statusText;else if(h){var p=z.getElementsByTagName("pre")[0],f=z.getElementsByTagName("body")[0];p?y.responseText=p.textContent?p.textContent:p.innerText:f&&(y.responseText=f.textContent?f.textContent:f.innerText)}}else"xml"===l&&!y.responseXML&&y.responseText&&(y.responseXML=I(y.responseText));try{L=U(y,l,d)}catch(v){i="parsererror",y.error=e=v||i}}catch(v){s("error caught: ",v),i="error",y.error=e=v||i}y.aborted&&(s("upload aborted"),i=null),y.status&&(i=y.status>=200&&y.status<300||304===y.status?"success":"error"),"success"===i?(d.success&&d.success.call(d.context,L,"success",y),k.resolve(y.responseText,"success",y),u&&v.event.trigger("ajaxSuccess",[y,d])):i&&(void 0===e&&(e=y.statusText),d.error&&d.error.call(d.context,y,i,e),k.reject(y,"error",e),u&&v.event.trigger("ajaxError",[y,d,e])),u&&v.event.trigger("ajaxComplete",[y,d]),u&&!--v.active&&v.event.trigger("ajaxStop"),d.complete&&d.complete.call(d.context,y,i),$=!0,d.timeout&&clearTimeout(x),setTimeout(function(){d.iframeTarget?g.attr("src",d.iframeSrc):g.remove(),y.responseXML=null},100)}}}var l,h,d,u,f,g,m,y,b,w,_,x,C=p[0],k=t.Deferred();if(k.abort=function(t){y.abort(t)},i)for(h=0;h',T)).css({position:"absolute",top:"-1000px",left:"-1000px"}),m=g[0],y={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var e="timeout"===t?"timeout":"aborted";s("aborting upload... "+e),this.aborted=1;try{m.contentWindow.document.execCommand&&m.contentWindow.document.execCommand("Stop")}catch(i){}g.attr("src",d.iframeSrc),y.error=e,d.error&&d.error.call(d.context,y,e,t),u&&i.event.trigger("ajaxError",[y,d,e]),d.complete&&d.complete.call(d.context,y,e)}},(u=d.global)&&0==t.active++&&t.event.trigger("ajaxStart"),u&&t.event.trigger("ajaxSend",[y,d]),d.beforeSend&&!1===d.beforeSend.call(d.context,y,d))return d.global&&t.active--,k.reject(),k;if(y.aborted)return k.reject(),k;(b=C.clk)&&(w=b.name)&&!b.disabled&&(d.extraData=d.extraData||{},d.extraData[w]=b.value,"image"===b.type&&(d.extraData[w+".x"]=C.clk_x,d.extraData[w+".y"]=C.clk_y));var D=1,M=2,P=t("meta[name=csrf-token]").attr("content"),F=t("meta[name=csrf-param]").attr("content");F&&P&&(d.extraData=d.extraData||{},d.extraData[F]=P),d.forceSync?a():setTimeout(a,10);var L,z,$,E=50,I=t.parseXML||function(t,e){return window.ActiveXObject?((e=new ActiveXObject("Microsoft.XMLDOM")).async="false",e.loadXML(t)):e=(new DOMParser).parseFromString(t,"text/xml"),e&&e.documentElement&&"parsererror"!==e.documentElement.nodeName?e:null},A=t.parseJSON||function(t){return window.eval("("+t+")")},U=function(e,i,s){var n=e.getResponseHeader("content-type")||"",a=("xml"===i||!i)&&n.indexOf("xml")>=0,o=a?e.responseXML:e.responseText;return a&&"parsererror"===o.documentElement.nodeName&&t.error&&t.error("parsererror"),s&&s.dataFilter&&(o=s.dataFilter(o,i)),"string"==typeof o&&(("json"===i||!i)&&n.indexOf("json")>=0?o=A(o):("script"===i||!i)&&n.indexOf("javascript")>=0&&t.globalEval(o)),o};return k}if(!this.length)return s("ajaxSubmit: skipping submit process - no element selected"),this;var c,d,u,p=this;"function"==typeof e?e={success:e}:"string"==typeof e||!1===e&&arguments.length>0?(e={url:e,data:i,dataType:n},"function"==typeof r&&(e.success=r)):void 0===e&&(e={}),c=e.method||e.type||this.attr2("method"),(u=(u="string"==typeof(d=e.url||this.attr2("action"))?t.trim(d):"")||window.location.href||"")&&(u=(u.match(/^([^#]+)/)||[])[1]),e=t.extend(!0,{url:u,success:t.ajaxSettings.success,type:c||t.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},e);var f={};if(this.trigger("form-pre-serialize",[this,e,f]),f.veto)return s("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(e.beforeSerialize&&!1===e.beforeSerialize(this,e))return s("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var g=e.traditional;void 0===g&&(g=t.ajaxSettings.traditional);var m,v=[],y=this.formToArray(e.semantic,v,e.filtering);if(e.data){var b=t.isFunction(e.data)?e.data(y):e.data;e.extraData=b,m=t.param(b,g)}if(e.beforeSubmit&&!1===e.beforeSubmit(y,this,e))return s("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[y,this,e,f]),f.veto)return s("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var w=t.param(y,g);m&&(w=w?w+"&"+m:m),"GET"===e.type.toUpperCase()?(e.url+=(e.url.indexOf("?")>=0?"&":"?")+w,e.data=null):e.data=w;var _=[];if(e.resetForm&&_.push(function(){p.resetForm()}),e.clearForm&&_.push(function(){p.clearForm(e.includeHidden)}),!e.dataType&&e.target){var x=e.success||function(){};_.push(function(i,s,n){var a=arguments,o=e.replaceTarget?"replaceWith":"html";t(e.target)[o](i).each(function(){x.apply(this,a)})})}else e.success&&(t.isArray(e.success)?t.merge(_,e.success):_.push(e.success));if(e.success=function(t,i,s){for(var n=e.context||this,a=0,o=_.length;a0,S="multipart/form-data",D=p.attr("enctype")===S||p.attr("encoding")===S,M=a.fileapi&&a.formdata;s("fileAPI :"+M);var P,F=(T||D)&&!M;!1!==e.iframe&&(e.iframe||F)?e.closeKeepAlive?t.get(e.closeKeepAlive,function(){P=h(y)}):P=h(y):P=(T||D)&&M?function(i){for(var s=new FormData,n=0;n0)&&(n={url:n,data:a,dataType:o},"function"==typeof r&&(n.success=r)),n=n||{},n.delegation=n.delegation&&t.isFunction(t.fn.on),!n.delegation&&0===this.length){var l={s:this.selector,c:this.context};return!t.isReady&&l.s?(s("DOM not ready, queuing ajaxForm"),t(function(){t(l.s,l.c).ajaxForm(n)}),this):(s("terminating; zero elements found by selector"+(t.isReady?"":" (DOM not ready)")),this)}return n.delegation?(t(document).off("submit.form-plugin",this.selector,e).off("click.form-plugin",this.selector,i).on("submit.form-plugin",this.selector,n,e).on("click.form-plugin",this.selector,n,i),this):this.ajaxFormUnbind().on("submit.form-plugin",n,e).on("click.form-plugin",n,i)},t.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},t.fn.formToArray=function(e,i,s){var n=[];if(0===this.length)return n;var o,r=this[0],l=this.attr("id"),h=e||void 0===r.elements?r.getElementsByTagName("*"):r.elements;if(h&&(h=t.makeArray(h)),l&&(e||/(Edge|Trident)\//.test(navigator.userAgent))&&(o=t(':input[form="'+l+'"]').get()).length&&(h=(h||[]).concat(o)),!h||!h.length)return n;t.isFunction(s)&&(h=t.map(h,s));var c,d,u,p,f,g,m;for(c=0,g=h.length;c'},add:{template:''},edit:{template:''},"delete":{template:''}};a.DEFAULTS={animate:null,initialState:"normal",toggleTemplate:''},a.prototype.add=function(e,i,s,n,a){var o,r=t(e),l=this.options;if(r.is("li")?(o=r.children("ul"),o.length||(o=t(""),r.append(o),this._initList(o,r))):o=r,o){var h=this;t.isArray(i)||(i=[i]),t.each(i,function(e,i){var s=t("").data(i).appendTo(o);void 0!==i.id&&s.attr("data-id",i.id);var n=l.itemWrapper?t(l.itemWrapper===!0?'':l.itemWrapper).appendTo(s):s;if(i.html)n.html(i.html);else if(t.isFunction(h.options.itemCreator)){var a=h.options.itemCreator(s,i);a!==!0&&a!==!1&&n.html(a)}else i.url?n.append(t("",{href:i.url}).text(i.title||i.name)):n.append(t("").text(i.title||i.name));h._initItem(s,i.idx||e,o,i),i.children&&i.children.length&&h.add(s,i.children)}),this._initList(o),s&&!o.hasClass("tree")&&h.expand(o.parent("li"),n,a)}},a.prototype.reload=function(e){var i=this;e&&(i.$.empty(),i.add(i.$,e)),i.isPreserve&&i.store.time&&i.$.find("li:not(.tree-action-item)").each(function(){var e=t(this);i[i.store[e.data("id")]?"expand":"collapse"](e,!0,!0)})},a.prototype._initList=function(s,n,a,o){var r=this;s.hasClass("tree")?(a=0,n=null):(n=(n||s.closest("li")).addClass("has-list"),n.find(".list-toggle").length||n.prepend(this.options.toggleTemplate),a=a||n.data("idx"));var l=s.attr("data-idx",a||0).children("li:not(.tree-action-item)").each(function(e){r._initItem(t(this),e+1,s)});1!==l.length||l.find("ul").length||l.addClass("tree-single-item"),o=o||(n?n.data():null);var h=e(o?o.actions:null,this.actions);if(h){if(h.add&&h.add.templateInList!==!1){var c=s.children("li.tree-action-item");c.length?c.detach().appendTo(s):t('').append(i(h.add,"add",h.add.templateInList)).appendTo(s)}h.sort&&s.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:s,target:t.target,item:o})}},h.sort.options,t.isPlainObject(this.options.sortable)?this.options.sortable:null))}n&&(n.hasClass("open")||o&&o.open)&&n.addClass("open in")},a.prototype._initItem=function(s,n,a,o){if(void 0===n){var r=s.prev("li");n=r.length?r.data("idx")+1:1}if(a=a||s.closest("ul"),s.attr("data-idx",n).removeClass("tree-single-item"),!s.data("id")){var l=n;a.hasClass("tree")||(l=a.parent("li").data("id")+"-"+l),s.attr("data-id",l)}o=o||s.data();var h=e(o.actions,this.actions);if(h){var c=s.find(".tree-actions");c.length||(c=t('').appendTo(this.options.itemWrapper?s.find(".tree-item-wrapper"):s),t.each(h,function(t,e){e&&c.append(i(e,t))}))}var d=s.children("ul");d.length&&this._initList(d,s,n,o)},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 o=i.initialState,r=t.zui&&t.zui.store&&t.zui.store.enable;r&&(this.selector=s+"::"+(i.name||"")+"#"+(this.$.attr("id")||n++),this.store=t.zui.store[i.name?"get":"pageGet"](this.selector,{})),"preserve"===o&&(r?this.isPreserve=!0:this.options.initialState=o="normal"),this.reload(i.data),r&&(this.isPreserve=!0),"expand"===o?this.expand():"collapse"===o&&this.collapse(),this.$.on("click",'.list-toggle,a[href="#"],.tree-toggle',function(e){var i=t(this),s=i.parent("li");a.callEvent("hit",{target:s,item:s.data()}),a.toggle(s),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 s=e.closest("li:not(.tree-action-item)");a.callEvent("action",{action:i,target:this,$item:s,item:s.data()})}})},a.prototype.preserve=function(e,i,s){if(this.isPreserve)if(e)i=i||e.data("id"),s=void 0===s&&e.hasClass("open"),s?this.store[i]=s:delete this.store[i],this.store.time=(new Date).getTime(),t.zui.store[this.options.name?"set":"pageSet"](this.selector,this.store);else{var n=this;this.store={},this.$.find("li").each(function(){n.preserve(t(this))})}},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,s){var n=this;e.each(function(){var e=t(this);if(n.expand(e,i,s),e)for(var a=e.parent("ul");a&&a.length&&!a.hasClass("tree");){var o=a.parent("li");o.length?(n.expand(o,i,s),a=o.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 s=this;return e.children("li:not(.tree-action-item)").map(function(){var e=t(this),n=e.data();delete n["zui.droppable"];var a=e.children("ul");return a.length&&(n.children=s.toData(a)),t.isFunction(i)?i(n,e):n}).get()},a.prototype.callEvent=function(e,i){var s;return t.isFunction(this.options[e])&&(s=this.options[e](i,this)),this.$.trigger(t.Event(e+"."+this.name,i)),s},t.fn.tree=function(e,i){return this.each(function(){var n=t(this),o=n.data(s),r="object"==typeof e&&e;o||n.data(s,o=new a(this,r)),"string"==typeof e&&o[e](i)})},t.fn.tree.Constructor=a,t(function(){t('[data-ride="tree"]').tree()})}(jQuery),function(t){"use strict";var e="zui.colorPicker",i='',s={zh_cn:{errorTip:"不是有效的颜色值"},zh_tw:{errorTip:"不是有效的顏色值"},en:{errorTip:"Not a valid color value"}},n=function(i,s){this.name=e,this.$=t(i),this.getOptions(s),this.init()};n.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"},n.prototype.init=function(){var e=this,s=e.options,n=e.$,a=n.parent(),o=!1;a.hasClass("colorpicker")?e.$picker=a:(e.$picker=t(s.template||i),o=!0),e.$picker.addClass(s.wrapper).find(".cp-title").toggle(void 0!==s.title).text(s.title),e.$menu=e.$picker.find(".dropdown-menu").toggleClass("pull-right",s.pullMenuRight),e.$btn=e.$picker.find(".btn.dropdown-toggle"),e.$btn.find(".ic").addClass("icon-"+s.icon),s.btnTip&&e.$picker.attr("data-toggle","tooltip").tooltip({title:s.btnTip,placement:s.tooltip,container:"body"}),n.attr("data-provide",null),o&&n.after(e.$picker),e.colors={},t.each(s.colors,function(i,s){if(t.zui.Color.isColor(s)){var n=new t.zui.Color(s);e.colors[n.toCssStr()]=n}}),e.updateColors(),e.$picker.on("click",".cp-tile",function(){e.setValue(t(this).data("color"))});var r=function(){var i=n.val(),a=t.zui.Color.isColor(i);n.parent().toggleClass("has-error",!(a||s.optional&&""===i)),a?e.setValue(i,!0):s.optional&&""===i?n.tooltip("hide"):n.is(":focus")||n.tooltip("show",s.errorTip)};n.is("input:not([type=hidden])")?(s.tooltip&&n.attr("data-toggle","tooltip").tooltip({trigger:"manual",placement:s.tooltip,tipClass:"tooltip-danger",container:"body"}),n.on("keyup paste input change",r)):n.appendTo(e.$picker),r()},n.prototype.addColor=function(e){e instanceof t.zui.Color||(e=new t.zui.Color(e));var i=e.toCssStr(),s=this.options;this.colors[i]||(this.colors[i]=e);var n=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:s.tileSize,height:s.tileSize}).append(n)),s.optional&&this.$menu.find(".cp-tile.empty").parent().detach().appendTo(this.$menu)},n.prototype.updateColors=function(e){var i=(this.$picker,this.$menu.children("li:not(.heading)").remove()),s=this.options,e=e||this.colors,n=this,a=0;if(t.each(e,function(t,e){n.addColor(e),a++}),s.optional){var o=t('').css({width:s.tileSize,height:s.tileSize});this.$menu.append(o),a++}i.css("width",Math.min(a,s.lineCount)*s.tileSize+6)},n.prototype.setValue=function(e,i){var s=this,n=s.options,a=s.$btn;s.$menu.find(".cp-tile.active").removeClass("active");var o="",r=n.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);o=h.toCssStr().toLowerCase(),r&&(t.isFunction(r)?r(o,a,s):a.css({background:o,color:h.contrast().toCssStr(),borderColor:h.luma()>.43?"#ccc":o})),s.colors[o]||s.addColor(h),i||s.$.val().toLowerCase()===o||s.$.val(o).trigger("change"),s.$menu.find('.cp-tile[data-color="'+o+'"]').addClass("active"),s.$.tooltip("hide"),s.$.trigger("colorchange",h)}else r&&(t.isFunction(r)?r(null,a,s):a.attr("style",null)),i||""===s.$.val()||s.$.val(o).trigger("change"),n.optional&&s.$.tooltip("hide"),s.$menu.find(".cp-tile.empty").addClass("active"),s.$.trigger("colorchange",null);n.updateBorder&&t(n.updateBorder).css("border-color",o),n.updateBackground&&t(n.updateBackground).css("background-color",o),n.updateColor&&t(n.updateColor).css("color",o),n.updateText&&t(n.updateText).text(o)},n.prototype.getOptions=function(e){var i=t.extend({},n.DEFAULTS,this.$.data(),e);"string"==typeof i.colors&&(i.colors=i.colors.split(","));var a=(i.lang||t.zui.clientLang()).toLowerCase();i.errorTip||(i.errorTip=s[a].errorTip),t.fn.tooltip||(i.btnTip=!1),this.options=i},t.fn.colorPicker=function(i){return this.each(function(){var s=t(this),a=s.data(e),o="object"==typeof i&&i;a||s.data(e,a=new n(this,o)),"string"==typeof i&&a[i]()})},t.fn.colorPicker.Constructor=n,t(function(){t('[data-provide="colorpicker"]').colorPicker()})}(jQuery),function(t,e){function i(t){return t===e&&(t=s+=2),n[t%n.length]}var s=0,n=["#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),s=e.data(),n=s.chart||"pie",a=t(s.target);if(a.length){var o=null;if("pie"===n){s=t.extend({scaleShowLabels:!0,scaleLabel:"<%=label%>: <%=value%>"},s);var r=[],l=e.find("tbody > tr").each(function(e){var s=t(this),n=i();s.attr("data-id",e).find(".chart-color-dot").css("background",n),r.push({label:s.find(".chart-label").text(),value:parseInt(s.find(".chart-value").text()),color:n,id:e})});r.length>1?s.scaleLabelPlacement="outside":1===r.length&&(s.scaleLabelPlacement="inside",r.push({label:"",value:r[0].value/2e3,color:"#fff",showLabel:!1})),o=a.pieChart(r,s),a.on("mousemove",function(t){var e=o.getSegmentsAtEvent(t);l.removeClass("active"),e.length&&l.filter('[data-id="'+e[0].id+'"]').addClass("active")})}else if("bar"===n){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&&(s.barValueSpacing=5),o=a.barChart(r,s)}else if("line"===n){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&&(s.barValueSpacing=5),o=a.lineChart(r,s)}null!==o&&e.data("zui.chart",o)}})},jQuery.fn.progressPie=function(i){t(this).each(function(){var s=t(this),n=s.is("canvas")?s:s.find("canvas"),a=t.extend({value:0,color:"#4CAF50",backColor:"#ddd",doughnut:!0,doughnutSize:85,width:20,height:20,showTip:!1,name:"",tipTemplate:"<%=value%>%",animation:!1},i,s.data()),o=n.length;o||(n=t("').append(a)),e.$menu.append(a),e.$menu.removeClass("loading")},error:function(){e.$menu.removeClass("loading").append('
")}},i.ajax))},s.prototype.scrollTo=function(t){t.length&&t[0].scrollIntoView({behavior:"smooth"})},s.prototype.getItems=function(){return this.$.find(this.options.selector)},s.prototype.getActiveItem=function(){return this.getItems().filter(".active:first")},s.prototype.search=function(e){var s=this,n=void 0===e||null===e||""===e,a=s.getItems().removeClass("active");if(n)a.removeClass("hidden");else{var o=t.trim(e).split(" ");a.each(function(){var e=t(this),s=e.text()+" "+(e.data("key")||e.data("filter"));e.toggleClass("hidden",!i(o,s))})}s.scrollTo(a.not(".hidden").first().addClass("active"))},s.DEFAULTS={selector:".list-group a",searchBox:".search-box",onSelectItem:null},t.fn.searchList=function(i){return this.each(function(){var n=t(this),a=n.data(e),o="object"==typeof i&&i;a||n.data(e,a=new s(this,o)),"string"==typeof i&&a[i]()})},s.NAME=e,t.fn.searchList.Constructor=s,t(function(){t('[data-ride="searchList"]').searchList()})}(jQuery),function(t){"use strict";var e="zui.labelSelector",i=function(s,n){var a=this;a.name=e;a.$=t(s);n=a.options=t.extend({},i.DEFAULTS,this.$.data(),n),a.$.hide(),a.update()};i.prototype.select=function(t){t+="",this.$wrapper.find(".label.active").removeClass("active"),""!==t&&"0"!==t&&this.$wrapper.find('.label[data-value="'+t+'"]').addClass("active"),this.$.val(t).trigger("change")},i.prototype.update=function(){var e=this,i=e.options,s=e.$wrapper;if(!s){if(i.wrapper)s=t(i.wrapper);else{var n=e.$.next();s=n.hasClass(".label-selector")?n:t('
')}s.parent().length||e.$.after(s),e.$wrapper=s,s.on("click",".label",function(){e.select(t(this).data("value"))})}s.empty();var a=e.$.val();e.$.children("option").each(function(){var e=t(this),n={label:e.text(),value:e.val()},o=t(i.labelTemplate||'
');i.labelCreator?o=i.labelCreator(o):(o.data("option",n).attr("data-value",n.value),""!==n.value&&"0"!==n.value||n.label?o.text(n.label).toggleClass("active",a===n.value):o.addClass("empty").append('
')),s.append(o)})},i.DEFAULTS={},t.fn.labelSelector=function(s){return this.each(function(){var n=t(this),a=n.data(e),o="object"==typeof s&&s;a||n.data(e,a=new i(this,o)),"string"==typeof s&&a[s]()})},i.NAME=e,t.fn.labelSelector.Constructor=i,t(function(){t('[data-provide="labelSelector"]').labelSelector()})}(jQuery),function(t){"use strict";var e="zui.fileInput";const i=t.BYTE_UNITS={B:1,KB:1024,MB:1048576,GB:1073741824,TB:1099511627776};var s=t.formatBytes=function(t,e,s){return void 0===e&&(e=2),s||(s=t