/* Button ***************
323522
function WidgetButton() {
        this.addOutput("", LiteGraph.EVENT);
        this.addOutput("", "boolean");
        this.addProperty("text", "click me");
        this.addProperty("font_size", 30);
        this.addProperty("message", "");
        this.size = [164, 84];
        this.clicked = false;
    }
182748
public function button($value = null, $options = array())
	{
		$options = $this->appendClassToOptions('btn', $options);
		
		return parent::button($value, $options);
	}
941069
function ( Class, Label, Container ) {
			var Button = L.DomUtil.create( 'button', Class, Container );
			Button.setAttribute( 'type' , 'button' );
			Button.innerHTML = Label;
			
			return Button;
		}
358488
public function init_button($field)
    {
        $this->on('click', '.do-'.$field)->univ()->ajaxec(array(
            $this->app->url(),
            $field => $a = $this->js()->_selectorThis()->data('id'),
            $this->name.'_'.$field => $a,
            ));

        /*
        $this->columns[$field]['thparam'] .= ' style="width: 40px; text-align: center"';
        $this->js(true)->find('.button_'.$field)->button();
        */
    }
458404
function Button(props) {
  warnAboutDeprecatedProp(props.mods, 'mods', 'className');

  const {
    children,
    className,
    dataAttrs = {},
    disabled,
    href,
    id,
    onClick,
    onMouseUp,
    size,
    type,
    variation,
  } = props;
  const restProps = getDataAttributes(dataAttrs);
  const mods = props.mods ? props.mods.slice() : [];

  /** This props have default values */
  mods.push(`size_${size}`);
  mods.push(`variation_${variation}`);

  if (disabled) {
    mods.push(`disabled_true`);
  }

  const classes = classnames(
    getClassNamesWithMods('ui-button', mods),
    className
  );

  if (type === 'link') {
    if (!href) {
      console.warn('Missing href'); // eslint-disable-line no-console
      return null;
    }

    return (
      <a
        {...restProps}
        className={classes}
        href={href}
        id={id}
        onMouseUp={onMouseUp}
      >
        {children}
      </a>
    );
  }

  if (type === 'submit' || type === 'reset') {
    return (
      <button
        {...restProps}
        className={classes}
        disabled={disabled}
        id={id}
        onMouseUp={onMouseUp}
        type={type}
      >
        {children}
      </button>
    );
  }

  return (
    <button
      {...restProps}
      className={classes}
      disabled={disabled}
      id={id}
      onClick={onClick}
      onMouseUp={onMouseUp}
      type="button"
    >
      {children}
    </button>
  );
}
335959
function() {
      inputEx.Form.superclass.disable.call(this);
      
      for (var i = 0 ; i < this.buttons.length ; i++) {
         this.buttons[i].disable();
      }
   }
