5 include_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");
62 parent::__construct($a_content_obj, $a_page);
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")
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") {
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"];
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]);
286 $tpl->setContent($cgui->getHTML());
298 if (is_array(
$_POST[
"tr"]) && count(
$_POST[
"tr"]) > 0) {
299 foreach (
$_POST[
"tr"] as $tr_nr) {
300 $this->content_obj->deleteTrigger($this->std_alias_item, $tr_nr);
302 $this->updated = $this->page->update();
303 ilUtil::sendSuccess(
$lng->txt(
"cont_areas_deleted"),
true);
306 $ilCtrl->redirect($this,
"editMapAreas");
316 return $this->page->getMultimediaXML();
329 include_once(
"./Services/COPage/classes/class.ilPageObjectGUI.php");
330 $pg_gui =
new ilPageObjectGUI($this->page->getParentType(), $this->page->getId());
332 $pg_gui->getPageConfig()->setEnableSelfAssessment(
true);
334 $qhtml = $pg_gui->getQuestionHTML();
335 if (is_array($qhtml)) {
336 foreach ($qhtml as $k =>
$h) {
337 $a_output = str_replace($pg_gui->pl_start .
"Question;il__qst_$k" . $pg_gui->pl_end,
" " .
$h, $a_output);
updateTrigger()
Update trigger.
confirmDeleteTrigger()
Confirm trigger deletion.
deleteTrigger()
Delete trigger.
static addJavaScript(ilTemplate $main_tpl=null)
Add javascript files that are necessary to run accordion.
outputPostProcessing($a_output)
Output post processing.
static addCss()
Add required css.
if(isset($_POST['submit'])) $form
TableGUI class for pc image map editor.
getImageMapTableHTML()
Get trigger table.
saveArea()
Save new or updated map area.
This class represents a text property in a property form.
setMaxLength($a_maxlength)
Set Max Length.
__construct($a_content_obj, $a_page)
Constructor.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
User interface class for page content map editor.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static initjQueryUI($a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see included_components.txt for included components)
initAreaEditingForm($a_edit_property)
Init area editing form.
getEditorTitle()
Get editor title.
addNewArea()
Add new area.
User interface class for page content map editor.
getParentNodeName()
Get parent node name.
getAdditionalPageXML()
Get additional page xml (to be overwritten)
setOutputMode($a_mode=IL_PAGE_PRESENTATION)
Set Output Mode.
Confirmation screen class.