本文整理汇总了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");
}
}