本文整理匯總了PHP中QApplication::ExecuteSelectorFunction方法的典型用法代碼示例。如果您正苦於以下問題:PHP QApplication::ExecuteSelectorFunction方法的具體用法?PHP QApplication::ExecuteSelectorFunction怎麽用?PHP QApplication::ExecuteSelectorFunction使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類QApplication
的用法示例。
在下文中一共展示了QApplication::ExecuteSelectorFunction方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: renderLowPriorityButton_Click
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
*/
}
示例2: GetEndScript
/**
* 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();
}
示例3: RefreshSelection
/**
* 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");
}
}