5 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
6 include_once(
"Services/MediaObjects/classes/class.ilImageMapTableGUI.php");
40 $this->ctrl = $DIC->ctrl();
41 $this->lng = $DIC->language();
42 $this->access = $DIC->access();
43 $lng = $DIC->language();
45 $this->
setId(
"cont_iim_tr");
47 $this->parent_node_name = $a_parent_node_name;
48 $this->pc_media_object = $a_pc_media_object;
49 $this->mob = $this->pc_media_object->getMediaObject();
51 $this->areas =
array();
52 foreach ($this->pc_media_object->getStandardAliasItem()->getMapAreas() as $a) {
53 $this->area[$a[
"Id"]] = $a;
56 $this->ov_files = $this->mob->getFilesOfDirectory(
"overlays");
57 $this->ov_options =
array(
"" =>
$lng->txt(
"please_select"));
58 foreach ($this->ov_files as $of) {
59 $this->ov_options[$of] = $of;
61 $this->popups = $this->pc_media_object->getPopups();
62 $this->pop_options =
array(
"" =>
$lng->txt(
"please_select"));
63 foreach ($this->popups as $k => $p) {
64 $this->pop_options[$p[
"nr"]] = $p[
"title"];
66 parent::__construct($a_parent_obj, $a_parent_cmd, $a_pc_media_object->getMediaObject());
67 $this->
setRowTemplate(
"tpl.iim_trigger_row.html",
"Services/COPage");
76 $this->
addColumn($this->lng->txt(
"title"),
"Title",
"");
77 $this->
addColumn($this->lng->txt(
"type"),
"",
"");
78 $this->
addColumn($this->lng->txt(
"cont_coords"),
"",
"");
79 $this->
addColumn($this->lng->txt(
"cont_overlay_image"),
"",
"");
80 $this->
addColumn($this->lng->txt(
"cont_content_popup"),
"",
"");
81 $this->
addColumn($this->lng->txt(
"actions"),
"",
"");
95 if (count($data) > 0) {
106 $triggers = $this->pc_media_object->getTriggers();
126 if ($a_set[
"Overlay"] !=
"") {
127 $this->tpl->setCurrentBlock(
"cmd");
128 $this->tpl->setVariable(
"CMD_ID",
"ov_" .
$i);
129 $this->tpl->setVariable(
"HREF_CMD",
"#");
130 $this->tpl->setVariable(
"CMD_CLASS",
"ov_cmd");
131 $this->tpl->setVariable(
"TXT_CMD",
$lng->txt(
"cont_edit_overlay_position"));
132 $this->tpl->parseCurrentBlock();
136 if ($a_set[
"PopupNr"] !=
"") {
137 $this->tpl->setCurrentBlock(
"cmd");
138 $this->tpl->setVariable(
"CMD_ID",
"pop_" .
$i);
139 $this->tpl->setVariable(
"HREF_CMD",
"#");
140 $this->tpl->setVariable(
"CMD_CLASS",
"pop_cmd");
141 $this->tpl->setVariable(
"TXT_CMD",
$lng->txt(
"cont_edit_popup_position"));
142 $this->tpl->parseCurrentBlock();
146 $this->tpl->setCurrentBlock(
"coords");
147 $this->tpl->setVariable(
149 implode(explode(
",", $this->area[$a_set[
"Nr"]][
"Coords"]),
", ")
151 $this->tpl->parseCurrentBlock();
153 $this->tpl->setVariable(
155 $lng->txt(
"cont_" . $this->area[$a_set[
"Nr"]][
"Shape"])
159 $this->tpl->setCurrentBlock(
"cmd");
160 $this->tpl->setVariable(
"CMD_ID",
"mark_" .
$i);
161 $this->tpl->setVariable(
"HREF_CMD",
"#");
162 $this->tpl->setVariable(
"CMD_CLASS",
"mark_cmd");
163 $this->tpl->setVariable(
"TXT_CMD",
$lng->txt(
"cont_edit_marker_position"));
164 $this->tpl->parseCurrentBlock();
167 $this->tpl->setCurrentBlock(
"marker_pos");
168 $this->tpl->setVariable(
"VAR_MARK_POS",
"markpos[" .
$i .
"]");
169 $this->tpl->setVariable(
"ID_MARK_POS",
"markpos_" .
$i);
170 $this->tpl->setVariable(
"VAL_MARK_POS", $a_set[
"MarkerX"] .
"," . $a_set[
"MarkerY"]);
171 $this->tpl->setVariable(
"TXT_MLEFT",
$lng->txt(
"cont_left"));
172 $this->tpl->setVariable(
"TXT_MTOP",
$lng->txt(
"cont_top"));
173 $this->tpl->parseCurrentBlock();
175 $this->tpl->setVariable(
"TYPE",
$lng->txt(
"cont_marker"));
178 $this->tpl->setVariable(
180 ilUtil::formCheckBox(
"",
"tr[]",
$i)
182 $this->tpl->setVariable(
"VAR_NAME",
"title[" .
$i .
"]");
183 $this->tpl->setVariable(
"VAL_NAME", $a_set[
"Title"]);
186 $this->tpl->setVariable(
"VAR_POS",
"ovpos[" .
$i .
"]");
187 $this->tpl->setVariable(
"ID_OV_POS",
"ovpos_" .
$i);
188 $this->tpl->setVariable(
"ID_POP_POS",
"poppos_" .
$i);
189 $this->tpl->setVariable(
"VAR_POP_POS",
"poppos[" .
$i .
"]");
190 $this->tpl->setVariable(
"VAR_POP_SIZE",
"popsize[" .
$i .
"]");
191 $this->tpl->setVariable(
"VAL_POS", $a_set[
"OverlayX"] .
"," . $a_set[
"OverlayY"]);
192 $this->tpl->setVariable(
"VAL_POP_POS", $a_set[
"PopupX"] .
"," . $a_set[
"PopupY"]);
193 $this->tpl->setVariable(
"VAL_POP_SIZE", $a_set[
"PopupWidth"] .
"," . $a_set[
"PopupHeight"]);
194 $this->tpl->setVariable(
"TXT_IMG",
$lng->txt(
"image"));
195 $this->tpl->setVariable(
"TXT_TITLE",
$lng->txt(
"title"));
196 $this->tpl->setVariable(
"TXT_LEFT",
$lng->txt(
"cont_left"));
197 $this->tpl->setVariable(
"TXT_TOP",
$lng->txt(
"cont_top"));
198 $this->tpl->setVariable(
"TXT_WIDTH",
$lng->txt(
"cont_width"));
199 $this->tpl->setVariable(
"TXT_HEIGHT",
$lng->txt(
"cont_height"));
200 $this->tpl->setVariable(
204 $this->tpl->setVariable(
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
initColumns()
Init columns.
TableGUI class for pc image map editor.
fillRow($a_set)
Standard Version of Fill Row.
getItems()
Get items of current folder.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
initActions()
Init actions.
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
TableGUI class for image map editor.
__construct( $a_parent_obj, $a_parent_cmd, $a_pc_media_object, $a_parent_node_name)
Constructor.