539751
function (p) {
/*Line 57 - 'AtomPostButton.js' */                    AtomBinder.setValue(caller, "postResult", p.value());
/*Line 58 - 'AtomPostButton.js' */                    caller.invokeAction(caller._next);
/*Line 59 - 'AtomPostButton.js' */                }
976724
function process_button() {
    global $order;

    $sequence = rand(1, 1000);
    $submit_data_core = array(
      'x_login' => MODULE_PAYMENT_AUTHORIZENET_LOGIN,
      'x_amount' => number_format($order->info['total'], 2),
      //'x_currency_code' => $_SESSION['currency'],
      'x_version' => '3.1',
      'x_method' => ((MODULE_PAYMENT_AUTHORIZENET_METHOD == 'Credit Card') ? 'CC' : 'ECHECK'),
      'x_type' => MODULE_PAYMENT_AUTHORIZENET_AUTHORIZATION_TYPE == 'Authorize' ? 'AUTH_ONLY': 'AUTH_CAPTURE',
      'x_cust_ID' => $_SESSION['customer_id'],
      'x_email_customer' => ((MODULE_PAYMENT_AUTHORIZENET_EMAIL_CUSTOMER == 'True') ? 'TRUE': 'FALSE'),
      'x_company' => $order->billing['company'],
      'x_first_name' => $order->billing['firstname'],
      'x_last_name' => $order->billing['lastname'],
      'x_address' => $order->billing['street_address'],
      'x_city' => $order->billing['city'],
      'x_state' => $order->billing['state'],
      'x_zip' => $order->billing['postcode'],
      'x_country' => $order->billing['country']['title'],
      'x_phone' => $order->customer['telephone'],
      'x_fax' => $order->customer['fax'],
      'x_email' => $order->customer['email_address'],
      'x_ship_to_company' => $order->delivery['company'],
      'x_ship_to_first_name' => $order->delivery['firstname'],
      'x_ship_to_last_name' => $order->delivery['lastname'],
      'x_ship_to_address' => $order->delivery['street_address'],
      'x_ship_to_city' => $order->delivery['city'],
      'x_ship_to_state' => $order->delivery['state'],
      'x_ship_to_zip' => $order->delivery['postcode'],
      'x_ship_to_country' => $order->delivery['country']['title'],
      'x_Customer_IP' => zen_get_ip_address(),
      'x_relay_response' => 'TRUE',
      'x_relay_URL' => zen_href_link(FILENAME_CHECKOUT_PROCESS, 'action=confirm', 'SSL', true, false),
      'x_invoice_num' => '',
      'x_duplicate_window' => '120',
      'x_allow_partial_Auth' => 'FALSE', // unable to accept partial authorizations at this time
      'x_description' => 'Website Purchase from ' . str_replace('"',"'", STORE_NAME),
    );

    // force conversion to USD
    if ($_SESSION['currency'] != 'USD') {
      global $currencies;
      $submit_data_core['x_amount'] = number_format($order->info['total'] * $currencies->get_value('USD'), 2);
      $submit_data_core['x_currency_code'] = 'USD';
      unset($submit_data_core['x_tax'], $submit_data_core['x_freight']);
    }


    $submit_data_security = $this->InsertFP(MODULE_PAYMENT_AUTHORIZENET_LOGIN, MODULE_PAYMENT_AUTHORIZENET_TXNKEY, number_format($order->info['total'], 2), $sequence);

    $submit_data_offline = array(
      'x_show_form' => 'PAYMENT_FORM',
      'x_receipt_link_method' => 'POST',
      'x_receipt_link_text' => 'Click here to complete your order.',
      'x_receipt_link_url' => zen_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', false)
       );

//The following can (and SHOULD) be set in the authnet account admin area instead of here
    $submit_data_extras = array(
//      'x_header_email_receipt' => '',
//      'x_footer_email_receipt' => '',
//      'x_header_html_payment_form' => '',
//      'x_footer_html_payment_form' => '',
//      'x_header_html_receipt' => '',
//      'x_footer_html_receipt' => '',
//      'x_logo_url' => '',
//      'x_background_url' => '',
//      'x_color_link' => '',
//      'x_color_background' => '',
//      'x_color_text' => ''
        );

    $submit_data_onsite = array(
      'x_card_num' => $this->cc_card_number,
      'x_exp_date' => $this->cc_expiry_month . substr($this->cc_expiry_year, -2));

    if (MODULE_PAYMENT_AUTHORIZENET_USE_CVV == 'True') {
      if ($this->gateway_mode == 'onsite') $submit_data_onsite['x_card_code'] = $_POST['authorizenet_cc_cvv'];
    }

    if ($this->gateway_mode == 'onsite') {
      $submit_data = array_merge($submit_data_core, $submit_data_security, $submit_data_onsite);
    } else {
      $submit_data = array_merge($submit_data_core, $submit_data_security, $submit_data_offline, $submit_data_extras);
    }
    if (MODULE_PAYMENT_AUTHORIZENET_TESTMODE == 'Test') $submit_data['x_Test_Request'] = 'TRUE';
    $submit_data[zen_session_name()] = zen_session_id();

    $process_button_string = "\n";
    foreach($submit_data as $key => $value) {
      $process_button_string .= zen_draw_hidden_field($key, $value) . "\n";
    }

    // prepare a copy of submitted data for error-reporting purposes
    $this->reportable_submit_data = $submit_data;
    $this->reportable_submit_data['x_login'] = '*******';
    if (isset($this->reportable_submit_data['x_tran_key'])) $this->reportable_submit_data['x_tran_key'] = '*******';
    if (isset($this->reportable_submit_data['x_card_num'])) $this->reportable_submit_data['x_card_num'] = str_repeat('X', strlen($this->reportable_submit_data['x_card_num'] - 4)) . substr($this->reportable_submit_data['x_card_num'], -4);
    if (isset($this->reportable_submit_data['x_card_code'])) $this->reportable_submit_data['x_card_code'] = '*******';
    $this->reportable_submit_data['url'] = $url;

    $this->_debugActions($this->reportable_submit_data, 'Submit-Data', '', zen_session_id());

    return $process_button_string;
  }
