当前位置: 首页>>代码示例>>PHP>>正文


PHP zbx_formatDomId函数代码示例

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


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


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