|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Ajax\semantic\components; |
|
4
|
|
|
|
|
5
|
|
|
use Ajax\JsUtils; |
|
6
|
|
|
|
|
7
|
|
|
class Dropdown extends SimpleSemExtComponent { |
|
8
|
|
|
|
|
9
|
|
|
public function __construct(JsUtils $js) { |
|
10
|
|
|
parent::__construct($js); |
|
11
|
|
|
$this->uiName="dropdown"; |
|
12
|
|
|
} |
|
13
|
|
|
|
|
14
|
|
|
/** |
|
15
|
|
|
* Sets a default action to occur |
|
16
|
|
|
* @param string $action one of "select","auto","activate","combo","nothing","hide" |
|
17
|
|
|
* @return \Ajax\semantic\components\Dropdown |
|
18
|
|
|
*/ |
|
19
|
|
|
public function setAction($action){ |
|
20
|
|
|
return $this->setParamCtrl("action", $action,array("select","auto","activate","combo","nothing","hide")); |
|
21
|
|
|
} |
|
22
|
|
|
|
|
23
|
|
|
/** |
|
24
|
|
|
* Define the event which trigger dropdown |
|
25
|
|
|
* @param string $event Event used to trigger dropdown (Hover, Click, Custom Event) |
|
26
|
|
|
* @return \Ajax\semantic\components\Dropdown |
|
27
|
|
|
*/ |
|
28
|
|
|
public function setOn($event){ |
|
29
|
|
|
return $this->setParam("on", $event); |
|
30
|
|
|
} |
|
31
|
|
|
|
|
32
|
|
|
public function setFullTextSearch($value){ |
|
33
|
|
|
return $this->setParam("fullTextSearch", $value); |
|
34
|
|
|
} |
|
35
|
|
|
|
|
36
|
|
|
public function setShowOnFocus($value){ |
|
37
|
|
|
return $this->setParam("showOnFocus", $value); |
|
38
|
|
|
} |
|
39
|
|
|
|
|
40
|
|
|
public function setAllowAdditions($value){ |
|
41
|
|
|
return $this->setParam("allowAdditions", $value); |
|
42
|
|
|
} |
|
43
|
|
|
} |
|
44
|
|
|
|