192746
def button_for_js(label, js, html_options={})
      tag(:input, {type: 'button', value: label, onClick: js}.merge(
        html_options))
    end
634597
function() {
            this.$button = $(this.options.templates.button).addClass(this.options.buttonClass);

            // Adopt active state.
            if (this.$select.prop('disabled')) {
                this.disable();
            }
            else {
                this.enable();
            }

            // Manually add button width if set.
            if (this.options.buttonWidth && this.options.buttonWidth !== 'auto') {
                this.$button.css({
                    'width' : this.options.buttonWidth
                });
                this.$container.css({
                    'width': this.options.buttonWidth
                });
            }

            // Keep the tab index from the select.
            var tabindex = this.$select.attr('tabindex');
            if (tabindex) {
                this.$button.attr('tabindex', tabindex);
            }

            this.$container.prepend(this.$button);
        }
1354261
function(options) {
      inputEx.Form.superclass.setOptions.call(this, options);

      this.buttons = [];

      this.options.buttons = options.buttons || [];

      this.options.action = options.action;
   	this.options.method = options.method;

		this.options.className =  options.className || 'inputEx-Group';
	   this.options.autocomplete = lang.isUndefined(options.autocomplete) ?
	                                  inputEx.browserAutocomplete :
	                                  (options.autocomplete === false || options.autocomplete === "off") ? false : true;
		
		this.options.enctype = options.enctype;

      if(options.ajax) {
         this.options.ajax = {};
         this.options.ajax.method = options.ajax.method || 'POST';
         this.options.ajax.uri = options.ajax.uri || 'default.php';
         this.options.ajax.callback = options.ajax.callback || {};
         this.options.ajax.callback.scope = options.ajax.callback.scope || this;
         this.options.ajax.showMask = lang.isUndefined(options.ajax.showMask) ? false : options.ajax.showMask;

			this.options.ajax.contentType = options.ajax.contentType || "application/json";
			this.options.ajax.wrapObject = options.ajax.wrapObject;
      }
      
      if (lang.isFunction(options.onSubmit)) {
         this.options.onSubmit = options.onSubmit;
      }
   }
84754
static function button($name,$value='',$attrArray=null)
	{
		if(empty($attrArray['type'])) $attrArray['type'] = 'button';
	    $attrStr = self::input_attr($attrArray);
		return "<input name='{$name}' id='{$name}' value='{$value}' {$attrStr} />";
	}
770660
public static function buttonGroup($button, $links)
    {
        foreach ($links as $key => $link) {
            $links[$key] = Html::beginTag('li')
                    . Html::a($link[0], $link[1], $link[2])
                . Html::endTag('li');
        }

        return Html::beginTag('div', ['class' => 'btn-group'])
                . Html::button($button[0], array_merge([
                    'type'=>"button",
                    'class'=>"btn btn-default dropdown-toggle",
                    'data-toggle'=>"dropdown",
                    'aria-haspopup'=>"true",
                    'aria-expanded'=>"false"
                ], $button[1]))
                . Html::beginTag('ul', ['class' => 'dropdown-menu'])
                    . implode('', $links)
                . Html::endTag('ul')
            . Html::endTag('div');
    }
