handles button click on user list button
199078
function() {
            if( !$log.is(':animated') ) {
              if( !$userListButton.hasClass(className.active) ) {
                $userListButton
                  .addClass(className.active)
                ;
                module.user.list.show();
              }
              else {
                $userListButton
                  .removeClass('active')
                ;
                module.user.list.hide();
              }
            }

          }
613289
function handleButton(event, params, modal) {
  var e = event || window.event;
  var target = e.target || e.srcElement;

  var targetedConfirm = target.className.indexOf('confirm') !== -1;
  var targetedOverlay = target.className.indexOf('sweet-overlay') !== -1;
  var modalIsVisible = _hasClass$isDescendant.hasClass(modal, 'visible');
  var doneFunctionExists = params.doneFunction && modal.getAttribute('data-has-done-function') === 'true';

  // Since the user can change the background-color of the confirm button programmatically,
  // we must calculate what the color should be on hover/active
  var normalColor, hoverColor, activeColor;
  if (targetedConfirm && params.confirmButtonColor) {
    normalColor = params.confirmButtonColor;
    hoverColor = _colorLuminance.colorLuminance(normalColor, -0.04);
    activeColor = _colorLuminance.colorLuminance(normalColor, -0.14);
  }

  function shouldSetConfirmButtonColor(color) {
    if (targetedConfirm && params.confirmButtonColor) {
      target.style.backgroundColor = color;
    }
  }

  switch (e.type) {
    case 'mouseover':
      shouldSetConfirmButtonColor(hoverColor);
      break;

    case 'mouseout':
      shouldSetConfirmButtonColor(normalColor);
      break;

    case 'mousedown':
      shouldSetConfirmButtonColor(activeColor);
      break;

    case 'mouseup':
      shouldSetConfirmButtonColor(hoverColor);
      break;

    case 'focus':
      var $confirmButton = modal.querySelector('button.confirm');
      var $cancelButton = modal.querySelector('button.cancel');

      if (targetedConfirm) {
        $cancelButton.style.boxShadow = 'none';
      } else {
        $confirmButton.style.boxShadow = 'none';
      }
      break;

    case 'click':
      var clickedOnModal = modal === target;
      var clickedOnModalChild = _hasClass$isDescendant.isDescendant(modal, target);

      // Ignore click outside if allowOutsideClick is false
      if (!clickedOnModal && !clickedOnModalChild && modalIsVisible && !params.allowOutsideClick) {
        break;
      }

      if (targetedConfirm && doneFunctionExists && modalIsVisible) {
        handleConfirm(modal, params);
      } else if (doneFunctionExists && modalIsVisible || targetedOverlay) {
        handleCancel(modal, params);
      } else if (_hasClass$isDescendant.isDescendant(modal, target) && target.tagName === 'BUTTON') {
        sweetAlert.close();
      }
      break;
  }
}
1135621
def click_button_with_value(value, opts={})
        if opts && opts[:index]
          wait_before_and_after { button(:value => value, :index => opts[:index]).click }
        else
          wait_before_and_after { button(:value, value).click }
        end
    end
213553
def update_list_widget(self):
        """"""
        # Get selected radio button
        radio_button_checked_id = self.input_button_group.checkedId()
        # No radio button checked, then default value = None
        if radio_button_checked_id > -1:
            selected_dict = list(self._parameter.options.values())[
                radio_button_checked_id]
            if selected_dict.get('type') == MULTIPLE_DYNAMIC:
                for field in selected_dict.get('value'):
                    # Update list widget
                    field_item = QListWidgetItem(self.list_widget)
                    field_item.setFlags(
                        Qt.ItemIsEnabled
                        | Qt.ItemIsSelectable
                        | Qt.ItemIsDragEnabled)
                    field_item.setData(Qt.UserRole, field)
                    field_item.setText(field)
                    self.list_widget.addItem(field_item)
234194
def submit(buttonName = nil)
        if (buttonName.nil?) then
          buttons.each { |button|
            next if button.type != 'submit'
            button.click
            return
          }
        else
          click_button_with_name(buttonName)
        end
      end
763533
def press_button(self, value):
    
    button = find_button(world.browser, value)
    if not button:
        raise AssertionError(
            "Cannot find a button named '{}'.".format(value))
    button.click()
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;
  }
987370
def _button_save_clicked(self):
        
        self.set_name(str(self._combobox_cmaps.currentText()))
        self.save_colormap()
        self._button_save.setEnabled(False)
        self._load_cmap_list()
1311846
protected function actionListUser()
    {
        list($selected, $action, $value) = $this->getPostedAction();

        $deleted = $updated = 0;

        foreach ($selected as $uid) {

            if ($this->isSuperadmin($uid)) {
                continue;
            }

            if ($action === 'status' && $this->access('user_edit')) {
                $updated += (int) $this->user->update($uid, array('status' => $value));
            }

            if ($action === 'delete' && $this->access('user_delete')) {
                $deleted += (int) $this->user->delete($uid);
            }
        }

        if ($updated > 0) {
            $text = $this->text('Updated %num item(s)', array('%num' => $updated));
            $this->setMessage($text, 'success');
        }

        if ($deleted > 0) {
            $text = $this->text('Deleted %num item(s)', array('%num' => $deleted));
            $this->setMessage($text, 'success');
        }
    }
1178471
function (event) {
            // flag that avoids to trigger the user callback when browsing the checkbox list
            var avoidCallback = (this._hasFocus || this._keepFocus);
            this.$TextInput._dom_onfocus.call(this, event, true);
            if (this._cfg.onfocus && !avoidCallback) {
                this.evalCallback(this._cfg.onfocus);
            }
        }
