ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjStyleSheetGUI Class Reference

Class ilObjStyleSheetGUI. More...

+ Inheritance diagram for ilObjStyleSheetGUI:
+ Collaboration diagram for ilObjStyleSheetGUI:

Public Member Functions

 ilObjStyleSheetGUI ($a_data, $a_id, $a_call_by_reference, $a_prep=true)
 Constructor public.
executeCommand ()
 execute command
 viewObject ()
 list childs of current object
 createObject ()
 create
 includeCSS ()
 Include CSS in output.
 editObject ()
 edit style sheet
 propertiesObject ()
 Properties.
 getPropertiesValues ()
 Get current values for properties from.
 initPropertiesForm ($a_mode="edit")
 FORM: Init properties form.
 updateObject ()
 Update properties.
 refreshTagStyleObject ()
 save and refresh tag editing
 updateTagStyleObject ()
 save and refresh tag editing
 saveTagStyle ()
 Save tag style.
 writeStylePar ($cur_tag, $cur_class, $par, $value, $a_type)
 editTagStyleObject ()
 Edit tag style.
 outputTagStyleEditScreen ()
 Output tag style edit screen.
 initTagStyleForm ($a_mode, $a_cur_tag)
 Init tag style editing form.
 getValues ()
 FORM: Get current values from persistent object.
 exportStyleObject ()
 export style
 extractParametersOfTag ($a_tag, $a_class, $a_style, $a_type)
 newStyleParameterObject ()
 add style parameter
 refreshObject ()
 refresh style sheet
 deleteObject ($a_error=false)
 display deletion confirmation screen
 cancelDeleteObject ()
 cancel oobject deletion
 confirmedDeleteObject ()
 delete selected style objects
 deleteStyleParameterObject ()
 delete style parameters
 saveObject ()
 save style sheet
 copyStyleObject ()
 save style sheet
 importStyleObject ()
 import style sheet
 cancelObject ()
 update style sheet
 getAdminTabs (&$tabs_gui)
 admin and normal tabs are equal for roles
 setTabs ()
 output tabs
 getTabs (&$tabs_gui)
 adds tabs to tab gui object
 setSubTabs ()
 adds tabs to tab gui object
 setTemplatesSubTabs ()
 adds tabs to tab gui object
 addAdminLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 showUpperIcon ()
 listImagesObject ()
 List images of style.
 addImageObject ()
 Add an image.
 cancelUploadObject ()
 Cancel Upload.
 uploadImageObject ()
 Upload image.
 initImageForm ()
 Init image form.
 deleteImageObject ()
 Delete images.
 deleteCharacteristicConfirmationObject ()
 Characteristic deletion confirmation screen.
 deleteCoreCharMessage ()
 Message that appears, when user tries to delete core characteristics.
 cancelCharacteristicDeletionObject ()
 Cancel characteristic deletion.
 deleteCharacteristicObject ()
 Delete one or multiple style characteristic.
 addCharacteristicFormObject ()
 Add characteristic.
 saveCharacteristicObject ()
 Save Characteristic.
 initCharacteristicForm ($a_mode)
 Init tag style editing form.
 saveHideStatusObject ()
 Save hide status for characteristics.
 copyCharacteristicsObject ()
 Copy style classes.
 pasteCharacteristicsOverviewObject ()
 Paste characteristics overview.
 pasteCharacteristicsObject ()
 Paste characteristics.
 listColorsObject ()
 List colors of style.
 addColorObject ()
 Add a color.
 editColorObject ()
 Edit color.
 initColorForm ($a_mode="create")
 Init color form.
 getColorFormValues ()
 Set values for color editing.
 cancelColorSavingObject ()
 Cancel color saving.
 saveColorObject ()
 Save color.
 updateColorObject ()
 Update color.
 deleteColorConfirmationObject ()
 Delete color confirmation.
 cancelColorDeletionObject ()
 Cancel color deletion.
 deleteColorObject ()
 Delete colors.
 listTemplatesObject ()
 List templates.
 addTemplateObject ()
 Add template.
 editTemplateObject ()
 Edit table template.
 getTemplatePreview ($a_type, $a_t_id, $a_small_mode=false)
 Get table template preview.
 _getTemplatePreview ($a_style, $a_type, $a_t_id, $a_small_mode=false)
 Get table template preview.
 initTemplateForm ($a_mode="create")
 Init table template form.
 cancelTemplateSavingObject ()
 Cancel color saving.
 saveTemplateObject ()
 Save table template.
 updateTemplateObject ($a_refresh=false)
 Update table template.
 displayTemplateEditForm ()
 Display table tempalte edit form.
 refreshTemplateObject ()
 Refresh table template.
 getTemplateFormValues ()
 Set values for table template editing.
 deleteTemplateConfirmationObject ()
 Delete table template confirmation.
 cancelTemplateDeletionObject ()
 Cancel table template deletion.
 deleteTemplateKeepClassesObject ()
 Delete table template.
 deleteTemplateObject ()
 Delete table template.
 generateTemplateObject ()
 Generate table template.
 initTemplateGenerationForm ()
 Init table template generation form.
 templateGenerationObject ()
 Table template generation.
 accordiontestObject ()
 returnToUpperContextObject ()
 return to upper context
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not)
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui
 getCreationMode ()
 get creation mode
 getHTML ()
 undeleteObject ()
 Get objects back from trash.
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 isVisible ($a_ref_id, $a_type)
 trashObject ()
 Show trash content of object.
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.
 copyWizardHasOptions ($a_mode)
 Check if there is any modules specific option.

Static Public Member Functions

static getStyleExampleHTML ($a_type, $a_class)
 Get style example HTML.

Data Fields

 $cmd_update
 $cmd_new_par
 $cmd_refresh
 $cmd_delete
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 $ilias
 $objDefinition
 $tpl
 $tree
 $lng
 $data
 $object
 $ref_id
 $obj_id
 $maxcount
 $formaction
 $return_location
 $target_frame
 $tab_target_script
 $actions
 $sub_objects
 $omit_locator = false

Additional Inherited Members

- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 setAdminTabs ()
 set admin tabs public
 setLocator ()
 set Locator
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 omitLocator ($a_omit=true)
 displayEditForm ($fields)
 display edit form (usually called by editObject)
 afterUpdate ()
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g.
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste
 __showButton ($a_cmd, $a_text, $a_target= '')
 hitsperpageObject ()
__initTableGUI ()
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table
 __showClipboardTable ($a_result_set, $a_from="")
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="")

Detailed Description

Class ilObjStyleSheetGUI.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Id:
class.ilObjStyleSheetGUI.php 23942 2010-05-23 10:54:16Z akill

ilObjStyleSheetGUI:

Definition at line 19 of file class.ilObjStyleSheetGUI.php.

Member Function Documentation

ilObjStyleSheetGUI::_getTemplatePreview (   $a_style,
  $a_type,
  $a_t_id,
  $a_small_mode = false 
)

Get table template preview.

Definition at line 1900 of file class.ilObjStyleSheetGUI.php.

References ilObjectGUI\$lng, $t, ilObjectGUI\$tpl, ilPCTableGUI\_renderTable(), and ilAccordionGUI\addCss().

Referenced by ilObjStyleSheet\addTemplate(), and getTemplatePreview().

