Пример #1
0
 /**
  * Construct widget.
  *
  * @param string 			$id
  * @param string|array|CTag $body
  */
 public function __construct($id, $body = null)
 {
     $this->id = $id;
     $this->body = $body ? array($body) : array();
     parent::__construct(null, 'ui-widget ui-widget-content ui-helper-clearfix ui-corner-all widget ui-tabs');
     $this->setAttribute('id', $this->id . '_widget');
 }
Пример #2
0
 public function __construct($name = 'radio', $value = 'yes')
 {
     $this->count = 0;
     $this->name = $name;
     $this->value = $value;
     $this->orientation = self::ORIENTATION_HORIZONTAL;
     parent::__construct(null, null, $name);
 }
Пример #3
0
 /**
  * Construct widget.
  *
  * @param string 			$id
  * @param string|array|CTag $body
  */
 public function __construct($id, $body = null)
 {
     $this->id = $id;
     $this->body = $body ? [$body] : [];
     parent::__construct();
     $this->addClass('dashbrd-widget');
     $this->setId($this->id . '_widget');
 }
Пример #4
0
 public function __construct($title, $class, $action = '')
 {
     parent::__construct(SPACE, $class . ' menu_icon');
     $this->setAttribute('title', $title);
     if (!empty($action)) {
         $this->setAttribute('onclick', 'javascript: ' . $action);
     }
 }
Пример #5
0
 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();
     }
 }
 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);
 }
Пример #7
0
 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);
 }
Пример #8
0
 public function __construct($name = null, $color)
 {
     parent::__construct();
     if ($name !== null) {
         $this->setName($name);
         $this->setId(zbx_formatDomId($name));
     }
     $this->setAttribute('style', 'background: #' . $color);
 }
Пример #9
0
 public function __construct($name, $value, $action = null)
 {
     parent::__construct(SPACE . SPACE . SPACE, null);
     $this->setName($name);
     $this->setAttribute('id', $name);
     $this->setAttribute('title', '#' . $value);
     $this->setAttribute('class', 'pointer');
     $this->setAttribute('style', 'display: inline; width: 10px; height: 10px; text-decoration: none; outline: 1px solid black; background-color: #' . $value);
     $this->setAction($action);
 }
Пример #10
0
 public function __construct($header, $messages = [], $buttons = [])
 {
     parent::__construct($header);
     $this->addClass(ZBX_STYLE_MSG_BAD);
     $this->addClass('msg-global');
     if ($messages) {
         parent::addItem((new CDiv((new CList($messages))->addClass(ZBX_STYLE_MSG_DETAILS_BORDER)))->addClass(ZBX_STYLE_MSG_DETAILS));
     }
     parent::addItem((new CDiv($buttons))->addClass('msg-buttons'));
 }
Пример #11
0
 public function __construct($id, $body = null, $state = null)
 {
     $this->domid = $id;
     $this->state = $state;
     // 0 - closed, 1 - opened
     $this->css_class = 'header';
     $this->_header = null;
     $this->_body = array($body);
     $this->_footer = null;
     parent::__construct(null, 'ui-widget ui-widget-content ui-helper-clearfix ui-corner-all widget');
     $this->setAttribute('id', $id . '_widget');
 }
Пример #12
0
 public function __construct()
 {
     parent::__construct();
     $this->addClass(ZBX_STYLE_CLOCK);
     $this->width = 150;
     $this->height = 150;
     $this->time_zone_string = null;
     $this->footer = null;
     $this->time = null;
     $this->time_zone_offset = null;
     $this->error = null;
 }
 public function __construct($data = array())
 {
     if (isset($data['id'])) {
         $this->id = $data['id'];
     }
     if (isset($data['remember'])) {
         $this->setRemember($data['remember']);
     }
     if (isset($data['selected'])) {
         $this->setSelected($data['selected']);
     }
     parent::__construct();
     $this->attr('id', zbx_formatDomId($this->id));
     $this->attr('class', 'min-width hidden');
 }
Пример #14
0
 public function __construct($data = [])
 {
     if (isset($data['id'])) {
         $this->id = $data['id'];
     }
     if (isset($data['selected'])) {
         $this->setSelected($data['selected']);
     }
     if (isset($data['disabled'])) {
         $this->setDisabled($data['disabled']);
     }
     parent::__construct();
     $this->setId(zbx_formatDomId($this->id));
     $this->addClass(ZBX_STYLE_TABLE_FORMS_CONTAINER);
 }
Пример #15
0
 public function __construct($data = array())
 {
     if (isset($data['id'])) {
         $this->id = $data['id'];
     }
     if (isset($data['selected'])) {
         $this->setSelected($data['selected']);
     }
     if (isset($data['disabled'])) {
         $this->setDisabled($data['disabled']);
     }
     parent::__construct();
     $this->attr('id', zbx_formatDomId($this->id));
     $this->attr('class', 'tabs');
 }