forked from shaba/openuds
This commit is contained in:
parent
48dcd97f5c
commit
71d0cbaf8c
525
server/src/uds/static/adm/js/admin.min.js
vendored
525
server/src/uds/static/adm/js/admin.min.js
vendored
@ -1,525 +0,0 @@
|
||||
(function(a){"function"===typeof define&&define.amd?define(["jquery"],a):a(jQuery)})(function(a){function c(b){return f.raw?b:encodeURIComponent(b)}function e(c,d){var e;if(f.raw)e=c;else a:{var n=c;0===n.indexOf('"')&&(n=n.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{n=decodeURIComponent(n.replace(b," "))}catch(l){e=void 0;break a}try{e=f.json?JSON.parse(n):n;break a}catch(k){}e=void 0}return a.isFunction(d)?d(e):e}var b=/\+/g,f=a.cookie=function(b,d,m){if(void 0!==d&&!a.isFunction(d)){m=
|
||||
a.extend({},f.defaults,m);if("number"===typeof m.expires){var n=m.expires,l=m.expires=new Date;l.setDate(l.getDate()+n)}return document.cookie=[c(b),"=",c(f.json?JSON.stringify(d):String(d)),m.expires?"; expires="+m.expires.toUTCString():"",m.path?"; path="+m.path:"",m.domain?"; domain="+m.domain:"",m.secure?"; secure":""].join("")}m=b?void 0:{};for(var n=document.cookie?document.cookie.split("; "):[],l=0,k=n.length;l<k;l++){var r=n[l].split("="),p;p=r.shift();p=f.raw?p:decodeURIComponent(p);r=r.join("=");
|
||||
if(b&&b===p){m=e(r,d);break}b||void 0===(r=e(r))||(m[p]=r)}return m};f.defaults={};a.removeCookie=function(b,f){return void 0!==a.cookie(b)?(a.cookie(b,"",a.extend({},f,{expires:-1})),!0):!1}});if(!jQuery)throw Error("Bootstrap requires jQuery");
|
||||
+function(a){a.fn.emulateTransitionEnd=function(c){var e=!1,b=this;a(this).one(a.support.transition.end,function(){e=!0});return setTimeout(function(){e||a(b).trigger(a.support.transition.end)},c),this};a(function(){var c=a.support,e;a:{e=document.createElement("bootstrap");var b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},f;for(f in b)if(void 0!==e.style[f]){e={end:b[f]};break a}e=void 0}c.transition=
|
||||
e})}(window.jQuery);
|
||||
+function(a){var c=function(b){a(b).on("click",'[data-dismiss="alert"]',this.close)};c.prototype.close=function(b){function f(){e.trigger("closed.bs.alert").remove()}var c=a(this),d=c.attr("data-target");d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));var e=a(d);b&&b.preventDefault();e.length||(e=c.hasClass("alert")?c:c.parent());e.trigger(b=a.Event("close.bs.alert"));b.isDefaultPrevented()||(e.removeClass("in"),a.support.transition&&e.hasClass("fade")?e.one(a.support.transition.end,f).emulateTransitionEnd(150):
|
||||
f())};var e=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var f=a(this),g=f.data("bs.alert");g||f.data("bs.alert",g=new c(this));"string"==typeof b&&g[b].call(f)})};a.fn.alert.Constructor=c;a.fn.alert.noConflict=function(){return a.fn.alert=e,this};a(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',c.prototype.close)}(window.jQuery);
|
||||
+function(a){var c=function(b,f){this.$element=a(b);this.options=a.extend({},c.DEFAULTS,f)};c.DEFAULTS={loadingText:"loading..."};c.prototype.setState=function(b){var f=this.$element,a=f.is("input")?"val":"html",c=f.data();b+="Text";c.resetText||f.data("resetText",f[a]());f[a](c[b]||this.options[b]);setTimeout(function(){"loadingText"==b?f.addClass("disabled").attr("disabled","disabled"):f.removeClass("disabled").removeAttr("disabled")},0)};c.prototype.toggle=function(){var b=this.$element.closest('[data-toggle="buttons"]');
|
||||
b.length&&"radio"===this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change").prop("type")&&b.find(".active").removeClass("active");this.$element.toggleClass("active")};var e=a.fn.button;a.fn.button=function(b){return this.each(function(){var f=a(this),g=f.data("bs.button"),d="object"==typeof b&&b;g||f.data("bs.button",g=new c(this,d));"toggle"==b?g.toggle():b&&g.setState(b)})};a.fn.button.Constructor=c;a.fn.button.noConflict=function(){return a.fn.button=e,this};
|
||||
a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var f=a(b.target);f.hasClass("btn")||(f=f.closest(".btn"));f.button("toggle");b.preventDefault()})}(window.jQuery);
|
||||
+function(a){var c=function(b,f){this.$element=a(b);this.$indicators=this.$element.find(".carousel-indicators");this.options=f;this.paused=this.sliding=this.interval=this.$active=this.$items=null;"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};c.DEFAULTS={interval:5E3,pause:"hover",wrap:!0};c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&
|
||||
(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this};c.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)};c.prototype.to=function(b){var f=this,c=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid",function(){f.to(b)}):c==b?this.pause().cycle():this.slide(b>c?"next":"prev",a(this.$items[b]))};c.prototype.pause=
|
||||
function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this};c.prototype.next=function(){return this.sliding?void 0:this.slide("next")};c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")};c.prototype.slide=function(b,f){var c=this.$element.find(".item.active"),d=f||c[b](),e=this.interval,n="next"==b?"left":"right",l=
|
||||
"next"==b?"first":"last",k=this;if(!d.length){if(!this.options.wrap)return;d=this.$element.find(".item")[l]()}this.sliding=!0;e&&this.pause();l=a.Event("slide.bs.carousel",{relatedTarget:d[0],direction:n});if(!d.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(k.$indicators.children()[k.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(l),
|
||||
l.isDefaultPrevented())return;d.addClass(b);d[0].offsetWidth;c.addClass(n);d.addClass(n);c.one(a.support.transition.end,function(){d.removeClass([b,n].join(" ")).addClass("active");c.removeClass(["active",n].join(" "));k.sliding=!1;setTimeout(function(){k.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(l),l.isDefaultPrevented())return;c.removeClass("active");d.addClass("active");this.sliding=!1;this.$element.trigger("slid")}return e&&this.cycle(),this}};var e=
|
||||
a.fn.carousel;a.fn.carousel=function(b){return this.each(function(){var f=a(this),g=f.data("bs.carousel"),d=a.extend({},c.DEFAULTS,f.data(),"object"==typeof b&&b),e="string"==typeof b?b:d.slide;g||f.data("bs.carousel",g=new c(this,d));"number"==typeof b?g.to(b):e?g[e]():d.interval&&g.pause().cycle()})};a.fn.carousel.Constructor=c;a.fn.carousel.noConflict=function(){return a.fn.carousel=e,this};a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var f,c=a(this),
|
||||
d=a(c.attr("data-target")||(f=c.attr("href"))&&f.replace(/.*(?=#[^\s]+$)/,""));f=a.extend({},d.data(),c.data());var e=c.attr("data-slide-to");e&&(f.interval=!1);d.carousel(f);(e=c.attr("data-slide-to"))&&d.data("bs.carousel").to(e);b.preventDefault()});a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(window.jQuery);
|
||||
+function(a){var c=function(b,f){this.$element=a(b);this.options=a.extend({},c.DEFAULTS,f);this.transitioning=null;this.options.parent&&(this.$parent=a(this.options.parent));this.options.toggle&&this.toggle()};c.DEFAULTS={toggle:!0};c.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"};c.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){if((b=this.$parent&&
|
||||
this.$parent.find("> .panel > .in"))&&b.length){var f=b.data("bs.collapse");if(f&&f.transitioning)return;b.collapse("hide");f||b.data("bs.collapse",null)}var c=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[c](0);this.transitioning=1;b=function(){this.$element.removeClass("collapsing").addClass("in")[c]("auto");this.transitioning=0;this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return b.call(this);f=a.camelCase(["scroll",c].join("-"));this.$element.one(a.support.transition.end,
|
||||
a.proxy(b,this)).emulateTransitionEnd(350)[c](this.$element[0][f])}}};c.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){b=this.dimension();this.$element[b](this.$element[b]())[0].offsetHeight;this.$element.addClass("collapsing").removeClass("collapse").removeClass("in");this.transitioning=1;var f=function(){this.transitioning=0;this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};
|
||||
return a.support.transition?(this.$element[b](0).one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350),void 0):f.call(this)}}};c.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var e=a.fn.collapse;a.fn.collapse=function(b){return this.each(function(){var f=a(this),g=f.data("bs.collapse"),d=a.extend({},c.DEFAULTS,f.data(),"object"==typeof b&&b);g||f.data("bs.collapse",g=new c(this,d));"string"==typeof b&&g[b]()})};a.fn.collapse.Constructor=c;a.fn.collapse.noConflict=
|
||||
function(){return a.fn.collapse=e,this};a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var f,c=a(this);b=c.attr("data-target")||b.preventDefault()||(f=c.attr("href"))&&f.replace(/.*(?=#[^\s]+$)/,"");f=a(b);var d=(b=f.data("bs.collapse"))?"toggle":c.data(),e=c.attr("data-parent"),n=e&&a(e);b&&b.transitioning||(n&&n.find('[data-toggle=collapse][data-parent="'+e+'"]').not(c).addClass("collapsed"),c[f.hasClass("in")?"addClass":"removeClass"]("collapsed"));f.collapse(d)})}(window.jQuery);
|
||||
+function(a){function c(){a(b).remove();a(f).each(function(b){var f=e(a(this));f.hasClass("open")&&(f.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||f.removeClass("open").trigger("hidden.bs.dropdown"))})}function e(b){var f=b.attr("data-target");f||(f=b.attr("href"),f=f&&/#/.test(f)&&f.replace(/.*(?=#[^\s]*$)/,""));return(f=f&&a(f))&&f.length?f:b.parent()}var b=".dropdown-backdrop",f="[data-toggle=dropdown]",g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.prototype.toggle=
|
||||
function(b){var f=a(this);if(!f.is(".disabled, :disabled")){var d=e(f),g=d.hasClass("open");if(c(),!g){if("ontouchstart"in document.documentElement&&!d.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",c),d.trigger(b=a.Event("show.bs.dropdown")),b.isDefaultPrevented())return;d.toggleClass("open").trigger("shown.bs.dropdown");f.focus()}return!1}};g.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var c=a(this);if(b.preventDefault(),b.stopPropagation(),
|
||||
!c.is(".disabled, :disabled")){var d=e(c),g=d.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&d.find(f).focus(),c.click();c=a("[role=menu] li:not(.divider):visible a",d);c.length&&(d=c.index(c.filter(":focus")),38==b.keyCode&&0<d&&d--,40==b.keyCode&&d<c.length-1&&d++,~d||(d=0),c.eq(d).focus())}}};var d=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var f=a(this),c=f.data("dropdown");c||f.data("dropdown",c=new g(this));"string"==typeof b&&c[b].call(f)})};a.fn.dropdown.Constructor=
|
||||
g;a.fn.dropdown.noConflict=function(){return a.fn.dropdown=d,this};a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(b){b.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f+", [role=menu]",g.prototype.keydown)}(window.jQuery);
|
||||
+function(a){var c=function(b,f){this.options=f;this.$element=a(b);this.$backdrop=this.isShown=null;this.options.remote&&this.$element.load(this.options.remote)};c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0};c.prototype.toggle=function(b){return this[this.isShown?"hide":"show"](b)};c.prototype.show=function(b){var f=this,c=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(c);this.isShown||c.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="modal"]',
|
||||
a.proxy(this.hide,this)),this.backdrop(function(){var c=a.support.transition&&f.$element.hasClass("fade");f.$element.parent().length||f.$element.appendTo(document.body);f.$element.show();c&&f.$element[0].offsetWidth;f.$element.addClass("in").attr("aria-hidden",!1);f.enforceFocus();var g=a.Event("shown.bs.modal",{relatedTarget:b});c?f.$element.find(".modal-dialog").one(a.support.transition.end,function(){f.$element.focus().trigger(g)}).emulateTransitionEnd(300):f.$element.focus().trigger(g)}))};c.prototype.hide=
|
||||
function(b){b&&b.preventDefault();b=a.Event("hide.bs.modal");this.$element.trigger(b);this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())};c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",
|
||||
a.proxy(function(b){this.$element[0]===b.target||this.$element.has(b.target).length||this.$element.focus()},this))};c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(b){27==b.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")};c.prototype.hideModal=function(){var b=this;this.$element.hide();this.backdrop(function(){b.removeBackdrop();b.$element.trigger("hidden.bs.modal")})};c.prototype.removeBackdrop=
|
||||
function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};c.prototype.backdrop=function(b){var f=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var c=a.support.transition&&f;if(this.$backdrop=a('<div class="modal-backdrop '+f+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",a.proxy(function(b){b.target===b.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),
|
||||
c&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),b)c?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var e=a.fn.modal;a.fn.modal=function(b,f){return this.each(function(){var g=a(this),d=g.data("bs.modal"),e=a.extend({},c.DEFAULTS,g.data(),"object"==typeof b&&
|
||||
b);d||g.data("bs.modal",d=new c(this,e));"string"==typeof b?d[b](f):e.show&&d.show(f)})};a.fn.modal.Constructor=c;a.fn.modal.noConflict=function(){return a.fn.modal=e,this};a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var f=a(this),c=f.attr("href"),d=a(f.attr("data-target")||c&&c.replace(/.*(?=#[^\s]+$)/,"")),c=d.data("modal")?"toggle":a.extend({remote:!/#/.test(c)&&c},d.data(),f.data());b.preventDefault();d.modal(c,this).one("hide",function(){f.is(":visible")&&f.focus()})});
|
||||
a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(window.jQuery);
|
||||
+function(a){var c=function(b,f){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null;this.init("tooltip",b,f)};c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1};c.prototype.init=function(b,f,c){this.enabled=!0;this.type=b;this.$element=a(f);this.options=this.getOptions(c);b=this.options.trigger.split(" ");
|
||||
for(f=b.length;f--;)if(c=b[f],"click"==c)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=c){var d="hover"==c?"mouseleave":"blur";this.$element.on(("hover"==c?"mouseenter":"focus")+"."+this.type,this.options.selector,a.proxy(this.enter,this));this.$element.on(d+"."+this.type,this.options.selector,a.proxy(this.leave,this))}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};c.prototype.getDefaults=
|
||||
function(){return c.DEFAULTS};c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b};c.prototype.getDelegateOptions=function(){var b={},f=this.getDefaults();return this._options&&a.each(this._options,function(a,c){f[a]!=c&&(b[a]=c)}),b};c.prototype.enter=function(b){var f=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);
|
||||
return clearTimeout(f.timeout),f.hoverState="in",f.options.delay&&f.options.delay.show?(f.timeout=setTimeout(function(){"in"==f.hoverState&&f.show()},f.options.delay.show),void 0):f.show()};c.prototype.leave=function(b){var f=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(f.timeout),f.hoverState="out",f.options.delay&&f.options.delay.hide?(f.timeout=setTimeout(function(){"out"==f.hoverState&&f.hide()},f.options.delay.hide),
|
||||
void 0):f.hide()};c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled&&(this.$element.trigger(b),!b.isDefaultPrevented())){var f=this.tip();this.setContent();this.options.animation&&f.addClass("fade");var b="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,c=/\s?auto?\s?/i,d=c.test(b);d&&(b=b.replace(c,"")||"top");f.detach().css({top:0,left:0,display:"block"}).addClass(b);this.options.container?
|
||||
f.appendTo(this.options.container):f.insertAfter(this.$element);var c=this.getPosition(),e=f[0].offsetWidth,n=f[0].offsetHeight;if(d){var l=this.$element.parent(),d=b,k=document.documentElement.scrollTop||document.body.scrollTop,r="body"==this.options.container?window.innerWidth:l.outerWidth(),p="body"==this.options.container?window.innerHeight:l.outerHeight(),l="body"==this.options.container?0:l.offset().left,b="bottom"==b&&c.top+c.height+n-k>p?"top":"top"==b&&0>c.top-k-n?"bottom":"right"==b&&c.right+
|
||||
e>r?"left":"left"==b&&c.left-e<l?"right":b;f.removeClass(d).addClass(b)}f=this.getCalculatedOffset(b,c,e,n);this.applyPlacement(f,b);this.$element.trigger("shown.bs."+this.type)}};c.prototype.applyPlacement=function(b,f){var a,c=this.tip(),e=c[0].offsetWidth,n=c[0].offsetHeight,l=parseInt(c.css("margin-top"),10),k=parseInt(c.css("margin-left"),10);isNaN(l)&&(l=0);isNaN(k)&&(k=0);b.top+=l;b.left+=k;c.offset(b).addClass("in");l=c[0].offsetWidth;k=c[0].offsetHeight;("top"==f&&k!=n&&(a=!0,b.top=b.top+
|
||||
n-k),/bottom|top/.test(f))?(n=0,0>b.left&&(n=-2*b.left,b.left=0,c.offset(b),l=c[0].offsetWidth),this.replaceArrow(n-e+l,l,"left")):this.replaceArrow(k-n,k,"top");a&&c.offset(b)};c.prototype.replaceArrow=function(b,f,a){this.arrow().css(a,b?50*(1-b/f)+"%":"")};c.prototype.setContent=function(){var b=this.tip(),f=this.getTitle();b.find(".tooltip-inner")[this.options.html?"html":"text"](f);b.removeClass("fade in top bottom left right")};c.prototype.hide=function(){function b(){"in"!=f.hoverState&&c.detach()}
|
||||
var f=this,c=this.tip(),d=a.Event("hide.bs."+this.type);return this.$element.trigger(d),d.isDefaultPrevented()?void 0:(c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?c.one(a.support.transition.end,b).emulateTransitionEnd(150):b(),this.$element.trigger("hidden.bs."+this.type),this)};c.prototype.fixTitle=function(){var b=this.$element;(b.attr("title")||"string"!=typeof b.attr("data-original-title"))&&b.attr("data-original-title",b.attr("title")||"").attr("title","")};c.prototype.hasContent=
|
||||
function(){return this.getTitle()};c.prototype.getPosition=function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())};c.prototype.getCalculatedOffset=function(b,f,a,c){return"bottom"==b?{top:f.top+f.height,left:f.left+f.width/2-a/2}:"top"==b?{top:f.top-c,left:f.left+f.width/2-a/2}:"left"==b?{top:f.top+f.height/2-c/2,left:f.left-a}:{top:f.top+f.height/2-c/2,left:f.left+
|
||||
f.width}};c.prototype.getTitle=function(){var b=this.$element,f=this.options;return b.attr("data-original-title")||("function"==typeof f.title?f.title.call(b[0]):f.title)};c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)};c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};c.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)};c.prototype.enable=function(){this.enabled=
|
||||
!0};c.prototype.disable=function(){this.enabled=!1};c.prototype.toggleEnabled=function(){this.enabled=!this.enabled};c.prototype.toggle=function(b){b=b?a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;b.tip().hasClass("in")?b.leave(b):b.enter(b)};c.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var e=a.fn.tooltip;a.fn.tooltip=function(b){return this.each(function(){var f=a(this),g=f.data("bs.tooltip"),d="object"==
|
||||
typeof b&&b;g||f.data("bs.tooltip",g=new c(this,d));"string"==typeof b&&g[b]()})};a.fn.tooltip.Constructor=c;a.fn.tooltip.noConflict=function(){return a.fn.tooltip=e,this}}(window.jQuery);
|
||||
+function(a){var c=function(b,f){this.init("popover",b,f)};if(!a.fn.tooltip)throw Error("Popover requires tooltip.js");c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'});c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype);c.prototype.constructor=c;c.prototype.getDefaults=function(){return c.DEFAULTS};c.prototype.setContent=
|
||||
function(){var b=this.tip(),f=this.getTitle(),a=this.getContent();b.find(".popover-title")[this.options.html?"html":"text"](f);b.find(".popover-content")[this.options.html?"html":"text"](a);b.removeClass("fade top bottom left right in");b.find(".popover-title").html()||b.find(".popover-title").hide()};c.prototype.hasContent=function(){return this.getTitle()||this.getContent()};c.prototype.getContent=function(){var b=this.$element,f=this.options;return b.attr("data-content")||("function"==typeof f.content?
|
||||
f.content.call(b[0]):f.content)};c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};c.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var e=a.fn.popover;a.fn.popover=function(b){return this.each(function(){var f=a(this),g=f.data("bs.popover"),d="object"==typeof b&&b;g||f.data("bs.popover",g=new c(this,d));"string"==typeof b&&g[b]()})};a.fn.popover.Constructor=c;a.fn.popover.noConflict=function(){return a.fn.popover=e,
|
||||
this}}(window.jQuery);
|
||||
+function(a){function c(b,f){var g,d=a.proxy(this.process,this);this.$element=a(b).is("body")?a(window):a(b);this.$body=a("body");this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",d);this.options=a.extend({},c.DEFAULTS,f);this.selector=(this.options.target||(g=a(b).attr("href"))&&g.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a";this.offsets=a([]);this.targets=a([]);this.activeTarget=null;this.refresh();this.process()}c.DEFAULTS={offset:10};c.prototype.refresh=function(){var b=
|
||||
this.$element[0]==window?"offset":"position";this.offsets=a([]);this.targets=a([]);var f=this;this.$body.find(this.selector).map(function(){var c=a(this),c=c.data("target")||c.attr("href"),d=/^#\w/.test(c)&&a(c);return d&&d.length&&[[d[b]().top+(!a.isWindow(f.$scrollElement.get(0))&&f.$scrollElement.scrollTop()),c]]||null}).sort(function(b,f){return b[0]-f[0]}).each(function(){f.offsets.push(this[0]);f.targets.push(this[1])})};c.prototype.process=function(){var b,f=this.$scrollElement.scrollTop()+
|
||||
this.options.offset,a=(this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight)-this.$scrollElement.height(),c=this.offsets,e=this.targets,n=this.activeTarget;if(f>=a)return n!=(b=e.last()[0])&&this.activate(b);for(b=c.length;b--;)n!=e[b]&&f>=c[b]&&(!c[b+1]||f<=c[b+1])&&this.activate(e[b])};c.prototype.activate=function(b){this.activeTarget=b;a(this.selector).parents(".active").removeClass("active");b=a(this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]').parents("li").addClass("active");
|
||||
b.parent(".dropdown-menu").length&&(b=b.closest("li.dropdown").addClass("active"));b.trigger("activate")};var e=a.fn.scrollspy;a.fn.scrollspy=function(b){return this.each(function(){var f=a(this),g=f.data("bs.scrollspy"),d="object"==typeof b&&b;g||f.data("bs.scrollspy",g=new c(this,d));"string"==typeof b&&g[b]()})};a.fn.scrollspy.Constructor=c;a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=e,this};a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery);
|
||||
+function(a){var c=function(b){this.element=a(b)};c.prototype.show=function(){var b=this.element,f=b.closest("ul:not(.dropdown-menu)"),c=b.attr("data-target");if(c||(c=b.attr("href"),c=c&&c.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var d=f.find(".active:last a")[0],e=a.Event("show.bs.tab",{relatedTarget:d});(b.trigger(e),e.isDefaultPrevented())||(c=a(c),this.activate(b.parent("li"),f),this.activate(c,c.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:d})}))}};
|
||||
c.prototype.activate=function(b,f,c){function d(){e.removeClass("active").find("> .dropdown-menu > .active").removeClass("active");b.addClass("active");n?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade");b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active");c&&c()}var e=f.find("> .active"),n=c&&a.support.transition&&e.hasClass("fade");n?e.one(a.support.transition.end,d).emulateTransitionEnd(150):d();e.removeClass("in")};var e=a.fn.tab;a.fn.tab=function(b){return this.each(function(){var f=
|
||||
a(this),e=f.data("bs.tab");e||f.data("bs.tab",e=new c(this));"string"==typeof b&&e[b]()})};a.fn.tab.Constructor=c;a.fn.tab.noConflict=function(){return a.fn.tab=e,this};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault();a(this).tab("show")})}(window.jQuery);
|
||||
+function(a){var c=function(b,f){this.options=a.extend({},c.DEFAULTS,f);this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this));this.$element=a(b);this.affixed=this.unpin=null;this.checkPosition()};c.RESET="affix affix-top affix-bottom";c.DEFAULTS={offset:0};c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)};c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=
|
||||
a(document).height(),f=this.$window.scrollTop(),e=this.$element.offset(),d=this.options.offset,m=d.top,n=d.bottom;"object"!=typeof d&&(n=m=d);"function"==typeof m&&(m=d.top());"function"==typeof n&&(n=d.bottom());b=null!=this.unpin&&f+this.unpin<=e.top?!1:null!=n&&e.top+this.$element.height()>=b-n?"bottom":null!=m&&m>=f?"top":!1;this.affixed!==b&&(this.unpin&&this.$element.css("top",""),this.affixed=b,this.unpin="bottom"==b?e.top-f:null,this.$element.removeClass(c.RESET).addClass("affix"+(b?"-"+b:
|
||||
"")),"bottom"==b&&this.$element.offset({top:document.body.offsetHeight-n-this.$element.height()}))}};var e=a.fn.affix;a.fn.affix=function(b){return this.each(function(){var f=a(this),e=f.data("bs.affix"),d="object"==typeof b&&b;e||f.data("bs.affix",e=new c(this,d));"string"==typeof b&&e[b]()})};a.fn.affix.Constructor=c;a.fn.affix.noConflict=function(){return a.fn.affix=e,this};a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),f=b.data();f.offset=f.offset||{};f.offsetBottom&&
|
||||
(f.offset.bottom=f.offsetBottom);f.offsetTop&&(f.offset.top=f.offsetTop);b.affix(f)})})}(window.jQuery);!function(a){a.fn.bootstrapSwitch=function(c){var e={init:function(){return this.each(function(){var b=a(this),f,c,d,e,n=b.closest("form"),l="",k=b.attr("class"),r;c="ON";e="OFF";var p=f=!1;a.each(["switch-mini","switch-small","switch-large"],function(b,f){0<=k.indexOf(f)&&(l=f)});b.addClass("has-switch");void 0!==b.data("on")&&(d="switch-"+b.data("on"));void 0!==b.data("on-label")&&(c=b.data("on-label"));void 0!==b.data("off-label")&&(e=b.data("off-label"));void 0!==b.data("label-icon")&&(f=b.data("label-icon"));
|
||||
void 0!==b.data("text-label")&&(p=b.data("text-label"));c=a("<span>").addClass("switch-left").addClass(l).addClass(d).html(c);d="";void 0!==b.data("off")&&(d="switch-"+b.data("off"));d=a("<span>").addClass("switch-right").addClass(l).addClass(d).html(e);e=a("<label>").html(" ").addClass(l).attr("for",b.find('input[type!="hidden"]').attr("id"));f&&e.html('<i class="icon '+f+'"></i>');p&&e.html(""+p+"");f=b.find('input[type!="hidden"]').wrap(a("<div>")).parent().data("animated",!1);!1!==b.data("animated")&&
|
||||
f.addClass("switch-animate").data("animated",!0);f.append(c).append(e).append(d);b.find(">div").addClass(b.find('input[type!="hidden"]').is(":checked")?"switch-on":"switch-off");b.find('input[type!="hidden"]').is(":disabled")&&a(this).addClass("deactivate");var t=function(f){b.parent("label").is(".label-change-switch")||f.siblings("label").trigger("mousedown").trigger("mouseup").trigger("click")};b.on("keydown",function(b){32===b.keyCode&&(b.stopImmediatePropagation(),b.preventDefault(),t(a(b.target).find("span:first")))});
|
||||
c.on("click",function(b){t(a(this))});d.on("click",function(b){t(a(this))});b.find('input[type!="hidden"]').on("change",function(b,f){var c=a(this),d=c.parent(),e=c.is(":checked"),g=d.is(".switch-off");b.preventDefault();d.css("left","");g===e&&(e?d.removeClass("switch-off").addClass("switch-on"):d.removeClass("switch-on").addClass("switch-off"),!1!==d.data("animated")&&d.addClass("switch-animate"),"boolean"===typeof f&&f||d.parent().trigger("switch-change",{el:c,value:e}))});b.find("label").on("mousedown touchstart",
|
||||
function(b){var f=a(this);r=!1;b.preventDefault();b.stopImmediatePropagation();f.closest("div").removeClass("switch-animate");f.closest(".has-switch").is(".deactivate")?f.unbind("click"):f.closest(".switch-on").parent().is(".radio-no-uncheck")?f.unbind("click"):(f.on("mousemove touchmove",function(b){var f=a(this).closest(".make-switch");b=100*(((b.pageX||b.originalEvent.targetTouches[0].pageX)-f.offset().left)/f.width());r=!0;25>b?b=25:75<b&&(b=75);f.find(">div").css("left",b-75+"%")}),f.on("click touchend",
|
||||
function(b){var f=a(this),c=a(b.target).siblings("input");b.stopImmediatePropagation();b.preventDefault();f.unbind("mouseleave");r?c.prop("checked",!(-25>parseInt(f.parent().css("left")))):c.prop("checked",!c.is(":checked"));r=!1;c.trigger("change")}),f.on("mouseleave",function(b){var f=a(this),c=f.siblings("input");b.preventDefault();b.stopImmediatePropagation();f.unbind("mouseleave");f.trigger("mouseup");c.prop("checked",!(-25>parseInt(f.parent().css("left")))).trigger("change")}),f.on("mouseup",
|
||||
function(b){b.stopImmediatePropagation();b.preventDefault();a(this).unbind("mousemove")}))});"injected"!==n.data("bootstrapSwitch")&&(n.bind("reset",function(){setTimeout(function(){n.find(".make-switch").each(function(){var b=a(this).find('input[type!="hidden"]');b.prop("checked",b.is(":checked")).trigger("change")})},1)}),n.data("bootstrapSwitch","injected"))})},toggleActivation:function(){var b=a(this);b.toggleClass("deactivate");b.find('input[type!="hidden"]').prop("disabled",b.is(".deactivate"))},
|
||||
isActive:function(){return!a(this).hasClass("deactivate")},setActive:function(b){var f=a(this);b?(f.removeClass("deactivate"),f.find('input[type!="hidden"]').removeAttr("disabled")):(f.addClass("deactivate"),f.find('input[type!="hidden"]').attr("disabled","disabled"))},toggleState:function(b){var f=a(this).find(":checkbox");f.prop("checked",!f.is(":checked")).trigger("change",b)},toggleRadioState:function(b){var f=a(this).find(":radio");f.not(":checked").prop("checked",!f.is(":checked")).trigger("change",
|
||||
b)},toggleRadioStateAllowUncheck:function(b,f){var c=a(this).find(":radio");b?c.not(":checked").trigger("change",f):c.not(":checked").prop("checked",!c.is(":checked")).trigger("change",f)},setState:function(b,f){a(this).find('input[type!="hidden"]').prop("checked",b).trigger("change",f)},setOnLabel:function(b){a(this).find(".switch-left").html(b)},setOffLabel:function(b){a(this).find(".switch-right").html(b)},setOnClass:function(b){var f=a(this).find(".switch-left"),c="";void 0!==b&&(void 0!==a(this).attr("data-on")&&
|
||||
(c="switch-"+a(this).attr("data-on")),f.removeClass(c),f.addClass("switch-"+b))},setOffClass:function(b){var f=a(this).find(".switch-right"),c="";void 0!==b&&(void 0!==a(this).attr("data-off")&&(c="switch-"+a(this).attr("data-off")),f.removeClass(c),f.addClass("switch-"+b))},setAnimated:function(b){var f=a(this).find('input[type!="hidden"]').parent();void 0===b&&(b=!1);f.data("animated",b);f.attr("data-animated",b);!1!==f.data("animated")?f.addClass("switch-animate"):f.removeClass("switch-animate")},
|
||||
setSizeClass:function(b){var f=a(this),c=f.find(".switch-left"),d=f.find(".switch-right"),e=f.find("label");a.each(["switch-mini","switch-small","switch-large"],function(f,a){a!==b?(c.removeClass(a),d.removeClass(a),e.removeClass(a)):(c.addClass(a),d.addClass(a),e.addClass(a))})},status:function(){return a(this).find('input[type!="hidden"]').is(":checked")},destroy:function(){var b=a(this),f=b.find("div"),b=b.closest("form");f.find(":not(input)").remove();f=f.children();f.unwrap().unwrap();f.unbind("change");
|
||||
b&&(b.unbind("reset"),b.removeData("bootstrapSwitch"));return f}};if(e[c])return e[c].apply(this,Array.prototype.slice.call(arguments,1));if("object"!==typeof c&&c)a.error("Method "+c+" does not exist!");else return e.init.apply(this,arguments)}}(jQuery);(function(a){a(function(){a(".make-switch").bootstrapSwitch()})})(jQuery);!function(a){a.expr[":"].icontains=function(c,b,f){return 0<=a(c).text().toUpperCase().indexOf(f[3].toUpperCase())};var c=function(e,b,f){f&&(f.stopPropagation(),f.preventDefault());this.$element=a(e);this.$menu=this.$button=this.$newElement=null;this.options=a.extend({},a.fn.selectpicker.defaults,this.$element.data(),"object"==typeof b&&b);null==this.options.title&&(this.options.title=this.$element.attr("title"));this.val=c.prototype.val;this.render=c.prototype.render;this.refresh=c.prototype.refresh;
|
||||
this.setStyle=c.prototype.setStyle;this.selectAll=c.prototype.selectAll;this.deselectAll=c.prototype.deselectAll;this.init()};c.prototype={constructor:c,init:function(c){this.$element.hide();this.multiple=this.$element.prop("multiple");c=this.$element.attr("id");this.$newElement=this.createView();this.$element.after(this.$newElement);this.$menu=this.$newElement.find("> .dropdown-menu");this.$button=this.$newElement.find("> button");this.$searchbox=this.$newElement.find("input");if(void 0!==c){var b=
|
||||
this;this.$button.attr("data-id",c);a('label[for="'+c+'"]').click(function(f){f.preventDefault();b.$button.focus()})}this.checkDisabled();this.clickListener();this.liveSearchListener();this.render();this.liHeight();this.setStyle();this.setWidth();this.options.container&&this.selectPosition();this.$menu.data("this",this);this.$newElement.data("this",this)},createDropdown:function(){return a("<div class='btn-group bootstrap-select"+(this.multiple?" show-tick":"")+"'><button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><div class='filter-option pull-left'></div> <div class='caret'></div></button><div class='dropdown-menu open'>"+
|
||||
(this.options.header?'<div class="popover-title"><button type="button" class="close" aria-hidden="true">×</button>'+this.options.header+"</div>":"")+(this.options.liveSearch?'<div class="bootstrap-select-searchbox"><input type="text" class="input-block-level form-control" /></div>':"")+"<ul class='dropdown-menu inner' role='menu'></ul></div></div>")},createView:function(){var a=this.createDropdown(),b=this.createLi();a.find("ul").append(b);return a},reloadLi:function(){this.destroyLi();var a=
|
||||
this.createLi();this.$menu.find("ul").append(a)},destroyLi:function(){this.$menu.find("li").remove()},createLi:function(){var c=this,b=[],f="";this.$element.find("option").each(function(f){f=a(this);var d=f.attr("class")||"",m=f.attr("style")||"",n=f.data("content")?f.data("content"):f.html(),l=void 0!==f.data("subtext")?'<small class="muted text-muted">'+f.data("subtext")+"</small>":"",k=void 0!==f.data("icon")?'<i class="glyphicon '+f.data("icon")+'"></i> ':"";""!==k&&(f.is(":disabled")||f.parent().is(":disabled"))&&
|
||||
(k="<span>"+k+"</span>");f.data("content")||(n=k+'<span class="text">'+n+l+"</span>");c.options.hideDisabled&&(f.is(":disabled")||f.parent().is(":disabled"))?b.push('<a style="min-height: 0; padding: 0"></a>'):f.parent().is("optgroup")&&!0!=f.data("divider")?0==f.index()?(l=f.parent().attr("label"),k=void 0!==f.parent().data("subtext")?'<small class="muted text-muted">'+f.parent().data("subtext")+"</small>":"",l=(f.parent().data("icon")?'<i class="'+f.parent().data("icon")+'"></i> ':"")+'<span class="text">'+
|
||||
l+k+"</span>",0!=f[0].index?b.push('<div class="div-contain"><div class="divider"></div></div><dt>'+l+"</dt>"+c.createA(n,"opt "+d,m)):b.push("<dt>"+l+"</dt>"+c.createA(n,"opt "+d,m))):b.push(c.createA(n,"opt "+d,m)):!0==f.data("divider")?b.push('<div class="div-contain"><div class="divider"></div></div>'):!0==a(this).data("hidden")?b.push(""):b.push(c.createA(n,d,m))});a.each(b,function(b,a){f+="<li rel="+b+">"+a+"</li>"});this.multiple||(0!=this.$element.find("option:selected").length||this.options.title)||
|
||||
this.$element.find("option").eq(0).prop("selected",!0).attr("selected","selected");return a(f)},createA:function(a,b,f){return'<a tabindex="0" class="'+b+'" style="'+f+'">'+a+'<i class="glyphicon glyphicon-ok icon-ok check-mark"></i></a>'},render:function(){var c=this;this.$element.find("option").each(function(b){c.setDisabled(b,a(this).is(":disabled")||a(this).parent().is(":disabled"));c.setSelected(b,a(this).is(":selected"))});this.tabIndex();var b=this.$element.find("option:selected").map(function(b,
|
||||
f){var d=a(this),g=d.data("icon")&&c.options.showIcon?'<i class="glyphicon '+d.data("icon")+'"></i> ':"",r;r=c.options.showSubtext&&d.attr("data-subtext")&&!c.multiple?' <small class="muted text-muted">'+d.data("subtext")+"</small>":"";return d.data("content")&&c.options.showContent?d.data("content"):void 0!=d.attr("title")?d.attr("title"):g+d.html()+r}).toArray(),f=this.multiple?b.join(", "):b[0];if(this.multiple&&-1<this.options.selectedTextFormat.indexOf("count")){var g=this.options.selectedTextFormat.split(">"),
|
||||
d=this.options.hideDisabled?":not([disabled])":"";if(1<g.length&&b.length>g[1]||1==g.length&&2<=b.length)f=this.options.countSelectedText.replace("{0}",b.length).replace("{1}",this.$element.find('option:not([data-divider="true"]):not([data-hidden="true"])'+d).length)}f||(f=void 0!=this.options.title?this.options.title:this.options.noneSelectedText);this.$newElement.find(".filter-option").html(f)},setStyle:function(a,b){this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device/gi,
|
||||
""));var f=a?a:this.options.style;"add"==b?this.$button.addClass(f):"remove"==b?this.$button.removeClass(f):(this.$button.removeClass(this.options.style),this.$button.addClass(f))},liHeight:function(){var a=this.$newElement.clone();a.appendTo("body");var b=a.addClass("open").find("> .dropdown-menu"),f=b.find("li > a").outerHeight(),c=this.options.header?b.find(".popover-title").outerHeight():0,b=this.options.liveSearch?b.find(".bootstrap-select-searchbox").outerHeight():0;a.remove();this.$newElement.data("liHeight",
|
||||
f).data("headerHeight",c).data("searchHeight",b)},setSize:function(){var c=this,b=this.$menu,f=b.find(".inner");f.find("li > a");var g=this.$newElement.outerHeight(),d=this.$newElement.data("liHeight"),m=this.$newElement.data("headerHeight"),n=this.$newElement.data("searchHeight"),l=b.find("li .divider").outerHeight(!0),k=parseInt(b.css("padding-top"))+parseInt(b.css("padding-bottom"))+parseInt(b.css("border-top-width"))+parseInt(b.css("border-bottom-width")),r=this.options.hideDisabled?":not(.disabled)":
|
||||
"",p=a(window),t=k+parseInt(b.css("margin-top"))+parseInt(b.css("margin-bottom"))+2,h,s,q,x=function(){s=c.$newElement.offset().top-p.scrollTop();q=p.height()-s-g};x();this.options.header&&b.css("padding-top",0);"auto"==this.options.size?(l=function(){var a;x();h=q-t;c.$newElement.toggleClass("dropup",s>q&&h-t<b.height()&&c.options.dropupAuto);c.$newElement.hasClass("dropup")&&(h=s-t);a=3<b.find("li").length+b.find("dt").length?3*d+t-2:0;b.css({"max-height":h+"px",overflow:"hidden","min-height":a+
|
||||
"px"});f.css({"max-height":h-m-n-k+"px","overflow-y":"auto","min-height":a-k+"px"})},l(),a(window).resize(l),a(window).scroll(l)):this.options.size&&("auto"!=this.options.size&&b.find("li"+r).length>this.options.size)&&(r=b.find("li"+r+" > *").filter(":not(.div-contain)").slice(0,this.options.size).last().parent().index(),r=b.find("li").slice(0,r+1).find(".div-contain").length,h=d*this.options.size+r*l+k,this.$newElement.toggleClass("dropup",s>q&&h<b.height()&&this.options.dropupAuto),b.css({"max-height":h+
|
||||
m+n+"px",overflow:"hidden"}),f.css({"max-height":h-k+"px","overflow-y":"auto"}))},setWidth:function(){if("auto"==this.options.width){this.$menu.css("min-width","0");var a=this.$newElement.clone().appendTo("body"),b=a.find("> .dropdown-menu").css("width");a.remove();this.$newElement.css("width",b)}else"fit"==this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):
|
||||
(this.$menu.css("min-width",""),this.$newElement.css("width",""));this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement.removeClass("fit-width")},selectPosition:function(){var c=this,b=a("<div />"),f,g,d=function(a){b.addClass(a.attr("class")).toggleClass("dropup",a.hasClass("dropup"));f=a.offset();g=a.hasClass("dropup")?0:a[0].offsetHeight;b.css({top:f.top+g,left:f.left,width:a[0].offsetWidth,position:"absolute"})};this.$newElement.on("click",function(f){d(a(this));
|
||||
b.appendTo(c.options.container);b.toggleClass("open",!a(this).hasClass("open"));b.append(c.$menu)});a(window).resize(function(){d(c.$newElement)});a(window).on("scroll",function(b){d(c.$newElement)});a("html").on("click",function(f){1>a(f.target).closest(c.$newElement).length&&b.removeClass("open")})},mobile:function(){this.$element.addClass("mobile-device").appendTo(this.$newElement);this.options.container&&this.$menu.hide()},refresh:function(){this.reloadLi();this.render();this.setWidth();this.setStyle();
|
||||
this.checkDisabled();this.liHeight()},update:function(){this.reloadLi();this.setWidth();this.setStyle();this.checkDisabled();this.liHeight()},setSelected:function(a,b){this.$menu.find("li").eq(a).toggleClass("selected",b)},setDisabled:function(a,b){b?this.$menu.find("li").eq(a).addClass("disabled").find("a").attr("href","#").attr("tabindex",-1):this.$menu.find("li").eq(a).removeClass("disabled").find("a").removeAttr("href").attr("tabindex",0)},isDisabled:function(){return this.$element.is(":disabled")},
|
||||
checkDisabled:function(){var a=this;this.isDisabled()?this.$button.addClass("disabled").attr("tabindex",-1):(this.$button.hasClass("disabled")&&this.$button.removeClass("disabled"),-1==this.$button.attr("tabindex")&&(this.$element.data("tabindex")||this.$button.removeAttr("tabindex")));this.$button.click(function(){return!a.isDisabled()})},tabIndex:function(){this.$element.is("[tabindex]")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex")))},
|
||||
clickListener:function(){var c=this;a("body").on("touchstart.dropdown",".dropdown-menu",function(b){b.stopPropagation()});this.$newElement.on("click",function(){c.setSize()});this.$menu.on("click","li a",function(b){var f=a(this).parent().index();a(this).parent();var g=c.$element.val();c.multiple&&b.stopPropagation();b.preventDefault();c.isDisabled()||a(this).parent().hasClass("disabled")||(b=c.$element.find("option"),f=b.eq(f),c.multiple?(b=f.prop("selected"),f.prop("selected",!b)):(b.prop("selected",
|
||||
!1),f.prop("selected",!0)),c.$button.focus(),g!=c.$element.val()&&c.$element.change())});this.$menu.on("click","li.disabled a, li dt, li .div-contain, h3.popover-title",function(b){b.target==this&&(b.preventDefault(),b.stopPropagation(),c.$button.focus())});this.$searchbox.on("click",function(b){b.stopPropagation()});this.$element.change(function(){c.render()})},liveSearchListener:function(){var a=this;this.$newElement.on("click.dropdown.data-api",function(b){a.options.liveSearch&&setTimeout(function(){a.$searchbox.focus()},
|
||||
10)});this.$searchbox.on("input",function(){a.$searchbox.val()?a.$menu.find("li").show().not(":icontains("+a.$searchbox.val()+")").hide():a.$menu.find("li").show()})},val:function(a){return void 0!=a?(this.$element.val(a),this.$element.change(),this.$element):this.$element.val()},selectAll:function(){this.$element.find("option").prop("selected",!0).attr("selected","selected");this.render()},deselectAll:function(){this.$element.find("option").prop("selected",!1).removeAttr("selected");this.render()},
|
||||
keydown:function(c){var b,f,g,d,m,n,l;b=a(this).parent();f=b.data("this");f.options.container&&(b=f.$menu);b=a("[role=menu] li:not(.divider):visible a",b);if(b.length){if(/(38|40)/.test(c.keyCode))f=b.index(b.filter(":focus")),d=b.parent(":not(.disabled)").first().index(),m=b.parent(":not(.disabled)").last().index(),g=b.eq(f).parent().nextAll(":not(.disabled)").eq(0).index(),n=b.eq(f).parent().prevAll(":not(.disabled)").eq(0).index(),l=b.eq(g).parent().prevAll(":not(.disabled)").eq(0).index(),38==
|
||||
c.keyCode&&(f!=l&&f>n&&(f=n),f<d&&(f=d)),40==c.keyCode&&(f!=l&&f<g&&(f=g),f>m&&(f=m),-1==f&&(f=0)),b.eq(f).focus();else{var k={48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},r=[];b.each(function(){a(this).parent().is(":not(.disabled)")&&
|
||||
a.trim(a(this).text().toLowerCase()).substring(0,1)==k[c.keyCode]&&r.push(a(this).parent().index())});f=a(document).data("keycount");f++;a(document).data("keycount",f);a.trim(a(":focus").text().toLowerCase()).substring(0,1)!=k[c.keyCode]?(f=1,a(document).data("keycount",f)):f>=r.length&&a(document).data("keycount",0);b.eq(r[f-1]).focus()}/(13|32)/.test(c.keyCode)&&(c.preventDefault(),a(":focus").click(),a(document).data("keycount",0))}},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},
|
||||
destroy:function(){this.$newElement.remove();this.$element.remove()}};a.fn.selectpicker=function(e,b){var f=arguments,g,d=this.each(function(){if(a(this).is("select")){var d=a(this),n=d.data("selectpicker"),l="object"==typeof e&&e;if(!n)d.data("selectpicker",n=new c(this,l,b));else if(l)for(var k in l)n.options[k]=l[k];"string"==typeof e&&(d=e,n[d]instanceof Function?([].shift.apply(f),g=n[d].apply(n,f)):g=n.options[d])}});return void 0!=g?g:d};a.fn.selectpicker.defaults={style:"btn-default",size:"auto",
|
||||
title:null,selectedTextFormat:"values",noneSelectedText:"Nothing selected",countSelectedText:"{0} of {1} selected",width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1};a(document).data("keycount",0).on("keydown","[data-toggle=dropdown], [role=menu]",c.prototype.keydown)}(window.jQuery);(function(a){a.extend(a.fn,{validate:function(c){if(!this.length)return c&&c.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."),void 0;var e=a.data(this[0],"validator");return e?e:(this.attr("novalidate","novalidate"),e=new a.validator(c,this[0]),a.data(this[0],"validator",e),e.settings.onsubmit&&(this.validateDelegate(":submit","click",function(b){e.settings.submitHandler&&(e.submitButton=b.target);a(b.target).hasClass("cancel")&&(e.cancelSubmit=!0);void 0!==
|
||||
a(b.target).attr("formnovalidate")&&(e.cancelSubmit=!0)}),this.submit(function(b){function f(){var f;return e.settings.submitHandler?(e.submitButton&&(f=a("<input type='hidden'/>").attr("name",e.submitButton.name).val(a(e.submitButton).val()).appendTo(e.currentForm)),e.settings.submitHandler.call(e,e.currentForm,b),e.submitButton&&f.remove(),!1):!0}return e.settings.debug&&b.preventDefault(),e.cancelSubmit?(e.cancelSubmit=!1,f()):e.form()?e.pendingRequest?(e.formSubmitted=!0,!1):f():(e.focusInvalid(),
|
||||
!1)})),e)},valid:function(){if(a(this[0]).is("form"))return this.validate().form();var c=!0,e=a(this[0].form).validate();return this.each(function(){c=c&&e.element(this)}),c},removeAttrs:function(c){var e={},b=this;return a.each(c.split(/\s/),function(f,a){e[a]=b.attr(a);b.removeAttr(a)}),e},rules:function(c,e){var b=this[0];if(c){var f=a.data(b.form,"validator").settings,g=f.rules,d=a.validator.staticRules(b);switch(c){case "add":a.extend(d,a.validator.normalizeRule(e));delete d.messages;g[b.name]=
|
||||
d;e.messages&&(f.messages[b.name]=a.extend(f.messages[b.name],e.messages));break;case "remove":if(!e)return delete g[b.name],d;var m={};return a.each(e.split(/\s/),function(b,f){m[f]=d[f];delete d[f]}),m}}b=a.validator.normalizeRules(a.extend({},a.validator.classRules(b),a.validator.attributeRules(b),a.validator.dataRules(b),a.validator.staticRules(b)),b);b.required&&(f=b.required,delete b.required,b=a.extend({required:f},b));return b}});a.extend(a.expr[":"],{blank:function(c){return!a.trim(""+a(c).val())},
|
||||
filled:function(c){return!!a.trim(""+a(c).val())},unchecked:function(c){return!a(c).prop("checked")}});a.validator=function(c,e){this.settings=a.extend(!0,{},a.validator.defaults,c);this.currentForm=e;this.init()};a.validator.format=function(c,e){return 1===arguments.length?function(){var b=a.makeArray(arguments);return b.unshift(c),a.validator.format.apply(this,b)}:(2<arguments.length&&e.constructor!==Array&&(e=a.makeArray(arguments).slice(1)),e.constructor!==Array&&(e=[e]),a.each(e,function(b,f){c=
|
||||
c.replace(RegExp("\\{"+b+"\\}","g"),function(){return f})}),c)};a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a;this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),
|
||||
this.addWrapper(this.errorsFor(a)).hide())},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(a,e){(9!==e.which||""!==this.elementValue(a))&&(a.name in this.submitted||a===this.lastElement)&&this.element(a)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(c,e,b){"radio"===c.type?this.findByName(c.name).addClass(e).removeClass(b):
|
||||
a(c).addClass(e).removeClass(b)},unhighlight:function(c,e,b){"radio"===c.type?this.findByName(c.name).removeClass(e).addClass(b):a(c).removeClass(e).addClass(b)}},setDefaults:function(c){a.extend(a.validator.defaults,c)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",
|
||||
creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},
|
||||
autoCreateRanges:!1,prototype:{init:function(){function c(b){var c=a.data(this[0].form,"validator"),d="on"+b.type.replace(/^validate/,"");c.settings[d]&&c.settings[d].call(c,this[0],b)}this.labelContainer=a(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm);this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid=
|
||||
{};this.reset();var e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/));a.each(c,function(a,c){e[c]=b})});var b=this.settings.rules;a.each(b,function(f,c){b[f]=a.validator.normalizeRule(c)});a(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ",
|
||||
"focusin focusout keyup",c).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",c);this.settings.invalidHandler&&a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,e=this.currentElements=
|
||||
this.elements();e[a];a++)this.check(e[a]);return this.valid()},element:function(c){this.lastElement=c=this.validationTargetFor(this.clean(c));this.prepareElement(c);this.currentElements=a(c);var e=!1!==this.check(c);return e?delete this.invalid[c.name]:this.invalid[c.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(c){if(c){a.extend(this.errorMap,c);this.errorList=[];for(var e in c)this.errorList.push({message:c[e],element:this.findByName(e)[0]});
|
||||
this.successList=a.grep(this.successList,function(b){return!(b.name in c)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm();this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var e=
|
||||
0,b;for(b in a)e++;return e},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(c){}},findLastActive:function(){var c=this.lastActive;return c&&1===a.grep(this.errorList,function(a){return a.element.name===c.name}).length&&
|
||||
c},elements:function(){var c=this,e={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&c.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in e||!c.objectLength(a(this).rules())?!1:(e[this.name]=!0,!0)})},clean:function(c){return a(c)[0]},errors:function(){var c=this.settings.errorClass.replace(" ",".");return a(this.settings.errorElement+"."+c,
|
||||
this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=a([]);this.toHide=a([]);this.currentElements=a([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset();this.toHide=this.errorsFor(a)},elementValue:function(c){var e=a(c).attr("type"),b=a(c).val();return"radio"===e||"checkbox"===e?a("input[name='"+a(c).attr("name")+"']:checked").val():"string"==typeof b?b.replace(/\r/g,""):
|
||||
b},check:function(c){c=this.validationTargetFor(this.clean(c));var e,b=a(c).rules(),f=!1,g=this.elementValue(c),d;for(d in b){var m={method:d,parameters:b[d]};try{if(e=a.validator.methods[d].call(this,g,c,m.parameters),"dependency-mismatch"===e)f=!0;else{if(f=!1,"pending"===e)return this.toHide=this.toHide.not(this.errorsFor(c)),void 0;if(!e)return this.formatAndAdd(c,m),!1}}catch(n){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+c.id+", check the '"+
|
||||
m.method+"' method.",n),n;}}return f?void 0:(this.objectLength(b)&&this.successList.push(c),!0)},customDataMessage:function(c,e){return a(c).data("msg-"+e.toLowerCase())||c.attributes&&a(c).attr("data-msg-"+e.toLowerCase())},customMessage:function(a,e){var b=this.settings.messages[a];return b&&(b.constructor===String?b:b[e])},findDefined:function(){for(var a=0;arguments.length>a;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(c,e){return this.findDefined(this.customMessage(c.name,
|
||||
e),this.customDataMessage(c,e),!this.settings.ignoreTitle&&c.title||void 0,a.validator.messages[e],"<strong>Warning: No message defined for "+c.name+"</strong>")},formatAndAdd:function(c,e){var b=this.defaultMessage(c,e.method),f=/\$?\{(\d+)\}/g;"function"==typeof b?b=b.call(this,e.parameters,c):f.test(b)&&(b=a.validator.format(b.replace(f,"{$1}"),e.parameters));this.errorList.push({message:b,element:c});this.errorMap[c.name]=b;this.submitted[c.name]=b},addWrapper:function(a){return this.settings.wrapper&&
|
||||
(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,e;for(a=0;this.errorList[a];a++)e=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,e.element,this.settings.errorClass,this.settings.validClass),this.showLabel(e.element,e.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,e=this.validElements();e[a];a++)this.settings.unhighlight.call(this,
|
||||
e[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(c,e){var b=this.errorsFor(c);b.length?(b.removeClass(this.settings.validClass).addClass(this.settings.errorClass),b.html(e)):(b=a("<"+this.settings.errorElement+
|
||||
">").attr("for",this.idOrName(c)).addClass(this.settings.errorClass).html(e||""),this.settings.wrapper&&(b=b.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(b).length||(this.settings.errorPlacement?this.settings.errorPlacement(b,a(c)):b.insertAfter(c)));!e&&this.settings.success&&(b.text(""),"string"==typeof this.settings.success?b.addClass(this.settings.success):this.settings.success(b,c));this.toShow=this.toShow.add(b)},errorsFor:function(c){var e=this.idOrName(c);
|
||||
return this.errors().filter(function(){return a(this).attr("for")===e})},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(a){return this.checkable(a)&&(a=this.findByName(a.name).not(this.settings.ignore)[0]),a},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(c){return a(this.currentForm).find("[name='"+c+"']")},getLength:function(c,e){switch(e.nodeName.toLowerCase()){case "select":return a("option:selected",
|
||||
e).length;case "input":if(this.checkable(e))return this.findByName(e.name).filter(":checked").length}return c.length},depend:function(a,e){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,e):!0},dependTypes:{"boolean":function(a){return a},string:function(c,e){return!!a(c,e.form).length},"function":function(a,e){return a(e)}},optional:function(c){var e=this.elementValue(c);return!a.validator.methods.required.call(this,e,c)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||
|
||||
(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(c,e){this.pendingRequest--;0>this.pendingRequest&&(this.pendingRequest=0);delete this.pending[c.name];e&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!e&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(c){return a.data(c,"previousValue")||a.data(c,"previousValue",
|
||||
{old:null,valid:!0,message:this.defaultMessage(c,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(c,e){c.constructor===String?this.classRuleSettings[c]=e:a.extend(this.classRuleSettings,c)},classRules:function(c){var e={};c=a(c).attr("class");return c&&a.each(c.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(e,a.validator.classRuleSettings[this])}),
|
||||
e},attributeRules:function(c){var e={};c=a(c);var b=c[0].getAttribute("type"),f;for(f in a.validator.methods){var g;"required"===f?(g=c.get(0).getAttribute(f),""===g&&(g=!0),g=!!g):g=c.attr(f);/min|max/.test(f)&&(null===b||/number|range|text/.test(b))&&(g=Number(g));g?e[f]=g:b===f&&"range"!==b&&(e[f]=!0)}return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(c){var e,b={},f=a(c);for(e in a.validator.methods)c=f.data("rule-"+e.toLowerCase()),void 0!==
|
||||
c&&(b[e]=c);return b},staticRules:function(c){var e={},b=a.data(c.form,"validator");return b.settings.rules&&(e=a.validator.normalizeRule(b.settings.rules[c.name])||{}),e},normalizeRules:function(c,e){return a.each(c,function(b,f){if(!1===f)return delete c[b],void 0;if(f.param||f.depends){var g=!0;switch(typeof f.depends){case "string":g=!!a(f.depends,e.form).length;break;case "function":g=f.depends.call(e,e)}g?c[b]=void 0!==f.param?f.param:!0:delete c[b]}}),a.each(c,function(b,f){c[b]=a.isFunction(f)?
|
||||
f(e):f}),a.each(["minlength","maxlength"],function(){c[this]&&(c[this]=Number(c[this]))}),a.each(["rangelength","range"],function(){var b;c[this]&&(a.isArray(c[this])?c[this]=[Number(c[this][0]),Number(c[this][1])]:"string"==typeof c[this]&&(b=c[this].split(/[\s,]+/),c[this]=[Number(b[0]),Number(b[1])]))}),a.validator.autoCreateRanges&&(c.min&&c.max&&(c.range=[c.min,c.max],delete c.min,delete c.max),c.minlength&&c.maxlength&&(c.rangelength=[c.minlength,c.maxlength],delete c.minlength,delete c.maxlength)),
|
||||
c},normalizeRule:function(c){if("string"==typeof c){var e={};a.each(c.split(/\s/),function(){e[this]=!0});c=e}return c},addMethod:function(c,e,b){a.validator.methods[c]=e;a.validator.messages[c]=void 0!==b?b:a.validator.messages[c];3>e.length&&a.validator.addClassRules(c,a.validator.normalizeRule(c))},methods:{required:function(c,e,b){return this.depend(b,e)?"select"===e.nodeName.toLowerCase()?(c=a(e).val())&&0<c.length:this.checkable(e)?0<this.getLength(c,e):0<a.trim(c).length:"dependency-mismatch"},
|
||||
email:function(a,e){return this.optional(e)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(a)},
|
||||
url:function(a,e){return this.optional(e)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},
|
||||
date:function(a,e){return this.optional(e)||!/Invalid|NaN/.test(""+new Date(a))},dateISO:function(a,e){return this.optional(e)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(a)},number:function(a,e){return this.optional(e)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,e){return this.optional(e)||/^\d+$/.test(a)},creditcard:function(a,e){if(this.optional(e))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var b=0,f=0,g=!1;a=a.replace(/\D/g,"");for(var d=a.length-1;0<=
|
||||
d;d--)f=a.charAt(d),f=parseInt(f,10),g&&9<(f*=2)&&(f-=9),b+=f,g=!g;return 0===b%10},minlength:function(c,e,b){c=a.isArray(c)?c.length:this.getLength(a.trim(c),e);return this.optional(e)||c>=b},maxlength:function(c,e,b){c=a.isArray(c)?c.length:this.getLength(a.trim(c),e);return this.optional(e)||b>=c},rangelength:function(c,e,b){c=a.isArray(c)?c.length:this.getLength(a.trim(c),e);return this.optional(e)||c>=b[0]&&b[1]>=c},min:function(a,e,b){return this.optional(e)||a>=b},max:function(a,e,b){return this.optional(e)||
|
||||
b>=a},range:function(a,e,b){return this.optional(e)||a>=b[0]&&b[1]>=a},equalTo:function(c,e,b){b=a(b);return this.settings.onfocusout&&b.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(e).valid()}),c===b.val()},remote:function(c,e,b){if(this.optional(e))return"dependency-mismatch";var f=this.previousValue(e);if(this.settings.messages[e.name]||(this.settings.messages[e.name]={}),f.originalMessage=this.settings.messages[e.name].remote,this.settings.messages[e.name].remote=f.message,
|
||||
b="string"==typeof b&&{url:b}||b,f.old===c)return f.valid;f.old=c;var g=this;this.startRequest(e);var d={};return d[e.name]=c,a.ajax(a.extend(!0,{url:b,mode:"abort",port:"validate"+e.name,dataType:"json",data:d,success:function(b){g.settings.messages[e.name].remote=f.originalMessage;var d=!0===b||"true"===b;if(d){var l=g.formSubmitted;g.prepareElement(e);g.formSubmitted=l;g.successList.push(e);delete g.invalid[e.name];g.showErrors()}else l={},b=b||g.defaultMessage(e,"remote"),l[e.name]=f.message=
|
||||
a.isFunction(b)?b(c):b,g.invalid[e.name]=!0,g.showErrors(l);f.valid=d;g.stopRequest(e,d)}},b)),"pending"}}});a.format=a.validator.format})(jQuery);(function(a){var c={};if(a.ajaxPrefilter)a.ajaxPrefilter(function(b,a,e){a=b.port;"abort"===b.mode&&(c[a]&&c[a].abort(),c[a]=e)});else{var e=a.ajax;a.ajax=function(b){var f=("port"in b?b:a.ajaxSettings).port;return"abort"===("mode"in b?b:a.ajaxSettings).mode?(c[f]&&c[f].abort(),c[f]=e.apply(this,arguments),c[f]):e.apply(this,arguments)}}})(jQuery);
|
||||
(function(a){a.extend(a.fn,{validateDelegate:function(c,e,b){return this.bind(e,function(f){var e=a(f.target);return e.is(c)?b.apply(e,arguments):void 0})}})})(jQuery);(function(){function a(a){function e(f,d){var e,C,v=f==window,w=d&&void 0!==d.message?d.message:void 0;d=a.extend({},a.blockUI.defaults,d||{});if(!d.ignoreIfBlocked||!a(f).data("blockUI.isBlocked")){d.overlayCSS=a.extend({},a.blockUI.defaults.overlayCSS,d.overlayCSS||{});e=a.extend({},a.blockUI.defaults.css,d.css||{});d.onOverlayClick&&(d.overlayCSS.cursor="pointer");C=a.extend({},a.blockUI.defaults.themedCSS,d.themedCSS||{});w=void 0===w?d.message:w;v&&t&&b(window,{fadeOut:0});if(w&&"string"!=typeof w&&
|
||||
(w.parentNode||w.jquery)){var A=w.jquery?w[0]:w,u={};a(f).data("blockUI.history",u);u.el=A;u.parent=A.parentNode;u.display=A.style.display;u.position=A.style.position;u.parent&&u.parent.removeChild(A)}a(f).data("blockUI.onUnblock",d.onUnblock);var u=d.baseZ,B;B=k||d.forceIframe?a('<iframe class="blockUI" style="z-index:'+u++ +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+d.iframeSrc+'"></iframe>'):a('<div class="blockUI" style="display:none"></div>');
|
||||
A=d.theme?a('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+u++ +';display:none"></div>'):a('<div class="blockUI blockOverlay" style="z-index:'+u++ +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');d.theme&&v?(u='<div class="blockUI '+d.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(u+10)+';display:none;position:fixed">',d.title&&(u+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+
|
||||
(d.title||" ")+"</div>"),u+='<div class="ui-widget-content ui-dialog-content"></div></div>'):d.theme?(u='<div class="blockUI '+d.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(u+10)+';display:none;position:absolute">',d.title&&(u+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(d.title||" ")+"</div>"),u+='<div class="ui-widget-content ui-dialog-content"></div>',u+="</div>"):u=v?'<div class="blockUI '+d.blockMsgClass+' blockPage" style="z-index:'+
|
||||
(u+10)+';display:none;position:fixed"></div>':'<div class="blockUI '+d.blockMsgClass+' blockElement" style="z-index:'+(u+10)+';display:none;position:absolute"></div>';u=a(u);w&&(d.theme?(u.css(C),u.addClass("ui-widget-content")):u.css(e));d.theme||A.css(d.overlayCSS);A.css("position",v?"fixed":"absolute");(k||d.forceIframe)&&B.css("opacity",0);e=[B,A,u];var F=v?a("body"):a(f);a.each(e,function(){this.appendTo(F)});d.theme&&(d.draggable&&a.fn.draggable)&&u.draggable({handle:".ui-dialog-titlebar",cancel:"li"});
|
||||
C=p&&(!a.support.boxModel||0<a("object,embed",v?null:f).length);if(r||C){v&&(d.allowBodyStretch&&a.support.boxModel)&&a("html,body").css("height","100%");if((r||!a.support.boxModel)&&!v){C=parseInt(a.css(f,"borderTopWidth"),10)||0;var D=parseInt(a.css(f,"borderLeftWidth"),10)||0,O=C?"(0 - "+C+")":0,Q=D?"(0 - "+D+")":0}a.each(e,function(b,a){var f=a[0].style;f.position="absolute";if(2>b)v?f.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+
|
||||
d.quirksmodeOffsetHack+') + "px"'):f.setExpression("height",'this.parentNode.offsetHeight + "px"'),v?f.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):f.setExpression("width",'this.parentNode.offsetWidth + "px"'),Q&&f.setExpression("left",Q),O&&f.setExpression("top",O);else if(d.centerY)v&&f.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),
|
||||
f.marginTop=0;else if(!d.centerY&&v){var c="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+(d.css&&d.css.top?parseInt(d.css.top,10):0)+') + "px"';f.setExpression("top",c)}})}w&&(d.theme?u.find(".ui-widget-content").append(w):u.append(w),(w.jquery||w.nodeType)&&a(w).show());(k||d.forceIframe)&&d.showOverlay&&B.show();if(d.fadeIn)e=d.onBlock?d.onBlock:l,B=d.showOverlay&&!w?e:l,e=w?e:l,d.showOverlay&&A._fadeIn(d.fadeIn,B),w&&u._fadeIn(d.fadeIn,
|
||||
e);else if(d.showOverlay&&A.show(),w&&u.show(),d.onBlock)d.onBlock();g(1,f,d);v?(t=u[0],h=a(d.focusableElements,t),d.focusInput&&setTimeout(m,20)):n(u[0],d.centerX,d.centerY);d.timeout&&(w=setTimeout(function(){v?a.unblockUI(d):a(f).unblock(d)},d.timeout),a(f).data("blockUI.timeout",w))}}function b(b,d){var e,l=b==window,m=a(b),p=m.data("blockUI.history"),n=m.data("blockUI.timeout");n&&(clearTimeout(n),m.removeData("blockUI.timeout"));d=a.extend({},a.blockUI.defaults,d||{});g(0,b,d);null===d.onUnblock&&
|
||||
(d.onUnblock=m.data("blockUI.onUnblock"),m.removeData("blockUI.onUnblock"));var k;k=l?a("body").children().filter(".blockUI").add("body > .blockUI"):m.find(">.blockUI");d.cursorReset&&(1<k.length&&(k[1].style.cursor=d.cursorReset),2<k.length&&(k[2].style.cursor=d.cursorReset));l&&(t=h=null);d.fadeOut?(e=k.length,k.stop().fadeOut(d.fadeOut,function(){0===--e&&f(k,p,d,b)})):f(k,p,d,b)}function f(b,f,d,e){var g=a(e);if(!g.data("blockUI.isBlocked")){b.each(function(b,a){this.parentNode&&this.parentNode.removeChild(this)});
|
||||
f&&f.el&&(f.el.style.display=f.display,f.el.style.position=f.position,f.parent&&f.parent.appendChild(f.el),g.removeData("blockUI.history"));g.data("blockUI.static")&&g.css("position","static");if("function"==typeof d.onUnblock)d.onUnblock(e,d);b=a(document.body);f=b.width();d=b[0].style.width;b.width(f-1).width(f);b[0].style.width=d}}function g(b,f,e){var g=f==window;f=a(f);if(b||(!g||t)&&(g||f.data("blockUI.isBlocked")))f.data("blockUI.isBlocked",b),g&&(e.bindEvents&&(!b||e.showOverlay))&&(b?a(document).bind("mousedown mouseup keydown keypress keyup touchstart touchend touchmove",
|
||||
e,d):a(document).unbind("mousedown mouseup keydown keypress keyup touchstart touchend touchmove",d))}function d(b){if("keydown"===b.type&&b.keyCode&&9==b.keyCode&&t&&b.data.constrainTabKey){var f=h,d=b.shiftKey&&b.target===f[0];if(!b.shiftKey&&b.target===f[f.length-1]||d)return setTimeout(function(){m(d)},10),!1}var f=b.data,e=a(b.target);if(e.hasClass("blockOverlay")&&f.onOverlayClick)f.onOverlayClick(b);return 0<e.parents("div."+f.blockMsgClass).length?!0:0===e.parents().children().filter("div.blockUI").length}
|
||||
function m(b){h&&(b=h[!0===b?h.length-1:0])&&b.focus()}function n(b,f,d){var e=b.parentNode,g=b.style,h=(e.offsetWidth-b.offsetWidth)/2-(parseInt(a.css(e,"borderLeftWidth"),10)||0);b=(e.offsetHeight-b.offsetHeight)/2-(parseInt(a.css(e,"borderTopWidth"),10)||0);f&&(g.left=0<h?h+"px":"0");d&&(g.top=0<b?b+"px":"0")}a.fn._fadeIn=a.fn.fadeIn;var l=a.noop||function(){},k=/MSIE/.test(navigator.userAgent),r=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),p=a.isFunction(document.createElement("div").style.setExpression);
|
||||
a.blockUI=function(b){e(window,b)};a.unblockUI=function(a){b(window,a)};a.growlUI=function(b,f,d,e){var g=a('<div class="growlUI"></div>');b&&g.append("<h1>"+b+"</h1>");f&&g.append("<h2>"+f+"</h2>");void 0===d&&(d=3E3);var h=function(b){b=b||{};a.blockUI({message:g,fadeIn:"undefined"!==typeof b.fadeIn?b.fadeIn:700,fadeOut:"undefined"!==typeof b.fadeOut?b.fadeOut:1E3,timeout:"undefined"!==typeof b.timeout?b.timeout:d,centerY:!1,showOverlay:!1,onUnblock:e,css:a.blockUI.defaults.growlCSS})};h();g.css("opacity");
|
||||
g.mouseover(function(){h({fadeIn:0,timeout:3E4});var b=a(".blockMsg");b.stop();b.fadeTo(300,1)}).mouseout(function(){a(".blockMsg").fadeOut(1E3)})};a.fn.block=function(b){if(this[0]===window)return a.blockUI(b),this;var f=a.extend({},a.blockUI.defaults,b||{});this.each(function(){var b=a(this);f.ignoreIfBlocked&&b.data("blockUI.isBlocked")||b.unblock({fadeOut:0})});return this.each(function(){"static"==a.css(this,"position")&&(this.style.position="relative",a(this).data("blockUI.static",!0));this.style.zoom=
|
||||
1;e(this,b)})};a.fn.unblock=function(f){return this[0]===window?(a.unblockUI(f),this):this.each(function(){b(this,f)})};a.blockUI.version=2.66;a.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:0.6,cursor:"wait"},cursorReset:"default",
|
||||
growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:0.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1E3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",
|
||||
onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var t=null,h=[]}"function"===typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],a):a(jQuery)})();(function(a,c,e){var b=function(b){var g=function(d){function m(a,d){var G=g.defaults.columns,R=a.aoColumns.length,G=b.extend({},g.models.oColumn,G,{sSortingClass:a.oClasses.sSortable,sSortingClassJUI:a.oClasses.sSortJUI,nTh:d?d:c.createElement("th"),sTitle:G.sTitle?G.sTitle:d?d.innerHTML:"",aDataSort:G.aDataSort?G.aDataSort:[R],mData:G.mData?G.oDefaults:R});a.aoColumns.push(G);if(a.aoPreSearchCols[R]===e||null===a.aoPreSearchCols[R])a.aoPreSearchCols[R]=b.extend({},g.models.oSearch);else if(G=a.aoPreSearchCols[R],
|
||||
G.bRegex===e&&(G.bRegex=!0),G.bSmart===e&&(G.bSmart=!0),G.bCaseInsensitive===e)G.bCaseInsensitive=!0;n(a,R,null)}function n(a,c,d){var g=a.aoColumns[c];d!==e&&null!==d&&(d.mDataProp&&!d.mData&&(d.mData=d.mDataProp),d.sType!==e&&(g.sType=d.sType,g._bAutoType=!1),b.extend(g,d),y(g,d,"sWidth","sWidthOrig"),d.iDataSort!==e&&(g.aDataSort=[d.iDataSort]),y(g,d,"aDataSort"));var h=g.mRender?D(g.mRender):null,l=D(g.mData);g.fnGetData=function(b,a){var P=l(b,a);return g.mRender&&a&&""!==a?h(P,a,b):P};g.fnSetData=
|
||||
O(g.mData);a.oFeatures.bSort||(g.bSortable=!1);!g.bSortable||-1==b.inArray("asc",g.asSorting)&&-1==b.inArray("desc",g.asSorting)?(g.sSortingClass=a.oClasses.sSortableNone,g.sSortingClassJUI=""):-1==b.inArray("asc",g.asSorting)&&-1==b.inArray("desc",g.asSorting)?(g.sSortingClass=a.oClasses.sSortable,g.sSortingClassJUI=a.oClasses.sSortJUI):-1!=b.inArray("asc",g.asSorting)&&-1==b.inArray("desc",g.asSorting)?(g.sSortingClass=a.oClasses.sSortableAsc,g.sSortingClassJUI=a.oClasses.sSortJUIAscAllowed):-1==
|
||||
b.inArray("asc",g.asSorting)&&-1!=b.inArray("desc",g.asSorting)&&(g.sSortingClass=a.oClasses.sSortableDesc,g.sSortingClassJUI=a.oClasses.sSortJUIDescAllowed)}function l(b){if(!1===b.oFeatures.bAutoWidth)return!1;ja(b);for(var a=0,f=b.aoColumns.length;a<f;a++)b.aoColumns[a].nTh.style.width=b.aoColumns[a].sWidth}function k(b,a){var f=t(b,"bVisible");return"number"===typeof f[a]?f[a]:null}function r(a,c){var d=t(a,"bVisible"),d=b.inArray(c,d);return-1!==d?d:null}function p(b){return t(b,"bVisible").length}
|
||||
function t(a,c){var d=[];b.map(a.aoColumns,function(b,a){b[c]&&d.push(a)});return d}function h(b){for(var a=g.ext.aTypes,f=a.length,c=0;c<f;c++){var d=a[c](b);if(null!==d)return d}return"string"}function s(b,a){for(var f=a.split(","),c=[],d=0,e=b.aoColumns.length;d<e;d++)for(var g=0;g<e;g++)if(b.aoColumns[d].sName==f[g]){c.push(g);break}return c}function q(b){for(var a="",f=0,c=b.aoColumns.length;f<c;f++)a+=b.aoColumns[f].sName+",";return a.length==c?"":a.slice(0,-1)}function x(a,c,d,e){var g,h,l,
|
||||
p,n;if(c)for(g=c.length-1;0<=g;g--){var k=c[g].aTargets;b.isArray(k)||M(a,1,"aTargets must be an array of targets, not a "+typeof k);h=0;for(l=k.length;h<l;h++)if("number"===typeof k[h]&&0<=k[h]){for(;a.aoColumns.length<=k[h];)m(a);e(k[h],c[g])}else if("number"===typeof k[h]&&0>k[h])e(a.aoColumns.length+k[h],c[g]);else if("string"===typeof k[h])for(p=0,n=a.aoColumns.length;p<n;p++)("_all"==k[h]||b(a.aoColumns[p].nTh).hasClass(k[h]))&&e(p,c[g])}if(d)for(g=0,a=d.length;g<a;g++)e(g,d[g])}function C(a,
|
||||
c){var d;d=b.isArray(c)?c.slice():b.extend(!0,{},c);var e=a.aoData.length,l=b.extend(!0,{},g.models.oRow);l._aData=d;a.aoData.push(l);for(var m,l=0,k=a.aoColumns.length;l<k;l++)d=a.aoColumns[l],"function"===typeof d.fnRender&&d.bUseRendered&&null!==d.mData?F(a,e,l,X(a,e,l)):F(a,e,l,B(a,e,l)),d._bAutoType&&"string"!=d.sType&&(m=B(a,e,l,"type"),null!==m&&""!==m&&(m=h(m),null===d.sType?d.sType=m:d.sType!=m&&"html"!=d.sType&&(d.sType="string")));a.aiDisplayMaster.push(e);a.oFeatures.bDeferRender||ia(a,
|
||||
e);return e}function v(a){var c,d,e,l,m,k,p;if(a.bDeferLoading||null===a.sAjaxSource)for(c=a.nTBody.firstChild;c;){if("TR"==c.nodeName.toUpperCase())for(d=a.aoData.length,c._DT_RowIndex=d,a.aoData.push(b.extend(!0,{},g.models.oRow,{nTr:c})),a.aiDisplayMaster.push(d),m=c.firstChild,e=0;m;){k=m.nodeName.toUpperCase();if("TD"==k||"TH"==k)F(a,d,e,b.trim(m.innerHTML)),e++;m=m.nextSibling}c=c.nextSibling}l=Y(a);e=[];c=0;for(d=l.length;c<d;c++)for(m=l[c].firstChild;m;)k=m.nodeName.toUpperCase(),"TD"!=k&&
|
||||
"TH"!=k||e.push(m),m=m.nextSibling;d=0;for(l=a.aoColumns.length;d<l;d++){p=a.aoColumns[d];null===p.sTitle&&(p.sTitle=p.nTh.innerHTML);var n=p._bAutoType,s="function"===typeof p.fnRender,q=null!==p.sClass,t=p.bVisible,r,x;if(n||s||q||!t)for(k=0,c=a.aoData.length;k<c;k++)m=a.aoData[k],r=e[k*l+d],n&&"string"!=p.sType&&(x=B(a,k,d,"type"),""!==x&&(x=h(x),null===p.sType?p.sType=x:p.sType!=x&&"html"!=p.sType&&(p.sType="string"))),p.mRender?r.innerHTML=B(a,k,d,"display"):p.mData!==d&&(r.innerHTML=B(a,k,d,
|
||||
"display")),s&&(x=X(a,k,d),r.innerHTML=x,p.bUseRendered&&F(a,k,d,x)),q&&(r.className+=" "+p.sClass),t?m._anHidden[d]=null:(m._anHidden[d]=r,r.parentNode.removeChild(r)),p.fnCreatedCell&&p.fnCreatedCell.call(a.oInstance,r,B(a,k,d,"display"),m._aData,k,d)}if(0!==a.aoRowCreatedCallback.length)for(c=0,d=a.aoData.length;c<d;c++)m=a.aoData[c],K(a,"aoRowCreatedCallback",null,[m.nTr,m._aData,c])}function w(b,a){return a._DT_RowIndex!==e?a._DT_RowIndex:null}function A(b,a,f){a=S(b,a);var c=0;for(b=b.aoColumns.length;c<
|
||||
b;c++)if(a[c]===f)return c;return-1}function u(b,a,f,c){for(var d=[],e=0,g=c.length;e<g;e++)d.push(B(b,a,c[e],f));return d}function B(b,a,f,c){var d=b.aoColumns[f];if((f=d.fnGetData(b.aoData[a]._aData,c))===e)return b.iDrawError!=b.iDraw&&null===d.sDefaultContent&&(M(b,0,"Requested unknown parameter "+("function"==typeof d.mData?"{mData function}":"'"+d.mData+"'")+" from the data source for row "+a),b.iDrawError=b.iDraw),d.sDefaultContent;if(null===f&&null!==d.sDefaultContent)f=d.sDefaultContent;
|
||||
else if("function"===typeof f)return f();return"display"==c&&null===f?"":f}function F(b,a,f,c){b.aoColumns[f].fnSetData(b.aoData[a]._aData,c)}function D(b){if(null===b)return function(){return null};if("function"===typeof b)return function(a,f,c){return b(a,f,c)};if("string"===typeof b&&(-1!==b.indexOf(".")||-1!==b.indexOf("["))){var a=function(b,P,f){var c=f.split("."),d;if(""!==f){var g=0;for(d=c.length;g<d;g++){if(f=c[g].match(Z)){c[g]=c[g].replace(Z,"");""!==c[g]&&(b=b[c[g]]);d=[];c.splice(0,
|
||||
g+1);for(var c=c.join("."),g=0,h=b.length;g<h;g++)d.push(a(b[g],P,c));b=f[0].substring(1,f[0].length-1);b=""===b?d:d.join(b);break}if(null===b||b[c[g]]===e)return e;b=b[c[g]]}}return b};return function(f,c){return a(f,c,b)}}return function(a){return a[b]}}function O(b){if(null===b)return function(){};if("function"===typeof b)return function(a,f){b(a,"set",f)};if("string"===typeof b&&(-1!==b.indexOf(".")||-1!==b.indexOf("["))){var a=function(b,P,f){f=f.split(".");var c,d,g=0;for(d=f.length-1;g<d;g++){if(f[g].match(Z)){f[g]=
|
||||
f[g].replace(Z,"");b[f[g]]=[];c=f.slice();c.splice(0,g+1);d=c.join(".");for(var h=0,l=P.length;h<l;h++)c={},a(c,P[h],d),b[f[g]].push(c);return}if(null===b[f[g]]||b[f[g]]===e)b[f[g]]={};b=b[f[g]]}b[f[f.length-1].replace(Z,"")]=P};return function(f,c){return a(f,c,b)}}return function(a,f){a[b]=f}}function Q(b){for(var a=[],f=b.aoData.length,c=0;c<f;c++)a.push(b.aoData[c]._aData);return a}function ga(b){b.aoData.splice(0,b.aoData.length);b.aiDisplayMaster.splice(0,b.aiDisplayMaster.length);b.aiDisplay.splice(0,
|
||||
b.aiDisplay.length);I(b)}function ha(b,a){for(var f=-1,c=0,d=b.length;c<d;c++)b[c]==a?f=c:b[c]>a&&b[c]--; -1!=f&&b.splice(f,1)}function X(b,a,f){var c=b.aoColumns[f];return c.fnRender({iDataRow:a,iDataColumn:f,oSettings:b,aData:b.aoData[a]._aData,mDataProp:c.mData},B(b,a,f,"display"))}function ia(b,a){var f=b.aoData[a],d;if(null===f.nTr){f.nTr=c.createElement("tr");f.nTr._DT_RowIndex=a;f._aData.DT_RowId&&(f.nTr.id=f._aData.DT_RowId);f._aData.DT_RowClass&&(f.nTr.className=f._aData.DT_RowClass);for(var g=
|
||||
0,e=b.aoColumns.length;g<e;g++){var h=b.aoColumns[g];d=c.createElement(h.sCellType);d.innerHTML="function"!==typeof h.fnRender||h.bUseRendered&&null!==h.mData?B(b,a,g,"display"):X(b,a,g);null!==h.sClass&&(d.className=h.sClass);h.bVisible?(f.nTr.appendChild(d),f._anHidden[g]=null):f._anHidden[g]=d;h.fnCreatedCell&&h.fnCreatedCell.call(b.oInstance,d,B(b,a,g,"display"),f._aData,a,g)}K(b,"aoRowCreatedCallback",null,[f.nTr,f._aData,a])}}function va(a){var d,g,e;if(0!==b("th, td",a.nTHead).length)for(d=
|
||||
0,e=a.aoColumns.length;d<e;d++){if(g=a.aoColumns[d].nTh,g.setAttribute("role","columnheader"),a.aoColumns[d].bSortable&&(g.setAttribute("tabindex",a.iTabIndex),g.setAttribute("aria-controls",a.sTableId)),null!==a.aoColumns[d].sClass&&b(g).addClass(a.aoColumns[d].sClass),a.aoColumns[d].sTitle!=g.innerHTML)g.innerHTML=a.aoColumns[d].sTitle}else{var h=c.createElement("tr");d=0;for(e=a.aoColumns.length;d<e;d++)g=a.aoColumns[d].nTh,g.innerHTML=a.aoColumns[d].sTitle,g.setAttribute("tabindex","0"),null!==
|
||||
a.aoColumns[d].sClass&&b(g).addClass(a.aoColumns[d].sClass),h.appendChild(g);b(a.nTHead).html("")[0].appendChild(h);aa(a.aoHeader,a.nTHead)}b(a.nTHead).children("tr").attr("role","row");if(a.bJUI)for(d=0,e=a.aoColumns.length;d<e;d++){g=a.aoColumns[d].nTh;h=c.createElement("div");h.className=a.oClasses.sSortJUIWrapper;b(g).contents().appendTo(h);var l=c.createElement("span");l.className=a.oClasses.sSortIcon;h.appendChild(l);g.appendChild(h)}if(a.oFeatures.bSort)for(d=0;d<a.aoColumns.length;d++)!1!==
|
||||
a.aoColumns[d].bSortable?ka(a,a.aoColumns[d].nTh,d):b(a.aoColumns[d].nTh).addClass(a.oClasses.sSortableNone);""!==a.oClasses.sFooterTH&&b(a.nTFoot).children("tr").children("th").addClass(a.oClasses.sFooterTH);if(null!==a.nTFoot)for(g=U(a,null,a.aoFooter),d=0,e=a.aoColumns.length;d<e;d++)g[d]&&(a.aoColumns[d].nTf=g[d],a.aoColumns[d].sClass&&b(g[d]).addClass(a.aoColumns[d].sClass))}function ba(b,a,f){var c,d,g,h=[],l=[],m=b.aoColumns.length,k;f===e&&(f=!1);c=0;for(d=a.length;c<d;c++){h[c]=a[c].slice();
|
||||
h[c].nTr=a[c].nTr;for(g=m-1;0<=g;g--)b.aoColumns[g].bVisible||f||h[c].splice(g,1);l.push([])}c=0;for(d=h.length;c<d;c++){if(b=h[c].nTr)for(;g=b.firstChild;)b.removeChild(g);g=0;for(a=h[c].length;g<a;g++)if(k=m=1,l[c][g]===e){b.appendChild(h[c][g].cell);for(l[c][g]=1;h[c+m]!==e&&h[c][g].cell==h[c+m][g].cell;)l[c+m][g]=1,m++;for(;h[c][g+k]!==e&&h[c][g].cell==h[c][g+k].cell;){for(f=0;f<m;f++)l[c+f][g+k]=1;k++}h[c][g].cell.rowSpan=m;h[c][g].cell.colSpan=k}}}function H(a){var d=K(a,"aoPreDrawCallback",
|
||||
"preDraw",[a]);if(-1!==b.inArray(!1,d))N(a,!1);else{var g,h,d=[],l=0,m=a.asStripeClasses.length;g=a.aoOpenRows.length;a.bDrawing=!0;a.iInitDisplayStart!==e&&-1!=a.iInitDisplayStart&&(a._iDisplayStart=a.oFeatures.bServerSide?a.iInitDisplayStart:a.iInitDisplayStart>=a.fnRecordsDisplay()?0:a.iInitDisplayStart,a.iInitDisplayStart=-1,I(a));if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++;else if(a.oFeatures.bServerSide){if(!a.bDestroying&&!wa(a))return}else a.iDraw++;if(0!==a.aiDisplay.length){var k=a._iDisplayStart;
|
||||
h=a._iDisplayEnd;for(a.oFeatures.bServerSide&&(k=0,h=a.aoData.length);k<h;k++){var n=a.aoData[a.aiDisplay[k]];null===n.nTr&&ia(a,a.aiDisplay[k]);var s=n.nTr;if(0!==m){var q=a.asStripeClasses[l%m];n._sRowStripe!=q&&(b(s).removeClass(n._sRowStripe).addClass(q),n._sRowStripe=q)}K(a,"aoRowCallback",null,[s,a.aoData[a.aiDisplay[k]]._aData,l,k]);d.push(s);l++;if(0!==g)for(n=0;n<g;n++)if(s==a.aoOpenRows[n].nParent){d.push(a.aoOpenRows[n].nTr);break}}}else d[0]=c.createElement("tr"),a.asStripeClasses[0]&&
|
||||
(d[0].className=a.asStripeClasses[0]),g=a.oLanguage,m=g.sZeroRecords,1!=a.iDraw||null===a.sAjaxSource||a.oFeatures.bServerSide?g.sEmptyTable&&0===a.fnRecordsTotal()&&(m=g.sEmptyTable):m=g.sLoadingRecords,g=c.createElement("td"),g.setAttribute("valign","top"),g.colSpan=p(a),g.className=a.oClasses.sRowEmpty,g.innerHTML=la(a,m),d[l].appendChild(g);K(a,"aoHeaderCallback","header",[b(a.nTHead).children("tr")[0],Q(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay]);K(a,"aoFooterCallback","footer",[b(a.nTFoot).children("tr")[0],
|
||||
Q(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay]);l=c.createDocumentFragment();g=c.createDocumentFragment();if(a.nTBody){m=a.nTBody.parentNode;g.appendChild(a.nTBody);if(!a.oScroll.bInfinite||!a._bInitComplete||a.bSorted||a.bFiltered)for(;g=a.nTBody.firstChild;)a.nTBody.removeChild(g);g=0;for(h=d.length;g<h;g++)l.appendChild(d[g]);a.nTBody.appendChild(l);null!==m&&m.appendChild(a.nTBody)}K(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1;a.oFeatures.bServerSide&&(N(a,!1),
|
||||
a._bInitComplete||ca(a))}}function da(b){b.oFeatures.bSort?V(b,b.oPreviousSearch):b.oFeatures.bFilter?T(b,b.oPreviousSearch):(I(b),H(b))}function xa(a){var c=b("<div></div>")[0];a.nTable.parentNode.insertBefore(c,a.nTable);a.nTableWrapper=b('<div id="'+a.sTableId+'_wrapper" class="'+a.oClasses.sWrapper+'" role="grid"></div>')[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var d=a.nTableWrapper,e=a.sDom.split(""),h,l,m,k,p,n,s,q=0;q<e.length;q++){l=0;m=e[q];if("<"==m){k=b("<div></div>")[0];p=e[q+
|
||||
1];if("'"==p||'"'==p){n="";for(s=2;e[q+s]!=p;)n+=e[q+s],s++;"H"==n?n=a.oClasses.sJUIHeader:"F"==n&&(n=a.oClasses.sJUIFooter);-1!=n.indexOf(".")?(p=n.split("."),k.id=p[0].substr(1,p[0].length-1),k.className=p[1]):"#"==n.charAt(0)?k.id=n.substr(1,n.length-1):k.className=n;q+=s}d.appendChild(k);d=k}else if(">"==m)d=d.parentNode;else if("l"==m&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange)h=ya(a),l=1;else if("f"==m&&a.oFeatures.bFilter)h=za(a),l=1;else if("r"==m&&a.oFeatures.bProcessing)h=Aa(a),l=
|
||||
1;else if("t"==m)h=Ba(a),l=1;else if("i"==m&&a.oFeatures.bInfo)h=Ca(a),l=1;else if("p"==m&&a.oFeatures.bPaginate)h=Da(a),l=1;else if(0!==g.ext.aoFeatures.length)for(k=g.ext.aoFeatures,s=0,p=k.length;s<p;s++)if(m==k[s].cFeature){(h=k[s].fnInit(a))&&(l=1);break}1==l&&null!==h&&("object"!==typeof a.aanFeatures[m]&&(a.aanFeatures[m]=[]),a.aanFeatures[m].push(h),d.appendChild(h))}c.parentNode.replaceChild(a.nTableWrapper,c)}function aa(a,c){var d=b(c).children("tr"),g,e,h,l,m,k,p,n,s,q;a.splice(0,a.length);
|
||||
h=0;for(k=d.length;h<k;h++)a.push([]);h=0;for(k=d.length;h<k;h++)for(g=d[h],e=g.firstChild;e;){if("TD"==e.nodeName.toUpperCase()||"TH"==e.nodeName.toUpperCase()){n=1*e.getAttribute("colspan");s=1*e.getAttribute("rowspan");n=n&&0!==n&&1!==n?n:1;s=s&&0!==s&&1!==s?s:1;l=0;for(m=a[h];m[l];)l++;p=l;q=1===n?!0:!1;for(m=0;m<n;m++)for(l=0;l<s;l++)a[h+l][p+m]={cell:e,unique:q},a[h+l].nTr=g}e=e.nextSibling}}function U(b,a,f){var c=[];f||(f=b.aoHeader,a&&(f=[],aa(f,a)));a=0;for(var d=f.length;a<d;a++)for(var g=
|
||||
0,e=f[a].length;g<e;g++)!f[a][g].unique||c[g]&&b.bSortCellsTop||(c[g]=f[a][g].cell);return c}function wa(b){if(b.bAjaxDataGet){b.iDraw++;N(b,!0);var a=Ea(b);ma(b,a);b.fnServerData.call(b.oInstance,b.sAjaxSource,a,function(a){Fa(b,a)},b);return!1}return!0}function Ea(b){var a=b.aoColumns.length,f=[],c,d,g,e;f.push({name:"sEcho",value:b.iDraw});f.push({name:"iColumns",value:a});f.push({name:"sColumns",value:q(b)});f.push({name:"iDisplayStart",value:b._iDisplayStart});f.push({name:"iDisplayLength",value:!1!==
|
||||
b.oFeatures.bPaginate?b._iDisplayLength:-1});for(g=0;g<a;g++)c=b.aoColumns[g].mData,f.push({name:"mDataProp_"+g,value:"function"===typeof c?"function":c});if(!1!==b.oFeatures.bFilter)for(f.push({name:"sSearch",value:b.oPreviousSearch.sSearch}),f.push({name:"bRegex",value:b.oPreviousSearch.bRegex}),g=0;g<a;g++)f.push({name:"sSearch_"+g,value:b.aoPreSearchCols[g].sSearch}),f.push({name:"bRegex_"+g,value:b.aoPreSearchCols[g].bRegex}),f.push({name:"bSearchable_"+g,value:b.aoColumns[g].bSearchable});if(!1!==
|
||||
b.oFeatures.bSort){var h=0;c=null!==b.aaSortingFixed?b.aaSortingFixed.concat(b.aaSorting):b.aaSorting.slice();for(g=0;g<c.length;g++)for(d=b.aoColumns[c[g][0]].aDataSort,e=0;e<d.length;e++)f.push({name:"iSortCol_"+h,value:d[e]}),f.push({name:"sSortDir_"+h,value:c[g][1]}),h++;f.push({name:"iSortingCols",value:h});for(g=0;g<a;g++)f.push({name:"bSortable_"+g,value:b.aoColumns[g].bSortable})}return f}function ma(b,a){K(b,"aoServerParams","serverParams",[a])}function Fa(b,a){if(a.sEcho!==e){if(1*a.sEcho<
|
||||
b.iDraw)return;b.iDraw=1*a.sEcho}(!b.oScroll.bInfinite||b.oScroll.bInfinite&&(b.bSorted||b.bFiltered))&&ga(b);b._iRecordsTotal=parseInt(a.iTotalRecords,10);b._iRecordsDisplay=parseInt(a.iTotalDisplayRecords,10);var f=q(b),f=a.sColumns!==e&&""!==f&&a.sColumns!=f,c;f&&(c=s(b,a.sColumns));for(var d=D(b.sAjaxDataProp)(a),g=0,h=d.length;g<h;g++)if(f){for(var l=[],m=0,k=b.aoColumns.length;m<k;m++)l.push(d[g][c[m]]);C(b,l)}else C(b,d[g]);b.aiDisplay=b.aiDisplayMaster.slice();b.bAjaxDataGet=!1;H(b);b.bAjaxDataGet=
|
||||
!0;N(b,!1)}function za(a){var d=a.oPreviousSearch,g=a.oLanguage.sSearch,g=-1!==g.indexOf("_INPUT_")?g.replace("_INPUT_",'<input type="text" />'):""===g?'<input type="text" />':g+' <input type="text" />',e=c.createElement("div");e.className=a.oClasses.sFilter;e.innerHTML="<label>"+g+"</label>";a.aanFeatures.f||(e.id=a.sTableId+"_filter");g=b('input[type="text"]',e);e._DT_Input=g[0];g.val(d.sSearch.replace('"',"""));g.bind("keyup.DT",function(){for(var c=a.aanFeatures.f,g=""===this.value?"":this.value,
|
||||
e=0,h=c.length;e<h;e++)c[e]!=b(this).parents("div.dataTables_filter")[0]&&b(c[e]._DT_Input).val(g);g!=d.sSearch&&T(a,{sSearch:g,bRegex:d.bRegex,bSmart:d.bSmart,bCaseInsensitive:d.bCaseInsensitive})});g.attr("aria-controls",a.sTableId).bind("keypress.DT",function(b){if(13==b.keyCode)return!1});return e}function T(a,c,d){var g=a.oPreviousSearch,e=a.aoPreSearchCols,h=function(b){g.sSearch=b.sSearch;g.bRegex=b.bRegex;g.bSmart=b.bSmart;g.bCaseInsensitive=b.bCaseInsensitive};if(a.oFeatures.bServerSide)h(c);
|
||||
else{Ga(a,c.sSearch,d,c.bRegex,c.bSmart,c.bCaseInsensitive);h(c);for(c=0;c<a.aoPreSearchCols.length;c++)Ha(a,e[c].sSearch,c,e[c].bRegex,e[c].bSmart,e[c].bCaseInsensitive);Ia(a)}a.bFiltered=!0;b(a.oInstance).trigger("filter",a);a._iDisplayStart=0;I(a);H(a);na(a,0)}function Ia(b){for(var a=g.ext.afnFiltering,f=t(b,"bSearchable"),c=0,d=a.length;c<d;c++)for(var e=0,h=0,l=b.aiDisplay.length;h<l;h++){var m=b.aiDisplay[h-e];a[c](b,u(b,m,"filter",f),m)||(b.aiDisplay.splice(h-e,1),e++)}}function Ha(b,a,f,
|
||||
c,d,g){if(""!==a){var e=0;a=oa(a,c,d,g);for(c=b.aiDisplay.length-1;0<=c;c--)d=Ja(B(b,b.aiDisplay[c],f,"filter"),b.aoColumns[f].sType),a.test(d)||(b.aiDisplay.splice(c,1),e++)}}function Ga(b,a,f,c,d,e){c=oa(a,c,d,e);d=b.oPreviousSearch;f||(f=0);0!==g.ext.afnFiltering.length&&(f=1);if(0>=a.length)b.aiDisplay.splice(0,b.aiDisplay.length),b.aiDisplay=b.aiDisplayMaster.slice();else if(b.aiDisplay.length==b.aiDisplayMaster.length||d.sSearch.length>a.length||1==f||0!==a.indexOf(d.sSearch))for(b.aiDisplay.splice(0,
|
||||
b.aiDisplay.length),na(b,1),a=0;a<b.aiDisplayMaster.length;a++)c.test(b.asDataSearch[a])&&b.aiDisplay.push(b.aiDisplayMaster[a]);else for(a=f=0;a<b.asDataSearch.length;a++)c.test(b.asDataSearch[a])||(b.aiDisplay.splice(a-f,1),f++)}function na(b,a){if(!b.oFeatures.bServerSide){b.asDataSearch=[];for(var f=t(b,"bSearchable"),c=1===a?b.aiDisplayMaster:b.aiDisplay,d=0,g=c.length;d<g;d++)b.asDataSearch[d]=pa(b,u(b,c[d],"filter",f))}}function pa(a,c){var d=c.join(" ");-1!==d.indexOf("&")&&(d=b("<div>").html(d).text());
|
||||
return d.replace(/[\n\r]/g," ")}function oa(b,a,f,c){if(f)return b=a?b.split(" "):qa(b).split(" "),b="^(?=.*?"+b.join(")(?=.*?")+").*$",RegExp(b,c?"i":"");b=a?b:qa(b);return RegExp(b,c?"i":"")}function Ja(b,a){return"function"===typeof g.ext.ofnSearch[a]?g.ext.ofnSearch[a](b):null===b?"":"html"==a?b.replace(/[\r\n]/g," ").replace(/<.*?>/g,""):"string"===typeof b?b.replace(/[\r\n]/g," "):b}function qa(b){return b.replace(/(\/|\.|\*|\+|\?|\||\(|\)|\[|\]|\{|\}|\\|\$|\^|\-)/g,"\\$1")}function Ca(b){var a=
|
||||
c.createElement("div");a.className=b.oClasses.sInfo;b.aanFeatures.i||(b.aoDrawCallback.push({fn:Ka,sName:"information"}),a.id=b.sTableId+"_info");b.nTable.setAttribute("aria-describedby",b.sTableId+"_info");return a}function Ka(a){if(a.oFeatures.bInfo&&0!==a.aanFeatures.i.length){var c=a.oLanguage,d=a._iDisplayStart+1,g=a.fnDisplayEnd(),e=a.fnRecordsTotal(),h=a.fnRecordsDisplay(),l;l=0===h?c.sInfoEmpty:c.sInfo;h!=e&&(l+=" "+c.sInfoFiltered);l+=c.sInfoPostFix;l=la(a,l);null!==c.fnInfoCallback&&(l=
|
||||
c.fnInfoCallback.call(a.oInstance,a,d,g,e,h,l));a=a.aanFeatures.i;c=0;for(d=a.length;c<d;c++)b(a[c]).html(l)}}function la(b,a){var f=b.fnFormatNumber(b._iDisplayStart+1),c=b.fnDisplayEnd(),c=b.fnFormatNumber(c),d=b.fnRecordsDisplay(),d=b.fnFormatNumber(d),g=b.fnRecordsTotal(),g=b.fnFormatNumber(g);b.oScroll.bInfinite&&(f=b.fnFormatNumber(1));return a.replace(/_START_/g,f).replace(/_END_/g,c).replace(/_TOTAL_/g,d).replace(/_MAX_/g,g)}function ea(b){var a,f,c=b.iInitDisplayStart;if(!1===b.bInitialised)setTimeout(function(){ea(b)},
|
||||
200);else{xa(b);va(b);ba(b,b.aoHeader);b.nTFoot&&ba(b,b.aoFooter);N(b,!0);b.oFeatures.bAutoWidth&&ja(b);a=0;for(f=b.aoColumns.length;a<f;a++)null!==b.aoColumns[a].sWidth&&(b.aoColumns[a].nTh.style.width=z(b.aoColumns[a].sWidth));b.oFeatures.bSort?V(b):b.oFeatures.bFilter?T(b,b.oPreviousSearch):(b.aiDisplay=b.aiDisplayMaster.slice(),I(b),H(b));null===b.sAjaxSource||b.oFeatures.bServerSide?b.oFeatures.bServerSide||(N(b,!1),ca(b)):(f=[],ma(b,f),b.fnServerData.call(b.oInstance,b.sAjaxSource,f,function(f){var d=
|
||||
""!==b.sAjaxDataProp?D(b.sAjaxDataProp)(f):f;for(a=0;a<d.length;a++)C(b,d[a]);b.iInitDisplayStart=c;b.oFeatures.bSort?V(b):(b.aiDisplay=b.aiDisplayMaster.slice(),I(b),H(b));N(b,!1);ca(b,f)},b))}}function ca(b,a){b._bInitComplete=!0;K(b,"aoInitComplete","init",[b,a])}function ra(b){var a=g.defaults.oLanguage;!b.sEmptyTable&&b.sZeroRecords&&"No data available in table"===a.sEmptyTable&&y(b,b,"sZeroRecords","sEmptyTable");!b.sLoadingRecords&&b.sZeroRecords&&"Loading..."===a.sLoadingRecords&&y(b,b,"sZeroRecords",
|
||||
"sLoadingRecords")}function ya(a){if(a.oScroll.bInfinite)return null;var d='<select size="1" '+('name="'+a.sTableId+'_length"')+">",g,e,h=a.aLengthMenu;if(2==h.length&&"object"===typeof h[0]&&"object"===typeof h[1])for(g=0,e=h[0].length;g<e;g++)d+='<option value="'+h[0][g]+'">'+h[1][g]+"</option>";else for(g=0,e=h.length;g<e;g++)d+='<option value="'+h[g]+'">'+h[g]+"</option>";d+="</select>";h=c.createElement("div");a.aanFeatures.l||(h.id=a.sTableId+"_length");h.className=a.oClasses.sLength;h.innerHTML=
|
||||
"<label>"+a.oLanguage.sLengthMenu.replace("_MENU_",d)+"</label>";b('select option[value="'+a._iDisplayLength+'"]',h).attr("selected",!0);b("select",h).bind("change.DT",function(){var c=b(this).val(),d=a.aanFeatures.l;g=0;for(e=d.length;g<e;g++)d[g]!=this.parentNode&&b("select",d[g]).val(c);a._iDisplayLength=parseInt(c,10);I(a);a.fnDisplayEnd()==a.fnRecordsDisplay()&&(a._iDisplayStart=a.fnDisplayEnd()-a._iDisplayLength,0>a._iDisplayStart&&(a._iDisplayStart=0));-1==a._iDisplayLength&&(a._iDisplayStart=
|
||||
0);H(a)});b("select",h).attr("aria-controls",a.sTableId);return h}function I(b){b._iDisplayEnd=!1===b.oFeatures.bPaginate?b.aiDisplay.length:b._iDisplayStart+b._iDisplayLength>b.aiDisplay.length||-1==b._iDisplayLength?b.aiDisplay.length:b._iDisplayStart+b._iDisplayLength}function Da(b){if(b.oScroll.bInfinite)return null;var a=c.createElement("div");a.className=b.oClasses.sPaging+b.sPaginationType;g.ext.oPagination[b.sPaginationType].fnInit(b,a,function(b){I(b);H(b)});b.aanFeatures.p||b.aoDrawCallback.push({fn:function(b){g.ext.oPagination[b.sPaginationType].fnUpdate(b,
|
||||
function(b){I(b);H(b)})},sName:"pagination"});return a}function sa(a,c){var d=a._iDisplayStart;if("number"===typeof c)a._iDisplayStart=c*a._iDisplayLength,a._iDisplayStart>a.fnRecordsDisplay()&&(a._iDisplayStart=0);else if("first"==c)a._iDisplayStart=0;else if("previous"==c)a._iDisplayStart=0<=a._iDisplayLength?a._iDisplayStart-a._iDisplayLength:0,0>a._iDisplayStart&&(a._iDisplayStart=0);else if("next"==c)0<=a._iDisplayLength?a._iDisplayStart+a._iDisplayLength<a.fnRecordsDisplay()&&(a._iDisplayStart+=
|
||||
a._iDisplayLength):a._iDisplayStart=0;else if("last"==c)if(0<=a._iDisplayLength){var g=parseInt((a.fnRecordsDisplay()-1)/a._iDisplayLength,10)+1;a._iDisplayStart=(g-1)*a._iDisplayLength}else a._iDisplayStart=0;else M(a,0,"Unknown paging action: "+c);b(a.oInstance).trigger("page",a);return d!=a._iDisplayStart}function Aa(b){var a=c.createElement("div");b.aanFeatures.r||(a.id=b.sTableId+"_processing");a.innerHTML=b.oLanguage.sProcessing;a.className=b.oClasses.sProcessing;b.nTable.parentNode.insertBefore(a,
|
||||
b.nTable);return a}function N(a,c){if(a.oFeatures.bProcessing)for(var d=a.aanFeatures.r,g=0,e=d.length;g<e;g++)d[g].style.visibility=c?"visible":"hidden";b(a.oInstance).trigger("processing",[a,c])}function Ba(a){if(""===a.oScroll.sX&&""===a.oScroll.sY)return a.nTable;var d=c.createElement("div"),g=c.createElement("div"),e=c.createElement("div"),h=c.createElement("div"),l=c.createElement("div"),m=c.createElement("div"),k=a.nTable.cloneNode(!1),p=a.nTable.cloneNode(!1),n=a.nTable.getElementsByTagName("thead")[0],
|
||||
s=0===a.nTable.getElementsByTagName("tfoot").length?null:a.nTable.getElementsByTagName("tfoot")[0],q=a.oClasses;g.appendChild(e);l.appendChild(m);h.appendChild(a.nTable);d.appendChild(g);d.appendChild(h);e.appendChild(k);k.appendChild(n);null!==s&&(d.appendChild(l),m.appendChild(p),p.appendChild(s));d.className=q.sScrollWrapper;g.className=q.sScrollHead;e.className=q.sScrollHeadInner;h.className=q.sScrollBody;l.className=q.sScrollFoot;m.className=q.sScrollFootInner;a.oScroll.bAutoCss&&(g.style.overflow=
|
||||
"hidden",g.style.position="relative",l.style.overflow="hidden",h.style.overflow="auto");g.style.border="0";g.style.width="100%";l.style.border="0";e.style.width=""!==a.oScroll.sXInner?a.oScroll.sXInner:"100%";k.removeAttribute("id");k.style.marginLeft="0";a.nTable.style.marginLeft="0";null!==s&&(p.removeAttribute("id"),p.style.marginLeft="0");e=b(a.nTable).children("caption");0<e.length&&(e=e[0],"top"===e._captionSide?k.appendChild(e):"bottom"===e._captionSide&&s&&p.appendChild(e));""!==a.oScroll.sX&&
|
||||
(g.style.width=z(a.oScroll.sX),h.style.width=z(a.oScroll.sX),null!==s&&(l.style.width=z(a.oScroll.sX)),b(h).scroll(function(){g.scrollLeft=this.scrollLeft;null!==s&&(l.scrollLeft=this.scrollLeft)}));""!==a.oScroll.sY&&(h.style.height=z(a.oScroll.sY));a.aoDrawCallback.push({fn:La,sName:"scrolling"});a.oScroll.bInfinite&&b(h).scroll(function(){!a.bDrawing&&(0!==b(this).scrollTop()&&b(this).scrollTop()+b(this).height()>b(a.nTable).height()-a.oScroll.iLoadGap&&a.fnDisplayEnd()<a.fnRecordsDisplay())&&
|
||||
(sa(a,"next"),I(a),H(a))});a.nScrollHead=g;a.nScrollFoot=l;return d}function La(a){var c=a.nScrollHead.getElementsByTagName("div")[0],d=c.getElementsByTagName("table")[0],g=a.nTable.parentNode,e,h,l,m,p,n,s,q,t=[],r=[],x=null!==a.nTFoot?a.nScrollFoot.getElementsByTagName("div")[0]:null,w=null!==a.nTFoot?x.getElementsByTagName("table")[0]:null,v=a.oBrowser.bScrollOversize,A=function(b){s=b.style;s.paddingTop="0";s.paddingBottom="0";s.borderTopWidth="0";s.borderBottomWidth="0";s.height=0};b(a.nTable).children("thead, tfoot").remove();
|
||||
e=b(a.nTHead).clone()[0];a.nTable.insertBefore(e,a.nTable.childNodes[0]);l=a.nTHead.getElementsByTagName("tr");m=e.getElementsByTagName("tr");null!==a.nTFoot&&(p=b(a.nTFoot).clone()[0],a.nTable.insertBefore(p,a.nTable.childNodes[1]),n=a.nTFoot.getElementsByTagName("tr"),p=p.getElementsByTagName("tr"));""===a.oScroll.sX&&(g.style.width="100%",c.parentNode.style.width="100%");var C=U(a,e);e=0;for(h=C.length;e<h;e++)q=k(a,e),C[e].style.width=a.aoColumns[q].sWidth;null!==a.nTFoot&&L(function(b){b.style.width=
|
||||
""},p);a.oScroll.bCollapse&&""!==a.oScroll.sY&&(g.style.height=g.offsetHeight+a.nTHead.offsetHeight+"px");e=b(a.nTable).outerWidth();if(""===a.oScroll.sX){if(a.nTable.style.width="100%",v&&(b("tbody",g).height()>g.offsetHeight||"scroll"==b(g).css("overflow-y")))a.nTable.style.width=z(b(a.nTable).outerWidth()-a.oScroll.iBarWidth)}else""!==a.oScroll.sXInner?a.nTable.style.width=z(a.oScroll.sXInner):e==b(g).width()&&b(g).height()<b(a.nTable).height()?(a.nTable.style.width=z(e-a.oScroll.iBarWidth),b(a.nTable).outerWidth()>
|
||||
e-a.oScroll.iBarWidth&&(a.nTable.style.width=z(e))):a.nTable.style.width=z(e);e=b(a.nTable).outerWidth();L(A,m);L(function(a){t.push(z(b(a).width()))},m);L(function(b,a){b.style.width=t[a]},l);b(m).height(0);null!==a.nTFoot&&(L(A,p),L(function(a){r.push(z(b(a).width()))},p),L(function(b,a){b.style.width=r[a]},n),b(p).height(0));L(function(b,a){b.innerHTML="";b.style.width=t[a]},m);null!==a.nTFoot&&L(function(b,a){b.innerHTML="";b.style.width=r[a]},p);b(a.nTable).outerWidth()<e?(l=g.scrollHeight>g.offsetHeight||
|
||||
"scroll"==b(g).css("overflow-y")?e+a.oScroll.iBarWidth:e,v&&(g.scrollHeight>g.offsetHeight||"scroll"==b(g).css("overflow-y"))&&(a.nTable.style.width=z(l-a.oScroll.iBarWidth)),g.style.width=z(l),a.nScrollHead.style.width=z(l),null!==a.nTFoot&&(a.nScrollFoot.style.width=z(l)),""===a.oScroll.sX?M(a,1,"The table cannot fit into the current element which will cause column misalignment. The table has been drawn at its minimum possible width."):""!==a.oScroll.sXInner&&M(a,1,"The table cannot fit into the current element which will cause column misalignment. Increase the sScrollXInner value or remove it to allow automatic calculation")):
|
||||
(g.style.width=z("100%"),a.nScrollHead.style.width=z("100%"),null!==a.nTFoot&&(a.nScrollFoot.style.width=z("100%")));""===a.oScroll.sY&&v&&(g.style.height=z(a.nTable.offsetHeight+a.oScroll.iBarWidth));""!==a.oScroll.sY&&a.oScroll.bCollapse&&(g.style.height=z(a.oScroll.sY),v=""!==a.oScroll.sX&&a.nTable.offsetWidth>g.offsetWidth?a.oScroll.iBarWidth:0,a.nTable.offsetHeight<g.offsetHeight&&(g.style.height=z(a.nTable.offsetHeight+v)));v=b(a.nTable).outerWidth();d.style.width=z(v);c.style.width=z(v);d=
|
||||
b(a.nTable).height()>g.clientHeight||"scroll"==b(g).css("overflow-y");c.style.paddingRight=d?a.oScroll.iBarWidth+"px":"0px";null!==a.nTFoot&&(w.style.width=z(v),x.style.width=z(v),x.style.paddingRight=d?a.oScroll.iBarWidth+"px":"0px");b(g).scroll();if(a.bSorted||a.bFiltered)g.scrollTop=0}function L(b,a,c){for(var f=0,d=0,g=a.length,e,h;d<g;){e=a[d].firstChild;for(h=c?c[d].firstChild:null;e;)1===e.nodeType&&(c?b(e,h,f):b(e,f),f++),e=e.nextSibling,h=c?h.nextSibling:null;d++}}function Ma(b,a){if(!b||
|
||||
null===b||""===b)return 0;a||(a=c.body);var f,d=c.createElement("div");d.style.width=z(b);a.appendChild(d);f=d.offsetWidth;a.removeChild(d);return f}function ja(a){var d=0,g,e=0,h=a.aoColumns.length,l,m,k=b("th",a.nTHead),p=a.nTable.getAttribute("width");m=a.nTable.parentNode;for(l=0;l<h;l++)a.aoColumns[l].bVisible&&(e++,null!==a.aoColumns[l].sWidth&&(g=Ma(a.aoColumns[l].sWidthOrig,m),null!==g&&(a.aoColumns[l].sWidth=z(g)),d++));if(h==k.length&&0===d&&e==h&&""===a.oScroll.sX&&""===a.oScroll.sY)for(l=
|
||||
0;l<a.aoColumns.length;l++)g=b(k[l]).width(),null!==g&&(a.aoColumns[l].sWidth=z(g));else{d=a.nTable.cloneNode(!1);l=a.nTHead.cloneNode(!0);e=c.createElement("tbody");g=c.createElement("tr");d.removeAttribute("id");d.appendChild(l);null!==a.nTFoot&&(d.appendChild(a.nTFoot.cloneNode(!0)),L(function(a){a.style.width=""},d.getElementsByTagName("tr")));d.appendChild(e);e.appendChild(g);e=b("thead th",d);0===e.length&&(e=b("tbody tr:eq(0)>td",d));k=U(a,l);for(l=e=0;l<h;l++){var n=a.aoColumns[l];n.bVisible&&
|
||||
null!==n.sWidthOrig&&""!==n.sWidthOrig?k[l-e].style.width=z(n.sWidthOrig):n.bVisible?k[l-e].style.width="":e++}for(l=0;l<h;l++)a.aoColumns[l].bVisible&&(e=Na(a,l),null!==e&&(e=e.cloneNode(!0),""!==a.aoColumns[l].sContentPadding&&(e.innerHTML+=a.aoColumns[l].sContentPadding),g.appendChild(e)));m.appendChild(d);""!==a.oScroll.sX&&""!==a.oScroll.sXInner?d.style.width=z(a.oScroll.sXInner):""!==a.oScroll.sX?(d.style.width="",b(d).width()<m.offsetWidth&&(d.style.width=z(m.offsetWidth))):""!==a.oScroll.sY?
|
||||
d.style.width=z(m.offsetWidth):p&&(d.style.width=z(p));d.style.visibility="hidden";Oa(a,d);h=b("tbody tr:eq(0)",d).children();0===h.length&&(h=U(a,b("thead",d)[0]));if(""!==a.oScroll.sX){for(l=e=m=0;l<a.aoColumns.length;l++)a.aoColumns[l].bVisible&&(m=null===a.aoColumns[l].sWidthOrig?m+b(h[e]).outerWidth():m+(parseInt(a.aoColumns[l].sWidth.replace("px",""),10)+(b(h[e]).outerWidth()-b(h[e]).width())),e++);d.style.width=z(m);a.nTable.style.width=z(m)}for(l=e=0;l<a.aoColumns.length;l++)a.aoColumns[l].bVisible&&
|
||||
(m=b(h[e]).width(),null!==m&&0<m&&(a.aoColumns[l].sWidth=z(m)),e++);h=b(d).css("width");a.nTable.style.width=-1!==h.indexOf("%")?h:z(b(d).outerWidth());d.parentNode.removeChild(d)}p&&(a.nTable.style.width=z(p))}function Oa(a,c){""===a.oScroll.sX&&""!==a.oScroll.sY?(b(c).width(),c.style.width=z(b(c).outerWidth()-a.oScroll.iBarWidth)):""!==a.oScroll.sX&&(c.style.width=z(b(c).outerWidth()))}function Na(a,b){var f=Pa(a,b);if(0>f)return null;if(null===a.aoData[f].nTr){var d=c.createElement("td");d.innerHTML=
|
||||
B(a,f,b,"");return d}return S(a,f)[b]}function Pa(a,b){for(var c=-1,f=-1,d=0;d<a.aoData.length;d++){var g=B(a,d,b,"display")+"",g=g.replace(/<.*?>/g,"");g.length>c&&(c=g.length,f=d)}return f}function z(a){if(null===a)return"0px";if("number"==typeof a)return 0>a?"0px":a+"px";var b=a.charCodeAt(a.length-1);return 48>b||57<b?a:a+"px"}function Qa(){var a=c.createElement("p"),b=a.style;b.width="100%";b.height="200px";b.padding="0px";var f=c.createElement("div"),b=f.style;b.position="absolute";b.top="0px";
|
||||
b.left="0px";b.visibility="hidden";b.width="200px";b.height="150px";b.padding="0px";b.overflow="hidden";f.appendChild(a);c.body.appendChild(f);b=a.offsetWidth;f.style.overflow="scroll";a=a.offsetWidth;b==a&&(a=f.clientWidth);c.body.removeChild(f);return b-a}function V(a,c){var d,h,l,m,k,p,n=[],s=[],q=g.ext.oSort,t=a.aoData,x=a.aoColumns,w=a.oLanguage.oAria;if(!a.oFeatures.bServerSide&&(0!==a.aaSorting.length||null!==a.aaSortingFixed)){n=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):
|
||||
a.aaSorting.slice();for(d=0;d<n.length;d++)if(h=n[d][0],l=r(a,h),m=a.aoColumns[h].sSortDataType,g.ext.afnSortData[m])if(k=g.ext.afnSortData[m].call(a.oInstance,a,h,l),k.length===t.length)for(l=0,m=t.length;l<m;l++)F(a,l,h,k[l]);else M(a,0,"Returned data sort array (col "+h+") is the wrong length");d=0;for(h=a.aiDisplayMaster.length;d<h;d++)s[a.aiDisplayMaster[d]]=d;var v=n.length,A;d=0;for(h=t.length;d<h;d++)for(l=0;l<v;l++)for(A=x[n[l][0]].aDataSort,k=0,p=A.length;k<p;k++)m=x[A[k]].sType,m=q[(m?
|
||||
m:"string")+"-pre"],t[d]._aSortData[A[k]]=m?m(B(a,d,A[k],"sort")):B(a,d,A[k],"sort");a.aiDisplayMaster.sort(function(a,b){var c,f,d,g,e;for(c=0;c<v;c++)for(e=x[n[c][0]].aDataSort,f=0,d=e.length;f<d;f++)if(g=x[e[f]].sType,g=q[(g?g:"string")+"-"+n[c][1]](t[a]._aSortData[e[f]],t[b]._aSortData[e[f]]),0!==g)return g;return q["numeric-asc"](s[a],s[b])})}c!==e&&!c||a.oFeatures.bDeferRender||W(a);d=0;for(h=a.aoColumns.length;d<h;d++)m=x[d].sTitle.replace(/<.*?>/g,""),l=x[d].nTh,l.removeAttribute("aria-sort"),
|
||||
l.removeAttribute("aria-label"),x[d].bSortable?0<n.length&&n[0][0]==d?(l.setAttribute("aria-sort","asc"==n[0][1]?"ascending":"descending"),l.setAttribute("aria-label",m+("asc"==(x[d].asSorting[n[0][2]+1]?x[d].asSorting[n[0][2]+1]:x[d].asSorting[0])?w.sSortAscending:w.sSortDescending))):l.setAttribute("aria-label",m+("asc"==x[d].asSorting[0]?w.sSortAscending:w.sSortDescending)):l.setAttribute("aria-label",m);a.bSorted=!0;b(a.oInstance).trigger("sort",a);a.oFeatures.bFilter?T(a,a.oPreviousSearch,1):
|
||||
(a.aiDisplay=a.aiDisplayMaster.slice(),a._iDisplayStart=0,I(a),H(a))}function ka(a,b,c,f){Ra(b,{},function(b){if(!1!==a.aoColumns[c].bSortable){var d=function(){var f,d;if(b.shiftKey){for(var g=!1,e=0;e<a.aaSorting.length;e++)if(a.aaSorting[e][0]==c){g=!0;f=a.aaSorting[e][0];d=a.aaSorting[e][2]+1;a.aoColumns[f].asSorting[d]?(a.aaSorting[e][1]=a.aoColumns[f].asSorting[d],a.aaSorting[e][2]=d):a.aaSorting.splice(e,1);break}!1===g&&a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0])}else 1==a.aaSorting.length&&
|
||||
a.aaSorting[0][0]==c?(f=a.aaSorting[0][0],d=a.aaSorting[0][2]+1,a.aoColumns[f].asSorting[d]||(d=0),a.aaSorting[0][1]=a.aoColumns[f].asSorting[d],a.aaSorting[0][2]=d):(a.aaSorting.splice(0,a.aaSorting.length),a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0]));V(a)};a.oFeatures.bProcessing?(N(a,!0),setTimeout(function(){d();a.oFeatures.bServerSide||N(a,!1)},0)):d();"function"==typeof f&&f(a)}})}function W(a){var c,d,g,e,h,l=a.aoColumns.length,m=a.oClasses;for(c=0;c<l;c++)a.aoColumns[c].bSortable&&
|
||||
b(a.aoColumns[c].nTh).removeClass(m.sSortAsc+" "+m.sSortDesc+" "+a.aoColumns[c].sSortingClass);d=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(c=0;c<a.aoColumns.length;c++)if(a.aoColumns[c].bSortable){h=a.aoColumns[c].sSortingClass;e=-1;for(g=0;g<d.length;g++)if(d[g][0]==c){h="asc"==d[g][1]?m.sSortAsc:m.sSortDesc;e=g;break}b(a.aoColumns[c].nTh).addClass(h);a.bJUI&&(h=b("span."+m.sSortIcon,a.aoColumns[c].nTh),h.removeClass(m.sSortJUIAsc+" "+m.sSortJUIDesc+" "+
|
||||
m.sSortJUI+" "+m.sSortJUIAscAllowed+" "+m.sSortJUIDescAllowed),h.addClass(-1==e?a.aoColumns[c].sSortingClassJUI:"asc"==d[e][1]?m.sSortJUIAsc:m.sSortJUIDesc))}else b(a.aoColumns[c].nTh).addClass(a.aoColumns[c].sSortingClass);h=m.sSortColumn;if(a.oFeatures.bSort&&a.oFeatures.bSortClasses){a=S(a);e=[];for(c=0;c<l;c++)e.push("");c=0;for(g=1;c<d.length;c++)m=parseInt(d[c][0],10),e[m]=h+g,3>g&&g++;h=RegExp(h+"[123]");var k;c=0;for(d=a.length;c<d;c++)m=c%l,g=a[c].className,k=e[m],m=g.replace(h,k),m!=g?a[c].className=
|
||||
b.trim(m):0<k.length&&-1==g.indexOf(k)&&(a[c].className=g+" "+k)}}function ta(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var c,d;c=a.oScroll.bInfinite;var g={iCreate:(new Date).getTime(),iStart:c?0:a._iDisplayStart,iEnd:c?a._iDisplayLength:a._iDisplayEnd,iLength:a._iDisplayLength,aaSorting:b.extend(!0,[],a.aaSorting),oSearch:b.extend(!0,{},a.oPreviousSearch),aoSearchCols:b.extend(!0,[],a.aoPreSearchCols),abVisCols:[]};c=0;for(d=a.aoColumns.length;c<d;c++)g.abVisCols.push(a.aoColumns[c].bVisible);
|
||||
K(a,"aoStateSaveParams","stateSaveParams",[a,g]);a.fnStateSave.call(a.oInstance,a,g)}}function Sa(a,c){if(a.oFeatures.bStateSave){var d=a.fnStateLoad.call(a.oInstance,a);if(d){var g=K(a,"aoStateLoadParams","stateLoadParams",[a,d]);if(-1===b.inArray(!1,g)){a.oLoadedState=b.extend(!0,{},d);a._iDisplayStart=d.iStart;a.iInitDisplayStart=d.iStart;a._iDisplayEnd=d.iEnd;a._iDisplayLength=d.iLength;a.aaSorting=d.aaSorting.slice();a.saved_aaSorting=d.aaSorting.slice();b.extend(a.oPreviousSearch,d.oSearch);
|
||||
b.extend(!0,a.aoPreSearchCols,d.aoSearchCols);c.saved_aoColumns=[];for(g=0;g<d.abVisCols.length;g++)c.saved_aoColumns[g]={},c.saved_aoColumns[g].bVisible=d.abVisCols[g];K(a,"aoStateLoaded","stateLoaded",[a,d])}}}}function E(a){for(var b=0;b<g.settings.length;b++)if(g.settings[b].nTable===a)return g.settings[b];return null}function Y(a){var b=[];a=a.aoData;for(var c=0,d=a.length;c<d;c++)null!==a[c].nTr&&b.push(a[c].nTr);return b}function S(a,b){var c=[],d,f,g,h,l,m;f=0;var k=a.aoData.length;b!==e&&
|
||||
(f=b,k=b+1);for(g=f;g<k;g++)if(m=a.aoData[g],null!==m.nTr){f=[];for(d=m.nTr.firstChild;d;)h=d.nodeName.toLowerCase(),"td"!=h&&"th"!=h||f.push(d),d=d.nextSibling;h=d=0;for(l=a.aoColumns.length;h<l;h++)a.aoColumns[h].bVisible?c.push(f[h-d]):(c.push(m._anHidden[h]),d++)}return c}function M(b,c,d){b=null===b?"DataTables warning: "+d:"DataTables warning (table id = '"+b.sTableId+"'): "+d;if(0===c)if("alert"==g.ext.sErrMode)alert(b);else throw Error(b);else a.console&&console.log&&console.log(b)}function y(a,
|
||||
b,c,d){d===e&&(d=c);b[c]!==e&&(a[d]=b[c])}function Ta(a,c){var g,e;for(e in c)c.hasOwnProperty(e)&&(g=c[e],"object"===typeof d[e]&&null!==g&&!1===b.isArray(g)?b.extend(!0,a[e],g):a[e]=g);return a}function Ra(a,c,d){b(a).bind("click.DT",c,function(b){a.blur();d(b)}).bind("keypress.DT",c,function(a){13===a.which&&d(a)}).bind("selectstart.DT",function(){return!1})}function J(a,b,c,d){c&&a[b].push({fn:c,sName:d})}function K(a,c,d,g){c=a[c];for(var e=[],h=c.length-1;0<=h;h--)e.push(c[h].fn.apply(a.oInstance,
|
||||
g));null!==d&&b(a.oInstance).trigger(d,g);return e}function Ua(a){var d=b('<div style="position:absolute; top:0; left:0; height:1px; width:1px; overflow:hidden"><div style="position:absolute; top:1px; left:1px; width:100px; overflow:scroll;"><div id="DT_BrowserTest" style="width:100%; height:10px;"></div></div></div>')[0];c.body.appendChild(d);a.oBrowser.bScrollOversize=100===b("#DT_BrowserTest",d)[0].offsetWidth?!0:!1;c.body.removeChild(d)}function Va(a){return function(){var b=[E(this[g.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));
|
||||
return g.ext.oApi[a].apply(this,b)}}var Z=/\[.*?\]$/,Wa=a.JSON?JSON.stringify:function(a){var c=typeof a;if("object"!==c||null===a)return"string"===c&&(a='"'+a+'"'),a+"";var d,g,e=[],h=b.isArray(a);for(d in a)g=a[d],c=typeof g,"string"===c?g='"'+g+'"':"object"===c&&null!==g&&(g=Wa(g)),e.push((h?"":'"'+d+'":')+g);return(h?"[":"{")+e+(h?"]":"}")};this.$=function(a,c){var d,e,h=[],l;e=E(this[g.ext.iApiIndex]);var m=e.aoData,k=e.aiDisplay,p=e.aiDisplayMaster;c||(c={});c=b.extend({},{filter:"none",order:"current",
|
||||
page:"all"},c);if("current"==c.page)for(d=e._iDisplayStart,e=e.fnDisplayEnd();d<e;d++)(l=m[k[d]].nTr)&&h.push(l);else if("current"==c.order&&"none"==c.filter)for(d=0,e=p.length;d<e;d++)(l=m[p[d]].nTr)&&h.push(l);else if("current"==c.order&&"applied"==c.filter)for(d=0,e=k.length;d<e;d++)(l=m[k[d]].nTr)&&h.push(l);else if("original"==c.order&&"none"==c.filter)for(d=0,e=m.length;d<e;d++)(l=m[d].nTr)&&h.push(l);else if("original"==c.order&&"applied"==c.filter)for(d=0,e=m.length;d<e;d++)l=m[d].nTr,-1!==
|
||||
b.inArray(d,k)&&l&&h.push(l);else M(e,1,"Unknown selection options");h=b(h);d=h.filter(a);h=h.find(a);return b([].concat(b.makeArray(d),b.makeArray(h)))};this._=function(a,b){var c=[],d,f,g=this.$(a,b);d=0;for(f=g.length;d<f;d++)c.push(this.fnGetData(g[d]));return c};this.fnAddData=function(a,b){if(0===a.length)return[];var c=[],d,f=E(this[g.ext.iApiIndex]);if("object"===typeof a[0]&&null!==a[0])for(var h=0;h<a.length;h++){d=C(f,a[h]);if(-1==d)return c;c.push(d)}else{d=C(f,a);if(-1==d)return c;c.push(d)}f.aiDisplay=
|
||||
f.aiDisplayMaster.slice();(b===e||b)&&da(f);return c};this.fnAdjustColumnSizing=function(a){var b=E(this[g.ext.iApiIndex]);l(b);a===e||a?this.fnDraw(!1):(""!==b.oScroll.sX||""!==b.oScroll.sY)&&this.oApi._fnScrollDraw(b)};this.fnClearTable=function(a){var b=E(this[g.ext.iApiIndex]);ga(b);(a===e||a)&&H(b)};this.fnClose=function(a){for(var b=E(this[g.ext.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a)return(a=b.aoOpenRows[c].nTr.parentNode)&&a.removeChild(b.aoOpenRows[c].nTr),
|
||||
b.aoOpenRows.splice(c,1),0;return 1};this.fnDeleteRow=function(a,c,d){var h=E(this[g.ext.iApiIndex]),l,m;a="object"===typeof a?w(h,a):a;var k=h.aoData.splice(a,1);l=0;for(m=h.aoData.length;l<m;l++)null!==h.aoData[l].nTr&&(h.aoData[l].nTr._DT_RowIndex=l);l=b.inArray(a,h.aiDisplay);h.asDataSearch.splice(l,1);ha(h.aiDisplayMaster,a);ha(h.aiDisplay,a);"function"===typeof c&&c.call(this,h,k);h._iDisplayStart>=h.fnRecordsDisplay()&&(h._iDisplayStart-=h._iDisplayLength,0>h._iDisplayStart&&(h._iDisplayStart=
|
||||
0));if(d===e||d)I(h),H(h);return k};this.fnDestroy=function(a){var c=E(this[g.ext.iApiIndex]),h=c.nTableWrapper.parentNode,l=c.nTBody,m,k;a=a===e?!1:a;c.bDestroying=!0;K(c,"aoDestroyCallback","destroy",[c]);if(!a)for(m=0,k=c.aoColumns.length;m<k;m++)!1===c.aoColumns[m].bVisible&&this.fnSetColumnVis(m,!0);b(c.nTableWrapper).find("*").andSelf().unbind(".DT");b("tbody>tr>td."+c.oClasses.sRowEmpty,c.nTable).parent().remove();c.nTable!=c.nTHead.parentNode&&(b(c.nTable).children("thead").remove(),c.nTable.appendChild(c.nTHead));
|
||||
c.nTFoot&&c.nTable!=c.nTFoot.parentNode&&(b(c.nTable).children("tfoot").remove(),c.nTable.appendChild(c.nTFoot));c.nTable.parentNode.removeChild(c.nTable);b(c.nTableWrapper).remove();c.aaSorting=[];c.aaSortingFixed=[];W(c);b(Y(c)).removeClass(c.asStripeClasses.join(" "));b("th, td",c.nTHead).removeClass([c.oClasses.sSortable,c.oClasses.sSortableAsc,c.oClasses.sSortableDesc,c.oClasses.sSortableNone].join(" "));c.bJUI&&(b("th span."+c.oClasses.sSortIcon+", td span."+c.oClasses.sSortIcon,c.nTHead).remove(),
|
||||
b("th, td",c.nTHead).each(function(){var a=b("div."+c.oClasses.sSortJUIWrapper,this),d=a.contents();b(this).append(d);a.remove()}));!a&&c.nTableReinsertBefore?h.insertBefore(c.nTable,c.nTableReinsertBefore):a||h.appendChild(c.nTable);m=0;for(k=c.aoData.length;m<k;m++)null!==c.aoData[m].nTr&&l.appendChild(c.aoData[m].nTr);!0===c.oFeatures.bAutoWidth&&(c.nTable.style.width=z(c.sDestroyWidth));if(k=c.asDestroyStripes.length)for(a=b(l).children("tr"),m=0;m<k;m++)a.filter(":nth-child("+k+"n + "+m+")").addClass(c.asDestroyStripes[m]);
|
||||
m=0;for(k=g.settings.length;m<k;m++)g.settings[m]==c&&g.settings.splice(m,1);d=c=null};this.fnDraw=function(a){var b=E(this[g.ext.iApiIndex]);!1===a?(I(b),H(b)):da(b)};this.fnFilter=function(a,d,h,l,m,k){var p=E(this[g.ext.iApiIndex]);if(p.oFeatures.bFilter){if(h===e||null===h)h=!1;if(l===e||null===l)l=!0;if(m===e||null===m)m=!0;if(k===e||null===k)k=!0;if(d===e||null===d){if(T(p,{sSearch:a+"",bRegex:h,bSmart:l,bCaseInsensitive:k},1),m&&p.aanFeatures.f)for(d=p.aanFeatures.f,h=0,l=d.length;h<l;h++)try{d[h]._DT_Input!=
|
||||
c.activeElement&&b(d[h]._DT_Input).val(a)}catch(n){b(d[h]._DT_Input).val(a)}}else b.extend(p.aoPreSearchCols[d],{sSearch:a+"",bRegex:h,bSmart:l,bCaseInsensitive:k}),T(p,p.oPreviousSearch,1)}};this.fnGetData=function(a,b){var c=E(this[g.ext.iApiIndex]);if(a!==e){var d=a;if("object"===typeof a){var f=a.nodeName.toLowerCase();"tr"===f?d=w(c,a):"td"===f&&(d=w(c,a.parentNode),b=A(c,d,a))}return b!==e?B(c,d,b,""):c.aoData[d]!==e?c.aoData[d]._aData:null}return Q(c)};this.fnGetNodes=function(a){var b=E(this[g.ext.iApiIndex]);
|
||||
return a!==e?b.aoData[a]!==e?b.aoData[a].nTr:null:Y(b)};this.fnGetPosition=function(a){var b=E(this[g.ext.iApiIndex]),c=a.nodeName.toUpperCase();return"TR"==c?w(b,a):"TD"==c||"TH"==c?(c=w(b,a.parentNode),a=A(b,c,a),[c,r(b,a),a]):null};this.fnIsOpen=function(a){for(var b=E(this[g.ext.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a)return!0;return!1};this.fnOpen=function(a,d,e){var h=E(this[g.ext.iApiIndex]),l=Y(h);if(-1!==b.inArray(a,l)){this.fnClose(a);var l=c.createElement("tr"),
|
||||
m=c.createElement("td");l.appendChild(m);m.className=e;m.colSpan=p(h);"string"===typeof d?m.innerHTML=d:b(m).html(d);d=b("tr",h.nTBody);-1!=b.inArray(a,d)&&b(l).insertAfter(a);h.aoOpenRows.push({nTr:l,nParent:a});return l}};this.fnPageChange=function(a,b){var c=E(this[g.ext.iApiIndex]);sa(c,a);I(c);(b===e||b)&&H(c)};this.fnSetColumnVis=function(a,b,c){var d=E(this[g.ext.iApiIndex]),f,h,m=d.aoColumns,k=d.aoData,n,s;if(m[a].bVisible!=b){if(b){for(f=h=0;f<a;f++)m[f].bVisible&&h++;s=h>=p(d);if(!s)for(f=
|
||||
a;f<m.length;f++)if(m[f].bVisible){n=f;break}f=0;for(h=k.length;f<h;f++)null!==k[f].nTr&&(s?k[f].nTr.appendChild(k[f]._anHidden[a]):k[f].nTr.insertBefore(k[f]._anHidden[a],S(d,f)[n]))}else for(f=0,h=k.length;f<h;f++)null!==k[f].nTr&&(n=S(d,f)[a],k[f]._anHidden[a]=n,n.parentNode.removeChild(n));m[a].bVisible=b;ba(d,d.aoHeader);d.nTFoot&&ba(d,d.aoFooter);f=0;for(h=d.aoOpenRows.length;f<h;f++)d.aoOpenRows[f].nTr.colSpan=p(d);if(c===e||c)l(d),H(d);ta(d)}};this.fnSettings=function(){return E(this[g.ext.iApiIndex])};
|
||||
this.fnSort=function(a){var b=E(this[g.ext.iApiIndex]);b.aaSorting=a;V(b)};this.fnSortListener=function(a,b,c){ka(E(this[g.ext.iApiIndex]),a,b,c)};this.fnUpdate=function(a,c,d,h,m){var k=E(this[g.ext.iApiIndex]);c="object"===typeof c?w(k,c):c;if(b.isArray(a)&&d===e)for(k.aoData[c]._aData=a.slice(),d=0;d<k.aoColumns.length;d++)this.fnUpdate(B(k,c,d),c,d,!1,!1);else if(b.isPlainObject(a)&&d===e)for(k.aoData[c]._aData=b.extend(!0,{},a),d=0;d<k.aoColumns.length;d++)this.fnUpdate(B(k,c,d),c,d,!1,!1);else{F(k,
|
||||
c,d,a);a=B(k,c,d,"display");var p=k.aoColumns[d];null!==p.fnRender&&(a=X(k,c,d),p.bUseRendered&&F(k,c,d,a));null!==k.aoData[c].nTr&&(S(k,c)[d].innerHTML=a)}d=b.inArray(c,k.aiDisplay);k.asDataSearch[d]=pa(k,u(k,c,"filter",t(k,"bSearchable")));(m===e||m)&&l(k);(h===e||h)&&da(k);return 0};this.fnVersionCheck=g.ext.fnVersionCheck;this.oApi={_fnExternApiFunc:Va,_fnInitialise:ea,_fnInitComplete:ca,_fnLanguageCompat:ra,_fnAddColumn:m,_fnColumnOptions:n,_fnAddData:C,_fnCreateTr:ia,_fnGatherData:v,_fnBuildHead:va,
|
||||
_fnDrawHead:ba,_fnDraw:H,_fnReDraw:da,_fnAjaxUpdate:wa,_fnAjaxParameters:Ea,_fnAjaxUpdateDraw:Fa,_fnServerParams:ma,_fnAddOptionsHtml:xa,_fnFeatureHtmlTable:Ba,_fnScrollDraw:La,_fnAdjustColumnSizing:l,_fnFeatureHtmlFilter:za,_fnFilterComplete:T,_fnFilterCustom:Ia,_fnFilterColumn:Ha,_fnFilter:Ga,_fnBuildSearchArray:na,_fnBuildSearchRow:pa,_fnFilterCreateSearch:oa,_fnDataToSearch:Ja,_fnSort:V,_fnSortAttachListener:ka,_fnSortingClasses:W,_fnFeatureHtmlPaginate:Da,_fnPageChange:sa,_fnFeatureHtmlInfo:Ca,
|
||||
_fnUpdateInfo:Ka,_fnFeatureHtmlLength:ya,_fnFeatureHtmlProcessing:Aa,_fnProcessingDisplay:N,_fnVisibleToColumnIndex:k,_fnColumnIndexToVisible:r,_fnNodeToDataIndex:w,_fnVisbleColumns:p,_fnCalculateEnd:I,_fnConvertToWidth:Ma,_fnCalculateColumnWidths:ja,_fnScrollingWidthAdjust:Oa,_fnGetWidestNode:Na,_fnGetMaxLenString:Pa,_fnStringToCss:z,_fnDetectType:h,_fnSettingsFromNode:E,_fnGetDataMaster:Q,_fnGetTrNodes:Y,_fnGetTdNodes:S,_fnEscapeRegex:qa,_fnDeleteIndex:ha,_fnReOrderIndex:s,_fnColumnOrdering:q,_fnLog:M,
|
||||
_fnClearTable:ga,_fnSaveState:ta,_fnLoadState:Sa,_fnCreateCookie:function(d,g,e,h,l){var m=new Date;m.setTime(m.getTime()+1E3*e);e=a.location.pathname.split("/");d=d+"_"+e.pop().replace(/[\/:]/g,"").toLowerCase();var k;null!==l?(k="function"===typeof b.parseJSON?b.parseJSON(g):eval("("+g+")"),g=l(d,k,m.toGMTString(),e.join("/")+"/")):g=d+"="+encodeURIComponent(g)+"; expires="+m.toGMTString()+"; path="+e.join("/")+"/";d=c.cookie.split(";");l=g.split(";")[0].length;m=[];if(4096<l+c.cookie.length+10){for(var p=
|
||||
0,n=d.length;p<n;p++)if(-1!=d[p].indexOf(h)){var s=d[p].split("=");try{(k=eval("("+decodeURIComponent(s[1])+")"))&&k.iCreate&&m.push({name:s[0],time:k.iCreate})}catch(q){}}for(m.sort(function(a,b){return b.time-a.time});4096<l+c.cookie.length+10;){if(0===m.length)return;h=m.pop();c.cookie=h.name+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+e.join("/")+"/"}}c.cookie=g},_fnReadCookie:function(b){var d=a.location.pathname.split("/");b=b+"_"+d[d.length-1].replace(/[\/:]/g,"").toLowerCase()+"=";for(var d=
|
||||
c.cookie.split(";"),f=0;f<d.length;f++){for(var g=d[f];" "==g.charAt(0);)g=g.substring(1,g.length);if(0===g.indexOf(b))return decodeURIComponent(g.substring(b.length,g.length))}return null},_fnDetectHeader:aa,_fnGetUniqueThs:U,_fnScrollBarWidth:Qa,_fnApplyToChildren:L,_fnMap:y,_fnGetRowData:u,_fnGetCellData:B,_fnSetCellData:F,_fnGetObjectDataFn:D,_fnSetObjectDataFn:O,_fnApplyColumnDefs:x,_fnBindAction:Ra,_fnExtend:Ta,_fnCallbackReg:J,_fnCallbackFire:K,_fnJsonString:Wa,_fnRender:X,_fnNodeToColumnIndex:A,
|
||||
_fnInfoMacros:la,_fnBrowserDetect:Ua,_fnGetColumns:t};b.extend(g.ext.oApi,this.oApi);for(var ua in g.ext.oApi)ua&&(this[ua]=Va(ua));var fa=this;this.each(function(){var a=0,h,l,k;l=this.getAttribute("id");var p=!1,s=!1;if("table"!=this.nodeName.toLowerCase())M(null,0,"Attempted to initialise DataTables on a node which is not a table: "+this.nodeName);else{a=0;for(h=g.settings.length;a<h;a++){if(g.settings[a].nTable==this){if(d===e||d.bRetrieve)return g.settings[a].oInstance;if(d.bDestroy){g.settings[a].oInstance.fnDestroy();
|
||||
break}else{M(g.settings[a],0,"Cannot reinitialise DataTable.\n\nTo retrieve the DataTables object for this table, pass no arguments or see the docs for bRetrieve and bDestroy");return}}if(g.settings[a].sTableId==this.id){g.settings.splice(a,1);break}}if(null===l||""===l)this.id=l="DataTables_Table_"+g.ext._oExternConfig.iNextUnique++;var q=b.extend(!0,{},g.models.oSettings,{nTable:this,oApi:fa.oApi,oInit:d,sDestroyWidth:b(this).width(),sInstance:l,sTableId:l});g.settings.push(q);q.oInstance=1===fa.length?
|
||||
fa:b(this).dataTable();d||(d={});d.oLanguage&&ra(d.oLanguage);d=Ta(b.extend(!0,{},g.defaults),d);y(q.oFeatures,d,"bPaginate");y(q.oFeatures,d,"bLengthChange");y(q.oFeatures,d,"bFilter");y(q.oFeatures,d,"bSort");y(q.oFeatures,d,"bInfo");y(q.oFeatures,d,"bProcessing");y(q.oFeatures,d,"bAutoWidth");y(q.oFeatures,d,"bSortClasses");y(q.oFeatures,d,"bServerSide");y(q.oFeatures,d,"bDeferRender");y(q.oScroll,d,"sScrollX","sX");y(q.oScroll,d,"sScrollXInner","sXInner");y(q.oScroll,d,"sScrollY","sY");y(q.oScroll,
|
||||
d,"bScrollCollapse","bCollapse");y(q.oScroll,d,"bScrollInfinite","bInfinite");y(q.oScroll,d,"iScrollLoadGap","iLoadGap");y(q.oScroll,d,"bScrollAutoCss","bAutoCss");y(q,d,"asStripeClasses");y(q,d,"asStripClasses","asStripeClasses");y(q,d,"fnServerData");y(q,d,"fnFormatNumber");y(q,d,"sServerMethod");y(q,d,"aaSorting");y(q,d,"aaSortingFixed");y(q,d,"aLengthMenu");y(q,d,"sPaginationType");y(q,d,"sAjaxSource");y(q,d,"sAjaxDataProp");y(q,d,"iCookieDuration");y(q,d,"sCookiePrefix");y(q,d,"sDom");y(q,d,
|
||||
"bSortCellsTop");y(q,d,"iTabIndex");y(q,d,"oSearch","oPreviousSearch");y(q,d,"aoSearchCols","aoPreSearchCols");y(q,d,"iDisplayLength","_iDisplayLength");y(q,d,"bJQueryUI","bJUI");y(q,d,"fnCookieCallback");y(q,d,"fnStateLoad");y(q,d,"fnStateSave");y(q.oLanguage,d,"fnInfoCallback");J(q,"aoDrawCallback",d.fnDrawCallback,"user");J(q,"aoServerParams",d.fnServerParams,"user");J(q,"aoStateSaveParams",d.fnStateSaveParams,"user");J(q,"aoStateLoadParams",d.fnStateLoadParams,"user");J(q,"aoStateLoaded",d.fnStateLoaded,
|
||||
"user");J(q,"aoRowCallback",d.fnRowCallback,"user");J(q,"aoRowCreatedCallback",d.fnCreatedRow,"user");J(q,"aoHeaderCallback",d.fnHeaderCallback,"user");J(q,"aoFooterCallback",d.fnFooterCallback,"user");J(q,"aoInitComplete",d.fnInitComplete,"user");J(q,"aoPreDrawCallback",d.fnPreDrawCallback,"user");q.oFeatures.bServerSide&&q.oFeatures.bSort&&q.oFeatures.bSortClasses?J(q,"aoDrawCallback",W,"server_side_sort_classes"):q.oFeatures.bDeferRender&&J(q,"aoDrawCallback",W,"defer_sort_classes");d.bJQueryUI?
|
||||
(b.extend(q.oClasses,g.ext.oJUIClasses),d.sDom===g.defaults.sDom&&"lfrtip"===g.defaults.sDom&&(q.sDom='<"H"lfr>t<"F"ip>')):b.extend(q.oClasses,g.ext.oStdClasses);b(this).addClass(q.oClasses.sTable);if(""!==q.oScroll.sX||""!==q.oScroll.sY)q.oScroll.iBarWidth=Qa();q.iInitDisplayStart===e&&(q.iInitDisplayStart=d.iDisplayStart,q._iDisplayStart=d.iDisplayStart);d.bStateSave&&(q.oFeatures.bStateSave=!0,Sa(q,d),J(q,"aoDrawCallback",ta,"state_save"));null!==d.iDeferLoading&&(q.bDeferLoading=!0,a=b.isArray(d.iDeferLoading),
|
||||
q._iRecordsDisplay=a?d.iDeferLoading[0]:d.iDeferLoading,q._iRecordsTotal=a?d.iDeferLoading[1]:d.iDeferLoading);null!==d.aaData&&(s=!0);""!==d.oLanguage.sUrl?(q.oLanguage.sUrl=d.oLanguage.sUrl,b.getJSON(q.oLanguage.sUrl,null,function(a){ra(a);b.extend(!0,q.oLanguage,d.oLanguage,a);ea(q)}),p=!0):b.extend(!0,q.oLanguage,d.oLanguage);null===d.asStripeClasses&&(q.asStripeClasses=[q.oClasses.sStripeOdd,q.oClasses.sStripeEven]);h=q.asStripeClasses.length;q.asDestroyStripes=[];if(h){l=!1;k=b(this).children("tbody").children("tr:lt("+
|
||||
h+")");for(a=0;a<h;a++)k.hasClass(q.asStripeClasses[a])&&(l=!0,q.asDestroyStripes.push(q.asStripeClasses[a]));l&&k.removeClass(q.asStripeClasses.join(" "))}l=[];a=this.getElementsByTagName("thead");0!==a.length&&(aa(q.aoHeader,a[0]),l=U(q));if(null===d.aoColumns)for(k=[],a=0,h=l.length;a<h;a++)k.push(null);else k=d.aoColumns;a=0;for(h=k.length;a<h;a++)d.saved_aoColumns!==e&&d.saved_aoColumns.length==h&&(null===k[a]&&(k[a]={}),k[a].bVisible=d.saved_aoColumns[a].bVisible),m(q,l?l[a]:null);x(q,d.aoColumnDefs,
|
||||
k,function(a,b){n(q,a,b)});a=0;for(h=q.aaSorting.length;a<h;a++){q.aaSorting[a][0]>=q.aoColumns.length&&(q.aaSorting[a][0]=0);var t=q.aoColumns[q.aaSorting[a][0]];q.aaSorting[a][2]===e&&(q.aaSorting[a][2]=0);d.aaSorting===e&&q.saved_aaSorting===e&&(q.aaSorting[a][1]=t.asSorting[0]);l=0;for(k=t.asSorting.length;l<k;l++)if(q.aaSorting[a][1]==t.asSorting[l]){q.aaSorting[a][2]=l;break}}W(q);Ua(q);a=b(this).children("caption").each(function(){this._captionSide=b(this).css("caption-side")});h=b(this).children("thead");
|
||||
0===h.length&&(h=[c.createElement("thead")],this.appendChild(h[0]));q.nTHead=h[0];h=b(this).children("tbody");0===h.length&&(h=[c.createElement("tbody")],this.appendChild(h[0]));q.nTBody=h[0];q.nTBody.setAttribute("role","alert");q.nTBody.setAttribute("aria-live","polite");q.nTBody.setAttribute("aria-relevant","all");h=b(this).children("tfoot");0===h.length&&(0<a.length&&(""!==q.oScroll.sX||""!==q.oScroll.sY))&&(h=[c.createElement("tfoot")],this.appendChild(h[0]));0<h.length&&(q.nTFoot=h[0],aa(q.aoFooter,
|
||||
q.nTFoot));if(s)for(a=0;a<d.aaData.length;a++)C(q,d.aaData[a]);else v(q);q.aiDisplay=q.aiDisplayMaster.slice();q.bInitialised=!0;!1===p&&ea(q)}});fa=null;return this};g.fnVersionCheck=function(a){var b=function(a,b){for(;a.length<b;)a+="0";return a},c=g.ext.sVersion.split(".");a=a.split(".");for(var f="",e="",r=0,p=a.length;r<p;r++)f+=b(c[r],3),e+=b(a[r],3);return parseInt(f,10)>=parseInt(e,10)};g.fnIsDataTable=function(a){for(var b=g.settings,c=0;c<b.length;c++)if(b[c].nTable===a||b[c].nScrollHead===
|
||||
a||b[c].nScrollFoot===a)return!0;return!1};g.fnTables=function(a){var c=[];jQuery.each(g.settings,function(g,e){(!a||!0===a&&b(e.nTable).is(":visible"))&&c.push(e.nTable)});return c};g.version="1.9.4";g.settings=[];g.models={};g.models.ext={afnFiltering:[],afnSortData:[],aoFeatures:[],aTypes:[],fnVersionCheck:g.fnVersionCheck,iApiIndex:0,ofnSearch:{},oApi:{},oStdClasses:{},oJUIClasses:{},oPagination:{},oSort:{},sVersion:g.version,sErrMode:"alert",_oExternConfig:{iNextUnique:0}};g.models.oSearch={bCaseInsensitive:!0,
|
||||
sSearch:"",bRegex:!1,bSmart:!0};g.models.oRow={nTr:null,_aData:[],_aSortData:[],_anHidden:[],_sRowStripe:""};g.models.oColumn={aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bUseRendered:null,bVisible:null,_bAutoType:!0,fnCreatedCell:null,fnGetData:null,fnRender:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,
|
||||
sWidthOrig:null};g.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollAutoCss:!0,bScrollCollapse:!1,bScrollInfinite:!1,bServerSide:!1,bSort:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCookieCallback:null,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,
|
||||
fnFormatNumber:function(a){if(1E3>a)return a;var b=a+"";a=b.split("");for(var c="",b=b.length,f=0;f<b;f++)0===f%3&&0!==f&&(c=this.oLanguage.sInfoThousands+c),c=a[b-f-1]+c;return c},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:function(a,c,g,e){e.jqXHR=b.ajax({url:a,data:c,success:function(a){a.sError&&e.oApi._fnLog(e,0,a.sError);b(e.oInstance).trigger("xhr",[e,a]);g(a)},dataType:"json",cache:!1,type:e.sServerMethod,error:function(a,
|
||||
b){"parsererror"==b&&e.oApi._fnLog(e,0,"DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})},fnServerParams:null,fnStateLoad:function(a){a=this.oApi._fnReadCookie(a.sCookiePrefix+a.sInstance);var c;try{c="function"===typeof b.parseJSON?b.parseJSON(a):eval("("+a+")")}catch(g){c=null}return c},fnStateLoadParams:null,fnStateLoaded:null,fnStateSave:function(a,b){this.oApi._fnCreateCookie(a.sCookiePrefix+a.sInstance,this.oApi._fnJsonString(b),
|
||||
a.iCookieDuration,a.sCookiePrefix,a.fnCookieCallback)},fnStateSaveParams:null,iCookieDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iScrollLoadGap:100,iTabIndex:0,oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",
|
||||
sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sInfoThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sUrl:"",sZeroRecords:"No matching records found"},oSearch:b.extend({},g.models.oSearch),sAjaxDataProp:"aaData",sAjaxSource:null,sCookiePrefix:"SpryMedia_DataTables_",sDom:"lfrtip",sPaginationType:"two_button",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET"};g.defaults.columns={aDataSort:null,
|
||||
asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bUseRendered:!0,bVisible:!0,fnCreatedCell:null,fnRender:null,iDataSort:-1,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};g.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortClasses:null,bStateSave:null},oScroll:{bAutoCss:null,
|
||||
bCollapse:null,bInfinite:null,iBarWidth:0,iLoadGap:null,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1},aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aoColumns:[],aoHeader:[],aoFooter:[],asDataSearch:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:null,asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],
|
||||
aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,sPaginationType:"two_button",iCookieDuration:0,sCookiePrefix:"",fnCookieCallback:null,aoStateSave:[],aoStateLoad:[],oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,
|
||||
iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iDisplayEnd:10,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsTotal,10):this.aiDisplayMaster.length},fnRecordsDisplay:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsDisplay,10):this.aiDisplay.length},fnDisplayEnd:function(){return this.oFeatures.bServerSide?
|
||||
!1===this.oFeatures.bPaginate||-1==this._iDisplayLength?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iRecordsDisplay):this._iDisplayEnd},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null};g.ext=b.extend(!0,{},g.models.ext);b.extend(g.ext.oStdClasses,{sTable:"dataTable",sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",
|
||||
sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active",sPageButtonStaticDisabled:"paginate_button paginate_button_disabled",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",
|
||||
sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",
|
||||
sFooterTH:"",sJUIHeader:"",sJUIFooter:""});b.extend(g.ext.oJUIClasses,g.ext.oStdClasses,{sPagePrevEnabled:"fg-button ui-button ui-state-default ui-corner-left",sPagePrevDisabled:"fg-button ui-button ui-state-default ui-corner-left ui-state-disabled",sPageNextEnabled:"fg-button ui-button ui-state-default ui-corner-right",sPageNextDisabled:"fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",
|
||||
sPageButton:"fg-button ui-button ui-state-default",sPageButtonActive:"fg-button ui-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-button ui-state-default ui-state-disabled",sPageFirst:"first ui-corner-tl ui-corner-bl",sPageLast:"last ui-corner-tr ui-corner-br",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default",sSortableAsc:"ui-state-default",
|
||||
sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead ui-state-default",sScrollFoot:"dataTables_scrollFoot ui-state-default",
|
||||
sFooterTH:"ui-state-default",sJUIHeader:"fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix",sJUIFooter:"fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix"});b.extend(g.ext.oPagination,{two_button:{fnInit:function(a,c,g){var e=a.oLanguage.oPaginate,k=function(b){a.oApi._fnPageChange(a,b.data.action)&&g(a)},e=a.bJUI?'<a class="'+a.oClasses.sPagePrevDisabled+'" tabindex="'+a.iTabIndex+'" role="button"><span class="'+a.oClasses.sPageJUIPrev+
|
||||
'"></span></a><a class="'+a.oClasses.sPageNextDisabled+'" tabindex="'+a.iTabIndex+'" role="button"><span class="'+a.oClasses.sPageJUINext+'"></span></a>':'<a class="'+a.oClasses.sPagePrevDisabled+'" tabindex="'+a.iTabIndex+'" role="button">'+e.sPrevious+'</a><a class="'+a.oClasses.sPageNextDisabled+'" tabindex="'+a.iTabIndex+'" role="button">'+e.sNext+"</a>";b(c).append(e);var r=b("a",c),e=r[0],r=r[1];a.oApi._fnBindAction(e,{action:"previous"},k);a.oApi._fnBindAction(r,{action:"next"},k);a.aanFeatures.p||
|
||||
(c.id=a.sTableId+"_paginate",e.id=a.sTableId+"_previous",r.id=a.sTableId+"_next",e.setAttribute("aria-controls",a.sTableId),r.setAttribute("aria-controls",a.sTableId))},fnUpdate:function(a){if(a.aanFeatures.p)for(var b=a.oClasses,c=a.aanFeatures.p,f,g=0,e=c.length;g<e;g++)if(f=c[g].firstChild)f.className=0===a._iDisplayStart?b.sPagePrevDisabled:b.sPagePrevEnabled,f=f.nextSibling,f.className=a.fnDisplayEnd()==a.fnRecordsDisplay()?b.sPageNextDisabled:b.sPageNextEnabled}},iFullNumbersShowPages:5,full_numbers:{fnInit:function(a,
|
||||
c,g){var e=a.oLanguage.oPaginate,k=a.oClasses,r=function(b){a.oApi._fnPageChange(a,b.data.action)&&g(a)};b(c).append('<a tabindex="'+a.iTabIndex+'" class="'+k.sPageButton+" "+k.sPageFirst+'">'+e.sFirst+'</a><a tabindex="'+a.iTabIndex+'" class="'+k.sPageButton+" "+k.sPagePrevious+'">'+e.sPrevious+'</a><span></span><a tabindex="'+a.iTabIndex+'" class="'+k.sPageButton+" "+k.sPageNext+'">'+e.sNext+'</a><a tabindex="'+a.iTabIndex+'" class="'+k.sPageButton+" "+k.sPageLast+'">'+e.sLast+"</a>");var p=b("a",
|
||||
c),e=p[0],k=p[1],t=p[2],p=p[3];a.oApi._fnBindAction(e,{action:"first"},r);a.oApi._fnBindAction(k,{action:"previous"},r);a.oApi._fnBindAction(t,{action:"next"},r);a.oApi._fnBindAction(p,{action:"last"},r);a.aanFeatures.p||(c.id=a.sTableId+"_paginate",e.id=a.sTableId+"_first",k.id=a.sTableId+"_previous",t.id=a.sTableId+"_next",p.id=a.sTableId+"_last")},fnUpdate:function(a,c){if(a.aanFeatures.p){var e=g.ext.oPagination.iFullNumbersShowPages,l=Math.floor(e/2),k=Math.ceil(a.fnRecordsDisplay()/a._iDisplayLength),
|
||||
r=Math.ceil(a._iDisplayStart/a._iDisplayLength)+1,p="",t,h=a.oClasses,s,q=a.aanFeatures.p,x=function(b){a.oApi._fnBindAction(this,{page:b+t-1},function(b){a.oApi._fnPageChange(a,b.data.page);c(a);b.preventDefault()})};-1===a._iDisplayLength?r=l=t=1:k<e?(t=1,l=k):r<=l?(t=1,l=e):r>=k-l?(t=k-e+1,l=k):(t=r-Math.ceil(e/2)+1,l=t+e-1);for(e=t;e<=l;e++)p+=r!==e?'<a tabindex="'+a.iTabIndex+'" class="'+h.sPageButton+'">'+a.fnFormatNumber(e)+"</a>":'<a tabindex="'+a.iTabIndex+'" class="'+h.sPageButtonActive+
|
||||
'">'+a.fnFormatNumber(e)+"</a>";e=0;for(l=q.length;e<l;e++)s=q[e],s.hasChildNodes()&&(b("span:eq(0)",s).html(p).children("a").each(x),s=s.getElementsByTagName("a"),s=[s[0],s[1],s[s.length-2],s[s.length-1]],b(s).removeClass(h.sPageButton+" "+h.sPageButtonActive+" "+h.sPageButtonStaticDisabled),b([s[0],s[1]]).addClass(1==r?h.sPageButtonStaticDisabled:h.sPageButton),b([s[2],s[3]]).addClass(0===k||r===k||-1===a._iDisplayLength?h.sPageButtonStaticDisabled:h.sPageButton))}}}});b.extend(g.ext.oSort,{"string-pre":function(a){"string"!=
|
||||
typeof a&&(a=null!==a&&a.toString?a.toString():"");return a.toLowerCase()},"string-asc":function(a,b){return a<b?-1:a>b?1:0},"string-desc":function(a,b){return a<b?1:a>b?-1:0},"html-pre":function(a){return a.replace(/<.*?>/g,"").toLowerCase()},"html-asc":function(a,b){return a<b?-1:a>b?1:0},"html-desc":function(a,b){return a<b?1:a>b?-1:0},"date-pre":function(a){a=Date.parse(a);if(isNaN(a)||""===a)a=Date.parse("01/01/1970 00:00:00");return a},"date-asc":function(a,b){return a-b},"date-desc":function(a,
|
||||
b){return b-a},"numeric-pre":function(a){return"-"==a||""===a?0:1*a},"numeric-asc":function(a,b){return a-b},"numeric-desc":function(a,b){return b-a}});b.extend(g.ext.aTypes,[function(a){if("number"===typeof a)return"numeric";if("string"!==typeof a)return null;var b,c=!1;b=a.charAt(0);if(-1=="0123456789-".indexOf(b))return null;for(var f=1;f<a.length;f++){b=a.charAt(f);if(-1=="0123456789.".indexOf(b))return null;if("."==b){if(c)return null;c=!0}}return"numeric"},function(a){var b=Date.parse(a);return null!==
|
||||
b&&!isNaN(b)||"string"===typeof a&&0===a.length?"date":null},function(a){return"string"===typeof a&&-1!=a.indexOf("<")&&-1!=a.indexOf(">")?"html":null}]);b.fn.DataTable=g;b.fn.dataTable=g;b.fn.dataTableSettings=g.settings;b.fn.dataTableExt=g.ext};"function"===typeof define&&define.amd?define(["jquery"],b):jQuery&&!jQuery.fn.dataTable&&b(jQuery)})(window,document);var TableTools;
|
||||
(function(a,c,e){TableTools=function(b,c){!this instanceof TableTools&&alert("Warning: TableTools must be initialised with the keyword 'new'");this.s={that:this,dt:b.fnSettings(),print:{saveStart:-1,saveLength:-1,saveScroll:-1,funcEnd:function(){}},buttonCounter:0,select:{type:"",selected:[],preRowSelect:null,postSelected:null,postDeselected:null,all:!1,selectedClass:""},custom:{},swfPath:"",buttonSet:[],master:!1,tags:{}};this.dom={container:null,table:null,print:{hidden:[],message:null},collection:{collection:null,
|
||||
background:null}};this.classes=a.extend(!0,{},TableTools.classes);this.s.dt.bJUI&&a.extend(!0,this.classes,TableTools.classes_themeroller);this.fnSettings=function(){return this.s};"undefined"==typeof c&&(c={});this._fnConstruct(c);return this};TableTools.prototype={fnGetSelected:function(a){var c=[],g=this.s.dt.aoData,d=this.s.dt.aiDisplay,e;if(a)for(a=0,e=d.length;a<e;a++)g[d[a]]._DTTT_selected&&c.push(g[d[a]].nTr);else for(a=0,e=g.length;a<e;a++)g[a]._DTTT_selected&&c.push(g[a].nTr);return c},
|
||||
fnGetSelectedData:function(){var a=[],c=this.s.dt.aoData,g,d;g=0;for(d=c.length;g<d;g++)c[g]._DTTT_selected&&a.push(this.s.dt.oInstance.fnGetData(g));return a},fnIsSelected:function(a){return!0===this.s.dt.aoData[this.s.dt.oInstance.fnGetPosition(a)]._DTTT_selected?!0:!1},fnSelectAll:function(a){var c=this._fnGetMasterSettings();this._fnRowSelect(!0===a?c.dt.aiDisplay:c.dt.aoData)},fnSelectNone:function(a){this._fnGetMasterSettings();this._fnRowDeselect(this.fnGetSelected(a))},fnSelect:function(a){"single"==
|
||||
this.s.select.type?(this.fnSelectNone(),this._fnRowSelect(a)):"multi"==this.s.select.type&&this._fnRowSelect(a)},fnDeselect:function(a){this._fnRowDeselect(a)},fnGetTitle:function(a){var c="";"undefined"!=typeof a.sTitle&&""!==a.sTitle?c=a.sTitle:(a=e.getElementsByTagName("title"),0<a.length&&(c=a[0].innerHTML));return 4>"\u00a1".toString().length?c.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,""):c.replace(/[^a-zA-Z0-9_\.,\-_ !\(\)]/g,"")},fnCalcColRatios:function(a){var c=this.s.dt.aoColumns;
|
||||
a=this._fnColumnTargets(a.mColumns);var g=[],d=0,e=0,n,l;n=0;for(l=a.length;n<l;n++)a[n]&&(d=c[n].nTh.offsetWidth,e+=d,g.push(d));n=0;for(l=g.length;n<l;n++)g[n]/=e;return g.join("\t")},fnGetTableData:function(a){if(this.s.dt)return this._fnGetDataTablesData(a)},fnSetText:function(a,c){this._fnFlashSetText(a,c)},fnResizeButtons:function(){for(var a in ZeroClipboard_TableTools.clients)if(a){var c=ZeroClipboard_TableTools.clients[a];"undefined"!=typeof c.domElement&&c.domElement.parentNode&&c.positionElement()}},
|
||||
fnResizeRequired:function(){for(var a in ZeroClipboard_TableTools.clients)if(a){var c=ZeroClipboard_TableTools.clients[a];if("undefined"!=typeof c.domElement&&c.domElement.parentNode==this.dom.container&&!1===c.sized)return!0}return!1},fnPrint:function(a,c){void 0===c&&(c={});void 0===a||a?this._fnPrintStart(c):this._fnPrintEnd()},fnInfo:function(b,c){var g=a("<div/>").addClass(this.classes.print.info).html(b).appendTo("body");setTimeout(function(){g.fadeOut("normal",function(){g.remove()})},c)},
|
||||
_fnConstruct:function(b){var c=this;this._fnCustomiseSettings(b);this.dom.container=e.createElement(this.s.tags.container);this.dom.container.className=this.classes.container;"none"!=this.s.select.type&&this._fnRowSelectConfig();this._fnButtonDefinations(this.s.buttonSet,this.dom.container);this.s.dt.aoDestroyCallback.push({sName:"TableTools",fn:function(){a(c.s.dt.nTBody).off("click.DTTT_Select","tr");a(c.dom.container).empty()}});b=a.fn.dataTable;b.versionCheck&&(new b.Api(this.s.dt)).plugin.register("tabletools",
|
||||
this)},_fnCustomiseSettings:function(b){"undefined"==typeof this.s.dt._TableToolsInit&&(this.s.master=!0,this.s.dt._TableToolsInit=!0);this.dom.table=this.s.dt.nTable;this.s.custom=a.extend({},TableTools.DEFAULTS,b);this.s.swfPath=this.s.custom.sSwfPath;"undefined"!=typeof ZeroClipboard_TableTools&&(ZeroClipboard_TableTools.moviePath=this.s.swfPath);this.s.select.type=this.s.custom.sRowSelect;this.s.select.preRowSelect=this.s.custom.fnPreRowSelect;this.s.select.postSelected=this.s.custom.fnRowSelected;
|
||||
this.s.select.postDeselected=this.s.custom.fnRowDeselected;this.s.custom.sSelectedClass&&(this.classes.select.row=this.s.custom.sSelectedClass);this.s.tags=this.s.custom.oTags;this.s.buttonSet=this.s.custom.aButtons},_fnButtonDefinations:function(b,c){for(var g,d=0,e=b.length;d<e;d++){if("string"==typeof b[d]){if("undefined"==typeof TableTools.BUTTONS[b[d]]){alert("TableTools: Warning - unknown button type: "+b[d]);continue}g=a.extend({},TableTools.BUTTONS[b[d]],!0)}else{if("undefined"==typeof TableTools.BUTTONS[b[d].sExtends]){alert("TableTools: Warning - unknown button type: "+
|
||||
b[d].sExtends);continue}g=a.extend({},TableTools.BUTTONS[b[d].sExtends],!0);g=a.extend(g,b[d],!0)}c.appendChild(this._fnCreateButton(g,a(c).hasClass(this.classes.collection.container)))}},_fnCreateButton:function(a,c){c=this._fnButtonBase(a,c);a.sAction.match(/flash/)?this._fnFlashConfig(c,a):"text"==a.sAction?this._fnTextConfig(c,a):"div"==a.sAction?this._fnTextConfig(c,a):"collection"==a.sAction&&(this._fnTextConfig(c,a),this._fnCollectionConfig(c,a));return c},_fnButtonBase:function(a,c){var g,
|
||||
d;c?(g=a.sTag&&"default"!==a.sTag?a.sTag:this.s.tags.collection.button,d=a.sLinerTag&&"default"!==a.sLinerTag?a.sLiner:this.s.tags.collection.liner,c=this.classes.collection.buttons.normal):(g=a.sTag&&"default"!==a.sTag?a.sTag:this.s.tags.button,d=a.sLinerTag&&"default"!==a.sLinerTag?a.sLiner:this.s.tags.liner,c=this.classes.buttons.normal);g=e.createElement(g);d=e.createElement(d);var m=this._fnGetMasterSettings();g.className=c+" "+a.sButtonClass;g.setAttribute("id","ToolTables_"+this.s.dt.sInstance+
|
||||
"_"+m.buttonCounter);g.appendChild(d);d.innerHTML=a.sButtonText;m.buttonCounter++;return g},_fnGetMasterSettings:function(){if(this.s.master)return this.s;for(var a=TableTools._aInstances,c=0,g=a.length;c<g;c++)if(this.dom.table==a[c].s.dt.nTable)return a[c].s},_fnCollectionConfig:function(a,c){a=e.createElement(this.s.tags.collection.container);a.style.display="none";a.className=this.classes.collection.container;c._collection=a;e.body.appendChild(a);this._fnButtonDefinations(c.aButtons,a)},_fnCollectionShow:function(b,
|
||||
f){var g=this,d=a(b).offset(),m=f._collection;f=d.left;var d=d.top+a(b).outerHeight(),n=a(c).height(),l=a(e).height(),k=a(c).width(),r=a(e).width();m.style.position="absolute";m.style.left=f+"px";m.style.top=d+"px";m.style.display="block";a(m).css("opacity",0);var p=e.createElement("div");p.style.position="absolute";p.style.left="0px";p.style.top="0px";p.style.height=(n>l?n:l)+"px";p.style.width=(k>r?k:r)+"px";p.className=this.classes.collection.background;a(p).css("opacity",0);e.body.appendChild(p);
|
||||
e.body.appendChild(m);n=a(m).outerWidth();k=a(m).outerHeight();f+n>r&&(m.style.left=r-n+"px");d+k>l&&(m.style.top=d-k-a(b).outerHeight()+"px");this.dom.collection.collection=m;this.dom.collection.background=p;setTimeout(function(){a(m).animate({opacity:1},500);a(p).animate({opacity:0.25},500)},10);this.fnResizeButtons();a(p).click(function(){g._fnCollectionHide.call(g,null,null)})},_fnCollectionHide:function(b,c){null!==c&&"collection"==c.sExtends||null===this.dom.collection.collection||(a(this.dom.collection.collection).animate({opacity:0},
|
||||
500,function(){this.style.display="none"}),a(this.dom.collection.background).animate({opacity:0},500,function(){this.parentNode.removeChild(this)}),this.dom.collection.collection=null,this.dom.collection.background=null)},_fnRowSelectConfig:function(){if(this.s.master){var b=this,c=this.s.dt;a(c.nTable).addClass(this.classes.select.table);"os"===this.s.select.type&&(a(c.nTBody).on("mousedown.DTTT_Select","tr",function(b){b.shiftKey&&a(c.nTBody).css("-moz-user-select","none").one("selectstart.DTTT_Select",
|
||||
"tr",function(){return!1})}),a(c.nTBody).on("mouseup.DTTT_Select","tr",function(){a(c.nTBody).css("-moz-user-select","")}));a(c.nTBody).on("click.DTTT_Select","tr",function(g){var d=b.s.select,e=b.s.dt.oInstance.fnGetPosition(this);if(this.parentNode==c.nTBody&&null!==c.oInstance.fnGetData(this)){if("os"==d.type)if(g.ctrlKey||g.metaKey)b.fnIsSelected(this)?b._fnRowDeselect(this,g):b._fnRowSelect(this,g);else if(g.shiftKey){var n=b.s.dt.aiDisplay.slice(),l=a.inArray(d.lastRow,n),k=a.inArray(e,n);if(0===
|
||||
b.fnGetSelected().length||-1===l)n.splice(a.inArray(e,n)+1,n.length);else{if(l>k)var r=k,k=l,l=r;n.splice(k+1,n.length);n.splice(0,l)}b.fnIsSelected(this)?(n.splice(a.inArray(e,n),1),b._fnRowDeselect(n,g)):b._fnRowSelect(n,g)}else b.fnIsSelected(this)&&1===b.fnGetSelected().length?b._fnRowDeselect(this,g):(b.fnSelectNone(),b._fnRowSelect(this,g));else b.fnIsSelected(this)?b._fnRowDeselect(this,g):"single"==d.type?(b.fnSelectNone(),b._fnRowSelect(this,g)):"multi"==d.type&&b._fnRowSelect(this,g);d.lastRow=
|
||||
e}});c.oApi._fnCallbackReg(c,"aoRowCreatedCallback",function(g,d,e){c.aoData[e]._DTTT_selected&&a(g).addClass(b.classes.select.row)},"TableTools-SelectAll")}},_fnRowSelect:function(b,c){b=this._fnSelectData(b);var g=[],d,e;d=0;for(e=b.length;d<e;d++)b[d].nTr&&g.push(b[d].nTr);if(null===this.s.select.preRowSelect||this.s.select.preRowSelect.call(this,c,g,!0)){d=0;for(e=b.length;d<e;d++)b[d]._DTTT_selected=!0,b[d].nTr&&a(b[d].nTr).addClass(this.classes.select.row);null!==this.s.select.postSelected&&
|
||||
this.s.select.postSelected.call(this,g);TableTools._fnEventDispatch(this,"select",g,!0)}},_fnRowDeselect:function(b,c){b=this._fnSelectData(b);var g=[],d,e;d=0;for(e=b.length;d<e;d++)b[d].nTr&&g.push(b[d].nTr);if(null===this.s.select.preRowSelect||this.s.select.preRowSelect.call(this,c,g,!1)){d=0;for(e=b.length;d<e;d++)b[d]._DTTT_selected=!1,b[d].nTr&&a(b[d].nTr).removeClass(this.classes.select.row);null!==this.s.select.postDeselected&&this.s.select.postDeselected.call(this,g);TableTools._fnEventDispatch(this,
|
||||
"select",g,!1)}},_fnSelectData:function(a){var c=[],g,d,e;if(a.nodeName)g=this.s.dt.oInstance.fnGetPosition(a),c.push(this.s.dt.aoData[g]);else if("undefined"!==typeof a.length)for(d=0,e=a.length;d<e;d++)a[d].nodeName?(g=this.s.dt.oInstance.fnGetPosition(a[d]),c.push(this.s.dt.aoData[g])):"number"===typeof a[d]?c.push(this.s.dt.aoData[a[d]]):c.push(a[d]);else c.push(a);return c},_fnTextConfig:function(b,c){var g=this;null!==c.fnInit&&c.fnInit.call(this,b,c);""!==c.sToolTip&&(b.title=c.sToolTip);a(b).hover(function(){null!==
|
||||
c.fnMouseover&&c.fnMouseover.call(this,b,c,null)},function(){null!==c.fnMouseout&&c.fnMouseout.call(this,b,c,null)});null!==c.fnSelect&&TableTools._fnEventListen(this,"select",function(a){c.fnSelect.call(g,b,c,a)});a(b).click(function(a){null!==c.fnClick&&c.fnClick.call(g,b,c,null,a);null!==c.fnComplete&&c.fnComplete.call(g,b,c,null,null);g._fnCollectionHide(b,c)})},_fnFlashConfig:function(a,c){var g=this,d=new ZeroClipboard_TableTools.Client;null!==c.fnInit&&c.fnInit.call(this,a,c);d.setHandCursor(!0);
|
||||
"flash_save"==c.sAction?(d.setAction("save"),d.setCharSet("utf16le"==c.sCharSet?"UTF16LE":"UTF8"),d.setBomInc(c.bBomInc),d.setFileName(c.sFileName.replace("*",this.fnGetTitle(c)))):"flash_pdf"==c.sAction?(d.setAction("pdf"),d.setFileName(c.sFileName.replace("*",this.fnGetTitle(c)))):d.setAction("copy");d.addEventListener("mouseOver",function(){null!==c.fnMouseover&&c.fnMouseover.call(g,a,c,d)});d.addEventListener("mouseOut",function(){null!==c.fnMouseout&&c.fnMouseout.call(g,a,c,d)});d.addEventListener("mouseDown",
|
||||
function(){null!==c.fnClick&&c.fnClick.call(g,a,c,d)});d.addEventListener("complete",function(e,n){null!==c.fnComplete&&c.fnComplete.call(g,a,c,d,n);g._fnCollectionHide(a,c)});this._fnFlashGlue(d,a,c.sToolTip)},_fnFlashGlue:function(a,c,g){var d=this,m=c.getAttribute("id");e.getElementById(m)?a.glue(c,g):setTimeout(function(){d._fnFlashGlue(a,c,g)},100)},_fnFlashSetText:function(a,c){c=this._fnChunkData(c,8192);a.clearText();for(var g=0,d=c.length;g<d;g++)a.appendText(c[g])},_fnColumnTargets:function(a){var c=
|
||||
[],g=this.s.dt,d,e;if("object"==typeof a){d=0;for(e=g.aoColumns.length;d<e;d++)c.push(!1);d=0;for(e=a.length;d<e;d++)c[a[d]]=!0}else if("visible"==a)for(d=0,e=g.aoColumns.length;d<e;d++)c.push(g.aoColumns[d].bVisible?!0:!1);else if("hidden"==a)for(d=0,e=g.aoColumns.length;d<e;d++)c.push(g.aoColumns[d].bVisible?!1:!0);else if("sortable"==a)for(d=0,e=g.aoColumns.length;d<e;d++)c.push(g.aoColumns[d].bSortable?!0:!1);else for(d=0,e=g.aoColumns.length;d<e;d++)c.push(!0);return c},_fnNewline:function(a){return"auto"==
|
||||
a.sNewLine?navigator.userAgent.match(/Windows/)?"\r\n":"\n":a.sNewLine},_fnGetDataTablesData:function(b){var c,g,d,e,n,l=[],k="",r=this.s.dt,p,t=RegExp(b.sFieldBoundary,"g"),h=this._fnColumnTargets(b.mColumns),s="undefined"!=typeof b.bSelectedOnly?b.bSelectedOnly:!1;if(b.bHeader){n=[];c=0;for(g=r.aoColumns.length;c<g;c++)h[c]&&(k=r.aoColumns[c].sTitle.replace(/\n/g," ").replace(/<.*?>/g,"").replace(/^\s+|\s+$/g,""),k=this._fnHtmlDecode(k),n.push(this._fnBoundData(k,b.sFieldBoundary,t)));l.push(n.join(b.sFieldSeperator))}var q=
|
||||
this.fnGetSelected(),s="none"!==this.s.select.type&&s&&0!==q.length,x=r.oInstance.$("tr",b.oSelectorOpts).map(function(b,c){return s&&-1===a.inArray(c,q)?null:r.oInstance.fnGetPosition(c)}).get();d=0;for(e=x.length;d<e;d++){p=r.aoData[x[d]].nTr;n=[];c=0;for(g=r.aoColumns.length;c<g;c++)h[c]&&(k=r.oApi._fnGetCellData(r,x[d],c,"display"),b.fnCellRender?k=b.fnCellRender(k,c,p,x[d])+"":"string"==typeof k?(k=k.replace(/\n/g," "),k=k.replace(/<img.*?\s+alt\s*=\s*(?:"([^"]+)"|'([^']+)'|([^\s>]+)).*?>/gi,
|
||||
"$1$2$3"),k=k.replace(/<.*?>/g,"")):k+="",k=k.replace(/^\s+/,"").replace(/\s+$/,""),k=this._fnHtmlDecode(k),n.push(this._fnBoundData(k,b.sFieldBoundary,t)));l.push(n.join(b.sFieldSeperator));b.bOpenRows&&(c=a.grep(r.aoOpenRows,function(a){return a.nParent===p}),1===c.length&&(k=this._fnBoundData(a("td",c[0].nTr).html(),b.sFieldBoundary,t),l.push(k)))}if(b.bFooter&&null!==r.nTFoot){n=[];c=0;for(g=r.aoColumns.length;c<g;c++)h[c]&&null!==r.aoColumns[c].nTf&&(k=r.aoColumns[c].nTf.innerHTML.replace(/\n/g,
|
||||
" ").replace(/<.*?>/g,""),k=this._fnHtmlDecode(k),n.push(this._fnBoundData(k,b.sFieldBoundary,t)));l.push(n.join(b.sFieldSeperator))}return l.join(this._fnNewline(b))},_fnBoundData:function(a,c,g){return""===c?a:c+a.replace(g,c+c)+c},_fnChunkData:function(a,c){for(var g=[],d=a.length,e=0;e<d;e+=c)e+c<d?g.push(a.substring(e,e+c)):g.push(a.substring(e,d));return g},_fnHtmlDecode:function(a){if(-1===a.indexOf("&"))return a;var c=e.createElement("div");return a.replace(/&([^\s]*);/g,function(a,b){if("#"===
|
||||
a.substr(1,1))return String.fromCharCode(Number(b.substr(1)));c.innerHTML=a;return c.childNodes[0].nodeValue})},_fnPrintStart:function(b){var f=this,g=this.s.dt;this._fnPrintHideNodes(g.nTable);this.s.print.saveStart=g._iDisplayStart;this.s.print.saveLength=g._iDisplayLength;b.bShowAll&&(g._iDisplayStart=0,g._iDisplayLength=-1,g.oApi._fnCalculateEnd(g),g.oApi._fnDraw(g));if(""!==g.oScroll.sX||""!==g.oScroll.sY)this._fnPrintScrollStart(g),a(this.s.dt.nTable).bind("draw.DTTT_Print",function(){f._fnPrintScrollStart(g)});
|
||||
var d=g.aanFeatures,m;for(m in d)if("i"!=m&&"t"!=m&&1==m.length)for(var n=0,l=d[m].length;n<l;n++)this.dom.print.hidden.push({node:d[m][n],display:"block"}),d[m][n].style.display="none";a(e.body).addClass(this.classes.print.body);""!==b.sInfo&&this.fnInfo(b.sInfo,3E3);b.sMessage&&a("<div/>").addClass(this.classes.print.message).html(b.sMessage).prepend("body");this.s.print.saveScroll=a(c).scrollTop();c.scrollTo(0,0);a(e).bind("keydown.DTTT",function(a){27==a.keyCode&&(a.preventDefault(),f._fnPrintEnd.call(f,
|
||||
a))})},_fnPrintEnd:function(){var b=this.s.dt,f=this.s.print,g=this.dom.print;this._fnPrintShowNodes();if(""!==b.oScroll.sX||""!==b.oScroll.sY)a(this.s.dt.nTable).unbind("draw.DTTT_Print"),this._fnPrintScrollEnd();c.scrollTo(0,f.saveScroll);null!==g.message&&(e.body.removeChild(g.message),g.message=null);a(e.body).removeClass("DTTT_Print");b._iDisplayStart=f.saveStart;b._iDisplayLength=f.saveLength;b.oApi._fnCalculateEnd(b);b.oApi._fnDraw(b);a(e).unbind("keydown.DTTT")},_fnPrintScrollStart:function(){var b=
|
||||
this.s.dt;b.nScrollHead.getElementsByTagName("div")[0].getElementsByTagName("table");var c=b.nTable.parentNode,e;e=b.nTable.getElementsByTagName("thead");0<e.length&&b.nTable.removeChild(e[0]);null!==b.nTFoot&&(e=b.nTable.getElementsByTagName("tfoot"),0<e.length&&b.nTable.removeChild(e[0]));e=b.nTHead.cloneNode(!0);b.nTable.insertBefore(e,b.nTable.childNodes[0]);null!==b.nTFoot&&(e=b.nTFoot.cloneNode(!0),b.nTable.insertBefore(e,b.nTable.childNodes[1]));""!==b.oScroll.sX&&(b.nTable.style.width=a(b.nTable).outerWidth()+
|
||||
"px",c.style.width=a(b.nTable).outerWidth()+"px",c.style.overflow="visible");""!==b.oScroll.sY&&(c.style.height=a(b.nTable).outerHeight()+"px",c.style.overflow="visible")},_fnPrintScrollEnd:function(){var a=this.s.dt,c=a.nTable.parentNode;""!==a.oScroll.sX&&(c.style.width=a.oApi._fnStringToCss(a.oScroll.sX),c.style.overflow="auto");""!==a.oScroll.sY&&(c.style.height=a.oApi._fnStringToCss(a.oScroll.sY),c.style.overflow="auto")},_fnPrintShowNodes:function(){for(var a=this.dom.print.hidden,c=0,e=a.length;c<
|
||||
e;c++)a[c].node.style.display=a[c].display;a.splice(0,a.length)},_fnPrintHideNodes:function(b){for(var c=this.dom.print.hidden,e=b.parentNode,d=e.childNodes,m=0,n=d.length;m<n;m++)if(d[m]!=b&&1==d[m].nodeType){var l=a(d[m]).css("display");"none"!=l&&(c.push({node:d[m],display:l}),d[m].style.display="none")}"BODY"!=e.nodeName.toUpperCase()&&this._fnPrintHideNodes(e)}};TableTools._aInstances=[];TableTools._aListeners=[];TableTools.fnGetMasters=function(){for(var a=[],c=0,e=TableTools._aInstances.length;c<
|
||||
e;c++)TableTools._aInstances[c].s.master&&a.push(TableTools._aInstances[c]);return a};TableTools.fnGetInstance=function(a){"object"!=typeof a&&(a=e.getElementById(a));for(var c=0,g=TableTools._aInstances.length;c<g;c++)if(TableTools._aInstances[c].s.master&&TableTools._aInstances[c].dom.table==a)return TableTools._aInstances[c];return null};TableTools._fnEventListen=function(a,c,e){TableTools._aListeners.push({that:a,type:c,fn:e})};TableTools._fnEventDispatch=function(a,c,e,d){for(var m=TableTools._aListeners,
|
||||
n=0,l=m.length;n<l;n++)a.dom.table==m[n].that.dom.table&&m[n].type==c&&m[n].fn(e,d)};TableTools.buttonBase={sAction:"text",sTag:"default",sLinerTag:"default",sButtonClass:"DTTT_button_text",sButtonText:"Button text",sTitle:"",sToolTip:"",sCharSet:"utf8",bBomInc:!1,sFileName:"*.csv",sFieldBoundary:"",sFieldSeperator:"\t",sNewLine:"auto",mColumns:"all",bHeader:!0,bFooter:!0,bOpenRows:!1,bSelectedOnly:!1,oSelectorOpts:void 0,fnMouseover:null,fnMouseout:null,fnClick:null,fnSelect:null,fnComplete:null,
|
||||
fnInit:null,fnCellRender:null};TableTools.BUTTONS={csv:a.extend({},TableTools.buttonBase,{sAction:"flash_save",sButtonClass:"DTTT_button_csv",sButtonText:"CSV",sFieldBoundary:'"',sFieldSeperator:",",fnClick:function(a,c,e){this.fnSetText(e,this.fnGetTableData(c))}}),xls:a.extend({},TableTools.buttonBase,{sAction:"flash_save",sCharSet:"utf16le",bBomInc:!0,sButtonClass:"DTTT_button_xls",sButtonText:"Excel",fnClick:function(a,c,e){this.fnSetText(e,this.fnGetTableData(c))}}),copy:a.extend({},TableTools.buttonBase,
|
||||
{sAction:"flash_copy",sButtonClass:"DTTT_button_copy",sButtonText:"Copy",fnClick:function(a,c,e){this.fnSetText(e,this.fnGetTableData(c))},fnComplete:function(a,c,e,d){a=d.split("\n").length;a=null===this.s.dt.nTFoot?a-1:a-2;this.fnInfo("<h6>Table copied</h6><p>Copied "+a+" row"+(1==a?"":"s")+" to the clipboard.</p>",1500)}}),pdf:a.extend({},TableTools.buttonBase,{sAction:"flash_pdf",sNewLine:"\n",sFileName:"*.pdf",sButtonClass:"DTTT_button_pdf",sButtonText:"PDF",sPdfOrientation:"portrait",sPdfSize:"A4",
|
||||
sPdfMessage:"",fnClick:function(a,c,e){this.fnSetText(e,"title:"+this.fnGetTitle(c)+"\nmessage:"+c.sPdfMessage+"\ncolWidth:"+this.fnCalcColRatios(c)+"\norientation:"+c.sPdfOrientation+"\nsize:"+c.sPdfSize+"\n--/TableToolsOpts--\n"+this.fnGetTableData(c))}}),print:a.extend({},TableTools.buttonBase,{sInfo:"<h6>Print view</h6><p>Please use your browser's print function to print this table. Press escape when finished.</p>",sMessage:null,bShowAll:!0,sToolTip:"View print view",sButtonClass:"DTTT_button_print",
|
||||
sButtonText:"Print",fnClick:function(a,c){this.fnPrint(!0,c)}}),text:a.extend({},TableTools.buttonBase),select:a.extend({},TableTools.buttonBase,{sButtonText:"Select button",fnSelect:function(b){0!==this.fnGetSelected().length?a(b).removeClass(this.classes.buttons.disabled):a(b).addClass(this.classes.buttons.disabled)},fnInit:function(b){a(b).addClass(this.classes.buttons.disabled)}}),select_single:a.extend({},TableTools.buttonBase,{sButtonText:"Select button",fnSelect:function(b){1==this.fnGetSelected().length?
|
||||
a(b).removeClass(this.classes.buttons.disabled):a(b).addClass(this.classes.buttons.disabled)},fnInit:function(b){a(b).addClass(this.classes.buttons.disabled)}}),select_all:a.extend({},TableTools.buttonBase,{sButtonText:"Select all",fnClick:function(){this.fnSelectAll()},fnSelect:function(b){this.fnGetSelected().length==this.s.dt.fnRecordsDisplay()?a(b).addClass(this.classes.buttons.disabled):a(b).removeClass(this.classes.buttons.disabled)}}),select_none:a.extend({},TableTools.buttonBase,{sButtonText:"Deselect all",
|
||||
fnClick:function(){this.fnSelectNone()},fnSelect:function(b){0!==this.fnGetSelected().length?a(b).removeClass(this.classes.buttons.disabled):a(b).addClass(this.classes.buttons.disabled)},fnInit:function(b){a(b).addClass(this.classes.buttons.disabled)}}),ajax:a.extend({},TableTools.buttonBase,{sAjaxUrl:"/xhr.php",sButtonText:"Ajax button",fnClick:function(b,c){b=this.fnGetTableData(c);a.ajax({url:c.sAjaxUrl,data:[{name:"tableData",value:b}],success:c.fnAjaxComplete,dataType:"json",type:"POST",cache:!1,
|
||||
error:function(){alert("Error detected when sending table data to server")}})},fnAjaxComplete:function(){alert("Ajax complete")}}),div:a.extend({},TableTools.buttonBase,{sAction:"div",sTag:"div",sButtonClass:"DTTT_nonbutton",sButtonText:"Text button"}),collection:a.extend({},TableTools.buttonBase,{sAction:"collection",sButtonClass:"DTTT_button_collection",sButtonText:"Collection",fnClick:function(a,c){this._fnCollectionShow(a,c)}})};TableTools.classes={container:"DTTT_container",buttons:{normal:"DTTT_button",
|
||||
disabled:"DTTT_disabled"},collection:{container:"DTTT_collection",background:"DTTT_collection_background",buttons:{normal:"DTTT_button",disabled:"DTTT_disabled"}},select:{table:"DTTT_selectable",row:"DTTT_selected selected"},print:{body:"DTTT_Print",info:"DTTT_print_info",message:"DTTT_PrintMessage"}};TableTools.classes_themeroller={container:"DTTT_container ui-buttonset ui-buttonset-multi",buttons:{normal:"DTTT_button ui-button ui-state-default"},collection:{container:"DTTT_collection ui-buttonset ui-buttonset-multi"}};
|
||||
TableTools.DEFAULTS={sSwfPath:"media/swf/copy_csv_xls_pdf.swf",sRowSelect:"none",sSelectedClass:null,fnPreRowSelect:null,fnRowSelected:null,fnRowDeselected:null,aButtons:["copy","csv","xls","pdf","print"],oTags:{container:"div",button:"a",liner:"span",collection:{container:"div",button:"a",liner:"span"}}};TableTools.prototype.CLASS="TableTools";TableTools.VERSION="2.1.6-dev";TableTools.prototype.VERSION=TableTools.VERSION;"function"==typeof a.fn.dataTable&&"function"==typeof a.fn.dataTableExt.fnVersionCheck&&
|
||||
a.fn.dataTableExt.fnVersionCheck("1.9.0")?a.fn.dataTableExt.aoFeatures.push({fnInit:function(a){a=new TableTools(a.oInstance,"undefined"!=typeof a.oInit.oTableTools?a.oInit.oTableTools:{});TableTools._aInstances.push(a);return a.dom.container},cFeature:"T",sFeature:"TableTools"}):alert("Warning: TableTools 2 requires DataTables 1.9.0 or newer - www.datatables.net/download");a.fn.DataTable.TableTools=TableTools})(jQuery,window,document);if("function"!==typeof Blob&&"object"!==typeof Blob||"undefined"===typeof URL)if("function"!==typeof Blob&&"object"!==typeof Blob||"undefined"===typeof webkitURL)var Blob=function(a){var c=a.BlobBuilder||a.WebKitBlobBuilder||a.MozBlobBuilder||a.MSBlobBuilder||function(a){var b=function(a){return Object.prototype.toString.call(a).match(/^\[object\s(.*)\]$/)[1]},c=function(){this.data=[]},g=function(a,b,c){this.data=a;this.size=a.length;this.type=b;this.encoding=c},d=c.prototype,m=g.prototype,n=a.FileReaderSync,
|
||||
l=function(a){this.code=this[this.name=a]},k="NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(" "),r=k.length,p=a.URL||a.webkitURL||a,t=p.createObjectURL,h=p.revokeObjectURL,s=p,q=a.btoa,x=a.atob,C=a.ArrayBuffer,v=a.Uint8Array;for(g.fake=m.fake=!0;r--;)l.prototype[k[r]]=r+1;p.createObjectURL||(s=a.URL={});s.createObjectURL=function(a){var b=a.type;null===b&&(b="application/octet-stream");if(a instanceof g)return b=
|
||||
"data:"+b,"base64"===a.encoding?b+";base64,"+a.data:"URI"===a.encoding?b+","+decodeURIComponent(a.data):q?b+";base64,"+q(a.data):b+","+encodeURIComponent(a.data);if(t)return t.call(p,a)};s.revokeObjectURL=function(a){"data:"!==a.substring(0,5)&&h&&h.call(p,a)};d.append=function(a){var c=this.data;if(v&&(a instanceof C||a instanceof v)){var d="";a=new v(a);for(var f=0,e=a.length;f<e;f++)d+=String.fromCharCode(a[f]);c.push(d)}else if("Blob"===b(a)||"File"===b(a))if(n)d=new n,c.push(d.readAsBinaryString(a));
|
||||
else throw new l("NOT_READABLE_ERR");else a instanceof g?"base64"===a.encoding&&x?c.push(x(a.data)):"URI"===a.encoding?c.push(decodeURIComponent(a.data)):"raw"===a.encoding&&c.push(a.data):("string"!==typeof a&&(a+=""),c.push(unescape(encodeURIComponent(a))))};d.getBlob=function(a){arguments.length||(a=null);return new g(this.data.join(""),a,"raw")};d.toString=function(){return"[object BlobBuilder]"};m.slice=function(a,b,c){var d=arguments.length;3>d&&(c=null);return new g(this.data.slice(a,1<d?b:
|
||||
this.data.length),c,this.encoding)};m.toString=function(){return"[object Blob]"};return c}(a);return function(a,b){var f=b?b.type||"":"",g=new c;if(a)for(var d=0,m=a.length;d<m;d++)g.append(a[d]);return g.getBlob(f)}}(self);else self.URL=webkitURL;var saveAs=saveAs||"undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(a){var c=a.document,e=a.URL||a.webkitURL||a,b=c.createElementNS("http://www.w3.org/1999/xhtml","a"),f=!a.externalHost&&"download"in b,g=a.webkitRequestFileSystem,d=a.requestFileSystem||g||a.mozRequestFileSystem,m=function(b){(a.setImmediate||a.setTimeout)(function(){throw b;},0)},n=0,l=[],k=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var f=a["on"+b[d]];if("function"===
|
||||
typeof f)try{f.call(a,c||a)}catch(e){m(e)}}},r=function(e,h){var m=this,p=e.type,r=!1,C,v,w=function(){var b=(a.URL||a.webkitURL||a).createObjectURL(e);l.push(b);return b},A=function(){k(m,["writestart","progress","write","writeend"])},u=function(){if(r||!C)C=w(e);v?v.location.href=C:window.open(C,"_blank");m.readyState=m.DONE;A()},B=function(a){return function(){if(m.readyState!==m.DONE)return a.apply(this,arguments)}},F={create:!0,exclusive:!1},D;m.readyState=m.INIT;h||(h="download");if(f)C=w(e),
|
||||
c=a.document,b=c.createElementNS("http://www.w3.org/1999/xhtml","a"),b.href=C,b.download=h,p=c.createEvent("MouseEvents"),p.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null),b.dispatchEvent(p),m.readyState=m.DONE,A();else{a.chrome&&(p&&"application/octet-stream"!==p)&&(D=e.slice||e.webkitSlice,e=D.call(e,0,e.size,"application/octet-stream"),r=!0);g&&"download"!==h&&(h+=".download");if("application/octet-stream"===p||g)v=a;d?(n+=e.size,d(a.TEMPORARY,n,B(function(a){a.root.getDirectory("saved",
|
||||
F,B(function(a){var b=function(){a.getFile(h,F,B(function(a){a.createWriter(B(function(b){b.onwriteend=function(b){v.location.href=a.toURL();l.push(a);m.readyState=m.DONE;k(m,"writeend",b)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&u()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=m["on"+a]});b.write(e);m.abort=function(){b.abort();m.readyState=m.DONE};m.readyState=m.WRITING}),u)}),u)};a.getFile(h,{create:!1},B(function(a){a.remove();b()}),B(function(a){a.code===
|
||||
a.NOT_FOUND_ERR?b():u()}))}),u)}),u)):u()}},p=r.prototype;p.abort=function(){this.readyState=this.DONE;k(this,"abort")};p.readyState=p.INIT=0;p.WRITING=1;p.DONE=2;p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null;a.addEventListener("unload",function(){for(var a=l.length;a--;){var b=l[a];"string"===typeof b?e.revokeObjectURL(b):b.remove()}l.length=0},!1);return function(a,b){return new r(a,b)}}(this.self||this.window||this.content);
|
||||
"undefined"!==typeof module&&(module.exports=saveAs);var ZeroClipboard_TableTools={version:"1.0.4-TableTools2",clients:{},moviePath:"",nextId:1,$:function(a){"string"==typeof a&&(a=document.getElementById(a));a.addClass||(a.hide=function(){this.style.display="none"},a.show=function(){this.style.display=""},a.addClass=function(a){this.removeClass(a);this.className+=" "+a},a.removeClass=function(a){this.className=this.className.replace(RegExp("\\s*"+a+"\\s*")," ").replace(/^\s+/,"").replace(/\s+$/,"")},a.hasClass=function(a){return!!this.className.match(RegExp("\\s*"+
|
||||
a+"\\s*"))});return a},setMoviePath:function(a){this.moviePath=a},dispatch:function(a,c,e){(a=this.clients[a])&&a.receiveEvent(c,e)},register:function(a,c){this.clients[a]=c},getDOMObjectPosition:function(a){var c={left:0,top:0,width:a.width?a.width:a.offsetWidth,height:a.height?a.height:a.offsetHeight};""!=a.style.width&&(c.width=a.style.width.replace("px",""));""!=a.style.height&&(c.height=a.style.height.replace("px",""));for(;a;)c.left+=a.offsetLeft,c.top+=a.offsetTop,a=a.offsetParent;return c},
|
||||
Client:function(a){this.handlers={};this.id=ZeroClipboard_TableTools.nextId++;this.movieId="ZeroClipboard_TableToolsMovie_"+this.id;ZeroClipboard_TableTools.register(this.id,this);a&&this.glue(a)}};
|
||||
ZeroClipboard_TableTools.Client.prototype={id:0,ready:!1,movie:null,clipText:"",fileName:"",action:"copy",handCursorEnabled:!0,cssEffects:!0,handlers:null,sized:!1,glue:function(a,c){this.domElement=ZeroClipboard_TableTools.$(a);var e=99;this.domElement.style.zIndex&&(e=parseInt(this.domElement.style.zIndex)+1);var b=ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement);this.div=document.createElement("div");var f=this.div.style;f.position="absolute";f.left="0px";f.top="0px";f.width=b.width+
|
||||
"px";f.height=b.height+"px";f.zIndex=e;"undefined"!=typeof c&&""!=c&&(this.div.title=c);0!=b.width&&0!=b.height&&(this.sized=!0);this.domElement&&(this.domElement.appendChild(this.div),this.div.innerHTML=this.getHTML(b.width,b.height))},positionElement:function(){var a=ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement),c=this.div.style;c.position="absolute";c.width=a.width+"px";c.height=a.height+"px";0!=a.width&&0!=a.height&&(this.sized=!0,c=this.div.childNodes[0],c.width=a.width,c.height=
|
||||
a.height)},getHTML:function(a,c){var e="",b="id="+this.id+"&width="+a+"&height="+c;if(navigator.userAgent.match(/MSIE/))var f=location.href.match(/^https/i)?"https://":"http://",e=e+('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+f+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+a+'" height="'+c+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+
|
||||
ZeroClipboard_TableTools.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+b+'"/><param name="wmode" value="transparent"/></object>');else e+='<embed id="'+this.movieId+'" src="'+ZeroClipboard_TableTools.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+a+'" height="'+c+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+
|
||||
b+'" wmode="transparent" />';return e},hide:function(){this.div&&(this.div.style.left="-2000px")},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide();this.div.innerHTML="";var a=document.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(c){}this.div=this.domElement=null}},reposition:function(a){a&&((this.domElement=ZeroClipboard_TableTools.$(a))||this.hide());if(this.domElement&&this.div){a=ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement);
|
||||
var c=this.div.style;c.left=""+a.left+"px";c.top=""+a.top+"px"}},clearText:function(){this.clipText="";this.ready&&this.movie.clearText()},appendText:function(a){this.clipText+=a;this.ready&&this.movie.appendText(a)},setText:function(a){this.clipText=a;this.ready&&this.movie.setText(a)},setCharSet:function(a){this.charSet=a;this.ready&&this.movie.setCharSet(a)},setBomInc:function(a){this.incBom=a;this.ready&&this.movie.setBomInc(a)},setFileName:function(a){this.fileName=a;this.ready&&this.movie.setFileName(a)},
|
||||
setAction:function(a){this.action=a;this.ready&&this.movie.setAction(a)},addEventListener:function(a,c){a=a.toString().toLowerCase().replace(/^on/,"");this.handlers[a]||(this.handlers[a]=[]);this.handlers[a].push(c)},setHandCursor:function(a){this.handCursorEnabled=a;this.ready&&this.movie.setHandCursor(a)},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(a,c){a=a.toString().toLowerCase().replace(/^on/,"");switch(a){case "load":this.movie=document.getElementById(this.movieId);
|
||||
if(!this.movie){var e=this;setTimeout(function(){e.receiveEvent("load",null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){e=this;setTimeout(function(){e.receiveEvent("load",null)},100);this.ready=!0;return}this.ready=!0;this.movie.clearText();this.movie.appendText(this.clipText);this.movie.setFileName(this.fileName);this.movie.setAction(this.action);this.movie.setCharSet(this.charSet);this.movie.setBomInc(this.incBom);this.movie.setHandCursor(this.handCursorEnabled);
|
||||
break;case "mouseover":this.domElement&&this.cssEffects&&this.recoverActive&&this.domElement.addClass("active");break;case "mouseout":this.domElement&&this.cssEffects&&(this.recoverActive=!1,this.domElement.hasClass("active")&&(this.domElement.removeClass("active"),this.recoverActive=!0));break;case "mousedown":this.domElement&&this.cssEffects&&this.domElement.addClass("active");break;case "mouseup":this.domElement&&this.cssEffects&&(this.domElement.removeClass("active"),this.recoverActive=!1)}if(this.handlers[a])for(var b=
|
||||
0,f=this.handlers[a].length;b<f;b++){var g=this.handlers[a][b];if("function"==typeof g)g(this,c);else if("object"==typeof g&&2==g.length)g[0][g[1]](this,c);else if("string"==typeof g)window[g](this,c)}}};$.extend(!0,$.fn.dataTable.defaults,{sDom:"<'row'<'col-xs-6'l><'col-xs-6'f>r>t<'row'<'col-xs-6'i><'col-xs-6'p>>",sPaginationType:"bootstrap",oLanguage:{sLengthMenu:gettext("_MENU_ records per page")}});$.extend($.fn.dataTableExt.oStdClasses,{sWrapper:"dataTables_wrapper form-inline",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"});
|
||||
$.fn.dataTableExt.oApi.fnPagingInfo=function(a){return{iStart:a._iDisplayStart,iEnd:a.fnDisplayEnd(),iLength:a._iDisplayLength,iTotal:a.fnRecordsTotal(),iFilteredTotal:a.fnRecordsDisplay(),iPage:-1===a._iDisplayLength?0:Math.ceil(a._iDisplayStart/a._iDisplayLength),iTotalPages:-1===a._iDisplayLength?0:Math.ceil(a.fnRecordsDisplay()/a._iDisplayLength)}};
|
||||
$.extend($.fn.dataTableExt.oPagination,{bootstrap:{fnInit:function(a,c,e){var b=a.oLanguage.oPaginate,f=function(b){b.preventDefault();a.oApi._fnPageChange(a,b.data.action)&&e(a)};$(c).append('<ul class="pagination"><li class="prev disabled"><a href="#">← '+b.sPrevious+'</a></li><li class="next disabled"><a href="#">'+b.sNext+" → </a></li></ul>");c=$("a",c);$(c[0]).bind("click.DT",{action:"previous"},f);$(c[1]).bind("click.DT",{action:"next"},f)},fnUpdate:function(a,c){var e=a.oInstance.fnPagingInfo(),
|
||||
b=a.aanFeatures.p,f,g,d,m,n,l;f=Math.floor(2.5);5>e.iTotalPages?(n=1,l=e.iTotalPages):e.iPage<=f?(n=1,l=5):e.iPage>=e.iTotalPages-f?(n=e.iTotalPages-5+1,l=e.iTotalPages):(n=e.iPage-f+1,l=n+5-1);var k=function(b){b.preventDefault();a._iDisplayStart=(parseInt($("a",this).text(),10)-1)*e.iLength;c(a)};f=0;for(g=b.length;f<g;f++){$("li:gt(0)",b[f]).filter(":not(:last)").remove();for(d=n;d<=l;d++)m=d==e.iPage+1?'class="active"':"",$("<li "+m+'><a href="#">'+d+"</a></li>").insertBefore($("li:last",b[f])[0]).bind("click",
|
||||
k);0===e.iPage?$("li:first",b[f]).addClass("disabled"):$("li:first",b[f]).removeClass("disabled");e.iPage===e.iTotalPages-1||0===e.iTotalPages?$("li:last",b[f]).addClass("disabled"):$("li:last",b[f]).removeClass("disabled")}}}});
|
||||
$.fn.DataTable.TableTools&&($.extend(!0,$.fn.DataTable.TableTools.classes,{container:"DTTT btn-group-3d",buttons:{normal:"",disabled:"disabled"},collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info modal"},select:{row:"active"}}),$.extend(!0,$.fn.DataTable.TableTools.DEFAULTS,{aButtons:[]}),$.extend(!0,$.fn.DataTable.TableTools.DEFAULTS.oTags,{collection:{container:"ul",button:"li",liner:"a"},liner:"div"}));var Handlebars=function(){var a=function(){function a(b){this.string=b}a.prototype.toString=function(){return""+this.string};return a}(),c=function(a){function b(a){return e[a]||"&"}var c={},e={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},f=/[&<>"'`]/g,k=/[&<>"'`]/;c.extend=function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};var r=Object.prototype.toString;c.toString=r;var p=function(a){return"function"===typeof a};p(/x/)&&(p=function(a){return"function"===
|
||||
typeof a&&"[object Function]"===r.call(a)});c.isFunction=p;var t=Array.isArray||function(a){return a&&"object"===typeof a?"[object Array]"===r.call(a):!1};c.isArray=t;c.escapeExpression=function(c){if(c instanceof a)return c.toString();if(!c&&0!==c)return"";c=""+c;return k.test(c)?c.replace(f,b):c};c.isEmpty=function(a){return a||0===a?t(a)&&0===a.length?!0:!1:!0};return c}(a),e=function(){function a(){for(var c=Error.prototype.constructor.apply(this,arguments),e=0;e<b.length;e++)this[b[e]]=c[b[e]]}
|
||||
var b="description fileName lineNumber message name number stack".split(" ");a.prototype=Error();return a}(),b=function(a,b){function c(a,b){this.helpers=a||{};this.partials=b||{};e(this)}function e(a){a.registerHelper("helperMissing",function(a){if(2!==arguments.length)throw Error("Missing helper: '"+a+"'");});a.registerHelper("blockHelperMissing",function(b,c){var d=c.inverse||function(){},e=c.fn;t(b)&&(b=b.call(this));return!0===b?e(this):!1===b||null==b?d(this):p(b)?0<b.length?a.helpers.each(b,
|
||||
c):d(this):e(b)});a.registerHelper("each",function(a,b){var c=b.fn,d=b.inverse,e=0,f="",g;t(a)&&(a=a.call(this));b.data&&(g=q(b.data));if(a&&"object"===typeof a)if(p(a))for(var h=a.length;e<h;e++)g&&(g.index=e,g.first=0===e,g.last=e===a.length-1),f+=c(a[e],{data:g});else for(h in a)a.hasOwnProperty(h)&&(g&&(g.key=h),f+=c(a[h],{data:g}),e++);0===e&&(f=d(this));return f});a.registerHelper("if",function(a,b){t(a)&&(a=a.call(this));return!b.hash.includeZero&&!a||r.isEmpty(a)?b.inverse(this):b.fn(this)});
|
||||
a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})});a.registerHelper("with",function(a,b){t(a)&&(a=a.call(this));if(!r.isEmpty(a))return b.fn(a)});a.registerHelper("log",function(b,c){var d=c.data&&null!=c.data.level?parseInt(c.data.level,10):1;a.log(d,b)})}function f(a,b){s.log(a,b)}var k={},r=a;k.VERSION="1.1.2";k.COMPILER_REVISION=4;k.REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};var p=r.isArray,
|
||||
t=r.isFunction,h=r.toString;k.HandlebarsEnvironment=c;c.prototype={constructor:c,logger:s,log:f,registerHelper:function(a,c,e){if("[object Object]"===h.call(a)){if(e||c)throw new b("Arg not supported with multiple helpers");r.extend(this.helpers,a)}else e&&(c.not=e),this.helpers[a]=c},registerPartial:function(a,b){"[object Object]"===h.call(a)?r.extend(this.partials,a):this.partials[a]=b}};var s={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(a,
|
||||
b){if(s.level<=a){var c=s.methodMap[a];"undefined"!==typeof console&&console[c]&&console[c].call(console,b)}}};k.logger=s;k.log=f;var q=function(a){var b={};r.extend(b,a);return b};k.createFrame=q;return k}(c,e),f=function(a,b,c){function e(a,b,c){var d=Array.prototype.slice.call(arguments,3),f=function(a,e){e=e||{};return b.apply(this,[a,e.data||c].concat(d))};f.program=a;f.depth=d.length;return f}function f(a,b,c){var d=function(a,d){d=d||{};return b(a,d.data||c)};d.program=a;d.depth=0;return d}
|
||||
function k(a,b,c,d,e,f){d={partial:!0,helpers:d,partials:e,data:f};if(void 0===a)throw new t("The partial "+b+" could not be found");if(a instanceof Function)return a(c,d)}function r(){return""}var p={},t=b,h=c.COMPILER_REVISION,s=c.REVISION_CHANGES;p.template=function(b,c){if(!c)throw Error("No environment passed to template");var d={escapeExpression:a.escapeExpression,invokePartial:c.compile?function(a,b,d,e,f,g){var h=k.apply(this,arguments);if(h)return h;h={helpers:e,partials:f,data:g};f[b]=c.compile(a,
|
||||
{data:void 0!==g},c);return f[b](d,h)}:function(a,b){var c=k.apply(this,arguments);if(c)return c;throw new t("The partial "+b+" could not be compiled when running in runtime-only mode");},programs:[],program:function(a,b,c){var d=this.programs[a];c?d=f(a,b,c):d||(d=this.programs[a]=f(a,b));return d},merge:function(b,c){var d=b||c;b&&(c&&b!==c)&&(d={},a.extend(d,c),a.extend(d,b));return d},programWithDepth:e,noop:r,compilerInfo:null};return function(a,e){e=e||{};var f=e.partial?e:c,g,l;e.partial||
|
||||
(g=e.helpers,l=e.partials);f=b.call(d,f,a,g,l,e.data);if(!e.partial&&(l=(g=d.compilerInfo)&&g[0]||1,l!==h)){if(l<h)throw Error("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+s[h]+") or downgrade your runtime to an older version ("+s[l]+").");throw Error("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+g[1]+").");}return f}};
|
||||
p.programWithDepth=e;p.program=f;p.invokePartial=k;p.noop=r;return p}(c,e,b),a=function(a,b,c,e,f){var k=function(){var k=new a.HandlebarsEnvironment;e.extend(k,a);k.SafeString=b;k.Exception=c;k.Utils=e;k.VM=f;k.template=function(a){return f.template(a,k)};return k},r=k();r.create=k;return r}(b,a,e,c,f),c=function(a){function b(a,c,e){this.type="program";this.statements=a;this.strip={};e?(this.inverse=new b(e,c),this.strip.right=c.left):c&&(this.strip.left=c.right)}var c={};c.ProgramNode=b;c.MustacheNode=
|
||||
function(a,b,c,d){this.type="mustache";this.hash=b;this.strip=d;c=c[3]||c[2];this.escaped="{"!==c&&"&"!==c;c=this.id=a[0];a=this.params=a.slice(1);this.isHelper=(this.eligibleHelper=c.isSimple)&&(a.length||b)};c.PartialNode=function(a,b,c){this.type="partial";this.partialName=a;this.context=b;this.strip=c};c.BlockNode=function(b,c,d,e){if(b.id.original!==e.path.original)throw new a(b.id.original+" doesn't match "+e.path.original);this.type="block";this.mustache=b;this.program=c;this.inverse=d;this.strip=
|
||||
{left:b.strip.left,right:e.strip.right};(c||d).strip.left=b.strip.right;(d||c).strip.right=e.strip.left;d&&!c&&(this.isInverse=!0)};c.ContentNode=function(a){this.type="content";this.string=a};c.HashNode=function(a){this.type="hash";this.pairs=a};c.IdNode=function(b){this.type="ID";for(var c="",d=[],e=0,f=0,m=b.length;f<m;f++){var h=b[f].part,c=c+((b[f].separator||"")+h);if(".."===h||"."===h||"this"===h){if(0<d.length)throw new a("Invalid path: "+c);".."===h?e++:this.isScoped=!0}else d.push(h)}this.original=
|
||||
c;this.parts=d;this.string=d.join(".");this.depth=e;this.isSimple=1===b.length&&!this.isScoped&&0===e;this.stringModeValue=this.string};c.PartialNameNode=function(a){this.type="PARTIAL_NAME";this.name=a.original};c.DataNode=function(a){this.type="DATA";this.id=a};c.StringNode=function(a){this.type="STRING";this.original=this.string=this.stringModeValue=a};c.IntegerNode=function(a){this.type="INTEGER";this.original=this.integer=a;this.stringModeValue=Number(a)};c.BooleanNode=function(a){this.type=
|
||||
"BOOLEAN";this.bool=a;this.stringModeValue="true"===a};c.CommentNode=function(a){this.type="comment";this.comment=a};return c}(e),f=function(a,b){var c={};c.parser=a;c.parse=function(c){if(c.constructor===b.ProgramNode)return c;a.yy=b;return a.parse(c)};return c}(function(){return function(){function a(b,c){return{left:"~"===b[2],right:"~"===c[0]||"~"===c[1]}}function b(){this.yy={}}var c={trace:function(){},yy:{},symbols_:{error:2,root:3,statements:4,EOF:5,program:6,simpleInverse:7,statement:8,openInverse:9,
|
||||
closeBlock:10,openBlock:11,mustache:12,partial:13,CONTENT:14,COMMENT:15,OPEN_BLOCK:16,inMustache:17,CLOSE:18,OPEN_INVERSE:19,OPEN_ENDBLOCK:20,path:21,OPEN:22,OPEN_UNESCAPED:23,CLOSE_UNESCAPED:24,OPEN_PARTIAL:25,partialName:26,partial_option0:27,inMustache_repetition0:28,inMustache_option0:29,dataName:30,param:31,STRING:32,INTEGER:33,BOOLEAN:34,hash:35,hash_repetition_plus0:36,hashSegment:37,ID:38,EQUALS:39,DATA:40,pathSegments:41,SEP:42,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"CONTENT",
|
||||
15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"CLOSE_UNESCAPED",25:"OPEN_PARTIAL",32:"STRING",33:"INTEGER",34:"BOOLEAN",38:"ID",39:"EQUALS",40:"DATA",42:"SEP"},productions_:[0,[3,2],[3,1],[6,2],[6,3],[6,2],[6,1],[6,1],[6,0],[4,1],[4,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,4],[7,2],[17,3],[17,1],[31,1],[31,1],[31,1],[31,1],[31,1],[35,1],[37,3],[26,1],[26,1],[26,1],[30,2],[21,1],[41,3],[41,1],[27,0],
|
||||
[27,1],[28,0],[28,2],[29,0],[29,1],[36,1],[36,2]],performAction:function(b,c,d,e,f,h,m){b=h.length-1;switch(f){case 1:return new e.ProgramNode(h[b-1]);case 2:return new e.ProgramNode([]);case 3:this.$=new e.ProgramNode([],h[b-1],h[b]);break;case 4:this.$=new e.ProgramNode(h[b-2],h[b-1],h[b]);break;case 5:this.$=new e.ProgramNode(h[b-1],h[b],[]);break;case 6:this.$=new e.ProgramNode(h[b]);break;case 7:this.$=new e.ProgramNode([]);break;case 8:this.$=new e.ProgramNode([]);break;case 9:this.$=[h[b]];
|
||||
break;case 10:h[b-1].push(h[b]);this.$=h[b-1];break;case 11:this.$=new e.BlockNode(h[b-2],h[b-1].inverse,h[b-1],h[b]);break;case 12:this.$=new e.BlockNode(h[b-2],h[b-1],h[b-1].inverse,h[b]);break;case 13:this.$=h[b];break;case 14:this.$=h[b];break;case 15:this.$=new e.ContentNode(h[b]);break;case 16:this.$=new e.CommentNode(h[b]);break;case 17:this.$=new e.MustacheNode(h[b-1][0],h[b-1][1],h[b-2],a(h[b-2],h[b]));break;case 18:this.$=new e.MustacheNode(h[b-1][0],h[b-1][1],h[b-2],a(h[b-2],h[b]));break;
|
||||
case 19:this.$={path:h[b-1],strip:a(h[b-2],h[b])};break;case 20:this.$=new e.MustacheNode(h[b-1][0],h[b-1][1],h[b-2],a(h[b-2],h[b]));break;case 21:this.$=new e.MustacheNode(h[b-1][0],h[b-1][1],h[b-2],a(h[b-2],h[b]));break;case 22:this.$=new e.PartialNode(h[b-2],h[b-1],a(h[b-3],h[b]));break;case 23:this.$=a(h[b-1],h[b]);break;case 24:this.$=[[h[b-2]].concat(h[b-1]),h[b]];break;case 25:this.$=[[h[b]],null];break;case 26:this.$=h[b];break;case 27:this.$=new e.StringNode(h[b]);break;case 28:this.$=new e.IntegerNode(h[b]);
|
||||
break;case 29:this.$=new e.BooleanNode(h[b]);break;case 30:this.$=h[b];break;case 31:this.$=new e.HashNode(h[b]);break;case 32:this.$=[h[b-2],h[b]];break;case 33:this.$=new e.PartialNameNode(h[b]);break;case 34:this.$=new e.PartialNameNode(new e.StringNode(h[b]));break;case 35:this.$=new e.PartialNameNode(new e.IntegerNode(h[b]));break;case 36:this.$=new e.DataNode(h[b]);break;case 37:this.$=new e.IdNode(h[b]);break;case 38:h[b-2].push({part:h[b],separator:h[b-1]});this.$=h[b-2];break;case 39:this.$=
|
||||
[{part:h[b]}];break;case 42:this.$=[];break;case 43:h[b-1].push(h[b]);break;case 46:this.$=[h[b]];break;case 47:h[b-1].push(h[b])}},table:[{3:1,4:2,5:[1,3],8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[3]},{5:[1,16],8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[2,2]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],25:[2,9]},{4:20,6:18,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],
|
||||
15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{4:20,6:22,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{5:[2,13],14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],25:[2,13]},{5:[2,14],14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],25:[2,14]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],25:[2,15]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],
|
||||
19:[2,16],20:[2,16],22:[2,16],23:[2,16],25:[2,16]},{17:23,21:24,30:25,38:[1,28],40:[1,27],41:26},{17:29,21:24,30:25,38:[1,28],40:[1,27],41:26},{17:30,21:24,30:25,38:[1,28],40:[1,27],41:26},{17:31,21:24,30:25,38:[1,28],40:[1,27],41:26},{21:33,26:32,32:[1,34],33:[1,35],38:[1,28],41:26},{1:[2,1]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],25:[2,10]},{10:36,20:[1,37]},{4:38,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,7],22:[1,13],23:[1,14],
|
||||
25:[1,15]},{7:39,8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,6],22:[1,13],23:[1,14],25:[1,15]},{17:23,18:[1,40],21:24,30:25,38:[1,28],40:[1,27],41:26},{10:41,20:[1,37]},{18:[1,42]},{18:[2,42],24:[2,42],28:43,32:[2,42],33:[2,42],34:[2,42],38:[2,42],40:[2,42]},{18:[2,25],24:[2,25]},{18:[2,37],24:[2,37],32:[2,37],33:[2,37],34:[2,37],38:[2,37],40:[2,37],42:[1,44]},{21:45,38:[1,28],41:26},{18:[2,39],24:[2,39],32:[2,39],33:[2,39],34:[2,39],38:[2,39],40:[2,39],42:[2,39]},{18:[1,
|
||||
46]},{18:[1,47]},{24:[1,48]},{18:[2,40],21:50,27:49,38:[1,28],41:26},{18:[2,33],38:[2,33]},{18:[2,34],38:[2,34]},{18:[2,35],38:[2,35]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],25:[2,11]},{21:51,38:[1,28],41:26},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,3],22:[1,13],23:[1,14],25:[1,15]},{4:52,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,5],22:[1,13],23:[1,14],25:[1,15]},{14:[2,23],15:[2,23],16:[2,23],19:[2,23],
|
||||
20:[2,23],22:[2,23],23:[2,23],25:[2,23]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],25:[2,12]},{14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],25:[2,18]},{18:[2,44],21:56,24:[2,44],29:53,30:60,31:54,32:[1,57],33:[1,58],34:[1,59],35:55,36:61,37:62,38:[1,63],40:[1,27],41:26},{38:[1,64]},{18:[2,36],24:[2,36],32:[2,36],33:[2,36],34:[2,36],38:[2,36],40:[2,36]},{14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],25:[2,17]},{5:[2,
|
||||
20],14:[2,20],15:[2,20],16:[2,20],19:[2,20],20:[2,20],22:[2,20],23:[2,20],25:[2,20]},{5:[2,21],14:[2,21],15:[2,21],16:[2,21],19:[2,21],20:[2,21],22:[2,21],23:[2,21],25:[2,21]},{18:[1,65]},{18:[2,41]},{18:[1,66]},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],25:[1,15]},{18:[2,24],24:[2,24]},{18:[2,43],24:[2,43],32:[2,43],33:[2,43],34:[2,43],38:[2,43],40:[2,43]},{18:[2,45],24:[2,45]},{18:[2,26],24:[2,26],32:[2,26],33:[2,26],34:[2,26],38:[2,26],40:[2,26]},
|
||||
{18:[2,27],24:[2,27],32:[2,27],33:[2,27],34:[2,27],38:[2,27],40:[2,27]},{18:[2,28],24:[2,28],32:[2,28],33:[2,28],34:[2,28],38:[2,28],40:[2,28]},{18:[2,29],24:[2,29],32:[2,29],33:[2,29],34:[2,29],38:[2,29],40:[2,29]},{18:[2,30],24:[2,30],32:[2,30],33:[2,30],34:[2,30],38:[2,30],40:[2,30]},{18:[2,31],24:[2,31],37:67,38:[1,68]},{18:[2,46],24:[2,46],38:[2,46]},{18:[2,39],24:[2,39],32:[2,39],33:[2,39],34:[2,39],38:[2,39],39:[1,69],40:[2,39],42:[2,39]},{18:[2,38],24:[2,38],32:[2,38],33:[2,38],34:[2,38],
|
||||
38:[2,38],40:[2,38],42:[2,38]},{5:[2,22],14:[2,22],15:[2,22],16:[2,22],19:[2,22],20:[2,22],22:[2,22],23:[2,22],25:[2,22]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],25:[2,19]},{18:[2,47],24:[2,47],38:[2,47]},{39:[1,69]},{21:56,30:60,31:70,32:[1,57],33:[1,58],34:[1,59],38:[1,28],40:[1,27],41:26},{18:[2,32],24:[2,32],38:[2,32]}],defaultActions:{3:[2,2],16:[2,1],50:[2,41]},parseError:function(a,b){throw Error(a);},parse:function(a){var b=[0],c=[null],d=[],e=this.table,
|
||||
f="",g=0,m=0,n=0;this.lexer.setInput(a);this.lexer.yy=this.yy;this.yy.lexer=this.lexer;this.yy.parser=this;"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});a=this.lexer.yylloc;d.push(a);var C=this.lexer.options&&this.lexer.options.ranges;"function"===typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var v,w,A,u,B={},F,D;;){A=b[b.length-1];if(this.defaultActions[A])u=this.defaultActions[A];else{if(null===v||"undefined"==typeof v)v=void 0,v=this.lexer.lex()||1,"number"!==
|
||||
typeof v&&(v=this.symbols_[v]||v);u=e[A]&&e[A][v]}if("undefined"===typeof u||!u.length||!u[0]){var O="";if(!n){D=[];for(F in e[A])this.terminals_[F]&&2<F&&D.push("'"+this.terminals_[F]+"'");O=this.lexer.showPosition?"Parse error on line "+(g+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(g+1)+": Unexpected "+(1==v?"end of input":"'"+(this.terminals_[v]||v)+"'");this.parseError(O,{text:this.lexer.match,token:this.terminals_[v]||
|
||||
v,line:this.lexer.yylineno,loc:a,expected:D})}}if(u[0]instanceof Array&&1<u.length)throw Error("Parse Error: multiple actions possible at state: "+A+", token: "+v);switch(u[0]){case 1:b.push(v);c.push(this.lexer.yytext);d.push(this.lexer.yylloc);b.push(u[1]);v=null;w?(v=w,w=null):(m=this.lexer.yyleng,f=this.lexer.yytext,g=this.lexer.yylineno,a=this.lexer.yylloc,0<n&&n--);break;case 2:D=this.productions_[u[1]][1];B.$=c[c.length-D];B._$={first_line:d[d.length-(D||1)].first_line,last_line:d[d.length-
|
||||
1].last_line,first_column:d[d.length-(D||1)].first_column,last_column:d[d.length-1].last_column};C&&(B._$.range=[d[d.length-(D||1)].range[0],d[d.length-1].range[1]]);A=this.performAction.call(B,f,m,g,this.yy,u[1],c,d);if("undefined"!==typeof A)return A;D&&(b=b.slice(0,-2*D),c=c.slice(0,-1*D),d=d.slice(0,-1*D));b.push(this.productions_[u[1]][0]);c.push(B.$);d.push(B._$);u=e[b[b.length-2]][b[b.length-1]];b.push(u);break;case 3:return!0}}return!0}},e=function(){return{EOF:1,parseError:function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,
|
||||
b);else throw Error(a);},setInput:function(a){this._input=a;this._more=this._less=this.done=!1;this.yylineno=this.yyleng=0;this.yytext=this.matched=this.match="";this.conditionStack=["INITIAL"];this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0};this.options.ranges&&(this.yylloc.range=[0,0]);this.offset=0;return this},input:function(){var a=this._input[0];this.yytext+=a;this.yyleng++;this.offset++;this.match+=a;this.matched+=a;a.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):
|
||||
this.yylloc.last_column++;this.options.ranges&&this.yylloc.range[1]++;this._input=this._input.slice(1);return a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input;this.yytext=this.yytext.substr(0,this.yytext.length-b-1);this.offset-=b;a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1);this.matched=this.matched.substr(0,this.matched.length-1);c.length-1&&(this.yylineno-=c.length-1);var d=this.yylloc.range;this.yylloc={first_line:this.yylloc.first_line,
|
||||
last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===a.length?this.yylloc.first_column:0)+a[a.length-c.length].length-c[0].length:this.yylloc.first_column-b};this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-b]);return this},more:function(){this._more=!0;return this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(20<a.length?"...":"")+a.substr(-20).replace(/\n/g,
|
||||
"")},upcomingInput:function(){var a=this.match;20>a.length&&(a+=this._input.substr(0,20-a.length));return(a.substr(0,20)+(20<a.length?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c;this._more||(this.match=this.yytext="");for(var d=this._currentRules(),e=0;e<d.length&&(!(b=this._input.match(this.rules[d[e]]))||a&&!(b[0].length>
|
||||
a[0].length)||(a=b,c=e,this.options.flex));e++);if(a){if(b=a[0].match(/(?:\r\n?|\n).*/g))this.yylineno+=b.length;this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length};this.yytext+=a[0];this.match+=a[0];this.matches=a;this.yyleng=this.yytext.length;this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]);this._more=
|
||||
!1;this._input=this._input.slice(a[0].length);this.matched+=a[0];a=this.performAction.call(this,this.yy,this,d[c],this.conditionStack[this.conditionStack.length-1]);this.done&&this._input&&(this.done=!1);if(a)return a}else return""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!==typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},
|
||||
popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)},options:{},performAction:function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substr(a,b.yyleng-c)}switch(c){case 0:"\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):
|
||||
this.begin("mu");if(b.yytext)return 14;break;case 1:return 14;case 2:return"\\"!==b.yytext.slice(-1)&&this.popState(),"\\"===b.yytext.slice(-1)&&e(0,1),14;case 3:return e(0,4),this.popState(),15;case 4:return 25;case 5:return 16;case 6:return 20;case 7:return 19;case 8:return 19;case 9:return 23;case 10:return 22;case 11:this.popState();this.begin("com");break;case 12:return e(3,5),this.popState(),15;case 13:return 22;case 14:return 39;case 15:return 38;case 16:return 38;case 17:return 42;case 19:return this.popState(),
|
||||
24;case 20:return this.popState(),18;case 21:return b.yytext=e(1,2).replace(/\\"/g,'"'),32;case 22:return b.yytext=e(1,2).replace(/\\'/g,"'"),32;case 23:return 40;case 24:return 34;case 25:return 34;case 26:return 33;case 27:return 38;case 28:return b.yytext=e(1,2),38;case 29:return"INVALID";case 30:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,
|
||||
/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s])))/,/^(?:false(?=([~}\s])))/,/^(?:-?[0-9]+(?=([~}\s])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,
|
||||
25,26,27,28,29,30],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[3],inclusive:!1},INITIAL:{rules:[0,1,30],inclusive:!0}}}}();c.lexer=e;b.prototype=c;c.Parser=b;return new b}()}(),c),b=function(a){function b(a){this.value=a}function c(){}var e=a.COMPILER_REVISION,f=a.REVISION_CHANGES,k=a.log;c.prototype={nameLookup:function(a,b){var d,e;0===a.indexOf("depth")&&(d=!0);e=/^[0-9]+$/.test(b)?a+"["+b+"]":c.isValidJavaScriptVariableName(b)?a+"."+b:a+"['"+b+"']";return d?"("+a+" && "+e+")":e},appendToBuffer:function(a){return this.environment.isSimple?
|
||||
"return "+a+";":{appendToBuffer:!0,content:a,toString:function(){return"buffer += "+a+";"}}},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(a,b,c,d){this.environment=a;this.options=b||{};k("debug",this.environment.disassemble()+"\n\n");this.name=this.environment.name;this.isChild=!!c;this.context=c||{programs:[],environments:[],aliases:{}};this.preamble();this.stackSlot=0;this.stackVars=[];this.registers={list:[]};this.compileStack=[];this.inlineStack=
|
||||
[];this.compileChildren(a,b);a=a.opcodes;this.i=0;for(c=a.length;this.i<c;this.i++)b=a[this.i],"DECLARE"===b.opcode?this[b.name]=b.value:this[b.opcode].apply(this,b.args),b.opcode!==this.stripNext&&(this.stripNext=!1);this.pushSource("");return this.createFunctionContext(d)},preamble:function(){var a=[];if(this.isChild)a.push("");else{var b=this.namespace,c="helpers = this.merge(helpers, "+b+".helpers);";this.environment.usePartial&&(c=c+" partials = this.merge(partials, "+b+".partials);");this.options.data&&
|
||||
(c+=" data = data || {};");a.push(c)}this.environment.isSimple?a.push(""):a.push(", buffer = "+this.initializeBuffer());this.lastContext=0;this.source=a},createFunctionContext:function(a){var b=this.stackVars.concat(this.registers.list);0<b.length&&(this.source[1]=this.source[1]+", "+b.join(", "));if(!this.isChild)for(var c in this.context.aliases)this.context.aliases.hasOwnProperty(c)&&(this.source[1]=this.source[1]+", "+c+"="+this.context.aliases[c]);this.source[1]&&(this.source[1]="var "+this.source[1].substring(2)+
|
||||
";");this.isChild||(this.source[1]+="\n"+this.context.programs.join("\n")+"\n");this.environment.isSimple||this.pushSource("return buffer;");b=this.isChild?["depth0","data"]:["Handlebars","depth0","helpers","partials","data"];c=0;for(var d=this.environment.depths.list.length;c<d;c++)b.push("depth"+this.environment.depths.list[c]);c=this.mergeSource();this.isChild||(c="this.compilerInfo = ["+e+",'"+f[e]+"'];\n"+c);if(a)return b.push(c),Function.apply(this,b);a="function "+(this.name||"")+"("+b.join(",")+
|
||||
") {\n "+c+"}";k("debug",a+"\n\n");return a},mergeSource:function(){for(var a="",b,c=0,d=this.source.length;c<d;c++){var e=this.source[c];e.appendToBuffer?b=b?b+"\n + "+e.content:e.content:(b&&(a+="buffer += "+b+";\n ",b=void 0),a+=e+"\n ")}return a},blockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var a=["depth0"];this.setupParams(0,a);this.replaceStack(function(b){a.splice(1,0,b);return"blockHelperMissing.call("+a.join(", ")+")"})},ambiguousBlockValue:function(){this.context.aliases.blockHelperMissing=
|
||||
"helpers.blockHelperMissing";var a=["depth0"];this.setupParams(0,a);var b=this.topStack();a.splice(1,0,b);a[a.length-1]="options";this.pushSource("if (!"+this.lastHelper+") { "+b+" = blockHelperMissing.call("+a.join(", ")+"); }")},appendContent:function(a){this.pendingContent&&(a=this.pendingContent+a);this.stripNext&&(a=a.replace(/^\s+/,""));this.pendingContent=a},strip:function(){this.pendingContent&&(this.pendingContent=this.pendingContent.replace(/\s+$/,""));this.stripNext="strip"},append:function(){this.flushInline();
|
||||
var a=this.popStack();this.pushSource("if("+a+" || "+a+" === 0) { "+this.appendToBuffer(a)+" }");this.environment.isSimple&&this.pushSource("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){this.context.aliases.escapeExpression="this.escapeExpression";this.pushSource(this.appendToBuffer("escapeExpression("+this.popStack()+")"))},getContext:function(a){this.lastContext!==a&&(this.lastContext=a)},lookupOnContext:function(a){this.push(this.nameLookup("depth"+this.lastContext,a,"context"))},
|
||||
pushContext:function(){this.pushStackLiteral("depth"+this.lastContext)},resolvePossibleLambda:function(){this.context.aliases.functionType='"function"';this.replaceStack(function(a){return"typeof "+a+" === functionType ? "+a+".apply(depth0) : "+a})},lookup:function(a){this.replaceStack(function(b){return b+" == null || "+b+" === false ? "+b+" : "+this.nameLookup(b,a,"context")})},lookupData:function(){this.push("data")},pushStringParam:function(a,b){this.pushStackLiteral("depth"+this.lastContext);
|
||||
this.pushString(b);"string"===typeof a?this.pushString(a):this.pushStackLiteral(a)},emptyHash:function(){this.pushStackLiteral("{}");this.options.stringParams&&(this.register("hashTypes","{}"),this.register("hashContexts","{}"))},pushHash:function(){this.hash={values:[],types:[],contexts:[]}},popHash:function(){var a=this.hash;this.hash=void 0;this.options.stringParams&&(this.register("hashContexts","{"+a.contexts.join(",")+"}"),this.register("hashTypes","{"+a.types.join(",")+"}"));this.push("{\n "+
|
||||
a.values.join(",\n ")+"\n }")},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},push:function(a){this.inlineStack.push(a);return a},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},invokeHelper:function(a,b){this.context.aliases.helperMissing="helpers.helperMissing";var c=this.lastHelper=this.setupHelper(a,b,!0),d=this.nameLookup("depth"+this.lastContext,b,"context");
|
||||
this.push(c.name+" || "+d);this.replaceStack(function(a){return a+" ? "+a+".call("+c.callParams+") : helperMissing.call("+c.helperMissingParams+")"})},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(c.name+".call("+c.callParams+")")},invokeAmbiguous:function(a,b){this.context.aliases.functionType='"function"';this.pushStackLiteral("{}");var c=this.setupHelper(0,a,b),d=this.lastHelper=this.nameLookup("helpers",a,"helper"),e=this.nameLookup("depth"+this.lastContext,a,"context"),
|
||||
f=this.nextStack();this.pushSource("if ("+f+" = "+d+") { "+f+" = "+f+".call("+c.callParams+"); }");this.pushSource("else { "+f+" = "+e+"; "+f+" = typeof "+f+" === functionType ? "+f+".call("+c.callParams+") : "+f+"; }")},invokePartial:function(a){a=[this.nameLookup("partials",a,"partial"),"'"+a+"'",this.popStack(),"helpers","partials"];this.options.data&&a.push("data");this.context.aliases.self="this";this.push("self.invokePartial("+a.join(", ")+")")},assignToHash:function(a){var b=this.popStack(),
|
||||
c,d;this.options.stringParams&&(d=this.popStack(),c=this.popStack());var e=this.hash;c&&e.contexts.push("'"+a+"': "+c);d&&e.types.push("'"+a+"': "+d);e.values.push("'"+a+"': ("+b+")")},compiler:c,compileChildren:function(a,b){for(var c=a.children,d,e,f=0,g=c.length;f<g;f++){d=c[f];e=new this.compiler;var k=this.matchExistingProgram(d);null==k?(this.context.programs.push(""),k=this.context.programs.length,d.index=k,d.name="program"+k,this.context.programs[k]=e.compile(d,b,this.context),this.context.environments[k]=
|
||||
d):(d.index=k,d.name="program"+k)}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;b<c;b++){var d=this.context.environments[b];if(d&&d.equals(a))return b}},programExpression:function(a){this.context.aliases.self="this";if(null==a)return"self.noop";var b=this.environment.children[a];a=b.depths.list;for(var c=[b.index,b.name,"data"],d=0,e=a.length;d<e;d++)b=a[d],1===b?c.push("depth0"):c.push("depth"+(b-1));return(0===a.length?"self.program(":"self.programWithDepth(")+
|
||||
c.join(", ")+")"},register:function(a,b){this.useRegister(a);this.pushSource(a+" = "+b+";")},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},pushStackLiteral:function(a){return this.push(new b(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.quotedString(this.pendingContent))),this.pendingContent=void 0);a&&this.source.push(a)},pushStack:function(a){this.flushInline();var b=this.incrStack();a&&this.pushSource(b+
|
||||
" = "+a+";");this.compileStack.push(b);return b},replaceStack:function(a){var c="",e=this.isInline(),f;e?(f=this.popStack(!0),f instanceof b?f=f.value:(c=this.stackSlot?this.topStackName():this.incrStack(),c="("+this.push(c)+" = "+f+"),",f=this.topStack())):f=this.topStack();a=a.call(this,f);e?((this.inlineStack.length||this.compileStack.length)&&this.popStack(),this.push("("+c+a+")")):(/^stack/.test(f)||(f=this.nextStack()),this.pushSource(f+" = ("+c+a+");"));return f},nextStack:function(){return this.pushStack()},
|
||||
incrStack:function(){this.stackSlot++;this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot);return this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;if(a.length){this.inlineStack=[];for(var c=0,e=a.length;c<e;c++){var f=a[c];f instanceof b?this.compileStack.push(f):this.pushStack(f)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var c=this.isInline(),e=(c?this.inlineStack:
|
||||
this.compileStack).pop();if(!a&&e instanceof b)return e.value;c||this.stackSlot--;return e},topStack:function(a){var c=this.isInline()?this.inlineStack:this.compileStack,c=c[c.length-1];return!a&&c instanceof b?c.value:c},quotedString:function(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},setupHelper:function(a,b,c){var d=[];this.setupParams(a,d,c);a=this.nameLookup("helpers",b,"helper");
|
||||
return{params:d,name:a,callParams:["depth0"].concat(d).join(", "),helperMissingParams:c&&["depth0",this.quotedString(b)].concat(d).join(", ")}},setupParams:function(a,b,c){var d=[],e=[],f=[],g,k;d.push("hash:"+this.popStack());g=this.popStack();if((k=this.popStack())||g)k||(this.context.aliases.self="this",k="self.noop"),g||(this.context.aliases.self="this",g="self.noop"),d.push("inverse:"+g),d.push("fn:"+k);for(k=0;k<a;k++)g=this.popStack(),b.push(g),this.options.stringParams&&(f.push(this.popStack()),
|
||||
e.push(this.popStack()));this.options.stringParams&&(d.push("contexts:["+e.join(",")+"]"),d.push("types:["+f.join(",")+"]"),d.push("hashContexts:hashContexts"),d.push("hashTypes:hashTypes"));this.options.data&&d.push("data:data");d="{"+d.join(",")+"}";c?(this.register("options",d),b.push("options")):b.push(d);return b.join(", ")}};a="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" ");
|
||||
for(var r=c.RESERVED_WORDS={},p=0,t=a.length;p<t;p++)r[a[p]]=!0;c.isValidJavaScriptVariableName=function(a){return!c.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(a)?!0:!1};return c}(b),e=function(a,b,c,e){function f(){}var k={},r=b.parse;k.Compiler=f;f.prototype={compiler:f,disassemble:function(){for(var a=this.opcodes,b,c=[],d,e,f=0,g=a.length;f<g;f++)if(b=a[f],"DECLARE"===b.opcode)c.push("DECLARE "+b.name+"="+b.value);else{d=[];for(var k=0;k<b.args.length;k++)e=b.args[k],"string"===typeof e&&
|
||||
(e='"'+e.replace("\n","\\n")+'"'),d.push(e);c.push(b.opcode+" "+d.join(" "))}return c.join("\n")},equals:function(a){var b=this.opcodes.length;if(a.opcodes.length!==b)return!1;for(var c=0;c<b;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||d.args.length!==e.args.length)return!1;for(var f=0;f<d.args.length;f++)if(d.args[f]!==e.args[f])return!1}b=this.children.length;if(a.children.length!==b)return!1;for(c=0;c<b;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,
|
||||
compile:function(a,b){this.opcodes=[];this.children=[];this.depths={list:[]};this.options=b;var c=this.options.knownHelpers;this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0};if(c)for(var d in c)this.options.knownHelpers[d]=c[d];return this.accept(a)},accept:function(a){var b=a.strip||{};b.left&&this.opcode("strip");a=this[a.type](a);b.right&&this.opcode("strip");return a},program:function(a){a=a.statements;for(var b=0,c=a.length;b<c;b++)this.accept(a[b]);
|
||||
this.isSimple=1===c;this.depths.list=this.depths.list.sort(function(a,b){return a-b});return this},compileProgram:function(a){a=(new this.compiler).compile(a,this.options);var b=this.guid++,c;this.usePartial=this.usePartial||a.usePartial;this.children[b]=a;for(var d=0,e=a.depths.list.length;d<e;d++)c=a.depths.list[d],2>c||this.addDepth(c-1);return b},block:function(a){var b=a.mustache,c=a.program;a=a.inverse;c&&(c=this.compileProgram(c));a&&(a=this.compileProgram(a));var d=this.classifyMustache(b);
|
||||
"helper"===d?this.helperMustache(b,c,a):"simple"===d?(this.simpleMustache(b),this.opcode("pushProgram",c),this.opcode("pushProgram",a),this.opcode("emptyHash"),this.opcode("blockValue")):(this.ambiguousMustache(b,c,a),this.opcode("pushProgram",c),this.opcode("pushProgram",a),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue"));this.opcode("append")},hash:function(a){a=a.pairs;var b,c;this.opcode("pushHash");for(var d=0,e=a.length;d<e;d++)b=a[d],c=b[1],this.options.stringParams?(c.depth&&this.addDepth(c.depth),
|
||||
this.opcode("getContext",c.depth||0),this.opcode("pushStringParam",c.stringModeValue,c.type)):this.accept(c),this.opcode("assignToHash",b[0]);this.opcode("popHash")},partial:function(a){var b=a.partialName;this.usePartial=!0;a.context?this.ID(a.context):this.opcode("push","depth0");this.opcode("invokePartial",b.name);this.opcode("append")},content:function(a){this.opcode("appendContent",a.string)},mustache:function(a){var b=this.options,c=this.classifyMustache(a);"simple"===c?this.simpleMustache(a):
|
||||
"helper"===c?this.helperMustache(a):this.ambiguousMustache(a);a.escaped&&!b.noEscape?this.opcode("appendEscaped"):this.opcode("append")},ambiguousMustache:function(a,b,c){a=a.id;var d=a.parts[0],e=null!=b||null!=c;this.opcode("getContext",a.depth);this.opcode("pushProgram",b);this.opcode("pushProgram",c);this.opcode("invokeAmbiguous",d,e)},simpleMustache:function(a){a=a.id;"DATA"===a.type?this.DATA(a):a.parts.length?this.ID(a):(this.addDepth(a.depth),this.opcode("getContext",a.depth),this.opcode("pushContext"));
|
||||
this.opcode("resolvePossibleLambda")},helperMustache:function(a,b,c){b=this.setupFullMustacheParams(a,b,c);a=a.id.parts[0];if(this.options.knownHelpers[a])this.opcode("invokeKnownHelper",b.length,a);else{if(this.options.knownHelpersOnly)throw Error("You specified knownHelpersOnly, but used the unknown helper "+a);this.opcode("invokeHelper",b.length,a)}},ID:function(a){this.addDepth(a.depth);this.opcode("getContext",a.depth);a.parts[0]?this.opcode("lookupOnContext",a.parts[0]):this.opcode("pushContext");
|
||||
for(var b=1,c=a.parts.length;b<c;b++)this.opcode("lookup",a.parts[b])},DATA:function(b){this.options.data=!0;if(b.id.isScoped||b.id.depth)throw new a("Scoped data references are not supported: "+b.original);this.opcode("lookupData");b=b.id.parts;for(var c=0,d=b.length;c<d;c++)this.opcode("lookup",b[c])},STRING:function(a){this.opcode("pushString",a.string)},INTEGER:function(a){this.opcode("pushLiteral",a.integer)},BOOLEAN:function(a){this.opcode("pushLiteral",a.bool)},comment:function(){},opcode:function(a){this.opcodes.push({opcode:a,
|
||||
args:[].slice.call(arguments,1)})},declare:function(a,b){this.opcodes.push({opcode:"DECLARE",name:a,value:b})},addDepth:function(a){if(isNaN(a))throw Error("EWOT");0===a||this.depths[a]||(this.depths[a]=!0,this.depths.list.push(a))},classifyMustache:function(a){var b=a.isHelper,c=a.eligibleHelper,d=this.options;c&&!b&&(d.knownHelpers[a.id.parts[0]]?b=!0:d.knownHelpersOnly&&(c=!1));return b?"helper":c?"ambiguous":"simple"},pushParams:function(a){for(var b=a.length,c;b--;)if(c=a[b],this.options.stringParams)c.depth&&
|
||||
this.addDepth(c.depth),this.opcode("getContext",c.depth||0),this.opcode("pushStringParam",c.stringModeValue,c.type);else this[c.type](c)},setupMustacheParams:function(a){var b=a.params;this.pushParams(b);a.hash?this.hash(a.hash):this.opcode("emptyHash");return b},setupFullMustacheParams:function(a,b,c){var d=a.params;this.pushParams(d);this.opcode("pushProgram",b);this.opcode("pushProgram",c);a.hash?this.hash(a.hash):this.opcode("emptyHash");return d}};k.precompile=function(b,d){if(null==b||"string"!==
|
||||
typeof b&&b.constructor!==e.ProgramNode)throw new a("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+b);d=d||{};"data"in d||(d.data=!0);var h=r(b),h=(new f).compile(h,d);return(new c).compile(h,d)};k.compile=function(b,d,h){if(null==b||"string"!==typeof b&&b.constructor!==e.ProgramNode)throw new a("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+b);d=d||{};"data"in d||(d.data=!0);var k;return function(a,e){if(!k){var g=r(b),g=(new f).compile(g,
|
||||
d),g=(new c).compile(g,d,void 0,!0);k=h.template(g)}return k.call(this,a,e)}};return k}(e,f,b,c);return function(a,b,c,e,f){var k=c.parser,r=c.parse,p=e.Compiler,t=e.compile,h=e.precompile,s=a.create;c=function(){var a=s();a.compile=function(b,c){return t(b,c,a)};a.precompile=h;a.AST=b;a.Compiler=p;a.JavaScriptCompiler=f;a.Parser=k;a.parse=r;return a};a=c();a.create=c;return a}(a,c,f,e,b)}();(function(a,c,e){a.doLog=function(){if(a.debug)try{console.log.apply(window,arguments)}catch(b){}};a.cacheTable={};a.cache=function(a){return new Cache(a)};a.cache.clear=function(b){b===e?a.cacheTable={}:a.cacheTable[b]={}};a.url_for=function(b,c){switch(c){case "template":return a.config.template_url+b;case e:case "rest":return a.config.base_url+b;default:throw new Exception("Type of url not found: "+c);}};a.defaultFail=function(b,c,e){a.doLog(b,", ",c,", ",e)};a.getJson=function(b,e){e=e||{};var g=
|
||||
e.success||function(){},d=e.fail||a.defaultFail,m=a.url_for(b);a.doLog('Ajax GET Json for "'+m+'"');c.ajax({url:m,type:e.method||"GET",dataType:"json",success:function(b){a.doLog('Success on GET "'+m+'".');a.doLog("Received ",b);g(b)},error:function(b,c,e){a.doLog('Error on GET "'+m+'". ',c,", ",e);d(b,c,e)},beforeSend:function(b){b.setRequestHeader(a.config.auth_header,a.config.token)}})};a.putJson=function(b,e,g){g=g||{};var d=g.success||function(){},m=g.fail||a.defaultFail,n=a.url_for(b);a.doLog('Ajax PUT Json for "'+
|
||||
n+'"');c.ajax({url:n,type:g.method||"PUT",dataType:"json",data:JSON.stringify(e),success:function(b){a.doLog('Success on PUT "'+n+'".');a.doLog("Received ",b);d(b)},error:function(b,c,d){a.doLog('Error on PUT "'+n+'". ',c,", ",d);m(b,c,d)},beforeSend:function(b){b.setRequestHeader(a.config.auth_header,a.config.token)}})};a.deleteJson=function(b,e){e=e||{};var g=e.success||function(){},d=e.fail||a.defaultFail,m=a.url_for(b);a.doLog('Ajax DELETE Json for "'+m+'"');c.ajax({url:m,type:"DELETE",dataType:"json",
|
||||
success:function(b){a.doLog('Success on DELETE "'+m+'".');a.doLog("Received ",b);g(b)},error:function(b,c,e){a.doLog('Error on DELETE "'+m+'". ',c,", ",e);d(b,c,e)},beforeSend:function(b){b.setRequestHeader(a.config.auth_header,a.config.token)}})};a.debug=!0})(window.api=window.api||{},jQuery);function Cache(a){api.cacheTable[a]=api.cacheTable[a]||{};this.name=a;this.cache=api.cacheTable[a]}
|
||||
Cache.prototype={get:function(a,c){void 0===this.cache[a]&&(this.cache[a]=(c||function(){})());return this.cache[a]},put:function(a,c){this.cache[a]=c}};
|
||||
function BasicModelRest(a,c){c=c||{};this.path=a=a||"";this.getPath=c.getPath||a;this.logPath=c.logPath||a;this.putPath=c.putPath||a;this.testPath=c.testPath||a+"/test";this.delPath=c.delPath||a;this.typesPath=c.typesPath||a+"/types";this.guiPath=c.guiPath||a+"/gui";this.tableInfoPath=c.tableInfoPath||a+"/tableinfo";this.cache=api.cache("bmr"+a)}
|
||||
BasicModelRest.prototype={_requestPath:function(a,c){c=c||{};var e=c.success||function(){api.doLog("success function not provided for "+a)},b=c.fail,f=c.cacheKey||a;if("."==a)e({});else if("."!=f&&this.cache.get(f))e(this.cache.get(f));else{var g=this;api.getJson(a,{success:function(a){"."!=f&&g.cache.put(f,a);e(a)},fail:b})}},get:function(a){a=a||{};var c=this.getPath;a.id&&(c+="/"+a.id);return this._requestPath(c,{cacheKey:".",success:a.success,fail:a.fail})},list:function(a,c){return this.get({id:"",
|
||||
success:a,fail:c})},overview:function(a,c){return this.get({id:"overview",success:a,fail:c})},item:function(a,c,e){return this.get({id:a,success:c,fail:e})},search:function(a,c,e,b,f){return this.get({id:a+"/search?type="+encodeURIComponent(c)+"&term="+encodeURIComponent(e),success:b,fail:f})},getLogs:function(a,c,e){return this._requestPath(this.logPath+"/"+a+"/log",{cacheKey:".",success:c,fail:e})},put:function(a,c){c=c||{};var e=this.putPath;c.id&&(e+="/"+c.id);api.putJson(e,a,{success:c.success,
|
||||
fail:c.fail})},create:function(a,c,e){return this.put(a,{success:c,fail:e})},save:function(a,c,e){return this.put(a,{id:a.id,success:c,fail:e})},test:function(a,c,e,b){api.putJson(this.testPath+"/"+a,c,{success:e,fail:b,method:"POST"})},del:function(a,c,e){api.deleteJson(this.delPath+"/"+a,{success:c,fail:e})},types:function(a,c){return this._requestPath(this.typesPath,{cacheKey:this.typesPath,success:a})},gui:function(a,c,e){a=void 0!==a?[this.guiPath,a].join("/"):this.guiPath;return this._requestPath(a,
|
||||
{cacheKey:".",success:c,fail:e})},tableInfo:function(a,c){this._requestPath(this.tableInfoPath,{success:a||function(){api.doLog("success not provided for tableInfo")},fail:c})},detail:function(a,c,e){e=e||{};return new DetailModelRestApi(this,a,c,e)}};function DetailModelRestApi(a,c,e,b){this.options=b;this.base=new BasicModelRest([a.path,c,e].join("/"))}
|
||||
DetailModelRestApi.prototype={get:function(a,c){return this.base.get(a,c)},list:function(a,c){return this.base.list(a,c)},overview:function(a,c){return this.base.overview(a,c)},item:function(a,c,e){return this.base.item(a,c,e)},getLogs:function(a,c,e){return this.base.getLogs(a,c,e)},put:function(a,c){return this.base.put(a,c)},create:function(a,c,e){return this.put(a,{success:c,fail:e})},save:function(a,c,e){return this.put(a,{id:a.id,success:c,fail:e})},test:function(a,c,e,b){return this.base.test(a,
|
||||
c,e,b)},del:function(a,c,e){return this.base.del(a,c,e)},tableInfo:function(a,c){return this.base.tableInfo(a,c)},types:function(a,c){if(this.options.types)this.options.types(a,c);else return this.base.types(a,c)},gui:function(a,c,e){return this.base.gui(a,c,e)}};api.providers=new BasicModelRest("providers");api.authenticators=new BasicModelRest("authenticators");api.osmanagers=new BasicModelRest("osmanagers");api.transports=new BasicModelRest("transports");api.networks=new BasicModelRest("networks");
|
||||
api.locale=new BasicModelRest("locale");api.locale.tableInfo=api.locale.types=void 0;(function(a,c,e){a.tools={base64:function(a){return window.btoa(unescape(encodeURIComponent(a)))}}})(window.api=window.api||{},jQuery);
|
||||
(function(){function a(a){var b=[],c;for(c in a)b.push(a[c].substr(0,3));return b}function c(a,b,c){return e(a,b,c)}function e(a,c,k,l){l=l||{};c&&!f(c)&&(k=c,c=void 0);c=c||new Date;k=k||p;k.formats=k.formats||{};var r=c.getTime();if(l.utc||"number"==typeof l.timezone)c=b(c);"number"==typeof l.timezone&&(c=new Date(c.getTime()+6E4*l.timezone));return a.replace(/%([-_0]?.)/g,function(a,b){var f;if(2==b.length){f=b[0];if("-"==f)f="";else if("_"==f)f=" ";else if("0"==f)f="0";else return a;b=b[1]}switch(b){case "A":return k.days[c.getDay()];
|
||||
case "a":return k.shortDays[c.getDay()];case "B":return k.months[c.getMonth()];case "b":return k.shortMonths[c.getMonth()];case "C":return g(Math.floor(c.getFullYear()/100),f);case "D":return e(k.formats.D||"%m/%d/%y",c,k);case "d":return g(c.getDate(),f);case "e":return c.getDate();case "F":return e(k.formats.F||"%Y-%m-%d",c,k);case "H":return g(c.getHours(),f);case "h":return k.shortMonths[c.getMonth()];case "I":return g(d(c),f);case "j":return f=new Date(c.getFullYear(),0,1),f=Math.ceil((c.getTime()-
|
||||
f.getTime())/864E5),g(f,3);case "k":return g(c.getHours(),null===f?" ":f);case "L":return g(Math.floor(r%1E3),3);case "l":return g(d(c),null===f?" ":f);case "M":return g(c.getMinutes(),f);case "m":return g(c.getMonth()+1,f);case "n":return"\n";case "o":return String(c.getDate())+m(c.getDate());case "P":return 12>c.getHours()?k.am:k.pm;case "p":return 12>c.getHours()?k.AM:k.PM;case "R":return e(k.formats.R||"%H:%M",c,k);case "r":return e(k.formats.r||"%I:%M:%S %p",c,k);case "S":return g(c.getSeconds(),
|
||||
f);case "s":return Math.floor(r/1E3);case "T":return e(k.formats.T||"%H:%M:%S",c,k);case "t":return"\t";case "U":return g(n(c,"sunday"),f);case "u":return f=c.getDay(),0===f?7:f;case "v":return e(k.formats.v||"%e-%b-%Y",c,k);case "W":return g(n(c,"monday"),f);case "w":return c.getDay();case "Y":return c.getFullYear();case "y":return f=String(c.getFullYear()),f.slice(f.length-2);case "Z":return l.utc?"GMT":(f=c.toString().match(/\((\w+)\)/))&&f[1]||"";case "z":if(l.utc)return"+0000";f="number"==typeof l.timezone?
|
||||
l.timezone:-c.getTimezoneOffset();return(0>f?"-":"+")+g(Math.abs(f/60))+g(f%60);default:return b}})}function b(a){var b=6E4*(a.getTimezoneOffset()||0);return new Date(a.getTime()+b)}function f(a){for(var b=0,c=t.length,b=0;b<c;++b)if("function"!=typeof a[t[b]])return!1;return!0}function g(a,b,c){"number"===typeof b&&(c=b,b="0");null===b&&(b="0");c=c||2;a=String(a);if(b)for(;a.length<c;)a=b+a;return a}function d(a){a=a.getHours();0===a?a=12:12<a&&(a-=12);return a}function m(a){var b=a%10;a%=100;if(11<=
|
||||
a&&13>=a||0===b||4<=b)return"th";switch(b){case 1:return"st";case 2:return"nd";case 3:return"rd"}}function n(a,b){b=b||"sunday";var c=a.getDay();"monday"==b&&(0===c?c=6:c--);var d=new Date(a.getFullYear(),0,1);return Math.floor(((a-d)/864E5+7-c)/7)}var l=api.tools,k=[gettext("Sunday"),gettext("Monday"),gettext("Tuesday"),gettext("Wednesday"),gettext("Thursday"),gettext("Friday"),gettext("Saturday")],r=[gettext("January"),gettext("February"),gettext("March"),gettext("April"),gettext("May"),gettext("June"),
|
||||
gettext("July"),gettext("August"),gettext("September"),gettext("October"),gettext("November"),gettext("December")],p={days:k,shortDays:a(k),months:r,shortMonths:a(r),AM:"AM",PM:"PM",am:"am",pm:"pm"};l.djangoFormat=function(a){return a.replace(/./g,function(a){switch(a){case "a":case "A":return"%p";case "b":case "d":case "m":case "w":case "W":case "y":case "Y":return"%"+a;case "c":return"%FT%TZ";case "D":return"%a";case "e":return"%z";case "f":return"%I:%M";case "F":return"%F";case "h":case "g":return"%I";
|
||||
case "H":case "G":return"%H";case "i":return"%M";case "I":return"";case "j":return"%d";case "l":return"%A";case "L":return"";case "M":return"%b";case "n":return"%m";case "N":return"%b";case "o":return"%W";case "O":return"%z";case "P":return"%R %p";case "r":return"%a, %d %b %Y %T %z";case "s":return"%S";case "S":return"";case "t":return"";case "T":return"%Z";case "u":return"0";case "U":return"";case "z":return"%j";case "Z":return"z";default:return a}})};l.strftime=c;l.strftimeTZ=c.strftimeTZ=function(a,
|
||||
b,c,d){"number"==typeof c&&null===d&&(d=c,c=void 0);return e(a,b,c,{timezone:d})};l.strftimeUTC=c.strftimeUTC=function(a,b,c){return e(a,b,c,{utc:!0})};l.localizedStrftime=c.localizedStrftime=function(a){return function(b,c,d){return e(b,c,a)}};var t="getTime getTimezoneOffset getDay getDate getMonth getFullYear getYear getHours getMinutes getSeconds".split(" ")})();(function(a,c){Handlebars.registerHelper("ifequals",function(a,b,c){return a==b?c.fn(this):c.inverse(this)});Handlebars.registerHelper("ifbelongs",function(a,b,f){gui.doLog("belongs",a,b);return-1!=c.inArray(a,b)?(gui.doLog("belongs is true"),f.fn(this)):f.inverse(this)});Handlebars.registerHelper("set_counter",function(a,b,c){c.data["_counter_"+a]=b});Handlebars.registerHelper("get_counter",function(a,b){return b.data["_counter_"+a]});Handlebars.registerHelper("inc_counter",function(a,b){b.data["_counter_"+
|
||||
a]+=1});Handlebars.registerHelper("javascript",function(a){return new Handlebars.SafeString("<script>"+a.fn(this)+"\x3c/script>")});Handlebars.registerHelper("truncatechars",function(a,b){var c=b.toString();return c.length>a?c.substring(0,a-3)+"...":c});a.templates={};a.templates.cache=new a.cache("tmpls");a.templates.get=function(e,b){var f=this;b=b||function(){};a.doLog("Getting template "+e);if(-1==e.indexOf("?")){if(f.cache.get(e+"-------")){b(f.cache.get(e));return}if(document.getElementById("tmpl_"+
|
||||
e)){f.cache.put(e,"tmpl_"+e);b("tmpl_"+e);return}}c.ajax({url:a.url_for(e,"template"),type:"GET",dataType:"text",success:function(c){var d="tmpl_"+e;f.cache.put("_"+d,f.evaluate(c));f.cache.put(e,d);a.doLog('Success getting template "'+e+'".');b(d)},fail:function(b,c,e){a.doLog(b);a.doLog(c);apid.doLog(e)}})};a.templates.evaluate=function(c,b){var f;/\W/.test(c)||(f=this.cache.get("_"+c),void 0===f&&(f=a.templates.evaluate(document.getElementById(c).innerHTML),this.cache.put("_"+c,f)));f=f||Handlebars.compile(c);
|
||||
return b?f(b):f}})(window.api=window.api||{},jQuery);(function(a,c,e){a.cell=function(a,c,g){g=g!==e?' ss:StyleID="'+g+'"':"";return"<Cell"+g+'><Data ss:Type="'+(c||"String")+'">'+a+"</Data></Cell>"};a.row=function(a){return"<Row>"+a+"</Row>"}})(api.spreadsheet=api.spreadsheet||{},jQuery);(function(a,c,e){a.doLog=function(){if(a.debug)try{console.log.apply(window,arguments)}catch(b){}};a.config=a.config||{};a.config.dataTablesLanguage={sLengthMenu:gettext("_MENU_ records per page"),sZeroRecords:gettext("Empty"),sInfo:gettext("Records _START_ to _END_ of _TOTAL_"),sInfoEmpty:gettext("No records"),sInfoFiltered:gettext("(filtered from _MAX_ total records)"),sProcessing:gettext("Please wait, processing"),sSearch:gettext("Filter"),sInfoThousands:django.formats.THOUSAND_SEPARATOR,oPaginate:{sFirst:gettext("First"),
|
||||
sLast:gettext("Last"),sNext:"",sPrevious:""}};a.config.dataTableButtons={"new":{text:'<span class="fa fa-pencil"></span> <span class="label-tbl-button">'+gettext("New")+"</span>",css:"btn btn3d btn3d-primary btn3d-tables"},edit:{text:'<span class="fa fa-edit"></span> <span class="label-tbl-button">'+gettext("Edit")+"</span>",css:"btn disabled btn3d-default btn3d btn3d-tables"},"delete":{text:'<span class="fa fa-trash-o"></span> <span class="label-tbl-button">'+gettext("Delete")+"</span>",css:"btn disabled btn3d-default btn3d btn3d-tables"},
|
||||
xls:{text:'<span class="fa fa-save"></span> <span class="label-tbl-button">'+gettext("Xls")+"</span>",css:"btn btn3d-info btn3d btn3d-tables"}};a.genRamdonId=function(a){return(a||"")+Math.random().toString().split(".")[1]};a.table=function(a,c,e){e=e||{};var d="panel-"+c;return{text:api.templates.evaluate("tmpl_comp_table",{panelId:d,icon:e.icon||"table",size:e.size||12,title:a,table_id:c}),panelId:d,refreshSelector:"#"+d+" span.fa-refresh"}};a.breadcrumbs=function(a){a=a.split("/");var e=a.pop(),
|
||||
g="";c.each(a,function(a,b){g+='<li><a href="#">'+b+"</a></li>"});g+='<li class="active">'+e+"</li>";return'<div class="row"><div class="col-lg-12"><ol class="breadcrumb">'+g+"</ol></div></div>"};a.modal=function(a,c,e,d){d=d||{};return api.templates.evaluate("tmpl_comp_modal",{id:a,title:c,content:e,footer:d.footer,button1:d.closeButton,button2:d.actionButton})};a.launchModal=function(b,e,g){g=g||{};var d=a.genRamdonId("modal-");a.appendToWorkspace(a.modal(d,b,e,g));d="#"+d;c(d).modal().on("hidden.bs.modal",
|
||||
function(){c(d).remove()});return d};a.notify=function(b,c){a.launchModal('<b class="text-'+c+'">'+gettext("Message")+"</b>",'<span class="text-'+c+'">'+b+"</span>",{actionButton:" "})};a.failRequestModalFnc=function(b){return function(c,e,d){a.tools.unblockUI();a.launchModal('<b class="text-danger">'+b+"</b>",c.responseText,{actionButton:" "})}};a.clearWorkspace=function(){c("#content").empty();c("#minimized").empty()};a.appendToWorkspace=function(a){c(a).appendTo("#content")};a.deployed_services=
|
||||
function(){a.clearWorkspace();a.appendToWorkspace(a.breadcrumbs(gettext("Deployed services")))};a.cleanup=function(){a.doLog("Cleaning up things");c(".DTTT_dropdown").remove();TableTools._aInstances=[];TableTools._aListeners=[];c.each(c.fn.dataTable.fnTables(),function(a,e){var g=c(e).dataTable();g.fnClearTable();g.fnDestroy()})};a.setLinksEvents=function(){c.each([{id:"lnk-dashboard",exec:a.dashboard.link,cleanup:!0},{id:"lnk-service_providers",exec:a.providers.link,cleanup:!0},{id:"lnk-authenticators",
|
||||
exec:a.authenticators.link,cleanup:!0},{id:"lnk-osmanagers",exec:a.osmanagers.link,cleanup:!0},{id:"lnk-connectivity",exec:a.connectivity.link,cleanup:!0},{id:"lnk-deployed_services",exec:a.deployed_services,cleanup:!0},{id:"lnk-clear_cache",exec:a.clear_cache.link,cleanup:!1}],function(b,e){a.doLog("Adding "+e.id);c("."+e.id).unbind("click").click(function(b){b.preventDefault();"none"!=c(".navbar-toggle").css("display")&&c(".navbar-toggle").trigger("click");e.cleanup&&a.cleanup();c("html, body").scrollTop(0);
|
||||
e.exec(b)})})};a.init=function(){c.extend(c.validator.messages,{required:gettext("This field is required."),remote:gettext("Please fix this field."),email:gettext("Please enter a valid email address."),url:gettext("Please enter a valid URL."),date:gettext("Please enter a valid date."),dateISO:gettext("Please enter a valid date (ISO)."),number:gettext("Please enter a valid number."),digits:gettext("Please enter only digits."),creditcard:gettext("Please enter a valid credit card number."),equalTo:gettext("Please enter the same value again."),
|
||||
maxlength:c.validator.format(gettext("Please enter no more than {0} characters.")),minlength:c.validator.format(gettext("Please enter at least {0} characters.")),rangelength:c.validator.format(gettext("Please enter a value between {0} and {1} characters long.")),range:c.validator.format(gettext("Please enter a value between {0} and {1}.")),max:c.validator.format(gettext("Please enter a value less than or equal to {0}.")),min:c.validator.format(gettext("Please enter a value greater than or equal to {0}."))});
|
||||
c.blockUI.defaults.baseZ=2E3;a.setLinksEvents();a.dashboard.link()};a.methods={};a.methods.typedTestButton=function(b,c,e,d){return[{text:c,css:e,action:function(c,e,f){c=a.forms.read(e);a.doLog("Fields: ",c);b.test(d,c,function(b){a.launchModal(gettext("Test result"),b,{actionButton:" "})},a.failRequestModalFnc(gettext("Test error")))}}]};a.methods.typedEdit=function(b,c,e,d){d=d||{};return function(m,n,l,k){a.tools.blockUI();b.rest.gui(m.type,function(l){var n;d.testButton&&(n=a.methods.typedTestButton(b.rest,
|
||||
d.testButton.text,d.testButton.css,m.type));var t=d.guiProcessor?d.guiProcessor(l):l;b.rest.item(m.id,function(h){a.tools.unblockUI();a.forms.launchModal({title:c+" <b>"+m.name+"</b>",fields:t,item:h,buttons:n,success:function(c,f){var h=a.forms.read(c);h.data_type=m.type;h=d.fieldsProcessor?d.fieldsProcessor(h):h;b.rest.save(h,function(b){f();k();a.notify(gettext("Edition successfully done"),"success")},a.failRequestModalFnc(e,!0))}})})},a.failRequestModalFnc(e,!0))}};a.methods.typedNew=function(b,
|
||||
c,g,d){d=d||{};return function(m,n,l){a.tools.blockUI();b.rest.gui(m,function(k){a.tools.unblockUI();var n;d.testButton&&(n=a.methods.typedTestButton(b.rest,d.testButton.text,d.testButton.css,m));k=d.guiProcessor?d.guiProcessor(k):k;a.forms.launchModal({title:c+" "+gettext("of type")+" <b>"+b.types[m].name+"</b>",fields:k,item:e,buttons:n,success:function(c,e){var f=a.forms.read(c);f.data_type=m;f=d.fieldsProcessor?d.fieldsProcessor(f):f;b.rest.create(f,function(b){e();l();a.notify(gettext("Creation successfully done"),
|
||||
"success")},a.failRequestModalFnc(g,!0))}})},a.failRequestModalFnc(g,!0))}};a.methods.del=function(b,e,g){return function(d,m,n,l){m=gettext("Are you sure do you want to delete ")+"<b>"+d.name+"</b>";var k=a.launchModal(e,m,{actionButton:'<button type="button" class="btn btn-danger button-accept">'+gettext("Delete")+"</button>"});c(k+" .button-accept").click(function(){c(k).modal("hide");b.rest.del(d.id,function(){l();a.notify(gettext("Item deleted"),"success")},a.failRequestModalFnc(g))})}};a.debug=
|
||||
!0})(window.gui=window.gui||{},jQuery);(function(a,c,e){a.tools={blockUI:function(a){a=a||'<h1><span class="fa fa-spinner fa-spin"></span> '+gettext("Just a moment...")+"</h1>";c.blockUI({message:a})},unblockUI:function(){c.unblockUI();c(".DTTT_collection_background").remove()},fix3dButtons:function(a){a=(a||"")+" .btn3d";console.log(a);c.each(c(a),function(a,b){if(c._data(b,"events")!==e){var d=c(this),m=[];c.each(c._data(b,"events").click,function(a,b){m.push(b)});d.unbind("click");d.mousedown(function(a){c("body").mouseup(function(b){c(this).unbind("mouseup");
|
||||
var e=a.pageX-b.pageX;b=a.pageY-b.pageY;256>e*e+b*b&&(c.each(m,function(a,b){d.click(b.handler)}),d.click(),d.unbind("click"))})})}})},applyCustoms:function(b){c(b+" .make-switch").bootstrapSwitch();c(b+" .selectpicker").selectpicker();/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)&&c(b+" .selectpicker").selectpicker("mobile");c(b+' [data-toggle="tooltip"]').tooltip({delay:{show:1E3,hide:100},placement:"auto right"});a.tools.fix3dButtons(b)},renderDate:function(a){return function(c,
|
||||
e,d){return api.tools.strftime(a,new Date(1E3*c))}},renderLogLovel:function(){var a={1E4:"OTHER",2E4:"DEBUG",3E4:"INFO",4E4:"WARN",5E4:"ERROR",6E4:"FATAL"};return function(c,e,d){return a[c]||"OTHER"}}}})(window.gui=window.gui||{},jQuery);(function(a,c,e){a.forms={};a.forms.callback=function(a,e,g,d){a="gui/callback/"+e;var m=[];c.each(g,function(a,b){m.push(b.name+"="+encodeURIComponent(b.value))});a=a+"?"+m.join("&");api.getJson(a,{success:d})};a.forms.fieldsToHtml=function(b,f,g){var d="",m=[],n={};c.each(b,function(b,k){if(k.gui!==e){"text"==k.gui.type&&k.gui.multiline&&(k.gui.type="textbox");var r=f[k.name]||k.gui.value||k.gui.defvalue;if("multichoice"==k.gui.type){var p=[];c.each(r,function(a,b){p.push(b.id)});r=p}n[k.name]=
|
||||
r;d+=api.templates.evaluate("tmpl_fld_"+k.gui.type,{value:r,values:k.gui.values,label:k.gui.label,length:k.gui.length,multiline:k.gui.multiline,readonly:g?k.gui.rdonly:!1,required:k.gui.required,tooltip:k.gui.tooltip,type:k.gui.type,name:k.name,css:"modal_field_data"});k.gui.fills&&(a.doLog("This field has a filler"),m.push({name:k.name,callbackName:k.gui.fills.callbackName,parameters:k.gui.fills.parameters}))}});return{html:d,fillers:m,originalValues:n}};a.forms.fromFields=function(b,f){var g=f!==
|
||||
e;f=f||{id:""};var d='<form class="form-horizontal" role="form"><input type="hidden" name="id" class="modal_field_data" value="'+f.id+'">',m=[],n={};if(b.tabs){var l="tab-"+Math.random().toString().split(".")[1],k=[],r=[],p=" active in";c.each(b.tabs,function(b,d){var e=a.forms.fieldsToHtml(d.fields,f);r.push('<div class="tab-pane fade'+p+'" id="'+l+b+'">'+e.html+"</div>");k.push('<li><a href="#'+l+b+'" data-toggle="tab">'+d.title+"</a></li>");p="";m=m.concat(e.fillers);c.extend(n,e.originalValues);
|
||||
a.doLog("Fillers:",e.fillers)});d+='<ul class="nav nav-tabs">'+k.join("\n")+'</ul><div class="tab-content">'+r.join("\n")+"</div>"}else g=a.forms.fieldsToHtml(b,f,g),d+=g.html,m=m.concat(g.fillers),c.extend(n,g.originalValues);d+="</form>";a.doLog("Original values: ",n);return{html:d,init:function(b){a.doLog(b,m);var d=function(d){return function(){a.doLog("Onchange invoked for ",d);var e=[];c.each(d.parameters,function(a,d){var f=c(b+' [name="'+d+'"]').val();e.push({name:d,value:f})});a.forms.callback(b,
|
||||
d.callbackName,e,function(a){c.each(a,function(a,d){var e=c(b+' [name="'+d.name+'"]');e.empty();c.each(d.values,function(a,b){e.append('<option value="'+b.id+'">'+b.text+"</option>")});e.val(n[d.name]);e.hasClass("selectpicker")&&e.selectpicker("refresh");e.trigger("change")})})}};c.each(m,function(a,e){c(b+' [name="'+e.name+'"]').on("change",d(e))});m.length&&c(b+' [name="'+m[0].name+'"]').trigger("change")}}};a.forms.read=function(b){var e={};c(b+" .modal_field_data").each(function(a,b){var m=c(b);
|
||||
if(m.attr("name")){var n=m.attr("name");"checkbox"==m.attr("type")?e[n]=m.is(":checked"):(e[n]=m.val(),null===e[n]&&m.is("select")&&(e[n]=[]))}});a.doLog(e);return e};a.forms.launchModal=function(b,e){b=b||{};var g="modal-"+Math.random().toString().split(".")[1],d=a.forms.fromFields(b.fields,b.item),m="",n=[];b.buttons&&c.each(b.buttons,function(a,b){var c=g+"-footer-"+a,d=b.css||"btn-default";n.push({id:"#"+c,action:b.action});m+='<button id="'+c+'" type="button" class="pull-left btn '+d+'">'+b.text+
|
||||
"</button>"});a.appendToWorkspace(a.modal(g,b.title,d.html,{footer:m}));var g="#"+g,l=g+" form",k=function(){c(g).modal("hide")};d.init&&d.init(g);c.each(n,function(a,b){if(b.action)c(b.id).on("click",function(a){b.action(a,l,k)})});var r=c(g+" form");c(g+" .make-switch").bootstrapSwitch();c(g+" .selectpicker").selectpicker();/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)&&c(g+" .selectpicker").selectpicker("mobile");c(g+' [data-toggle="tooltip"]').tooltip({delay:{show:1E3,
|
||||
hide:100},placement:"auto right"});r.validate({debug:!0,errorClass:"text-danger",validClass:"has-success",highlight:function(a){c(a).closest(".form-group").addClass("has-error")},success:function(a){c(a).closest(".form-group").removeClass("has-error");c(a).remove()}});c(g+" .button-accept").click(function(){r.valid()&&(b.success?b.success(l,k):k())});c(g).modal({keyboard:!1}).on("hidden.bs.modal",function(){c(g).remove()})};a.forms.guiField=function(a,c,g,d,m,n,l,k,r,p){k=k!==e?k:0;return{name:a,
|
||||
gui:{defvalue:m,value:m,values:n,label:g,length:l||128,multiline:k,rdonly:r||!1,required:p||!1,tooltip:d,type:c}}}})(window.gui=window.gui||{},jQuery);function BasicGuiElement(a){this.name=a}function GuiElement(a,c,e){this.rest=a;this.name=c;this.types={};this.init()}
|
||||
GuiElement.prototype={init:function(){gui.doLog("Initializing "+this.name);var a=this;this.rest.types(function(c){var e="",b=0!==$("#gui-style-"+a.name).length;$.each(c,function(c,g){var d=a.name+"-"+g.type;a.types[g.type]=g;a.types[g.type].css=d;gui.doLog("Creating style for "+d);b||(e+="."+d+" { display:inline-block; background: url(data:image/png;base64,"+g.icon+"); width: 16px; height: 16px; vertical-align: middle; } ")});""!==e&&(e='<style id="gui-style-'+a.name+'" media="screen">'+e+"</style>",
|
||||
$(e).appendTo("head"))})},table:function(a){a=a||{};gui.doLog("Composing table for "+this.name);var c=this.name+"-table",e=this,b=function(a){return""===a?"-":a},f=function(a,c,d){return"display"==c?(e.types[d.type]=e.types[d.type]||{},'<span class="'+(e.types[d.type].css||"fa fa-asterisk")+'"></span> '+b(a)):b(a)},g=function(a){return function(c,d,e){return"display"==d?'<span class="'+a+'"></span> '+b(c):b(c)}},d=function(a){return function(c,d,e){return"display"==d?'<span class="'+a[e.type]+'"></span> '+
|
||||
b(c):b(c)}},m=function(a){return function(c,d,e){return a[c]||b("")}};this.rest.tableInfo(function(n){var l=n.title,k=[];$.each(n.fields,function(a,c){for(var e in c){var h=c[e],l={mData:e};l.sTitle=h.title;l.mRender=b;h.width&&(l.sWidth=h.width);l.bVisible=void 0===h.visible?!0:h.visible;void 0!==h.sortable&&(l.bSortable=h.sortable);void 0!==h.searchable&&(l.bSearchable=h.searchable);if(h.type&&l.bVisible)switch(h.type){case "date":l.sType="date";l.mRender=gui.tools.renderDate(api.tools.djangoFormat(get_format("SHORT_DATE_FORMAT")));
|
||||
break;case "datetime":l.sType="date";l.mRender=gui.tools.renderDate(api.tools.djangoFormat(get_format("SHORT_DATETIME_FORMAT")));break;case "time":l.mRender=gui.tools.renderDate(api.tools.djangoFormat(get_format("TIME_FORMAT")));break;case "iconType":l.mRender=f;break;case "icon":void 0!==h.icon&&(l.mRender=g(h.icon));case "icon_dict":void 0!==h.icon_dict&&(l.mRender=d(h.icon_dict));break;case "dict":void 0!==h.dict&&(l.mRender=m(h.dict));break;default:l.sType=h.type}k.push(l)}});$("#style-"+c).remove();
|
||||
$(api.templates.evaluate("tmpl_comp_responsive_table",{tableId:c,columns:k})).appendTo("head");e.rest.overview(function(b){var d=gui.table(l,c);void 0===a.container?gui.appendToWorkspace('<div class="row"><div class="col-lg-12">'+d.text+"</div></div>"):($("#"+a.container).empty(),$("#"+a.container).append(d.text));var f=a.onRefresh||function(){},g=function(){var a=$("#"+c).dataTable();TableTools.fnGetInstance(c).fnSelectNone();gui.tools.blockUI();e.rest.overview(function(b){setTimeout(function(){a.fnClearTable();
|
||||
a.fnAddData(b);f(e);gui.tools.unblockUI()},0)});return!1},m=[];if(a.buttons){var n=function(a,b,d){var e=a||function(a,b,c){gui.doLog("Default handler called for ",b)};return function(a){var f=$("#"+c).dataTable(),k=this.fnGetSelectedData()[0];setTimeout(function(){d?e(b,f,g):e(k,b,f,g)},0)}},x=a.onCheck||function(){return!0},C=function(a,b,c){b=this.fnGetSelectedData();1==b.length&&x("edit",b)?$(a).removeClass("disabled").addClass("btn3d-success"):$(a).removeClass("btn3d-success").addClass("disabled")},
|
||||
v=function(a,b,c){b=this.fnGetSelectedData();1==b.length&&x("delete",b)?$(a).removeClass("disabled").addClass("btn3d-warning"):$(a).removeClass("btn3d-warning").addClass("disabled")};$.each(a.buttons,function(d,f){var p;switch(f){case "new":if(0!==Object.keys(e.types).length){p=gui.genRamdonId("dd-");var u=[];$.each(e.types,function(a,b){u.push({type:a,css:b.css,name:b.name,description:b.description})});u=u.sort(function(a,b){return a.name.localeCompare(b.name)});p={sExtends:"div",sButtonText:api.templates.evaluate("tmpl_comp_dropdown",
|
||||
{label:gui.config.dataTableButtons["new"].text,css:gui.config.dataTableButtons["new"].css,id:p,tableId:c,columns:k,menu:u})}}else p={sExtends:"text",sButtonText:gui.config.dataTableButtons["new"].text,sButtonClass:gui.config.dataTableButtons["new"].css,fnClick:n(a.onNew,"new",!0)};break;case "edit":p={sExtends:"text",sButtonText:gui.config.dataTableButtons.edit.text,fnSelect:C,fnClick:n(a.onEdit,"edit"),sButtonClass:gui.config.dataTableButtons.edit.css};break;case "delete":p={sExtends:"text",sButtonText:gui.config.dataTableButtons["delete"].text,
|
||||
fnSelect:v,fnClick:n(a.onDelete,"delete"),sButtonClass:gui.config.dataTableButtons["delete"].css};break;case "refresh":p={sExtends:"text",sButtonText:gui.config.dataTableButtons.refresh.text,fnClick:g,sButtonClass:gui.config.dataTableButtons.refresh.css};break;case "xls":p={sExtends:"text",sButtonText:gui.config.dataTableButtons.xls.text,fnClick:function(){api.templates.get("spreadsheet",function(a){var c=[],d=[];$.each(k,function(a,b){!1!==b.bVisible&&c.push(api.spreadsheet.cell(b.sTitle,"String",
|
||||
"s21"))});d.push(api.spreadsheet.row(c));$.each(b,function(a,b){var c=[];$.each(k,function(a,d){!1!==d.bVisible&&c.push(api.spreadsheet.cell(b[d.mData],"numeric"==d.sType?"Number":"String"))});d.push(api.spreadsheet.row(c))});var e={creation_date:(new Date).toISOString(),worksheet:l,columns_count:c.length,rows_count:d.length,rows:d.join("\n")};gui.doLog(e);setTimeout(function(){saveAs(new Blob([api.templates.evaluate(a,e)],{type:"application/vnd.ms-excel"}),l+".xls")},20)})},sButtonClass:gui.config.dataTableButtons.xls.css}}p&&
|
||||
m.push(p)})}var w={aButtons:m,sRowSelect:a.rowSelect||"none"};if(a.onRowSelect){var A=a.onRowSelect;w.fnRowSelected=function(){A(this.fnGetSelectedData(),$("#"+c).dataTable(),e)}}if(a.onRowDeselect){var u=a.onRowDeselect;w.fnRowDeselected=function(){u(this.fnGetSelectedData(),$("#"+c).dataTable(),e)}}$("#"+c).dataTable({aaData:b,aoColumns:k,oLanguage:gui.config.dataTablesLanguage,oTableTools:w,sDom:"<'row'<'col-xs-8'T><'col-xs-4'f>r>t<'row'<'col-xs-5'i><'col-xs-7'p>>",bDeferRender:a.deferedRender||
|
||||
!1});gui.tools.fix3dButtons("#"+c+"_wrapper .btn-group-3d");$("#"+c+"_filter input").addClass("form-control");$(d.refreshSelector).click(g);$("#"+d.panelId+' [data-toggle="tooltip"]').tooltip({container:"body",delay:{show:1E3,hide:100},placement:"auto right"});if(a.onNew)$("#"+d.panelId+" [data-type]").on("click",function(b){b.preventDefault();var d=$("#"+c).dataTable(),e=$(this).attr("data-type");setTimeout(function(){a.onNew(e,d,g)},0)});!0===a.scrollToTable&&(d=$("#"+c).offset().top,$("html, body").scrollTop(d));
|
||||
if(a.onLoad)a.onLoad(e)})});return"#"+c},logTable:function(a,c){c=c||{};gui.doLog("Composing log for "+this.name);var e=this.name+"-table-log",b=this,f=function(){var c=$("#"+e).dataTable();gui.tools.blockUI();b.rest.getLogs(a,function(a){setTimeout(function(){c.fnClearTable();c.fnAddData(a);gui.tools.unblockUI()},0)});return!1},g=[{mData:"date",sTitle:gettext("Date"),mRender:gui.tools.renderDate(api.tools.djangoFormat(get_format("SHORT_DATE_FORMAT")+" "+get_format("TIME_FORMAT"))),bSortable:!0,bSearchable:!0},
|
||||
{mData:"level",sTitle:gettext("level"),mRender:gui.tools.renderLogLovel(),sWidth:"5em",bSortable:!0,bSearchable:!0},{mData:"source",sTitle:gettext("source"),sWidth:"5em",bSortable:!0,bSearchable:!0},{mData:"message",sTitle:gettext("message"),bSortable:!0,bSearchable:!0}],d=gui.table(c.title||gettext("Logs"),e);void 0===c.container?gui.appendToWorkspace('<div class="row"><div class="col-lg-12">'+d.text+"</div></div>"):($("#"+c.container).empty(),$("#"+c.container).append(d.text));$("#style-"+e).remove();
|
||||
$(api.templates.evaluate("tmpl_comp_responsive_table",{tableId:e,columns:g})).appendTo("head");b.rest.getLogs(a,function(a){gui.doLog(a);$("#"+e).dataTable({aaData:a,oTableTools:{aButtons:[]},aoColumns:g,oLanguage:gui.config.dataTablesLanguage,sDom:"<'row'<'col-xs-8'T><'col-xs-4'f>r>t<'row'<'col-xs-5'i><'col-xs-7'p>>",bDeferRender:c.deferedRender||!1});$("#"+e+"_filter input").addClass("form-control");$(d.refreshSelector).click(f);if(c.onLoad)c.onLoad(b)});return"#"+e}};gui.dashboard=new BasicGuiElement("Dashboard");gui.dashboard.link=function(a){gui.clearWorkspace();api.templates.get("dashboard",function(a){gui.doLog("enter dashboard");gui.appendToWorkspace(api.templates.evaluate(a,{}));gui.setLinksEvents();$.each($(".btn3d"),function(){console.log(this);var a=0;$(this).click(function(){a+=1;$(this).text($(this).text().split(" ")[0]+" "+a)})});gui.tools.fix3dButtons("#test")})};gui.clear_cache=new BasicGuiElement("Clear cache");
|
||||
gui.clear_cache.link=function(){api.getJson("cache/flush",{success:function(){gui.launchModal(gettext("Cache"),gettext("Cache has been flushed"),{actionButton:" "})}})};gui.providers=new GuiElement(api.providers,"provi");
|
||||
gui.providers.link=function(a){var c={testButton:{text:gettext("Test"),css:"btn-info"}},e=null,b=function(){if(e){var a=$(e).dataTable();a.fnClearTable();a.fnDestroy();$("#services-log-placeholder").empty();e=void 0}},f=[],g=function(){gui.doLog("Clearing details");$.each(f,function(a,b){var c=$(b).dataTable();c.fnClearTable();c.fnDestroy()});b();f=[];$("#services-placeholder").empty();$("#logs-placeholder").empty();$("#detail-placeholder").addClass("hidden")};api.templates.get("providers",function(a){gui.clearWorkspace();
|
||||
gui.appendToWorkspace(api.templates.evaluate(a,{providers:"providers-placeholder",services:"services-placeholder",services_log:"services-log-placeholder",logs:"logs-placeholder"}));gui.setLinksEvents();gui.providers.table({container:"providers-placeholder",rowSelect:"single",onCheck:function(a,b){return!0},onRowDeselect:function(){g()},onRowSelect:function(a){gui.tools.blockUI();g();$("#detail-placeholder").removeClass("hidden");var d=a[0].id,l=new GuiElement(api.providers.detail(d,"services"),"services-"+
|
||||
a[0].type),k=null;a=l.table({container:"services-placeholder",rowSelect:"single",onRowSelect:function(a){gui.tools.blockUI();a=a[0].id;b();k=l.logTable(a,{container:"services-log-placeholder",onLoad:function(){e=k;gui.tools.unblockUI()}})},onRowDeselect:function(){b()},onCheck:function(a,b){if("delete"==a)for(var c in b)if(0<b[c].deployed_services_count)return!1;return!0},buttons:["new","edit","delete","xls"],onEdit:gui.methods.typedEdit(l,gettext("Edit service"),gettext("Error processing service"),
|
||||
c),onNew:gui.methods.typedNew(l,gettext("New service"),gettext("Error creating service"),c),onDelete:gui.methods.del(l,gettext("Delete service"),gettext("Error deleting service"),c),scrollToTable:!1,onLoad:function(a){gui.tools.unblockUI()}});d=gui.providers.logTable(d,{container:"logs-placeholder"});f.push(a);f.push(d)},buttons:["new","edit","delete","xls"],onNew:gui.methods.typedNew(gui.providers,gettext("New provider"),gettext("Error creating provider"),c),onEdit:gui.methods.typedEdit(gui.providers,
|
||||
gettext("Edit provider"),gettext("Error processing provider"),c),onDelete:gui.methods.del(gui.providers,gettext("Delete provider"),gettext("Error deleting provider"))})});return!1};gui.authenticators=new GuiElement(api.authenticators,"auth");
|
||||
gui.authenticators.link=function(a){var c={testButton:{text:gettext("Test authenticator"),css:"btn-info"}},e,b=function(){if(e){var a=$(e).dataTable();a.fnClearTable();a.fnDestroy();$("#user-log-placeholder").empty();e=void 0}},f=[],g=function(){$.each(f,function(a,b){var c=$(b).dataTable();c.fnClearTable();c.fnDestroy()});b();$("#users-placeholder").empty();$("#groups-placeholder").empty();$("#logs-placeholder").empty();$("#detail-placeholder").addClass("hidden");f=[]},d=function(a,b,c,d,e,f){var g=
|
||||
gui.failRequestModalFnc(gettext("Search error")),h=a+' input[name="name"]';$(a+" .button-search").on("click",function(){api.templates.get("search",function(a){var m=gui.launchModal(d,api.templates.evaluate(a,{search_label:e,results_label:f}),{actionButton:'<button type="button" class="btn btn-success button-accept">'+gettext("Accept")+"</button>"}),x=$(m+' input[name="search"]'),C=$(m+' select[name="results"]'),v=$(m+" .button-do-search");a=$(m+" .button-accept");x.val($(h).val());a.on("click",function(){var a=
|
||||
C.val();a&&($(h).val(a),$(m).modal("hide"))});v.on("click",function(){v.addClass("disabled");var a=x.val();api.authenticators.search(c,b,a,function(a){v.removeClass("disabled");C.empty();gui.doLog(a);$.each(a,function(a,b){C.append('<option value="'+b.id+'">'+b.id+" ("+b.name+")</option>")})},function(a,b,c){v.removeClass("disabled");g(a,b,c)})});$(m+" form").submit(function(a){a.preventDefault();v.click()});""!==x.val()&&v.click()})})};api.templates.get("authenticators",function(a){gui.clearWorkspace();
|
||||
gui.appendToWorkspace(api.templates.evaluate(a,{auths:"auths-placeholder",users:"users-placeholder",users_log:"users-log-placeholder",groups:"groups-placeholder",logs:"logs-placeholder"}));gui.setLinksEvents();gui.authenticators.table({container:"auths-placeholder",rowSelect:"single",buttons:["new","edit","delete","xls"],onRowDeselect:function(){g()},onRowSelect:function(a){g();$("#detail-placeholder").removeClass("hidden");gui.tools.blockUI();var c=a[0].id,k=gui.authenticators.types[a[0].type];gui.doLog("Type",
|
||||
k);var m=new GuiElement(api.authenticators.detail(c,"users"),"users"),p=new GuiElement(api.authenticators.detail(c,"groups"),"groups");a=p.table({container:"groups-placeholder",rowSelect:"single",buttons:["new","edit","delete","xls"],onLoad:function(a){gui.tools.unblockUI()},onEdit:function(a,b,c,d){var e=function(b){gui.tools.blockUI();api.templates.get("group",function(c){p.rest.item(a.id,function(a){var e=gui.launchModal(gettext("Edit group")+" <b>"+a.name+"</b>",api.templates.evaluate(c,{id:a.id,
|
||||
type:a.type,groupname:a.name,groupname_label:k.groupNameLabel,comments:a.comments,state:a.state,external:k.isExternal,canSearchGroups:k.canSearchGroups,groups:a.groups,groups_all:b}));gui.tools.applyCustoms(e);gui.tools.unblockUI();$(e+" .button-accept").click(function(){var a=gui.forms.read(e);gui.doLog("Fields",a);p.rest.save(a,function(a){$(e).modal("hide");d();gui.notify(gettext("Group saved"),"success")},gui.failRequestModalFnc("Error saving group",!0))})})})};"meta"==a.type?p.rest.overview(function(a){e(a)}):
|
||||
e()},onNew:function(a,b,e){var f=function(b){gui.tools.blockUI();api.templates.get("group",function(f){var g=gui.launchModal(gettext("New group"),api.templates.evaluate(f,{type:a,groupname_label:k.groupNameLabel,external:k.isExternal,canSearchGroups:k.canSearchGroups,groups:[],groups_all:b}));gui.tools.unblockUI();gui.tools.applyCustoms(g);d(g,"group",c,gettext("Search groups"),gettext("Group"),gettext("Groups found"));$(g+" .button-accept").click(function(){var a=gui.forms.read(g);gui.doLog("Fields",
|
||||
a);p.rest.create(a,function(a){$(g).modal("hide");e();gui.notify(gettext("Group saved"),"success")},gui.failRequestModalFnc("Error saving group",!0))})})};"meta"==a?p.rest.overview(function(a){f(a)}):f()},onDelete:gui.methods.del(p,gettext("Delete group"),gettext("Error deleting group"))});var t,h=["edit","delete","xls"];k.canCreateUsers&&(h=["new"].concat(h));var h=m.table({container:"users-placeholder",rowSelect:"single",onRowSelect:function(a){gui.tools.blockUI();a=a[0].id;b();t=m.logTable(a,{container:"users-log-placeholder",
|
||||
onLoad:function(){e=t;gui.tools.unblockUI()}})},onRowDeselect:function(){b()},buttons:h,deferedRender:!0,scrollToTable:!1,onLoad:function(a){gui.tools.unblockUI()},onRefresh:function(){$("#users-log-placeholder").empty()},onEdit:function(a,b,c,d){gui.tools.blockUI();api.templates.get("user",function(b){p.rest.overview(function(c){m.rest.item(a.id,function(e){var f=gui.launchModal(gettext("Edit user")+" <b>"+a.name+"</b>",api.templates.evaluate(b,{id:e.id,username:e.name,username_label:k.userNameLabel,
|
||||
realname:e.real_name,comments:e.comments,state:e.state,staff_member:e.staff_member,is_admin:e.is_admin,needs_password:k.needsPassword,password:k.needsPassword?"#\u00e6\u00f0~\u00ac\u014b@\u00e6\u00df\u201d\u00a2\u20ac~\u00bd\u00ac@#~\u00fe\u00ac@|":void 0,password_label:k.passwordLabel,groups_all:c,groups:e.groups,external:k.isExternal,canSearchUsers:k.canSearchUsers}));gui.tools.applyCustoms(f);gui.tools.unblockUI();$(f+" .button-accept").click(function(){var a=gui.forms.read(f);k.needsPassword&&
|
||||
"#\u00e6\u00f0~\u00ac\u014b@\u00e6\u00df\u201d\u00a2\u20ac~\u00bd\u00ac@#~\u00fe\u00ac@|"==a.password&&delete a.password;gui.doLog("Fields",a);m.rest.save(a,function(a){$(f).modal("hide");d();gui.notify(gettext("User saved"),"success")},gui.failRequestModalFnc("Error saving user",!0))})})})})},onNew:function(a,b,e){gui.tools.blockUI();api.templates.get("user",function(a){p.rest.overview(function(b){var f=gui.launchModal(gettext("New user"),api.templates.evaluate(a,{username_label:k.userNameLabel,
|
||||
needs_password:k.needsPassword,password_label:k.passwordLabel,groups_all:b,groups:[],external:k.isExternal,canSearchUsers:k.canSearchUsers}));gui.tools.applyCustoms(f);gui.tools.unblockUI();d(f,"user",c,gettext("Search users"),gettext("User"),gettext("Users found"));$(f+" .button-accept").click(function(){var a=gui.forms.read(f);gui.doLog("Fields",a);m.rest.create(a,function(a){$(f).modal("hide");e();gui.notify(gettext("User saved"),"success")},gui.failRequestModalFnc("Error saving user",!0))})})})},
|
||||
onDelete:gui.methods.del(m,gettext("Delete user"),gettext("Error deleting user"))}),s=gui.authenticators.logTable(c,{container:"logs-placeholder"});f.push(a);f.push(h);f.push(s);return!1},onRefresh:function(){$("#users-placeholder").empty()},onNew:gui.methods.typedNew(gui.authenticators,gettext("New authenticator"),gettext("Error creating authenticator"),c),onEdit:gui.methods.typedEdit(gui.authenticators,gettext("Edit authenticator"),gettext("Error processing authenticator"),c),onDelete:gui.methods.del(gui.authenticators,
|
||||
gettext("Delete authenticator"),gettext("Error deleting authenticator"))})});return!1};gui.osmanagers=new GuiElement(api.osmanagers,"osm");
|
||||
gui.osmanagers.link=function(a){$.each($.fn.dataTable.fnTables(),function(a,e){$(e).dataTable().fnDestroy()});gui.clearWorkspace();gui.appendToWorkspace(gui.breadcrumbs("Os Managers"));gui.osmanagers.table({rowSelect:"single",buttons:["new","edit","delete","xls"],onNew:gui.methods.typedNew(gui.osmanagers,gettext("New OSManager"),gettext("Error creating OSManager")),onEdit:gui.methods.typedEdit(gui.osmanagers,gettext("Edit OSManager"),gettext("Error processing OSManager")),onDelete:gui.methods.del(gui.osmanagers,
|
||||
gettext("Delete OSManager"),gettext("Error deleting OSManager"))});return!1};gui.connectivity={transports:new GuiElement(api.transports,"trans"),networks:new GuiElement(api.networks,"nets")};
|
||||
gui.connectivity.link=function(a){$.each($.fn.dataTable.fnTables(),function(a,e){$(e).dataTable().fnDestroy()});api.templates.get("connectivity",function(a){gui.clearWorkspace();gui.appendToWorkspace(api.templates.evaluate(a,{transports:"transports-placeholder",networks:"networks-placeholder"}));gui.connectivity.transports.table({rowSelect:"single",container:"transports-placeholder",buttons:["new","edit","delete","xls"]});gui.connectivity.networks.table({rowSelect:"multi",container:"networks-placeholder",
|
||||
buttons:["new","edit","delete","xls"]})})};
|
Loading…
Reference in New Issue
Block a user