• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP zbx_formatDomId函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中zbx_formatDomId函数的典型用法代码示例。如果您正苦于以下问题:PHP zbx_formatDomId函数的具体用法?PHP zbx_formatDomId怎么用?PHP zbx_formatDomId使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了zbx_formatDomId函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: addTab

 public function addTab($id, $header, $body)
 {
     $this->headers[$id] = $header;
     $this->tabs[$id] = new CDiv($body);
     $this->tabs[$id]->setId(zbx_formatDomId($id));
     return $this;
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:7,代码来源:CTabView.php


示例2: __construct

 /**
  * @param array $options['objectOptions'] 	an array of parameters to be added to the request URL
  *
  * @see jQuery.multiSelect()
  */
 public function __construct(array $options = [])
 {
     parent::__construct('div', true);
     $this->addClass('multiselect');
     $this->setId(zbx_formatDomId($options['name']));
     // url
     $url = new CUrl('jsrpc.php');
     $url->setArgument('type', PAGE_TYPE_TEXT_RETURN_JSON);
     $url->setArgument('method', 'multiselect.get');
     $url->setArgument('objectName', $options['objectName']);
     if (!empty($options['objectOptions'])) {
         foreach ($options['objectOptions'] as $optionName => $optionvalue) {
             $url->setArgument($optionName, $optionvalue);
         }
     }
     $params = ['url' => $url->getUrl(), 'name' => $options['name'], 'labels' => ['No matches found' => _('No matches found'), 'More matches found...' => _('More matches found...'), 'type here to search' => _('type here to search'), 'new' => _('new'), 'Select' => _('Select')]];
     if (array_key_exists('data', $options)) {
         $params['data'] = zbx_cleanHashes($options['data']);
     }
     foreach (['ignored', 'defaultValue', 'disabled', 'selectedLimit', 'addNew'] as $option) {
         if (array_key_exists($option, $options)) {
             $params[$option] = $options[$option];
         }
     }
     if (array_key_exists('popup', $options)) {
         foreach (['parameters', 'width', 'height'] as $option) {
             if (array_key_exists($option, $options['popup'])) {
                 $params['popup'][$option] = $options['popup'][$option];
             }
         }
     }
     zbx_add_post_js('jQuery("#' . $this->getAttribute('id') . '").multiSelect(' . CJs::encodeJson($params) . ');');
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:38,代码来源:CMultiSelect.php


示例3: __construct

 public function __construct($label, $for = null)
 {
     parent::__construct('label', true, $label);
     if ($for !== null) {
         $this->setAttribute('for', zbx_formatDomId($for));
     }
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:7,代码来源:CLabel.php


示例4: __construct

 public function __construct($id = null)
 {
     parent::__construct();
     $this->addClass('table-forms');
     if ($id) {
         $this->setId(zbx_formatDomId($id));
     }
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:8,代码来源:CFormList.php


示例5: __construct

 public function __construct($id, $class = null, $editable = true)
 {
     $this->editable = $editable;
     $this->formList = new CList(null, 'formlist');
     parent::__construct();
     $this->attr('id', zbx_formatDomId($id));
     $this->attr('class', $class);
 }
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:8,代码来源:class.cformlist.php


示例6: __construct

 public function __construct($name, $value, $insert_color_picker = true)
 {
     parent::__construct([(new CColorCell('lbl_' . $name, $value))->setTitle('#' . $value)->onClick('javascript: show_color_picker("' . zbx_formatDomId($name) . '")'), (new CTextBox($name, $value))->setWidth(ZBX_TEXTAREA_COLOR_WIDTH)->setAttribute('maxlength', 6)->onChange('set_color_by_name("' . zbx_formatDomId($name) . '", this.value)')]);
     $this->addClass(ZBX_STYLE_INPUT_COLOR_PICKER);
     if ($insert_color_picker) {
         insert_show_color_picker_javascript();
     }
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:8,代码来源:CColor.php


示例7: __construct

 public function __construct($name = 'button', $caption = '')
 {
     parent::__construct('button', true, $caption);
     $this->setAttribute('type', 'button');
     if ($name !== null) {
         $this->setId(zbx_formatDomId($name));
         $this->setAttribute('name', $name);
     }
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:9,代码来源:CButton.php


示例8: __construct

 public function __construct($name, $value, $action = null)
 {
     parent::__construct(SPACE . SPACE . SPACE, 'pointer');
     $this->setName($name);
     $this->attr('id', zbx_formatDomId($name));
     $this->attr('title', '#' . $value);
     $this->attr('style', 'display: inline; width: 10px; height: 10px; text-decoration: none; border: 1px solid black; background-color: #' . $value);
     $this->attr('onclick', $action);
 }
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:9,代码来源:CColorCell.php


示例9: __construct

 public function __construct($name = null, $color)
 {
     parent::__construct();
     if ($name !== null) {
         $this->setName($name);
         $this->setId(zbx_formatDomId($name));
     }
     $this->setAttribute('style', 'background: #' . $color);
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:9,代码来源:CColorCell.php


示例10: __construct

 public function __construct($label, $for = null, $id = null)
 {
     parent::__construct('label', 'yes', $label);
     if (!is_null($id)) {
         $this->attr('id', zbx_formatDomId($id));
     }
     if (!is_null($for)) {
         $this->attr('for', zbx_formatDomId($for));
     }
 }
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:10,代码来源:class.clabel.php


示例11: __construct

 public function __construct($type = 'text', $name = 'textbox', $value = '')
 {
     parent::__construct('input');
     $this->setType($type);
     // if id is not passed, it will be the same as element name
     $this->setId(zbx_formatDomId($name));
     $this->setAttribute('name', $name);
     $this->setAttribute('value', $value);
     return $this;
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:10,代码来源:CInput.php


示例12: __construct

    /**
     * @param string $options['id']
     * @param string $options['name']
     * @param int    $options['value']
     */
    public function __construct(array $options = array())
    {
        parent::__construct('div', 'yes');
        $this->attr('id', isset($options['id']) ? $options['id'] : zbx_formatDomId($options['name']));
        $this->addClass('jqueryinputset control-severity');
        if (!isset($options['value'])) {
            $options['value'] = TRIGGER_SEVERITY_NOT_CLASSIFIED;
        }
        $items = array();
        $jsIds = '';
        $jsLabels = '';
        foreach (getSeverityCaption() as $severity => $caption) {
            $items[] = new CRadioButton($options['name'], $severity, null, $options['name'] . '_' . $severity, $options['value'] == $severity);
            $css = getSeverityStyle($severity);
            $label = new CLabel($caption, $options['name'] . '_' . $severity, $options['name'] . '_label_' . $severity);
            $label->attr('data-severity', $severity);
            $label->attr('data-severity-style', $css);
            if ($options['value'] == $severity) {
                $label->attr('aria-pressed', 'true');
                $label->addClass($css);
            } else {
                $label->attr('aria-pressed', 'false');
            }
            $items[] = $label;
            $jsIds .= ', #' . $options['name'] . '_' . $severity;
            $jsLabels .= ', #' . $options['name'] . '_label_' . $severity;
        }
        if ($jsIds) {
            $jsIds = substr($jsIds, 2);
            $jsLabels = substr($jsLabels, 2);
        }
        $this->addItem($items);
        insert_js('
			jQuery("' . $jsLabels . '").mouseenter(function() {
				jQuery("' . $jsLabels . '").each(function() {
					var obj = jQuery(this);

					if (obj.attr("aria-pressed") == "false") {
						obj.removeClass("ui-state-hover " + obj.data("severityStyle"));
					}
				});

				var obj = jQuery(this);

				obj.addClass(obj.data("severityStyle"));
			})
			.mouseleave(function() {
				jQuery("#' . $this->getAttribute('id') . ' [aria-pressed=\\"true\\"]").trigger("mouseenter");
			});

			jQuery("' . $jsIds . '").change(function() {
				jQuery("#' . $this->getAttribute('id') . ' [aria-pressed=\\"true\\"]").trigger("mouseenter");
			});', true);
    }
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:59,代码来源:class.cseverity.php


示例13: __construct

 public function __construct($name, $value)
 {
     parent::__construct();
     $txt = new CTextBox($name, $value);
     $txt->addStyle('width: 6em;');
     $txt->attr('maxlength', 6);
     $txt->attr('id', zbx_formatDomId($name));
     $txt->addAction('onchange', 'set_color_by_name("' . $name . '", this.value)');
     $txt->addStyle('style', 'margin-top: 0px; margin-bottom: 0px;');
     $lbl = new CColorCell('lbl_' . $name, $value, 'javascript: show_color_picker("' . $name . '")');
     $this->addItem(array($txt, $lbl));
     insert_show_color_picker_javascript();
 }
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:13,代码来源:class.ccolor.php


示例14: __construct

 public function __construct($name = 'combobox', $value = null, $action = null, array $items = [])
 {
     parent::__construct('select', true);
     $this->setId(zbx_formatDomId($name));
     $this->setAttribute('name', $name);
     $this->value = $value;
     if ($action !== null) {
         $this->onChange($action);
     }
     $this->addItems($items);
     // Prevent Firefox remembering selected option on page refresh.
     $this->setAttribute('autocomplete', 'off');
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:13,代码来源:CComboBox.php


示例15: __construct

 public function __construct($name = 'combobox', $value = null, $action = null, $items = null)
 {
     parent::__construct('select', 'yes');
     $this->tag_end = '';
     $this->attr('id', zbx_formatDomId($name));
     $this->attr('name', $name);
     $this->attr('class', 'input select');
     $this->attr('size', 1);
     $this->value = $value;
     $this->attr('onchange', $action);
     if (is_array($items)) {
         $this->addItems($items);
     }
 }
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:14,代码来源:class.ccombobox.php


示例16: __construct

 public function __construct($items = null, $class = null, $id = null)
 {
     parent::__construct('div', 'yes');
     $this->attr('class', $class);
     if (!empty($id)) {
         $this->attr('id', zbx_formatDomId($id));
     }
     $this->addItem($items);
     $this->tag_body_start = '';
     $this->tag_start = '';
     $this->tag_end = '';
     $this->tag_body_start = '';
     $this->tag_body_end = '';
     return $this;
 }
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:15,代码来源:class.cdiv.php


示例17: __construct

 /**
  * Init textarea.
  *
  * @param string	$name
  * @param string	$value
  * @param array		$options
  * @param int		$options['rows']
  * @param int		$options['maxlength']
  * @param boolean	$options['readonly']
  */
 public function __construct($name = 'textarea', $value = '', $options = [])
 {
     parent::__construct('textarea', true);
     $this->setId(zbx_formatDomId($name));
     $this->setAttribute('name', $name);
     $this->setAttribute('rows', !empty($options['rows']) ? $options['rows'] : ZBX_TEXTAREA_STANDARD_ROWS);
     if (isset($options['readonly'])) {
         $this->setReadonly($options['readonly']);
     }
     $this->addItem($value);
     // set maxlength
     if (!empty($options['maxlength'])) {
         $this->setMaxlength($options['maxlength']);
     }
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:25,代码来源:CTextArea.php


示例18: addValue

 public function addValue($name, $value, $checked = null)
 {
     $this->count++;
     $id = str_replace(array('[', ']'), array('_'), $this->name) . '_' . $this->count;
     $radio = new CInput('radio', $this->name, $value);
     $radio->attr('id', zbx_formatDomId($id));
     if (strcmp($value, $this->value) == 0 || !is_null($checked) || $checked) {
         $radio->attr('checked', 'checked');
     }
     $label = new CLabel($name, $id);
     $outerDiv = new CDiv(array($radio, $label));
     if ($this->orientation == self::ORIENTATION_HORIZONTAL) {
         $outerDiv->addClass('inlineblock');
     }
     parent::addItem($outerDiv);
 }
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:16,代码来源:class.cradiobuttonlist.php


示例19: get

 public function get($caption_l = null, $caption_r = null)
 {
     if (empty($caption_l)) {
         $caption_l = _('In');
     }
     if (empty($caption_r)) {
         $caption_r = _('Other');
     }
     $grp_tab = (new CTable())->addClass('tweenBoxTable')->setAttribute('name', $this->name)->setId('id', zbx_formatDomId($this->name))->setCellSpacing(0)->setCellPadding(0);
     if (!is_null($caption_l) || !is_null($caption_r)) {
         $grp_tab->addRow([$caption_l, '', $caption_r]);
     }
     $add_btn = (new CButton('add', (new CSpan())->addClass('arrow-left')))->addClass(ZBX_STYLE_BTN_GREY)->onClick('moveListBoxSelectedItem("' . $this->varname . '", "' . $this->id_r . '", "' . $this->id_l . '", "add");');
     $rmv_btn = (new CButton('remove', (new CSpan())->addClass('arrow-right')))->addClass(ZBX_STYLE_BTN_GREY)->onClick('moveListBoxSelectedItem("' . $this->varname . '", "' . $this->id_l . '", "' . $this->id_r . '", "rmv");');
     $grp_tab->addRow([$this->lbox, (new CCol([$add_btn, BR(), $rmv_btn]))->addClass(ZBX_STYLE_CENTER), $this->rbox]);
     return $grp_tab;
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:17,代码来源:CTweenBox.php


示例20: __construct

 /**
  * @param array $options['objectOptions'] 	an array of parameters to be added to the request URL
  *
  * @see jQuery.multiSelect()
  */
 public function __construct(array $options = array())
 {
     parent::__construct('div', 'yes');
     $this->addClass('multiselect');
     $this->attr('id', zbx_formatDomId($options['name']));
     // url
     $url = new Curl('jsrpc.php');
     $url->setArgument('type', PAGE_TYPE_TEXT_RETURN_JSON);
     $url->setArgument('method', 'multiselect.get');
     $url->setArgument('objectName', $options['objectName']);
     if (!empty($options['objectOptions'])) {
         foreach ($options['objectOptions'] as $optionName => $optionvalue) {
             $url->setArgument($optionName, $optionvalue);
         }
     }
     $params = array('id' => $this->getAttribute('id'), 'url' => $url->getUrl(), 'name' => $options['name'], 'labels' => array('No matches found' => _('No matches found'), 'More matches found...' => _('More matches found...'), 'type here to search' => _('type here to search'), 'new' => _('new'), 'Select' => _('Select')), 'data' => empty($options['data']) ? array() : zbx_cleanHashes($options['data']), 'ignored' => isset($options['ignored']) ? $options['ignored'] : null, 'defaultValue' => isset($options['defaultValue']) ? $options['defaultValue'] : null, 'disabled' => isset($options['disabled']) ? $options['disabled'] : false, 'selectedLimit' => isset($options['selectedLimit']) ? $options['selectedLimit'] : null, 'addNew' => isset($options['addNew']) ? $options['addNew'] : false, 'popup' => array('parameters' => isset($options['popup']['parameters']) ? $options['popup']['parameters'] : null, 'width' => isset($options['popup']['width']) ? $options['popup']['width'] : null, 'height' => isset($options['popup']['height']) ? $options['popup']['height'] : null, 'buttonClass' => isset($options['popup']['buttonClass']) ? $options['popup']['buttonClass'] : null));
     zbx_add_post_js('jQuery("#' . $this->getAttribute('id') . '").multiSelect(' . CJs::encodeJson($params) . ')');
 }
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:23,代码来源:class.cmultiselect.php



注:本文中的zbx_formatDomId函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP zbx_is_int函数代码示例发布时间:2022-05-23
下一篇:
PHP zbx_empty函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap