本文整理汇总了PHP中CButton::setMenuPopup方法的典型用法代码示例。如果您正苦于以下问题:PHP CButton::setMenuPopup方法的具体用法?PHP CButton::setMenuPopup怎么用?PHP CButton::setMenuPopup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CButton
的用法示例。
在下文中一共展示了CButton::setMenuPopup方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CTextArea
$nameTextBox->attr('autofocus', 'autofocus');
$triggersFormList->addRow(_('Name'), $nameTextBox);
// append expression to form list
$expressionTextBox = new CTextArea($this->data['expression_field_name'], $this->data['expression_field_value'], array('rows' => ZBX_TEXTAREA_STANDARD_ROWS, 'width' => ZBX_TEXTAREA_STANDARD_WIDTH, 'readonly' => $this->data['expression_field_readonly']));
if ($this->data['expression_field_readonly']) {
$triggersForm->addVar('expression', $this->data['expression']);
}
$addExpressionButton = new CButton('insert', $this->data['input_method'] == IM_TREE ? _('Edit') : _('Add'), 'return PopUp("popup_trexpr.php?dstfrm=' . $triggersForm->getName() . '&dstfld1=' . $this->data['expression_field_name'] . '&srctbl=expression' . url_param('parent_discoveryid') . '&srcfld1=expression&expression=" + encodeURIComponent(jQuery(\'[name="' . $this->data['expression_field_name'] . '"]\').val()), 800, 265);', 'formlist');
if ($this->data['limited']) {
$addExpressionButton->setAttribute('disabled', 'disabled');
}
$expressionRow = array($expressionTextBox, $addExpressionButton);
if ($this->data['input_method'] == IM_TREE) {
// insert macro button
$insertMacroButton = new CButton('insert_macro', _('Insert expression'), null, 'formlist');
$insertMacroButton->setMenuPopup(CMenuPopupHelper::getTriggerMacro());
if ($this->data['limited']) {
$insertMacroButton->setAttribute('disabled', 'disabled');
}
$expressionRow[] = $insertMacroButton;
array_push($expressionRow, BR());
if (empty($this->data['outline'])) {
// add button
$addExpressionButton = new CSubmit('add_expression', _('Add'), null, 'formlist');
if ($this->data['limited']) {
$addExpressionButton->setAttribute('disabled', 'disabled');
}
array_push($expressionRow, $addExpressionButton);
} else {
// add button
$addExpressionButton = new CSubmit('and_expression', _('And'), null, 'formlist');