5include_once(
"./Services/COPage/classes/class.ilPCImageMapEditorGUI.php");
46 $this->tpl =
$DIC[
"tpl"];
47 $this->lng =
$DIC->language();
48 $this->toolbar =
$DIC->toolbar();
49 $this->ctrl =
$DIC->ctrl();
52 include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
55 $tpl->addJavascript(
"./Services/COPage/js/ilCOPagePres.js");
56 $tpl->addJavascript(
"./Services/COPage/js/ilCOPagePCInteractiveImage.js");
58 include_once(
"./Services/Accordion/classes/class.ilAccordionGUI.php");
72 return "InteractiveImage";
84 return $lng->txt(
"cont_pc_iim");
98 $ilToolbar->addText(
$lng->txt(
"cont_drag_element_click_save"));
99 $ilToolbar->setId(
"drag_toolbar");
100 $ilToolbar->setHidden(
true);
101 $ilToolbar->addButton(
$lng->txt(
"save"),
"#",
"",
"",
"",
"save_pos_button");
103 $ilToolbar->addButton(
105 $ilCtrl->getLinkTarget($this,
"editMapAreas")
108 include_once(
"./Services/COPage/classes/class.ilPCIIMTriggerTableGUI.php");
115 return $image_map_table->getHTML();
130 $tb->setFormAction($ilCtrl->getFormAction($this));
131 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
133 "Rect" =>
$lng->txt(
"cont_Rect"),
134 "Circle" =>
$lng->txt(
"cont_Circle"),
135 "Poly" =>
$lng->txt(
"cont_Poly"),
136 "Marker" =>
$lng->txt(
"cont_marker")
139 $si->setOptions($options);
140 $tb->addInputItem(
$si,
true);
141 $tb->addFormButton(
$lng->txt(
"add"),
"addNewArea");
157 if (
$_POST[
"shape"] ==
"Marker") {
158 $this->content_obj->addTriggerMarker();
159 $this->updated = $this->page->update();
160 ilUtil::sendSuccess(
$lng->txt(
"cont_saved_map_data"),
true);
161 $ilCtrl->redirect($this,
"editMapAreas");
163 return parent::addNewArea();
177 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
179 $form->setOpenTag(
false);
180 $form->setCloseTag(
false);
183 if ($a_edit_property !=
"link" && $a_edit_property !=
"shape") {
185 $ti->setMaxLength(200);
192 if ($a_edit_property ==
"") {
193 $form->setTitle(
$lng->txt(
"cont_new_trigger_area"));
194 $form->addCommandButton(
"saveArea",
$lng->txt(
"save"));
196 $form->setTitle(
$lng->txt(
"cont_new_area"));
197 $form->addCommandButton(
"saveArea",
$lng->txt(
"save"));
214 $this->std_alias_item->setShape(
219 $this->updated = $this->page->update();
224 $area_type =
$_SESSION[
"il_map_edit_area_type"];
225 $coords =
$_SESSION[
"il_map_edit_coords"];
226 $this->content_obj->addTriggerArea(
227 $this->std_alias_item,
233 $this->updated = $this->page->update();
238 ilUtil::sendSuccess(
$lng->txt(
"cont_saved_map_area"),
true);
239 $ilCtrl->redirect($this,
"editMapAreas");
250 $this->content_obj->setTriggerOverlays(
$_POST[
"ov"]);
251 $this->content_obj->setTriggerPopups(
$_POST[
"pop"]);
252 $this->content_obj->setTriggerOverlayPositions(
$_POST[
"ovpos"]);
253 $this->content_obj->setTriggerMarkerPositions(
$_POST[
"markpos"]);
254 $this->content_obj->setTriggerPopupPositions(
$_POST[
"poppos"]);
255 $this->content_obj->setTriggerPopupSize(
$_POST[
"popsize"]);
256 $this->content_obj->setTriggerTitles(
$_POST[
"title"]);
257 $this->updated = $this->page->update();
258 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
259 $ilCtrl->redirect($this,
"editMapAreas");
271 if (!is_array(
$_POST[
"tr"]) || count(
$_POST[
"tr"]) == 0) {
273 $ilCtrl->redirect($this,
"editMapAreas");
275 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
277 $cgui->setFormAction($ilCtrl->getFormAction($this));
278 $cgui->setHeaderText(
$lng->txt(
"cont_really_delete_triggers"));
279 $cgui->setCancel(
$lng->txt(
"cancel"),
"editMapAreas");
280 $cgui->setConfirm(
$lng->txt(
"delete"),
"deleteTrigger");
283 $cgui->addItem(
"tr[]",
$i,
$_POST[
"title"][
$i]);
285 $tpl->setContent($cgui->getHTML());
297 if (is_array(
$_POST[
"tr"]) && count(
$_POST[
"tr"]) > 0) {
298 foreach (
$_POST[
"tr"] as $tr_nr) {
299 $this->content_obj->deleteTrigger($this->std_alias_item, $tr_nr);
301 $this->updated = $this->page->update();
302 ilUtil::sendSuccess(
$lng->txt(
"cont_areas_deleted"),
true);
305 $ilCtrl->redirect($this,
"editMapAreas");
315 return $this->page->getMultimediaXML();
328 include_once(
"./Services/COPage/classes/class.ilPageObjectGUI.php");
329 $pg_gui =
new ilPageObjectGUI($this->page->getParentType(), $this->page->getId());
331 $pg_gui->getPageConfig()->setEnableSelfAssessment(
true);
333 $qhtml = $pg_gui->getQuestionHTML();
334 if (is_array($qhtml)) {
335 foreach ($qhtml as $k => $h) {
336 $a_output = str_replace($pg_gui->pl_start .
"Question;il__qst_$k" . $pg_gui->pl_end,
" " . $h, $a_output);
An exception for terminatinating execution or to throw for unit testing.
static addJavaScript(ilGlobalTemplate $main_tpl=null)
Add javascript files that are necessary to run accordion.
static addCss()
Add required css.
Confirmation screen class.
User interface class for page content map editor.
deleteTrigger()
Delete trigger.
__construct($a_content_obj, $a_page)
Constructor.
getParentNodeName()
Get parent node name.
confirmDeleteTrigger()
Confirm trigger deletion.
addNewArea()
Add new area.
updateTrigger()
Update trigger.
initAreaEditingForm($a_edit_property)
Init area editing form.
getImageMapTableHTML()
Get trigger table.
getEditorTitle()
Get editor title.
outputPostProcessing($a_output)
Output post processing.
getAdditionalPageXML()
Get additional page xml (to be overwritten)
saveArea()
Save new or updated map area.
TableGUI class for pc image map editor.
User interface class for page content map editor.
This class represents a text property in a property form.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static initjQueryUI($a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see included_components....
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc