All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.butterfaces-dist-js.butterfaces-link.min.js Maven / Gradle / Ivy

There is a newer version: 3.5.0
Show newest version
var ButterFaces;!function(e){var n=function(){function n(){}return n.disableOnClick=function(n,t,r,o,s,i,d,a){var c="error"===n.type?"error":n.status,l=$(document.getElementById(n.source.id));switch(c){case"begin":l.addClass("disabled");var m=l.find(".butter-component-glyphicon");d&&m.hide(),i.length>0?(m.removeAttr("class"),m.addClass("butter-component-glyphicon butter-component-processing-spinner"),m.addClass(i),o.length>0&&0===s.length&&m.addClass("butter-component-glyphicon-width-margin")):(m.removeAttr("class"),m.addClass("butter-component-spinner tiny butter-component-processing-spinner")),t&&(l.find(".butter-component-glyphicon-processing").startDots(),l.find(".butter-component-glyphicon-processing").css("display","inline-block"),l.find(".butter-component-glyphicon-text").html(o)),"undefined"!==a&&new e.Overlay(0,!1,a.replace(/[:]/g,":")).show();break;case"complete":break;case"success":case"error":l.removeClass("disabled"),t&&(l.find(".butter-component-glyphicon-processing").stopDots(),l.find(".butter-component-glyphicon-processing").css("display","none"),l.find(".butter-component-glyphicon-text").html(r||""));var p=l.find(".butter-component-processing-spinner");p.removeAttr("class"),p.addClass("butter-component-glyphicon"),d&&p.show(),s.length>0&&p.addClass(s),"undefined"!==a&&new e.Overlay(0,!1,a.replace(/[:]/g,":")).hide()}},n.submitForm=function(n,t,r){var o=document.getElementById(n);e.CommandLink.addParametersAsHiddenFieldsToForm(o,t);var s=e.CommandLink.setFormTarget(o,r);if(o.onsubmit){var i=o.onsubmit();(e.Object.isNullOrUndefined(i)||i)&&o.submit()}else o.submit();o.target=s,e.CommandLink.removeHiddenFieldsFromForm(o)},n.addParametersAsHiddenFieldsToForm=function(e,n){var t=[];e.bfHiddenInputFields=t;var r=0;for(var o in n)if(n.hasOwnProperty(o)){var s=document.createElement("input");s.type="hidden",s.name=o,s.value=n[o],e.appendChild(s),t[r++]=s}},n.removeHiddenFieldsFromForm=function(e){var n=e.bfHiddenInputFields;if(null!==n)for(var t=0;t




© 2015 - 2024 Weber Informatics LLC | Privacy Policy