1 | <?php |
||
2 | |||
3 | namespace Ajax\semantic\components; |
||
4 | |||
5 | use Ajax\JsUtils; |
||
6 | |||
7 | class Popup extends SimpleSemExtComponent { |
||
8 | |||
9 | public function __construct(JsUtils $js) { |
||
10 | parent::__construct($js); |
||
11 | $this->uiName="popup"; |
||
12 | } |
||
13 | |||
14 | /** |
||
15 | * |
||
16 | * @param string $value default : click |
||
17 | * @return $this |
||
18 | */ |
||
19 | public function setOn($value="click") { |
||
20 | return $this->setParam("on", $value); |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * This event fires immediately when the show instance method is called. |
||
25 | * @param string $jsCode |
||
26 | * @return $this |
||
27 | */ |
||
28 | public function setOnShow($jsCode) { |
||
29 | $jsCode=str_ireplace("\"","%quote%", $jsCode); |
||
30 | return $this->setParam("onShow", "%function(){".$jsCode."}%"); |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
31 | } |
||
32 | |||
33 | public function setExclusive($value){ |
||
34 | return $this->setParam("exclusive", $value); |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * Defines the css selector of the displayed popup |
||
39 | * @param string $popup the css selector of the popup |
||
40 | * @return \Ajax\semantic\components\Popup |
||
41 | */ |
||
42 | public function setPopup($popup){ |
||
43 | return $this->setParam("popup", $popup); |
||
44 | } |
||
45 | |||
46 | public function setInline($value){ |
||
47 | return $this->setParam("inline", $value); |
||
48 | } |
||
49 | |||
50 | public function setPosition($value){ |
||
51 | return $this->setParam("position", $value); |
||
52 | } |
||
53 | |||
54 | public function setSetFluidWidth($value){ |
||
55 | return $this->setParam("setFluidWidth", $value); |
||
56 | } |
||
57 | } |
||
58 |