{
global $lng, $tpl;
$kr = $kc = 7;
if ($a_small_mode)
{
$kr = 6;
$kc = 5;
}
$ts = $a_style->getTemplate($a_t_id);
$t = $ts["classes"];
// preview
if ($a_type == "table")
{
$p_content = '<PageContent><Table DataTable="y"';
if ($t["row_head"] != "")
{
$p_content.= ' HeaderRows="1"';
}
if ($t["row_foot"] != "")
{
$p_content.= ' FooterRows="1"';
}
if ($t["col_head"] != "")
{
$p_content.= ' HeaderCols="1"';
}
if ($t["col_foot"] != "")
{
$p_content.= ' FooterCols="1"';
}
$p_content.= ' Template="'.$a_style->lookupTemplateName($a_t_id).'">';
if (!$a_small_mode)
{
$p_content.= '<Caption>'.$lng->txt("sty_caption").'</Caption>';
}
for($i = 1; $i<=$kr; $i++)
{
$p_content.= '<TableRow>';
for($j = 1; $j<=$kc; $j++)
{
if ($a_small_mode)
{
$cell = '&lt;div style="height:2px;"&gt;&lt;/div&gt;';
}
else
{
$cell = 'xxx';
}
$p_content.= '<TableData><PageContent><Paragraph Characteristic="TableContent">'.$cell.'</Paragraph></PageContent></TableData>';
}
$p_content.= '</TableRow>';
}
$p_content.= '</Table></PageContent>';
}
if ($a_type == "vaccordion" || $a_type == "haccordion")
{
include_once("./Services/Accordion/classes/class.ilAccordionGUI.php");
if ($a_small_mode)
{
$c = '&amp;nbsp;';
$h = '&amp;nbsp;';
}
else
{
$c = 'xxx';
$h = 'head';
}
if ($a_type == "vaccordion")
{
$p_content = '<PageContent><Tabs HorizontalAlign="Left" Type="VerticalAccordion" ';
if ($a_small_mode)
{
$p_content.= ' ContentWidth="70"';
}
}
else
{
$p_content = '<PageContent><Tabs Type="HorizontalAccordion"';
if ($a_small_mode)
{
$p_content.= ' ContentHeight="40"';
$p_content.= ' ContentWidth="70"';
$c = '&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;';
}
else
{
$p_content.= ' ContentHeight="40"';
}
}
$p_content.= ' Template="'.$a_style->lookupTemplateName($a_t_id).'">';
$p_content.= '<Tab><PageContent><Paragraph>'.$c.'</Paragraph></PageContent>';
$p_content.= '<TabCaption>'.$h.'</TabCaption>';
$p_content.= '</Tab>';
$p_content.= '</Tabs></PageContent>';
}
//echo htmlentities($p_content);
$txml = $a_style->getTemplateXML();
//echo htmlentities($txml);
$p_content.= $txml;
include_once("./Services/COPage/classes/class.ilPCTableGUI.php");
$r_content = ilPCTableGUI::_renderTable($p_content, "");
return $r_content;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::accordiontestObject ( )

Definition at line 2525 of file class.ilObjStyleSheetGUI.php.

References ilObjectGUI\$tpl, ilAccordionGUI\HORIZONTAL, and ilAccordionGUI\VERTICAL.

{
global $tpl;
include_once("./Services/Accordion/classes/class.ilAccordionGUI.php");
$acc = new ilAccordionGUI();
$acc->addItem("Header 1", str_repeat("bla bla bla bla bla bla", 30));
$acc->addItem("Header 2", str_repeat("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xx x xx x xx", 30));
$acc->setOrientation(ilAccordionGUI::HORIZONTAL);
$ac2 = new ilAccordionGUI();
$ac2->addItem("Header 1", str_repeat("bla bla bla bla bla bla", 30));
$ac2->addItem("Header 2", $acc->getHTML());
$ac2->setOrientation(ilAccordionGUI::VERTICAL);
$tpl->setContent($ac2->getHTML());
}
ilObjStyleSheetGUI::addAdminLocatorItems ( )

should be overwritten to add object specific items (repository items are preloaded)

Reimplemented from ilObjectGUI.

Definition at line 1134 of file class.ilObjStyleSheetGUI.php.

References $_GET, ilFrameTargetInfo\_getFrame(), ilObject\_lookupObjId(), and ilObject\_lookupTitle().

{
global $ilLocator;
if ($_GET["admin_mode"] == "settings") // system settings
{
$ilLocator->addItem($this->lng->txt("administration"),
$this->ctrl->getLinkTargetByClass("iladministrationgui", "frameset"),
$ilLocator->addItem(ilObject::_lookupTitle(
$this->ctrl->getLinkTargetByClass("ilobjstylesettingsgui", "view"));
if ($_GET["obj_id"] > 0)
{
$ilLocator->addItem($this->object->getTitle(),
$this->ctrl->getLinkTarget($this, "edit"));
}
}
else // repository administration
{
//?
}
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::addCharacteristicFormObject ( )

Add characteristic.

Definition at line 1404 of file class.ilObjStyleSheetGUI.php.

References ilObjectGUI\$tpl, and initCharacteristicForm().

{
global $tpl;
$this->initCharacteristicForm("create");
$tpl->setContent($this->form_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::addColorObject ( )

Add a color.

Definition at line 1634 of file class.ilObjStyleSheetGUI.php.

References ilObjectGUI\$tpl, and initColorForm().

{
global $tpl;
$this->initColorForm();
$tpl->setContent($this->form_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::addImageObject ( )

Add an image.

Definition at line 1194 of file class.ilObjStyleSheetGUI.php.

References ilObjectGUI\$tpl, and initImageForm().

{
global $tpl;
$this->initImageForm();
$tpl->setContent($this->form_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::addTemplateObject ( )

Add template.

Definition at line 1866 of file class.ilObjStyleSheetGUI.php.

References ilObjectGUI\$tpl, and initTemplateForm().

{
global $tpl;
$this->initTemplateForm();
$tpl->setContent($this->form_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::cancelCharacteristicDeletionObject ( )

Cancel characteristic deletion.

Definition at line 1370 of file class.ilObjStyleSheetGUI.php.

References $ilCtrl, ilObjectGUI\$lng, and ilUtil\sendInfo().

{
global $ilCtrl, $lng;
ilUtil::sendInfo($lng->txt("action_aborted"), true);
$ilCtrl->redirect($this, "edit");
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::cancelColorDeletionObject ( )

Cancel color deletion.

Definition at line 1808 of file class.ilObjStyleSheetGUI.php.

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->redirect($this, "listColors");
}
ilObjStyleSheetGUI::cancelColorSavingObject ( )

Cancel color saving.

Definition at line 1712 of file class.ilObjStyleSheetGUI.php.

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->redirect($this, "listColors");
}
ilObjStyleSheetGUI::cancelDeleteObject ( )

cancel oobject deletion

Reimplemented from ilObjectGUI.

Definition at line 821 of file class.ilObjStyleSheetGUI.php.

{
$this->ctrl->returnToParent($this);
}
ilObjStyleSheetGUI::cancelObject ( )

update style sheet

Definition at line 965 of file class.ilObjStyleSheetGUI.php.

References ilObjectGUI\$lng, and ilUtil\sendInfo().

{
global $lng;
ilUtil::sendInfo($lng->txt("msg_cancel"), true);
$this->ctrl->returnToParent($this);
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::cancelTemplateDeletionObject ( )

Cancel table template deletion.

Definition at line 2248 of file class.ilObjStyleSheetGUI.php.

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->redirect($this, "listTemplates");
}
ilObjStyleSheetGUI::cancelTemplateSavingObject ( )

Cancel color saving.

Definition at line 2072 of file class.ilObjStyleSheetGUI.php.

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->redirect($this, "listTemplates");
}
ilObjStyleSheetGUI::cancelUploadObject ( )

Cancel Upload.

Definition at line 1205 of file class.ilObjStyleSheetGUI.php.

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->redirect($this, "listImages");
}
ilObjStyleSheetGUI::confirmedDeleteObject ( )

delete selected style objects

Reimplemented from ilObjectGUI.

Definition at line 829 of file class.ilObjStyleSheetGUI.php.

References ilObjectGUI\$ilias.

{
global $ilias;
$this->object->delete();
$this->ctrl->returnToParent($this);
}
ilObjStyleSheetGUI::copyCharacteristicsObject ( )

Copy style classes.

Parameters
@return

Definition at line 1546 of file class.ilObjStyleSheetGUI.php.

References $_GET, $_POST, $_SESSION, $ilCtrl, ilObjectGUI\$lng, ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $ilCtrl, $lng;
if (!is_array($_POST["char"]) || count($_POST["char"]) == 0)
{
ilUtil::sendFailure($lng->txt("no_checkbox"), true);
}
else
{
$style_cp = implode("::", $_POST["char"]);
$style_cp = $this->object->getId().":::".$_GET["style_type"].":::".$style_cp;
$_SESSION["sty_copy"] = $style_cp;
ilUtil::sendSuccess($lng->txt("sty_copied_please_select_target"), true);
}
$ilCtrl->redirect($this, "edit");
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::copyStyleObject ( )

save style sheet

Definition at line 891 of file class.ilObjStyleSheetGUI.php.

References $_GET, $_POST, ilObjectGUI\$ilias, ilObjStyleSheet\_writeStandard(), and ilObjectFactory\getInstanceByRefId().

{
global $ilias;
if ($_POST["source_style"] > 0)
$style_obj =& $ilias->obj_factory->getInstanceByObjId($_POST["source_style"]);
$new_id = $style_obj->ilClone();
// assign style to style sheet folder,
// if parent is style sheet folder
if ($_GET["ref_id"] > 0)
{
if ($fold->getType() == "stys")
{
$fold->addStyle($new_id);
$fold->update();
$this->ctrl->redirectByClass("ilobjstylesettingsgui", "editContentStyles");
}
}
return $new_id;
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::createObject ( )

create

Reimplemented from ilObjectGUI.

Definition at line 75 of file class.ilObjStyleSheetGUI.php.

References ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjStyleSheet\_getClonableContentStyles(), formSelect(), and ilObjectGUI\getTemplateFile().

{
global $rbacsystem, $lng, $tpl;
//$this->setTabs();
$this->lng =& $lng;
//$this->ctrl->setParameter($this,'new_type',$this->type);
$this->getTemplateFile("create", "sty");
$this->tpl->setVariable("TXT_ACTION", $this->lng->txt("sty_create_new_stylesheet"));
$this->tpl->setVariable("TXT_STYLE_BY_IMPORT", $this->lng->txt("sty_import_stylesheet"));
$this->tpl->setVariable("TXT_STYLE_BY_COPY", $this->lng->txt("sty_copy_other_stylesheet"));
$this->tpl->setVariable("TXT_SELECT_FILE", $this->lng->txt("import_file"));
$this->tpl->setVariable("TXT_SOURCE", $this->lng->txt("sty_source"));
$this->tpl->setVariable("TXT_TITLE", $this->lng->txt("title"));
$this->tpl->setVariable("TXT_DESC", $this->lng->txt("description"));
$this->ctrl->setParameter($this, "new_type", "sty");
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$this->tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
$this->tpl->setVariable("TXT_IMPORT", $this->lng->txt("import"));
$this->tpl->setVariable("TXT_COPY", $this->lng->txt("copy"));
$this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
$this->tpl->setVariable("TXT_REQUIRED_FLD", $this->lng->txt("required_field"));
// get all learning module styles
$select = ilUtil::formSelect("", "source_style", $clonable_styles, false, true);
$this->tpl->setVariable("SOURCE_SELECT", $select);
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::deleteCharacteristicConfirmationObject ( )

Characteristic deletion confirmation screen.

Definition at line 1277 of file class.ilObjStyleSheetGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjStyleSheet\_getCoreStyles(), deleteCoreCharMessage(), and ilUtil\sendInfo().

{
global $ilCtrl, $tpl, $lng;
//var_dump($_POST);
if (!is_array($_POST["char"]) || count($_POST["char"]) == 0)
{
ilUtil::sendInfo($lng->txt("no_checkbox"), true);
$ilCtrl->redirect($this, "edit");
}
else
{
// check whether there are any core style classes included
foreach ($_POST["char"] as $char)
{
if (!empty($core_styles[$char]))
{
return;
}
}
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($ilCtrl->getFormAction($this));
$cgui->setHeaderText($lng->txt("sty_confirm_char_deletion"));
$cgui->setCancel($lng->txt("cancel"), "cancelCharacteristicDeletion");
$cgui->setConfirm($lng->txt("delete"), "deleteCharacteristic");
foreach ($_POST["char"] as $char)
{
$char_comp = explode(".", $char);
$cgui->addItem("char[]", $char, $char_comp[2]);
}
$tpl->setContent($cgui->getHTML());
}
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::deleteCharacteristicObject ( )

Delete one or multiple style characteristic.

Definition at line 1381 of file class.ilObjStyleSheetGUI.php.

References $_POST, and $ilCtrl.

{
global $ilCtrl;
if (is_array($_POST["char"]))
{
foreach($_POST["char"] as $char)
{
$char_comp = explode(".", $char);
$type = $char_comp[0];
$tag = $char_comp[1];
$class = $char_comp[2];
$this->object->deleteCharacteristic($type, $tag, $class);
}
}
$ilCtrl->redirect($this, "edit");
}
ilObjStyleSheetGUI::deleteColorConfirmationObject ( )

Delete color confirmation.

Definition at line 1778 of file class.ilObjStyleSheetGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilUtil\prepareFormOutput(), and ilUtil\sendInfo().

{
global $ilCtrl, $tpl, $lng;
if (!is_array($_POST["color"]) || count($_POST["color"]) == 0)
{
ilUtil::sendInfo($lng->txt("no_checkbox"), true);
$ilCtrl->redirect($this, "listColors");
}
else
{
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($ilCtrl->getFormAction($this));
$cgui->setHeaderText($lng->txt("sty_confirm_color_deletion"));
$cgui->setCancel($lng->txt("cancel"), "cancelColorDeletion");
$cgui->setConfirm($lng->txt("delete"), "deleteColor");
foreach ($_POST["color"] as $c)
{
$cgui->addItem("color[]", ilUtil::prepareFormOutput($c), $c);
}
$tpl->setContent($cgui->getHTML());
}
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::deleteColorObject ( )

Delete colors.

Definition at line 1818 of file class.ilObjStyleSheetGUI.php.

References $_POST, and $ilCtrl.

{
global $ilCtrl;
if (is_array($_POST["color"]))
{
foreach ($_POST["color"] as $c)
{
$this->object->removeColor($c);
}
}
$ilCtrl->redirect($this, "listColors");
}
ilObjStyleSheetGUI::deleteCoreCharMessage ( )

Message that appears, when user tries to delete core characteristics.

Parameters
@return

Definition at line 1324 of file class.ilObjStyleSheetGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, and ilObjStyleSheet\_getCoreStyles().

Referenced by deleteCharacteristicConfirmationObject().

{
global $ilCtrl, $tpl, $lng;
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($ilCtrl->getFormAction($this));
$cnt = 0;
foreach ($_POST["char"] as $char)
{
if (!empty($core_styles[$char]))
{
$cnt++;
$char_comp = explode(".", $char);
$cgui->addItem("", "", $char_comp[2]);
}
else
{
$cgui->addHiddenItem("char[]", $char);
}
}
$all_core_styles = ($cnt == count($_POST["char"]))
? true
: false;
if ($all_core_styles)
{
$cgui->setHeaderText($lng->txt("sty_all_styles_obligatory"));
$cgui->setCancel($lng->txt("back"), "cancelCharacteristicDeletion");
}
else
{
$cgui->setHeaderText($lng->txt("sty_some_styles_obligatory_delete_rest"));
$cgui->setCancel($lng->txt("cancel"), "cancelCharacteristicDeletion");
$cgui->setConfirm($lng->txt("sty_delete_other_selected"), "deleteCharacteristicConfirmation");
}
$tpl->setContent($cgui->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::deleteImageObject ( )

Delete images.

Definition at line 1258 of file class.ilObjStyleSheetGUI.php.

References $_POST, and $ilCtrl.

{
global $ilCtrl;
$images = $this->object->getImages();
foreach ($images as $image)
{
if (is_array($_POST["file"]) && in_array($image["entry"], $_POST["file"]))
{
$this->object->deleteImage($image["entry"]);
}
}
$ilCtrl->redirect($this, "listImages");
}
ilObjStyleSheetGUI::deleteObject (   $a_error = false)

display deletion confirmation screen

public

Reimplemented from ilObjectGUI.

Definition at line 773 of file class.ilObjStyleSheetGUI.php.

References ilObject\_lookupTitle(), ilUtil\getImagePath(), ilUtil\sendInfo(), and ilUtil\switchColor().

{
//$this->setTabs();
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.confirm_deletion.html");
if(!$a_error)
{
ilUtil::sendInfo($this->lng->txt("info_delete_sure"));
}
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
// BEGIN TABLE HEADER
$this->tpl->setCurrentBlock("table_header");
$this->tpl->setVariable("TEXT", $this->lng->txt("objects"));
$this->tpl->parseCurrentBlock();
// END TABLE HEADER
// BEGIN TABLE DATA
$counter = 0;
$this->tpl->setCurrentBlock("table_row");
$this->tpl->setVariable("IMG_OBJ",ilUtil::getImagePath("icon_styf.gif"));
$this->tpl->setVariable("CSS_ROW",ilUtil::switchColor(++$counter,"tblrow1","tblrow2"));
$this->tpl->setVariable("TEXT_CONTENT",ilObject::_lookupTitle($this->object->getId()));
$this->tpl->parseCurrentBlock();
// END TABLE DATA
// BEGIN OPERATION_BTN
$buttons = array("confirmedDelete" => $this->lng->txt("confirm"),
"cancelDelete" => $this->lng->txt("cancel"));
foreach ($buttons as $name => $value)
{
$this->tpl->setCurrentBlock("operation_btn");
$this->tpl->setVariable("IMG_ARROW",ilUtil::getImagePath("arrow_downright.gif"));
$this->tpl->setVariable("BTN_NAME",$name);
$this->tpl->setVariable("BTN_VALUE",$value);
$this->tpl->parseCurrentBlock();
}
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::deleteStyleParameterObject ( )

delete style parameters

Definition at line 841 of file class.ilObjStyleSheetGUI.php.

References $_POST, and editObject().

{
if (is_array($_POST["sty_select"]))
{
foreach($_POST["sty_select"] as $id => $dummy)
{
$this->object->deleteParameter($id);
}
}
$this->object->read();
$this->object->writeCSSFile();
$this->editObject();
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::deleteTemplateConfirmationObject ( )

Delete table template confirmation.

Definition at line 2199 of file class.ilObjStyleSheetGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, and ilUtil\sendInfo().

{
global $ilCtrl, $tpl, $lng;
if (!is_array($_POST["tid"]) || count($_POST["tid"]) == 0)
{
ilUtil::sendInfo($lng->txt("no_checkbox"), true);
$ilCtrl->redirect($this, "listTemplates");
}
else
{
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($ilCtrl->getFormAction($this));
$cgui->setHeaderText($lng->txt("sty_confirm_template_deletion"));
$cgui->setCancel($lng->txt("cancel"), "cancelTemplateDeletion");
$cgui->setConfirm($lng->txt("sty_del_template"), "deleteTemplate");
foreach ($_POST["tid"] as $tid)
{
$classes = $this->object->getTemplateClasses($tid);
$cl_str = "";
$listed = array();
foreach ($classes as $cl)
{
if ($cl != "" && !$listed[$cl])
{
$cl_str.= '<div>- '.
$cl."</div>";
$listed[$cl] = true;
}
}
if ($cl_str != "")
{
$cl_str = '<div style="padding-left:30px;" class="small">'.
"<div><i>".$lng->txt("sty_style_class")."</i></div>".$cl_str."</div>";
}
$cgui->addItem("tid[]", $tid, $this->object->lookupTemplateName($tid).$cl_str);
}
$cgui->addButton($lng->txt("sty_del_template_keep_classes"), "deleteTemplateKeepClasses");
$tpl->setContent($cgui->getHTML());
}
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::deleteTemplateKeepClassesObject ( )

Delete table template.

Definition at line 2258 of file class.ilObjStyleSheetGUI.php.

References $_POST, and $ilCtrl.

{
global $ilCtrl;
if (is_array($_POST["tid"]))
{
foreach ($_POST["tid"] as $tid)
{
$this->object->removeTemplate($tid);
}
}
$ilCtrl->redirect($this, "listTemplates");
}
ilObjStyleSheetGUI::deleteTemplateObject ( )

Delete table template.

Definition at line 2276 of file class.ilObjStyleSheetGUI.php.

References $_GET, $_POST, $ilCtrl, and ilObjStyleSheet\_determineTag().

{
global $ilCtrl;
if (is_array($_POST["tid"]))
{
foreach ($_POST["tid"] as $tid)
{
$cls = $this->object->getTemplateClasses($tid);
foreach ($cls as $k => $cls)
{
$ty = $this->object->determineTemplateStyleClassType($_GET["temp_type"], $k);
$this->object->deleteCharacteristic($ty, $ta, $cls);
}
$this->object->removeTemplate($tid);
}
}
$ilCtrl->redirect($this, "listTemplates");
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::displayTemplateEditForm ( )

Display table tempalte edit form.

Definition at line 2157 of file class.ilObjStyleSheetGUI.php.

References $_GET, ilObjectGUI\$tpl, getTemplatePreview(), and includeCSS().

Referenced by editTemplateObject(), and updateTemplateObject().

{
global $tpl;
$a_tpl = new ilTemplate("tpl.template_edit.html", true, true,
"Services/Style");
$this->includeCSS();
$a_tpl->setVariable("FORM", $this->form_gui->getHTML());
$a_tpl->setVariable("PREVIEW", $this->getTemplatePreview($_GET["temp_type"], $_GET["t_id"]));
$tpl->setContent($a_tpl->get());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::editColorObject ( )

Edit color.

Definition at line 1645 of file class.ilObjStyleSheetGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$tpl, getColorFormValues(), and initColorForm().

{
global $tpl, $ilCtrl;
$ilCtrl->setParameter($this, "c_name", $_GET["c_name"]);
$this->initColorForm("edit");
$tpl->setContent($this->form_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::editObject ( )

edit style sheet

Reimplemented from ilObjectGUI.

Definition at line 123 of file class.ilObjStyleSheetGUI.php.

References $_GET, $_SESSION, $ilCtrl, ilObjectGUI\$lng, $t, ilObjStyleSheet\_getStyleSuperTypes(), ilObjStyleSheet\_isExpandable(), includeCSS(), and setSubTabs().

Referenced by deleteStyleParameterObject(), newStyleParameterObject(), refreshObject(), and viewObject().

{
global $rbacsystem, $lng, $ilTabs, $ilCtrl, $ilToolbar;
$this->setSubTabs();
$this->includeCSS();
$ctpl = new ilTemplate("tpl.sty_classes.html", true, true, "Services/Style");
// output characteristics
$chars = $this->object->getCharacteristics();
$style_type = ($this->super_type != "")
? $this->super_type
: "text_block";
$ilCtrl->setParameter($this, "style_type", $style_type);
$ilTabs->setSubTabActive("sty_".$style_type."_char");
// add new style?
$subtypes = $all_super_types[$style_type];
$expandable = false;
foreach ($subtypes as $t)
{
{
$expandable = true;
}
}
if ($expandable)
{
$ilToolbar->addButton($lng->txt("sty_add_characteristic"),
$ilCtrl->getLinkTarget($this, "addCharacteristicForm"));
}
if ($_SESSION["sty_copy"] != "")
{
$style_cp = explode(":::", $_SESSION["sty_copy"]);
if ($style_cp[1] == $_GET["style_type"])
{
if ($expandable)
{
$ilToolbar->addSeparator();
}
$ilToolbar->addButton($lng->txt("sty_paste_style_classes"),
$ilCtrl->getLinkTarget($this, "pasteCharacteristicsOverview"));
}
}
include_once("./Services/Style/classes/class.ilStyleTableGUI.php");
$table_gui = new ilStyleTableGUI($this, "edit", $chars, $style_type,
$this->object);
$ctpl->setCurrentBlock("style_table");
$ctpl->setVariable("STYLE_TABLE", $table_gui->getHTML());
$ctpl->parseCurrentBlock();
$this->tpl->setContent($ctpl->get());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::editTagStyleObject ( )

Edit tag style.

Definition at line 475 of file class.ilObjStyleSheetGUI.php.

References $_GET, ilObjectGUI\$tpl, getValues(), initTagStyleForm(), and outputTagStyleEditScreen().

{
global $tpl;
$cur = explode(".",$_GET["tag"]);
$cur_tag = $cur[0];
$cur_class = $cur[1];
$this->initTagStyleForm("edit", $cur_tag);
$this->getValues();
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::editTemplateObject ( )

Edit table template.

Definition at line 1877 of file class.ilObjStyleSheetGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$tpl, displayTemplateEditForm(), getTemplateFormValues(), and initTemplateForm().

{
global $tpl, $ilCtrl;
$ilCtrl->setParameter($this, "t_id", $_GET["t_id"]);
$this->initTemplateForm("edit");
}

+ Here is the call graph for this function:

& ilObjStyleSheetGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Definition at line 50 of file class.ilObjStyleSheetGUI.php.

References $cmd, $ret, and ilObjectGUI\prepareOutput().

{
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd("edit");
$this->prepareOutput();
switch($next_class)
{
default:
$cmd.= "Object";
$ret =& $this->$cmd();
break;
}
return $ret;
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::exportStyleObject ( )

export style

Definition at line 717 of file class.ilObjStyleSheetGUI.php.

References $file, and ilUtil\deliverFile().

{
$file = $this->object->export();
ilUtil::deliverFile($file, "sty_".$this->object->getId().".zip");
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::extractParametersOfTag (   $a_tag,
  $a_class,
  $a_style,
  $a_type 
)

Definition at line 724 of file class.ilObjStyleSheetGUI.php.

Referenced by getValues().

{
$parameters = array();
foreach($a_style as $tag)
{
foreach($tag as $par)
{
if ($par["tag"] == $a_tag && $par["class"] == $a_class
&& $par["type"] == $a_type)
{
$parameters[$par["parameter"]] = $par["value"];
}
}
}
return $parameters;
}

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::generateTemplateObject ( )

Generate table template.

Definition at line 2301 of file class.ilObjStyleSheetGUI.php.

References ilObjectGUI\$tpl, and initTemplateGenerationForm().

{
global $tpl;
$tpl->setContent($this->form_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::getAdminTabs ( $tabs_gui)

admin and normal tabs are equal for roles

Reimplemented from ilObjectGUI.

Definition at line 976 of file class.ilObjStyleSheetGUI.php.

References getTabs().

{
$this->getTabs($tabs_gui);
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::getColorFormValues ( )

Set values for color editing.

Definition at line 1699 of file class.ilObjStyleSheetGUI.php.

References $_GET.

Referenced by editColorObject().

{
if ($_GET["c_name"] != "")
{
$values["color_name"] = $_GET["c_name"];
$values["color_code"] = $this->object->getColorCodeForName($_GET["c_name"]);
$this->form_gui->setValuesByArray($values);
}
}

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::getPropertiesValues ( )

Get current values for properties from.

Definition at line 232 of file class.ilObjStyleSheetGUI.php.

Referenced by propertiesObject().

{
$values = array();
$values["style_title"] = $this->object->getTitle();
$values["style_description"] = $this->object->getDescription();
$values["disable_auto_margins"] = (int) $this->object->lookupStyleSetting("disable_auto_margins");
$this->form->setValuesByArray($values);
}

+ Here is the caller graph for this function:

static ilObjStyleSheetGUI::getStyleExampleHTML (   $a_type,
  $a_class 
)
static

Get style example HTML.

Definition at line 1495 of file class.ilObjStyleSheetGUI.php.

References ilObjectGUI\$lng, and ilUtil\getImagePath().

Referenced by ilStyleTableGUI\fillRow(), and outputTagStyleEditScreen().

{
global $lng;
$c = explode(":", $a_class);
$a_class = $c[0];
$ex_tpl = new ilTemplate("tpl.style_example.html", true, true, "Services/Style");
$ex_tpl->setCurrentBlock("Example_".$a_type);
$ex_tpl->setVariable("EX_CLASS", "ilc_".$a_type."_".$a_class);
$ex_tpl->setVariable("EX_TEXT", "ABC abc 123");
if ($a_type == "media_cont")
{
$ex_tpl->setVariable("IMG_MEDIA_DISABLED", ilUtil::getImagePath("media_disabled.gif"));
}
if (in_array($a_type, array("table", "table_caption")))
{
$ex_tpl->setVariable("TXT_CAPTION", $lng->txt("sty_caption"));
}
$ex_tpl->parseCurrentBlock();
return $ex_tpl->get();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::getTabs ( $tabs_gui)

adds tabs to tab gui object

Parameters
object$tabs_guiilTabsGUI object

Reimplemented from ilObjectGUI.

Definition at line 1005 of file class.ilObjStyleSheetGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$lng, and $t.

Referenced by getAdminTabs(), and setTabs().

{
global $lng, $ilCtrl, $ilTabs;
if ($ilCtrl->getCmd() == "editTagStyle")
{
// back to upper context
$tabs_gui->setBackTarget($lng->txt("back"),
$ilCtrl->getLinkTarget($this, "edit"));
$t = explode(".", $_GET["tag"]);
$t2 = explode(":", $t[1]);
$pc = $this->object->_getPseudoClasses($t[0]);
if (is_array($pc) && count($pc) > 0)
{
// style classes
$ilCtrl->setParameter($this, "tag", $t[0].".".$t2[0]);
$tabs_gui->addTarget("sty_tag_normal",
$this->ctrl->getLinkTarget($this, "editTagStyle"), array("editTagStyle", ""),
get_class($this));
if ($t2[1] == "")
{
$ilTabs->setTabActive("sty_tag_normal");
}
foreach ($pc as $p)
{
// style classes
$ilCtrl->setParameter($this, "tag", $t[0].".".$t2[0].":".$p);
$tabs_gui->addTarget("sty_tag_".$p,
$this->ctrl->getLinkTarget($this, "editTagStyle"), array("editTagStyle", ""),
get_class($this));
if ($t2[1] == $p)
{
$ilTabs->setTabActive("sty_tag_".$p);
}
}
$ilCtrl->setParameter($this, "tag", $_GET["tag"]);
}
}
else
{
// back to upper context
$tabs_gui->setBackTarget($lng->txt("back"),
$this->ctrl->getLinkTarget($this, "returnToUpperContext"));
// style classes
$tabs_gui->addTarget("sty_style_chars",
$this->ctrl->getLinkTarget($this, "edit"), array("edit", ""),
get_class($this));
// colors
$tabs_gui->addTarget("sty_colors",
$this->ctrl->getLinkTarget($this, "listColors"), "listColors",
get_class($this));
// images
$tabs_gui->addTarget("sty_images",
$this->ctrl->getLinkTarget($this, "listImages"), "listImages",
get_class($this));
// table templates
$tabs_gui->addTarget("sty_templates",
$this->ctrl->getLinkTarget($this, "listTemplates"), "listTemplates",
get_class($this));
// settings
$tabs_gui->addTarget("settings",
$this->ctrl->getLinkTarget($this, "properties"), "properties",
get_class($this));
// accordiontest
/*
$tabs_gui->addTarget("accordiontest",
$this->ctrl->getLinkTarget($this, "accordiontest"), "accordiontest",
get_class($this));*/
}
}

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::getTemplateFormValues ( )

Set values for table template editing.

Definition at line 2180 of file class.ilObjStyleSheetGUI.php.

References $_GET, $t, and ilObjStyleSheet\_getTemplateClassTypes().

Referenced by editTemplateObject().

{
if ($_GET["t_id"] > 0)
{
$t = $this->object->getTemplate($_GET["t_id"]);
$values["name"] = $t["name"];
foreach ($scs as $k => $type)
{
$values[$k."_class"] = $t["classes"][$k];
}
$this->form_gui->setValuesByArray($values);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::getTemplatePreview (   $a_type,
  $a_t_id,
  $a_small_mode = false 
)

Get table template preview.

Definition at line 1891 of file class.ilObjStyleSheetGUI.php.

References _getTemplatePreview().

Referenced by displayTemplateEditForm(), saveTemplateObject(), templateGenerationObject(), and updateTemplateObject().

{
return $this->_getTemplatePreview(
$this->object, $a_type, $a_t_id, $a_small_mode);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::getValues ( )

FORM: Get current values from persistent object.

Definition at line 672 of file class.ilObjStyleSheetGUI.php.

References $_GET, ilObjStyleSheet\_getFilteredGroups(), ilObjStyleSheet\_getStyleParameters(), and extractParametersOfTag().

Referenced by editTagStyleObject().

{
$style = $this->object->getStyle();
$cur = explode(".",$_GET["tag"]);
$cur_tag = $cur[0];
$cur_class = $cur[1];
$cur_parameters = $this->extractParametersOfTag($cur_tag, $cur_class, $style, $_GET["style_type"]);
foreach($parameters as $p => $v)
{
if (is_array($filtered_groups[$v["group"]]) && !in_array($cur_tag, $filtered_groups[$v["group"]]))
{
continue;
}
$p = explode(".", $p);
$p = $p[0];
$input = $this->form_gui->getItemByPostVar($p);
switch ($v["input"])
{
case "":
break;
case "trbl_numeric":
case "border_width":
case "border_style":
case "trbl_color":
$input->setAllValue($cur_parameters[$v["subpar"][0]]);
$input->setTopValue($cur_parameters[$v["subpar"][1]]);
$input->setRightValue($cur_parameters[$v["subpar"][2]]);
$input->setBottomValue($cur_parameters[$v["subpar"][3]]);
$input->setLeftValue($cur_parameters[$v["subpar"][4]]);
break;
default:
$input->setValue($cur_parameters[$p]);
break;
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::ilObjStyleSheetGUI (   $a_data,
  $a_id,
  $a_call_by_reference,
  $a_prep = true 
)

Constructor public.

Definition at line 30 of file class.ilObjStyleSheetGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjStyleSheet\_getStyleSuperTypeForType(), and ilObjectGUI\ilObjectGUI().

{
global $ilCtrl, $lng, $tpl;
$this->ctrl =& $ilCtrl;
$this->lng =& $lng;
$this->lng->loadLanguageModule("style");
$ilCtrl->saveParameter($this, array("tag", "style_type", "temp_type"));
if ($_GET["style_type"] != "")
{
$this->super_type = ilObjStyleSheet::_getStyleSuperTypeForType($_GET["style_type"]);
}
$this->type = "sty";
$this->ilObjectGUI($a_data,$a_id,$a_call_by_reference, false);
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::importStyleObject ( )

import style sheet

Definition at line 920 of file class.ilObjStyleSheetGUI.php.

References $_GET, ilObjStyleSheet\_writeStandard(), and ilObjectFactory\getInstanceByRefId().

{
// check file
$source = $_FILES["stylefile"]["tmp_name"];
if (($source == 'none') || (!$source))
{
$this->ilias->raiseError("No file selected!",$this->ilias->error_obj->MESSAGE);
}
// check correct file type
$info = pathinfo($_FILES["stylefile"]["name"]);
if (strtolower($info["extension"]) != "zip" && strtolower($info["extension"]) != "xml")
{
$this->ilias->raiseError("File must be a zip or xml file!",$this->ilias->error_obj->MESSAGE);
}
$class_name = "ilObjStyleSheet";
require_once("./Services/Style/classes/class.ilObjStyleSheet.php");
$newObj = new ilObjStyleSheet();
//$newObj->setTitle();
//$newObj->setDescription($_POST["style_description"]);
$newObj->import($_FILES["stylefile"]);
//$newObj->createFromXMLFile($_FILES["stylefile"]["tmp_name"]);
// assign style to style sheet folder,
// if parent is style sheet folder
if ($_GET["ref_id"] > 0)
{
if ($fold->getType() == "stys")
{
$fold->addStyle($newObj->getId());
$fold->update();
ilObjStyleSheet::_writeStandard($newObj->getId(), "1");
$this->ctrl->redirectByClass("ilobjstylesettingsgui", "editContentStyles");
}
}
return $newObj->getId();
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::includeCSS ( )

Include CSS in output.

Definition at line 111 of file class.ilObjStyleSheetGUI.php.

Referenced by displayTemplateEditForm(), editObject(), and listTemplatesObject().

{
// set style sheet
$this->tpl->setCurrentBlock("ContentStyle");
$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
$this->object->getContentStylePath($this->object->getId()));
$this->tpl->parseCurrentBlock();
}

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::initCharacteristicForm (   $a_mode)

Init tag style editing form.

Parameters
int$a_modeForm Edit Mode (IL_FORM_EDIT | IL_FORM_CREATE)

Definition at line 1447 of file class.ilObjStyleSheetGUI.php.

References $ilCtrl, ilObjectGUI\$lng, $t, ilObjStyleSheet\_getStyleSuperTypes(), ilObjStyleSheet\_isExpandable(), ilSelectInputGUI\setOptions(), and ilRegExpInputGUI\setPattern().

Referenced by addCharacteristicFormObject(), and saveCharacteristicObject().

{
global $lng, $ilCtrl;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form_gui = new ilPropertyFormGUI();
// title
$txt_input = new ilRegExpInputGUI($lng->txt("title"), "new_characteristic");
$txt_input->setPattern("/^[a-zA-Z]+[a-zA-Z0-9]*$/");
$txt_input->setNoMatchMessage($lng->txt("sty_msg_characteristic_must_only_include")." A-Z, a-z, 1-9");
$txt_input->setRequired(true);
$this->form_gui->addItem($txt_input);
// type
$types = $all_super_types[$this->super_type];
$exp_types = array();
foreach($types as $t)
{
{
$exp_types[$t] = $lng->txt("sty_type_".$t);
}
}
if (count($exp_types) > 1)
{
$type_input = new ilSelectInputGUI($lng->txt("sty_type"), "type");
$type_input->setOptions($exp_types);
$type_input->setValue(key($exp_types));
$this->form_gui->addItem($type_input);
}
else if (count($exp_types) == 1)
{
$hid_input = new ilHiddenInputGUI("type");
$hid_input->setValue(key($exp_types));
$this->form_gui->addItem($hid_input);
}
$this->form_gui->setTitle($lng->txt("sty_add_characteristic"));
$this->form_gui->addCommandButton("saveCharacteristic", $lng->txt("save"));
$this->form_gui->addCommandButton("edit", $lng->txt("cancel"));
$this->form_gui->setFormAction($ilCtrl->getFormAction($this));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::initColorForm (   $a_mode = "create")

Init color form.

Definition at line 1659 of file class.ilObjStyleSheetGUI.php.

References $ilCtrl, ilObjectGUI\$lng, ilRegExpInputGUI\setPattern(), and ilFormPropertyGUI\setRequired().

Referenced by addColorObject(), editColorObject(), saveColorObject(), and updateColorObject().

{
global $lng, $ilCtrl;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form_gui = new ilPropertyFormGUI();
$this->form_gui->setTitle($lng->txt("sty_add_color"));
// name
$name_input = new ilRegExpInputGUI($lng->txt("sty_color_name"), "color_name");
$name_input->setPattern("/^[a-zA-Z]+[a-zA-Z0-9]*$/");
$name_input->setNoMatchMessage($lng->txt("sty_msg_color_must_only_include")." A-Z, a-z, 1-9");
$name_input->setRequired(true);
$name_input->setSize(15);
$name_input->setMaxLength(15);
$this->form_gui->addItem($name_input);
// code
$color_input = new ilColorPickerInputGUI($lng->txt("sty_color_code"), "color_code");
$color_input->setRequired(true);
$color_input->setDefaultColor("");
$this->form_gui->addItem($color_input);
if ($a_mode == "create")
{
$this->form_gui->addCommandButton("saveColor", $lng->txt("save"));
$this->form_gui->addCommandButton("cancelColorSaving", $lng->txt("cancel"));
}
else
{
$this->form_gui->addCommandButton("updateColor", $lng->txt("save"));
$this->form_gui->addCommandButton("cancelColorSaving", $lng->txt("cancel"));
}
$this->form_gui->setFormAction($ilCtrl->getFormAction($this));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::initImageForm ( )

Init image form.

Definition at line 1237 of file class.ilObjStyleSheetGUI.php.

References $ilCtrl, ilObjectGUI\$lng, and ilFormPropertyGUI\setRequired().

Referenced by addImageObject(), and uploadImageObject().

{
global $lng, $ilCtrl;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form_gui = new ilPropertyFormGUI();
$this->form_gui->setTitle($lng->txt("sty_add_image"));
$file_input = new ilImageFileInputGUI($lng->txt("sty_image_file"), "image_file");
$file_input->setRequired(true);
$this->form_gui->addItem($file_input);
$this->form_gui->addCommandButton("uploadImage", $lng->txt("upload"));
$this->form_gui->addCommandButton("cancelUpload", $lng->txt("cancel"));
$this->form_gui->setFormAction($ilCtrl->getFormAction($this));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::initPropertiesForm (   $a_mode = "edit")

FORM: Init properties form.

Parameters
int$a_modeEdit Mode

Definition at line 248 of file class.ilObjStyleSheetGUI.php.

References ilObjectGUI\$lng, ilFormPropertyGUI\setInfo(), and ilTextInputGUI\setMaxLength().

Referenced by propertiesObject(), and updateObject().

{
global $lng;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
// title
$ti = new ilTextInputGUI($this->lng->txt("title"), "style_title");
$ti->setMaxLength(128);
$ti->setSize(40);
$ti->setRequired(true);
$this->form->addItem($ti);
// description
$ta = new ilTextAreaInputGUI($this->lng->txt("description"), "style_description");
//$ta->setCols();
//$ta->setRows();
$this->form->addItem($ta);
// disable automatic margins for left/right alignment
$cb = new ilCheckboxInputGUI($this->lng->txt("sty_disable_auto_margins"), "disable_auto_margins");
$cb->setInfo($this->lng->txt("sty_disable_auto_margins_info"));
$this->form->addItem($cb);
// save and cancel commands
if ($a_mode == "create")
{
$this->form->addCommandButton("save", $lng->txt("save"));
$this->form->addCommandButton("cancelSave", $lng->txt("cancel"));
}
else
{
$this->form->addCommandButton("update", $lng->txt("save"));
}
$this->form->setTitle($lng->txt("edit_stylesheet"));
$this->form->setFormAction($this->ctrl->getFormAction($this));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::initTagStyleForm (   $a_mode,
  $a_cur_tag 
)

Init tag style editing form.

Parameters
int$a_modeForm Edit Mode (IL_FORM_EDIT | IL_FORM_CREATE)

Definition at line 523 of file class.ilObjStyleSheetGUI.php.

References ilObjectGUI\$lng, ilObjStyleSheet\_getFilteredGroups(), ilObjStyleSheet\_getStyleParameterInputType(), ilTRBLColorPickerInputGUI\setAcceptNamedColors(), ilNumericStyleValueInputGUI\setAllowPercentage(), ilTRBLNumericStyleValueInputGUI\setAllowPercentage(), ilColorPickerInputGUI\setDefaultColor(), ilBackgroundImageInputGUI\setImages(), ilTextInputGUI\setMaxLength(), ilNumberInputGUI\setMinValue(), and ilSelectInputGUI\setOptions().

Referenced by editTagStyleObject(), refreshTagStyleObject(), and updateTagStyleObject().

{
global $lng;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form_gui = new ilPropertyFormGUI();
$avail_pars = $this->object->getAvailableParameters();
$groups = $this->object->getStyleParameterGroups();
// output select lists
foreach ($groups as $k => $group)
{
// filter groups of properties that should only be
// displayed with matching tag
if (is_array($filtered_groups[$k]) && !in_array($a_cur_tag, $filtered_groups[$k]))
{
continue;
}
$sh->setTitle($lng->txt("sty_".$k));
$this->form_gui->addItem($sh);
foreach ($group as $par)
{
$basepar = explode(".", $par);
$basepar = $basepar[0];
$var = str_replace("-", "_", $basepar);
$up_par = strtoupper($var);
{
case "select":
$sel_input = new ilSelectInputGUI($lng->txt("sty_".$var), $basepar);
$options = array("" => "");
foreach ($avail_pars[$par] as $p)
{
$options[$p] = $p;
}
$sel_input->setOptions($options);
$this->form_gui->addItem($sel_input);
break;
case "text":
$text_input = new ilTextInputGUI($lng->txt("sty_".$var), $basepar);
$text_input->setMaxLength(200);
$text_input->setSize(20);
$this->form_gui->addItem($text_input);
break;
case "fontsize":
include_once("./Services/Style/classes/class.ilFontSizeInputGUI.php");
$fs_input = new ilFontSizeInputGUI($lng->txt("sty_".$var), $basepar);
$this->form_gui->addItem($fs_input);
break;
case "numeric_no_perc":
case "numeric":
include_once("./Services/Style/classes/class.ilNumericStyleValueInputGUI.php");
$num_input = new ilNumericStyleValueInputGUI($lng->txt("sty_".$var), $basepar);
if (ilObjStyleSheet::_getStyleParameterInputType($par) == "numeric_no_perc")
{
$num_input->setAllowPercentage(false);
}
$this->form_gui->addItem($num_input);
break;
case "percentage":
$per_input = new ilNumberInputGUI($lng->txt("sty_".$var), $basepar);
$per_input->setMinValue(0);
$per_input->setMaxValue(100);
$per_input->setMaxLength(3);
$per_input->setSize(3);
$this->form_gui->addItem($per_input);
break;
case "color":
//include_once("./Services/Style/classes/class.ilNumericStyleValueInputGUI.php");
$col_input = new ilColorPickerInputGUI($lng->txt("sty_".$var), $basepar);
$col_input->setDefaultColor("");
$col_input->setAcceptNamedColors(true);
$this->form_gui->addItem($col_input);
break;
case "trbl_numeric":
include_once("./Services/Style/classes/class.ilTRBLNumericStyleValueInputGUI.php");
$num_input = new ilTRBLNumericStyleValueInputGUI($lng->txt("sty_".$var), $basepar);
if (ilObjStyleSheet::_getStyleParameterInputType($par) == "trbl_numeric_no_perc")
{
$num_input->setAllowPercentage(false);
}
$this->form_gui->addItem($num_input);
break;
case "border_width":
include_once("./Services/Style/classes/class.ilTRBLBorderWidthInputGUI.php");
$bw_input = new ilTRBLBorderWidthInputGUI($lng->txt("sty_".$var), $basepar);
$this->form_gui->addItem($bw_input);
break;
case "border_style":
include_once("./Services/Style/classes/class.ilTRBLBorderStyleInputGUI.php");
$bw_input = new ilTRBLBorderStyleInputGUI($lng->txt("sty_".$var), $basepar);
$this->form_gui->addItem($bw_input);
break;
case "trbl_color":
include_once("./Services/Style/classes/class.ilTRBLColorPickerInputGUI.php");
$col_input = new ilTRBLColorPickerInputGUI($lng->txt("sty_".$var), $basepar);
$col_input->setAcceptNamedColors(true);
$this->form_gui->addItem($col_input);
break;
case "background_image":
include_once("./Services/Style/classes/class.ilBackgroundImageInputGUI.php");
$im_input = new ilBackgroundImageInputGUI($lng->txt("sty_".$var), $basepar);
$imgs = array();
foreach ($this->object->getImages() as $entry)
{
$imgs[] = $entry["entry"];
}
$im_input->setImages($imgs);
$this->form_gui->addItem($im_input);
break;
case "background_position":
include_once("./Services/Style/classes/class.ilBackgroundPositionInputGUI.php");
$im_input = new ilBackgroundPositionInputGUI($lng->txt("sty_".$var), $basepar);
$this->form_gui->addItem($im_input);
break;
}
}
}
// save and cancel commands
$this->form_gui->addCommandButton("updateTagStyle", $lng->txt("save_return"));
$this->form_gui->addCommandButton("refreshTagStyle", $lng->txt("save_refresh"));
// $this->form_gui->setTitle($lng->txt("edit"));
$this->form_gui->setFormAction($this->ctrl->getFormAction($this));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::initTemplateForm (   $a_mode = "create")

Init table template form.

Definition at line 2015 of file class.ilObjStyleSheetGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$lng, ilObjStyleSheet\_getTemplateClassTypes(), and ilRegExpInputGUI\setPattern().

Referenced by addTemplateObject(), editTemplateObject(), saveTemplateObject(), and updateTemplateObject().

{
global $lng, $ilCtrl;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form_gui = new ilPropertyFormGUI();
if ($a_mode == "create")
{
$this->form_gui->setTitle($lng->txt("sty_add_template"));
}
else
{
$this->form_gui->setTitle($lng->txt("sty_edit_template"));
}
// name
$name_input = new ilRegExpInputGUI($lng->txt("sty_template_name"), "name");
$name_input->setPattern("/^[a-zA-Z]+[a-zA-Z0-9]*$/");
$name_input->setNoMatchMessage($lng->txt("sty_msg_color_must_only_include")." A-Z, a-z, 1-9");
$name_input->setRequired(true);
$name_input->setSize(30);
$name_input->setMaxLength(30);
$this->form_gui->addItem($name_input);
// template style classes
foreach ($scs as $sc => $st)
{
$sc_input = new ilSelectInputGUI($lng->txt("sty_".$sc."_class"), $sc."_class");
$chars = $this->object->getCharacteristics($st);
$options = array("" => "");
foreach($chars as $char)
{
$options[$char] = $char;
}
$sc_input->setOptions($options);
$this->form_gui->addItem($sc_input);
}
if ($a_mode == "create")
{
$this->form_gui->addCommandButton("saveTemplate", $lng->txt("save"));
$this->form_gui->addCommandButton("cancelTemplateSaving", $lng->txt("cancel"));
}
else
{
$this->form_gui->addCommandButton("refreshTemplate", $lng->txt("save_refresh"));
$this->form_gui->addCommandButton("updateTemplate", $lng->txt("save_return"));
$this->form_gui->addCommandButton("cancelTemplateSaving", $lng->txt("cancel"));
}
$this->form_gui->setFormAction($ilCtrl->getFormAction($this));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::initTemplateGenerationForm ( )

Init table template generation form.

Definition at line 2312 of file class.ilObjStyleSheetGUI.php.

References $ilCtrl, ilObjectGUI\$lng, ilNumericStyleValueInputGUI\setAllowPercentage(), ilNumberInputGUI\setMaxValue(), ilSelectInputGUI\setOptions(), and ilRegExpInputGUI\setPattern().

Referenced by generateTemplateObject(), and templateGenerationObject().

{
global $lng, $ilCtrl;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form_gui = new ilPropertyFormGUI();
$this->form_gui->setTitle($lng->txt("sty_generate_template"));
// name
$name_input = new ilRegExpInputGUI($lng->txt("sty_template_name"), "name");
$name_input->setPattern("/^[a-zA-Z]+[a-zA-Z0-9]*$/");
$name_input->setNoMatchMessage($lng->txt("sty_msg_color_must_only_include")." A-Z, a-z, 1-9");
$name_input->setRequired(true);
$name_input->setSize(30);
$name_input->setMaxLength(30);
$this->form_gui->addItem($name_input);
// basic layout
$bl_input = new ilSelectInputGUI($lng->txt("sty_template_layout"), "layout");
$options = array(
"coloredZebra" => $lng->txt("sty_table_template_colored_zebra"),
"bwZebra" => $lng->txt("sty_table_template_bw_zebra"),
"noZebra" => $lng->txt("sty_table_template_no_zebra")
);
$bl_input->setOptions($options);
$this->form_gui->addItem($bl_input);
// top bottom padding
include_once("./Services/Style/classes/class.ilNumericStyleValueInputGUI.php");
$num_input = new ilNumericStyleValueInputGUI($lng->txt("sty_top_bottom_padding"), "tb_padding");
$num_input->setAllowPercentage(false);
$num_input->setValue("3px");
$this->form_gui->addItem($num_input);
// left right padding
$num_input = new ilNumericStyleValueInputGUI($lng->txt("sty_left_right_padding"), "lr_padding");
$num_input->setAllowPercentage(false);
$num_input->setValue("10px");
$this->form_gui->addItem($num_input);
// base color
$bc_input = new ilSelectInputGUI($lng->txt("sty_base_color"), "base_color");
$cs = $this->object->getColors();
$options = array();
foreach ($cs as $c)
{
$options[$c["name"]] = $c["name"];
}
$bc_input->setOptions($options);
$this->form_gui->addItem($bc_input);
// Lightness Settings
$lss = array("border" => 90, "header_text" => 70, "header_bg" => 0,
"cell1_text" => -60, "cell1_bg" => 90, "cell2_text" => -60, "cell2_bg" => 75);
foreach ($lss as $ls => $v)
{
$l_input = new ilNumberInputGUI($lng->txt("sty_lightness_".$ls), "lightness_".$ls);
$l_input->setMaxValue(100);
$l_input->setMinValue(-100);
$l_input->setValue($v);
$l_input->setSize(4);
$l_input->setMaxLength(4);
$this->form_gui->addItem($l_input);
}
$this->form_gui->addCommandButton("templateGeneration", $lng->txt("generate"));
$this->form_gui->addCommandButton("cancelTemplateSaving", $lng->txt("cancel"));
$this->form_gui->setFormAction($ilCtrl->getFormAction($this));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::listColorsObject ( )

List colors of style.

Definition at line 1620 of file class.ilObjStyleSheetGUI.php.

References ilObjectGUI\$tpl.

{
global $tpl;
include_once("./Services/Style/classes/class.ilStyleColorTableGUI.php");
$table_gui = new ilStyleColorTableGUI($this, "listColors",
$this->object);
$tpl->setContent($table_gui->getHTML());
}
ilObjStyleSheetGUI::listImagesObject ( )

List images of style.

Definition at line 1180 of file class.ilObjStyleSheetGUI.php.

References ilObjectGUI\$tpl.

{
global $tpl;
include_once("./Services/Style/classes/class.ilStyleImageTableGUI.php");
$table_gui = new ilStyleImageTableGUI($this, "listImages",
$this->object);
$tpl->setContent($table_gui->getHTML());
}
ilObjStyleSheetGUI::listTemplatesObject ( )

List templates.

Definition at line 1840 of file class.ilObjStyleSheetGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$tpl, includeCSS(), and setTemplatesSubTabs().

{
global $tpl, $ilTabs, $ilCtrl;
$ctype = $_GET["temp_type"];
if ($ctype == "")
{
$ctype = "table";
$ilCtrl->setParameter($this, "temp_type", $ctype);
$_GET["temp_type"] = $ctype;
}
$ilTabs->setSubTabActive("sty_".$ctype."_templates");
$this->includeCSS();
include_once("./Services/Style/classes/class.ilTableTemplatesTableGUI.php");
$table_gui = new ilTableTemplatesTableGUI($ctype, $this, "listTemplates",
$this->object);
$tpl->setContent($table_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::newStyleParameterObject ( )

add style parameter

Definition at line 744 of file class.ilObjStyleSheetGUI.php.

References $_POST, and editObject().

{
$this->object->addParameter($_POST["tag"], $_POST["parameter"]);
$this->editObject();
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::outputTagStyleEditScreen ( )

Output tag style edit screen.

Definition at line 491 of file class.ilObjStyleSheetGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, and getStyleExampleHTML().

Referenced by editTagStyleObject(), refreshTagStyleObject(), and updateTagStyleObject().

{
global $tpl, $ilCtrl, $lng;
// set style sheet
$tpl->setCurrentBlock("ContentStyle");
$tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
$this->object->getContentStylePath($this->object->getId()));
$ts_tpl = new ilTemplate("tpl.style_tag_edit.html", true, true, "Services/Style");
$cur = explode(".",$_GET["tag"]);
$cur_tag = $cur[0];
$cur_class = $cur[1];
$ts_tpl->setVariable("EXAMPLE",
ilObjStyleSheetGUI::getStyleExampleHTML($_GET["style_type"], $cur_class));
$ts_tpl->setVariable("FORM",
$this->form_gui->getHtml());
$tpl->setTitle($cur_class." (".$lng->txt("sty_type_".$_GET["style_type"]).")");
$tpl->setContent($ts_tpl->get());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::pasteCharacteristicsObject ( )

Paste characteristics.

Parameters
@return

Definition at line 1588 of file class.ilObjStyleSheetGUI.php.

References $_POST, $_SESSION, $ilCtrl, ilObjectGUI\$lng, ilObjStyleSheet\_writeUpToDate(), and ilUtil\sendSuccess().

{
global $ilCtrl, $lng;
if (is_array($_POST["title"]))
{
foreach ($_POST["title"] as $from_char => $to_title)
{
$fc = explode(".", $from_char);
if ($_POST["conflict_action"][$from_char] == "overwrite" ||
!$this->object->characteristicExists($to_title, $fc[0]))
{
$this->object->copyCharacteristic($_POST["from_style_id"],
$fc[0], $fc[2], $to_title);
}
}
ilObjStyleSheet::_writeUpToDate($this->object->getId(), false);
unset($_SESSION["sty_copy"]);
ilUtil::sendSuccess($lng->txt("sty_style_classes_copied"), true);
}
$ilCtrl->redirect($this, "edit");
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::pasteCharacteristicsOverviewObject ( )

Paste characteristics overview.

Parameters
@return

Definition at line 1570 of file class.ilObjStyleSheetGUI.php.

References ilObjectGUI\$tpl.

{
global $tpl, $ilTabs;
$ilTabs->clearTargets();
include_once("./Services/Style/classes/class.ilPasteStyleCharacteristicTableGUI.php");
$table = new ilPasteStyleCharacteristicTableGUI($this, "pasteCharacteristicsOverview");
$tpl->setContent($table->getHTML());
}
ilObjStyleSheetGUI::propertiesObject ( )

Properties.

Definition at line 187 of file class.ilObjStyleSheetGUI.php.

References ilObjectGUI\$lng, getPropertiesValues(), and initPropertiesForm().

{
global $rbacsystem, $lng;
// set style sheet
$this->tpl->setCurrentBlock("ContentStyle");
$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
$this->object->getContentStylePath($this->object->getId()));
$this->tpl->parseCurrentBlock();
// add button button
$this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
// export button
$this->tpl->setCurrentBlock("btn_cell");
$this->tpl->setVariable("BTN_LINK", $this->ctrl->getLinkTarget($this, "exportStyle"));
$this->tpl->setVariable("BTN_TXT",$this->lng->txt("export"));
$this->tpl->parseCurrentBlock();
$this->tpl->setContent($this->form->getHTML());
/*
$this->getTemplateFile("edit", "sty");
$this->tpl->setVariable("TXT_ACTION", $this->lng->txt("edit_stylesheet"));
// title and description
$this->tpl->setVariable("TXT_TITLE", $this->lng->txt("title"));
$this->tpl->setVariable(strtoupper("TITLE"), $this->object->getTitle());
$this->tpl->setVariable("TXT_DESC", $this->lng->txt("description"));
$this->tpl->setVariable(strtoupper("DESCRIPTION"), $this->object->getDescription());
$this->tpl->parseCurrentBlock();
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$this->tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
$this->tpl->setVariable("BTN_SAVE", "update");
$this->tpl->setVariable("TXT_REQUIRED_FLD", $this->lng->txt("required_field"));
*/
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::refreshObject ( )

refresh style sheet

Definition at line 753 of file class.ilObjStyleSheetGUI.php.

References $_POST, and editObject().

{
//$class_name = "ilObjStyleSheet";
//require_once("classes/class.ilObjStyleSheet.php");
$this->object->setTitle($_POST["style_title"]);
$this->object->setDescription($_POST["style_description"]);
foreach($_POST["styval"] as $id => $value)
{
$this->object->updateStyleParameter($id, $value);
}
$this->object->update();
$this->editObject();
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::refreshTagStyleObject ( )

save and refresh tag editing

Definition at line 317 of file class.ilObjStyleSheetGUI.php.

References $_GET, $ilCtrl, initTagStyleForm(), outputTagStyleEditScreen(), and saveTagStyle().

{
global $ilCtrl;
$cur = explode(".",$_GET["tag"]);
$cur_tag = $cur[0];
$cur_class = $cur[1];
$this->initTagStyleForm("edit", $cur_tag);
if ($this->form_gui->checkInput())
{
$this->saveTagStyle();
$ilCtrl->redirect($this, "editTagStyle");
}
else
{
$this->form_gui->setValuesByPost();
}
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::refreshTemplateObject ( )

Refresh table template.

Definition at line 2172 of file class.ilObjStyleSheetGUI.php.

References updateTemplateObject().

{
$this->updateTemplateObject(true);
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::returnToUpperContextObject ( )

return to upper context

Definition at line 2547 of file class.ilObjStyleSheetGUI.php.

References $_GET, and $ilCtrl.

{
global $ilCtrl;
if ($_GET["baseClass"] == "ilAdministrationGUI")
{
$ilCtrl->redirectByClass("ilobjstylesettingsgui", "editContentStyles");
}
$ilCtrl->returnToParent($this);
}
ilObjStyleSheetGUI::saveCharacteristicObject ( )

Save Characteristic.

Definition at line 1415 of file class.ilObjStyleSheetGUI.php.

References $_GET, $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjStyleSheet\_determineTag(), initCharacteristicForm(), and ilUtil\sendInfo().

{
global $ilCtrl, $tpl, $lng;
$this->initCharacteristicForm("create");
if ($this->form_gui->checkInput())
{
if ($this->object->characteristicExists($_POST["new_characteristic"], $_GET["style_type"]))
{
$char_input = $this->form_gui->getItemByPostVar("new_characteristic");
$char_input->setAlert($lng->txt("sty_characteristic_already_exists"));
}
else
{
$this->object->addCharacteristic($_POST["type"], $_POST["new_characteristic"]);
ilUtil::sendInfo($lng->txt("sty_added_characteristic"), true);
$ilCtrl->setParameter($this, "tag",
ilObjStyleSheet::_determineTag($_POST["type"]).".".$_POST["new_characteristic"]);
$ilCtrl->setParameter($this, "style_type", $_POST["type"]);
$ilCtrl->redirect($this, "editTagStyle");
}
}
$this->form_gui->setValuesByPost();
$tpl->setContent($this->form_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::saveColorObject ( )

Save color.

Definition at line 1722 of file class.ilObjStyleSheetGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, and initColorForm().

{
global $tpl, $ilCtrl, $lng;
$this->initColorForm();
if ($this->form_gui->checkInput())
{
if ($this->object->colorExists($_POST["color_name"]))
{
$col_input = $this->form_gui->getItemByPostVar("color_name");
$col_input->setAlert($lng->txt("sty_color_already_exists"));
}
else
{
$this->object->addColor($_POST["color_name"],
$_POST["color_code"]);
$ilCtrl->redirect($this, "listColors");
}
}
$this->form_gui->setValuesByPost();
$tpl->setContent($this->form_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::saveHideStatusObject ( )

Save hide status for characteristics.

Definition at line 1523 of file class.ilObjStyleSheetGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, and ilUtil\sendInfo().

{
global $ilCtrl, $lng;
//var_dump($_POST);
foreach ($_POST["all_chars"] as $char)
{
$ca = explode(".", $char);
$this->object->saveHideStatus($ca[0], $ca[2],
(is_array($_POST["hide"]) && in_array($char, $_POST["hide"])));
}
ilUtil::sendInfo($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "edit");
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::saveObject ( )

save style sheet

Reimplemented from ilObjectGUI.

Definition at line 858 of file class.ilObjStyleSheetGUI.php.

References $_GET, $_POST, ilObjStyleSheet\_writeStandard(), ilObjectFactory\getInstanceByRefId(), and ilUtil\stripSlashes().

{
//echo "HH"; exit;
$class_name = "ilObjStyleSheet";
require_once("./Services/Style/classes/class.ilObjStyleSheet.php");
$newObj = new ilObjStyleSheet();
$newObj->setTitle("-");
$newObj->create();
$newObj->setTitle(ilUtil::stripSlashes($_POST["style_title"]));
$newObj->setDescription(ilUtil::stripSlashes($_POST["style_description"]));
$newObj->update();
// assign style to style sheet folder,
// if parent is style sheet folder
if ($_GET["ref_id"] > 0)
{
if ($fold->getType() == "stys")
{
$fold->addStyle($newObj->getId());
$fold->update();
ilObjStyleSheet::_writeStandard($newObj->getId(), "1");
$this->ctrl->redirectByClass("ilobjstylesettingsgui", "editContentStyles");
}
}
return $newObj->getId();
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::saveTagStyle ( )

Save tag style.

Definition at line 366 of file class.ilObjStyleSheetGUI.php.

References $_GET, $_POST, $in, ilObjStyleSheet\_getStyleParameters(), and writeStylePar().

Referenced by refreshTagStyleObject(), and updateTagStyleObject().

{
$cur = explode(".", $_GET["tag"]);
$cur_tag = $cur[0];
$cur_class = $cur[1];
$avail_pars = ilObjStyleSheet::_getStyleParameters($cur_tag);
foreach ($avail_pars as $par => $v)
{
$var = str_replace("-", "_", $par);
$basepar_arr = explode(".", $par);
$basepar = $basepar_arr[0];
//var_dump($basepar_arr);
if ($basepar_arr[1] != "" && $basepar_arr[1] != $cur_tag)
{
continue;
}
switch ($v["input"])
{
case "fontsize":
case "numeric_no_perc":
case "numeric":
case "background_image":
$in = $this->form_gui->getItemByPostVar($basepar);
//echo "<br>-".$cur_tag."-".$cur_class."-".$basepar."-".$_GET["style_type"]."-";
$this->writeStylePar($cur_tag, $cur_class, $basepar, $in->getValue(), $_GET["style_type"]);
break;
case "color":
$color = trim($_POST[$basepar]);
if ($color != "" && trim(substr($color,0,1) != "!"))
{
$color = "#".$color;
}
$this->writeStylePar($cur_tag, $cur_class, $basepar, $color, $_GET["style_type"]);
break;
case "trbl_numeric":
case "border_width":
case "border_style":
$in = $this->form_gui->getItemByPostVar($basepar);
$this->writeStylePar($cur_tag, $cur_class, $v["subpar"][0], $in->getAllValue(), $_GET["style_type"]);
$this->writeStylePar($cur_tag, $cur_class, $v["subpar"][1], $in->getTopValue(), $_GET["style_type"]);
$this->writeStylePar($cur_tag, $cur_class, $v["subpar"][2], $in->getRightValue(), $_GET["style_type"]);
$this->writeStylePar($cur_tag, $cur_class, $v["subpar"][3], $in->getBottomValue(), $_GET["style_type"]);
$this->writeStylePar($cur_tag, $cur_class, $v["subpar"][4], $in->getLeftValue(), $_GET["style_type"]);
break;
case "trbl_color":
$in = $this->form_gui->getItemByPostVar($basepar);
$tblr_p = array (0 => "getAllValue", 1 => "getTopValue", 2 => "getRightValue",
3 => "getBottomValue", 4 => "getLeftValue");
foreach ($tblr_p as $k => $func)
{
$val = trim($in->$func());
$val = (($in->getAcceptNamedColors() && substr($val, 0, 1) == "!")
|| $val == "")
? $val
: "#".$val;
$this->writeStylePar($cur_tag, $cur_class, $v["subpar"][$k], $val, $_GET["style_type"]);
}
/*$this->writeStylePar($cur_tag, $cur_class, $v["subpar"][0],
trim($in->getAllValue() != "") ? "#".$in->getAllValue() : "", $_GET["style_type"]);
$this->writeStylePar($cur_tag, $cur_class, $v["subpar"][1],
trim($in->getTopValue() != "") ? "#".$in->getTopValue() : "", $_GET["style_type"]);
$this->writeStylePar($cur_tag, $cur_class, $v["subpar"][2],
trim($in->getRightValue() != "") ? "#".$in->getRightValue() : "", $_GET["style_type"]);
$this->writeStylePar($cur_tag, $cur_class, $v["subpar"][3],
trim($in->getBottomValue() != "") ? "#".$in->getBottomValue() : "", $_GET["style_type"]);
$this->writeStylePar($cur_tag, $cur_class, $v["subpar"][4],
trim($in->getLeftValue() != "") ? "#".$in->getLeftValue() : "", $_GET["style_type"]);
*/
break;
case "background_position":
$in = $this->form_gui->getItemByPostVar($basepar);
$this->writeStylePar($cur_tag, $cur_class, $basepar, $in->getValue(), $_GET["style_type"]);
break;
default:
$this->writeStylePar($cur_tag, $cur_class, $basepar, $_POST[$basepar], $_GET["style_type"]);
break;
}
}
$this->object->update();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::saveTemplateObject ( )

Save table template.

Definition at line 2083 of file class.ilObjStyleSheetGUI.php.

References $_GET, $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjStyleSheet\_getTemplateClassTypes(), getTemplatePreview(), and initTemplateForm().

{
global $tpl, $ilCtrl, $lng;
$this->initTemplateForm();
if ($this->form_gui->checkInput())
{
if ($this->object->templateExists($_POST["name"]))
{
$name_input = $this->form_gui->getItemByPostVar("name");
$name_input->setAlert($lng->txt("sty_table_template_already_exists"));
}
else
{
$classes = array();
foreach (ilObjStyleSheet::_getTemplateClassTypes($_GET["temp_type"]) as $tct => $ct)
{
$classes[$tct] = $_POST[$tct."_class"];
}
$t_id = $this->object->addTemplate($_GET["temp_type"], $_POST["name"], $classes);
$this->object->writeTemplatePreview($t_id,
$this->getTemplatePreview($_GET["temp_type"], $t_id, true));
$ilCtrl->redirect($this, "listTemplates");
}
}
$this->form_gui->setValuesByPost();
$tpl->setContent($this->form_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::setSubTabs ( )

adds tabs to tab gui object

Parameters
object$tabs_guiilTabsGUI object

Definition at line 1090 of file class.ilObjStyleSheetGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$lng, and ilObjStyleSheet\_getStyleSuperTypes().

Referenced by editObject().

{
global $lng, $ilTabs, $ilCtrl;
foreach ($types as $super_type => $types)
{
// text block characteristics
$ilCtrl->setParameter($this, "style_type", $super_type);
$ilTabs->addSubTabTarget("sty_".$super_type."_char",
$this->ctrl->getLinkTarget($this, "edit"), array("edit", ""),
get_class($this));
}
$ilCtrl->setParameter($this, "style_type", $_GET["style_type"]);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::setTabs ( )

output tabs

Reimplemented from ilObjectGUI.

Definition at line 984 of file class.ilObjStyleSheetGUI.php.

References ilObjectGUI\$lng, and getTabs().

{
global $lng;
$this->getTabs($this->tabs_gui);
if (strtolower(get_class($this->object)) == "ilobjstylesheet")
{
$this->tpl->setVariable("HEADER", $this->object->getTitle());
}
else
{
$this->tpl->setVariable("HEADER", $lng->txt("create_stylesheet"));
}
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::setTemplatesSubTabs ( )

adds tabs to tab gui object

Parameters
object$tabs_guiilTabsGUI object

Definition at line 1113 of file class.ilObjStyleSheetGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$lng, $t, and ilObjStyleSheet\_getTemplateClassTypes().

Referenced by listTemplatesObject().

{
global $lng, $ilTabs, $ilCtrl;
foreach ($types as $t => $c)
{
$ilCtrl->setParameter($this, "temp_type", $t);
$ilTabs->addSubTabTarget("sty_".$t."_templates",
$this->ctrl->getLinkTarget($this, "listTemplates"), array("listTemplates", ""),
get_class($this));
}
$ilCtrl->setParameter($this, "temp_type", $_GET["temp_type"]);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::showUpperIcon ( )

Reimplemented from ilObjectGUI.

Definition at line 1161 of file class.ilObjStyleSheetGUI.php.

References $_GET, ilObjectGUI\$objDefinition, ilObjectGUI\$tpl, and ilObjectGUI\$tree.

{
if (strtolower($_GET["baseClass"]) == "iladministrationgui")
{
$tpl->setUpperIcon(
$this->ctrl->getLinkTargetByClass("ilobjstylesettingsgui",
"editContentStyles"));
}
else
{
// ?
}
}
ilObjStyleSheetGUI::templateGenerationObject ( )

Table template generation.

Definition at line 2386 of file class.ilObjStyleSheetGUI.php.

References $_GET, $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, getTemplatePreview(), and initTemplateGenerationForm().

{
global $tpl, $ilCtrl, $lng;
if ($this->form_gui->checkInput())
{
if ($this->object->templateExists($_POST["name"]))
{
$name_input = $this->form_gui->getItemByPostVar("name");
$name_input->setAlert($lng->txt("sty_table_template_already_exists"));
}
else
{
// -> move to application class!
// cell classes
$cells = array("H" => "header", "C1" => "cell1", "C2" => "cell2");
$tb_p = $this->form_gui->getItemByPostVar("tb_padding");
$tb_padding = $tb_p->getValue();
$lr_p = $this->form_gui->getItemByPostVar("lr_padding");
$lr_padding = $lr_p->getValue();
$cell_color = $_POST["base_color"];
// use mid gray as cell color for bw zebra
if ($_POST["layout"] == "bwZebra")
{
$cell_color = "MidGray";
if (!$this->object->colorExists($cell_color))
{
$this->object->addColor($cell_color, "7F7F7F");
}
$this->object->updateColor($cell_color, $cell_color, "7F7F7F");
}
foreach ($cells as $k => $cell)
{
$cell_class[$k] = $_POST["name"].$k;
if (!$this->object->characteristicExists($cell_class[$k], "table_cell"))
{
$this->object->addCharacteristic("table_cell", $cell_class[$k], true);
}
if ($_POST["layout"] == "bwZebra" && $k == "H")
{
$this->object->replaceStylePar("td", $cell_class[$k], "color",
"!".$_POST["base_color"]."(".$_POST["lightness_".$cell."_text"].")", "table_cell");
$this->object->replaceStylePar("td", $cell_class[$k], "background-color",
"!".$_POST["base_color"]."(".$_POST["lightness_".$cell."_bg"].")", "table_cell");
}
else
{
$this->object->replaceStylePar("td", $cell_class[$k], "color",
"!".$cell_color."(".$_POST["lightness_".$cell."_text"].")", "table_cell");
$this->object->replaceStylePar("td", $cell_class[$k], "background-color",
"!".$cell_color."(".$_POST["lightness_".$cell."_bg"].")", "table_cell");
}
$this->object->replaceStylePar("td", $cell_class[$k], "padding-top",
$tb_padding, "table_cell");
$this->object->replaceStylePar("td", $cell_class[$k], "padding-bottom",
$tb_padding, "table_cell");
$this->object->replaceStylePar("td", $cell_class[$k], "padding-left",
$lr_padding, "table_cell");
$this->object->replaceStylePar("td", $cell_class[$k], "padding-right",
$lr_padding, "table_cell");
$this->object->replaceStylePar("td", $cell_class[$k], "border-width",
"1px", "table_cell");
$this->object->replaceStylePar("td", $cell_class[$k], "border-style",
"solid", "table_cell");
$this->object->replaceStylePar("td", $cell_class[$k], "border-color",
"!".$cell_color."(".$_POST["lightness_border"].")", "table_cell");
$this->object->replaceStylePar("td", $cell_class[$k], "font-weight",
"normal", "table_cell");
}
// table class
$classes["table"] = $_POST["name"]."T";
if (!$this->object->characteristicExists($classes["table"], "table"))
{
$this->object->addCharacteristic("table", $classes["table"], true);
}
$this->object->replaceStylePar("table", $classes["table"], "caption-side",
"bottom", "table");
$this->object->replaceStylePar("table", $classes["table"], "border-collapse",
"collapse", "table");
$this->object->replaceStylePar("table", $classes["table"], "margin-top",
"5px", "table");
$this->object->replaceStylePar("table", $classes["table"], "margin-bottom",
"5px", "table");
if ($_POST["layout"] == "bwZebra")
{
$this->object->replaceStylePar("table", $classes["table"], "border-bottom-color",
"!".$_POST["base_color"], "table");
$this->object->replaceStylePar("table", $classes["table"], "border-bottom-style",
"solid", "table");
$this->object->replaceStylePar("table", $classes["table"], "border-bottom-width",
"3px", "table");
$sb = array("left", "right", "top");
foreach ($sb as $b)
{
$this->object->replaceStylePar("table", $classes["table"], "border-".$b."-width",
"0px", "table");
}
}
switch ($_POST["layout"])
{
case "coloredZebra":
$classes["row_head"] = $cell_class["H"];
$classes["odd_row"] = $cell_class["C1"];
$classes["even_row"] = $cell_class["C2"];
break;
case "bwZebra":
$classes["row_head"] = $cell_class["H"];
$classes["odd_row"] = $cell_class["C1"];
$classes["even_row"] = $cell_class["C2"];
break;
case "noZebra":
$classes["row_head"] = $cell_class["H"];
$classes["odd_row"] = $cell_class["C1"];
$classes["even_row"] = $cell_class["C1"];
$classes["col_head"] = $cell_class["C2"];
break;
}
$t_id = $this->object->addTemplate($_GET["temp_type"],
$_POST["name"], $classes);
$this->object->writeTemplatePreview($t_id,
$this->getTemplatePreview($_GET["temp_type"], $t_id, true));
$ilCtrl->redirect($this, "listTemplates");
}
}
$this->form_gui->setValuesByPost();
$tpl->setContent($this->form_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::updateColorObject ( )

Update color.

Definition at line 1749 of file class.ilObjStyleSheetGUI.php.

References $_GET, $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, and initColorForm().

{
global $tpl, $ilCtrl, $lng;
$this->initColorForm("edit");
if ($this->form_gui->checkInput())
{
if ($this->object->colorExists($_POST["color_name"]) &&
$_POST["color_name"] != $_GET["c_name"])
{
$col_input = $this->form_gui->getItemByPostVar("color_name");
$col_input->setAlert($lng->txt("sty_color_already_exists"));
}
else
{
$this->object->updateColor($_GET["c_name"], $_POST["color_name"],
$_POST["color_code"]);
$ilCtrl->redirect($this, "listColors");
}
}
$ilCtrl->setParameter($this, "c_name", $_GET["c_name"]);
$this->form_gui->setValuesByPost();
$tpl->setContent($this->form_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::updateObject ( )

Update properties.

Reimplemented from ilObjectGUI.

Definition at line 292 of file class.ilObjStyleSheetGUI.php.

References $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, initPropertiesForm(), and ilUtil\sendInfo().

{
global $lng, $ilCtrl, $tpl;
$this->initPropertiesForm("edit");
if ($this->form->checkInput())
{
$this->object->setTitle($this->form->getInput("style_title"));
$this->object->setDescription($this->form->getInput("style_description"));
$this->object->writeStyleSetting("disable_auto_margins",
$this->form->getInput("disable_auto_margins"));
$this->object->update();
ilUtil::sendInfo($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "properties");
}
else
{
$this->form->setValuesByPost();
$tpl->setContent($this->form->getHtml());
}
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::updateTagStyleObject ( )

save and refresh tag editing

Definition at line 342 of file class.ilObjStyleSheetGUI.php.

References $_GET, $ilCtrl, initTagStyleForm(), outputTagStyleEditScreen(), and saveTagStyle().

{
global $ilCtrl;
$cur = explode(".",$_GET["tag"]);
$cur_tag = $cur[0];
$cur_class = $cur[1];
$this->initTagStyleForm("edit", $cur_tag);
if ($this->form_gui->checkInput())
{
$this->saveTagStyle();
$ilCtrl->redirect($this, "edit");
}
else
{
$this->form_gui->setValuesByPost();
}
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::updateTemplateObject (   $a_refresh = false)

Update table template.

Definition at line 2116 of file class.ilObjStyleSheetGUI.php.

References $_GET, $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjStyleSheet\_getTemplateClassTypes(), displayTemplateEditForm(), getTemplatePreview(), initTemplateForm(), and ilObjStyleSheet\lookupTemplateName().

Referenced by refreshTemplateObject().

{
global $tpl, $ilCtrl, $lng;
$ilCtrl->setParameter($this, "t_id", $_GET["t_id"]);
$this->initTemplateForm("edit");
if ($this->form_gui->checkInput())
{
if ($this->object->templateExists($_POST["name"]) &&
{
$name_input = $this->form_gui->getItemByPostVar("name");
$name_input->setAlert($lng->txt("sty_template_already_exists"));
}
else
{
$classes = array();
foreach (ilObjStyleSheet::_getTemplateClassTypes($_GET["temp_type"]) as $tct => $ct)
{
$classes[$tct] = $_POST[$tct."_class"];
}
$this->object->updateTemplate($_GET["t_id"],
$_POST["name"], $classes);
$this->object->writeTemplatePreview($_GET["t_id"],
$this->getTemplatePreview($_GET["temp_type"], $_GET["t_id"], true));
if(!$a_refresh)
{
$ilCtrl->redirect($this, "listTemplates");
}
}
}
$this->form_gui->setValuesByPost();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSheetGUI::uploadImageObject ( )

Upload image.

Definition at line 1215 of file class.ilObjStyleSheetGUI.php.

References $ilCtrl, ilObjectGUI\$tpl, and initImageForm().

{
global $tpl, $ilCtrl;
$this->initImageForm();
if ($this->form_gui->checkInput())
{
$this->object->uploadImage($_FILES["image_file"]);
$ilCtrl->redirect($this, "listImages");
}
else
{
//$this->form_gui->setImageFormValuesByPost();
$tpl->setContent($this->form_gui->getHTML());
}
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::viewObject ( )

list childs of current object

public

Reimplemented from ilObjectGUI.

Definition at line 67 of file class.ilObjStyleSheetGUI.php.

References editObject().

{
$this->editObject();
}

+ Here is the call graph for this function:

ilObjStyleSheetGUI::writeStylePar (   $cur_tag,
  $cur_class,
  $par,
  $value,
  $a_type 
)

Definition at line 454 of file class.ilObjStyleSheetGUI.php.

Referenced by saveTagStyle().

{
if ($a_type == "")
{
return;
}
if ($value != "")
{
$this->object->replaceStylePar($cur_tag, $cur_class, $par, $value, $a_type);
}
else
{
$this->object->deleteStylePar($cur_tag, $cur_class, $par, $a_type);
}
}

+ Here is the caller graph for this function:

Field Documentation

ilObjStyleSheetGUI::$cmd_delete

Definition at line 24 of file class.ilObjStyleSheetGUI.php.

ilObjStyleSheetGUI::$cmd_new_par

Definition at line 22 of file class.ilObjStyleSheetGUI.php.

ilObjStyleSheetGUI::$cmd_refresh

Definition at line 23 of file class.ilObjStyleSheetGUI.php.

ilObjStyleSheetGUI::$cmd_update

Definition at line 21 of file class.ilObjStyleSheetGUI.php.


The documentation for this class was generated from the following file: