phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
HtmlPopup.php
Go to the documentation of this file.
1<?php
2
4
10
11
13 private $_container;
14 public function __construct(BaseHtml $container,$identifier, $content="") {
15 parent::__construct($identifier, "div");
16 $this->_container=$container;
17 $this->setClass("ui popup");
18 $this->content=$content;
19 $this->_params=array("on"=>"hover");
20 }
21
26 public function addList($items=array(),$header=NULL){
27 if(!$this->content instanceof HtmlGrid){
28 $this->content=new HtmlGrid("Grid-".$this->identifier,0);
29 }
30 $grid=$this->content;
31
32 $colCount=$grid->colCount();
33 $colCount++;
34 $grid->setColsCount($colCount);
35
36 $list=new HtmlList("",$items);
37 $list->asLink();
38 if(isset($header)){
39 $list->addHeader(4,$header);
40 }
41 $grid->getCell(0,$colCount-1)->setContent($list);
42 $grid->setDivided()->setRelaxed(true);
43 return $list;
44 }
45
49 public function setFlowing(){
50 return $this->addToProperty("class", "flowing");
51 }
52
56 public function setBasic(){
57 return $this->addToProperty("class", "basic");
58 }
59
64 public function run(JsUtils $js){
65 parent::run($js);
66 $this->_params["popup"]="#".$this->identifier;
67 $js->semantic()->popup("#".$this->_container->getIdentifier(),$this->_params);
68 }
69
70 public function setOn($event="click"){
71 $this->_params["on"]=$event;
72 return $this;
73 }
74
75 public function setInline($value=true){
76 $this->_params["inline"]=$value;
77 return $this;
78 }
79
80 public function setPosition($position){
81 $this->_params["position"]=$position;
82 return $this;
83 }
84}
JQuery PHP library.
Definition JsUtils.php:23
semantic(Semantic $semantic=NULL)
getter or setter of the Semantic-UI variable
Definition JsUtils.php:158
BaseHtml for HTML components.
Definition BaseHtml.php:17
Base class for Semantic double elements.
addToProperty($name, $value, $separator=" ")
run(JsUtils $js)
{SimpleExtComponent\Ajax\common\html\BaseHtmlrun()\Ajax\common\html\BaseHtmlrun()}HtmlDoubleElement::...
Definition HtmlPopup.php:64
setBasic()
A popup can provide more basic formatting.
Definition HtmlPopup.php:56
addList($items=array(), $header=NULL)
\Ajax\common\html\html5\HtmlList
Definition HtmlPopup.php:26
__construct(BaseHtml $container, $identifier, $content="")
Definition HtmlPopup.php:14
setFlowing()
A popup can have no maximum width and continue to flow to fit its content.
Definition HtmlPopup.php:49