105481
function handleOGSuccess() {
	logResponse("[handleOGSuccess] done.");
  showPublishConfirmation();

  // Clear out selections
  selectedMealIndex = -1;
  selectedPlaceIndex = -1;
  selectedPlaceID = null;
  currentlySelectedPlaceElement = null;
  selectedFriends = {};
  // Reset the placeholders
  $('#select-meal').html("Select one");
  $('#select-location').html("Select one");
  $('#select-friends').html("Select friends");
  // Disable the announce button
  $('#announce').addClass('ui-disabled');

}
584085
def on_click(self, handler):
        ''' 

        '''
        self.on_event(ButtonClick, handler)
        self.on_event(MenuItemClick, handler)
501449
def on_click(self, event):
        
        button = event["button"]
        if button in [1, 4, 5]:
            self.scrolling = True
            self._switch_selection()
        elif button == 3:
            self._apply()
402185
def _sign_button_press(self, *args):
        """"""
        user_id = self.ent_id.get().strip()

        try:
            status = controller.sign(user_id)

        # ERROR: User type is unknown (!student and !tutor)
        except ValueError as e:
            logger.error(e, exc_info=True)
            messagebox.showerror(message=e)

        # ERROR: User is unregistered
        except controller.UnregisteredUser as e:
            logger.debug(e)
            messagebox.showwarning(message=e)

        # User needs to select type
        except controller.AmbiguousUserType as e:
            logger.debug(e)
            u = TkUserTypeSelectionDialog(
                    parent=self.root,
                    title='User Type Selection',
                    entry_to_clear=self.ent_id)
            if u.result:
                logger.debug('User type selected: {}'.format(u.result))
                status = controller.sign(user_id, user_type=u.result)
                self._show_feedback_label(
                    'Signed {}: {} ({})'.format(
                        status.in_or_out, status.user_name, status.user_type
                    )
                )

        # User has signed in or out normally
        else:
            sign_choice_confirmed = self._show_confirm_window(
                'Sign {}: {}?'.format(status.in_or_out, status.user_name),
                'Confirm Sign-{}'.format(status.in_or_out)
            )

            logger.debug('Sign {} confirmed: {}'.format(
                status.in_or_out, sign_choice_confirmed
            ))

            if not sign_choice_confirmed:
                # Undo sign-in or sign-out
                if status.in_or_out == 'in':
                    controller.undo_sign_in(status.entry)
                elif status.in_or_out == 'out':
                    controller.undo_sign_out(status.entry)
            else:
                self._show_feedback_label(
                    'Signed {}: {}'.format(status.in_or_out, status.user_name)
                )

        finally:
            self._set_signed_in()
            self.ent_id.delete(0, 'end')
            self.ent_id.focus()
1215249
def _on_ok_button_clicked(self, *args):
        
        if self.core_config_model.preliminary_config or self.gui_config_model.preliminary_config:
            self._on_apply_button_clicked()
        self.__destroy()
349887
function(){
        var self = this,
            list = this._listElement;            
        
        qq.attach(list, 'click', function(e){            
            e = e || window.event;
            var target = e.target || e.srcElement;
            
            if (qq.hasClass(target, self._classes.cancel)){                
                qq.preventDefault(e);
               
                var item = target.parentNode;
                self._handler.cancel(item.qqFileId);
                qq.remove(item);
            }
        });
    }
943438
def _sign_button_press(self):
        """"""
        user_id = self.ent_id.text().strip()

        try:
            status = controller.sign(user_id)

        # ERROR: User type is unknown (!student and !tutor)
        except ValueError as e:
            logger.error(e, exc_info=True)
            QMessageBox.critical(
                self,
                __title__ + ' Error',
                str(e),
                buttons=QMessageBox.Ok,
                defaultButton=QMessageBox.Ok,
            )

        # ERROR: User is unregistered
        except controller.UnregisteredUser as e:
            logger.debug(e)
            QMessageBox.warning(
                self,
                'Unregistered User',
                str(e),
                buttons=QMessageBox.Ok,
                defaultButton=QMessageBox.Ok,
            )

        # User needs to select type
        except controller.AmbiguousUserType as e:
            logger.debug(e)
            u = QtUserTypeSelectionDialog('Select User Type: ', self)
            if u.exec_() == QDialog.Accepted:
                status = controller.sign(user_id, user_type=u.user_type)
                self._show_feedback_label(
                    'Signed {}: {} ({})'.format(
                        status.in_or_out, status.user_name, status.user_type
                    )
                )

        # User has signed in or out normally
        else:
            sign_choice_confirmed = QMessageBox.question(
                self,
                'Confirm Sign-{}'.format(status.in_or_out),
                'Sign {}: {}?'.format(status.in_or_out, status.user_name),
                buttons=QMessageBox.Yes | QMessageBox.No,
                defaultButton=QMessageBox.Yes,
            )

            logger.debug('Sign {} confirmed: {}'.format(
                status.in_or_out, sign_choice_confirmed
            ))

            if sign_choice_confirmed == QMessageBox.No:
                # Undo sign-in or sign-out
                if status.in_or_out == 'in':
                    controller.undo_sign_in(status.entry)
                elif status.in_or_out == 'out':
                    controller.undo_sign_out(status.entry)
            else:
                self._show_feedback_label(
                    'Signed {}: {}'.format(status.in_or_out, status.user_name)
                )

        finally:
            self._set_signed_in()
            self.ent_id.clear()
            self.ent_id.setFocus()