5 include_once(
"./Services/Table/interfaces/interface.ilTableFilterItem.php");
6 include_once(
"./Services/Form/classes/class.ilFormPropertyGUI.php");
24 public function __construct($a_title, $a_postvar, $a_explorer_gui, $a_multi =
false)
28 $this->lng = $DIC->language();
29 $lng = $DIC->language();
31 $this->multi_nodes = $a_multi;
32 $this->explorer_gui = $a_explorer_gui;
34 parent::__construct($a_title, $a_postvar);
46 return "handleExplorerCommand";
56 foreach ($val as $v) {
57 $this->explorer_gui->setNodeOpen($v);
58 $this->explorer_gui->setNodeSelected($v);
60 } elseif ($val !=
"") {
61 $this->explorer_gui->setNodeOpen($val);
62 $this->explorer_gui->setNodeSelected($val);
64 $this->explorer_gui->handleCommand();
82 if ($this->multi_nodes && !is_array($a_value)) {
83 if ($a_value !==
false) {
84 $this->value = array($a_value);
86 $this->value = array();
89 $this->value = $a_value;
123 if ($this->multi_nodes) {
150 public function render($a_mode =
"property_form")
154 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
156 $GLOBALS[
"tpl"]->addJavascript(
"./Services/UIComponent/Explorer2/js/Explorer2.js");
158 $tpl =
new ilTemplate(
"tpl.prop_expl_select.html",
true,
true,
"Services/UIComponent/Explorer2");
160 if ($a_mode !=
"property_form") {
161 $tpl->touchBlock(
"tiny_presentation");
166 if (is_array($val)) {
167 $val_txt = $sep =
"";
168 foreach ($val as $v) {
169 $tpl->setCurrentBlock(
"node_hid");
171 $tpl->setVariable(
"HID_VAL", $v);
172 $tpl->parseCurrentBlock();
175 $this->explorer_gui->setNodeOpen($v);
176 $this->explorer_gui->setNodeSelected($v);
178 $tpl->setVariable(
"VAL_TXT", $val_txt);
179 } elseif ($val !=
"") {
180 $tpl->setCurrentBlock(
"node_hid");
182 $tpl->setVariable(
"HID_VAL", $val);
183 $tpl->parseCurrentBlock();
185 $this->explorer_gui->setNodeOpen($val);
186 $this->explorer_gui->setNodeSelected($val);
194 if (!$this->disabled) {
195 $tpl->setCurrentBlock(
"txt_select");
196 $tpl->setVariable(
"TXT_SELECT",
$lng->txt(
"select"));
198 $tpl->parseCurrentBlock();
200 $tpl->setCurrentBlock(
"txt_reset");
201 $tpl->setVariable(
"TXT_RESET",
$lng->txt(
"reset"));
203 $tpl->parseCurrentBlock();
206 $tpl->setVariable(
"EXPL", $this->explorer_gui->getHTML());
210 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
213 $button->setCaption(
"select");
214 $button->addCSSClass(
"ilExplSelectInputButS");
215 $button->setOmitPreventDoubleSubmission(
true);
216 $top_tb->addButtonInstance($button);
219 $button->setCaption(
"cancel");
220 $button->addCSSClass(
"ilExplSelectInputButC");
221 $button->setOmitPreventDoubleSubmission(
true);
222 $top_tb->addButtonInstance($button);
225 $tpl->setVariable(
"TOP_TB", $top_tb->getHTML());
226 $tpl->setVariable(
"BOT_TB", $top_tb->getHTML());
260 $a_tpl->setCurrentBlock(
"prop_generic");
261 $a_tpl->setVariable(
"PROP_GENERIC", $this->
render());
262 $a_tpl->parseCurrentBlock();
Interface for property form input GUI classes that can be used in table filters.
special template class to simplify handling of ITX/PEAR
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static initPanel($a_resize=false, ilTemplate $a_main_tpl=null)
Init yui panel.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.