399224
function() {

        var events;
        var button;

        if (window.kelmu.data[id].settings.step && !stepButtonInitialized) {
          button = element.find(window.kelmu.data[id].settings.step);
          if (button.length > 0) {
            events = $._data(button[0], 'events');
            stepButtonInitialized = true;

            if (events && events.click && events.click.length > 0) {
              originalStep = events.click[0].handler;
              events.click[0].handler = forwardAndSkip;
            } else {
              button.click(forwardAndSkip);
            }
          }
        }

        if (window.kelmu.data[id].settings.redo && !redoButtonInitialized) {
          button = element.find(window.kelmu.data[id].settings.redo);
          if (button.length > 0) {
            events = $._data(button[0], 'events');
            redoButtonInitialized = true;

            if (events && events.click && events.click.length > 0) {
              originalRedo = events.click[0].handler;
              events.click[0].handler = redo;
            } else {
              button.click(redo);
            }
          }
        }

        if (window.kelmu.data[id].settings.undo && !undoButtonInitialized) {
          button = element.find(window.kelmu.data[id].settings.undo);
          if (button.length > 0) {
            events = $._data(button[0], 'events');
            undoButtonInitialized = true;

            if (events && events.click && events.click.length > 0) {
              originalUndo = events.click[0].handler;
              events.click[0].handler = undo;
            } else {
              button.click(undo);
            }
          }
        }

        if (window.kelmu.data[id].settings.begin && !beginButtonInitialized) {
          button = element.find(window.kelmu.data[id].settings.begin);
          if (button.length > 0) {
            events = $._data(button[0], 'events');
            beginButtonInitialized = true;

            if (events && events.click && events.click.length > 0) {
              originalBegin = events.click[0].handler;
              events.click[0].handler = begin;
            } else {
              button.click(begin);
            }
          }
        }

      }
