public function renderLowPriorityButton_Click($strFormId, $strControlId, $strParameter)
 {
     $this->intHitCnt++;
     $this->dtgButtons->MarkAsModified();
     QApplication::ExecuteJsFunction('alert', 'alert 2: a low priority script', QJsPriority::Low);
     QApplication::ExecuteJsFunction('alert', 'alert 1: a low priority script', QJsPriority::Low);
     QApplication::ExecuteJsFunction('alert', 'Just updated the datagrid: --> the javascript for adding the css class to the buttons is executed first!', QJsPriority::Low);
     QApplication::ExecuteSelectorFunction(".ui-button", 'addClass', "ui-state-error");
     /*			QApplication::ExecuteJavaScript("alert('alert 3: a low priority script')",  QJsPriority::Low);
     			QApplication::ExecuteJavaScript("alert('alert 1: a low priority script')", QJsPriority::Low);
     			QApplication::ExecuteJavaScript("alert('Just updated the datagrid: --> the javascript for adding the css class to the buttons is executed first!')",  QJsPriority::Low);
     			QApplication::ExecuteJavaScript('$j(".ui-button").addClass("ui-state-error")'); //change the button color: this is executed with standard priority
     */
 }
Ejemplo n.º 2
0
 /**
  * Returns the javascript associated with the button.
  *
  * @return string
  * @throws \QCallerException
  */
 public function GetEndScript()
 {
     // Trigger the dropdown select event on the main control
     \QApplication::ExecuteSelectorFunction('#' . $this->ControlId . "_list", 'on', 'click', 'li', new \QJsClosure("\njQuery('#{$this->ControlId}').trigger ('bsdropdownselect', {id:this.id, value:\$j(this).data('value')});\n"), \QJsPriority::High);
     return parent::GetEndScript();
 }
 /**
  * Override of superclass that will update the selection using javascript so that the whole control does
  * not need to be redrawn.
  */
 protected function RefreshSelection()
 {
     $index = $this->SelectedIndex;
     QApplication::ExecuteSelectorFunction(['input', '#' . $this->ControlId], 'val', [$index]);
     if ($this->intButtonMode == self::ButtonModeSet || $this->intButtonMode == self::ButtonModeJq) {
         QApplication::ExecuteSelectorFunction(['input', '#' . $this->ControlId], 'button', "refresh");
     }
 }