ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
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. More...
 
executeCommand ()
 execute command More...
 
 viewObject ()
 
 createObject ()
 create More...
 
 includeCSS ()
 Include CSS in output. More...
 
 editObject ()
 edit style sheet More...
 
 propertiesObject ()
 Properties. More...
 
 getPropertiesValues ()
 Get current values for properties from. More...
 
 initPropertiesForm ($a_mode="edit")
 FORM: Init properties form. More...
 
 updateObject ()
 Update properties. More...
 
 refreshTagStyleObject ()
 save and refresh tag editing More...
 
 updateTagStyleObject ()
 save and refresh tag editing More...
 
 saveTagStyle ()
 Save tag style. More...
 
 writeStylePar ($cur_tag, $cur_class, $par, $value, $a_type, $a_mq_id, $a_custom=false)
 
 editTagStyleObject ()
 Edit tag style. More...
 
 switchMQueryObject ()
 Switch media query. More...
 
 outputTagStyleEditScreen ()
 Output tag style edit screen. More...
 
 initTagStyleForm ($a_mode, $a_cur_tag)
 Init tag style editing form. More...
 
 getValues ()
 FORM: Get current values from persistent object. More...
 
 exportStyleObject ()
 export style More...
 
 extractParametersOfTag ($a_tag, $a_class, $a_style, $a_type, $a_mq_id=0, $a_custom=false)
 
 newStyleParameterObject ()
 add style parameter More...
 
 refreshObject ()
 refresh style sheet More...
 
 deleteObject ($a_error=false)
 display deletion confirmation screen More...
 
 cancelDeleteObject ()
 cancel oobject deletion More...
 
 confirmedDeleteObject ()
 delete selected style objects More...
 
 deleteStyleParameterObject ()
 delete style parameters More...
 
 saveObject ()
 save style sheet More...
 
 copyStyleObject ()
 save style sheet More...
 
 importStyleObject ()
 import style sheet More...
 
 cancelObject ()
 update style sheet More...
 
 getAdminTabs (&$tabs_gui)
 admin and normal tabs are equal for roles More...
 
 setTabs ()
 output tabs More...
 
 getTabs (&$tabs_gui)
 adds tabs to tab gui object More...
 
 setSubTabs ()
 adds tabs to tab gui object More...
 
 setTemplatesSubTabs ()
 adds tabs to tab gui object More...
 
 addAdminLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 showUpperIcon ()
 
 listImagesObject ()
 List images of style. More...
 
 addImageObject ()
 Add an image. More...
 
 cancelUploadObject ()
 Cancel Upload. More...
 
 uploadImageObject ()
 Upload image. More...
 
 initImageForm ()
 Init image form. More...
 
 deleteImageObject ()
 Delete images. More...
 
 deleteCharacteristicConfirmationObject ()
 Characteristic deletion confirmation screen. More...
 
 deleteCoreCharMessage ()
 Message that appears, when user tries to delete core characteristics. More...
 
 cancelCharacteristicDeletionObject ()
 Cancel characteristic deletion. More...
 
 deleteCharacteristicObject ()
 Delete one or multiple style characteristic. More...
 
 addCharacteristicFormObject ()
 Add characteristic. More...
 
 saveCharacteristicObject ()
 Save Characteristic. More...
 
 initCharacteristicForm ($a_mode)
 Init tag style editing form. More...
 
 saveHideStatusObject ()
 Save hide status for characteristics. More...
 
 copyCharacteristicsObject ()
 Copy style classes. More...
 
 pasteCharacteristicsOverviewObject ()
 Paste characteristics overview. More...
 
 pasteCharacteristicsObject ()
 Paste characteristics. More...
 
 listColorsObject ()
 List colors of style. More...
 
 addColorObject ()
 Add a color. More...
 
 editColorObject ()
 Edit color. More...
 
 initColorForm ($a_mode="create")
 Init color form. More...
 
 getColorFormValues ()
 Set values for color editing. More...
 
 cancelColorSavingObject ()
 Cancel color saving. More...
 
 saveColorObject ()
 Save color. More...
 
 updateColorObject ()
 Update color. More...
 
 deleteColorConfirmationObject ()
 Delete color confirmation. More...
 
 cancelColorDeletionObject ()
 Cancel color deletion. More...
 
 deleteColorObject ()
 Delete colors. More...
 
 listMediaQueriesObject ()
 List media queries of style. More...
 
 addMediaQueryObject ()
 Add a media query. More...
 
 editMediaQueryObject ()
 Edit media query. More...
 
 initMediaQueryForm ($a_mode="create")
 Init media query form. More...
 
 getMediaQueryFormValues ()
 Set values for media query editing. More...
 
 saveMediaQueryObject ()
 Save media query. More...
 
 updateMediaQueryObject ()
 Update media query. More...
 
 deleteMediaQueryConfirmationObject ()
 Confirm media query deletion. More...
 
 deleteMediaQueriesObject ()
 Delete Media Queries. More...
 
 saveMediaQueryOrderObject ()
 Save media query order. More...
 
 listTemplatesObject ()
 List templates. More...
 
 addTemplateObject ()
 Add template. More...
 
 editTemplateObject ()
 Edit table template. More...
 
 getTemplatePreview ($a_type, $a_t_id, $a_small_mode=false)
 Get table template preview. More...
 
 _getTemplatePreview ($a_style, $a_type, $a_t_id, $a_small_mode=false)
 Get table template preview. More...
 
 initTemplateForm ($a_mode="create")
 Init table template form. More...
 
 cancelTemplateSavingObject ()
 Cancel color saving. More...
 
 saveTemplateObject ()
 Save table template. More...
 
 updateTemplateObject ($a_refresh=false)
 Update table template. More...
 
 displayTemplateEditForm ()
 Display table tempalte edit form. More...
 
 refreshTemplateObject ()
 Refresh table template. More...
 
 getTemplateFormValues ()
 Set values for table template editing. More...
 
 deleteTemplateConfirmationObject ()
 Delete table template confirmation. More...
 
 cancelTemplateDeletionObject ()
 Cancel table template deletion. More...
 
 deleteTemplateKeepClassesObject ()
 Delete table template. More...
 
 deleteTemplateObject ()
 Delete table template. More...
 
 generateTemplateObject ()
 Generate table template. More...
 
 initTemplateGenerationForm ()
 Init table template generation form. More...
 
 templateGenerationObject ()
 Table template generation. More...
 
 accordiontestObject ()
 
 returnToUpperContextObject ()
 return to upper context More...
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 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 More...
 
 getCreationMode ()
 get creation mode More...
 
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 editObject ()
 edit object More...
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Static Public Member Functions

static getStyleExampleHTML ($a_type, $a_class)
 Get style example HTML. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

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
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Additional Inherited Members

- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 get tabs abstract method. More...
 
 __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 More...
 
 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 More...
 
 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. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings ($column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Detailed Description

Member Function Documentation

◆ _getTemplatePreview()

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

Get table template preview.

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

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

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

2223  {
2224  global $lng, $tpl;
2225 
2226  $kr = $kc = 7;
2227  if ($a_small_mode)
2228  {
2229  $kr = 6;
2230  $kc = 5;
2231  }
2232 
2233  $ts = $a_style->getTemplate($a_t_id);
2234  $t = $ts["classes"];
2235 
2236  // preview
2237  if ($a_type == "table")
2238  {
2239  $p_content = '<PageContent><Table DataTable="y"';
2240  if ($t["row_head"] != "")
2241  {
2242  $p_content.= ' HeaderRows="1"';
2243  }
2244  if ($t["row_foot"] != "")
2245  {
2246  $p_content.= ' FooterRows="1"';
2247  }
2248  if ($t["col_head"] != "")
2249  {
2250  $p_content.= ' HeaderCols="1"';
2251  }
2252  if ($t["col_foot"] != "")
2253  {
2254  $p_content.= ' FooterCols="1"';
2255  }
2256  $p_content.= ' Template="'.$a_style->lookupTemplateName($a_t_id).'">';
2257  if (!$a_small_mode)
2258  {
2259  $p_content.= '<Caption>'.$lng->txt("sty_caption").'</Caption>';
2260  }
2261  for($i = 1; $i<=$kr; $i++)
2262  {
2263  $p_content.= '<TableRow>';
2264  for($j = 1; $j<=$kc; $j++)
2265  {
2266  if ($a_small_mode)
2267  {
2268  $cell = '&lt;div style="height:2px;"&gt;&lt;/div&gt;';
2269  }
2270  else
2271  {
2272  $cell = 'xxx';
2273  }
2274  $p_content.= '<TableData><PageContent><Paragraph Characteristic="TableContent">'.$cell.'</Paragraph></PageContent></TableData>';
2275  }
2276  $p_content.= '</TableRow>';
2277  }
2278  $p_content.= '</Table></PageContent>';
2279  }
2280 
2281  if ($a_type == "vaccordion" || $a_type == "haccordion")
2282  {
2283  include_once("./Services/Accordion/classes/class.ilAccordionGUI.php");
2285 
2286  if ($a_small_mode)
2287  {
2288  $c = '&amp;nbsp;';
2289  $h = '&amp;nbsp;';
2290  }
2291  else
2292  {
2293  $c = 'xxx';
2294  $h = 'head';
2295  }
2296  if ($a_type == "vaccordion")
2297  {
2298  $p_content = '<PageContent><Tabs HorizontalAlign="Left" Type="VerticalAccordion" ';
2299  if ($a_small_mode)
2300  {
2301  $p_content.= ' ContentWidth="70"';
2302  }
2303  }
2304  else
2305  {
2306  $p_content = '<PageContent><Tabs Type="HorizontalAccordion"';
2307  if ($a_small_mode)
2308  {
2309  $p_content.= ' ContentHeight="40"';
2310  $p_content.= ' ContentWidth="70"';
2311  $c = '&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;';
2312  }
2313  else
2314  {
2315  $p_content.= ' ContentHeight="40"';
2316  }
2317  }
2318  $p_content.= ' Template="'.$a_style->lookupTemplateName($a_t_id).'">';
2319  $p_content.= '<Tab><PageContent><Paragraph>'.$c.'</Paragraph></PageContent>';
2320  $p_content.= '<TabCaption>'.$h.'</TabCaption>';
2321  $p_content.= '</Tab>';
2322  $p_content.= '</Tabs></PageContent>';
2323  }
2324 //echo htmlentities($p_content);
2325  $txml = $a_style->getTemplateXML();
2326 //echo htmlentities($txml);
2327  $p_content.= $txml;
2328  include_once("./Services/COPage/classes/class.ilPCTableGUI.php");
2329  $r_content = ilPCTableGUI::_renderTable($p_content, "");
2330 
2331  return $r_content;
2332  }
static addCss()
Add required css.
static _renderTable($content, $a_mode="table_edit", $a_submode="", $a_table_obj=null)
Static render table function.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ accordiontestObject()

ilObjStyleSheetGUI::accordiontestObject ( )

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

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

2848  {
2849  global $tpl;
2850 
2851  include_once("./Services/Accordion/classes/class.ilAccordionGUI.php");
2852 
2853  $acc = new ilAccordionGUI();
2854  $acc->addItem("Header 1", str_repeat("bla bla bla bla bla bla", 30));
2855  $acc->addItem("Header 2", str_repeat("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xx x xx x xx", 30));
2856  $acc->setOrientation(ilAccordionGUI::HORIZONTAL);
2857 
2858  $ac2 = new ilAccordionGUI();
2859  $ac2->addItem("Header 1", str_repeat("bla bla bla bla bla bla", 30));
2860  $ac2->addItem("Header 2", $acc->getHTML());
2861  $ac2->setOrientation(ilAccordionGUI::VERTICAL);
2862 
2863  $tpl->setContent($ac2->getHTML());
2864  }
Accordion user interface class.

◆ addAdminLocatorItems()

ilObjStyleSheetGUI::addAdminLocatorItems ( )

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

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

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

1240  {
1241  global $ilLocator;
1242 
1243  if ($_GET["admin_mode"] == "settings") // system settings
1244  {
1245  parent::addAdminLocatorItems(true);
1246 
1247  $ilLocator->addItem(ilObject::_lookupTitle(
1248  ilObject::_lookupObjId($_GET["ref_id"])),
1249  $this->ctrl->getLinkTargetByClass("ilobjstylesettingsgui", "view"));
1250 
1251  if ($_GET["obj_id"] > 0)
1252  {
1253  $ilLocator->addItem($this->object->getTitle(),
1254  $this->ctrl->getLinkTarget($this, "edit"));
1255  }
1256  }
1257  else // repository administration
1258  {
1259  //?
1260  }
1261 
1262  }
$_GET["client_id"]
static _lookupTitle($a_id)
lookup object title
static _lookupObjId($a_id)
+ Here is the call graph for this function:

◆ addCharacteristicFormObject()

ilObjStyleSheetGUI::addCharacteristicFormObject ( )

Add characteristic.

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

References ilObjectGUI\$tpl, and initCharacteristicForm().

1514  {
1515  global $tpl;
1516 
1517  $this->initCharacteristicForm("create");
1518  $tpl->setContent($this->form_gui->getHTML());
1519  }
initCharacteristicForm($a_mode)
Init tag style editing form.
+ Here is the call graph for this function:

◆ addColorObject()

ilObjStyleSheetGUI::addColorObject ( )

Add a color.

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

References ilObjectGUI\$tpl, and initColorForm().

1754  {
1755  global $tpl;
1756 
1757  $this->initColorForm();
1758  $tpl->setContent($this->form_gui->getHTML());
1759  }
initColorForm($a_mode="create")
Init color form.
+ Here is the call graph for this function:

◆ addImageObject()

ilObjStyleSheetGUI::addImageObject ( )

Add an image.

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

References ilObjectGUI\$tpl, and initImageForm().

1304  {
1305  global $tpl;
1306 
1307  $this->initImageForm();
1308  $tpl->setContent($this->form_gui->getHTML());
1309  }
initImageForm()
Init image form.
+ Here is the call graph for this function:

◆ addMediaQueryObject()

ilObjStyleSheetGUI::addMediaQueryObject ( )

Add a media query.

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

References ilObjectGUI\$tpl, and initMediaQueryForm().

1979  {
1980  global $tpl;
1981 
1982  $this->initMediaQueryForm();
1983  $tpl->setContent($this->form_gui->getHTML());
1984  }
initMediaQueryForm($a_mode="create")
Init media query form.
+ Here is the call graph for this function:

◆ addTemplateObject()

ilObjStyleSheetGUI::addTemplateObject ( )

Add template.

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

References ilObjectGUI\$tpl, and initTemplateForm().

2189  {
2190  global $tpl;
2191 
2192  $this->initTemplateForm();
2193  $tpl->setContent($this->form_gui->getHTML());
2194  }
initTemplateForm($a_mode="create")
Init table template form.
+ Here is the call graph for this function:

◆ cancelCharacteristicDeletionObject()

ilObjStyleSheetGUI::cancelCharacteristicDeletionObject ( )

Cancel characteristic deletion.

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

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

1480  {
1481  global $ilCtrl, $lng;
1482 
1483  ilUtil::sendInfo($lng->txt("action_aborted"), true);
1484  $ilCtrl->redirect($this, "edit");
1485  }
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
+ Here is the call graph for this function:

◆ cancelColorDeletionObject()

ilObjStyleSheetGUI::cancelColorDeletionObject ( )

Cancel color deletion.

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

References $ilCtrl.

1928  {
1929  global $ilCtrl;
1930 
1931  $ilCtrl->redirect($this, "listColors");
1932  }
global $ilCtrl
Definition: ilias.php:18

◆ cancelColorSavingObject()

ilObjStyleSheetGUI::cancelColorSavingObject ( )

Cancel color saving.

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

References $ilCtrl.

1832  {
1833  global $ilCtrl;
1834 
1835  $ilCtrl->redirect($this, "listColors");
1836  }
global $ilCtrl
Definition: ilias.php:18

◆ cancelDeleteObject()

ilObjStyleSheetGUI::cancelDeleteObject ( )

cancel oobject deletion

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

915  {
916  $this->ctrl->returnToParent($this);
917  }

◆ cancelObject()

ilObjStyleSheetGUI::cancelObject ( )

update style sheet

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

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

1064  {
1065  global $lng;
1066 
1067  ilUtil::sendInfo($lng->txt("msg_cancel"), true);
1068  $this->ctrl->returnToParent($this);
1069  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
+ Here is the call graph for this function:

◆ cancelTemplateDeletionObject()

ilObjStyleSheetGUI::cancelTemplateDeletionObject ( )

Cancel table template deletion.

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

References $ilCtrl.

2571  {
2572  global $ilCtrl;
2573 
2574  $ilCtrl->redirect($this, "listTemplates");
2575  }
global $ilCtrl
Definition: ilias.php:18

◆ cancelTemplateSavingObject()

ilObjStyleSheetGUI::cancelTemplateSavingObject ( )

Cancel color saving.

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

References $ilCtrl.

2395  {
2396  global $ilCtrl;
2397 
2398  $ilCtrl->redirect($this, "listTemplates");
2399  }
global $ilCtrl
Definition: ilias.php:18

◆ cancelUploadObject()

ilObjStyleSheetGUI::cancelUploadObject ( )

Cancel Upload.

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

References $ilCtrl.

1315  {
1316  global $ilCtrl;
1317 
1318  $ilCtrl->redirect($this, "listImages");
1319  }
global $ilCtrl
Definition: ilias.php:18

◆ confirmedDeleteObject()

ilObjStyleSheetGUI::confirmedDeleteObject ( )

delete selected style objects

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

References ilObjectGUI\$ilias.

923  {
924  global $ilias;
925 
926  $this->object->delete();
927 
928  $this->ctrl->returnToParent($this);
929  }

◆ copyCharacteristicsObject()

ilObjStyleSheetGUI::copyCharacteristicsObject ( )

Copy style classes.

Parameters

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

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

1660  {
1661  global $ilCtrl, $lng;
1662 
1663  if (!is_array($_POST["char"]) || count($_POST["char"]) == 0)
1664  {
1665  ilUtil::sendFailure($lng->txt("no_checkbox"), true);
1666  }
1667  else
1668  {
1669  $style_cp = implode("::", $_POST["char"]);
1670  $style_cp = $this->object->getId().":::".$_GET["style_type"].":::".$style_cp;
1671  $_SESSION["sty_copy"] = $style_cp;
1672  ilUtil::sendSuccess($lng->txt("sty_copied_please_select_target"), true);
1673  }
1674  $ilCtrl->redirect($this, "edit");
1675  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ copyStyleObject()

ilObjStyleSheetGUI::copyStyleObject ( )

save style sheet

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

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

990  {
991  global $ilias;
992 
993  if ($_POST["source_style"] > 0)
994  $style_obj =& $ilias->obj_factory->getInstanceByObjId($_POST["source_style"]);
995  $new_id = $style_obj->ilClone();
996 
997  // assign style to style sheet folder,
998  // if parent is style sheet folder
999  if ($_GET["ref_id"] > 0)
1000  {
1001 
1002  $fold =& ilObjectFactory::getInstanceByRefId($_GET["ref_id"]);
1003  if ($fold->getType() == "stys")
1004  {
1005  $fold->addStyle($new_id);
1006  $fold->update();
1007  ilObjStyleSheet::_writeStandard($new_id, "1");
1008  $this->ctrl->redirectByClass("ilobjstylesettingsgui", "editContentStyles");
1009  }
1010  }
1011 
1012  return $new_id;
1013  }
$_POST['username']
Definition: cron.php:12
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
_writeStandard($a_id, $a_std)
Write standard flag.
$_GET["client_id"]
+ Here is the call graph for this function:

◆ createObject()

ilObjStyleSheetGUI::createObject ( )

create

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

References ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjStyleSheet\_getClonableContentStyles(), ilObjectGUI\getCreationFormsHTML(), ilHelpGUI\ID_PART_SCREEN, ilTextAreaInputGUI\setCols(), ilTextInputGUI\setMaxLength(), and ilFormPropertyGUI\setRequired().

82  {
83  global $rbacsystem, $lng, $tpl, $ilHelp;
84 
85  $forms = array();
86 
87 
88  $ilHelp->setScreenIdComponent("sty");
89  $ilHelp->setDefaultScreenId(ilHelpGUI::ID_PART_SCREEN, "create");
90 
91  // --- create
92 
93  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
94  $form = new ilPropertyFormGUI();
95  $form->setFormAction($this->ctrl->getFormAction($this));
96  $form->setTitle($this->lng->txt("sty_create_new_stylesheet"));
97 
98  // title
99  $ti = new ilTextInputGUI($this->lng->txt("title"), "style_title");
100  $ti->setMaxLength(128);
101  $ti->setSize(40);
102  $ti->setRequired(true);
103  $form->addItem($ti);
104 
105  // description
106  $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "style_description");
107  $ta->setCols(40);
108  $ta->setRows(2);
109  $form->addItem($ta);
110 
111  $form->addCommandButton("save", $this->lng->txt("save"));
112  $form->addCommandButton("cancel", $this->lng->txt("cancel"));
113 
114  $forms[] = $form;
115 
116 
117  // --- import
118 
119  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
120  $form = new ilPropertyFormGUI();
121  $form->setFormAction($this->ctrl->getFormAction($this));
122  $form->setTitle($this->lng->txt("sty_import_stylesheet"));
123 
124  // title
125  $ti = new ilFileInputGUI($this->lng->txt("import_file"), "stylefile");
126  $ti->setRequired(true);
127  $form->addItem($ti);
128 
129  $form->addCommandButton("importStyle", $this->lng->txt("import"));
130  $form->addCommandButton("cancel", $this->lng->txt("cancel"));
131 
132  $forms[] = $form;
133 
134 
135  // --- clone
136 
137  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
138  $form = new ilPropertyFormGUI();
139  $form->setFormAction($this->ctrl->getFormAction($this));
140  $form->setTitle($this->lng->txt("sty_copy_other_stylesheet"));
141 
142  // source
143  $ti = new ilSelectInputGUI($this->lng->txt("sty_source"), "source_style");
144  $ti->setRequired(true);
146  $form->addItem($ti);
147 
148  $form->addCommandButton("copyStyle", $this->lng->txt("copy"));
149  $form->addCommandButton("cancel", $this->lng->txt("cancel"));
150 
151  $forms[] = $form;
152 
153 
154  $this->tpl->setContent($this->getCreationFormsHTML($forms));
155  }
This class represents a selection list property in a property form.
This class represents a property form user interface.
This class represents a file property in a property form.
getCreationFormsHTML(array $a_forms)
Get HTML for creation forms (accordion)
_getClonableContentStyles()
Get all clonable styles (active standard styles and individual learning module styles with write perm...
This class represents a text property in a property form.
setMaxLength($a_maxlength)
Set Max Length.
This class represents a text area property in a property form.
const ID_PART_SCREEN
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:

◆ deleteCharacteristicConfirmationObject()

ilObjStyleSheetGUI::deleteCharacteristicConfirmationObject ( )

Characteristic deletion confirmation screen.

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

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

1387  {
1388  global $ilCtrl, $tpl, $lng;
1389 
1390 //var_dump($_POST);
1391 
1392  if (!is_array($_POST["char"]) || count($_POST["char"]) == 0)
1393  {
1394  ilUtil::sendInfo($lng->txt("no_checkbox"), true);
1395  $ilCtrl->redirect($this, "edit");
1396  }
1397  else
1398  {
1399  // check whether there are any core style classes included
1400  $core_styles = ilObjStyleSheet::_getCoreStyles();
1401  foreach ($_POST["char"] as $char)
1402  {
1403  if (!empty($core_styles[$char]))
1404  {
1405  $this->deleteCoreCharMessage();
1406  return;
1407  }
1408  }
1409 
1410  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1411  $cgui = new ilConfirmationGUI();
1412  $cgui->setFormAction($ilCtrl->getFormAction($this));
1413  $cgui->setHeaderText($lng->txt("sty_confirm_char_deletion"));
1414  $cgui->setCancel($lng->txt("cancel"), "cancelCharacteristicDeletion");
1415  $cgui->setConfirm($lng->txt("delete"), "deleteCharacteristic");
1416 
1417  foreach ($_POST["char"] as $char)
1418  {
1419  $char_comp = explode(".", $char);
1420  $cgui->addItem("char[]", $char, $char_comp[2]);
1421  }
1422 
1423  $tpl->setContent($cgui->getHTML());
1424  }
1425  }
$_POST['username']
Definition: cron.php:12
deleteCoreCharMessage()
Message that appears, when user tries to delete core characteristics.
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static _getCoreStyles()
Get core styles.
Confirmation screen class.
+ Here is the call graph for this function:

◆ deleteCharacteristicObject()

ilObjStyleSheetGUI::deleteCharacteristicObject ( )

Delete one or multiple style characteristic.

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

References $_POST, and $ilCtrl.

1491  {
1492  global $ilCtrl;
1493 
1494  if (is_array($_POST["char"]))
1495  {
1496  foreach($_POST["char"] as $char)
1497  {
1498  $char_comp = explode(".", $char);
1499  $type = $char_comp[0];
1500  $tag = $char_comp[1];
1501  $class = $char_comp[2];
1502 
1503  $this->object->deleteCharacteristic($type, $tag, $class);
1504  }
1505  }
1506 
1507  $ilCtrl->redirect($this, "edit");
1508  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18

◆ deleteColorConfirmationObject()

ilObjStyleSheetGUI::deleteColorConfirmationObject ( )

Delete color confirmation.

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

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

1898  {
1899  global $ilCtrl, $tpl, $lng;
1900 
1901  if (!is_array($_POST["color"]) || count($_POST["color"]) == 0)
1902  {
1903  ilUtil::sendInfo($lng->txt("no_checkbox"), true);
1904  $ilCtrl->redirect($this, "listColors");
1905  }
1906  else
1907  {
1908  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1909  $cgui = new ilConfirmationGUI();
1910  $cgui->setFormAction($ilCtrl->getFormAction($this));
1911  $cgui->setHeaderText($lng->txt("sty_confirm_color_deletion"));
1912  $cgui->setCancel($lng->txt("cancel"), "cancelColorDeletion");
1913  $cgui->setConfirm($lng->txt("delete"), "deleteColor");
1914 
1915  foreach ($_POST["color"] as $c)
1916  {
1917  $cgui->addItem("color[]", ilUtil::prepareFormOutput($c), $c);
1918  }
1919 
1920  $tpl->setContent($cgui->getHTML());
1921  }
1922  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Confirmation screen class.
+ Here is the call graph for this function:

◆ deleteColorObject()

ilObjStyleSheetGUI::deleteColorObject ( )

Delete colors.

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

References $_POST, and $ilCtrl.

1938  {
1939  global $ilCtrl;
1940 
1941  if (is_array($_POST["color"]))
1942  {
1943  foreach ($_POST["color"] as $c)
1944  {
1945  $this->object->removeColor($c);
1946  }
1947  }
1948 
1949  $ilCtrl->redirect($this, "listColors");
1950  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18

◆ deleteCoreCharMessage()

ilObjStyleSheetGUI::deleteCoreCharMessage ( )

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

Parameters

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

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

Referenced by deleteCharacteristicConfirmationObject().

1434  {
1435  global $ilCtrl, $tpl, $lng;
1436 
1437  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1438  $cgui = new ilConfirmationGUI();
1439  $cgui->setFormAction($ilCtrl->getFormAction($this));
1440 
1441 
1442  $core_styles = ilObjStyleSheet::_getCoreStyles();
1443  $cnt = 0;
1444  foreach ($_POST["char"] as $char)
1445  {
1446  if (!empty($core_styles[$char]))
1447  {
1448  $cnt++;
1449  $char_comp = explode(".", $char);
1450  $cgui->addItem("", "", $char_comp[2]);
1451  }
1452  else
1453  {
1454  $cgui->addHiddenItem("char[]", $char);
1455  }
1456  }
1457  $all_core_styles = ($cnt == count($_POST["char"]))
1458  ? true
1459  : false;
1460 
1461  if ($all_core_styles)
1462  {
1463  $cgui->setHeaderText($lng->txt("sty_all_styles_obligatory"));
1464  $cgui->setCancel($lng->txt("back"), "cancelCharacteristicDeletion");
1465  }
1466  else
1467  {
1468  $cgui->setHeaderText($lng->txt("sty_some_styles_obligatory_delete_rest"));
1469  $cgui->setCancel($lng->txt("cancel"), "cancelCharacteristicDeletion");
1470  $cgui->setConfirm($lng->txt("sty_delete_other_selected"), "deleteCharacteristicConfirmation");
1471  }
1472 
1473  $tpl->setContent($cgui->getHTML());
1474  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
static _getCoreStyles()
Get core styles.
Confirmation screen class.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteImageObject()

ilObjStyleSheetGUI::deleteImageObject ( )

Delete images.

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

References $_POST, and $ilCtrl.

1368  {
1369  global $ilCtrl;
1370 
1371  $images = $this->object->getImages();
1372 
1373  foreach ($images as $image)
1374  {
1375  if (is_array($_POST["file"]) && in_array($image["entry"], $_POST["file"]))
1376  {
1377  $this->object->deleteImage($image["entry"]);
1378  }
1379  }
1380  $ilCtrl->redirect($this, "listImages");
1381  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18

◆ deleteMediaQueriesObject()

ilObjStyleSheetGUI::deleteMediaQueriesObject ( )

Delete Media Queries.

Parameters

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

References $_GET, $_POST, and $ilCtrl.

2124  {
2125  global $ilCtrl, $rbacsystem;
2126 
2127  if ($rbacsystem->checkAccess("write", (int) $_GET["ref_id"]) && is_array($_POST["mq_id"]))
2128  {
2129  foreach ($_POST["mq_id"] as $id)
2130  {
2131  $this->object->deleteMediaQuery($id);
2132  }
2133  }
2134  $ilCtrl->redirect($this, "listMediaQueries");
2135  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

◆ deleteMediaQueryConfirmationObject()

ilObjStyleSheetGUI::deleteMediaQueryConfirmationObject ( )

Confirm media query deletion.

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

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

2090  {
2091  global $ilCtrl, $tpl, $lng;
2092 
2093  if (!is_array($_POST["mq_id"]) || count($_POST["mq_id"]) == 0)
2094  {
2095  ilUtil::sendInfo($lng->txt("no_checkbox"), true);
2096  $ilCtrl->redirect($this, "listMediaQueries");
2097  }
2098  else
2099  {
2100  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
2101  $cgui = new ilConfirmationGUI();
2102  $cgui->setFormAction($ilCtrl->getFormAction($this));
2103  $cgui->setHeaderText($lng->txt("sty_sure_del_mqueries"));
2104  $cgui->setCancel($lng->txt("cancel"), "listMediaQueries");
2105  $cgui->setConfirm($lng->txt("delete"), "deleteMediaQueries");
2106 
2107  foreach ($_POST["mq_id"] as $i)
2108  {
2109  $mq = $this->object->getMediaQueryForId($i);
2110  $cgui->addItem("mq_id[]", $i, $mq["mquery"]);
2111  }
2112 
2113  $tpl->setContent($cgui->getHTML());
2114  }
2115  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Confirmation screen class.
+ Here is the call graph for this function:

◆ deleteObject()

ilObjStyleSheetGUI::deleteObject (   $a_error = false)

display deletion confirmation screen

public

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

References ilUtil\getImageTagByType().

891  {
892  //$this->setTabs();
893 
894  // display confirmation message
895  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
896  $cgui = new ilConfirmationGUI();
897  $cgui->setFormAction($this->ctrl->getFormAction($this));
898  $cgui->setHeaderText($this->lng->txt("info_delete_sure"));
899  $cgui->setCancel($this->lng->txt("cancel"), "cancelDelete");
900  $cgui->setConfirm($this->lng->txt("confirm"), "confirmedDelete");
901 
902  $caption = ilUtil::getImageTagByType("sty", $this->tpl->tplPath).
903  " ".ilObject::_lookupTitle($this->object->getId());
904 
905  $cgui->addItem("id[]", "", $caption);
906 
907  $this->tpl->setContent($cgui->getHTML());
908  }
static getImageTagByType($a_type, $a_path, $a_big=false)
Builds an html image tag TODO: function still in use, but in future use getImagePath and move HTML-Co...
Confirmation screen class.
+ Here is the call graph for this function:

◆ deleteStyleParameterObject()

ilObjStyleSheetGUI::deleteStyleParameterObject ( )

delete style parameters

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

References $_POST, and editObject().

935  {
936  if (is_array($_POST["sty_select"]))
937  {
938  foreach($_POST["sty_select"] as $id => $dummy)
939  {
940  $this->object->deleteParameter($id);
941  }
942  }
943  $this->object->read();
944  $this->object->writeCSSFile();
945  $this->editObject();
946  }
$_POST['username']
Definition: cron.php:12
editObject()
edit style sheet
+ Here is the call graph for this function:

◆ deleteTemplateConfirmationObject()

ilObjStyleSheetGUI::deleteTemplateConfirmationObject ( )

Delete table template confirmation.

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

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

2522  {
2523  global $ilCtrl, $tpl, $lng;
2524 
2525  if (!is_array($_POST["tid"]) || count($_POST["tid"]) == 0)
2526  {
2527  ilUtil::sendInfo($lng->txt("no_checkbox"), true);
2528  $ilCtrl->redirect($this, "listTemplates");
2529  }
2530  else
2531  {
2532  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
2533  $cgui = new ilConfirmationGUI();
2534  $cgui->setFormAction($ilCtrl->getFormAction($this));
2535  $cgui->setHeaderText($lng->txt("sty_confirm_template_deletion"));
2536  $cgui->setCancel($lng->txt("cancel"), "cancelTemplateDeletion");
2537  $cgui->setConfirm($lng->txt("sty_del_template"), "deleteTemplate");
2538 
2539  foreach ($_POST["tid"] as $tid)
2540  {
2541  $classes = $this->object->getTemplateClasses($tid);
2542  $cl_str = "";
2543  $listed = array();
2544  foreach ($classes as $cl)
2545  {
2546  if ($cl != "" && !$listed[$cl])
2547  {
2548  $cl_str.= '<div>- '.
2549  $cl."</div>";
2550  $listed[$cl] = true;
2551  }
2552  }
2553  if ($cl_str != "")
2554  {
2555  $cl_str = '<div style="padding-left:30px;" class="small">'.
2556  "<div><i>".$lng->txt("sty_style_class")."</i></div>".$cl_str."</div>";
2557  }
2558  $cgui->addItem("tid[]", $tid, $this->object->lookupTemplateName($tid).$cl_str);
2559  }
2560 
2561  $cgui->addButton($lng->txt("sty_del_template_keep_classes"), "deleteTemplateKeepClasses");
2562 
2563  $tpl->setContent($cgui->getHTML());
2564  }
2565  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Confirmation screen class.
+ Here is the call graph for this function:

◆ deleteTemplateKeepClassesObject()

ilObjStyleSheetGUI::deleteTemplateKeepClassesObject ( )

Delete table template.

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

References $_POST, and $ilCtrl.

2581  {
2582  global $ilCtrl;
2583 
2584  if (is_array($_POST["tid"]))
2585  {
2586  foreach ($_POST["tid"] as $tid)
2587  {
2588  $this->object->removeTemplate($tid);
2589  }
2590  }
2591 
2592  $ilCtrl->redirect($this, "listTemplates");
2593  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18

◆ deleteTemplateObject()

ilObjStyleSheetGUI::deleteTemplateObject ( )

Delete table template.

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

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

2599  {
2600  global $ilCtrl;
2601 
2602  if (is_array($_POST["tid"]))
2603  {
2604  foreach ($_POST["tid"] as $tid)
2605  {
2606  $cls = $this->object->getTemplateClasses($tid);
2607  foreach ($cls as $k => $cls)
2608  {
2609  $ty = $this->object->determineTemplateStyleClassType($_GET["temp_type"], $k);
2610  $ta = ilObjStyleSheet::_determineTag($ty);
2611  $this->object->deleteCharacteristic($ty, $ta, $cls);
2612  }
2613  $this->object->removeTemplate($tid);
2614  }
2615  }
2616 
2617  $ilCtrl->redirect($this, "listTemplates");
2618  }
$_POST['username']
Definition: cron.php:12
static _determineTag($a_type)
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ displayTemplateEditForm()

ilObjStyleSheetGUI::displayTemplateEditForm ( )

Display table tempalte edit form.

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

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

Referenced by editTemplateObject(), and updateTemplateObject().

2480  {
2481  global $tpl;
2482 
2483  $a_tpl = new ilTemplate("tpl.template_edit.html", true, true,
2484  "Services/Style");
2485  $this->includeCSS();
2486  $a_tpl->setVariable("FORM", $this->form_gui->getHTML());
2487  $a_tpl->setVariable("PREVIEW", $this->getTemplatePreview($_GET["temp_type"], $_GET["t_id"]));
2488  $tpl->setContent($a_tpl->get());
2489  }
getTemplatePreview($a_type, $a_t_id, $a_small_mode=false)
Get table template preview.
$_GET["client_id"]
special template class to simplify handling of ITX/PEAR
includeCSS()
Include CSS in output.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editColorObject()

ilObjStyleSheetGUI::editColorObject ( )

Edit color.

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

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

1765  {
1766  global $tpl, $ilCtrl;
1767 
1768  $ilCtrl->setParameter($this, "c_name", $_GET["c_name"]);
1769  $this->initColorForm("edit");
1770  $this->getColorFormValues();
1771  $tpl->setContent($this->form_gui->getHTML());
1772  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
getColorFormValues()
Set values for color editing.
initColorForm($a_mode="create")
Init color form.
+ Here is the call graph for this function:

◆ editMediaQueryObject()

ilObjStyleSheetGUI::editMediaQueryObject ( )

Edit media query.

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

References $_GET, $ilCtrl, ilObjectGUI\$tpl, getMediaQueryFormValues(), and initMediaQueryForm().

1990  {
1991  global $tpl, $ilCtrl;
1992 
1993  $ilCtrl->setParameter($this, "mq_id", $_GET["mq_id"]);
1994  $this->initMediaQueryForm("edit");
1995  $this->getMediaQueryFormValues();
1996  $tpl->setContent($this->form_gui->getHTML());
1997  }
$_GET["client_id"]
initMediaQueryForm($a_mode="create")
Init media query form.
global $ilCtrl
Definition: ilias.php:18
getMediaQueryFormValues()
Set values for media query editing.
+ Here is the call graph for this function:

◆ editObject()

ilObjStyleSheetGUI::editObject ( )

edit style sheet

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

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

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

173  {
174  global $rbacsystem, $lng, $ilTabs, $ilCtrl, $ilToolbar, $tpl;
175 
176  $this->setSubTabs();
177 
178  $this->includeCSS();
179 
180  $ctpl = new ilTemplate("tpl.sty_classes.html", true, true, "Services/Style");
181 
182  // output characteristics
183  $chars = $this->object->getCharacteristics();
184 
185  $style_type = ($this->super_type != "")
186  ? $this->super_type
187  : "text_block";
188  $ilCtrl->setParameter($this, "style_type", $style_type);
189  $ilTabs->setSubTabActive("sty_".$style_type."_char");
190 
191  // workaround to include default rte styles
192  if ($this->super_type == "rte")
193  {
194  $tpl->addCss("Modules/Scorm2004/templates/default/player.css");
195  include_once("./Modules/Scorm2004/classes/ilSCORM13Player.php");
196  $tpl->addInlineCss(ilSCORM13Player::getInlineCss());
197  }
198 
199  // add new style?
200  $all_super_types = ilObjStyleSheet::_getStyleSuperTypes();
201  $subtypes = $all_super_types[$style_type];
202  $expandable = false;
203  foreach ($subtypes as $t)
204  {
206  {
207  $expandable = true;
208  }
209  }
210  if ($expandable && $rbacsystem->checkAccess("write", (int) $_GET["ref_id"]))
211  {
212  $ilToolbar->addButton($lng->txt("sty_add_characteristic"),
213  $ilCtrl->getLinkTarget($this, "addCharacteristicForm"));
214  }
215 
216  if ($_SESSION["sty_copy"] != "")
217  {
218 
219  $style_cp = explode(":::", $_SESSION["sty_copy"]);
220  if ($style_cp[1] == $style_type)
221  {
222 
223  if ($expandable)
224  {
225  $ilToolbar->addSeparator();
226  }
227  $ilToolbar->addButton($lng->txt("sty_paste_style_classes"),
228  $ilCtrl->getLinkTarget($this, "pasteCharacteristicsOverview"));
229  }
230  }
231 
232  include_once("./Services/Style/classes/class.ilStyleTableGUI.php");
233  $table_gui = new ilStyleTableGUI($this, "edit", $chars, $style_type,
234  $this->object);
235 
236  $ctpl->setCurrentBlock("style_table");
237  $ctpl->setVariable("STYLE_TABLE", $table_gui->getHTML());
238  $ctpl->parseCurrentBlock();
239 
240  $this->tpl->setContent($ctpl->get());
241  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
setSubTabs()
adds tabs to tab gui object
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static _isExpandable($a_type)
special template class to simplify handling of ITX/PEAR
TableGUI class for style editor.
includeCSS()
Include CSS in output.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editTagStyleObject()

ilObjStyleSheetGUI::editTagStyleObject ( )

Edit tag style.

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

References $_GET, $ilCtrl, ilObjectGUI\$lng, $options, $si, ilObjectGUI\$tpl, getValues(), initTagStyleForm(), and outputTagStyleEditScreen().

523  {
524  global $tpl, $ilToolbar, $lng, $ilCtrl;
525 
526  // media query selector
527  $mqs = $this->object->getMediaQueries();
528  if (count($mqs) > 0)
529  {
530  //
531  $options = array(
532  "" => $lng->txt("sty_default"),
533  );
534  foreach ($mqs as $mq)
535  {
536  $options[$mq["id"]] = $mq["mquery"];
537  }
538  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
539  $si = new ilSelectInputGUI("@media", "mq_id");
540  $si->setOptions($options);
541  $si->setValue((int) $_GET["mq_id"]);
542  $ilToolbar->addInputItem($si, true);
543  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
544  $ilToolbar->addFormButton($lng->txt("sty_switch"), "switchMQuery");
545  }
546 
547  // workaround to include default rte styles
548  //if (in_array($_GET["style_type"], array("rte_menu")))
549  if ($this->super_type == "rte")
550  {
551  $tpl->addCss("Modules/Scorm2004/templates/default/player.css");
552  include_once("./Modules/Scorm2004/classes/ilSCORM13Player.php");
553  $tpl->addInlineCss(ilSCORM13Player::getInlineCss());
554  }
555 
556  $cur = explode(".",$_GET["tag"]);
557  $cur_tag = $cur[0];
558  $cur_class = $cur[1];
559 
560  $this->initTagStyleForm("edit", $cur_tag);
561  $this->getValues();
562  $this->outputTagStyleEditScreen();
563  }
This class represents a selection list property in a property form.
$_GET["client_id"]
outputTagStyleEditScreen()
Output tag style edit screen.
getValues()
FORM: Get current values from persistent object.
global $ilCtrl
Definition: ilias.php:18
if(!is_array($argv)) $options
initTagStyleForm($a_mode, $a_cur_tag)
Init tag style editing form.
+ Here is the call graph for this function:

◆ editTemplateObject()

ilObjStyleSheetGUI::editTemplateObject ( )

Edit table template.

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

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

2200  {
2201  global $tpl, $ilCtrl;
2202 
2203  $ilCtrl->setParameter($this, "t_id", $_GET["t_id"]);
2204  $this->initTemplateForm("edit");
2205  $this->getTemplateFormValues();
2206 
2207  $this->displayTemplateEditForm();
2208  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
initTemplateForm($a_mode="create")
Init table template form.
displayTemplateEditForm()
Display table tempalte edit form.
getTemplateFormValues()
Set values for table template editing.
+ Here is the call graph for this function:

◆ executeCommand()

& ilObjStyleSheetGUI::executeCommand ( )

execute command

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

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

51  {
52  $next_class = $this->ctrl->getNextClass($this);
53  $cmd = $this->ctrl->getCmd("edit");
54 
55  // #9440/#9489: prepareOutput will fail if not set properly
56  if(!$this->object)
57  {
58  $this->setCreationMode(true);
59  }
60 
61  $this->prepareOutput();
62  switch($next_class)
63  {
64  default:
65  $cmd.= "Object";
66  $ret =& $this->$cmd();
67  break;
68  }
69 
70  return $ret;
71  }
$cmd
Definition: sahs_server.php:35
setCreationMode($a_mode=true)
if true, a creation screen is displayed the current $_GET[ref_id] don&#39;t belong to the current class! ...
prepareOutput()
prepare output
+ Here is the call graph for this function:

◆ exportStyleObject()

ilObjStyleSheetGUI::exportStyleObject ( )

export style

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

References $file, and ilUtil\deliverFile().

836  {
837  $file = $this->object->export();
838 
839  ilUtil::deliverFile($file, "sty_".$this->object->getId().".zip");
840  }
print $file
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
+ Here is the call graph for this function:

◆ extractParametersOfTag()

ilObjStyleSheetGUI::extractParametersOfTag (   $a_tag,
  $a_class,
  $a_style,
  $a_type,
  $a_mq_id = 0,
  $a_custom = false 
)

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

Referenced by getValues().

843  {
844  $parameters = array();
845  foreach($a_style as $tag)
846  {
847  foreach($tag as $par)
848  {
849  if ($par["tag"] == $a_tag && $par["class"] == $a_class
850  && $par["type"] == $a_type && (int) $a_mq_id == (int) $par["mq_id"]
851  && (int) $a_custom == (int) $par["custom"])
852  {
853  $parameters[$par["parameter"]] = $par["value"];
854  }
855  }
856  }
857  return $parameters;
858  }
+ Here is the caller graph for this function:

◆ generateTemplateObject()

ilObjStyleSheetGUI::generateTemplateObject ( )

Generate table template.

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

References ilObjectGUI\$tpl, and initTemplateGenerationForm().

2624  {
2625  global $tpl;
2626 
2627  $this->initTemplateGenerationForm();
2628  $tpl->setContent($this->form_gui->getHTML());
2629  }
initTemplateGenerationForm()
Init table template generation form.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjStyleSheetGUI::getAdminTabs ( $tabs_gui)

admin and normal tabs are equal for roles

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

References getTabs().

1075  {
1076  $this->getTabs($tabs_gui);
1077  }
getTabs(&$tabs_gui)
adds tabs to tab gui object
+ Here is the call graph for this function:

◆ getColorFormValues()

ilObjStyleSheetGUI::getColorFormValues ( )

Set values for color editing.

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

References $_GET.

Referenced by editColorObject().

1819  {
1820  if ($_GET["c_name"] != "")
1821  {
1822  $values["color_name"] = $_GET["c_name"];
1823  $values["color_code"] = $this->object->getColorCodeForName($_GET["c_name"]);
1824  $this->form_gui->setValuesByArray($values);
1825  }
1826  }
$_GET["client_id"]
+ Here is the caller graph for this function:

◆ getMediaQueryFormValues()

ilObjStyleSheetGUI::getMediaQueryFormValues ( )

Set values for media query editing.

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

References $_GET.

Referenced by editMediaQueryObject().

2035  {
2036  if ($_GET["mq_id"] != "")
2037  {
2038  foreach ($this->object->getMediaQueries() as $mq)
2039  {
2040  if ($mq["id"] == (int) $_GET["mq_id"])
2041  {
2042  $values["mquery"] = $mq["mquery"];
2043  }
2044  }
2045  $this->form_gui->setValuesByArray($values);
2046  }
2047  }
$_GET["client_id"]
+ Here is the caller graph for this function:

◆ getPropertiesValues()

ilObjStyleSheetGUI::getPropertiesValues ( )

Get current values for properties from.

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

Referenced by propertiesObject().

270  {
271  $values = array();
272 
273  $values["style_title"] = $this->object->getTitle();
274  $values["style_description"] = $this->object->getDescription();
275  $values["disable_auto_margins"] = (int) $this->object->lookupStyleSetting("disable_auto_margins");
276 
277  $this->form->setValuesByArray($values);
278  }
+ Here is the caller graph for this function:

◆ getStyleExampleHTML()

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

Get style example HTML.

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

References ilObjectGUI\$lng.

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

1605  {
1606  global $lng;
1607 
1608  $c = explode(":", $a_class);
1609  $a_class = $c[0];
1610 
1611  $ex_tpl = new ilTemplate("tpl.style_example.html", true, true, "Services/Style");
1612 
1613  $ex_tpl->setCurrentBlock("Example_".$a_type);
1614  $ex_tpl->setVariable("EX_CLASS", "ilc_".$a_type."_".$a_class);
1615  $ex_tpl->setVariable("EX_TEXT", "ABC abc 123");
1616  if (in_array($a_type, array("media_cont", "qimg")))
1617  {
1618  //
1619  }
1620  if (in_array($a_type, array("table", "table_caption")))
1621  {
1622  $ex_tpl->setVariable("TXT_CAPTION", $lng->txt("sty_caption"));
1623  }
1624  if (in_array($a_class, array("OrderListItemHorizontal", "OrderListHorizontal")))
1625  {
1626  $ex_tpl->setVariable("HOR", "Horizontal");
1627  }
1628  $ex_tpl->parseCurrentBlock();
1629 
1630  return $ex_tpl->get();
1631  }
special template class to simplify handling of ITX/PEAR
+ Here is the caller graph for this function:

◆ getTabs()

ilObjStyleSheetGUI::getTabs ( $tabs_gui)

adds tabs to tab gui object

Parameters
object$tabs_guiilTabsGUI object

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

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

Referenced by getAdminTabs(), and setTabs().

1104  {
1105  global $lng, $ilCtrl, $ilTabs, $ilHelp;
1106 
1107  $ilHelp->setScreenIdComponent("sty");
1108 
1109  if ($ilCtrl->getCmd() == "editTagStyle")
1110  {
1111  // back to upper context
1112  $tabs_gui->setBackTarget($lng->txt("back"),
1113  $ilCtrl->getLinkTarget($this, "edit"));
1114 
1115  $t = explode(".", $_GET["tag"]);
1116  $t2 = explode(":", $t[1]);
1117  $pc = $this->object->_getPseudoClasses($t[0]);
1118  if (is_array($pc) && count($pc) > 0)
1119  {
1120  // style classes
1121  $ilCtrl->setParameter($this, "tag", $t[0].".".$t2[0]);
1122  $tabs_gui->addTarget("sty_tag_normal",
1123  $this->ctrl->getLinkTarget($this, "editTagStyle"), array("editTagStyle", ""),
1124  get_class($this));
1125  if ($t2[1] == "")
1126  {
1127  $ilTabs->setTabActive("sty_tag_normal");
1128  }
1129 
1130  foreach ($pc as $p)
1131  {
1132  // style classes
1133  $ilCtrl->setParameter($this, "tag", $t[0].".".$t2[0].":".$p);
1134  $tabs_gui->addTarget("sty_tag_".$p,
1135  $this->ctrl->getLinkTarget($this, "editTagStyle"), array("editTagStyle", ""),
1136  get_class($this));
1137  if ($t2[1] == $p)
1138  {
1139  $ilTabs->setTabActive("sty_tag_".$p);
1140  }
1141  }
1142  $ilCtrl->setParameter($this, "tag", $_GET["tag"]);
1143  }
1144  }
1145  else
1146  {
1147  // back to upper context
1148  $tabs_gui->setBackTarget($lng->txt("back"),
1149  $this->ctrl->getLinkTarget($this, "returnToUpperContext"));
1150 
1151  // style classes
1152  $tabs_gui->addTarget("sty_style_chars",
1153  $this->ctrl->getLinkTarget($this, "edit"), array("edit", ""),
1154  get_class($this));
1155 
1156  // colors
1157  $tabs_gui->addTarget("sty_colors",
1158  $this->ctrl->getLinkTarget($this, "listColors"), "listColors",
1159  get_class($this));
1160 
1161  // media queries
1162  $tabs_gui->addTarget("sty_media_queries",
1163  $this->ctrl->getLinkTarget($this, "listMediaQueries"), "listMediaQueries",
1164  get_class($this));
1165 
1166  // images
1167  $tabs_gui->addTarget("sty_images",
1168  $this->ctrl->getLinkTarget($this, "listImages"), "listImages",
1169  get_class($this));
1170 
1171  // table templates
1172  $tabs_gui->addTarget("sty_templates",
1173  $this->ctrl->getLinkTarget($this, "listTemplates"), "listTemplates",
1174  get_class($this));
1175 
1176  // settings
1177  $tabs_gui->addTarget("settings",
1178  $this->ctrl->getLinkTarget($this, "properties"), "properties",
1179  get_class($this));
1180 
1181  // accordiontest
1182 /*
1183  $tabs_gui->addTarget("accordiontest",
1184  $this->ctrl->getLinkTarget($this, "accordiontest"), "accordiontest",
1185  get_class($this));*/
1186  }
1187 
1188  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
+ Here is the caller graph for this function:

◆ getTemplateFormValues()

ilObjStyleSheetGUI::getTemplateFormValues ( )

Set values for table template editing.

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

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

Referenced by editTemplateObject().

2503  {
2504  if ($_GET["t_id"] > 0)
2505  {
2506  $t = $this->object->getTemplate($_GET["t_id"]);
2507 
2508  $values["name"] = $t["name"];
2509  $scs = ilObjStyleSheet::_getTemplateClassTypes($_GET["temp_type"]);
2510  foreach ($scs as $k => $type)
2511  {
2512  $values[$k."_class"] = $t["classes"][$k];
2513  }
2514  $this->form_gui->setValuesByArray($values);
2515  }
2516  }
static _getTemplateClassTypes($a_template_type="")
Get template class types.
$_GET["client_id"]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTemplatePreview()

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

Get table template preview.

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

References _getTemplatePreview().

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

2214  {
2215  return $this->_getTemplatePreview(
2216  $this->object, $a_type, $a_t_id, $a_small_mode);
2217  }
_getTemplatePreview($a_style, $a_type, $a_t_id, $a_small_mode=false)
Get table template preview.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getValues()

ilObjStyleSheetGUI::getValues ( )

FORM: Get current values from persistent object.

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

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

Referenced by editTagStyleObject().

781  {
782  $style = $this->object->getStyle();
783  $cur = explode(".",$_GET["tag"]);
784  $cur_tag = $cur[0];
785  $cur_class = $cur[1];
786  $cur_parameters = $this->extractParametersOfTag($cur_tag, $cur_class, $style, $_GET["style_type"],
787  (int) $_GET["mq_id"], false);
788  $parameters = ilObjStyleSheet::_getStyleParameters();
789  foreach($parameters as $p => $v)
790  {
791  $filtered_groups = ilObjStyleSheet::_getFilteredGroups();
792  if (is_array($filtered_groups[$v["group"]]) && !in_array($cur_tag, $filtered_groups[$v["group"]]))
793  {
794  continue;
795  }
796  $p = explode(".", $p);
797  $p = $p[0];
798  $input = $this->form_gui->getItemByPostVar($p);
799  switch ($v["input"])
800  {
801  case "":
802  break;
803 
804  case "trbl_numeric":
805  case "border_width":
806  case "border_style":
807  case "trbl_color":
808  $input->setAllValue($cur_parameters[$v["subpar"][0]]);
809  $input->setTopValue($cur_parameters[$v["subpar"][1]]);
810  $input->setRightValue($cur_parameters[$v["subpar"][2]]);
811  $input->setBottomValue($cur_parameters[$v["subpar"][3]]);
812  $input->setLeftValue($cur_parameters[$v["subpar"][4]]);
813  break;
814 
815  default:
816  $input->setValue($cur_parameters[$p]);
817  break;
818  }
819  }
820 
821  $cust_parameters = $this->extractParametersOfTag($cur_tag, $cur_class, $style, $_GET["style_type"],
822  (int) $_GET["mq_id"], true);
823  $vals = array();
824  foreach ($cust_parameters as $k => $c)
825  {
826  $vals[] = $k.": ".$c;
827  }
828  $input = $this->form_gui->getItemByPostVar("custom_par");
829  $input->setValue($vals);
830  }
$_GET["client_id"]
extractParametersOfTag($a_tag, $a_class, $a_style, $a_type, $a_mq_id=0, $a_custom=false)
static _getStyleParameters($a_tag="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ilObjStyleSheetGUI()

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().

31  {
32  global $ilCtrl, $lng, $tpl;
33 
34  $this->ctrl =& $ilCtrl;
35  $this->lng =& $lng;
36  $this->lng->loadLanguageModule("style");
37  $ilCtrl->saveParameter($this, array("tag", "style_type", "temp_type"));
38  if ($_GET["style_type"] != "")
39  {
40  $this->super_type = ilObjStyleSheet::_getStyleSuperTypeForType($_GET["style_type"]);
41  }
42 
43  $this->type = "sty";
44  $this->ilObjectGUI($a_data,$a_id,$a_call_by_reference, false);
45  }
$_GET["client_id"]
static _getStyleSuperTypeForType($a_type)
ilObjectGUI($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor public.
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ importStyleObject()

ilObjStyleSheetGUI::importStyleObject ( )

import style sheet

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

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

1019  {
1020  // check file
1021  $source = $_FILES["stylefile"]["tmp_name"];
1022  if (($source == 'none') || (!$source))
1023  {
1024  $this->ilias->raiseError("No file selected!",$this->ilias->error_obj->MESSAGE);
1025  }
1026 
1027  // check correct file type
1028  $info = pathinfo($_FILES["stylefile"]["name"]);
1029  if (strtolower($info["extension"]) != "zip" && strtolower($info["extension"]) != "xml")
1030  {
1031  $this->ilias->raiseError("File must be a zip or xml file!",$this->ilias->error_obj->MESSAGE);
1032  }
1033 
1034  $class_name = "ilObjStyleSheet";
1035  require_once("./Services/Style/classes/class.ilObjStyleSheet.php");
1036  $newObj = new ilObjStyleSheet();
1037  //$newObj->setTitle();
1038  //$newObj->setDescription($_POST["style_description"]);
1039  $newObj->import($_FILES["stylefile"]);
1040  //$newObj->createFromXMLFile($_FILES["stylefile"]["tmp_name"]);
1041 
1042  // assign style to style sheet folder,
1043  // if parent is style sheet folder
1044  if ($_GET["ref_id"] > 0)
1045  {
1046 
1047  $fold =& ilObjectFactory::getInstanceByRefId($_GET["ref_id"]);
1048  if ($fold->getType() == "stys")
1049  {
1050  $fold->addStyle($newObj->getId());
1051  $fold->update();
1052  ilObjStyleSheet::_writeStandard($newObj->getId(), "1");
1053  $this->ctrl->redirectByClass("ilobjstylesettingsgui", "editContentStyles");
1054  }
1055  }
1056 
1057  return $newObj->getId();
1058  }
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
_writeStandard($a_id, $a_std)
Write standard flag.
$_GET["client_id"]
redirection script todo: (a better solution should control the processing via a xml file) ...
Class ilObjStyleSheet.
+ Here is the call graph for this function:

◆ includeCSS()

ilObjStyleSheetGUI::includeCSS ( )

Include CSS in output.

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

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

161  {
162  // set style sheet
163  $this->tpl->setCurrentBlock("ContentStyle");
164  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
165  $this->object->getContentStylePath($this->object->getId()));
166  $this->tpl->parseCurrentBlock();
167  }
+ Here is the caller graph for this function:

◆ initCharacteristicForm()

ilObjStyleSheetGUI::initCharacteristicForm (   $a_mode)

Init tag style editing form.

Parameters
int$a_modeForm Edit Mode (IL_FORM_EDIT | IL_FORM_CREATE)

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

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

Referenced by addCharacteristicFormObject(), and saveCharacteristicObject().

1557  {
1558  global $lng, $ilCtrl;
1559 
1560  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1561  $this->form_gui = new ilPropertyFormGUI();
1562 
1563  // title
1564  $txt_input = new ilRegExpInputGUI($lng->txt("title"), "new_characteristic");
1565  $txt_input->setPattern("/^[a-zA-Z]+[a-zA-Z0-9]*$/");
1566  $txt_input->setNoMatchMessage($lng->txt("sty_msg_characteristic_must_only_include")." A-Z, a-z, 1-9");
1567  $txt_input->setRequired(true);
1568  $this->form_gui->addItem($txt_input);
1569 
1570  // type
1571  $all_super_types = ilObjStyleSheet::_getStyleSuperTypes();
1572  $types = $all_super_types[$this->super_type];
1573  $exp_types = array();
1574  foreach($types as $t)
1575  {
1577  {
1578  $exp_types[$t] = $lng->txt("sty_type_".$t);
1579  }
1580  }
1581  if (count($exp_types) > 1)
1582  {
1583  $type_input = new ilSelectInputGUI($lng->txt("sty_type"), "type");
1584  $type_input->setOptions($exp_types);
1585  $type_input->setValue(key($exp_types));
1586  $this->form_gui->addItem($type_input);
1587  }
1588  else if (count($exp_types) == 1)
1589  {
1590  $hid_input = new ilHiddenInputGUI("type");
1591  $hid_input->setValue(key($exp_types));
1592  $this->form_gui->addItem($hid_input);
1593  }
1594 
1595  $this->form_gui->setTitle($lng->txt("sty_add_characteristic"));
1596  $this->form_gui->addCommandButton("saveCharacteristic", $lng->txt("save"));
1597  $this->form_gui->addCommandButton("edit", $lng->txt("cancel"));
1598  $this->form_gui->setFormAction($ilCtrl->getFormAction($this));
1599  }
This class represents a selection list property in a property form.
This class represents a property form user interface.
global $ilCtrl
Definition: ilias.php:18
setPattern($pattern)
set pattern
This class represents a hidden form property in a property form.
static _isExpandable($a_type)
This class represents a regular expression input property in a property form.
setOptions($a_options)
Set Options.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initColorForm()

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

Init color form.

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

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

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

1779  {
1780  global $lng, $ilCtrl;
1781 
1782  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1783  $this->form_gui = new ilPropertyFormGUI();
1784 
1785  $this->form_gui->setTitle($lng->txt("sty_add_color"));
1786 
1787  // name
1788  $name_input = new ilRegExpInputGUI($lng->txt("sty_color_name"), "color_name");
1789  $name_input->setPattern("/^[a-zA-Z]+[a-zA-Z0-9]*$/");
1790  $name_input->setNoMatchMessage($lng->txt("sty_msg_color_must_only_include")." A-Z, a-z, 1-9");
1791  $name_input->setRequired(true);
1792  $name_input->setSize(15);
1793  $name_input->setMaxLength(15);
1794  $this->form_gui->addItem($name_input);
1795 
1796  // code
1797  $color_input = new ilColorPickerInputGUI($lng->txt("sty_color_code"), "color_code");
1798  $color_input->setRequired(true);
1799  $color_input->setDefaultColor("");
1800  $this->form_gui->addItem($color_input);
1801 
1802  if ($a_mode == "create")
1803  {
1804  $this->form_gui->addCommandButton("saveColor", $lng->txt("save"));
1805  $this->form_gui->addCommandButton("cancelColorSaving", $lng->txt("cancel"));
1806  }
1807  else
1808  {
1809  $this->form_gui->addCommandButton("updateColor", $lng->txt("save"));
1810  $this->form_gui->addCommandButton("cancelColorSaving", $lng->txt("cancel"));
1811  }
1812  $this->form_gui->setFormAction($ilCtrl->getFormAction($this));
1813  }
This class represents a property form user interface.
Color picker form for selecting color hexcodes using yui library.
global $ilCtrl
Definition: ilias.php:18
setPattern($pattern)
set pattern
This class represents a regular expression input property in a property form.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initImageForm()

ilObjStyleSheetGUI::initImageForm ( )

Init image form.

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

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

Referenced by addImageObject(), and uploadImageObject().

1347  {
1348  global $lng, $ilCtrl;
1349 
1350  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1351  $this->form_gui = new ilPropertyFormGUI();
1352 
1353  $this->form_gui->setTitle($lng->txt("sty_add_image"));
1354 
1355  $file_input = new ilImageFileInputGUI($lng->txt("sty_image_file"), "image_file");
1356  $file_input->setRequired(true);
1357  $this->form_gui->addItem($file_input);
1358 
1359  $this->form_gui->addCommandButton("uploadImage", $lng->txt("upload"));
1360  $this->form_gui->addCommandButton("cancelUpload", $lng->txt("cancel"));
1361  $this->form_gui->setFormAction($ilCtrl->getFormAction($this));
1362  }
This class represents a property form user interface.
global $ilCtrl
Definition: ilias.php:18
This class represents an image file property in a property form.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initMediaQueryForm()

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

Init media query form.

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

References $ilCtrl, and ilObjectGUI\$lng.

Referenced by addMediaQueryObject(), editMediaQueryObject(), saveMediaQueryObject(), and updateMediaQueryObject().

2004  {
2005  global $lng, $ilCtrl;
2006 
2007  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
2008  $this->form_gui = new ilPropertyFormGUI();
2009 
2010  $this->form_gui->setTitle($lng->txt("sty_add_media_query"));
2011 
2012  // media query
2013  $ti = new ilTextInputGUI("@media", "mquery");
2014  $ti->setMaxLength(2000);
2015  $this->form_gui->addItem($ti);
2016 
2017 
2018  if ($a_mode == "create")
2019  {
2020  $this->form_gui->addCommandButton("saveMediaQuery", $lng->txt("save"));
2021  $this->form_gui->addCommandButton("listMediaQueries", $lng->txt("cancel"));
2022  }
2023  else
2024  {
2025  $this->form_gui->addCommandButton("updateMediaQuery", $lng->txt("save"));
2026  $this->form_gui->addCommandButton("listMediaQueries", $lng->txt("cancel"));
2027  }
2028  $this->form_gui->setFormAction($ilCtrl->getFormAction($this));
2029  }
This class represents a property form user interface.
global $ilCtrl
Definition: ilias.php:18
This class represents a text property in a property form.
+ Here is the caller graph for this function:

◆ initPropertiesForm()

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

FORM: Init properties form.

Parameters
int$a_modeEdit Mode

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

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

Referenced by propertiesObject(), and updateObject().

286  {
287  global $lng, $rbacsystem;
288 
289  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
290  $this->form = new ilPropertyFormGUI();
291 
292  // title
293  $ti = new ilTextInputGUI($this->lng->txt("title"), "style_title");
294  $ti->setMaxLength(128);
295  $ti->setSize(40);
296  $ti->setRequired(true);
297  $this->form->addItem($ti);
298 
299  // description
300  $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "style_description");
301  //$ta->setCols();
302  //$ta->setRows();
303  $this->form->addItem($ta);
304 
305  // disable automatic margins for left/right alignment
306  $cb = new ilCheckboxInputGUI($this->lng->txt("sty_disable_auto_margins"), "disable_auto_margins");
307  $cb->setInfo($this->lng->txt("sty_disable_auto_margins_info"));
308  $this->form->addItem($cb);
309 
310  // save and cancel commands
311 
312  if ($a_mode == "create")
313  {
314  $this->form->addCommandButton("save", $lng->txt("save"));
315  $this->form->addCommandButton("cancelSave", $lng->txt("cancel"));
316  }
317  else
318  {
319  if ($rbacsystem->checkAccess("write", (int) $_GET["ref_id"]))
320  {
321  $this->form->addCommandButton("update", $lng->txt("save"));
322  }
323  }
324 
325  $this->form->setTitle($lng->txt("edit_stylesheet"));
326  $this->form->setFormAction($this->ctrl->getFormAction($this));
327 
328  }
This class represents a property form user interface.
$_GET["client_id"]
This class represents a checkbox property in a property form.
setInfo($a_info)
Set Information Text.
This class represents a text property in a property form.
setMaxLength($a_maxlength)
Set Max Length.
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initTagStyleForm()

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 615 of file class.ilObjStyleSheetGUI.php.

References $ilCtrl, ilObjectGUI\$lng, $options, 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().

616  {
617  global $lng, $ilCtrl;
618 
619  $ilCtrl->saveParameter($this, array("mq_id"));
620 
621  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
622  $this->form_gui = new ilPropertyFormGUI();
623 
624  $avail_pars = $this->object->getAvailableParameters();
625  $groups = $this->object->getStyleParameterGroups();
626 
627  // output select lists
628  foreach ($groups as $k => $group)
629  {
630  // filter groups of properties that should only be
631  // displayed with matching tag
632  $filtered_groups = ilObjStyleSheet::_getFilteredGroups();
633  if (is_array($filtered_groups[$k]) && !in_array($a_cur_tag, $filtered_groups[$k]))
634  {
635  continue;
636  }
637 
638  $sh = new ilFormSectionHeaderGUI();
639  $sh->setTitle($lng->txt("sty_".$k));
640  $this->form_gui->addItem($sh);
641 
642  foreach ($group as $par)
643  {
644  $basepar = explode(".", $par);
645  $basepar = $basepar[0];
646 
647  $var = str_replace("-", "_", $basepar);
648  $up_par = strtoupper($var);
649 
651  {
652  case "select":
653  $sel_input = new ilSelectInputGUI($lng->txt("sty_".$var), $basepar);
654  $options = array("" => "");
655  foreach ($avail_pars[$par] as $p)
656  {
657  $options[$p] = $p;
658  }
659  $sel_input->setOptions($options);
660  $this->form_gui->addItem($sel_input);
661  break;
662 
663  case "text":
664  $text_input = new ilTextInputGUI($lng->txt("sty_".$var), $basepar);
665  $text_input->setMaxLength(200);
666  $text_input->setSize(20);
667  $this->form_gui->addItem($text_input);
668  break;
669 
670  case "fontsize":
671  include_once("./Services/Style/classes/class.ilFontSizeInputGUI.php");
672  $fs_input = new ilFontSizeInputGUI($lng->txt("sty_".$var), $basepar);
673  $this->form_gui->addItem($fs_input);
674  break;
675 
676  case "numeric_no_perc":
677  case "numeric":
678  include_once("./Services/Style/classes/class.ilNumericStyleValueInputGUI.php");
679  $num_input = new ilNumericStyleValueInputGUI($lng->txt("sty_".$var), $basepar);
680  if (ilObjStyleSheet::_getStyleParameterInputType($par) == "numeric_no_perc")
681  {
682  $num_input->setAllowPercentage(false);
683  }
684  $this->form_gui->addItem($num_input);
685  break;
686 
687  case "percentage":
688  $per_input = new ilNumberInputGUI($lng->txt("sty_".$var), $basepar);
689  $per_input->setMinValue(0);
690  $per_input->setMaxValue(100);
691  $per_input->setMaxLength(3);
692  $per_input->setSize(3);
693  $this->form_gui->addItem($per_input);
694  break;
695 
696  case "color":
697  //include_once("./Services/Style/classes/class.ilNumericStyleValueInputGUI.php");
698  $col_input = new ilColorPickerInputGUI($lng->txt("sty_".$var), $basepar);
699  $col_input->setDefaultColor("");
700  $col_input->setAcceptNamedColors(true);
701  $this->form_gui->addItem($col_input);
702  break;
703 
704  case "trbl_numeric":
705  include_once("./Services/Style/classes/class.ilTRBLNumericStyleValueInputGUI.php");
706  $num_input = new ilTRBLNumericStyleValueInputGUI($lng->txt("sty_".$var), $basepar);
707  if (ilObjStyleSheet::_getStyleParameterInputType($par) == "trbl_numeric_no_perc")
708  {
709  $num_input->setAllowPercentage(false);
710  }
711  $this->form_gui->addItem($num_input);
712  break;
713 
714  case "border_width":
715  include_once("./Services/Style/classes/class.ilTRBLBorderWidthInputGUI.php");
716  $bw_input = new ilTRBLBorderWidthInputGUI($lng->txt("sty_".$var), $basepar);
717  $this->form_gui->addItem($bw_input);
718  break;
719 
720  case "border_style":
721  include_once("./Services/Style/classes/class.ilTRBLBorderStyleInputGUI.php");
722  $bw_input = new ilTRBLBorderStyleInputGUI($lng->txt("sty_".$var), $basepar);
723  $this->form_gui->addItem($bw_input);
724  break;
725 
726  case "trbl_color":
727  include_once("./Services/Style/classes/class.ilTRBLColorPickerInputGUI.php");
728  $col_input = new ilTRBLColorPickerInputGUI($lng->txt("sty_".$var), $basepar);
729  $col_input->setAcceptNamedColors(true);
730  $this->form_gui->addItem($col_input);
731  break;
732 
733  case "background_image":
734  include_once("./Services/Style/classes/class.ilBackgroundImageInputGUI.php");
735  $im_input = new ilBackgroundImageInputGUI($lng->txt("sty_".$var), $basepar);
736  $imgs = array();
737  foreach ($this->object->getImages() as $entry)
738  {
739  $imgs[] = $entry["entry"];
740  }
741  $im_input->setImages($imgs);
742  $this->form_gui->addItem($im_input);
743  break;
744 
745  case "background_position":
746  include_once("./Services/Style/classes/class.ilBackgroundPositionInputGUI.php");
747  $im_input = new ilBackgroundPositionInputGUI($lng->txt("sty_".$var), $basepar);
748  $this->form_gui->addItem($im_input);
749  break;
750  }
751  }
752  }
753 
754  // custom parameters
755  $sh = new ilFormSectionHeaderGUI();
756  $sh->setTitle($lng->txt("sty_custom"));
757  $this->form_gui->addItem($sh);
758 
759  // custom parameters
760  $ti = new ilTextInputGUI($this->lng->txt("sty_custom_par"), "custom_par");
761  $ti->setMaxLength(300);
762  $ti->setSize(80);
763  $ti->setMulti(true);
764  $ti->setInfo($this->lng->txt("sty_custom_par_info"));
765  $this->form_gui->addItem($ti);
766 
767 
768  // save and cancel commands
769  $this->form_gui->addCommandButton("updateTagStyle", $lng->txt("save_return"));
770  $this->form_gui->addCommandButton("refreshTagStyle", $lng->txt("save_refresh"));
771 
772 // $this->form_gui->setTitle($lng->txt("edit"));
773  $this->form_gui->setFormAction($this->ctrl->getFormAction($this));
774  }
This class represents a selection list property in a property form.
This class represents a property form user interface.
This class represents a section header in a property form.
Color picker form for selecting color hexcodes using yui library.
setAllowPercentage($a_allowpercentage)
Set Allow Percentage.
Color picker form for selecting color hexcodes using yui library (all/top/right/bottom/left) ...
setAllowPercentage($a_allowpercentage)
Set Allow Percentage.
This class represents a numeric style property in a property form.
global $ilCtrl
Definition: ilias.php:18
This class represents a border style with all/top/right/bottom/left in a property form...
setMinValue($a_minvalue, $a_display_always=false)
Set Minimum Value.
if(!is_array($argv)) $options
This class represents a number property in a property form.
This class represents a border width with all/top/right/bottom/left in a property form...
This class represents a text property in a property form.
setDefaultColor($a_defaultcolor)
Set Default Color.
setMaxLength($a_maxlength)
Set Max Length.
setOptions($a_options)
Set Options.
This class represents a fint size property in a property form.
This class represents a numeric style property with all/top/right/bottom/left in a property form...
setAcceptNamedColors($a_acceptnamedcolors)
Set Accept Named Colors (Leading &#39;!&#39;).
This class represents a background image property in a property form.
This class represents a background position in a property form.
static _getStyleParameterInputType($par)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initTemplateForm()

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

Init table template form.

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

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

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

2338  {
2339  global $lng, $ilCtrl;
2340 
2341  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
2342  $this->form_gui = new ilPropertyFormGUI();
2343 
2344  if ($a_mode == "create")
2345  {
2346  $this->form_gui->setTitle($lng->txt("sty_add_template"));
2347  }
2348  else
2349  {
2350  $this->form_gui->setTitle($lng->txt("sty_edit_template"));
2351  }
2352 
2353  // name
2354  $name_input = new ilRegExpInputGUI($lng->txt("sty_template_name"), "name");
2355  $name_input->setPattern("/^[a-zA-Z]+[a-zA-Z0-9]*$/");
2356  $name_input->setNoMatchMessage($lng->txt("sty_msg_color_must_only_include")." A-Z, a-z, 1-9");
2357  $name_input->setRequired(true);
2358  $name_input->setSize(30);
2359  $name_input->setMaxLength(30);
2360  $this->form_gui->addItem($name_input);
2361 
2362  // template style classes
2363  $scs = ilObjStyleSheet::_getTemplateClassTypes($_GET["temp_type"]);
2364  foreach ($scs as $sc => $st)
2365  {
2366  $sc_input = new ilSelectInputGUI($lng->txt("sty_".$sc."_class"), $sc."_class");
2367  $chars = $this->object->getCharacteristics($st);
2368  $options = array("" => "");
2369  foreach($chars as $char)
2370  {
2371  $options[$char] = $char;
2372  }
2373  $sc_input->setOptions($options);
2374  $this->form_gui->addItem($sc_input);
2375  }
2376 
2377  if ($a_mode == "create")
2378  {
2379  $this->form_gui->addCommandButton("saveTemplate", $lng->txt("save"));
2380  $this->form_gui->addCommandButton("cancelTemplateSaving", $lng->txt("cancel"));
2381  }
2382  else
2383  {
2384  $this->form_gui->addCommandButton("refreshTemplate", $lng->txt("save_refresh"));
2385  $this->form_gui->addCommandButton("updateTemplate", $lng->txt("save_return"));
2386  $this->form_gui->addCommandButton("cancelTemplateSaving", $lng->txt("cancel"));
2387  }
2388  $this->form_gui->setFormAction($ilCtrl->getFormAction($this));
2389  }
static _getTemplateClassTypes($a_template_type="")
Get template class types.
This class represents a selection list property in a property form.
This class represents a property form user interface.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
setPattern($pattern)
set pattern
if(!is_array($argv)) $options
This class represents a regular expression input property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initTemplateGenerationForm()

ilObjStyleSheetGUI::initTemplateGenerationForm ( )

Init table template generation form.

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

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

Referenced by generateTemplateObject(), and templateGenerationObject().

2635  {
2636  global $lng, $ilCtrl;
2637 
2638  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
2639  $this->form_gui = new ilPropertyFormGUI();
2640 
2641  $this->form_gui->setTitle($lng->txt("sty_generate_template"));
2642 
2643  // name
2644  $name_input = new ilRegExpInputGUI($lng->txt("sty_template_name"), "name");
2645  $name_input->setPattern("/^[a-zA-Z]+[a-zA-Z0-9]*$/");
2646  $name_input->setNoMatchMessage($lng->txt("sty_msg_color_must_only_include")." A-Z, a-z, 1-9");
2647  $name_input->setRequired(true);
2648  $name_input->setSize(30);
2649  $name_input->setMaxLength(30);
2650  $this->form_gui->addItem($name_input);
2651 
2652  // basic layout
2653  $bl_input = new ilSelectInputGUI($lng->txt("sty_template_layout"), "layout");
2654  $options = array(
2655  "coloredZebra" => $lng->txt("sty_table_template_colored_zebra"),
2656  "bwZebra" => $lng->txt("sty_table_template_bw_zebra"),
2657  "noZebra" => $lng->txt("sty_table_template_no_zebra")
2658  );
2659  $bl_input->setOptions($options);
2660  $this->form_gui->addItem($bl_input);
2661 
2662  // top bottom padding
2663  include_once("./Services/Style/classes/class.ilNumericStyleValueInputGUI.php");
2664  $num_input = new ilNumericStyleValueInputGUI($lng->txt("sty_top_bottom_padding"), "tb_padding");
2665  $num_input->setAllowPercentage(false);
2666  $num_input->setValue("3px");
2667  $this->form_gui->addItem($num_input);
2668 
2669  // left right padding
2670  $num_input = new ilNumericStyleValueInputGUI($lng->txt("sty_left_right_padding"), "lr_padding");
2671  $num_input->setAllowPercentage(false);
2672  $num_input->setValue("10px");
2673  $this->form_gui->addItem($num_input);
2674 
2675  // base color
2676  $bc_input = new ilSelectInputGUI($lng->txt("sty_base_color"), "base_color");
2677  $cs = $this->object->getColors();
2678  $options = array();
2679  foreach ($cs as $c)
2680  {
2681  $options[$c["name"]] = $c["name"];
2682  }
2683  $bc_input->setOptions($options);
2684  $this->form_gui->addItem($bc_input);
2685 
2686  // Lightness Settings
2687  $lss = array("border" => 90, "header_text" => 70, "header_bg" => 0,
2688  "cell1_text" => -60, "cell1_bg" => 90, "cell2_text" => -60, "cell2_bg" => 75);
2689  foreach ($lss as $ls => $v)
2690  {
2691  $l_input = new ilNumberInputGUI($lng->txt("sty_lightness_".$ls), "lightness_".$ls);
2692  $l_input->setMaxValue(100);
2693  $l_input->setMinValue(-100);
2694  $l_input->setValue($v);
2695  $l_input->setSize(4);
2696  $l_input->setMaxLength(4);
2697  $this->form_gui->addItem($l_input);
2698  }
2699 
2700  $this->form_gui->addCommandButton("templateGeneration", $lng->txt("generate"));
2701  $this->form_gui->addCommandButton("cancelTemplateSaving", $lng->txt("cancel"));
2702  $this->form_gui->setFormAction($ilCtrl->getFormAction($this));
2703  }
This class represents a selection list property in a property form.
This class represents a property form user interface.
setAllowPercentage($a_allowpercentage)
Set Allow Percentage.
This class represents a numeric style property in a property form.
global $ilCtrl
Definition: ilias.php:18
setPattern($pattern)
set pattern
if(!is_array($argv)) $options
This class represents a number property in a property form.
This class represents a regular expression input property in a property form.
setOptions($a_options)
Set Options.
setMaxValue($a_maxvalue, $a_display_always=false)
Set Maximum Value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listColorsObject()

ilObjStyleSheetGUI::listColorsObject ( )

List colors of style.

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

References $_GET, $ilCtrl, and ilObjectGUI\$tpl.

1734  {
1735  global $tpl, $rbacsystem, $ilToolbar, $ilCtrl;
1736 
1737  if ($rbacsystem->checkAccess("write", (int) $_GET["ref_id"]))
1738  {
1739  $ilToolbar->addButton($this->lng->txt("sty_add_color"),
1740  $ilCtrl->getLinkTarget($this, "addColor"));
1741  }
1742 
1743  include_once("./Services/Style/classes/class.ilStyleColorTableGUI.php");
1744  $table_gui = new ilStyleColorTableGUI($this, "listColors",
1745  $this->object);
1746  $tpl->setContent($table_gui->getHTML());
1747 
1748  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
TableGUI class for style editor (image list)

◆ listImagesObject()

ilObjStyleSheetGUI::listImagesObject ( )

List images of style.

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

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

1284  {
1285  global $tpl, $ilToolbar, $ilCtrl, $lng, $rbacsystem;
1286 
1287  if ($rbacsystem->checkAccess("write", (int) $_GET["ref_id"]))
1288  {
1289  $ilToolbar->addButton($lng->txt("sty_add_image"),
1290  $ilCtrl->getLinkTarget($this, "addImage"));
1291  }
1292 
1293  include_once("./Services/Style/classes/class.ilStyleImageTableGUI.php");
1294  $table_gui = new ilStyleImageTableGUI($this, "listImages",
1295  $this->object);
1296  $tpl->setContent($table_gui->getHTML());
1297 
1298  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
TableGUI class for style editor (image list)

◆ listMediaQueriesObject()

ilObjStyleSheetGUI::listMediaQueriesObject ( )

List media queries of style.

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

References $_GET, $ilCtrl, and ilObjectGUI\$tpl.

1960  {
1961  global $tpl, $rbacsystem, $ilToolbar, $ilCtrl;
1962 
1963  if ($rbacsystem->checkAccess("write", (int) $_GET["ref_id"]))
1964  {
1965  $ilToolbar->addButton($this->lng->txt("sty_add_media_query"),
1966  $ilCtrl->getLinkTarget($this, "addMediaQuery"));
1967  }
1968 
1969  include_once("./Services/Style/classes/class.ilStyleMediaQueryTableGUI.php");
1970  $table_gui = new ilStyleMediaQueryTableGUI($this, "listMediaQueries",
1971  $this->object);
1972  $tpl->setContent($table_gui->getHTML());
1973  }
$_GET["client_id"]
TableGUI class for style editor (image list)
global $ilCtrl
Definition: ilias.php:18

◆ listTemplatesObject()

ilObjStyleSheetGUI::listTemplatesObject ( )

List templates.

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

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

2163  {
2164  global $tpl, $ilTabs, $ilCtrl;
2165 
2166  $ctype = $_GET["temp_type"];
2167  if ($ctype == "")
2168  {
2169  $ctype = "table";
2170  $ilCtrl->setParameter($this, "temp_type", $ctype);
2171  $_GET["temp_type"] = $ctype;
2172  }
2173 
2174  $this->setTemplatesSubTabs();
2175  $ilTabs->setSubTabActive("sty_".$ctype."_templates");
2176 
2177  $this->includeCSS();
2178  include_once("./Services/Style/classes/class.ilTableTemplatesTableGUI.php");
2179  $table_gui = new ilTableTemplatesTableGUI($ctype, $this, "listTemplates",
2180  $this->object);
2181  $tpl->setContent($table_gui->getHTML());
2182 
2183  }
$_GET["client_id"]
setTemplatesSubTabs()
adds tabs to tab gui object
global $ilCtrl
Definition: ilias.php:18
includeCSS()
Include CSS in output.
+ Here is the call graph for this function:

◆ newStyleParameterObject()

ilObjStyleSheetGUI::newStyleParameterObject ( )

add style parameter

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

References $_POST, and editObject().

864  {
865  $this->object->addParameter($_POST["tag"], $_POST["parameter"]);
866  $this->editObject();
867  }
$_POST['username']
Definition: cron.php:12
editObject()
edit style sheet
+ Here is the call graph for this function:

◆ outputTagStyleEditScreen()

ilObjStyleSheetGUI::outputTagStyleEditScreen ( )

Output tag style edit screen.

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

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

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

584  {
585  global $tpl, $ilCtrl, $lng;
586 
587  // set style sheet
588  $tpl->setCurrentBlock("ContentStyle");
589  $tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
590  $this->object->getContentStylePath($this->object->getId()));
591 
592  $ts_tpl = new ilTemplate("tpl.style_tag_edit.html", true, true, "Services/Style");
593 
594  $cur = explode(".",$_GET["tag"]);
595  $cur_tag = $cur[0];
596  $cur_class = $cur[1];
597 
598  $ts_tpl->setVariable("EXAMPLE",
599  ilObjStyleSheetGUI::getStyleExampleHTML($_GET["style_type"], $cur_class));
600 
601  $ts_tpl->setVariable("FORM",
602  $this->form_gui->getHtml());
603 
604  $tpl->setTitle($cur_class." (".$lng->txt("sty_type_".$_GET["style_type"]).")");
605 
606  $tpl->setContent($ts_tpl->get());
607  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
special template class to simplify handling of ITX/PEAR
static getStyleExampleHTML($a_type, $a_class)
Get style example HTML.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pasteCharacteristicsObject()

ilObjStyleSheetGUI::pasteCharacteristicsObject ( )

Paste characteristics.

Parameters

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

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

1702  {
1703  global $ilCtrl, $lng;
1704 
1705  if (is_array($_POST["title"]))
1706  {
1707  foreach ($_POST["title"] as $from_char => $to_title)
1708  {
1709  $fc = explode(".", $from_char);
1710 
1711  if ($_POST["conflict_action"][$from_char] == "overwrite" ||
1712  !$this->object->characteristicExists($to_title, $fc[0]))
1713  {
1714  $this->object->copyCharacteristic($_POST["from_style_id"],
1715  $fc[0], $fc[2], $to_title);
1716  }
1717  }
1718  ilObjStyleSheet::_writeUpToDate($this->object->getId(), false);
1719  unset($_SESSION["sty_copy"]);
1720  ilUtil::sendSuccess($lng->txt("sty_style_classes_copied"), true);
1721  }
1722 
1723  $ilCtrl->redirect($this, "edit");
1724  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
_writeUpToDate($a_id, $a_up_to_date)
Write up to date.
+ Here is the call graph for this function:

◆ pasteCharacteristicsOverviewObject()

ilObjStyleSheetGUI::pasteCharacteristicsOverviewObject ( )

Paste characteristics overview.

Parameters

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

References ilObjectGUI\$tpl.

1684  {
1685  global $tpl, $ilTabs;
1686 
1687  $ilTabs->clearTargets();
1688 
1689  include_once("./Services/Style/classes/class.ilPasteStyleCharacteristicTableGUI.php");
1690  $table = new ilPasteStyleCharacteristicTableGUI($this, "pasteCharacteristicsOverview");
1691 
1692  $tpl->setContent($table->getHTML());
1693  }

◆ propertiesObject()

ilObjStyleSheetGUI::propertiesObject ( )

Properties.

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

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

247  {
248  global $rbacsystem, $lng, $ilToolbar;
249 
250  // set style sheet
251  $this->tpl->setCurrentBlock("ContentStyle");
252  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
253  $this->object->getContentStylePath($this->object->getId()));
254  $this->tpl->parseCurrentBlock();
255 
256  // export button
257  $ilToolbar->addButton($this->lng->txt("export"),
258  $this->ctrl->getLinkTarget($this, "exportStyle"));
259 
260  $this->initPropertiesForm();
261  $this->getPropertiesValues();
262  $this->tpl->setContent($this->form->getHTML());
263  }
getPropertiesValues()
Get current values for properties from.
initPropertiesForm($a_mode="edit")
FORM: Init properties form.
+ Here is the call graph for this function:

◆ refreshObject()

ilObjStyleSheetGUI::refreshObject ( )

refresh style sheet

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

References $_POST, and editObject().

873  {
874  $this->object->setTitle($_POST["style_title"]);
875  $this->object->setDescription($_POST["style_description"]);
876 
877  foreach($_POST["styval"] as $id => $value)
878  {
879  $this->object->updateStyleParameter($id, $value);
880  }
881  $this->object->update();
882  $this->editObject();
883  }
$_POST['username']
Definition: cron.php:12
editObject()
edit style sheet
+ Here is the call graph for this function:

◆ refreshTagStyleObject()

ilObjStyleSheetGUI::refreshTagStyleObject ( )

save and refresh tag editing

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

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

359  {
360  global $ilCtrl;
361 
362  $cur = explode(".",$_GET["tag"]);
363  $cur_tag = $cur[0];
364  $cur_class = $cur[1];
365 
366  $this->initTagStyleForm("edit", $cur_tag);
367 
368  if ($this->form_gui->checkInput())
369  {
370  $this->saveTagStyle();
371  $ilCtrl->redirect($this, "editTagStyle");
372  }
373  else
374  {
375  $this->form_gui->setValuesByPost();
376  $this->outputTagStyleEditScreen();
377  }
378  }
saveTagStyle()
Save tag style.
$_GET["client_id"]
outputTagStyleEditScreen()
Output tag style edit screen.
global $ilCtrl
Definition: ilias.php:18
initTagStyleForm($a_mode, $a_cur_tag)
Init tag style editing form.
+ Here is the call graph for this function:

◆ refreshTemplateObject()

ilObjStyleSheetGUI::refreshTemplateObject ( )

Refresh table template.

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

References updateTemplateObject().

2495  {
2496  $this->updateTemplateObject(true);
2497  }
updateTemplateObject($a_refresh=false)
Update table template.
+ Here is the call graph for this function:

◆ returnToUpperContextObject()

ilObjStyleSheetGUI::returnToUpperContextObject ( )

return to upper context

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

References $_GET, and $ilCtrl.

2870  {
2871  global $ilCtrl;
2872 
2873  if ($_GET["baseClass"] == "ilAdministrationGUI")
2874  {
2875  $ilCtrl->redirectByClass("ilobjstylesettingsgui", "editContentStyles");
2876  }
2877  $ilCtrl->returnToParent($this);
2878  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

◆ saveCharacteristicObject()

ilObjStyleSheetGUI::saveCharacteristicObject ( )

Save Characteristic.

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

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

1525  {
1526  global $ilCtrl, $tpl, $lng;
1527 
1528  $this->initCharacteristicForm("create");
1529 
1530  if ($this->form_gui->checkInput())
1531  {
1532  if ($this->object->characteristicExists($_POST["new_characteristic"], $_GET["style_type"]))
1533  {
1534  $char_input = $this->form_gui->getItemByPostVar("new_characteristic");
1535  $char_input->setAlert($lng->txt("sty_characteristic_already_exists"));
1536  }
1537  else
1538  {
1539  $this->object->addCharacteristic($_POST["type"], $_POST["new_characteristic"]);
1540  ilUtil::sendInfo($lng->txt("sty_added_characteristic"), true);
1541  $ilCtrl->setParameter($this, "tag",
1542  ilObjStyleSheet::_determineTag($_POST["type"]).".".$_POST["new_characteristic"]);
1543  $ilCtrl->setParameter($this, "style_type", $_POST["type"]);
1544  $ilCtrl->redirect($this, "editTagStyle");
1545  }
1546  }
1547  $this->form_gui->setValuesByPost();
1548  $tpl->setContent($this->form_gui->getHTML());
1549  }
$_POST['username']
Definition: cron.php:12
static _determineTag($a_type)
$_GET["client_id"]
initCharacteristicForm($a_mode)
Init tag style editing form.
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
+ Here is the call graph for this function:

◆ saveColorObject()

ilObjStyleSheetGUI::saveColorObject ( )

Save color.

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

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

1842  {
1843  global $tpl, $ilCtrl, $lng;
1844 
1845  $this->initColorForm();
1846 
1847  if ($this->form_gui->checkInput())
1848  {
1849  if ($this->object->colorExists($_POST["color_name"]))
1850  {
1851  $col_input = $this->form_gui->getItemByPostVar("color_name");
1852  $col_input->setAlert($lng->txt("sty_color_already_exists"));
1853  }
1854  else
1855  {
1856  $this->object->addColor($_POST["color_name"],
1857  $_POST["color_code"]);
1858  $ilCtrl->redirect($this, "listColors");
1859  }
1860  }
1861  $this->form_gui->setValuesByPost();
1862  $tpl->setContent($this->form_gui->getHTML());
1863  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
initColorForm($a_mode="create")
Init color form.
+ Here is the call graph for this function:

◆ saveHideStatusObject()

ilObjStyleSheetGUI::saveHideStatusObject ( )

Save hide status for characteristics.

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

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

1637  {
1638  global $ilCtrl, $lng;
1639 
1640  //var_dump($_POST);
1641 
1642  foreach ($_POST["all_chars"] as $char)
1643  {
1644  $ca = explode(".", $char);
1645  $this->object->saveHideStatus($ca[0], $ca[2],
1646  (is_array($_POST["hide"]) && in_array($char, $_POST["hide"])));
1647  }
1648 
1649  ilUtil::sendInfo($lng->txt("msg_obj_modified"), true);
1650  $ilCtrl->redirect($this, "edit");
1651  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
+ Here is the call graph for this function:

◆ saveMediaQueryObject()

ilObjStyleSheetGUI::saveMediaQueryObject ( )

Save media query.

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

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

2053  {
2054  global $tpl, $ilCtrl, $lng;
2055 
2056  $this->initMediaQueryForm();
2057 
2058  if ($this->form_gui->checkInput())
2059  {
2060  $this->object->addMediaQuery($_POST["mquery"]);
2061  $ilCtrl->redirect($this, "listMediaQueries");
2062  }
2063  $this->form_gui->setValuesByPost();
2064  $tpl->setContent($this->form_gui->getHTML());
2065  }
$_POST['username']
Definition: cron.php:12
initMediaQueryForm($a_mode="create")
Init media query form.
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ saveMediaQueryOrderObject()

ilObjStyleSheetGUI::saveMediaQueryOrderObject ( )

Save media query order.

Parameters

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

References $_POST, and $ilCtrl.

2144  {
2145  global $ilCtrl;
2146 
2147  if (is_array($_POST["order"]))
2148  {
2149  $this->object->saveMediaQueryOrder($_POST["order"]);
2150  }
2151  $ilCtrl->redirect($this, "listMediaQueries");
2152  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18

◆ saveObject()

ilObjStyleSheetGUI::saveObject ( )

save style sheet

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

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

952  {
953  if(!trim($_POST["style_title"]))
954  {
955  $this->ctrl->redirect($this, "create");
956  }
957 
958 //echo "HH"; exit;
959  $class_name = "ilObjStyleSheet";
960  require_once("./Services/Style/classes/class.ilObjStyleSheet.php");
961  $newObj = new ilObjStyleSheet();
962  $newObj->setTitle("-");
963  $newObj->create();
964  $newObj->setTitle(ilUtil::stripSlashes($_POST["style_title"]));
965  $newObj->setDescription(ilUtil::stripSlashes($_POST["style_description"]));
966  $newObj->update();
967 
968  // assign style to style sheet folder,
969  // if parent is style sheet folder
970  if ($_GET["ref_id"] > 0)
971  {
972 
973  $fold =& ilObjectFactory::getInstanceByRefId($_GET["ref_id"]);
974  if ($fold->getType() == "stys")
975  {
976  $fold->addStyle($newObj->getId());
977  $fold->update();
978  ilObjStyleSheet::_writeStandard($newObj->getId(), "1");
979  $this->ctrl->redirectByClass("ilobjstylesettingsgui", "editContentStyles");
980  }
981  }
982 
983  return $newObj->getId();
984  }
$_POST['username']
Definition: cron.php:12
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
_writeStandard($a_id, $a_std)
Write standard flag.
$_GET["client_id"]
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
Class ilObjStyleSheet.
+ Here is the call graph for this function:

◆ saveTagStyle()

ilObjStyleSheetGUI::saveTagStyle ( )

Save tag style.

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

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

Referenced by refreshTagStyleObject(), and updateTagStyleObject().

408  {
409  $cur = explode(".", $_GET["tag"]);
410  $cur_tag = $cur[0];
411  $cur_class = $cur[1];
412  $avail_pars = ilObjStyleSheet::_getStyleParameters($cur_tag);
413  foreach ($avail_pars as $par => $v)
414  {
415  $var = str_replace("-", "_", $par);
416  $basepar_arr = explode(".", $par);
417  $basepar = $basepar_arr[0];
418  if ($basepar_arr[1] != "" && $basepar_arr[1] != $cur_tag)
419  {
420  continue;
421  }
422 
423  switch ($v["input"])
424  {
425  case "fontsize":
426  case "numeric_no_perc":
427  case "numeric":
428  case "background_image":
429  $in = $this->form_gui->getItemByPostVar($basepar);
430 //echo "<br>-".$cur_tag."-".$cur_class."-".$basepar."-".$_GET["style_type"]."-";
431  $this->writeStylePar($cur_tag, $cur_class, $basepar, $in->getValue(), $_GET["style_type"], (int) $_GET["mq_id"]);
432  break;
433 
434  case "color":
435  $color = trim($_POST[$basepar]);
436  if ($color != "" && trim(substr($color,0,1) != "!"))
437  {
438  $color = "#".$color;
439  }
440  $this->writeStylePar($cur_tag, $cur_class, $basepar, $color, $_GET["style_type"], (int) $_GET["mq_id"]);
441  break;
442 
443  case "trbl_numeric":
444  case "border_width":
445  case "border_style":
446  $in = $this->form_gui->getItemByPostVar($basepar);
447  $this->writeStylePar($cur_tag, $cur_class, $v["subpar"][0], $in->getAllValue(), $_GET["style_type"], (int) $_GET["mq_id"]);
448  $this->writeStylePar($cur_tag, $cur_class, $v["subpar"][1], $in->getTopValue(), $_GET["style_type"], (int) $_GET["mq_id"]);
449  $this->writeStylePar($cur_tag, $cur_class, $v["subpar"][2], $in->getRightValue(), $_GET["style_type"], (int) $_GET["mq_id"]);
450  $this->writeStylePar($cur_tag, $cur_class, $v["subpar"][3], $in->getBottomValue(), $_GET["style_type"], (int) $_GET["mq_id"]);
451  $this->writeStylePar($cur_tag, $cur_class, $v["subpar"][4], $in->getLeftValue(), $_GET["style_type"], (int) $_GET["mq_id"]);
452  break;
453 
454  case "trbl_color":
455  $in = $this->form_gui->getItemByPostVar($basepar);
456  $tblr_p = array (0 => "getAllValue", 1 => "getTopValue", 2 => "getRightValue",
457  3 => "getBottomValue", 4 => "getLeftValue");
458  foreach ($tblr_p as $k => $func)
459  {
460  $val = trim($in->$func());
461  $val = (($in->getAcceptNamedColors() && substr($val, 0, 1) == "!")
462  || $val == "")
463  ? $val
464  : "#".$val;
465  $this->writeStylePar($cur_tag, $cur_class, $v["subpar"][$k], $val, $_GET["style_type"], (int) $_GET["mq_id"]);
466  }
467  break;
468 
469  case "background_position":
470  $in = $this->form_gui->getItemByPostVar($basepar);
471  $this->writeStylePar($cur_tag, $cur_class, $basepar, $in->getValue(), $_GET["style_type"], (int) $_GET["mq_id"]);
472  break;
473 
474  default:
475  $this->writeStylePar($cur_tag, $cur_class, $basepar, $_POST[$basepar], $_GET["style_type"], (int) $_GET["mq_id"]);
476  break;
477  }
478  }
479 
480  // write custom parameter
481  $this->object->deleteCustomStylePars($cur_tag, $cur_class, $_GET["style_type"], (int) $_GET["mq_id"]);
482  if (is_array($_POST["custom_par"]))
483  {
484  foreach ($_POST["custom_par"] as $cpar)
485  {
486  $par_arr = explode(":", $cpar);
487  if (count($par_arr) == 2)
488  {
489  $par = trim($par_arr[0]);
490  $val = trim(str_replace(";", "", $par_arr[1]));
491  $this->writeStylePar($cur_tag, $cur_class, $par, $val, $_GET["style_type"], (int) $_GET["mq_id"], true);
492  }
493  }
494  }
495 
496  $this->object->update();
497  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
writeStylePar($cur_tag, $cur_class, $par, $value, $a_type, $a_mq_id, $a_custom=false)
static _getStyleParameters($a_tag="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveTemplateObject()

ilObjStyleSheetGUI::saveTemplateObject ( )

Save table template.

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

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

2406  {
2407  global $tpl, $ilCtrl, $lng;
2408 
2409  $this->initTemplateForm();
2410 
2411  if ($this->form_gui->checkInput())
2412  {
2413  if ($this->object->templateExists($_POST["name"]))
2414  {
2415  $name_input = $this->form_gui->getItemByPostVar("name");
2416  $name_input->setAlert($lng->txt("sty_table_template_already_exists"));
2417  }
2418  else
2419  {
2420  $classes = array();
2421  foreach (ilObjStyleSheet::_getTemplateClassTypes($_GET["temp_type"]) as $tct => $ct)
2422  {
2423  $classes[$tct] = $_POST[$tct."_class"];
2424  }
2425  $t_id = $this->object->addTemplate($_GET["temp_type"], $_POST["name"], $classes);
2426  $this->object->writeTemplatePreview($t_id,
2427  $this->getTemplatePreview($_GET["temp_type"], $t_id, true));
2428  $ilCtrl->redirect($this, "listTemplates");
2429  }
2430  }
2431  $this->form_gui->setValuesByPost();
2432  $tpl->setContent($this->form_gui->getHTML());
2433  }
getTemplatePreview($a_type, $a_t_id, $a_small_mode=false)
Get table template preview.
static _getTemplateClassTypes($a_template_type="")
Get template class types.
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
initTemplateForm($a_mode="create")
Init table template form.
+ Here is the call graph for this function:

◆ setSubTabs()

ilObjStyleSheetGUI::setSubTabs ( )

adds tabs to tab gui object

Parameters
object$tabs_guiilTabsGUI object

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

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

Referenced by editObject().

1196  {
1197  global $lng, $ilTabs, $ilCtrl;
1198 
1200 
1201  foreach ($types as $super_type => $types)
1202  {
1203  // text block characteristics
1204  $ilCtrl->setParameter($this, "style_type", $super_type);
1205  $ilTabs->addSubTabTarget("sty_".$super_type."_char",
1206  $this->ctrl->getLinkTarget($this, "edit"), array("edit", ""),
1207  get_class($this));
1208  }
1209 
1210  $ilCtrl->setParameter($this, "style_type", $_GET["style_type"]);
1211  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTabs()

ilObjStyleSheetGUI::setTabs ( )

output tabs

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

References ilObjectGUI\$lng, and getTabs().

1083  {
1084  global $lng;
1085 
1086  $this->getTabs($this->tabs_gui);
1087 
1088  if (strtolower(get_class($this->object)) == "ilobjstylesheet")
1089  {
1090  $this->tpl->setVariable("HEADER", $this->object->getTitle());
1091  }
1092  else
1093  {
1094  $this->tpl->setVariable("HEADER", $lng->txt("create_stylesheet"));
1095  }
1096  }
getTabs(&$tabs_gui)
adds tabs to tab gui object
+ Here is the call graph for this function:

◆ setTemplatesSubTabs()

ilObjStyleSheetGUI::setTemplatesSubTabs ( )

adds tabs to tab gui object

Parameters
object$tabs_guiilTabsGUI object

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

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

Referenced by listTemplatesObject().

1219  {
1220  global $lng, $ilTabs, $ilCtrl;
1221 
1223 
1224  foreach ($types as $t => $c)
1225  {
1226  $ilCtrl->setParameter($this, "temp_type", $t);
1227  $ilTabs->addSubTabTarget("sty_".$t."_templates",
1228  $this->ctrl->getLinkTarget($this, "listTemplates"), array("listTemplates", ""),
1229  get_class($this));
1230  }
1231 
1232  $ilCtrl->setParameter($this, "temp_type", $_GET["temp_type"]);
1233  }
static _getTemplateClassTypes($a_template_type="")
Get template class types.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showUpperIcon()

ilObjStyleSheetGUI::showUpperIcon ( )

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

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

1265  {
1266  global $tree, $tpl, $objDefinition;
1267 
1268  if (strtolower($_GET["baseClass"]) == "iladministrationgui")
1269  {
1270  $tpl->setUpperIcon(
1271  $this->ctrl->getLinkTargetByClass("ilobjstylesettingsgui",
1272  "editContentStyles"));
1273  }
1274  else
1275  {
1276  // ?
1277  }
1278  }
$_GET["client_id"]

◆ switchMQueryObject()

ilObjStyleSheetGUI::switchMQueryObject ( )

Switch media query.

Parameters

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

References $_POST, and $ilCtrl.

572  {
573  global $ilCtrl;
574 
575  $ilCtrl->setParameter($this, "mq_id", (int) $_POST["mq_id"]);
576  $ilCtrl->redirect($this, "editTagStyle");
577  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18

◆ templateGenerationObject()

ilObjStyleSheetGUI::templateGenerationObject ( )

Table template generation.

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

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

2709  {
2710  global $tpl, $ilCtrl, $lng;
2711 
2712  $this->initTemplateGenerationForm();
2713 
2714  if ($this->form_gui->checkInput())
2715  {
2716  if ($this->object->templateExists($_POST["name"]))
2717  {
2718  $name_input = $this->form_gui->getItemByPostVar("name");
2719  $name_input->setAlert($lng->txt("sty_table_template_already_exists"));
2720  }
2721  else
2722  {
2723  // -> move to application class!
2724 
2725  // cell classes
2726  $cells = array("H" => "header", "C1" => "cell1", "C2" => "cell2");
2727  $tb_p = $this->form_gui->getItemByPostVar("tb_padding");
2728  $tb_padding = $tb_p->getValue();
2729  $lr_p = $this->form_gui->getItemByPostVar("lr_padding");
2730  $lr_padding = $lr_p->getValue();
2731  $cell_color = $_POST["base_color"];
2732 
2733  // use mid gray as cell color for bw zebra
2734  if ($_POST["layout"] == "bwZebra")
2735  {
2736  $cell_color = "MidGray";
2737  if (!$this->object->colorExists($cell_color))
2738  {
2739  $this->object->addColor($cell_color, "7F7F7F");
2740  }
2741  $this->object->updateColor($cell_color, $cell_color, "7F7F7F");
2742  }
2743 
2744  foreach ($cells as $k => $cell)
2745  {
2746  $cell_class[$k] = $_POST["name"].$k;
2747  if (!$this->object->characteristicExists($cell_class[$k], "table_cell"))
2748  {
2749  $this->object->addCharacteristic("table_cell", $cell_class[$k], true);
2750  }
2751  if ($_POST["layout"] == "bwZebra" && $k == "H")
2752  {
2753  $this->object->replaceStylePar("td", $cell_class[$k], "color",
2754  "!".$_POST["base_color"]."(".$_POST["lightness_".$cell."_text"].")", "table_cell");
2755  $this->object->replaceStylePar("td", $cell_class[$k], "background-color",
2756  "!".$_POST["base_color"]."(".$_POST["lightness_".$cell."_bg"].")", "table_cell");
2757  }
2758  else
2759  {
2760  $this->object->replaceStylePar("td", $cell_class[$k], "color",
2761  "!".$cell_color."(".$_POST["lightness_".$cell."_text"].")", "table_cell");
2762  $this->object->replaceStylePar("td", $cell_class[$k], "background-color",
2763  "!".$cell_color."(".$_POST["lightness_".$cell."_bg"].")", "table_cell");
2764  }
2765  $this->object->replaceStylePar("td", $cell_class[$k], "padding-top",
2766  $tb_padding, "table_cell");
2767  $this->object->replaceStylePar("td", $cell_class[$k], "padding-bottom",
2768  $tb_padding, "table_cell");
2769  $this->object->replaceStylePar("td", $cell_class[$k], "padding-left",
2770  $lr_padding, "table_cell");
2771  $this->object->replaceStylePar("td", $cell_class[$k], "padding-right",
2772  $lr_padding, "table_cell");
2773  $this->object->replaceStylePar("td", $cell_class[$k], "border-width",
2774  "1px", "table_cell");
2775  $this->object->replaceStylePar("td", $cell_class[$k], "border-style",
2776  "solid", "table_cell");
2777  $this->object->replaceStylePar("td", $cell_class[$k], "border-color",
2778  "!".$cell_color."(".$_POST["lightness_border"].")", "table_cell");
2779  $this->object->replaceStylePar("td", $cell_class[$k], "font-weight",
2780  "normal", "table_cell");
2781  }
2782 
2783  // table class
2784  $classes["table"] = $_POST["name"]."T";
2785  if (!$this->object->characteristicExists($classes["table"], "table"))
2786  {
2787  $this->object->addCharacteristic("table", $classes["table"], true);
2788  }
2789  $this->object->replaceStylePar("table", $classes["table"], "caption-side",
2790  "bottom", "table");
2791  $this->object->replaceStylePar("table", $classes["table"], "border-collapse",
2792  "collapse", "table");
2793  $this->object->replaceStylePar("table", $classes["table"], "margin-top",
2794  "5px", "table");
2795  $this->object->replaceStylePar("table", $classes["table"], "margin-bottom",
2796  "5px", "table");
2797  if ($_POST["layout"] == "bwZebra")
2798  {
2799  $this->object->replaceStylePar("table", $classes["table"], "border-bottom-color",
2800  "!".$_POST["base_color"], "table");
2801  $this->object->replaceStylePar("table", $classes["table"], "border-bottom-style",
2802  "solid", "table");
2803  $this->object->replaceStylePar("table", $classes["table"], "border-bottom-width",
2804  "3px", "table");
2805  $sb = array("left", "right", "top");
2806  foreach ($sb as $b)
2807  {
2808  $this->object->replaceStylePar("table", $classes["table"], "border-".$b."-width",
2809  "0px", "table");
2810  }
2811  }
2812 
2813  switch ($_POST["layout"])
2814  {
2815  case "coloredZebra":
2816  $classes["row_head"] = $cell_class["H"];
2817  $classes["odd_row"] = $cell_class["C1"];
2818  $classes["even_row"] = $cell_class["C2"];
2819  break;
2820 
2821  case "bwZebra":
2822  $classes["row_head"] = $cell_class["H"];
2823  $classes["odd_row"] = $cell_class["C1"];
2824  $classes["even_row"] = $cell_class["C2"];
2825  break;
2826 
2827  case "noZebra":
2828  $classes["row_head"] = $cell_class["H"];
2829  $classes["odd_row"] = $cell_class["C1"];
2830  $classes["even_row"] = $cell_class["C1"];
2831  $classes["col_head"] = $cell_class["C2"];
2832  break;
2833  }
2834 
2835 
2836  $t_id = $this->object->addTemplate($_GET["temp_type"],
2837  $_POST["name"], $classes);
2838  $this->object->writeTemplatePreview($t_id,
2839  $this->getTemplatePreview($_GET["temp_type"], $t_id, true));
2840  $ilCtrl->redirect($this, "listTemplates");
2841  }
2842  }
2843  $this->form_gui->setValuesByPost();
2844  $tpl->setContent($this->form_gui->getHTML());
2845  }
getTemplatePreview($a_type, $a_t_id, $a_small_mode=false)
Get table template preview.
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
initTemplateGenerationForm()
Init table template generation form.
+ Here is the call graph for this function:

◆ updateColorObject()

ilObjStyleSheetGUI::updateColorObject ( )

Update color.

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

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

1869  {
1870  global $tpl, $ilCtrl, $lng;
1871 
1872  $this->initColorForm("edit");
1873 
1874  if ($this->form_gui->checkInput())
1875  {
1876  if ($this->object->colorExists($_POST["color_name"]) &&
1877  $_POST["color_name"] != $_GET["c_name"])
1878  {
1879  $col_input = $this->form_gui->getItemByPostVar("color_name");
1880  $col_input->setAlert($lng->txt("sty_color_already_exists"));
1881  }
1882  else
1883  {
1884  $this->object->updateColor($_GET["c_name"], $_POST["color_name"],
1885  $_POST["color_code"]);
1886  $ilCtrl->redirect($this, "listColors");
1887  }
1888  }
1889  $ilCtrl->setParameter($this, "c_name", $_GET["c_name"]);
1890  $this->form_gui->setValuesByPost();
1891  $tpl->setContent($this->form_gui->getHTML());
1892  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
initColorForm($a_mode="create")
Init color form.
+ Here is the call graph for this function:

◆ updateMediaQueryObject()

ilObjStyleSheetGUI::updateMediaQueryObject ( )

Update media query.

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

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

2071  {
2072  global $tpl, $ilCtrl, $lng;
2073 
2074  $this->initMediaQueryForm("edit");
2075 
2076  if ($this->form_gui->checkInput())
2077  {
2078  $this->object->updateMediaQuery((int) $_GET["mq_id"], $_POST["mquery"]);
2079  $ilCtrl->redirect($this, "listMediaQueries");
2080  }
2081  $ilCtrl->setParameter($this, "mq_id", $_GET["mq_id"]);
2082  $this->form_gui->setValuesByPost();
2083  $tpl->setContent($this->form_gui->getHTML());
2084  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
initMediaQueryForm($a_mode="create")
Init media query form.
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ updateObject()

ilObjStyleSheetGUI::updateObject ( )

Update properties.

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

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

334  {
335  global $lng, $ilCtrl, $tpl;
336 
337  $this->initPropertiesForm("edit");
338  if ($this->form->checkInput())
339  {
340  $this->object->setTitle($this->form->getInput("style_title"));
341  $this->object->setDescription($this->form->getInput("style_description"));
342  $this->object->writeStyleSetting("disable_auto_margins",
343  $this->form->getInput("disable_auto_margins"));
344  $this->object->update();
345  ilUtil::sendInfo($lng->txt("msg_obj_modified"), true);
346  $ilCtrl->redirect($this, "properties");
347  }
348  else
349  {
350  $this->form->setValuesByPost();
351  $tpl->setContent($this->form->getHtml());
352  }
353  }
global $ilCtrl
Definition: ilias.php:18
initPropertiesForm($a_mode="edit")
FORM: Init properties form.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
+ Here is the call graph for this function:

◆ updateTagStyleObject()

ilObjStyleSheetGUI::updateTagStyleObject ( )

save and refresh tag editing

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

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

384  {
385  global $ilCtrl;
386 
387  $cur = explode(".",$_GET["tag"]);
388  $cur_tag = $cur[0];
389  $cur_class = $cur[1];
390 
391  $this->initTagStyleForm("edit", $cur_tag);
392  if ($this->form_gui->checkInput())
393  {
394  $this->saveTagStyle();
395  $ilCtrl->redirect($this, "edit");
396  }
397  else
398  {
399  $this->form_gui->setValuesByPost();
400  $this->outputTagStyleEditScreen();
401  }
402  }
saveTagStyle()
Save tag style.
$_GET["client_id"]
outputTagStyleEditScreen()
Output tag style edit screen.
global $ilCtrl
Definition: ilias.php:18
initTagStyleForm($a_mode, $a_cur_tag)
Init tag style editing form.
+ Here is the call graph for this function:

◆ updateTemplateObject()

ilObjStyleSheetGUI::updateTemplateObject (   $a_refresh = false)

Update table template.

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

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

Referenced by refreshTemplateObject().

2439  {
2440  global $tpl, $ilCtrl, $lng;
2441 
2442  $ilCtrl->setParameter($this, "t_id", $_GET["t_id"]);
2443  $this->initTemplateForm("edit");
2444 
2445  if ($this->form_gui->checkInput())
2446  {
2447  if ($this->object->templateExists($_POST["name"]) &&
2448  $_POST["name"] != ilObjStyleSheet::lookupTemplateName($_GET["t_id"]))
2449  {
2450  $name_input = $this->form_gui->getItemByPostVar("name");
2451  $name_input->setAlert($lng->txt("sty_template_already_exists"));
2452  }
2453  else
2454  {
2455  $classes = array();
2456  foreach (ilObjStyleSheet::_getTemplateClassTypes($_GET["temp_type"]) as $tct => $ct)
2457  {
2458  $classes[$tct] = $_POST[$tct."_class"];
2459  }
2460 
2461  $this->object->updateTemplate($_GET["t_id"],
2462  $_POST["name"], $classes);
2463  $this->object->writeTemplatePreview($_GET["t_id"],
2464  $this->getTemplatePreview($_GET["temp_type"], $_GET["t_id"], true));
2465  if(!$a_refresh)
2466  {
2467  $ilCtrl->redirect($this, "listTemplates");
2468  }
2469  }
2470  }
2471 
2472  $this->form_gui->setValuesByPost();
2473  $this->displayTemplateEditForm();
2474  }
getTemplatePreview($a_type, $a_t_id, $a_small_mode=false)
Get table template preview.
static _getTemplateClassTypes($a_template_type="")
Get template class types.
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
lookupTemplateName($a_t_id)
Lookup table template name for template ID.
global $ilCtrl
Definition: ilias.php:18
initTemplateForm($a_mode="create")
Init table template form.
displayTemplateEditForm()
Display table tempalte edit form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ uploadImageObject()

ilObjStyleSheetGUI::uploadImageObject ( )

Upload image.

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

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

1325  {
1326  global $tpl, $ilCtrl;
1327 
1328  $this->initImageForm();
1329 
1330  if ($this->form_gui->checkInput())
1331  {
1332  $this->object->uploadImage($_FILES["image_file"]);
1333  $ilCtrl->redirect($this, "listImages");
1334  }
1335  else
1336  {
1337  //$this->form_gui->setImageFormValuesByPost();
1338  $tpl->setContent($this->form_gui->getHTML());
1339  }
1340 
1341  }
global $ilCtrl
Definition: ilias.php:18
initImageForm()
Init image form.
+ Here is the call graph for this function:

◆ viewObject()

ilObjStyleSheetGUI::viewObject ( )

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

References editObject().

74  {
75  $this->editObject();
76  }
editObject()
edit style sheet
+ Here is the call graph for this function:

◆ writeStylePar()

ilObjStyleSheetGUI::writeStylePar (   $cur_tag,
  $cur_class,
  $par,
  $value,
  $a_type,
  $a_mq_id,
  $a_custom = false 
)

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

Referenced by saveTagStyle().

500  {
501 // echo $_GET["mq_id"]."-";
502 // echo $a_mq_id."-"; exit;
503  if ($a_type == "")
504  {
505  return;
506  }
507 
508  if ($value != "")
509  {
510  $this->object->replaceStylePar($cur_tag, $cur_class, $par, $value, $a_type, $a_mq_id, $a_custom);
511  }
512  else
513  {
514  $this->object->deleteStylePar($cur_tag, $cur_class, $par, $a_type, $a_mq_id, $a_custom);
515  }
516  }
+ Here is the caller graph for this function:

Field Documentation

◆ $cmd_delete

ilObjStyleSheetGUI::$cmd_delete

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

◆ $cmd_new_par

ilObjStyleSheetGUI::$cmd_new_par

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

◆ $cmd_refresh

ilObjStyleSheetGUI::$cmd_refresh

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

◆ $cmd_update

ilObjStyleSheetGUI::$cmd_update

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


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