Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
META-INF.resources.butterfaces-dist-bundle-js.butterfaces-ts-bundle.min.js Maven / Gradle / Ivy
var ButterFaces;!function(e){var t=function(){function t(){}return t.sendRequest=function(t,n,i,r,o){jsf.ajax.request(t,n,{"javax.faces.behavior.event":n,render:i.join(", "),params:r,onevent:function(t){o&&e.Ajax.disableElementsOnRequest(t,i)}})},t.disableElementsOnRequest=function(t,n){switch(t.status){case"begin":for(i=0;i0?new ButterFaces.TextareaExpandable(i):new ButterFaces.DivExpandable(i)})}}(jQuery);var ButterFaces;!function(e){var t=function(){function e(e){this.rootElement=e}return e.prototype.expandElement=function(e){var t=this;this.isExpansionEventIgnored(e)||(this.initialHeight=this.originalElement.outerHeight(),this.initialWidth=this.originalElement.outerWidth(),this.initialOffset=this.originalElement.offset(),this.ghostElement=this.createGhostElement(),this.transferValueToGhostElement(),this.ghostElement.css("width",this.initialWidth).css("height",this.initialHeight).css("position","absolute").css("top",this.initialOffset.top).css("left",this.initialOffset.left).css("z-index",2e3).css("box-shadow","5px 5px 5px 0 #999").addClass("butter-component-expandable-ghost").appendTo($("body")).animate({height:250,width:this.initialWidth>500?this.initialWidth:500},200,"swing",function(){$(document).on("click.expandable",function(e){t.handleMouseClick(e)}).on("keydown.expandable",function(e){t.handleEscapeKey(e)}),$(window).on("resize.expandable",function(){t.repositionGhostElement()}),t.positionTriggerInterval=window.setInterval(function(){return t.repositionGhostElement},500)}),this.originalElement.css("visibility","hidden").siblings().css("visibility","hidden"),this.onGhostElementCreated())},e.prototype.collapseElement=function(e){var t="boolean"==typeof e&&e;$(document).off("click.expandable").off("keydown.expandable"),this.originalElement.css("visibility","visible").siblings().css("visibility","visible");var n=this;this.ghostElement.animate({height:n.initialHeight,width:n.initialWidth},200,"swing",function(){n.onGhostElementCollapsed(t),n.ghostElement.remove(),n.ghostElement=null,window.clearInterval(n.positionTriggerInterval),$(window).off("resize.expandable")})},e.prototype.handleMouseClick=function(e){$(e.target).is(".butter-component-expandable-ghost")||this.collapseElement(!1)},e.prototype.handleEscapeKey=function(e){27===e.which&&this.collapseElement(!0)},e.prototype.repositionGhostElement=function(){void 0!==this.ghostElement&&null!=this.ghostElement&&(this.initialOffset=this.originalElement.offset(),this.ghostElement.css("top",this.initialOffset.top).css("left",this.initialOffset.left))},e}(),n=function(e){function t(t){var n=e.call(this,t)||this;return n.originalElement=n.rootElement.find(".butter-component-value-readonly"),n.rearrangeOriginalElementStructure(),n}return __extends(t,e),t.prototype.rearrangeOriginalElementStructure=function(){var e=this,t=this.rootElement.find(".butter-component-label");this.originalElement.addClass("butter-component-expandable-original").click(function(t){e.expandElement(t)}).detach();var n=$("").addClass("butter-component-expandable-readonly-container").insertAfter(t),i=$("
").addClass("input-group-text glyphicon glyphicon-resize-full");this.originalElement.appendTo(n),$("").addClass("butter-component-expandable-readonly-icon").append(i).appendTo(n)},t.prototype.createGhostElement=function(){return $("
")},t.prototype.isExpansionEventIgnored=function(e){return!1},t.prototype.onGhostElementCreated=function(){},t.prototype.onGhostElementCollapsed=function(e){},t.prototype.transferValueToGhostElement=function(){$("
").html(this.originalElement.html()).addClass("butter-component-expandable-ghost-readonlyContent").appendTo(this.ghostElement)},t}(t);e.DivExpandable=n;var i=function(e){function t(t){var n=e.call(this,t)||this;return n.blockFocusEventOnOriginal=!1,n.blockBlurEventOnOriginal=!1,n.originalElement=n.rootElement.find("textarea"),n.originalElement.addClass("butter-component-expandable-original"),n.originalElement.focus(function(e){n.expandElement(e)}),n.originalElement.blur(function(e){n.handleBlurEvent(e)}),n.addInputGroupAddon(),n}return __extends(t,e),t.prototype.addInputGroupAddon=function(){this.originalElement.addClass("form-control").parent().addClass("input-group"),$('
').insertAfter(this.originalElement)},t.prototype.handleBlurEvent=function(e){this.blockBlurEventOnOriginal&&e.preventDefault()},t.prototype.createGhostElement=function(){return $("