+ ', '', 'btn btn-icon btn-sm btn-info sidebar-toggle');?>
+
+
+ recPerPage}") : 'javascript:removeCookieByKey("storyModule")';
+ echo html::a($removeLink, "", '', "class='text-muted'");
+ }
+ ?>
+
+
moduleName, $this->methodName) as $menuItem):?>
hidden)) continue;?>
name, 'QUERY') === 0 ? 'bySearch' : $menuItem->name;?>
name, 'QUERY') === 0 ? '¶m=' . (int)substr($menuItem->name, 5) : '';?>
- name == 'my'):?>
+ name == 'more'):?>
";
- echo html::a('javascript:;', $menuItem->text . " ", '', "data-toggle='dropdown'");
+ echo '- inlink('browse', "productID=$productID&branch=$branch&browseType=$menuBrowseType" . $param), $menuItem->text);?>
+ inlink('browse', "productID=$productID&branch=$branch&browseType=$menuBrowseType" . $param), "$menuItem->text" . ($menuItem->name == 'allstory' ? ' ' . $allCount . '' : ''), '', "id='{$menuItem->name}Tab' class='btn btn-link" . ($this->session->storyBrowseType == $menuItem->name ? ' btn-active-text' : '') . "'");?>
- - product->searchStory;?>
-
- e.luma()){var n=e;e=t,t=n}return this.a<.5?t:(i=v(i)?.43:c(i),this.luma()0?t.a<1?"rgba("+t.r+","+t.g+","+t.b+","+t.a+")":t.hexStr():"transparent"},w.isColor=o,w.names=m,w.get=function(t){return new w(t)},t.zui({Color:w})}(jQuery,Math,window,void 0),/*!
* Chart.js 1.0.2
* Copyright 2015 Nick Downie
* Released under the MIT license
* http://chartjs.org/
*/
-function(t){"use strict";var e=t&&t.zui?t.zui:this,i=(e.Chart,function(t){this.canvas=t.canvas,this.ctx=t;var e=function(t,e){return t["offset"+e]?t["offset"+e]:document.defaultView.getComputedStyle(t).getPropertyValue(e)},i=this.width=e(t.canvas,"Width"),a=this.height=e(t.canvas,"Height");t.canvas.width=i,t.canvas.height=a;var i=this.width=t.canvas.width,a=this.height=t.canvas.height;return this.aspectRatio=this.width/this.height,n.retinaScale(this),this});i.defaults={global:{animation:!0,animationSteps:60,animationEasing:"easeOutQuart",showScale:!0,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleIntegersOnly:!0,scaleBeginAtZero:!1,scaleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",responsive:!1,maintainAspectRatio:!0,showTooltips:!0,customTooltips:!1,tooltipEvents:["mousemove","touchstart","touchmove","mouseout"],tooltipFillColor:"rgba(0,0,0,0.8)",tooltipFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipFontSize:14,tooltipFontStyle:"normal",tooltipFontColor:"#fff",tooltipTitleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipTitleFontSize:14,tooltipTitleFontStyle:"bold",tooltipTitleFontColor:"#fff",tooltipYPadding:6,tooltipXPadding:6,tooltipCaretSize:8,tooltipCornerRadius:6,tooltipXOffset:10,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>",multiTooltipTemplate:"<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>",multiTooltipKeyBackground:"#fff",onAnimationProgress:function(){},onAnimationComplete:function(){}}},i.types={};var n=i.helpers={},a=n.each=function(t,e,i){var n=Array.prototype.slice.call(arguments,3);if(t)if(t.length===+t.length){var a;for(a=0;a=0;n--){var a=t[n];if(e(a))return a}},n.inherits=function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},n=function(){this.constructor=i};return n.prototype=e.prototype,i.prototype=new n,i.extend=c,t&&s(i.prototype,t),i.__super__=e.prototype,i}),d=n.noop=function(){},h=n.uid=function(){var t=0;return function(){return"chart-"+t++}}(),u=n.warn=function(t){window.console&&"function"==typeof window.console.warn&&console.warn(t)},p=n.amd="function"==typeof define&&define.amd,f=n.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},g=n.max=function(t){return Math.max.apply(Math,t)},m=n.min=function(t){return Math.min.apply(Math,t)},v=(n.cap=function(t,e,i){if(f(e)){if(t>e)return e}else if(f(i)&&t=s,l=g(t),c=m(t);l===c&&(l+=.5,c>=.5&&!n?c-=.5:l+=.5);for(var d=Math.abs(l-c),h=b(d),u=Math.ceil(l/(1*Math.pow(10,h)))*Math.pow(10,h),p=n?0:Math.floor(c/(1*Math.pow(10,h)))*Math.pow(10,h),f=u-p,v=Math.pow(10,h),_=Math.round(f/v);(_>s||2*_s)v*=2,_=Math.round(f/v),_%1!==0&&(r=!0);else if(a&&h>=0){if(v/2%1!==0)break;v/=2,_=Math.round(f/v)}else v/=2,_=Math.round(f/v);return r&&(_=o,v=f/_),{steps:_,stepValue:v,min:p,max:p+_*v}},n.template=function(t,e){function i(t,e){var i=/\W/.test(t)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+t.replace(/[\r\t\n]/g," ").split("<%").join("\t").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("\t").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):n[t]=n[t];return e?i(e):i}if(t instanceof Function)return t(e);var n={};return i(t,e)}),k=(n.generateLabels=function(t,e,i,n){var o=new Array(e);return labelTemplateString&&a(o,function(e,a){o[a]=w(t,{value:i+n*(a+1)})}),o},n.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1==(t/=1)?1:(i||(i=.3),nn?i:n}),n},I=n.drawRoundedRectangle=function(t,e,i,n,a,o){t.beginPath(),t.moveTo(e+o,i),t.lineTo(e+n-o,i),t.quadraticCurveTo(e+n,i,e+n,i+o),t.lineTo(e+n,i+a-o),t.quadraticCurveTo(e+n,i+a,e+n-o,i+a),t.lineTo(e+o,i+a),t.quadraticCurveTo(e,i+a,e,i+a-o),t.lineTo(e,i+o),t.quadraticCurveTo(e,i,e+o,i),t.closePath()};i.instances={},i.Type=function(t,e,n){this.options=e,this.chart=n,this.id=h(),i.instances[this.id]=this,e.responsive&&this.resize(),this.initialize.call(this,t)},s(i.Type.prototype,{initialize:function(){return this},clear:function(){return P(this.chart),this},stop:function(){return C(this.animationFrame),this},resize:function(t){this.stop();var e=this.chart.canvas,i=D(this.chart.canvas),n=this.options.maintainAspectRatio?i/this.chart.aspectRatio:M(this.chart.canvas);return e.width=this.chart.width=i,e.height=this.chart.height=n,F(this.chart),"function"==typeof t&&t.apply(this,Array.prototype.slice.call(arguments,1)),this},reflow:d,render:function(t){return t&&this.reflow(),this.options.animation&&!t?n.animationLoop(this.draw,this.options.animationSteps,this.options.animationEasing,this.options.onAnimationProgress,this.options.onAnimationComplete,this):(this.draw(),this.options.onAnimationComplete.call(this)),this},generateLegend:function(){return w(this.options.legendTemplate,this)},destroy:function(){this.clear(),E(this,this.events);var t=this.chart.canvas;t.width=this.chart.width,t.height=this.chart.height,t.style.removeProperty?(t.style.removeProperty("width"),t.style.removeProperty("height")):(t.style.removeAttribute("width"),t.style.removeAttribute("height")),delete i.instances[this.id]},showTooltip:function(t,e){"undefined"==typeof this.activeElements&&(this.activeElements=[]);var o=function(t){var e=!1;return t.length!==this.activeElements.length?e=!0:(a(t,function(t,i){t!==this.activeElements[i]&&(e=!0)},this),e)}.call(this,t);if(o||e){if(this.activeElements=t,this.draw(),this.options.customTooltips&&this.options.customTooltips(!1),t.length>0)if(this.datasets&&this.datasets.length>1){for(var s,r,c=this.datasets.length-1;c>=0&&(s=this.datasets[c].points||this.datasets[c].bars||this.datasets[c].segments,r=l(s,t[0]),r===-1);c--);var d=[],h=[],u=function(t){var e,i,a,o,s,l=[],c=[],u=[];return n.each(this.datasets,function(t){t.showTooltips!==!1&&(e=t.points||t.bars||t.segments,e[r]&&e[r].hasValue()&&l.push(e[r]))}),n.each(l,function(t){c.push(t.x),u.push(t.y),d.push(n.template(this.options.multiTooltipTemplate,t)),h.push({fill:t._saved.fillColor||t.fillColor,stroke:t._saved.strokeColor||t.strokeColor})},this),s=m(u),a=g(u),o=m(c),i=g(c),{x:o>this.chart.width/2?o:i,y:(s+a)/2}}.call(this,r);new i.MultiTooltip({x:u.x,y:u.y,xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,xOffset:this.options.tooltipXOffset,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,titleTextColor:this.options.tooltipTitleFontColor,titleFontFamily:this.options.tooltipTitleFontFamily,titleFontStyle:this.options.tooltipTitleFontStyle,titleFontSize:this.options.tooltipTitleFontSize,cornerRadius:this.options.tooltipCornerRadius,labels:d,legendColors:h,legendColorBackground:this.options.multiTooltipKeyBackground,title:t[0].label,chart:this.chart,ctx:this.chart.ctx,custom:this.options.customTooltips}).draw()}else a(t,function(t){var e=t.tooltipPosition();new i.Tooltip({x:Math.round(e.x),y:Math.round(e.y),xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,caretHeight:this.options.tooltipCaretSize,cornerRadius:this.options.tooltipCornerRadius,text:w(this.options.tooltipTemplate,t),chart:this.chart,custom:this.options.customTooltips}).draw()},this);return this}},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),i.Type.extend=function(t){var e=this,n=function(){return e.apply(this,arguments)};if(n.prototype=o(e.prototype),s(n.prototype,t),n.extend=i.Type.extend,t.name||e.prototype.name){var a=t.name||e.prototype.name,l=i.defaults[e.prototype.name]?o(i.defaults[e.prototype.name]):{};i.defaults[a]=s(l,t.defaults),i.types[a]=n,i.prototype[a]=function(t,e){var o=r(i.defaults.global,i.defaults[a],e||{});return new n(t,o,this)}}else u("Name not provided for this chart, so it hasn't been registered");return e},i.Element=function(t){s(this,t),this.initialize.apply(this,arguments),this.save()},s(i.Element.prototype,{initialize:function(){},restore:function(t){return t?a(t,function(t){this[t]=this._saved[t]},this):s(this,this._saved),this},save:function(){return this._saved=o(this),delete this._saved._saved,this},update:function(t){return a(t,function(t,e){this._saved[e]=this[e],this[e]=t},this),this},transition:function(t,e){return a(t,function(t,i){this[i]=(t-this._saved[i])*e+this._saved[i]},this),this},tooltipPosition:function(){return{x:this.x,y:this.y}},hasValue:function(){return f(this.value)}}),i.Element.extend=c,i.Point=i.Element.extend({display:!0,inRange:function(t,e){var i=this.hitDetectionRadius+this.radius;return Math.pow(t-this.x,2)+Math.pow(e-this.y,2)=this.startAngle&&i.angle<=this.endAngle,o=i.distance>=this.innerRadius&&i.distance<=this.outerRadius;return a&&o},tooltipPosition:function(){var t=this.startAngle+(this.endAngle-this.startAngle)/2,e=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{x:this.x+Math.cos(t)*e,y:this.y+Math.sin(t)*e}},draw:function(t){var e=this.ctx;e.beginPath(),e.arc(this.x,this.y,this.outerRadius,this.startAngle,this.endAngle),e.arc(this.x,this.y,this.innerRadius,this.endAngle,this.startAngle,!0),e.closePath(),e.strokeStyle=this.strokeColor,e.lineWidth=this.strokeWidth,e.fillStyle=this.fillColor,e.fill(),e.lineJoin="bevel",this.showStroke&&e.stroke()}}),i.Rectangle=i.Element.extend({draw:function(){var t=this.ctx,e=this.width/2,i=this.x-e,n=this.x+e,a=this.base-(this.base-this.y),o=this.strokeWidth/2;this.showStroke&&(i+=o,n-=o,a+=o),t.beginPath(),t.fillStyle=this.fillColor,t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.moveTo(i,this.base),t.lineTo(i,a),t.lineTo(n,a),t.lineTo(n,this.base),t.fill(),this.showStroke&&t.stroke()},height:function(){return this.base-this.y},inRange:function(t,e){return t>=this.x-this.width/2&&t<=this.x+this.width/2&&e>=this.y&&e<=this.base}}),i.Tooltip=i.Element.extend({draw:function(){var t=this.chart.ctx;t.font=A(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var e=this.caretPadding=2,i=t.measureText(this.text).width+2*this.xPadding,n=this.fontSize+2*this.yPadding,a=n+this.caretHeight+e;this.x+i/2>this.chart.width?this.xAlign="left":this.x-i/2<0&&(this.xAlign="right"),this.y-a<0&&(this.yAlign="below");var o=this.x-i/2,s=this.y-a;if(t.fillStyle=this.fillColor,this.custom)this.custom(this);else{switch(this.yAlign){case"above":t.beginPath(),t.moveTo(this.x,this.y-e),t.lineTo(this.x+this.caretHeight,this.y-(e+this.caretHeight)),t.lineTo(this.x-this.caretHeight,this.y-(e+this.caretHeight)),t.closePath(),t.fill();break;case"below":s=this.y+e+this.caretHeight,t.beginPath(),t.moveTo(this.x,this.y+e),t.lineTo(this.x+this.caretHeight,this.y+e+this.caretHeight),t.lineTo(this.x-this.caretHeight,this.y+e+this.caretHeight),t.closePath(),t.fill()}switch(this.xAlign){case"left":o=this.x-i+(this.cornerRadius+this.caretHeight);break;case"right":o=this.x-(this.cornerRadius+this.caretHeight)}I(t,o,s,i,n,this.cornerRadius),t.fill(),t.fillStyle=this.textColor,t.textAlign="center",t.textBaseline="middle",t.fillText(this.text,o+i/2,s+n/2)}}}),i.MultiTooltip=i.Element.extend({initialize:function(){this.font=A(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=A(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+2*this.yPadding+1.5*this.titleFontSize,this.ctx.font=this.titleFont;var t=this.ctx.measureText(this.title).width,e=U(this.ctx,this.font,this.labels)+this.fontSize+3,i=g([e,t]);this.width=i+2*this.xPadding;var n=this.height/2;this.y-n<0?this.y=n:this.y+n>this.chart.height&&(this.y=this.chart.height-n),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},getLineHeight:function(t){var e=this.y-this.height/2+this.yPadding,i=t-1;return 0===t?e+this.titleFontSize/2:e+(1.5*this.fontSize*i+this.fontSize/2)+1.5*this.titleFontSize},draw:function(){if(this.custom)this.custom(this);else{I(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var t=this.ctx;t.fillStyle=this.fillColor,t.fill(),t.closePath(),t.textAlign="left",t.textBaseline="middle",t.fillStyle=this.titleTextColor,t.font=this.titleFont,t.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),t.font=this.font,n.each(this.labels,function(e,i){t.fillStyle=this.textColor,t.fillText(e,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(i+1)),t.fillStyle=this.legendColorBackground,t.fillRect(this.x+this.xPadding,this.getLineHeight(i+1)-this.fontSize/2,this.fontSize,this.fontSize),t.fillStyle=this.legendColors[i].fill,t.fillRect(this.x+this.xPadding,this.getLineHeight(i+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}}),i.Scale=i.Element.extend({initialize:function(){this.fit()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),e=0;e<=this.steps;e++)this.yLabels.push(w(this.templateString,{value:(this.min+e*this.stepValue).toFixed(t)}));this.yLabelWidth=this.display&&this.showLabels?U(this.ctx,this.font,this.yLabels):0},addXLabel:function(t){this.xLabels.push(t),this.valuesCount++,this.fit()},removeXLabel:function(){this.xLabels.shift(),this.valuesCount--,this.fit()},fit:function(){this.startPoint=this.display?this.fontSize:0,this.endPoint=this.display?this.height-1.5*this.fontSize-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var t,e=this.endPoint-this.startPoint;for(this.calculateYRange(e),this.buildYLabels(),this.calculateXLabelRotation();e>this.endPoint-this.startPoint;)e=this.endPoint-this.startPoint,t=this.yLabelWidth,this.calculateYRange(e),this.buildYLabels(),tthis.yLabelWidth+10?i/2:this.yLabelWidth+10,this.xLabelRotation=0,this.display){var a,o=U(this.ctx,this.font,this.xLabels);this.xLabelWidth=o;for(var s=Math.floor(this.calculateX(1)-this.calculateX(0))-6;this.xLabelWidth>s&&0===this.xLabelRotation||this.xLabelWidth>s&&this.xLabelRotation<=90&&this.xLabelRotation>0;)a=Math.cos(_(this.xLabelRotation)),t=a*i,e=a*n,t+this.fontSize/2>this.yLabelWidth+8&&(this.xScalePaddingLeft=t+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2,this.xLabelRotation++,this.xLabelWidth=a*o;this.xLabelRotation>0&&(this.endPoint-=Math.sin(_(this.xLabelRotation))*o+3)}else this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding},calculateYRange:d,drawingArea:function(){return this.startPoint-this.endPoint},calculateY:function(t){var e=this.drawingArea()/(this.min-this.max);return this.endPoint-e*(t-this.min)},calculateX:function(t){var e=(this.xLabelRotation>0,this.width-(this.xScalePaddingLeft+this.xScalePaddingRight)),i=e/Math.max(this.valuesCount-(this.offsetGridLines?0:1),1),n=i*t+this.xScalePaddingLeft;return this.offsetGridLines&&(n+=i/2),Math.round(n)},update:function(t){n.extend(this,t),this.fit()},draw:function(){var t=this.ctx,e=(this.endPoint-this.startPoint)/this.steps,i=Math.round(this.xScalePaddingLeft);if(this.display){t.fillStyle=this.textColor,t.font=this.font;var o=this.showBeyondLine?5:0;a(this.yLabels,function(a,s){var r=this.endPoint-e*s,l=Math.round(r),c=this.showHorizontalLines;t.textAlign="right",t.textBaseline="middle",this.showLabels&&t.fillText(a,i-10,r),0!==s||c||(c=!0),c&&t.beginPath(),s>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),l+=n.aliasPixel(t.lineWidth),c&&(t.moveTo(i,l),t.lineTo(this.width,l),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(i-o,l),t.lineTo(i,l),t.stroke(),t.closePath()},this),a(this.xLabels,function(e,i){var n=this.calculateX(i)+y(this.lineWidth),a=this.calculateX(i-(this.offsetGridLines?.5:0))+y(this.lineWidth),s=this.xLabelRotation>0,r=this.showVerticalLines;0!==i||r||(r=!0),r&&t.beginPath(),i>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),r&&(t.moveTo(a,this.endPoint),t.lineTo(a,this.startPoint-3),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(a,this.endPoint),t.lineTo(a,this.endPoint+o),t.stroke(),t.closePath(),t.save(),t.translate(n,s?this.endPoint+12:this.endPoint+8),t.rotate(_(this.xLabelRotation)*-1),t.font=this.font,t.textAlign=s?"right":"center",t.textBaseline=s?"middle":"top",t.fillText(e,0,0),t.restore()},this)}}}),i.RadialScale=i.Element.extend({initialize:function(){this.size=m([this.height,this.width]),this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2},calculateCenterOffset:function(t){var e=this.drawingArea/(this.max-this.min);return(t-this.min)*e},update:function(){this.lineArc?this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),e=0;e<=this.steps;e++)this.yLabels.push(w(this.templateString,{value:(this.min+e*this.stepValue).toFixed(t)}))},getCircumference:function(){return 2*Math.PI/this.valuesCount},setScaleSize:function(){var t,e,i,n,a,o,s,r,l,c,d,h,u=m([this.height/2-this.pointLabelFontSize-5,this.width/2]),p=this.width,g=0;for(this.ctx.font=A(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),e=0;ep&&(p=t.x+n,a=e),t.x-np&&(p=t.x+i,a=e):e>this.valuesCount/2&&t.x-i0){var n,a=i*(this.drawingArea/this.steps),o=this.yCenter-a;if(this.lineWidth>0)if(t.strokeStyle=this.lineColor,t.lineWidth=this.lineWidth,this.lineArc)t.beginPath(),t.arc(this.xCenter,this.yCenter,a,0,2*Math.PI),t.closePath(),t.stroke();else{t.beginPath();for(var s=0;s=0;e--){if(this.angleLineWidth>0){var i=this.getPointPosition(e,this.calculateCenterOffset(this.max));t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(i.x,i.y),t.stroke(),t.closePath()}var n=this.getPointPosition(e,this.calculateCenterOffset(this.max)+5);t.font=A(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),t.fillStyle=this.pointLabelFontColor;var o=this.labels.length,s=this.labels.length/2,r=s/2,l=eo-r,c=e===r||e===o-r;0===e?t.textAlign="center":e===s?t.textAlign="center":e<% for (var i=0; i- <%if(datasets[i].label){%><%=datasets[i].label%><%}%>
<%}%>'};i.Type.extend({name:"Line",defaults:a,initialize:function(e){this.PointClass=i.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx,inRange:function(t){return Math.pow(t-this.x,2)",scaleIntegersOnly:!0,scaleBeginAtZero:!1,scaleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",responsive:!1,maintainAspectRatio:!0,showTooltips:!0,customTooltips:!1,tooltipEvents:["mousemove","touchstart","touchmove","mouseout"],tooltipFillColor:"rgba(0,0,0,0.8)",tooltipFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipFontSize:14,tooltipFontStyle:"normal",tooltipFontColor:"#fff",tooltipTitleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipTitleFontSize:14,tooltipTitleFontStyle:"bold",tooltipTitleFontColor:"#fff",tooltipYPadding:6,tooltipXPadding:6,tooltipCaretSize:8,tooltipCornerRadius:6,tooltipXOffset:10,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>",multiTooltipTemplate:"<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>",multiTooltipKeyBackground:"#fff",onAnimationProgress:function(){},onAnimationComplete:function(){}}},i.types={};var n=i.helpers={},a=n.each=function(t,e,i){var n=Array.prototype.slice.call(arguments,3);if(t)if(t.length===+t.length){var a;for(a=0;a=0;n--){var a=t[n];if(e(a))return a}},n.inherits=function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},n=function(){this.constructor=i};return n.prototype=e.prototype,i.prototype=new n,i.extend=c,t&&s(i.prototype,t),i.__super__=e.prototype,i}),d=n.noop=function(){},h=n.uid=function(){var t=0;return function(){return"chart-"+t++}}(),u=n.warn=function(t){window.console&&"function"==typeof window.console.warn&&console.warn(t)},p=n.amd="function"==typeof define&&define.amd,f=n.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},g=n.max=function(t){return Math.max.apply(Math,t)},m=n.min=function(t){return Math.min.apply(Math,t)},v=(n.cap=function(t,e,i){if(f(e)){if(t>e)return e}else if(f(i)&&t=s,l=g(t),c=m(t);l===c&&(l+=.5,c>=.5&&!n?c-=.5:l+=.5);for(var d=Math.abs(l-c),h=b(d),u=Math.ceil(l/(1*Math.pow(10,h)))*Math.pow(10,h),p=n?0:Math.floor(c/(1*Math.pow(10,h)))*Math.pow(10,h),f=u-p,v=Math.pow(10,h),_=Math.round(f/v);(_>s||2*_s)v*=2,_=Math.round(f/v),_%1!==0&&(r=!0);else if(a&&h>=0){if(v/2%1!==0)break;v/=2,_=Math.round(f/v)}else v/=2,_=Math.round(f/v);return r&&(_=o,v=f/_),{steps:_,stepValue:v,min:p,max:p+_*v}},n.template=function(t,e){function i(t,e){var i=/\W/.test(t)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+t.replace(/[\r\t\n]/g," ").split("<%").join("\t").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("\t").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):n[t]=n[t];return e?i(e):i}if(t instanceof Function)return t(e);var n={};return i(t,e)}),k=(n.generateLabels=function(t,e,i,n){var o=new Array(e);return labelTemplateString&&a(o,function(e,a){o[a]=w(t,{value:i+n*(a+1)})}),o},n.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1==(t/=1)?1:(i||(i=.3),nn?i:n}),n},I=n.drawRoundedRectangle=function(t,e,i,n,a,o){t.beginPath(),t.moveTo(e+o,i),t.lineTo(e+n-o,i),t.quadraticCurveTo(e+n,i,e+n,i+o),t.lineTo(e+n,i+a-o),t.quadraticCurveTo(e+n,i+a,e+n-o,i+a),t.lineTo(e+o,i+a),t.quadraticCurveTo(e,i+a,e,i+a-o),t.lineTo(e,i+o),t.quadraticCurveTo(e,i,e+o,i),t.closePath()};i.instances={},i.Type=function(t,e,n){this.options=e,this.chart=n,this.id=h(),i.instances[this.id]=this,e.responsive&&this.resize(),this.initialize.call(this,t)},s(i.Type.prototype,{initialize:function(){return this},clear:function(){return P(this.chart),this},stop:function(){return x(this.animationFrame),this},resize:function(t){this.stop();var e=this.chart.canvas,i=D(this.chart.canvas),n=this.options.maintainAspectRatio?i/this.chart.aspectRatio:M(this.chart.canvas);return e.width=this.chart.width=i,e.height=this.chart.height=n,F(this.chart),"function"==typeof t&&t.apply(this,Array.prototype.slice.call(arguments,1)),this},reflow:d,render:function(t){return t&&this.reflow(),this.options.animation&&!t?n.animationLoop(this.draw,this.options.animationSteps,this.options.animationEasing,this.options.onAnimationProgress,this.options.onAnimationComplete,this):(this.draw(),this.options.onAnimationComplete.call(this)),this},generateLegend:function(){return w(this.options.legendTemplate,this)},destroy:function(){this.clear(),E(this,this.events);var t=this.chart.canvas;t.width=this.chart.width,t.height=this.chart.height,t.style.removeProperty?(t.style.removeProperty("width"),t.style.removeProperty("height")):(t.style.removeAttribute("width"),t.style.removeAttribute("height")),delete i.instances[this.id]},showTooltip:function(t,e){"undefined"==typeof this.activeElements&&(this.activeElements=[]);var o=function(t){var e=!1;return t.length!==this.activeElements.length?e=!0:(a(t,function(t,i){t!==this.activeElements[i]&&(e=!0)},this),e)}.call(this,t);if(o||e){if(this.activeElements=t,this.draw(),this.options.customTooltips&&this.options.customTooltips(!1),t.length>0)if(this.datasets&&this.datasets.length>1){for(var s,r,c=this.datasets.length-1;c>=0&&(s=this.datasets[c].points||this.datasets[c].bars||this.datasets[c].segments,r=l(s,t[0]),r===-1);c--);var d=[],h=[],u=function(t){var e,i,a,o,s,l=[],c=[],u=[];return n.each(this.datasets,function(t){t.showTooltips!==!1&&(e=t.points||t.bars||t.segments,e[r]&&e[r].hasValue()&&l.push(e[r]))}),n.each(l,function(t){c.push(t.x),u.push(t.y),d.push(n.template(this.options.multiTooltipTemplate,t)),h.push({fill:t._saved.fillColor||t.fillColor,stroke:t._saved.strokeColor||t.strokeColor})},this),s=m(u),a=g(u),o=m(c),i=g(c),{x:o>this.chart.width/2?o:i,y:(s+a)/2}}.call(this,r);new i.MultiTooltip({x:u.x,y:u.y,xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,xOffset:this.options.tooltipXOffset,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,titleTextColor:this.options.tooltipTitleFontColor,titleFontFamily:this.options.tooltipTitleFontFamily,titleFontStyle:this.options.tooltipTitleFontStyle,titleFontSize:this.options.tooltipTitleFontSize,cornerRadius:this.options.tooltipCornerRadius,labels:d,legendColors:h,legendColorBackground:this.options.multiTooltipKeyBackground,title:t[0].label,chart:this.chart,ctx:this.chart.ctx,custom:this.options.customTooltips}).draw()}else a(t,function(t){var e=t.tooltipPosition();new i.Tooltip({x:Math.round(e.x),y:Math.round(e.y),xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,caretHeight:this.options.tooltipCaretSize,cornerRadius:this.options.tooltipCornerRadius,text:w(this.options.tooltipTemplate,t),chart:this.chart,custom:this.options.customTooltips}).draw()},this);return this}},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),i.Type.extend=function(t){var e=this,n=function(){return e.apply(this,arguments)};if(n.prototype=o(e.prototype),s(n.prototype,t),n.extend=i.Type.extend,t.name||e.prototype.name){var a=t.name||e.prototype.name,l=i.defaults[e.prototype.name]?o(i.defaults[e.prototype.name]):{};i.defaults[a]=s(l,t.defaults),i.types[a]=n,i.prototype[a]=function(t,e){var o=r(i.defaults.global,i.defaults[a],e||{});return new n(t,o,this)}}else u("Name not provided for this chart, so it hasn't been registered");return e},i.Element=function(t){s(this,t),this.initialize.apply(this,arguments),this.save()},s(i.Element.prototype,{initialize:function(){},restore:function(t){return t?a(t,function(t){this[t]=this._saved[t]},this):s(this,this._saved),this},save:function(){return this._saved=o(this),delete this._saved._saved,this},update:function(t){return a(t,function(t,e){this._saved[e]=this[e],this[e]=t},this),this},transition:function(t,e){return a(t,function(t,i){this[i]=(t-this._saved[i])*e+this._saved[i]},this),this},tooltipPosition:function(){return{x:this.x,y:this.y}},hasValue:function(){return f(this.value)}}),i.Element.extend=c,i.Point=i.Element.extend({display:!0,inRange:function(t,e){var i=this.hitDetectionRadius+this.radius;return Math.pow(t-this.x,2)+Math.pow(e-this.y,2)=this.startAngle&&i.angle<=this.endAngle,o=i.distance>=this.innerRadius&&i.distance<=this.outerRadius;return a&&o},tooltipPosition:function(){var t=this.startAngle+(this.endAngle-this.startAngle)/2,e=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{x:this.x+Math.cos(t)*e,y:this.y+Math.sin(t)*e}},draw:function(t){var e=this.ctx;e.beginPath(),e.arc(this.x,this.y,this.outerRadius,this.startAngle,this.endAngle),e.arc(this.x,this.y,this.innerRadius,this.endAngle,this.startAngle,!0),e.closePath(),e.strokeStyle=this.strokeColor,e.lineWidth=this.strokeWidth,e.fillStyle=this.fillColor,e.fill(),e.lineJoin="bevel",this.showStroke&&e.stroke()}}),i.Rectangle=i.Element.extend({draw:function(){var t=this.ctx,e=this.width/2,i=this.x-e,n=this.x+e,a=this.base-(this.base-this.y),o=this.strokeWidth/2;this.showStroke&&(i+=o,n-=o,a+=o),t.beginPath(),t.fillStyle=this.fillColor,t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.moveTo(i,this.base),t.lineTo(i,a),t.lineTo(n,a),t.lineTo(n,this.base),t.fill(),this.showStroke&&t.stroke()},height:function(){return this.base-this.y},inRange:function(t,e){return t>=this.x-this.width/2&&t<=this.x+this.width/2&&e>=this.y&&e<=this.base}}),i.Tooltip=i.Element.extend({draw:function(){var t=this.chart.ctx;t.font=A(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var e=this.caretPadding=2,i=t.measureText(this.text).width+2*this.xPadding,n=this.fontSize+2*this.yPadding,a=n+this.caretHeight+e;this.x+i/2>this.chart.width?this.xAlign="left":this.x-i/2<0&&(this.xAlign="right"),this.y-a<0&&(this.yAlign="below");var o=this.x-i/2,s=this.y-a;if(t.fillStyle=this.fillColor,this.custom)this.custom(this);else{switch(this.yAlign){case"above":t.beginPath(),t.moveTo(this.x,this.y-e),t.lineTo(this.x+this.caretHeight,this.y-(e+this.caretHeight)),t.lineTo(this.x-this.caretHeight,this.y-(e+this.caretHeight)),t.closePath(),t.fill();break;case"below":s=this.y+e+this.caretHeight,t.beginPath(),t.moveTo(this.x,this.y+e),t.lineTo(this.x+this.caretHeight,this.y+e+this.caretHeight),t.lineTo(this.x-this.caretHeight,this.y+e+this.caretHeight),t.closePath(),t.fill()}switch(this.xAlign){case"left":o=this.x-i+(this.cornerRadius+this.caretHeight);break;case"right":o=this.x-(this.cornerRadius+this.caretHeight)}I(t,o,s,i,n,this.cornerRadius),t.fill(),t.fillStyle=this.textColor,t.textAlign="center",t.textBaseline="middle",t.fillText(this.text,o+i/2,s+n/2)}}}),i.MultiTooltip=i.Element.extend({initialize:function(){this.font=A(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=A(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+2*this.yPadding+1.5*this.titleFontSize,this.ctx.font=this.titleFont;var t=this.ctx.measureText(this.title).width,e=U(this.ctx,this.font,this.labels)+this.fontSize+3,i=g([e,t]);this.width=i+2*this.xPadding;var n=this.height/2;this.y-n<0?this.y=n:this.y+n>this.chart.height&&(this.y=this.chart.height-n),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},getLineHeight:function(t){var e=this.y-this.height/2+this.yPadding,i=t-1;return 0===t?e+this.titleFontSize/2:e+(1.5*this.fontSize*i+this.fontSize/2)+1.5*this.titleFontSize},draw:function(){if(this.custom)this.custom(this);else{I(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var t=this.ctx;t.fillStyle=this.fillColor,t.fill(),t.closePath(),t.textAlign="left",t.textBaseline="middle",t.fillStyle=this.titleTextColor,t.font=this.titleFont,t.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),t.font=this.font,n.each(this.labels,function(e,i){t.fillStyle=this.textColor,t.fillText(e,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(i+1)),t.fillStyle=this.legendColorBackground,t.fillRect(this.x+this.xPadding,this.getLineHeight(i+1)-this.fontSize/2,this.fontSize,this.fontSize),t.fillStyle=this.legendColors[i].fill,t.fillRect(this.x+this.xPadding,this.getLineHeight(i+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}}),i.Scale=i.Element.extend({initialize:function(){this.fit()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),e=0;e<=this.steps;e++)this.yLabels.push(w(this.templateString,{value:(this.min+e*this.stepValue).toFixed(t)}));this.yLabelWidth=this.display&&this.showLabels?U(this.ctx,this.font,this.yLabels):0},addXLabel:function(t){this.xLabels.push(t),this.valuesCount++,this.fit()},removeXLabel:function(){this.xLabels.shift(),this.valuesCount--,this.fit()},fit:function(){this.startPoint=this.display?this.fontSize:0,this.endPoint=this.display?this.height-1.5*this.fontSize-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var t,e=this.endPoint-this.startPoint;for(this.calculateYRange(e),this.buildYLabels(),this.calculateXLabelRotation();e>this.endPoint-this.startPoint;)e=this.endPoint-this.startPoint,t=this.yLabelWidth,this.calculateYRange(e),this.buildYLabels(),tthis.yLabelWidth+10?i/2:this.yLabelWidth+10,this.xLabelRotation=0,this.display){var a,o=U(this.ctx,this.font,this.xLabels);this.xLabelWidth=o;for(var s=Math.floor(this.calculateX(1)-this.calculateX(0))-6;this.xLabelWidth>s&&0===this.xLabelRotation||this.xLabelWidth>s&&this.xLabelRotation<=90&&this.xLabelRotation>0;)a=Math.cos(_(this.xLabelRotation)),t=a*i,e=a*n,t+this.fontSize/2>this.yLabelWidth+8&&(this.xScalePaddingLeft=t+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2,this.xLabelRotation++,this.xLabelWidth=a*o;this.xLabelRotation>0&&(this.endPoint-=Math.sin(_(this.xLabelRotation))*o+3)}else this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding},calculateYRange:d,drawingArea:function(){return this.startPoint-this.endPoint},calculateY:function(t){var e=this.drawingArea()/(this.min-this.max);return this.endPoint-e*(t-this.min)},calculateX:function(t){var e=(this.xLabelRotation>0,this.width-(this.xScalePaddingLeft+this.xScalePaddingRight)),i=e/Math.max(this.valuesCount-(this.offsetGridLines?0:1),1),n=i*t+this.xScalePaddingLeft;return this.offsetGridLines&&(n+=i/2),Math.round(n)},update:function(t){n.extend(this,t),this.fit()},draw:function(){var t=this.ctx,e=(this.endPoint-this.startPoint)/this.steps,i=Math.round(this.xScalePaddingLeft);if(this.display){t.fillStyle=this.textColor,t.font=this.font;var o=this.showBeyondLine?5:0;a(this.yLabels,function(a,s){var r=this.endPoint-e*s,l=Math.round(r),c=this.showHorizontalLines;t.textAlign="right",t.textBaseline="middle",this.showLabels&&t.fillText(a,i-10,r),0!==s||c||(c=!0),c&&t.beginPath(),s>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),l+=n.aliasPixel(t.lineWidth),c&&(t.moveTo(i,l),t.lineTo(this.width,l),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(i-o,l),t.lineTo(i,l),t.stroke(),t.closePath()},this),a(this.xLabels,function(e,i){var n=this.calculateX(i)+y(this.lineWidth),a=this.calculateX(i-(this.offsetGridLines?.5:0))+y(this.lineWidth),s=this.xLabelRotation>0,r=this.showVerticalLines;0!==i||r||(r=!0),r&&t.beginPath(),i>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),r&&(t.moveTo(a,this.endPoint),t.lineTo(a,this.startPoint-3),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(a,this.endPoint),t.lineTo(a,this.endPoint+o),t.stroke(),t.closePath(),t.save(),t.translate(n,s?this.endPoint+12:this.endPoint+8),t.rotate(_(this.xLabelRotation)*-1),t.font=this.font,t.textAlign=s?"right":"center",t.textBaseline=s?"middle":"top",t.fillText(e,0,0),t.restore()},this)}}}),i.RadialScale=i.Element.extend({initialize:function(){this.size=m([this.height,this.width]),this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2},calculateCenterOffset:function(t){var e=this.drawingArea/(this.max-this.min);return(t-this.min)*e},update:function(){this.lineArc?this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),e=0;e<=this.steps;e++)this.yLabels.push(w(this.templateString,{value:(this.min+e*this.stepValue).toFixed(t)}))},getCircumference:function(){return 2*Math.PI/this.valuesCount},setScaleSize:function(){var t,e,i,n,a,o,s,r,l,c,d,h,u=m([this.height/2-this.pointLabelFontSize-5,this.width/2]),p=this.width,g=0;for(this.ctx.font=A(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),e=0;ep&&(p=t.x+n,a=e),t.x-np&&(p=t.x+i,a=e):e>this.valuesCount/2&&t.x-i0){var n,a=i*(this.drawingArea/this.steps),o=this.yCenter-a;if(this.lineWidth>0)if(t.strokeStyle=this.lineColor,t.lineWidth=this.lineWidth,this.lineArc)t.beginPath(),t.arc(this.xCenter,this.yCenter,a,0,2*Math.PI),t.closePath(),t.stroke();else{t.beginPath();for(var s=0;s=0;e--){if(this.angleLineWidth>0){var i=this.getPointPosition(e,this.calculateCenterOffset(this.max));t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(i.x,i.y),t.stroke(),t.closePath()}var n=this.getPointPosition(e,this.calculateCenterOffset(this.max)+5);t.font=A(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),t.fillStyle=this.pointLabelFontColor;var o=this.labels.length,s=this.labels.length/2,r=s/2,l=eo-r,c=e===r||e===o-r;0===e?t.textAlign="center":e===s?t.textAlign="center":e<% for (var i=0; i- <%if(datasets[i].label){%><%=datasets[i].label%><%}%>
<%}%>'};i.Type.extend({name:"Line",defaults:a,initialize:function(e){this.PointClass=i.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx,inRange:function(t){return Math.pow(t-this.x,2)0&ðis.scale.endPoint?t.controlPoints.outer.y=this.scale.endPoint:t.controlPoints.outer.ythis.scale.endPoint?t.controlPoints.inner.y=this.scale.endPoint:t.controlPoints.inner.y0&&(i.lineTo(r[r.length-1].x,this.scale.endPoint),i.lineTo(r[0].x,this.scale.endPoint),i.fillStyle=t.fillColor,i.closePath(),i.fill()),n.each(r,function(t){t.draw()})},this)}}),t.fn.lineChart=function(e,n){var a=[];return this.each(function(){var o=t(this);a.push(new i(this.getContext("2d")).Line(e,t.extend(o.data(),n)))}),1===a.length?a[0]:a}}.call(this,jQuery),function(t){"use strict";var e=t&&t.zui?t.zui:this,i=e.Chart,n=i.helpers,a={segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:1,percentageInnerCutout:50,scaleShowLabels:!1,scaleLabel:"<%=value%>",scaleLabelPlacement:"auto",animationSteps:60,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'=0,g=l+u,m=c+p;h.textAlign=f?"left":"right",h.measureText(d).width,l=f?Math.max(u+e.outerRadius+10,l+30+u):Math.min(u-e.outerRadius-10,l-30+u);var v=o.scaleFontSize*(o.scaleLineHeight||1),_=Math.round((.8*c+p)/v)+1,y=(Math.floor(this.chart.width/v)+1,f?1:-1);if(a[_*y]&&(_>1?_--:_++),a[_*y])return;c=(_-1)*v+o.scaleFontSize/2,a[_*y]=!0,h.beginPath(),h.moveTo(g,m),h.lineTo(l,c),l=f?l+5:l-5,h.lineTo(l,c),h.strokeStyle=t.zui&&t.zui.Color?new t.zui.Color(e.fillColor).fade(40).toCssStr():e.fillColor,h.strokeWidth=o.scaleLineWidth,h.stroke(),h.fillStyle=e.fillColor}else l=.7*l+u,c=.7*c+p,h.fillStyle=t.zui&&t.zui.Color?new t.zui.Color(e.fillColor).contrast().toCssStr():"#fff";h.fillText(d,l,c)},draw:function(t){var e=t?t:1;this.clear();var i;if(n.each(this.segments,function(t,i){t.transition({circumference:this.calculateCircumference(t.value),outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout},e),t.endAngle=t.startAngle+t.circumference,t.draw(),0===i&&(t.startAngle=1.5*Math.PI),i<% for (var i=0; i- <%if(datasets[i].label){%><%=datasets[i].label%><%}%>
<%}%>'};i.Type.extend({name:"Bar",defaults:a,initialize:function(e){var a=this.options;this.ScaleClass=i.Scale.extend({offsetGridLines:!0,calculateBarX:function(t,e,i){var n=this.calculateBaseWidth(),o=this.calculateX(i)-n/2,s=this.calculateBarWidth(t);return o+s*e+e*a.barDatasetSpacing+s/2},calculateBaseWidth:function(){return this.calculateX(1)-this.calculateX(0)-2*a.barValueSpacing},calculateBarWidth:function(t){var e=this.calculateBaseWidth()-(t-1)*a.barDatasetSpacing;return e/t}}),this.datasets=[],this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(t){var e="mouseout"!==t.type?this.getBarsAtEvent(t):[];this.eachBars(function(t){t.restore(["fillColor","strokeColor"])}),n.each(e,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(e)}),this.BarClass=i.Rectangle.extend({strokeWidth:this.options.barStrokeWidth,showStroke:this.options.barShowStroke,ctx:this.chart.ctx}),n.each(e.datasets,function(i,a){if(t.zui&&t.zui.Color&&t.zui.Color.get){var o=t.zui.Color.get(i.color),s=o.toCssStr();i.fillColor||(i.fillColor=o.clone().fade(50).toCssStr()),i.strokeColor||(i.strokeColor=s)}var r={label:i.label||null,fillColor:i.fillColor,strokeColor:i.strokeColor,bars:[]};this.datasets.push(r),n.each(i.data,function(t,n){r.bars.push(new this.BarClass({value:t,label:e.labels[n],datasetLabel:i.label,strokeColor:i.strokeColor,fillColor:i.fillColor,highlightFill:i.highlightFill||i.fillColor,highlightStroke:i.highlightStroke||i.strokeColor}))},this)},this),this.buildScale(e.labels),this.BarClass.prototype.base=this.scale.endPoint,this.eachBars(function(t,e,i){n.extend(t,{width:this.scale.calculateBarWidth(this.datasets.length),x:this.scale.calculateBarX(this.datasets.length,i,e),y:this.scale.endPoint}),t.save()},this),this.render()},update:function(){this.scale.update(),n.each(this.activeElements,function(t){t.restore(["fillColor","strokeColor"])}),this.eachBars(function(t){t.save()}),this.render()},eachBars:function(t){n.each(this.datasets,function(e,i){n.each(e.bars,t,this,i)},this)},getBarsAtEvent:function(t){for(var e,i=[],a=n.getRelativePosition(t),o=function(t){i.push(t.bars[e])},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=a.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),a.formatDate(this.date,t,this.language,this.formatType)},setStartDate:function(t){this.startDate=t||-(1/0),this.startDate!==-(1/0)&&(this.startDate=a.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=a.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,n,a,o=e+10;this.component?(i=this.component.offset(),a=i.left,"bottom-left"!==this.pickerPosition&&"top-left"!==this.pickerPosition&&"auto-left"!==this.pickerPosition||(a+=this.component.outerWidth()-this.picker.outerWidth())):(i=this.element.offset(),a=i.left);var s=0===this.pickerPosition.indexOf("auto-"),r=s?(i.top+this.picker.outerHeight()>t(window).height()+t(window).scrollTop()?"top":"bottom")+(0===this.pickerPosition.lastIndexOf("-left")?"-left":"-right"):this.pickerPosition;n="top-left"===r||"top-right"===r?i.top-this.picker.outerHeight():i.top+this.height,this.picker.css({top:n,left:a,zIndex:o}).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=a.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'+n[this.language].daysMin[t++%7]+"";e+=" ",this.picker.find(".datetimepicker-days thead").append(e)},fillMonths:function(){for(var t="",e=0;e<12;)t+=''+n[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),o=i.getUTCFullYear(),s=i.getUTCMonth(),r=i.getUTCDate(),l=i.getUTCHours(),c=i.getUTCMinutes(),d=this.startDate!==-(1/0)?this.startDate.getUTCFullYear():-(1/0),h=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(n[this.language].months[s]+" "+o),"time"==this.formatViewType){var m=l%12?l%12:12,v=(m<10?"0":"")+m,_=(c<10?"0":"")+c,y=n[this.language].meridiem[l<12?0:1];this.picker.find(".datetimepicker-hours thead th:eq(1)").text(v+":"+_+" "+y.toUpperCase()),this.picker.find(".datetimepicker-minutes thead th:eq(1)").text(v+":"+_+" "+y.toUpperCase())}else this.picker.find(".datetimepicker-hours thead th:eq(1)").text(r+" "+n[this.language].months[s]+" "+o),this.picker.find(".datetimepicker-minutes thead th:eq(1)").text(r+" "+n[this.language].months[s]+" "+o);this.picker.find("tfoot th.today").text(n[this.language].today).toggle(this.todayBtn!==!1),this.updateNavArrows(),this.fillMonths();var b=e(o,s-1,28,0,0,0,0),w=a.getDaysInMonth(b.getUTCFullYear(),b.getUTCMonth());b.setUTCDate(w),b.setUTCDate(w-(b.getUTCDay()-this.weekStart+7)%7);var k=new Date(b);k.setUTCDate(k.getUTCDate()+42),k=k.valueOf();for(var x,C=[];b.valueOf()"),x="",b.getUTCFullYear()o||b.getUTCFullYear()==o&&b.getUTCMonth()>s)&&(x+=" new"),this.todayHighlight&&b.getUTCFullYear()==g.getFullYear()&&b.getUTCMonth()==g.getMonth()&&b.getUTCDate()==g.getDate()&&(x+=" today"),b.valueOf()==f&&(x+=" active"),(b.valueOf()+864e5<=this.startDate||b.valueOf()>this.endDate||t.inArray(b.getUTCDay(),this.daysOfWeekDisabled)!==-1)&&(x+=" disabled"),C.push(''+b.getUTCDate()+" "),b.getUTCDay()==this.weekEnd&&C.push(""),b.setUTCDate(b.getUTCDate()+1);this.picker.find(".datetimepicker-days tbody").empty().append(C.join("")),C=[];for(var T="",S="",E="",D=0;D<24;D++){var M=e(o,s,r,D);x="",M.valueOf()+36e5<=this.startDate||M.valueOf()>this.endDate?x+=" disabled":l==D&&(x+=" active"),this.showMeridian&&2==n[this.language].meridiem.length?(S=D<12?n[this.language].meridiem[0]:n[this.language].meridiem[1],S!=E&&(""!=E&&C.push(""),C.push('")):(T=D+":00",C.push(''+T+""))}this.picker.find(".datetimepicker-hours td").html(C.join("")),C=[],T="",S="",E="";for(var D=0;D<60;D+=this.minuteStep){var M=e(o,s,r,l,D,0);x="",M.valueOf()this.endDate?x+=" disabled":Math.floor(c/this.minuteStep)==Math.floor(D/this.minuteStep)&&(x+=" active"),this.showMeridian&&2==n[this.language].meridiem.length?(S=l<12?n[this.language].meridiem[0]:n[this.language].meridiem[1],S!=E&&(""!=E&&C.push(""),C.push('")):(T=D+":00",C.push(''+l+":"+(D<10?"0"+D:D)+""))}this.picker.find(".datetimepicker-minutes td").html(C.join(""));var F=this.date.getUTCFullYear(),P=this.picker.find(".datetimepicker-months").find("th:eq(1)").text(o).end().find("span").removeClass("active");F==o&&P.eq(this.date.getUTCMonth()).addClass("active"),(ou)&&P.addClass("disabled"),o==d&&P.slice(0,h).addClass("disabled"),o==u&&P.slice(p+1).addClass("disabled"),C="",o=10*parseInt(o/10,10);var A=this.picker.find(".datetimepicker-years").find("th:eq(1)").text(o+"-"+(o+9)).end().find("td");o-=1;for(var D=-1;D<11;D++)C+='u?" disabled":"")+'">'+o+"",o+=1;A.html(C),this.place()}},updateNavArrows:function(){var t=new Date(this.viewDate),e=t.getUTCFullYear(),i=t.getUTCMonth(),n=t.getUTCDate(),a=t.getUTCHours();switch(this.viewMode){case 0:this.startDate!==-(1/0)&&e<=this.startDate.getUTCFullYear()&&i<=this.startDate.getUTCMonth()&&n<=this.startDate.getUTCDate()&&a<=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()&&n>=this.endDate.getUTCDate()&&a>=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()&&n<=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()&&n>=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,n=i.wheelDelta,a=n>0?1:0===n?0:-1;this.wheelViewModeNavigationInverseDirection&&(a=-a),this.showMode(a),setTimeout(t.proxy(function(){this.wheelPause=!1},this),this.wheelViewModeNavigationDelay)}},click:function(i){i.stopPropagation(),i.preventDefault();var n=t(i.target).closest("span, td, th, legend");if(1==n.length){if(n.is(".disabled"))return void this.element.trigger({type:"outOfRange",date:this.viewDate,startDate:this.startDate,endDate:this.endDate});switch(n[0].nodeName.toLowerCase()){case"th":switch(n[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var o=a.modes[this.viewMode].navStep*("prev"==n[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveHour(this.viewDate,o);break;case 1:this.viewDate=this.moveDate(this.viewDate,o);break;case 2:this.viewDate=this.moveMonth(this.viewDate,o);break;case 3:case 4:this.viewDate=this.moveYear(this.viewDate,o)}this.fill();break;case"today":var s=new Date;s=e(s.getFullYear(),s.getMonth(),s.getDate(),s.getHours(),s.getMinutes(),s.getSeconds(),0),sthis.endDate&&(s=this.endDate),this.viewMode=this.startViewMode,this.showMode(0),this._setDate(s),this.fill(),this.autoclose&&this.hide()}break;case"span":if(!n.is(".disabled")){var r=this.viewDate.getUTCFullYear(),l=this.viewDate.getUTCMonth(),c=this.viewDate.getUTCDate(),d=this.viewDate.getUTCHours(),h=this.viewDate.getUTCMinutes(),u=this.viewDate.getUTCSeconds();if(n.is(".month")?(this.viewDate.setUTCDate(1),l=n.parent().find("span").index(n),c=this.viewDate.getUTCDate(),this.viewDate.setUTCMonth(l),this.element.trigger({type:"changeMonth",date:this.viewDate}),this.viewSelect>=3&&this._setDate(e(r,l,c,d,h,u,0))):n.is(".year")?(this.viewDate.setUTCDate(1),r=parseInt(n.text(),10)||0,this.viewDate.setUTCFullYear(r),this.element.trigger({type:"changeYear",date:this.viewDate}),this.viewSelect>=4&&this._setDate(e(r,l,c,d,h,u,0))):n.is(".hour")?(d=parseInt(n.text(),10)||0,(n.hasClass("hour_am")||n.hasClass("hour_pm"))&&(12==d&&n.hasClass("hour_am")?d=0:12!=d&&n.hasClass("hour_pm")&&(d+=12)),this.viewDate.setUTCHours(d),this.element.trigger({type:"changeHour",date:this.viewDate}),this.viewSelect>=1&&this._setDate(e(r,l,c,d,h,u,0))):n.is(".minute")&&(h=parseInt(n.text().substr(n.text().indexOf(":")+1),10)||0,this.viewDate.setUTCMinutes(h),this.element.trigger({type:"changeMinute",date:this.viewDate}),this.viewSelect>=0&&this._setDate(e(r,l,c,d,h,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(n.is(".day")&&!n.is(".disabled")){var c=parseInt(n.text(),10)||1,r=this.viewDate.getUTCFullYear(),l=this.viewDate.getUTCMonth(),d=this.viewDate.getUTCHours(),h=this.viewDate.getUTCMinutes(),u=this.viewDate.getUTCSeconds();n.is(".old")?0===l?(l=11,r-=1):l-=1:n.is(".new")&&(11==l?(l=0,r+=1):l+=1),this.viewDate.setUTCFullYear(r),this.viewDate.setUTCMonth(l,c),this.element.trigger({type:"changeDay",date:this.viewDate}),this.viewSelect>=2&&this._setDate(e(r,l,c,d,h,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,n,a=new Date(t.valueOf()),o=a.getUTCDate(),s=a.getUTCMonth(),r=Math.abs(e);if(e=e>0?1:-1,1==r)n=e==-1?function(){return a.getUTCMonth()==s}:function(){return a.getUTCMonth()!=i},i=s+e,a.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,n,a=!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),n=this.moveYear(this.viewDate,e)):3==viewMode?(i=this.moveMonth(this.date,e),n=this.moveMonth(this.viewDate,e)):2==viewMode?(i=this.moveDate(this.date,e),n=this.moveDate(this.viewDate,e)):1==viewMode?(i=this.moveHour(this.date,e),n=this.moveHour(this.viewDate,e)):0==viewMode&&(i=this.moveMinute(this.date,e),n=this.moveMinute(this.viewDate,e)),this.dateWithinRange(i)&&(this.date=i,this.viewDate=n,this.setValue(),this.update(),t.preventDefault(),a=!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),n=this.moveYear(this.viewDate,e)):3==viewMode?(i=this.moveMonth(this.date,e),n=this.moveMonth(this.viewDate,e)):2==viewMode?(i=this.moveDate(this.date,7*e),n=this.moveDate(this.viewDate,7*e)):1==viewMode?this.showMeridian?(i=this.moveHour(this.date,6*e),n=this.moveHour(this.viewDate,6*e)):(i=this.moveHour(this.date,4*e),n=this.moveHour(this.viewDate,4*e)):0==viewMode&&(i=this.moveMinute(this.date,4*e),n=this.moveMinute(this.viewDate,4*e)),this.dateWithinRange(i)&&(this.date=i,this.viewDate=n,this.setValue(),this.update(),t.preventDefault(),a=!0);break;case 13:if(0!=this.viewMode){var o=this.viewMode;this.showMode(-1),this.fill(),o==this.viewMode&&this.autoclose&&this.hide()}else this.fill(),this.autoclose&&this.hide();t.preventDefault();break;case 9:this.hide()}if(a){var s;this.isInput?s=this.element:this.component&&(s=this.element.find("input")),s&&s.change(),this.element.trigger({type:"changeDate",date:this.date})}},showMode:function(t){if(t){var e=Math.max(0,Math.min(a.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-"+a.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()},reset:function(t){this._setDate(null,"date")}},t.fn.datetimepicker=function(e){var n=Array.apply(null,arguments);return n.shift(),this.each(function(){var a=t(this),o=a.data("datetimepicker"),s="object"==typeof e&&e;o||a.data("datetimepicker",o=new i(this,t.extend({},t.fn.datetimepicker.defaults,a.data(),s))),"string"==typeof e&&"function"==typeof o[e]&&o[e].apply(o,n)})},t.fn.datetimepicker.defaults={pickerPosition:"auto-right"},t.fn.datetimepicker.Constructor=i;var n=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"}};n["zh-cn"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["周日","周一","周二","周三","周四","周五","周六","周日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今日",suffix:[],meridiem:[]},n["zh-tw"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["周日","周一","周二","周三","周四","周五","周六","周日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今天",suffix:[],meridiem:["上午","下午"]};var a={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,a.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"),n=t.match(this.validParts(e));if(!i||!i.length||!n||0==n.length)throw new Error("Invalid date format.");return{separators:i,parts:n}},parseDate:function(a,o,s,r){if(a instanceof Date){var l=new Date(a.valueOf()-6e4*a.getTimezoneOffset());return l.setMilliseconds(0),l}if(/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(a)&&(o=this.parseFormat("yyyy-mm-dd",r)),/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}$/.test(a)&&(o=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(a)&&(o=this.parseFormat("yyyy-mm-dd hh:ii:ss",r)),/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(a)){var c,d,h=/([-+]\d+)([dmwy])/,u=a.match(/([-+]\d+)([dmwy])/g);a=new Date;for(var p=0;p ',contTemplate:' ',footTemplate:' '};a.template=''+a.headTemplate+a.contTemplate+a.footTemplate+'
'+a.headTemplate+a.contTemplate+a.footTemplate+'
'+a.headTemplate+""+a.footTemplate+'
'+a.headTemplate+a.contTemplate+a.footTemplate+'
'+a.headTemplate+a.contTemplate+a.footTemplate+"
",t.fn.datetimepicker.DPGlobal=a,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 o=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 n?this.language:"en",this.isRTL=n[this.language].rtl||!1,this.formatType=i.formatType||this.element.data("format-type")||"standard",this.format=a.parseFormat(i.format||this.element.data("date-format")||n[this.language].format||a.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=a.parseFormat(i.linkFormat||this.element.data("link-format")||a.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=a.convertViewMode(this.minView),this.maxView=a.modes.length-1,"maxView"in i?this.maxView=i.maxView:"maxView"in this.element.data()&&(this.maxView=this.element.data("max-view")),this.maxView=a.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=a.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=a.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(a.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&&o.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")||n[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,n=0;n=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=a.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),a.formatDate(this.date,t,this.language,this.formatType)},setStartDate:function(t){this.startDate=t||-(1/0),this.startDate!==-(1/0)&&(this.startDate=a.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=a.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,n,a,o=e+10;this.component?(i=this.component.offset(),a=i.left,"bottom-left"!==this.pickerPosition&&"top-left"!==this.pickerPosition&&"auto-left"!==this.pickerPosition||(a+=this.component.outerWidth()-this.picker.outerWidth())):(i=this.element.offset(),a=i.left);var s=0===this.pickerPosition.indexOf("auto-"),r=s?(i.top+this.picker.outerHeight()>t(window).height()+t(window).scrollTop()?"top":"bottom")+(0===this.pickerPosition.lastIndexOf("-left")?"-left":"-right"):this.pickerPosition;n="top-left"===r||"top-right"===r?i.top-this.picker.outerHeight():i.top+this.height,this.picker.css({top:n,left:a,zIndex:o}).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=a.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'+n[this.language].daysMin[t++%7]+"";e+=" ",this.picker.find(".datetimepicker-days thead").append(e)},fillMonths:function(){for(var t="",e=0;e<12;)t+=''+n[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),o=i.getUTCFullYear(),s=i.getUTCMonth(),r=i.getUTCDate(),l=i.getUTCHours(),c=i.getUTCMinutes(),d=this.startDate!==-(1/0)?this.startDate.getUTCFullYear():-(1/0),h=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(n[this.language].months[s]+" "+o),"time"==this.formatViewType){var m=l%12?l%12:12,v=(m<10?"0":"")+m,_=(c<10?"0":"")+c,y=n[this.language].meridiem[l<12?0:1];this.picker.find(".datetimepicker-hours thead th:eq(1)").text(v+":"+_+" "+y.toUpperCase()),this.picker.find(".datetimepicker-minutes thead th:eq(1)").text(v+":"+_+" "+y.toUpperCase())}else this.picker.find(".datetimepicker-hours thead th:eq(1)").text(r+" "+n[this.language].months[s]+" "+o),this.picker.find(".datetimepicker-minutes thead th:eq(1)").text(r+" "+n[this.language].months[s]+" "+o);this.picker.find("tfoot th.today").text(n[this.language].today).toggle(this.todayBtn!==!1),this.updateNavArrows(),this.fillMonths();var b=e(o,s-1,28,0,0,0,0),w=a.getDaysInMonth(b.getUTCFullYear(),b.getUTCMonth());b.setUTCDate(w),b.setUTCDate(w-(b.getUTCDay()-this.weekStart+7)%7);var k=new Date(b);k.setUTCDate(k.getUTCDate()+42),k=k.valueOf();for(var C,x=[];b.valueOf()"),C="",b.getUTCFullYear()o||b.getUTCFullYear()==o&&b.getUTCMonth()>s)&&(C+=" new"),this.todayHighlight&&b.getUTCFullYear()==g.getFullYear()&&b.getUTCMonth()==g.getMonth()&&b.getUTCDate()==g.getDate()&&(C+=" today"),b.valueOf()==f&&(C+=" active"),(b.valueOf()+864e5<=this.startDate||b.valueOf()>this.endDate||t.inArray(b.getUTCDay(),this.daysOfWeekDisabled)!==-1)&&(C+=" disabled"),x.push(''+b.getUTCDate()+" "),b.getUTCDay()==this.weekEnd&&x.push(""),b.setUTCDate(b.getUTCDate()+1);this.picker.find(".datetimepicker-days tbody").empty().append(x.join("")),x=[];for(var T="",S="",E="",D=0;D<24;D++){var M=e(o,s,r,D);C="",M.valueOf()+36e5<=this.startDate||M.valueOf()>this.endDate?C+=" disabled":l==D&&(C+=" active"),this.showMeridian&&2==n[this.language].meridiem.length?(S=D<12?n[this.language].meridiem[0]:n[this.language].meridiem[1],S!=E&&(""!=E&&x.push(""),x.push('")):(T=D+":00",x.push(''+T+""))}this.picker.find(".datetimepicker-hours td").html(x.join("")),x=[],T="",S="",E="";for(var D=0;D<60;D+=this.minuteStep){var M=e(o,s,r,l,D,0);C="",M.valueOf()this.endDate?C+=" disabled":Math.floor(c/this.minuteStep)==Math.floor(D/this.minuteStep)&&(C+=" active"),this.showMeridian&&2==n[this.language].meridiem.length?(S=l<12?n[this.language].meridiem[0]:n[this.language].meridiem[1],S!=E&&(""!=E&&x.push(""),x.push('")):(T=D+":00",x.push(''+l+":"+(D<10?"0"+D:D)+""))}this.picker.find(".datetimepicker-minutes td").html(x.join(""));var F=this.date.getUTCFullYear(),P=this.picker.find(".datetimepicker-months").find("th:eq(1)").text(o).end().find("span").removeClass("active");F==o&&P.eq(this.date.getUTCMonth()).addClass("active"),(ou)&&P.addClass("disabled"),o==d&&P.slice(0,h).addClass("disabled"),o==u&&P.slice(p+1).addClass("disabled"),x="",o=10*parseInt(o/10,10);var A=this.picker.find(".datetimepicker-years").find("th:eq(1)").text(o+"-"+(o+9)).end().find("td");o-=1;for(var D=-1;D<11;D++)x+='u?" disabled":"")+'">'+o+"",o+=1;A.html(x),this.place()}},updateNavArrows:function(){var t=new Date(this.viewDate),e=t.getUTCFullYear(),i=t.getUTCMonth(),n=t.getUTCDate(),a=t.getUTCHours();switch(this.viewMode){case 0:this.startDate!==-(1/0)&&e<=this.startDate.getUTCFullYear()&&i<=this.startDate.getUTCMonth()&&n<=this.startDate.getUTCDate()&&a<=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()&&n>=this.endDate.getUTCDate()&&a>=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()&&n<=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()&&n>=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,n=i.wheelDelta,a=n>0?1:0===n?0:-1;this.wheelViewModeNavigationInverseDirection&&(a=-a),this.showMode(a),setTimeout(t.proxy(function(){this.wheelPause=!1},this),this.wheelViewModeNavigationDelay)}},click:function(i){i.stopPropagation(),i.preventDefault();var n=t(i.target).closest("span, td, th, legend");if(1==n.length){if(n.is(".disabled"))return void this.element.trigger({type:"outOfRange",date:this.viewDate,startDate:this.startDate,endDate:this.endDate});switch(n[0].nodeName.toLowerCase()){case"th":switch(n[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var o=a.modes[this.viewMode].navStep*("prev"==n[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveHour(this.viewDate,o);break;case 1:this.viewDate=this.moveDate(this.viewDate,o);break;case 2:this.viewDate=this.moveMonth(this.viewDate,o);break;case 3:case 4:this.viewDate=this.moveYear(this.viewDate,o)}this.fill();break;case"today":var s=new Date;s=e(s.getFullYear(),s.getMonth(),s.getDate(),s.getHours(),s.getMinutes(),s.getSeconds(),0),sthis.endDate&&(s=this.endDate),this.viewMode=this.startViewMode,this.showMode(0),this._setDate(s),this.fill(),this.autoclose&&this.hide()}break;case"span":if(!n.is(".disabled")){var r=this.viewDate.getUTCFullYear(),l=this.viewDate.getUTCMonth(),c=this.viewDate.getUTCDate(),d=this.viewDate.getUTCHours(),h=this.viewDate.getUTCMinutes(),u=this.viewDate.getUTCSeconds();if(n.is(".month")?(this.viewDate.setUTCDate(1),l=n.parent().find("span").index(n),c=this.viewDate.getUTCDate(),this.viewDate.setUTCMonth(l),this.element.trigger({type:"changeMonth",date:this.viewDate}),this.viewSelect>=3&&this._setDate(e(r,l,c,d,h,u,0))):n.is(".year")?(this.viewDate.setUTCDate(1),r=parseInt(n.text(),10)||0,this.viewDate.setUTCFullYear(r),this.element.trigger({type:"changeYear",date:this.viewDate}),this.viewSelect>=4&&this._setDate(e(r,l,c,d,h,u,0))):n.is(".hour")?(d=parseInt(n.text(),10)||0,(n.hasClass("hour_am")||n.hasClass("hour_pm"))&&(12==d&&n.hasClass("hour_am")?d=0:12!=d&&n.hasClass("hour_pm")&&(d+=12)),this.viewDate.setUTCHours(d),this.element.trigger({type:"changeHour",date:this.viewDate}),this.viewSelect>=1&&this._setDate(e(r,l,c,d,h,u,0))):n.is(".minute")&&(h=parseInt(n.text().substr(n.text().indexOf(":")+1),10)||0,this.viewDate.setUTCMinutes(h),this.element.trigger({type:"changeMinute",date:this.viewDate}),this.viewSelect>=0&&this._setDate(e(r,l,c,d,h,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(n.is(".day")&&!n.is(".disabled")){var c=parseInt(n.text(),10)||1,r=this.viewDate.getUTCFullYear(),l=this.viewDate.getUTCMonth(),d=this.viewDate.getUTCHours(),h=this.viewDate.getUTCMinutes(),u=this.viewDate.getUTCSeconds();n.is(".old")?0===l?(l=11,r-=1):l-=1:n.is(".new")&&(11==l?(l=0,r+=1):l+=1),this.viewDate.setUTCFullYear(r),this.viewDate.setUTCMonth(l,c),this.element.trigger({type:"changeDay",date:this.viewDate}),this.viewSelect>=2&&this._setDate(e(r,l,c,d,h,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,n,a=new Date(t.valueOf()),o=a.getUTCDate(),s=a.getUTCMonth(),r=Math.abs(e);if(e=e>0?1:-1,1==r)n=e==-1?function(){return a.getUTCMonth()==s}:function(){return a.getUTCMonth()!=i},i=s+e,a.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,n,a=!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),n=this.moveYear(this.viewDate,e)):3==viewMode?(i=this.moveMonth(this.date,e),n=this.moveMonth(this.viewDate,e)):2==viewMode?(i=this.moveDate(this.date,e),n=this.moveDate(this.viewDate,e)):1==viewMode?(i=this.moveHour(this.date,e),n=this.moveHour(this.viewDate,e)):0==viewMode&&(i=this.moveMinute(this.date,e),n=this.moveMinute(this.viewDate,e)),this.dateWithinRange(i)&&(this.date=i,this.viewDate=n,this.setValue(),this.update(),t.preventDefault(),a=!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),n=this.moveYear(this.viewDate,e)):3==viewMode?(i=this.moveMonth(this.date,e),n=this.moveMonth(this.viewDate,e)):2==viewMode?(i=this.moveDate(this.date,7*e),n=this.moveDate(this.viewDate,7*e)):1==viewMode?this.showMeridian?(i=this.moveHour(this.date,6*e),n=this.moveHour(this.viewDate,6*e)):(i=this.moveHour(this.date,4*e),n=this.moveHour(this.viewDate,4*e)):0==viewMode&&(i=this.moveMinute(this.date,4*e),n=this.moveMinute(this.viewDate,4*e)),this.dateWithinRange(i)&&(this.date=i,this.viewDate=n,this.setValue(),this.update(),t.preventDefault(),a=!0);break;case 13:if(0!=this.viewMode){var o=this.viewMode;this.showMode(-1),this.fill(),o==this.viewMode&&this.autoclose&&this.hide()}else this.fill(),this.autoclose&&this.hide();t.preventDefault();break;case 9:this.hide()}if(a){var s;this.isInput?s=this.element:this.component&&(s=this.element.find("input")),s&&s.change(),this.element.trigger({type:"changeDate",date:this.date})}},showMode:function(t){if(t){var e=Math.max(0,Math.min(a.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-"+a.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()},reset:function(t){this._setDate(null,"date")}},t.fn.datetimepicker=function(e){var n=Array.apply(null,arguments);return n.shift(),this.each(function(){var a=t(this),o=a.data("datetimepicker"),s="object"==typeof e&&e;o||a.data("datetimepicker",o=new i(this,t.extend({},t.fn.datetimepicker.defaults,a.data(),s))),"string"==typeof e&&"function"==typeof o[e]&&o[e].apply(o,n)})},t.fn.datetimepicker.defaults={pickerPosition:"auto-right"},t.fn.datetimepicker.Constructor=i;var n=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"}};n["zh-cn"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["周日","周一","周二","周三","周四","周五","周六","周日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今日",suffix:[],meridiem:[]},n["zh-tw"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["周日","周一","周二","周三","周四","周五","周六","周日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今天",suffix:[],meridiem:["上午","下午"]};var a={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,a.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"),n=t.match(this.validParts(e));if(!i||!i.length||!n||0==n.length)throw new Error("Invalid date format.");return{separators:i,parts:n}},parseDate:function(a,o,s,r){if(a instanceof Date){var l=new Date(a.valueOf()-6e4*a.getTimezoneOffset());return l.setMilliseconds(0),l}if(/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(a)&&(o=this.parseFormat("yyyy-mm-dd",r)),/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}$/.test(a)&&(o=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(a)&&(o=this.parseFormat("yyyy-mm-dd hh:ii:ss",r)),/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(a)){var c,d,h=/([-+]\d+)([dmwy])/,u=a.match(/([-+]\d+)([dmwy])/g);a=new Date;for(var p=0;p ',contTemplate:' ',footTemplate:' '};a.template=''+a.headTemplate+a.contTemplate+a.footTemplate+'
'+a.headTemplate+a.contTemplate+a.footTemplate+'
'+a.headTemplate+""+a.footTemplate+'
'+a.headTemplate+a.contTemplate+a.footTemplate+'
'+a.headTemplate+a.contTemplate+a.footTemplate+"
",t.fn.datetimepicker.DPGlobal=a,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,7 @@ Copyright (c) 2011 Harvest http://getharvest.com
MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
*/
-function(){var t,e,i,n,a,o={}.hasOwnProperty,s=function(t,e){function i(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);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"}};n=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,n,a,o,s,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," ")}),s=e.childNodes,r=[],a=0,o=s.length;a\"\'\`]/.test(t)?(e={"<":"<",">":">",'"':""","'":"'","`":"`"},i=/&(?!\w+;)|[\<\>\"\'\`]/g,t.replace(i,function(t){return e[t]||"&"})):t},e}(),n.select_to_array=function(t){var e,i,a,o,s;for(i=new n,s=t.childNodes,a=0,o=s.length;a0?(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,n,a;for(n=this.results_data,a=[],e=0,i=n.length;e"+i.search_text.substr(l+r.length),i.search_text=c.substr(0,l)+""+c.substr(l)):i.search_keys_match&&i.search_keys.length&&(l=i.search_keys.search(d),c=i.search_keys.substr(0,l+r.length)+""+i.search_keys.substr(l+r.length),i.search_text+=' '+c.substr(0,l)+""+c.substr(l)+""),null!=s&&(s.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(),o<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,n,a,o;if(e.test(t))return!0;if(this.enable_split_word_search&&(t.indexOf(" ")>=0||0===t.indexOf("["))&&(n=t.replace(/\[|\]/g,"").split(" "),n.length))for(a=0,o=n.length;a0)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(n){return e.browser_is_supported()?this.each(function(e){var a,o;a=t(this),o=a.data("chosen"),"destroy"===n&&o?o.destroy():o||a.data("chosen",new i(this,n))}):this}}),i=function(e){function i(){return a=i.__super__.constructor.apply(this,arguments)}return s(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 n=this.form_field.getAttribute("data-css-class");return n&&e.push(n),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=n.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,n,a,o,s,r,l=-1;t.length&&(this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass("highlighted"),a=parseInt(this.search_results.css("maxHeight"),10),r=this.result_highlight.outerHeight(),s=this.search_results.scrollTop(),o=a+s,n=this.result_highlight.position().top+this.search_results.scrollTop(),i=n+r,this.middle_highlight&&(e||"always"===this.middle_highlight||i>=o||n=o?l=i-a>0?i-a:0:n-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"),n=this.container.offset();n.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,n,a=this;return i=t("",{"class":"search-choice"}).html(""+e.html+""),e.disabled?i.addClass("search-choice-disabled"):(n=t("",{"class":"search-choice-close","data-option-array-index":e.array_index}),n.bind("click.chosen",function(t){return a.choice_destroy_link_click(t)}),i.append(n)),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,n,a,o,s,r,l,c;if(this.is_multiple){for(n=0,r=0,o="position:absolute; left: -1000px; top: -1000px; display:none;",s=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],l=0,c=s.length;l ",{style:o}),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,n){this.name=e,this.$=t(i),this.id=t.zui.uuid(),this.selectOrder=1,this.selections={},this.getOptions(n),this._init()},n=function(t,e,i){return t>=i.left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height},a=function(t,e){var i=Math.max(t.left,e.left),a=Math.max(t.top,e.top),o=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height);return n(i,a,t)&&n(o,s,t)&&n(i,a,e)&&n(o,s,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,n){var a,o,s=this.options.selector,r=this;if(void 0===e)return void this.$.find(s).each(function(){r.toggle(this,i)});if("object"==typeof e?(a=t(e).closest(s),o=a.data("id")):(o=e,a=r.$.find('.slectable-item[data-id="'+o+'"]')),a&&a.length){if(o||(o=t.zui.uuid(),a.attr("data-id",o)),void 0!==i&&null!==i||(i=!r.selections[o]),!!i!=!!r.selections[o]){var l;t.isFunction(n)&&(l=n(i)),l!==!0&&(r.selections[o]=!!i&&r.selectOrder++,r.callEvent(i?"select":"unselect",{id:o,selections:r.selections,target:a,selected:r.getSelectedArray()},r))}r.options.selectClass&&a.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,n,o,s,r,l,c=this.options,d=this,h=c.ignoreVal,u=!0,p="."+this.name+"."+this.id,f=t.isFunction(c.checkFunc)?c.checkFunc:null,g=t.isFunction(c.rangeFunc)?c.rangeFunc:null,m=!1,v=null,_="mousedown"+p,y=function(){o&&d.$children.each(function(){var e=t(this),i=e.offset();i.width=e.outerWidth(),i.height=e.outerHeight();var n=g?g.call(this,o,i):a(o,i);if(f){var s=f.call(d,{intersect:n,target:e,range:o,targetRange:i});s===!0?d.select(e):s===!1&&d.unselect(e)}else n?d.select(e):d.multiKey||d.unselect(e)})},b=function(a){m&&(s=a.pageX,r=a.pageY,o={width:Math.abs(s-e),height:Math.abs(r-i),left:s>e?e:s,top:r>i?i:r},u&&o.width
').css(t.extend({zIndex:1060,position:"absolute",top:e,left:i,pointerEvents:"none"},d.options.rangeStyle)).appendTo(t("body")))),n.css(o),clearTimeout(l),l=setTimeout(y,10),u=!1))},w=function(e){t(document).off(p),clearTimeout(v),m&&(m=!1,n&&n.remove(),u||o&&(clearTimeout(l),y(),o=null),d.callEvent("finish",{selections:d.selections,selected:d.getSelectedArray()}),e.preventDefault())},k=function(a){if(m)return w(a);var o=t.zui.getMouseButtonCode(c.mouseButton);if(!(o>-1&&a.button!==o||d.altKey||3===a.which||d.callEvent("start",a)===!1)){var s=d.$children=d.$.find(c.selector);s.addClass("slectable-item");var r=d.multiKey?"multi":c.clickBehavior;if("single"===r&&d.unselect(),c.listenClick&&("multi"===r?d.toggle(a.target):"single"===r?d.select(a.target):"toggle"===r&&d.toggle(a.target,null,function(t){d.unselect()})),d.callEvent("startDrag",a)===!1)return void d.callEvent("finish",{selections:d.selections,selected:d.getSelectedArray()});e=a.pageX,i=a.pageY,n=null,u=!0,m=!0,t(document).on("mousemove"+p,b).on("mouseup"+p,w),v=setTimeout(function(){t(document).on(_,w)},10),a.preventDefault()}},x=c.container&&"default"!==c.container?t(c.container):this.$;c.trigger?x.on(_,c.trigger,k):x.on(_,k),t(document).on("keydown",function(t){var e=t.keyCode;17===e||91==e?d.multiKey=e:18===e&&(d.altKey=!0)}).on("keyup",function(t){d.multiKey=!1,d.altKey=!1})},i.prototype.callEvent=function(e,i){var n=t.Event(e+"."+this.name);this.$.trigger(n,i);var a=n.result,o=this.options[e];return t.isFunction(o)&&(a=o.apply(this,t.isArray(i)?i:[i])),a},t.fn.selectable=function(n){return this.each(function(){var a=t(this),o=a.data(e),s="object"==typeof n&&n;o||a.data(e,o=new i(this,s)),"string"==typeof n&&o[n]()})},t.fn.selectable.Constructor=i,t(function(){t('[data-ride="selectable"]').selectable()})}(jQuery),/*!
+function(){var t,e,i,n,a,o={}.hasOwnProperty,s=function(t,e){function i(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);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"}};n=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,n,a,o,s,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," ")}),s=e.childNodes,r=[],a=0,o=s.length;a';
+ echo html::a('javascript:;', $menuItem->text . " ", '', "data-toggle='dropdown' class='btn btn-link'");
echo "
';
?>
- - ";
- foreach ($lang->product->mySelects as $key => $value)
+ foreach ($lang->product->moreSelects as $key => $value)
{
- echo '
- '; + echo '
- session->storyBrowseType ? " class='active'" : '') . '>'; echo html::a($this->inlink('browse', "productID=$productID&branch=$branch&browseType=$key" . $param), $value); } - echo '
-
-
-
-
-
-
+
+
+
-
+
+
-
- -
createLink('story', 'export', "productID=$productID&orderBy=$orderBy") : '#';
echo "
- " . html::a($link, $lang->story->export, '', $misc) . " "; ?> -
- createLink('tutorial', 'wizard', "module=story&method=create¶ms=$wizardParams"), "" . $lang->story->create, '', "class='create-story-btn btn btn-primary'");
- }
- else
- {
- $misc = common::hasPriv('story', 'create') ? "class='btn btn-primary'" : "class='btn btn-primary disabled'";
- $link = common::hasPriv('story', 'create') ? $this->createLink('story', 'create', "productID=$productID&branch=$branch&moduleID=$moduleID") : '#';
- echo html::a($link, "" . $lang->story->create, '', $misc);
- }
-
- $misc = common::hasPriv('story', 'batchCreate') ? '' : "disabled";
- $link = common::hasPriv('story', 'batchCreate') ? $this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID") : '#';
- ?>
-
-
+ createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID"), " {$lang->story->batchCreate}", '', "class='btn btn btn-secondary'");?>
+ createLink('tutorial', 'wizard', "module=story&method=create¶ms=$wizardParams");
+ echo html::a($link, " {$lang->story->create}", '', "class='btn btn-primary'");
+ }
+ else
+ {
+ $link = $this->createLink('story', 'create', "productID=$productID&branch=$branch&moduleID=$moduleID");
+ if(common::hasPriv('story', 'create')) echo html::a($link, " {$lang->story->create}", '', "class='btn btn-primary'");
+ }
+ ?>
-
- " . html::a($link, $lang->story->batchCreate, '', "class='$misc'") . "";?>
'>
-
- e.luma()){var n=e;e=t,t=n}return this.a<.5?t:(i=v(i)?.43:c(i),this.luma()0?t.a<1?"rgba("+t.r+","+t.g+","+t.b+","+t.a+")":t.hexStr():"transparent"},w.isColor=o,w.names=m,w.get=function(t){return new w(t)},t.zui({Color:w})}(jQuery,Math,window,void 0),function(t){"use strict";function e(e,i){if(e===!1)return e;if(!e)return i;e===!0?e={add:!0,"delete":!0,edit:!0,sort:!0}:"string"==typeof e&&(e=e.split(","));var n;return t.isArray(e)&&(n={},t.each(e,function(e,i){t.isPlainObject(i)?n[i.action]=i:n[i]=!0}),e=n),t.isPlainObject(e)&&(n={},t.each(e,function(e,i){i?n[e]=t.extend({type:e},s[e],t.isPlainObject(i)?i:null):n[e]=!1}),e=n),i?t.extend(!0,{},i,e):e}function i(e,i,n){return i=i||e.type,t(n||e.template).addClass("tree-action").attr(t.extend({"data-type":i,title:e.title||""},e.attr)).data("action",e)}var n="zui.tree",a=0,o=function(e,i){this.name=n,this.$=t(e),this.getOptions(i),this._init()},s={sort:{template:''},add:{template:''},edit:{template:''},"delete":{template:''}};o.DEFAULTS={animate:null,initialState:"normal",toggleTemplate:''},o.prototype.add=function(e,i,n,a,o){var s,r=t(e),l=this.options;if(r.is("li")?(s=r.children("ul"),s.length||(s=t("-1&&i.button!==n)){var f=t(this);T&&(F=S?f.closest(T):f),F.hasClass("drag-shadow")||y.before&&y.before({event:i,element:F})===!1||(P=!0,a=t.isFunction(y.target)?y.target(_):A.find(y.target),o=null,s=null,r=!1,l=!0,c=null,d=F.offset(),u=A.offset(),h={left:i.pageX,top:i.pageY},g=t.extend({},h),p={left:h.left-d.left,top:h.top-d.top},F.addClass("drag-from"),t(e).on(x,U).on(C,I),m=setTimeout(function(){t(e).on(k,I)},10),i.preventDefault())}};S?_.on(k,S,L):T?_.on(k,T,L):_.on(k,L)},s.prototype.destroy=function(){var i="."+n+"."+this.id;this.$.off(i),t(e).off(i),this.$.data(n,null)},s.prototype.reset=function(){this.destroy(),this.init()},t.fn.droppable=function(e){return this.each(function(){var i=t(this),a=i.data(n),o="object"==typeof e&&e;a||i.data(n,a=new s(this,o)),"string"==typeof e&&a[e]()})},t.fn.droppable.Constructor=s}(jQuery,document,Math),+function(t,e){"use strict";function i(e,i,o){return this.each(function(){var s=t(this),r=s.data(n),l=t.extend({},a.DEFAULTS,s.data(),"object"==typeof e&&e);r||s.data(n,r=new a(this,l)),"string"==typeof e?r[e](i,o):l.show&&r.show(i,o)})}var n="zui.modal",a=function(i,a){var o=this;o.options=a,o.$body=t(document.body),o.$element=t(i),o.$backdrop=o.isShown=null,o.scrollbarWidth=0,a.moveable===e&&(o.options.moveable=o.$element.hasClass("modal-moveable")),a.remote&&o.$element.find(".modal-content").load(a.remote,function(){o.$element.trigger("loaded."+n)})};a.VERSION="3.2.0",a.TRANSITION_DURATION=300,a.BACKDROP_TRANSITION_DURATION=150,a.DEFAULTS={backdrop:!0,keyboard:!0,show:!0,position:"fit"};var o=function(e,i){var n=t(window);i.left=Math.max(0,Math.min(i.left,n.width()-e.outerWidth())),i.top=Math.max(0,Math.min(i.top,n.height()-e.outerHeight())),e.css(i)};a.prototype.toggle=function(t,e){return this.isShown?this.hide():this.show(t,e)},a.prototype.ajustPosition=function(i){var a=this,s=a.options;if(i===e&&(i=s.position),i!==e){t.isFunction(i)&&(i=i(a));var r=a.$element.find(".modal-dialog"),l=Math.max(0,(t(window).height()-r.outerHeight())/2);if("fit"===i?i={marginTop:2*l/3}:"center"===i?i={marginTop:l}:t.isPlainObject(i)||(i={marginTop:i}),r.hasClass("modal-moveable")){var c=null,d=s.rememberPos;d&&(d===!0?c=a.$element.data("modal-pos"):t.zui.store&&(c=t.zui.store.pageGet(n+".rememberPos."+d))),i=t.extend(i,{left:Math.max(0,(t(window).width()-r.outerWidth())/2)},c),"inside"===s.moveable?o(r,i):r.css(i)}else r.css(i)}},a.prototype.setMoveale=function(){t.fn.draggable||console.error("Moveable modal requires draggable.js.");var e=this,i=e.options,a=e.$element.find(".modal-dialog").removeClass("modal-dragged");a.toggleClass("modal-moveable",!!i.moveable),e.$element.data("modal-moveable-setup")||a.draggable({container:e.$element,handle:".modal-header",before:function(){a.css("margin-top","").addClass("modal-dragged")},finish:function(a){var o=i.rememberPos;o&&(e.$element.data("modal-pos",a.pos),t.zui.store&&o!==!0&&t.zui.store.pageSet(n+".rememberPos."+o,a.pos))},move:"inside"!==i.moveable||function(t){o(a,t)}})},a.prototype.show=function(e,i){var o=this,s=t.Event("show."+n,{relatedTarget:e});o.$element.trigger(s),o.isShown||s.isDefaultPrevented()||(o.isShown=!0,o.options.moveable&&o.setMoveale(),o.checkScrollbar(),o.options.backdrop!==!1&&(o.$body.addClass("modal-open"),o.setScrollbar()),o.escape(),o.$element.on("click.dismiss."+n,'[data-dismiss="modal"]',t.proxy(o.hide,o)),o.backdrop(function(){var s=t.support.transition&&o.$element.hasClass("fade");o.$element.parent().length||o.$element.appendTo(o.$body),o.$element.show().scrollTop(0),s&&o.$element[0].offsetWidth,o.$element.addClass("in").attr("aria-hidden",!1),o.ajustPosition(i),o.enforceFocus();var r=t.Event("shown."+n,{relatedTarget:e});s?o.$element.find(".modal-dialog").one("bsTransitionEnd",function(){o.$element.trigger("focus").trigger(r)}).emulateTransitionEnd(a.TRANSITION_DURATION):o.$element.trigger("focus").trigger(r)}))},a.prototype.hide=function(e){e&&e.preventDefault();var i=this;e=t.Event("hide."+n),i.$element.trigger(e),i.isShown&&!e.isDefaultPrevented()&&(i.isShown=!1,i.options.backdrop!==!1&&(i.$body.removeClass("modal-open"),i.resetScrollbar()),i.escape(),t(document).off("focusin."+n),i.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss."+n),t.support.transition&&i.$element.hasClass("fade")?i.$element.one("bsTransitionEnd",t.proxy(i.hideModal,i)).emulateTransitionEnd(a.TRANSITION_DURATION):i.hideModal())},a.prototype.enforceFocus=function(){t(document).off("focusin."+n).on("focusin."+n,t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},a.prototype.escape=function(){this.isShown&&this.options.keyboard?t(document).on("keydown.dismiss."+n,t.proxy(function(i){if(27==i.which){var a=t.Event("escaping."+n),o=this.$element.triggerHandler(a,"esc");if(o!=e&&!o)return;this.hide()}},this)):this.isShown||t(document).off("keydown.dismiss."+n)},a.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$element.trigger("hidden."+n)})},a.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},a.prototype.backdrop=function(e){var i=this,o=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var s=t.support.transition&&o;if(this.$backdrop=t('').appendTo(this.$body),this.$element.on("mousedown.dismiss."+n,t.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),s&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;s?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(a.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var r=function(){i.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",r).emulateTransitionEnd(a.BACKDROP_TRANSITION_DURATION):r()}else e&&e()},a.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},a.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",t+this.scrollbarWidth)},a.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},a.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var s=t.fn.modal;t.fn.modal=i,t.fn.modal.Constructor=a,t.fn.modal.noConflict=function(){return t.fn.modal=s,this},t(document).on("click."+n+".data-api",'[data-toggle="modal"]',function(e){var a=t(this),o=a.attr("href"),s=null;try{s=t(a.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,""))}catch(r){return}if(s.length){var l=s.data(n)?"toggle":t.extend({remote:!/#/.test(o)&&o},s.data(),a.data());a.is("a")&&e.preventDefault(),s.one("show."+n,function(t){t.isDefaultPrevented()||s.one("hidden."+n,function(){a.is(":visible")&&a.trigger("focus")})}),i.call(s,l,this,a.data("position"))}})}(jQuery,void 0),function(t,e,i){"use strict";if(!t.fn.modal)throw new Error("Modal trigger requires modal.js");var n="zui.modaltrigger",a="ajax",o=".zui.modal",s="string",r=function(e,i){e=t.extend({},r.DEFAULTS,t.ModalTriggerDefaults,i?i.data():null,e),this.isShown,this.$trigger=i,this.options=e,this.id=t.zui.uuid()};r.DEFAULTS={type:"custom",height:"auto",name:"triggerModal",fade:!0,position:"fit",showHeader:!0,delay:0,backdrop:!0,keyboard:!0,waittime:0,loadingIcon:"icon-spinner-indicator"},r.prototype.init=function(i){var r=this;if(i.url&&(!i.type||i.type!=a&&"iframe"!=i.type)&&(i.type=a),i.remote)i.type=a,typeof i.remote===s&&(i.url=i.remote);else if(i.iframe)i.type="iframe",typeof i.iframe===s&&(i.url=i.iframe);else if(i.custom&&(i.type="custom",typeof i.custom===s)){var l;try{l=t(i.custom)}catch(c){}l&&l.length?i.custom=l:t.isFunction(e[i.custom])&&(i.custom=e[i.custom])}var d=t("#"+i.name);d.length&&(r.isShown||d.off(o),d.remove()),d=t('
',o={type:"default",placement:"top",time:4e3,parent:"body",icon:null,close:!0,fade:!0,scale:!0},s={},r=function(e,r){t.isPlainObject(e)&&(r=e,e=r.message);var l=this;r=l.options=t.extend({},o,r),l.id=r.id||n++;var c=s[l.id];c&&c.destroy(),s[l.id]=l,l.message=(r.icon?' ':"")+e,l.$=t(a.format(r)).toggleClass("fade",r.fade).toggleClass("scale",r.scale).attr("id","messager-"+l.id),r.cssClass&&l.$.addClass(r.cssClass);var d=!1,h=l.$.find(".messager-actions"),u=function(e){var n=t('');"close"===e.name&&n.addClass("close"),e.html!==i&&n.html(e.html),e.icon!==i&&n.append(''),e.text!==i&&n.append(''+e.text+""),e.tooltip!==i&&n.attr("title",e.tooltip).tooltip(),n.data("action",e),h.append(n)};r.actions&&t.each(r.actions,function(t,e){e.name===i&&(e.name=t),"close"==e.name&&(d=!0),u(e)}),!d&&r.close&&u({name:"close",html:"×"}),l.$.on("click",".action",function(e){var i,n=t(this).data("action");r.onAction&&(i=r.onAction.call(this,n.name,n,l),i===!1)||t.isFunction(n.action)&&(i=n.action.call(this,l),i===!1)||(l.hide(),e.stopPropagation())}),l.$.on("click",function(t){if(r.onAction){var e=r.onAction.call(this,"content",null,l);e===!0&&l.hide()}});var p=l.$.find(".messager-content").html(l.message);r.contentClass&&p.addClass(r.contentClass),l.$.data("zui.messager",l),r.show&&l.message!==i&&l.show()};r.prototype.update=function(e,i){var n=this,a=n.options;n.$.removeClass("messager-"+a.type),i&&(a=t.extend(a,i)),n.$.addClass("messager-"+a.type),e&&(n.message=(a.icon?' ':"")+e,n.$.find(".messager-content").html(n.message))},r.prototype.show=function(n,a){var o=this,s=this.options;if(t.isFunction(n)){var r=a;a=n,r!==i&&(n=r)}if(o.isShow)return void o.hide(function(){o.show(n,a)});o.hiding&&(clearTimeout(o.hiding),o.hiding=null),o.update(n);var l=s.placement,c=t(s.parent),d=c.children(".messagers-holder."+l);if(d.length||(d=t("").attr("class","messagers-holder "+l).appendTo(c)),d.append(o.$),"center"===l){var h=t(e).height()-d.height();d.css("top",Math.max(-h,h/2))}return o.$.show().addClass("in"),s.time&&(o.hiding=setTimeout(function(){o.hide()},s.time)),o.isShow=!0,a&&a(),o},r.prototype.hide=function(t,e){t===!0&&(e=!0,t=null);var i=this;if(i.$.hasClass("in")){i.$.removeClass("in");var n=function(){var e=i.$.parent();i.$.detach(),e.children().length||e.remove(),t&&t(!0)};e?n():setTimeout(n,200)}else t&&t(!1);i.isShow=!1},r.prototype.destroy=function(){var t=this;t.hide(function(){t.$.remove(),t.$=null},!0),delete s[t.id]},r.all=s,r.DEFAULTS=o;var l=function(){t(".messager").each(function(){var e=t(this).data("zui.messager");e&&e.hide&&e.hide(!0)})},c=function(e,n){"string"==typeof n&&(n={type:n}),n=t.extend({},n),n.id===i&&l();var a=s[n.id]||new r(e,n);return a.show(),a},d=function(t){return"string"==typeof t?{placement:t}:t},h={show:c,hide:l};t.each({primary:0,success:"ok-sign",info:"info-sign",warning:"warning-sign",danger:"exclamation-sign",important:0,special:0},function(e,i){h[e]=function(n,a){return c(n,t.extend({type:e,icon:i||null},d(a)))}}),t.zui({Messager:r,showMessager:c,messager:h})}(jQuery,window,void 0),function(t,e,i,n){"use strict";function a(t){if(t=t.toLowerCase(),t&&d.test(t)){var e;if(4===t.length){var i="#";for(e=1;e<4;e+=1)i+=t.slice(e,e+1).concat(t.slice(e,e+1));t=i}var n=[];for(e=1;e<7;e+=2)n.push(y("0x"+t.slice(e,e+2)));return{r:n[0],g:n[1],b:n[2],a:1}}throw new Error("Wrong hex string! (hex: "+t+")")}function o(e){return typeof e===f&&("transparent"===e.toLowerCase()||m[e.toLowerCase()]||d.test(t.trim(e.toLowerCase())))}function s(t){function e(t){return t=t<0?t+1:t>1?t-1:t,6*t<1?r+(s-r)*t*6:2*t<1?s:3*t<2?r+(s-r)*(2/3-t)*6:r}var i=t.h,n=t.s,a=t.l,o=t.a;i=c(i)%u/u,n=l(c(n)),a=l(c(a)),o=l(c(o));var s=a<=.5?a*(n+1):a+n-a*n,r=2*a-s,d={r:e(i+1/3)*h,g:e(i)*h,b:e(i-1/3)*h,a:o};return d}function r(t,i,n){return v(n)&&(n=0),v(i)&&(i=h),e.min(e.max(t,n),i)}function l(t,e){return r(t,e)}function c(t){return"number"==typeof t?t:parseFloat(t)}var d=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/,h=255,u=360,p=100,f="string",g="object",m={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},v=function(t){return t===n},_=function(t){return!v(t)},y=function(t){return parseInt(t)},b=function(t){return y(l(c(t),h))},w=function(t,e,i,n){var o=this;if(o.r=o.g=o.b=0,o.a=1,_(n)&&(o.a=l(c(n),1)),_(t)&&_(e)&&_(i))o.r=b(t),o.g=b(e),o.b=b(i);else if(_(t)){var r=typeof t;if(r==f)t=t.toLowerCase(),"transparent"===t?o.a=0:m[t]?this.rgb(a(m[t])):o.rgb(a(t));else if("number"==r&&v(e))o.r=o.g=o.b=b(t);else if(r==g&&_(t.r))o.r=b(t.r),_(t.g)&&(o.g=b(t.g)),_(t.b)&&(o.b=b(t.b)),_(t.a)&&(o.a=l(c(t.a),1));else if(r==g&&_(t.h)){var d={h:l(c(t.h),u),s:1,l:1,a:1};_(t.s)&&(d.s=l(c(t.s),1)),_(t.l)&&(d.l=l(c(t.l),1)),_(t.a)&&(d.a=l(c(t.a),1)),o.rgb(s(d))}}};w.prototype.rgb=function(t){var e=this;if(_(t)){if(typeof t==g)_(t.r)&&(e.r=b(t.r)),_(t.g)&&(e.g=b(t.g)),_(t.b)&&(e.b=b(t.b)),_(t.a)&&(e.a=l(c(t.a),1));else{var i=y(c(t));e.r=i,e.g=i,e.b=i}return e}return{r:e.r,g:e.g,b:e.b,a:e.a}},w.prototype.hue=function(t){var e=this,i=e.toHsl();return v(t)?i.h:(i.h=l(c(t),u),e.rgb(s(i)),e)},w.prototype.darken=function(t){var e=this,i=e.toHsl();return i.l-=t/p,i.l=l(i.l,1),e.rgb(s(i)),e},w.prototype.clone=function(){var t=this;return new w(t.r,t.g,t.b,t.a)},w.prototype.lighten=function(t){return this.darken(-t)},w.prototype.fade=function(t){return this.a=l(t/p,1),this},w.prototype.spin=function(t){var e=this.toHsl(),i=(e.h+t)%u;return e.h=i<0?u+i:i,this.rgb(s(e))},w.prototype.toHsl=function(){var t,i,n=this,a=n.r/h,o=n.g/h,s=n.b/h,r=n.a,l=e.max(a,o,s),c=e.min(a,o,s),d=(l+c)/2,p=l-c;if(l===c)t=i=0;else{switch(i=d>.5?p/(2-l-c):p/(l+c),l){case a:t=(o-s)/p+(o
- ' target='hiddenwin' id='searchform' class='form-condensed'>
-
-
-
-
-
diff --git a/module/story/model.php b/module/story/model.php
index 3568ffe48b..dd4ea94d9e 100644
--- a/module/story/model.php
+++ b/module/story/model.php
@@ -2332,10 +2332,7 @@ class storyModel extends model
$id = $col->id;
if($col->show)
{
- $class = '';
- if($id == 'status') $class .= ' story-' . $story->status;
- if($id == 'title') $class .= ' text-left';
- if($id == 'id') $class .= ' cell-id';
+ $class = "c-{$id}";
if($id == 'assignedTo' && $story->assignedTo == $account) $class .= ' red';
$title = '';
@@ -2346,11 +2343,10 @@ class storyModel extends model
switch($id)
{
case 'id':
- if($mode == 'table') echo " ";
- echo $canView ? html::a($storyLink, sprintf('%03d', $story->id)) : sprintf('%03d', $story->id);
+ echo '-1&&i.button!==n)){var f=t(this);T&&(F=S?f.closest(T):f),F.hasClass("drag-shadow")||y.before&&y.before({event:i,element:F})===!1||(P=!0,a=t.isFunction(y.target)?y.target(_):A.find(y.target),o=null,s=null,r=!1,l=!0,c=null,d=F.offset(),u=A.offset(),h={left:i.pageX,top:i.pageY},g=t.extend({},h),p={left:h.left-d.left,top:h.top-d.top},F.addClass("drag-from"),t(e).on(C,U).on(x,I),m=setTimeout(function(){t(e).on(k,I)},10),i.preventDefault())}};S?_.on(k,S,L):T?_.on(k,T,L):_.on(k,L)},s.prototype.destroy=function(){var i="."+n+"."+this.id;this.$.off(i),t(e).off(i),this.$.data(n,null)},s.prototype.reset=function(){this.destroy(),this.init()},t.fn.droppable=function(e){return this.each(function(){var i=t(this),a=i.data(n),o="object"==typeof e&&e;a||i.data(n,a=new s(this,o)),"string"==typeof e&&a[e]()})},t.fn.droppable.Constructor=s}(jQuery,document,Math),+function(t,e){"use strict";function i(e,i,o){return this.each(function(){var s=t(this),r=s.data(n),l=t.extend({},a.DEFAULTS,s.data(),"object"==typeof e&&e);r||s.data(n,r=new a(this,l)),"string"==typeof e?r[e](i,o):l.show&&r.show(i,o)})}var n="zui.modal",a=function(i,a){var o=this;o.options=a,o.$body=t(document.body),o.$element=t(i),o.$backdrop=o.isShown=null,o.scrollbarWidth=0,a.moveable===e&&(o.options.moveable=o.$element.hasClass("modal-moveable")),a.remote&&o.$element.find(".modal-content").load(a.remote,function(){o.$element.trigger("loaded."+n)})};a.VERSION="3.2.0",a.TRANSITION_DURATION=300,a.BACKDROP_TRANSITION_DURATION=150,a.DEFAULTS={backdrop:!0,keyboard:!0,show:!0,position:"fit"};var o=function(e,i){var n=t(window);i.left=Math.max(0,Math.min(i.left,n.width()-e.outerWidth())),i.top=Math.max(0,Math.min(i.top,n.height()-e.outerHeight())),e.css(i)};a.prototype.toggle=function(t,e){return this.isShown?this.hide():this.show(t,e)},a.prototype.ajustPosition=function(i){var a=this,s=a.options;if(i===e&&(i=s.position),i!==e){t.isFunction(i)&&(i=i(a));var r=a.$element.find(".modal-dialog"),l=Math.max(0,(t(window).height()-r.outerHeight())/2);if("fit"===i?i={marginTop:2*l/3}:"center"===i?i={marginTop:l}:t.isPlainObject(i)||(i={marginTop:i}),r.hasClass("modal-moveable")){var c=null,d=s.rememberPos;d&&(d===!0?c=a.$element.data("modal-pos"):t.zui.store&&(c=t.zui.store.pageGet(n+".rememberPos."+d))),i=t.extend(i,{left:Math.max(0,(t(window).width()-r.outerWidth())/2)},c),"inside"===s.moveable?o(r,i):r.css(i)}else r.css(i)}},a.prototype.setMoveale=function(){t.fn.draggable||console.error("Moveable modal requires draggable.js.");var e=this,i=e.options,a=e.$element.find(".modal-dialog").removeClass("modal-dragged");a.toggleClass("modal-moveable",!!i.moveable),e.$element.data("modal-moveable-setup")||a.draggable({container:e.$element,handle:".modal-header",before:function(){a.css("margin-top","").addClass("modal-dragged")},finish:function(a){var o=i.rememberPos;o&&(e.$element.data("modal-pos",a.pos),t.zui.store&&o!==!0&&t.zui.store.pageSet(n+".rememberPos."+o,a.pos))},move:"inside"!==i.moveable||function(t){o(a,t)}})},a.prototype.show=function(e,i){var o=this,s=t.Event("show."+n,{relatedTarget:e});o.$element.trigger(s),o.isShown||s.isDefaultPrevented()||(o.isShown=!0,o.options.moveable&&o.setMoveale(),o.checkScrollbar(),o.options.backdrop!==!1&&(o.$body.addClass("modal-open"),o.setScrollbar()),o.escape(),o.$element.on("click.dismiss."+n,'[data-dismiss="modal"]',t.proxy(o.hide,o)),o.backdrop(function(){var s=t.support.transition&&o.$element.hasClass("fade");o.$element.parent().length||o.$element.appendTo(o.$body),o.$element.show().scrollTop(0),s&&o.$element[0].offsetWidth,o.$element.addClass("in").attr("aria-hidden",!1),o.ajustPosition(i),o.enforceFocus();var r=t.Event("shown."+n,{relatedTarget:e});s?o.$element.find(".modal-dialog").one("bsTransitionEnd",function(){o.$element.trigger("focus").trigger(r)}).emulateTransitionEnd(a.TRANSITION_DURATION):o.$element.trigger("focus").trigger(r)}))},a.prototype.hide=function(e){e&&e.preventDefault();var i=this;e=t.Event("hide."+n),i.$element.trigger(e),i.isShown&&!e.isDefaultPrevented()&&(i.isShown=!1,i.options.backdrop!==!1&&(i.$body.removeClass("modal-open"),i.resetScrollbar()),i.escape(),t(document).off("focusin."+n),i.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss."+n),t.support.transition&&i.$element.hasClass("fade")?i.$element.one("bsTransitionEnd",t.proxy(i.hideModal,i)).emulateTransitionEnd(a.TRANSITION_DURATION):i.hideModal())},a.prototype.enforceFocus=function(){t(document).off("focusin."+n).on("focusin."+n,t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},a.prototype.escape=function(){this.isShown&&this.options.keyboard?t(document).on("keydown.dismiss."+n,t.proxy(function(i){if(27==i.which){var a=t.Event("escaping."+n),o=this.$element.triggerHandler(a,"esc");if(o!=e&&!o)return;this.hide()}},this)):this.isShown||t(document).off("keydown.dismiss."+n)},a.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$element.trigger("hidden."+n)})},a.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},a.prototype.backdrop=function(e){var i=this,o=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var s=t.support.transition&&o;if(this.$backdrop=t('').appendTo(this.$body),this.$element.on("mousedown.dismiss."+n,t.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),s&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;s?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(a.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var r=function(){i.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",r).emulateTransitionEnd(a.BACKDROP_TRANSITION_DURATION):r()}else e&&e()},a.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},a.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",t+this.scrollbarWidth)},a.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},a.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var s=t.fn.modal;t.fn.modal=i,t.fn.modal.Constructor=a,t.fn.modal.noConflict=function(){return t.fn.modal=s,this},t(document).on("click."+n+".data-api",'[data-toggle="modal"]',function(e){var a=t(this),o=a.attr("href"),s=null;try{s=t(a.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,""))}catch(r){return}if(s.length){var l=s.data(n)?"toggle":t.extend({remote:!/#/.test(o)&&o},s.data(),a.data());a.is("a")&&e.preventDefault(),s.one("show."+n,function(t){t.isDefaultPrevented()||s.one("hidden."+n,function(){a.is(":visible")&&a.trigger("focus")})}),i.call(s,l,this,a.data("position"))}})}(jQuery,void 0),function(t,e,i){"use strict";if(!t.fn.modal)throw new Error("Modal trigger requires modal.js");var n="zui.modaltrigger",a="ajax",o=".zui.modal",s="string",r=function(e,i){e=t.extend({},r.DEFAULTS,t.ModalTriggerDefaults,i?i.data():null,e),this.isShown,this.$trigger=i,this.options=e,this.id=t.zui.uuid()};r.DEFAULTS={type:"custom",height:"auto",name:"triggerModal",fade:!0,position:"fit",showHeader:!0,delay:0,backdrop:!0,keyboard:!0,waittime:0,loadingIcon:"icon-spinner-indicator"},r.prototype.init=function(i){var r=this;if(i.url&&(!i.type||i.type!=a&&"iframe"!=i.type)&&(i.type=a),i.remote)i.type=a,typeof i.remote===s&&(i.url=i.remote);else if(i.iframe)i.type="iframe",typeof i.iframe===s&&(i.url=i.iframe);else if(i.custom&&(i.type="custom",typeof i.custom===s)){var l;try{l=t(i.custom)}catch(c){}l&&l.length?i.custom=l:t.isFunction(e[i.custom])&&(i.custom=e[i.custom])}var d=t("#"+i.name);d.length&&(r.isShown||d.off(o),d.remove()),d=t('
',o={type:"default",placement:"top",time:4e3,parent:"body",icon:null,close:!0,fade:!0,scale:!0},s={},r=function(e,r){t.isPlainObject(e)&&(r=e,e=r.message);var l=this;r=l.options=t.extend({},o,r),l.id=r.id||n++;var c=s[l.id];c&&c.destroy(),s[l.id]=l,l.message=(r.icon?' ':"")+e,l.$=t(a.format(r)).toggleClass("fade",r.fade).toggleClass("scale",r.scale).attr("id","messager-"+l.id),r.cssClass&&l.$.addClass(r.cssClass);var d=!1,h=l.$.find(".messager-actions"),u=function(e){var n=t('');"close"===e.name&&n.addClass("close"),e.html!==i&&n.html(e.html),e.icon!==i&&n.append(''),e.text!==i&&n.append(''+e.text+""),e.tooltip!==i&&n.attr("title",e.tooltip).tooltip(),n.data("action",e),h.append(n)};r.actions&&t.each(r.actions,function(t,e){e.name===i&&(e.name=t),"close"==e.name&&(d=!0),u(e)}),!d&&r.close&&u({name:"close",html:"×"}),l.$.on("click",".action",function(e){var i,n=t(this).data("action");r.onAction&&(i=r.onAction.call(this,n.name,n,l),i===!1)||t.isFunction(n.action)&&(i=n.action.call(this,l),i===!1)||(l.hide(),e.stopPropagation())}),l.$.on("click",function(t){if(r.onAction){var e=r.onAction.call(this,"content",null,l);e===!0&&l.hide()}});var p=l.$.find(".messager-content").html(l.message);r.contentClass&&p.addClass(r.contentClass),l.$.data("zui.messager",l),r.show&&l.message!==i&&l.show()};r.prototype.update=function(e,i){var n=this,a=n.options;n.$.removeClass("messager-"+a.type),i&&(a=t.extend(a,i)),n.$.addClass("messager-"+a.type),e&&(n.message=(a.icon?' ':"")+e,n.$.find(".messager-content").html(n.message))},r.prototype.show=function(n,a){var o=this,s=this.options;if(t.isFunction(n)){var r=a;a=n,r!==i&&(n=r)}if(o.isShow)return void o.hide(function(){o.show(n,a)});o.hiding&&(clearTimeout(o.hiding),o.hiding=null),o.update(n);var l=s.placement,c=t(s.parent),d=c.children(".messagers-holder."+l);if(d.length||(d=t("").attr("class","messagers-holder "+l).appendTo(c)),d.append(o.$),"center"===l){var h=t(e).height()-d.height();d.css("top",Math.max(-h,h/2))}return o.$.show().addClass("in"),s.time&&(o.hiding=setTimeout(function(){o.hide()},s.time)),o.isShow=!0,a&&a(),o},r.prototype.hide=function(t,e){t===!0&&(e=!0,t=null);var i=this;if(i.$.hasClass("in")){i.$.removeClass("in");var n=function(){var e=i.$.parent();i.$.detach(),e.children().length||e.remove(),t&&t(!0)};e?n():setTimeout(n,200)}else t&&t(!1);i.isShow=!1},r.prototype.destroy=function(){var t=this;t.hide(function(){t.$.remove(),t.$=null},!0),delete s[t.id]},r.all=s,r.DEFAULTS=o;var l=function(){t(".messager").each(function(){var e=t(this).data("zui.messager");e&&e.hide&&e.hide(!0)})},c=function(e,n){"string"==typeof n&&(n={type:n}),n=t.extend({},n),n.id===i&&l();var a=s[n.id]||new r(e,n);return a.show(),a},d=function(t){return"string"==typeof t?{placement:t}:t},h={show:c,hide:l};t.each({primary:0,success:"ok-sign",info:"info-sign",warning:"warning-sign",danger:"exclamation-sign",important:0,special:0},function(e,i){h[e]=function(n,a){return c(n,t.extend({type:e,icon:i||null},d(a)))}}),t.zui({Messager:r,showMessager:c,messager:h})}(jQuery,window,void 0),function(t,e,i,n){"use strict";function a(t){if(t=t.toLowerCase(),t&&d.test(t)){var e;if(4===t.length){var i="#";for(e=1;e<4;e+=1)i+=t.slice(e,e+1).concat(t.slice(e,e+1));t=i}var n=[];for(e=1;e<7;e+=2)n.push(y("0x"+t.slice(e,e+2)));return{r:n[0],g:n[1],b:n[2],a:1}}throw new Error("Wrong hex string! (hex: "+t+")")}function o(e){return typeof e===f&&("transparent"===e.toLowerCase()||m[e.toLowerCase()]||d.test(t.trim(e.toLowerCase())))}function s(t){function e(t){return t=t<0?t+1:t>1?t-1:t,6*t<1?r+(s-r)*t*6:2*t<1?s:3*t<2?r+(s-r)*(2/3-t)*6:r}var i=t.h,n=t.s,a=t.l,o=t.a;i=c(i)%u/u,n=l(c(n)),a=l(c(a)),o=l(c(o));var s=a<=.5?a*(n+1):a+n-a*n,r=2*a-s,d={r:e(i+1/3)*h,g:e(i)*h,b:e(i-1/3)*h,a:o};return d}function r(t,i,n){return v(n)&&(n=0),v(i)&&(i=h),e.min(e.max(t,n),i)}function l(t,e){return r(t,e)}function c(t){return"number"==typeof t?t:parseFloat(t)}var d=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/,h=255,u=360,p=100,f="string",g="object",m={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},v=function(t){return t===n},_=function(t){return!v(t)},y=function(t){return parseInt(t)},b=function(t){return y(l(c(t),h))},w=function(t,e,i,n){var o=this;if(o.r=o.g=o.b=0,o.a=1,_(n)&&(o.a=l(c(n),1)),_(t)&&_(e)&&_(i))o.r=b(t),o.g=b(e),o.b=b(i);else if(_(t)){var r=typeof t;if(r==f)t=t.toLowerCase(),"transparent"===t?o.a=0:m[t]?this.rgb(a(m[t])):o.rgb(a(t));else if("number"==r&&v(e))o.r=o.g=o.b=b(t);else if(r==g&&_(t.r))o.r=b(t.r),_(t.g)&&(o.g=b(t.g)),_(t.b)&&(o.b=b(t.b)),_(t.a)&&(o.a=l(c(t.a),1));else if(r==g&&_(t.h)){var d={h:l(c(t.h),u),s:1,l:1,a:1};_(t.s)&&(d.s=l(c(t.s),1)),_(t.l)&&(d.l=l(c(t.l),1)),_(t.a)&&(d.a=l(c(t.a),1)),o.rgb(s(d))}}};w.prototype.rgb=function(t){var e=this;if(_(t)){if(typeof t==g)_(t.r)&&(e.r=b(t.r)),_(t.g)&&(e.g=b(t.g)),_(t.b)&&(e.b=b(t.b)),_(t.a)&&(e.a=l(c(t.a),1));else{var i=y(c(t));e.r=i,e.g=i,e.b=i}return e}return{r:e.r,g:e.g,b:e.b,a:e.a}},w.prototype.hue=function(t){var e=this,i=e.toHsl();return v(t)?i.h:(i.h=l(c(t),u),e.rgb(s(i)),e)},w.prototype.darken=function(t){var e=this,i=e.toHsl();return i.l-=t/p,i.l=l(i.l,1),e.rgb(s(i)),e},w.prototype.clone=function(){var t=this;return new w(t.r,t.g,t.b,t.a)},w.prototype.lighten=function(t){return this.darken(-t)},w.prototype.fade=function(t){return this.a=l(t/p,1),this},w.prototype.spin=function(t){var e=this.toHsl(),i=(e.h+t)%u;return e.h=i<0?u+i:i,this.rgb(s(e))},w.prototype.toHsl=function(){var t,i,n=this,a=n.r/h,o=n.g/h,s=n.b/h,r=n.a,l=e.max(a,o,s),c=e.min(a,o,s),d=(l+c)/2,p=l-c;if(l===c)t=i=0;else{switch(i=d>.5?p/(2-l-c):p/(l+c),l){case a:t=(o-s)/p+(o
-
product->checkedSummary);?>
diff --git a/module/search/lang/zh-cn.php b/module/search/lang/zh-cn.php
index f0bce24da0..cc98ff7208 100644
--- a/module/search/lang/zh-cn.php
+++ b/module/search/lang/zh-cn.php
@@ -17,7 +17,7 @@ $lang->search->group1 = '第一组';
$lang->search->group2 = '第二组';
$lang->search->buildForm = '搜索表单';
$lang->search->buildQuery = '执行搜索';
-$lang->search->saveQuery = '保存查询';
+$lang->search->savedQuery = '已保存的检索历史';
$lang->search->deleteQuery = '删除查询';
$lang->search->setQueryTitle = '请输入查询标题(保存之前请先查询):';
$lang->search->select = '需求/任务筛选';
diff --git a/module/search/view/buildform.html.php b/module/search/view/buildform.html.php
index 81f6499ae9..09865e59d3 100644
--- a/module/search/view/buildform.html.php
+++ b/module/search/view/buildform.html.php
@@ -16,51 +16,209 @@ include '../../common/view/datepicker.html.php';
include '../../common/view/chosen.html.php';
?>
-
+ else if(params[fieldName]['control'] == 'select')
+ {
+ $searchForm.find("#value" + fieldNO).chosen().on('chosen:showing_dropdown', function()
+ {
+ var $this = $(this);
+ var $chosen = $this.next('.chosen-container').removeClass('chosen-up');
+ var $drop = $chosen.find('.chosen-drop');
+ $chosen.toggleClass('chosen-up', $drop.height() + $drop.offset().top - $(document).scrollTop() > $(window).height());
+ });
+ }
+ };
-icons['product']);?>
-
-
-
- tree->manage);?>
-
+
+
-
+
-
+
+
+ tree->manage, '', "class='btn btn-info btn-wide'");?>
+
-
-
+
+
+
- $param)
-{
- echo "";
- if($param['control'] == 'select') echo html::select('field' . $fieldName, $param['values'], '', "class='form-control searchSelect'");
- if($param['control'] == 'input') echo html::input('field' . $fieldName, '', "class='form-control searchInput' autocomplete='off'");
- echo '';
-}
-?>
-
-
-
|
- search->andor, $formSession['groupAndOr'], "class='form-control w-60px'")?> | -
-
|
- '> - "; - echo html::submitButton($lang->search->common); - if($style != 'simple') - { - echo html::commonButton($lang->search->reset, 'onclick=resetForm(this)'); - if(common::hasPriv('search', 'saveQuery')) echo html::a($this->createLink('search', 'saveQuery', "module=$module&onMenuBar=$onMenuBar"), $lang->save, '', "class='saveQuery btn'"); - } - echo ''; - ?> - | - -
-
-
- " . html::a('javascript:deleteQuery()', '', '', 'class=btn') . '';?>
-
- |
-
-
' . sprintf('%03d', $story->id) . '
';
break;
case 'pri':
- echo "";
+ echo "";
echo zget($this->lang->story->priList, $story->pri, $story->pri);
echo "";
break;
@@ -2375,7 +2371,9 @@ class storyModel extends model
echo $story->sourceNote;
break;
case 'status':
- echo $this->lang->story->statusList[$story->status];
+ echo "";
+ echo " " . $this->lang->story->statusList[$story->status];
+ echo '';
break;
case 'estimate':
echo $story->estimate;
@@ -2451,10 +2449,13 @@ class storyModel extends model
break;
case 'actions':
$vars = "story={$story->id}";
- common::printIcon('story', 'change', $vars, $story, 'list', 'random');
- common::printIcon('story', 'review', $vars, $story, 'list', 'review');
+ echo "";
+ common::printIcon('story', 'change', $vars, $story, 'list', 'fork');
+ common::printIcon('story', 'delete', $vars, $story, 'list', 'trash', 'hiddenwin');
+ echo "
";
+ common::printIcon('story', 'review', $vars, $story, 'list', 'glasses');
common::printIcon('story', 'close', $vars, $story, 'list', 'off', '', 'iframe', true);
- common::printIcon('story', 'edit', $vars, $story, 'list', 'pencil');
+ common::printIcon('story', 'edit', $vars, $story, 'list');
if($this->config->global->flow != 'onlyStory') common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap');
break;
}
@@ -2613,4 +2614,16 @@ class storyModel extends model
return array($toList, $ccList);
}
+
+ /**
+ * Get story count.
+ *
+ * @param int $productID
+ * @access public
+ * @return int
+ */
+ public function getCount($productID)
+ {
+ return $this->dao->select('count(*) as count')->from(TABLE_STORY)->where('deleted')->eq(0)->andWhere('product')->eq($productID)->fetch('count');
+ }
}
diff --git a/www/js/my.full.js b/www/js/my.full.js
index 7031b55f43..b693551ce9 100644
--- a/www/js/my.full.js
+++ b/www/js/my.full.js
@@ -686,28 +686,28 @@ function toggleSearch()
{
if(browseType == 'bymodule')
{
- $('#bymoduleTab').removeClass('active');
+ $('#bymoduleTab').removeClass('btn-active-text');
}
else
{
- $('#' + browseType + 'Tab').removeClass('active');
+ $('#' + browseType + 'Tab').removeClass('btn-active-text');
}
- $('#bysearchTab').addClass('active');
+ $('#bysearchTab').addClass('btn-active-text');
ajaxGetSearchForm();
- $('#querybox').addClass('show');
+ $('#queryBox').addClass('show');
},
function()
{
if(browseType == 'bymodule')
{
- $('#bymoduleTab').addClass('active');
+ $('#bymoduleTab').addClass('btn-active-text');
}
else
{
- $('#' + browseType +'Tab').addClass('active');
+ $('#' + browseType +'Tab').addClass('btn-active-text');
}
- $('#bysearchTab').removeClass('active');
- $('#querybox').removeClass('show');
+ $('#bysearchTab').removeClass('btn-active-text');
+ $('#queryBox').removeClass('show');
}
);
}
@@ -720,7 +720,7 @@ function toggleSearch()
*/
function ajaxGetSearchForm(querybox)
{
- var $querybox = $(querybox || '#querybox');
+ var $querybox = $(querybox || '#queryBox');
if($querybox.html() == '')
{
$.get(createLink('search', 'buildForm'), function(data)
diff --git a/www/js/zui/min.js b/www/js/zui/min.js
index 927892ac89..0f7b6a39dc 100644
--- a/www/js/zui/min.js
+++ b/www/js/zui/min.js
@@ -1,5 +1,5 @@
/*!
- * ZUI: Zentao template - v1.8.1 - 2018-04-03
+ * ZUI: Zentao template - v1.8.1 - 2018-04-10
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2018 cnezsoft.com; Licensed MIT
@@ -10,20 +10,20 @@
* Copyright (c) 2010 "Cowboy" Ben Alman
* MIT & GPL http://benalman.com/about/license/
*/
-function(t,e,i){"$:nomunge";function n(){a=e[r](function(){o.each(function(){var e=t(this),i=e.width(),n=e.height(),a=t.data(this,c);i===a.w&&n===a.h||e.trigger(l,[a.w=i,a.h=n])}),n()},s[d])}var a,o=t([]),s=t.resize=t.extend(t.resize,{}),r="setTimeout",l="resize",c=l+"-special-event",d="delay",h="throttleWindow";s[d]=250,s[h]=!0,t.event.special[l]={setup:function(){if(!s[h]&&this[r])return!1;var e=t(this);o=o.add(e),t.data(this,c,{w:e.width(),h:e.height()}),1===o.length&&n()},teardown:function(){if(!s[h]&&this[r])return!1;var e=t(this);o=o.not(e),e.removeData(c),o.length||clearTimeout(a)},add:function(e){function n(e,n,o){var s=t(this),r=t.data(this,c)||{};r.w=n!==i?n:s.width(),r.h=o!==i?o:s.height(),a.apply(this,arguments)}if(!s[h]&&this[r])return!1;var a;return t.isFunction(e)?(a=e,n):(a=e.handler,void(e.handler=n))}}}(jQuery,this),function(t,e){"use strict";var i,n,a="localStorage",o="page_"+t.location.pathname+t.location.search,s=function(){this.slience=!0;try{a in t&&t[a]&&t[a].setItem&&(this.enable=!0,i=t[a])}catch(s){}this.enable||(n={},i={getLength:function(){var t=0;return e.each(n,function(){t++}),t},key:function(t){var i,a=0;return e.each(n,function(e){return a===t?(i=e,!1):void a++}),i},removeItem:function(t){delete n[t]},getItem:function(t){return n[t]},setItem:function(t,e){n[t]=e},clear:function(){n={}}}),this.storage=i,this.page=this.get(o,{})};s.prototype.pageSave=function(){if(e.isEmptyObject(this.page))this.remove(o);else{var t,i=[];for(t in this.page){var n=this.page[t];null===n&&i.push(t)}for(t=i.length-1;t>=0;t--)delete this.page[i[t]];this.set(o,this.page)}},s.prototype.pageRemove=function(t){"undefined"!=typeof this.page[t]&&(this.page[t]=null,this.pageSave())},s.prototype.pageClear=function(){this.page={},this.pageSave()},s.prototype.pageGet=function(t,e){var i=this.page[t];return void 0===e||null!==i&&void 0!==i?i:e},s.prototype.pageSet=function(t,i){e.isPlainObject(t)?e.extend(!0,this.page,t):this.page[this.serialize(t)]=i,this.pageSave()},s.prototype.check=function(){if(!this.enable&&!this.slience)throw new Error("Browser not support localStorage or enable status been set true.");return this.enable},s.prototype.length=function(){return this.check()?i.getLength?i.getLength():i.length:0},s.prototype.removeItem=function(t){return i.removeItem(t),this},s.prototype.remove=function(t){return this.removeItem(t)},s.prototype.getItem=function(t){return i.getItem(t)},s.prototype.get=function(t,e){var i=this.deserialize(this.getItem(t));return"undefined"!=typeof i&&null!==i||"undefined"==typeof e?i:e},s.prototype.key=function(t){return i.key(t)},s.prototype.setItem=function(t,e){return i.setItem(t,e),this},s.prototype.set=function(t,e){return void 0===e?this.remove(t):(this.setItem(t,this.serialize(e)),this)},s.prototype.clear=function(){return i.clear(),this},s.prototype.forEach=function(t){for(var e=this.length(),n=e-1;n>=0;n--){var a=i.key(n);t(a,this.get(a))}return this},s.prototype.getAll=function(){var t={};return this.forEach(function(e,i){t[e]=i}),t},s.prototype.serialize=function(t){return"string"==typeof t?t:JSON.stringify(t)},s.prototype.deserialize=function(t){if("string"==typeof t)try{return JSON.parse(t)}catch(e){return t||void 0}},e.zui({store:new s})}(window,jQuery),function(t){"use strict";var e="zui.searchBox",i=function(e,n){var a=this;a.name=name,a.$=t(e),a.options=n=t.extend({},i.DEFAULTS,a.$.data(),n);var o=a.$.is(n.inputSelector)?a.$:a.$.find(n.inputSelector);if(o.length){var s=function(){a.changeTimer&&(clearTimeout(a.changeTimer),a.changeTimer=null)},r=function(){s();var t=a.getSearch();if(t!==a.lastValue){var e=""===t;o.toggleClass("empty",e),a.$.callComEvent(a,"onSearchChange",[t,e]),a.lastValue=t}};a.$input=o=o.first(),a.lastValue=a.getSearch(),o.on(n.listenEvent,function(t){a.changeTimer=setTimeout(function(){r()},n.changeDelay)}).on("focus",function(t){o.addClass("focus"),a.$.callComEvent(a,"onFocus",[t])}).on("blur",function(t){o.removeClass("focus"),a.$.callComEvent(a,"onBlur",[t])}).on("keydown",function(t){var e=0,i=t.which;27===i&&n.escToClear?(this.setSearch("",!0),r(),e=1):13===i&&n.onPressEnter&&(r(),a.$.callComEvent(a,"onPressEnter",[t]));var o=a.$.callComEvent(a,"onKeyDown",[t]);o===!1&&(e=1),e&&t.preventDefault()}),a.$.on("click",".search-clear-btn",function(t){a.setSearch("",!0),r(),t.preventDefault()}),r()}else console.error("ZUI: search box init error, cannot find search box input element.")};i.DEFAULTS={inputSelector:'input[type="search"],input[type="text"]',listenEvent:"change input paste",changeDelay:500},i.prototype.getSearch=function(){return this.$input&&t.trim(this.$input.val())},i.prototype.setSearch=function(t,e){var i=this.$input;i&&(i.val(t),e||i.trigger("change"))},i.prototype.focus=function(){this.$input&&this.$input.focus()},t.fn.searchBox=function(n){return this.each(function(){var a=t(this),o=a.data(e),s="object"==typeof n&&n;o||a.data(e,o=new i(this,s)),"string"==typeof n&&o[n]()})},i.NAME=e,t.fn.searchBox.Constructor=i}(jQuery),function(t,e){"use strict";var i="zui.draggable",n={container:"body",move:!0},a=0,o=function(e,i){var o=this;o.$=t(e),o.id=a++,o.options=t.extend({},n,o.$.data(),i),o.init()};o.DEFAULTS=n,o.NAME=i,o.prototype.init=function(){var n,a,o,s,r,l=this,c=l.$,d="before",h="drag",u="finish",p="."+i+"."+l.id,f="mousedown"+p,g="mouseup"+p,m="mousemove"+p,v=l.options,_=v.selector,y=v.handle,b=c,w=t.isFunction(v.move),k=function(t){var e=t.pageX,i=t.pageY;r=!0;var a={left:e-o.x,top:i-o.y};b.removeClass("drag-ready").addClass("dragging"),v.move&&(w?v.move(a,b):b.css(a)),v[h]&&v[h]({event:t,element:b,startOffset:o,pos:a,offset:{x:e-n.x,y:i-n.y},smallOffset:{x:e-s.x,y:i-s.y}}),s.x=e,s.y=i,v.stopPropagation&&t.stopPropagation()},x=function(i){if(t(e).off(p),!r)return void b.removeClass("drag-ready");var a={left:i.pageX-o.x,top:i.pageY-o.y};b.removeClass("drag-ready dragging"),v.move&&(w?v.move(a,b):b.css(a)),v[u]&&v[u]({event:i,element:b,startOffset:o,pos:a,offset:{x:i.pageX-n.x,y:i.pageY-n.y},smallOffset:{x:i.pageX-s.x,y:i.pageY-s.y}}),i.preventDefault(),v.stopPropagation&&i.stopPropagation()},C=function(i){var l=t.zui.getMouseButtonCode(v.mouseButton);if(!(l>-1&&i.button!==l)){var c=t(this);if(_&&(b=y?c.closest(_):c),v[d]){var h=v[d]({event:i,element:b});if(h===!1)return}var u=t(v.container),p=b.offset();a=u.offset(),n={x:i.pageX,y:i.pageY},o={x:i.pageX-p.left+a.left,y:i.pageY-p.top+a.top},s=t.extend({},n),r=!1,b.addClass("drag-ready"),i.preventDefault(),v.stopPropagation&&i.stopPropagation(),t(e).on(m,k).on(g,x)}};y?c.on(f,y,C):_?c.on(f,_,C):c.on(f,C)},o.prototype.destroy=function(){var n="."+i+"."+this.id;this.$.off(n),t(e).off(n),this.$.data(i,null)},t.fn.draggable=function(e){return this.each(function(){var n=t(this),a=n.data(i),s="object"==typeof e&&e;a||n.data(i,a=new o(this,s)),"string"==typeof e&&a[e]()})},t.fn.draggable.Constructor=o}(jQuery,document),function(t,e,i){"use strict";var n="zui.droppable",a={target:".droppable-target",deviation:5,sensorOffsetX:0,sensorOffsetY:0},o=0,s=function(e,i){var n=this;n.id=o++,n.$=t(e),n.options=t.extend({},a,n.$.data(),i),n.init()};s.DEFAULTS=a,s.NAME=n,s.prototype.trigger=function(e,i){return t.zui.callEvent(this.options[e],i,this)},s.prototype.init=function(){var a,o,s,r,l,c,d,h,u,p,f,g,m,v=this,_=v.$,y=v.options,b=y.deviation,w="."+n+"."+v.id,k="mousedown"+w,x="mouseup"+w,C="mousemove"+w,T=y.selector,S=y.handle,E=y.flex,D=y.container,M=y.canMoveHere,F=_,P=!1,A=D?t(y.container).first():T?_:t("body"),U=function(e){if(P&&(f={left:e.pageX,top:e.pageY},!(i.abs(f.left-h.left)o&&f.top>s&&f.left'+("string"==typeof i.loadingIcon&&0===i.loadingIcon.indexOf("icon-")?'':i.loadingIcon)+'
').appendTo("body").data(n,r);var h=function(e,n){var a=i[e];t.isFunction(a)&&d.on(n+o,a)};h("onShow","show"),h("shown","shown"),h("onHide","hide"),h("hidden","hidden"),h("loaded","loaded"),d.on("shown"+o,function(){r.isShown=!0}).on("hidden"+o,function(){r.isShown=!1}),this.$modal=d,this.$dialog=d.find(".modal-dialog"),i.mergeOptions&&(this.options=i)},r.prototype.show=function(i){var o=t.extend({},this.options,{url:this.$trigger?this.$trigger.attr("href")||this.$trigger.attr("data-url")||this.$trigger.data("url"):this.options.url},i);this.init(o);var r=this,l=this.$modal,c=this.$dialog,d=o.custom,h=c.find(".modal-body").css("padding",""),u=c.find(".modal-header"),p=c.find(".modal-content");l.toggleClass("fade",o.fade).addClass(o.className).toggleClass("modal-loading",!this.isShown),c.toggleClass("modal-md","md"===o.size).toggleClass("modal-sm","sm"===o.size).toggleClass("modal-lg","lg"===o.size).toggleClass("modal-fullscreen","fullscreen"===o.size),u.toggle(o.showHeader),u.find(".modal-icon").attr("class","modal-icon icon-"+o.icon),u.find(".modal-title-name").text(o.title||""),o.size&&"fullscreen"===o.size&&(o.width="",o.height="");var f=function(){clearTimeout(this.resizeTask),this.resizeTask=setTimeout(function(){r.ajustPosition(o.position)},100)},g=function(t,e){return"undefined"==typeof t&&(t=o.delay),setTimeout(function(){c=l.find(".modal-dialog"),o.width&&"auto"!=o.width&&c.css("width",o.width),o.height&&"auto"!=o.height&&(c.css("height",o.height),"iframe"===o.type&&h.css("height",c.height()-u.outerHeight())),r.ajustPosition(o.position),l.removeClass("modal-loading"),"iframe"!=o.type&&c.off("resize."+n).on("resize."+n,f),e&&e()},t)};if("custom"===o.type&&d)if(t.isFunction(d)){var m=d({modal:l,options:o,modalTrigger:r,ready:g});typeof m===s&&(h.html(m),g())}else d instanceof t?(h.html(t("").append(d.clone()).html()),g()):(h.html(d),g());else if(o.url){var v=function(){var t=l.callComEvent(r,"broken");t&&(h.html(t),g())};if(l.attr("ref",o.url),"iframe"===o.type){l.addClass("modal-iframe"),this.firstLoad=!0;var _="iframe-"+o.name;u.detach(),h.detach(),p.empty().append(u).append(h),h.css("padding",0).html(''),o.waittime>0&&(r.waitTimeout=g(o.waittime,v));var y=document.getElementById(_);y.onload=y.onreadystatechange=function(){if(r.firstLoad&&l.addClass("modal-loading"),!this.readyState||"complete"==this.readyState){r.firstLoad=!1,o.waittime>0&&clearTimeout(r.waitTimeout);try{l.attr("ref",y.contentWindow.location.href);var t=e.frames[_].$;if(t&&"auto"===o.height&&"fullscreen"!=o.size){var i=t("body").addClass("body-modal");o.iframeBodyClass&&i.addClass(o.iframeBodyClass);var a=function(t){l.removeClass("fade");var e=i.outerHeight();t===!0&&o.onlyIncreaseHeight&&(e=Math.max(e,h.data("minModalHeight")||0),h.data("minModalHeight",e)),h.css("height",e),o.fade&&l.addClass("fade"),g()};l.callComEvent(r,"loaded",{modalType:"iframe",jQuery:t}),setTimeout(a,100),i.off("resize."+n).on("resize."+n,f)}else g();t.extend({closeModal:e.closeModal})}catch(s){g()}}}}else t.ajax(t.extend({url:o.url,success:function(i){try{var n=t(i);n.filter(".modal-dialog").length?c.replaceWith(n):n.filter(".modal-content").length?c.find(".modal-content").replaceWith(n):h.wrapInner(n)}catch(o){e.console&&e.console.warn&&console.warn("ZUI: Cannot recogernize remote content.",{error:o,data:i}),l.html(i)}l.callComEvent(r,"loaded",{modalType:a}),g()},error:v},o.ajaxOptions))}l.modal({show:"show",backdrop:o.backdrop,moveable:o.moveable,rememberPos:o.rememberPos,keyboard:o.keyboard})},r.prototype.close=function(i,n){(i||n)&&this.$modal.on("hidden"+o,function(){t.isFunction(i)&&i(),typeof n===s&&("this"===n?e.location.reload():e.location=n)}),this.$modal.modal("hide")},r.prototype.toggle=function(t){this.isShown?this.close():this.show(t)},r.prototype.ajustPosition=function(e){e=e===i?this.options.position:e,t.isFunction(e)&&(e=e(this)),this.$modal.modal("ajustPosition",e)},t.zui({ModalTrigger:r,modalTrigger:new r}),t.fn.modalTrigger=function(e,i){return t(this).each(function(){var a=t(this),o=a.data(n),l=t.extend({title:a.attr("title")||a.text(),url:a.attr("href"),type:a.hasClass("iframe")?"iframe":""},a.data(),t.isPlainObject(e)&&e);o||a.data(n,o=new r(l,a)),typeof e==s?o[e](i):l.show&&o.show(i),a.on((l.trigger||"click")+".toggle."+n,function(t){o.toggle(l),a.is("a")&&t.preventDefault()})})};var l=t.fn.modal;t.fn.modal=function(e,i){return t(this).each(function(){var n=t(this);n.hasClass("modal")?l.call(n,e,i):n.modalTrigger(e,i)})};var c=function(e){var i=typeof e;return"undefined"===i?e=t(".modal.modal-trigger"):i===s&&(e=t(e)),e&&e instanceof t?e:null},d=function(e,i,a){if(t.isFunction(e)){var o=a;a=i,i=e,e=o}e=c(e),e&&e.length&&e.each(function(){t(this).data(n).close(i,a)})},h=function(t,e){e=c(e),e&&e.length&&e.modal("ajustPosition",t)};t.zui({closeModal:d,ajustModalPosition:h}),t(document).on("click."+n+".data-api",'[data-toggle="modal"]',function(e){var i=t(this),a=i.attr("href"),o=null;try{o=t(i.attr("data-target")||a&&a.replace(/.*(?=#[^\s]+$)/,""))}catch(s){}o&&o.length||(i.data(n)?i.trigger(".toggle."+n):i.modalTrigger({show:!0})),i.is("a")&&e.preventDefault()})}(window.jQuery,window,void 0),+function(t){"use strict";var e=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.init("tooltip",t,e)};e.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'
'}),e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),e.prototype.constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var t=this.tip(),e=this.getTarget();if(e)return e.find(".arrow").length<1&&t.addClass("no-arrow"),void t.html(e.html());var i=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](i),t.find(".popover-content")[this.options.html?"html":"text"](n),t.removeClass("fade top bottom left right in"),this.options.tipId&&t.attr("id",this.options.tipId),this.options.tipClass&&t.addClass(this.options.tipClass),t.find(".popover-title").html()||t.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTarget()||this.getTitle()||this.getContent()},e.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},e.prototype.getTarget=function(){var e=this.$element,i=this.options,n=e.attr("data-target")||("function"==typeof i.target?i.target.call(e[0]):i.target);return!!n&&("$next"==n?e.next(".popover"):t(n))},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},e.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var i=t.fn.popover;t.fn.popover=function(i){return this.each(function(){var n=t(this),a=n.data("zui.popover"),o="object"==typeof i&&i;
-a||n.data("zui.popover",a=new e(this,o)),"string"==typeof i&&a[i]()})},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(window.jQuery),+function(t){"use strict";function e(){t(a).remove(),t(o).each(function(e){var a=i(t(this));a.hasClass("open")&&(a.trigger(e=t.Event("hide."+n)),e.isDefaultPrevented()||a.removeClass("open").trigger("hidden."+n))})}function i(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var n;try{n=i&&t(i)}catch(a){}return n&&n.length?n:e.parent()}var n="zui.dropdown",a=".dropdown-backdrop",o="[data-toggle=dropdown]",s=function(e){t(e).on("click."+n,this.toggle)};s.prototype.toggle=function(a){var o=t(this);if(!o.is(".disabled, :disabled")){var s=i(o),r=s.hasClass("open");if(e(),!r){if("ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t('').insertAfter(t(this)).on("click",e),s.trigger(a=t.Event("show."+n)),a.isDefaultPrevented())return;s.toggleClass("open").trigger("shown."+n),o.focus()}return!1}},s.prototype.keydown=function(e){if(/(38|40|27)/.test(e.keyCode)){var n=t(this);if(e.preventDefault(),e.stopPropagation(),!n.is(".disabled, :disabled")){var a=i(n),s=a.hasClass("open");if(!s||s&&27==e.keyCode)return 27==e.which&&a.find(o).focus(),n.click();var r=t("[role=menu] li:not(.divider):visible a",a);if(r.length){var l=r.index(r.filter(":focus"));38==e.keyCode&&l>0&&l--,40==e.keyCode&&l',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.prototype.init=function(e,i,n){this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(n);for(var a=this.options.trigger.split(" "),o=a.length;o--;){var s=a[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var r="hover"==s?"mouseenter":"focus",l="hover"==s?"mouseleave":"blur";this.$element.on(r+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},e.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,n){i[t]!=n&&(e[t]=n)}),e},e.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type);return clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show()},e.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type);return clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()},e.prototype.show=function(e){var i=t.Event("show.zui."+this.type);if((e||this.hasContent())&&this.enabled){var n=this;if(n.$element.trigger(i),i.isDefaultPrevented())return;var a=n.tip();n.setContent(e),n.options.animation&&a.addClass("fade");var o="function"==typeof n.options.placement?n.options.placement.call(n,a[0],n.$element[0]):n.options.placement,s=/\s?auto?\s?/i,r=s.test(o);r&&(o=o.replace(s,"")||"top"),a.detach().css({top:0,left:0,display:"block"}).addClass(o),n.options.container?a.appendTo(n.options.container):a.insertAfter(n.$element);var l=n.getPosition(),c=a[0].offsetWidth,d=a[0].offsetHeight;if(r){var h=n.$element.parent(),u=o,p=document.documentElement.scrollTop||document.body.scrollTop,f="body"==n.options.container?window.innerWidth:h.outerWidth(),g="body"==n.options.container?window.innerHeight:h.outerHeight(),m="body"==n.options.container?0:h.offset().left;o="bottom"==o&&l.top+l.height+d-p>g?"top":"top"==o&&l.top-p-d<0?"bottom":"right"==o&&l.right+c>f?"left":"left"==o&&l.left-c
'+("string"==typeof i.loadingIcon&&0===i.loadingIcon.indexOf("icon-")?'':i.loadingIcon)+'
').appendTo("body").data(n,r);var h=function(e,n){var a=i[e];t.isFunction(a)&&d.on(n+o,a)};h("onShow","show"),h("shown","shown"),h("onHide","hide"),h("hidden","hidden"),h("loaded","loaded"),d.on("shown"+o,function(){r.isShown=!0}).on("hidden"+o,function(){r.isShown=!1}),this.$modal=d,this.$dialog=d.find(".modal-dialog"),i.mergeOptions&&(this.options=i)},r.prototype.show=function(i){var o=t.extend({},this.options,{url:this.$trigger?this.$trigger.attr("href")||this.$trigger.attr("data-url")||this.$trigger.data("url"):this.options.url},i);this.init(o);var r=this,l=this.$modal,c=this.$dialog,d=o.custom,h=c.find(".modal-body").css("padding",""),u=c.find(".modal-header"),p=c.find(".modal-content");l.toggleClass("fade",o.fade).addClass(o.className).toggleClass("modal-loading",!this.isShown),c.toggleClass("modal-md","md"===o.size).toggleClass("modal-sm","sm"===o.size).toggleClass("modal-lg","lg"===o.size).toggleClass("modal-fullscreen","fullscreen"===o.size),u.toggle(o.showHeader),u.find(".modal-icon").attr("class","modal-icon icon-"+o.icon),u.find(".modal-title-name").text(o.title||""),o.size&&"fullscreen"===o.size&&(o.width="",o.height="");var f=function(){clearTimeout(this.resizeTask),this.resizeTask=setTimeout(function(){r.ajustPosition(o.position)},100)},g=function(t,e){return"undefined"==typeof t&&(t=o.delay),setTimeout(function(){c=l.find(".modal-dialog"),o.width&&"auto"!=o.width&&c.css("width",o.width),o.height&&"auto"!=o.height&&(c.css("height",o.height),"iframe"===o.type&&h.css("height",c.height()-u.outerHeight())),r.ajustPosition(o.position),l.removeClass("modal-loading"),"iframe"!=o.type&&c.off("resize."+n).on("resize."+n,f),e&&e()},t)};if("custom"===o.type&&d)if(t.isFunction(d)){var m=d({modal:l,options:o,modalTrigger:r,ready:g});typeof m===s&&(h.html(m),g())}else d instanceof t?(h.html(t("").append(d.clone()).html()),g()):(h.html(d),g());else if(o.url){var v=function(){var t=l.callComEvent(r,"broken");t&&(h.html(t),g())};if(l.attr("ref",o.url),"iframe"===o.type){l.addClass("modal-iframe"),this.firstLoad=!0;var _="iframe-"+o.name;u.detach(),h.detach(),p.empty().append(u).append(h),h.css("padding",0).html(''),o.waittime>0&&(r.waitTimeout=g(o.waittime,v));var y=document.getElementById(_);y.onload=y.onreadystatechange=function(){if(r.firstLoad&&l.addClass("modal-loading"),!this.readyState||"complete"==this.readyState){r.firstLoad=!1,o.waittime>0&&clearTimeout(r.waitTimeout);try{l.attr("ref",y.contentWindow.location.href);var t=e.frames[_].$;if(t&&"auto"===o.height&&"fullscreen"!=o.size){var i=t("body").addClass("body-modal");o.iframeBodyClass&&i.addClass(o.iframeBodyClass);var a=function(t){l.removeClass("fade");var e=i.outerHeight();t===!0&&o.onlyIncreaseHeight&&(e=Math.max(e,h.data("minModalHeight")||0),h.data("minModalHeight",e)),h.css("height",e),o.fade&&l.addClass("fade"),g()};l.callComEvent(r,"loaded",{modalType:"iframe",jQuery:t}),setTimeout(a,100),i.off("resize."+n).on("resize."+n,f)}else g();t.extend({closeModal:e.closeModal})}catch(s){g()}}}}else t.ajax(t.extend({url:o.url,success:function(i){try{var n=t(i);n.filter(".modal-dialog").length?c.replaceWith(n):n.filter(".modal-content").length?c.find(".modal-content").replaceWith(n):h.wrapInner(n)}catch(o){e.console&&e.console.warn&&console.warn("ZUI: Cannot recogernize remote content.",{error:o,data:i}),l.html(i)}l.callComEvent(r,"loaded",{modalType:a}),g()},error:v},o.ajaxOptions))}l.modal({show:"show",backdrop:o.backdrop,moveable:o.moveable,rememberPos:o.rememberPos,keyboard:o.keyboard})},r.prototype.close=function(i,n){(i||n)&&this.$modal.on("hidden"+o,function(){t.isFunction(i)&&i(),typeof n===s&&("this"===n?e.location.reload():e.location=n)}),this.$modal.modal("hide")},r.prototype.toggle=function(t){this.isShown?this.close():this.show(t)},r.prototype.ajustPosition=function(e){e=e===i?this.options.position:e,t.isFunction(e)&&(e=e(this)),this.$modal.modal("ajustPosition",e)},t.zui({ModalTrigger:r,modalTrigger:new r}),t.fn.modalTrigger=function(e,i){return t(this).each(function(){var a=t(this),o=a.data(n),l=t.extend({title:a.attr("title")||a.text(),url:a.attr("href"),type:a.hasClass("iframe")?"iframe":""},a.data(),t.isPlainObject(e)&&e);o||a.data(n,o=new r(l,a)),typeof e==s?o[e](i):l.show&&o.show(i),a.on((l.trigger||"click")+".toggle."+n,function(t){o.toggle(l),a.is("a")&&t.preventDefault()})})};var l=t.fn.modal;t.fn.modal=function(e,i){return t(this).each(function(){var n=t(this);n.hasClass("modal")?l.call(n,e,i):n.modalTrigger(e,i)})};var c=function(e){var i=typeof e;return"undefined"===i?e=t(".modal.modal-trigger"):i===s&&(e=t(e)),e&&e instanceof t?e:null},d=function(e,i,a){if(t.isFunction(e)){var o=a;a=i,i=e,e=o}e=c(e),e&&e.length&&e.each(function(){t(this).data(n).close(i,a)})},h=function(t,e){e=c(e),e&&e.length&&e.modal("ajustPosition",t)};t.zui({closeModal:d,ajustModalPosition:h}),t(document).on("click."+n+".data-api",'[data-toggle="modal"]',function(e){var i=t(this),a=i.attr("href"),o=null;try{o=t(i.attr("data-target")||a&&a.replace(/.*(?=#[^\s]+$)/,""))}catch(s){}o&&o.length||(i.data(n)?i.trigger(".toggle."+n):i.modalTrigger({show:!0})),i.is("a")&&e.preventDefault()})}(window.jQuery,window,void 0),+function(t){"use strict";var e=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.init("tooltip",t,e)};e.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'
'}),e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),e.prototype.constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var t=this.tip(),e=this.getTarget();if(e)return e.find(".arrow").length<1&&t.addClass("no-arrow"),void t.html(e.html());var i=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](i),t.find(".popover-content")[this.options.html?"html":"text"](n),t.removeClass("fade top bottom left right in"),this.options.tipId&&t.attr("id",this.options.tipId),this.options.tipClass&&t.addClass(this.options.tipClass),t.find(".popover-title").html()||t.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTarget()||this.getTitle()||this.getContent()},e.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},e.prototype.getTarget=function(){var e=this.$element,i=this.options,n=e.attr("data-target")||("function"==typeof i.target?i.target.call(e[0]):i.target);return!!n&&("$next"==n?e.next(".popover"):t(n))},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},e.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var i=t.fn.popover;t.fn.popover=function(i){return this.each(function(){var n=t(this),a=n.data("zui.popover"),o="object"==typeof i&&i;
+a||n.data("zui.popover",a=new e(this,o)),"string"==typeof i&&a[i]()})},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(window.jQuery),+function(t){"use strict";function e(){t(a).remove(),t(o).each(function(e){var a=i(t(this));a.hasClass("open")&&(a.trigger(e=t.Event("hide."+n)),e.isDefaultPrevented()||a.removeClass("open").trigger("hidden."+n))})}function i(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var n;try{n=i&&t(i)}catch(a){}return n&&n.length?n:e.parent()}var n="zui.dropdown",a=".dropdown-backdrop",o="[data-toggle=dropdown]",s=function(e){t(e).on("click."+n,this.toggle)};s.prototype.toggle=function(a){var o=t(this);if(!o.is(".disabled, :disabled")){var s=i(o),r=s.hasClass("open");if(e(),!r){if("ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t('').insertAfter(t(this)).on("click",e),s.trigger(a=t.Event("show."+n)),a.isDefaultPrevented())return;s.toggleClass("open").trigger("shown."+n),o.focus()}return!1}},s.prototype.keydown=function(e){if(/(38|40|27)/.test(e.keyCode)){var n=t(this);if(e.preventDefault(),e.stopPropagation(),!n.is(".disabled, :disabled")){var a=i(n),s=a.hasClass("open");if(!s||s&&27==e.keyCode)return 27==e.which&&a.find(o).focus(),n.click();var r=t("[role=menu] li:not(.divider):visible a",a);if(r.length){var l=r.index(r.filter(":focus"));38==e.keyCode&&l>0&&l--,40==e.keyCode&&l',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.prototype.init=function(e,i,n){this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(n);for(var a=this.options.trigger.split(" "),o=a.length;o--;){var s=a[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var r="hover"==s?"mouseenter":"focus",l="hover"==s?"mouseleave":"blur";this.$element.on(r+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},e.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,n){i[t]!=n&&(e[t]=n)}),e},e.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type);return clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show()},e.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type);return clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()},e.prototype.show=function(e){var i=t.Event("show.zui."+this.type);if((e||this.hasContent())&&this.enabled){var n=this;if(n.$element.trigger(i),i.isDefaultPrevented())return;var a=n.tip();n.setContent(e),n.options.animation&&a.addClass("fade");var o="function"==typeof n.options.placement?n.options.placement.call(n,a[0],n.$element[0]):n.options.placement,s=/\s?auto?\s?/i,r=s.test(o);r&&(o=o.replace(s,"")||"top"),a.detach().css({top:0,left:0,display:"block"}).addClass(o),n.options.container?a.appendTo(n.options.container):a.insertAfter(n.$element);var l=n.getPosition(),c=a[0].offsetWidth,d=a[0].offsetHeight;if(r){var h=n.$element.parent(),u=o,p=document.documentElement.scrollTop||document.body.scrollTop,f="body"==n.options.container?window.innerWidth:h.outerWidth(),g="body"==n.options.container?window.innerHeight:h.outerHeight(),m="body"==n.options.container?0:h.offset().left;o="bottom"==o&&l.top+l.height+d-p>g?"top":"top"==o&&l.top-p-d<0?"bottom":"right"==o&&l.right+c>f?"left":"left"==o&&l.left-c
- <% for (var i=0; i
- <%if(segments[i].label){%><%=segments[i].label%><%}%> <%}%>