1098661
function (e) {
/*Line 23 - 'AtomPostButton.js' */                if (this._confirm) {
/*Line 24 - 'AtomPostButton.js' */                    var _this = this;
/*Line 25 - 'AtomPostButton.js' */                    Atom.confirm(this._confirmMessage, function () {
/*Line 26 - 'AtomPostButton.js' */                        _this.onConfirmed(e);
/*Line 27 - 'AtomPostButton.js' */                    });
/*Line 28 - 'AtomPostButton.js' */                    return;
/*Line 29 - 'AtomPostButton.js' */                }
/*Line 30 - 'AtomPostButton.js' */                this.onConfirmed(e);
/*Line 31 - 'AtomPostButton.js' */            }
158986
function () {
        var self = this, settings = self.settings, id = self.id, suffix = self.suffix;

        function readyHandler() {
          DOM.unbind(window, 'ready', readyHandler);
          self.render();
        }

        // Page is not loaded yet, wait for it
        if (!Event.domLoaded) {
          DOM.bind(window, 'ready', readyHandler);
          return;
        }

        // Element not found, then skip initialization
        if (!self.getElement()) {
          return;
        }

        // No editable support old iOS versions etc
        if (!Env.contentEditable) {
          return;
        }

        // Hide target element early to prevent content flashing
        if (!settings.inline) {
          self.orgVisibility = self.getElement().style.visibility;
          self.getElement().style.visibility = 'hidden';
        } else {
          self.inline = true;
        }

        var form = self.getElement().form || DOM.getParent(id, 'form');
        if (form) {
          self.formElement = form;

          // Add hidden input for non input elements inside form elements
          if (settings.hidden_input && !/TEXTAREA|INPUT/i.test(self.getElement().nodeName)) {
            DOM.insertAfter(DOM.create('input', { type: 'hidden', name: id }), id);
            self.hasHiddenInput = true;
          }

          // Pass submit/reset from form to editor instance
          self.formEventDelegate = function (e) {
            self.fire(e.type, e);
          };

          DOM.bind(form, 'submit reset', self.formEventDelegate);

          // Reset contents in editor when the form is reset
          self.on('reset', function () {
            self.setContent(self.startContent, { format: 'raw' });
          });

          // Check page uses id="submit" or name="submit" for it's submit button
          if (settings.submit_patch && !form.submit.nodeType && !form.submit.length && !form._mceOldSubmit) {
            form._mceOldSubmit = form.submit;
            form.submit = function () {
              self.editorManager.triggerSave();
              self.setDirty(false);

              return form._mceOldSubmit(form);
            };
          }
        }

        /**
         * Window manager reference, use this to open new windows and dialogs.
         *
         * @property windowManager
         * @type tinymce.WindowManager
         * @example
         * // Shows an alert message
         * tinymce.activeEditor.windowManager.alert('Hello world!');
         *
         * // Opens a new dialog with the file.htm file and the size 320x240
         * // It also adds a custom parameter this can be retrieved by using tinyMCEPopup.getWindowArg inside the dialog.
         * tinymce.activeEditor.windowManager.open({
         *    url: 'file.htm',
         *    width: 320,
         *    height: 240
         * }, {
         *    custom_param: 1
         * });
         */
        self.windowManager = new WindowManager(self);

        /**
         * Notification manager reference, use this to open new windows and dialogs.
         *
         * @property notificationManager
         * @type tinymce.NotificationManager
         * @example
         * // Shows a notification info message.
         * tinymce.activeEditor.notificationManager.open({text: 'Hello world!', type: 'info'});
         */
        self.notificationManager = new NotificationManager(self);

        if (settings.encoding == 'xml') {
          self.on('GetContent', function (e) {
            if (e.save) {
              e.content = DOM.encode(e.content);
            }
          });
        }

        if (settings.add_form_submit_trigger) {
          self.on('submit', function () {
            if (self.initialized) {
              self.save();
            }
          });
        }

        if (settings.add_unload_trigger) {
          self._beforeUnload = function () {
            if (self.initialized && !self.destroyed && !self.isHidden()) {
              self.save({ format: 'raw', no_events: true, set_dirty: false });
            }
          };

          self.editorManager.on('BeforeUnload', self._beforeUnload);
        }

        // Load scripts
        function loadScripts() {
          var scriptLoader = ScriptLoader.ScriptLoader;

          if (settings.language && settings.language != 'en' && !settings.language_url) {
            settings.language_url = self.editorManager.baseURL + '/langs/' + settings.language + '.js';
          }

          if (settings.language_url) {
            scriptLoader.add(settings.language_url);
          }

          if (settings.theme && typeof settings.theme != "function" &&
            settings.theme.charAt(0) != '-' && !ThemeManager.urls[settings.theme]) {
            var themeUrl = settings.theme_url;

            if (themeUrl) {
              themeUrl = self.documentBaseURI.toAbsolute(themeUrl);
            } else {
              themeUrl = 'themes/' + settings.theme + '/theme' + suffix + '.js';
            }

            ThemeManager.load(settings.theme, themeUrl);
          }

          if (Tools.isArray(settings.plugins)) {
            settings.plugins = settings.plugins.join(' ');
          }

          each(settings.external_plugins, function (url, name) {
            PluginManager.load(name, url);
            settings.plugins += ' ' + name;
          });

          each(settings.plugins.split(/[ ,]/), function (plugin) {
            plugin = trim(plugin);

            if (plugin && !PluginManager.urls[plugin]) {
              if (plugin.charAt(0) == '-') {
                plugin = plugin.substr(1, plugin.length);

                var dependencies = PluginManager.dependencies(plugin);

                each(dependencies, function (dep) {
                  var defaultSettings = {
                    prefix: 'plugins/',
                    resource: dep,
                    suffix: '/plugin' + suffix + '.js'
                  };

                  dep = PluginManager.createUrl(defaultSettings, dep);
                  PluginManager.load(dep.resource, dep);
                });
              } else {
                PluginManager.load(plugin, {
                  prefix: 'plugins/',
                  resource: plugin,
                  suffix: '/plugin' + suffix + '.js'
                });
              }
            }
          });

          scriptLoader.loadQueue(function () {
            if (!self.removed) {
              self.init();
            }
          }, self, function (urls) {
            ErrorReporter.pluginLoadError(self, urls[0]);

            if (!self.removed) {
              self.init();
            }
          });
        }

        self.editorManager.add(self);
        loadScripts();
      }
966234
function getStandardizedButton( button ) {
        if ( $.Browser.vendor === $.BROWSERS.IE && $.Browser.version < 9 ) {
            // On IE 8, 0 == none, 1 == left, 2 == right, 3 == left and right, 4 == middle, 5 == left and middle, 6 == right and middle, 7 == all three
            // TODO: Support chorded (multiple) button presses on IE 8?
            if ( button === 1 ) {
                return 0;
            } else if ( button === 2 ) {
                return 2;
            } else if ( button === 4 ) {
                return 1;
            } else {
                return -1;
            }
        } else {
            return button;
        }
    }