phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
Tab.php
Go to the documentation of this file.
1<?php
2
4
7
13class Tab extends SimpleExtComponent {
14
15 public function __construct(JsUtils $js) {
16 parent::__construct($js);
17 $this->uiName="tab";
18 }
19
20 /*
21 * (non-PHPdoc)
22 * @see \Ajax\bootstrap\components\SimpleBsComponent::getScript()
23 */
24 public function getScript() {
25 $jsCode="$('".$this->attachTo." a').click(function (event) { event.preventDefault();$(this).tab('show');});";
26 $this->jquery_code_for_compile []=$jsCode;
27 $this->compileEvents();
28 return $this->compileJQueryCode();
29 }
30
31 public function show() {
32 $this->jquery_code_for_compile []=' $(function () {$("'.$this->attachTo.' a").tab("show");});';
33 }
34
41 public function onShow($jsCode) {
42 return $this->addEvent("show.bs.tab", $jsCode);
43 }
44
51 public function onShown($jsCode) {
52 return $this->addEvent("shown.bs.tab", $jsCode);
53 }
54
61 public function onHide($jsCode) {
62 return $this->addEvent("hide.bs.tab", $jsCode);
63 }
64
71 public function onHidden($jsCode) {
72 return $this->addEvent("hidden.bs.tab", $jsCode);
73 }
74}
JQuery PHP library.
Definition JsUtils.php:23
Composant Twitter Bootstrap Tab.
Definition Tab.php:13
onShow($jsCode)
This event fires on tab show, but before the new tab has been shown.
Definition Tab.php:41
onHide($jsCode)
This event fires when a new tab is to be shown (and thus the previous active tab is to be hidden).
Definition Tab.php:61
onHidden($jsCode)
This event fires after a new tab is shown (and thus the previous active tab is hidden).
Definition Tab.php:71
onShown($jsCode)
This event fires on tab show after a tab has been shown.
Definition Tab.php:51
__construct(JsUtils $js)
Definition Tab.php:15