5 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
21 function __construct($a_parent_obj, $a_parent_cmd, $a_media_object)
25 parent::__construct($a_parent_obj, $a_parent_cmd);
26 $this->media_object = $a_media_object;
28 include_once(
"./Services/MediaObjects/classes/class.ilMapArea.php");
35 $this->
setRowTemplate(
"tpl.image_map_table_row.html",
"Services/MediaObjects");
52 $this->
addColumn($this->lng->txt(
"cont_name"),
"title",
"");
53 $this->
addColumn($this->lng->txt(
"cont_shape"),
"",
"");
54 $this->
addColumn($this->lng->txt(
"cont_coords"),
"",
"");
55 $this->
addColumn($this->lng->txt(
"cont_highlight_mode"));
56 $this->
addColumn($this->lng->txt(
"cont_highlight_class"));
57 $this->
addColumn($this->lng->txt(
"cont_link"),
"",
"");
70 $this->
addMultiCommand(
"editShapeWholePicture", $lng->txt(
"cont_edit_shape_whole_picture"));
71 $this->
addMultiCommand(
"editShapeRectangle", $lng->txt(
"cont_edit_shape_rectangle"));
72 $this->
addMultiCommand(
"editShapeCircle", $lng->txt(
"cont_edit_shape_circle"));
73 $this->
addMultiCommand(
"editShapePolygon", $lng->txt(
"cont_edit_shape_polygon"));
88 $st_item = $this->media_object->getMediaItem(
"Standard");
92 include_once(
"./Services/MediaObjects/classes/class.ilMapArea.php");
93 for ($i=1; $i<=$max; $i++)
95 $area =
new ilMapArea($st_item->getId(), $i);
96 $areas[] =
array(
"nr" => $i,
"area" => $area,
"title" => $area->getTitle());
110 $area = $a_set[
"area"];
112 $this->tpl->setVariable(
"CHECKBOX",
113 ilUtil::formCheckBox(
"",
"area[]", $i));
114 $this->tpl->setVariable(
"VAR_NAME",
"name_".$i);
116 $this->tpl->setVariable(
"VAL_SHAPE", $area->getShape());
118 $this->tpl->setVariable(
"VAL_HIGHL_MODE",
120 $this->highl_modes,
false,
true));
121 $this->tpl->setVariable(
"VAL_HIGHL_CLASS",
123 $this->highl_classes,
false,
true));
125 $this->tpl->setVariable(
"VAL_COORDS",
126 implode(explode(
",", $area->getCoords()),
", "));
127 switch ($area->getLinkType())
130 $this->tpl->setVariable(
"VAL_LINK", $area->getHRef());
134 $link_str = $this->parent_obj->getMapAreaLinkString($area->getTarget(),
135 $area->getType(), $area->getTargetFrame());
136 $this->tpl->setVariable(
"VAL_LINK", $link_str);
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
__construct($a_parent_obj, $a_parent_cmd, $a_media_object)
Constructor.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
initColumns()
Init columns.
static getAllHighlightClasses()
Get all highlight classes.
static getAllHighlightModes()
Get all highlight modes.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
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.
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.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
initActions()
Init actions.
static _getMaxNr($a_item_id)
get maximum nr of media item (static)
TableGUI class for image map editor.
setEnableHeader($a_enableheader)
Set Enable Header.
setEnableTitle($a_enabletitle)
Set Enable Title.
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.
fillRow($a_set)
Standard Version of Fill Row.
getItems()
Get items of current folder.