Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Tue, Jun 24, 11:30 PM

in-portal

Index: branches/unlabeled/unlabeled-1.7.2/kernel/units/general/custom_fields.php
===================================================================
--- branches/unlabeled/unlabeled-1.7.2/kernel/units/general/custom_fields.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.7.2/kernel/units/general/custom_fields.php (revision 5290)
@@ -0,0 +1,88 @@
+<?php
+
+/**
+ * Enter description here...
+ *
+ * @todo rewrite
+ */
+class InpCustomFieldsHelper extends kHelper {
+
+ function GetValuesHash($values_list)
+ {
+ $optionValuesStr = trim($this->ParseConfigSQL($values_list), ',');
+ $optionValuesTmp = explode(',', $optionValuesStr);
+ $optionValues = Array();
+ foreach ($optionValuesTmp as $optionValue) {
+ list($key, $val) = explode('=', $optionValue);
+ $val = (substr($val,0,1) == '+') ? substr($val, 1) : $this->Application->Phrase($val);
+ $optionValues[$key] = $val;
+ }
+ return $optionValues;
+ }
+
+ /**
+ * Replace SQL's in valueList with appropriate queried values
+ *
+ * @param string $valueString
+ * @return string
+ * @todo Apply refactoring to embedded vars stuff
+ */
+ function ParseConfigSQL($valueString)
+ {
+ $string = trim( str_replace('<PREFIX>', TABLE_PREFIX, $valueString) );
+
+ preg_match_all("|\{(.*)\}|U", $string, $embedded_vars, PREG_SET_ORDER);
+
+ /*
+ <SQL> in ValueList now can use globally available variables.
+ Usage: {$_POST['variable']|what to output if $_POST['variable'] is set}
+ e.g. $_POST['variable']='Hello'
+ Will output: what to output if Hello is set
+ */
+
+ if ($embedded_vars) {
+ for ($i = 0; $i < count($embedded_vars); $i++) {
+ $embedded_var = $embedded_vars[$i][1];
+ $embedded_var_src = $embedded_vars[$i][0];
+
+ list($var_name, $pattern) = explode('|', $embedded_var);
+ eval('$var_value = (isset('.$var_name.')?'.$var_name.':false);');
+
+ if ($var_value !== false) {
+ $pattern = str_replace($var_name, $var_value, $pattern);
+ $string = str_replace($embedded_var_src, $pattern, $string);
+ }
+ else {
+ $string = str_replace($embedded_var_src, '', $string);
+ }
+ }
+ }
+
+ if (preg_match_all('/<SQL([+]{0,1})>(.*?)<\/SQL>/', $string, $regs)) {
+ $i = 0;
+ $sql_count = count($regs[0]);
+ while ($i < $sql_count) {
+ $string = str_replace('<SQL'.$regs[1][$i].'>'.$regs[2][$i].'</SQL>', $this->QueryConfigSQL($regs[2][$i], $regs[1][$i]), $string);
+ $i++;
+ }
+ $string = preg_replace('/(,){2,}/', ',', $string); // trim trailing commas inside string
+ }
+
+ return $string;
+ }
+
+ function QueryConfigSQL($sql, $plus = '')
+ {
+ $valArray = $this->Conn->Query($sql);
+ for($i=0; $i<sizeof($valArray); $i++)
+ {
+ $valArray[$i] = $valArray[$i]['OptionValue'].'='.$plus.$valArray[$i]['OptionName'];
+ $valArray[$i] = str_replace(',', ';', $valArray[$i]);
+ }
+ return implode(',', $valArray);
+ }
+
+
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.7.2/kernel/units/general/custom_fields.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/groups/permissions_selector.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/groups/permissions_selector.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/groups/permissions_selector.tpl (revision 5290)
@@ -0,0 +1,80 @@
+<inp2:m_RequireLogin permissions="in-portal:user_groups.view" system="1"/>
+<inp2:m_include t="incs/header" nobody="yes"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+
+<inp2:m_ParseBlock name="section_header" prefix="g" icon="icon46_usergroups" module="in-portal" title="!la_title_Groups!"/>
+
+<inp2:m_ParseBlock name="blue_bar" prefix="g" title_preset="groups_edit_additional_permissions" module="in-portal" icon="icon46_usergroups"/>
+
+<!-- ToolBar --->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+ <tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+ set_hidden_field('advanced_save', 1);
+ submit_event('g-perm','OnSavePermissions');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ window.close();
+ }
+ ) );
+
+ a_toolbar.Render();
+ </script>
+
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<inp2:g_SaveWarning name="grid_save_warning"/>
+
+<inp2:m_DefineElement name="permission_element" prefix="g-perm">
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <td>
+ <inp2:m_param name="section_name"/>.<inp2:m_param name="perm_name"/>
+ </td>
+ <td>
+ <input type="hidden" id="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" value="<inp2:$prefix_PermissionValue section_name="$section_name" perm_name="$perm_name"/>">
+ <input type="checkbox" align="absmiddle" id="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" <inp2:m_if check="{$prefix}_PermissionValue" section_name="$section_name" perm_name="$perm_name" value="1">checked</inp2:m_if> onchange="update_checkbox(this, document.getElementById('<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]'));">
+ </td>
+ </tr>
+</inp2:m_DefineElement>
+
+
+<inp2:m_DefineElement name="old_permission_element" prefix="g-perm">
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <td>
+ <inp2:m_phrase name="$label"/>
+ </td>
+ <td>
+ <input type="hidden" id="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" value="<inp2:$prefix_PermissionValue section_name="$section_name" perm_name="$perm_name"/>">
+ <input type="checkbox" align="absmiddle" id="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" <inp2:m_if check="{$prefix}_PermissionValue" section_name="$section_name" perm_name="$perm_name" value="1">checked</inp2:m_if> onchange="update_checkbox(this, document.getElementById('<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]'));">
+ </td>
+ </tr>
+</inp2:m_DefineElement>
+
+<inp2:g-perm_LoadPermissions/>
+
+<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
+ <inp2:m_set {$PrefixSpecial}_sequence="1" odd_even="table_color1"/>
+
+ <tr class="subsectiontitle">
+ <td><inp2:m_phrase label="la_col_PermissionName"/></td>
+ <td><inp2:m_phrase label="la_col_PermissionValue"/></td>
+ </tr>
+ <inp2:m_if check="m_GetEquals" name="section_name" value="in-portal:root">
+ <inp2:m_RenderElement name="old_permission_element" section_name="in-portal:root" perm_name="LOGIN" label="lu_PermName_Login_desc"/>
+ <inp2:m_RenderElement name="old_permission_element" section_name="in-portal:root" perm_name="ADMIN" label="lu_PermName_Admin_desc"/>
+ <inp2:m_RenderElement name="old_permission_element" section_name="in-portal:root" perm_name="SYSTEM_ACCESS.READONLY" label="la_PermName_SystemAccess.ReadOnly_desc"/>
+ <inp2:m_else/>
+ <inp2:adm_ListSectionPermissions render_as="permission_element" type="1"/>
+ </inp2:m_if>
+</table>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/groups/permissions_selector.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/stylesheets/stylesheets_list.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/stylesheets/stylesheets_list.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/stylesheets/stylesheets_list.tpl (revision 5290)
@@ -0,0 +1,75 @@
+<inp2:m_RequireLogin permissions="in-portal:configure_styles.view" system="1"/>
+<inp2:m_include t="incs/header" nobody="yes"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+<inp2:m_ParseBlock name="section_header" icon="icon46_style" title="!la_title_Stylesheets!"/>
+
+<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="styles_list" module="in-portal" icon="icon46_style"/>
+
+<!-- ToolBar --->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ //do not rename - this function is used in default grid for double click!
+ function edit()
+ {
+ std_edit_item('css', 'stylesheets/stylesheets_edit');
+ }
+
+ var a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('new_style', '<inp2:m_phrase label="la_ToolTip_NewStylesheet" escape="1"/>',
+ function() {
+ std_precreate_item('css', 'stylesheets/stylesheets_edit')
+ } ) );
+
+ a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+ a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+ function() {
+ std_delete_items('css')
+ } ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+ a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+ submit_event('css','OnMassApprove');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
+ submit_event('css','OnMassDecline');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+ a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>', function() {
+ submit_event('css','OnMassClone');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+ a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+ show_viewmenu(a_toolbar,'view');
+ }
+ ) );
+
+ a_toolbar.Render();
+ </script>
+ </td>
+ </tr>
+</tbody>
+</table>
+
+<inp2:m_block name="grid_description_td" />
+ <td valign="top" class="text"><inp2:$PrefixSpecial_field field="$field" grid="$grid" no_special="$no_special" cut_first="100"/></td>
+<inp2:m_blockend />
+
+<inp2:m_ParseBlock name="grid" PrefixSpecial="css" IdField="StylesheetId" grid="Default" menu_filters="yes"/>
+<script type="text/javascript">
+ Grids['css'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','clone') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/stylesheets/stylesheets_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/stylesheets/stylesheets_edit_block.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/stylesheets/stylesheets_edit_block.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/stylesheets/stylesheets_edit_block.tpl (revision 5290)
@@ -0,0 +1,111 @@
+<inp2:m_RequireLogin permissions="in-portal:configure_styles.view" system="1"/>
+<inp2:m_include t="incs/header" nobody="yes"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+<inp2:m_ParseBlock name="section_header" icon="icon46_style" title="!la_title_Stylesheets!"/>
+
+<inp2:m_include t="stylesheets/stylesheets_tabs"/>
+
+<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="block_styles" module="in-portal" icon="icon46_style"/>
+
+<!-- ToolBar --->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+ submit_event('css','<inp2:css_SaveEvent/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ submit_event('css','OnCancelEdit');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+ a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+ go_to_id('css', '<inp2:css_PrevId/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+ go_to_id('css', '<inp2:css_NextId/>');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+ //Relations related:
+ a_toolbar.AddButton( new ToolBarButton('new_selector', '<inp2:m_phrase label="la_ToolTip_NewBlockStyle" escape="1"/>',
+ function() {
+ set_hidden_field('remove_specials[selectors.block]',1);
+ std_new_item('selectors.block', 'stylesheets/block_style_edit')
+ } ) );
+
+ function edit()
+ {
+ set_hidden_field('remove_specials[selectors.block]',1);
+ std_edit_temp_item('selectors.block', 'stylesheets/block_style_edit');
+ }
+
+ a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+ a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+ function() {
+ std_delete_items('selectors.block')
+ } ) );
+
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+ a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>', function() {
+ set_hidden_field('remove_specials[selectors.block]',1);
+ submit_event('selectors.block','OnMassClone');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarButton('reset_to_base', '<inp2:m_phrase label="la_ToolTip_ResetToBase" escape="1"/>', function() {
+ set_hidden_field('remove_specials[selectors.block]',1);
+ submit_event('selectors.block','OnMassResetToBase');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep4') );
+
+ a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+ show_viewmenu(a_toolbar,'view');
+ }
+ ) );
+
+ a_toolbar.Render();
+
+ <inp2:m_if prefix="css" function="IsSingle"/>
+ a_toolbar.HideButton('prev');
+ a_toolbar.HideButton('next');
+ a_toolbar.HideButton('sep1');
+ //a_toolbar.HideButton('sep2');
+ <inp2:m_else/>
+ <inp2:m_if prefix="css" function="IsLast"/>
+ a_toolbar.DisableButton('next');
+ <inp2:m_endif/>
+ <inp2:m_if prefix="css" function="IsFirst"/>
+ a_toolbar.DisableButton('prev');
+ <inp2:m_endif/>
+ <inp2:m_endif/>
+ </script>
+ </td>
+ </tr>
+</tbody>
+</table>
+
+<inp2:m_block name="grid_description_td" />
+ <td valign="top" class="text"><inp2:$PrefixSpecial_field field="$field" grid="$grid" no_special="$no_special" cut_first="100"/></td>
+<inp2:m_blockend />
+
+<inp2:m_ParseBlock name="grid" PrefixSpecial="selectors.block" IdField="SelectorId" grid="BlockStyles" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
+<script type="text/javascript">
+ Grids['selectors.block'].SetDependantToolbarButtons( new Array('edit','delete','clone','reset_to_base') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/stylesheets/stylesheets_edit_block.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/stylesheets/base_style_edit.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/stylesheets/base_style_edit.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/stylesheets/base_style_edit.tpl (revision 5290)
@@ -0,0 +1,103 @@
+<inp2:m_RequireLogin permissions="in-portal:configure_styles.view" system="1"/>
+<inp2:m_include t="incs/header" nobody="yes"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+<inp2:m_ParseBlock name="section_header" icon="icon46_style" title="!la_title_Stylesheets!"/>
+
+
+<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="base_style_edit" module="in-portal" icon="icon46_style"/>
+
+<!-- ToolBar --->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+ submit_event('selectors','<inp2:selectors_SaveEvent/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ submit_event('selectors','OnCancel');
+ }
+ ) );
+
+ a_toolbar.Render();
+
+ function ValidateRequired()
+ {
+ var $fields = new Array('<inp2:selectors_InputName field="Name"/>',
+ '<inp2:selectors_InputName field="SelectorName"/>');
+ var $ret = true;
+ var $i = 0;
+ var $value = '';
+ while($i < $fields.length)
+ {
+ $value = document.getElementById( $fields[$i] ).value;
+ $value = $value.replace(' ','');
+ if($value.length == 0)
+ {
+ $ret = false;
+ break;
+ }
+ $i++;
+ }
+ return $ret;
+ }
+
+ function editStyle()
+ {
+ if( ValidateRequired() )
+ {
+ openSelector('selectors', '<inp2:m_t t="stylesheets/style_editor" pass="all"/>', '', '850x460', 'OnOpenStyleEditor');
+ }
+ else
+ {
+ alert( RemoveTranslationLink('<inp2:m_phrase name="la_RequiredWarning"/>') );
+ }
+ }
+ </script>
+ </td>
+ </tr>
+</tbody>
+</table>
+
+<inp2:selectors_SaveWarning name="grid_save_warning"/>
+<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
+ <inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
+ <inp2:m_ParseBlock name="inp_edit_hidden" prefix="selectors" field="StylesheetId"/>
+ <input type="hidden" name="<inp2:selectors_InputName field="Type"/>" value="1">
+
+ <inp2:m_ParseBlock name="inp_id_label" prefix="selectors" field="SelectorId" title="!la_fld_SelectorId!"/>
+ <inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorName" title="!la_fld_SelectorName!" size="40"/>
+ <inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="Name" title="!la_fld_Name!" size="40"/>
+ <inp2:m_ParseBlock name="inp_edit_textarea" prefix="selectors" field="Description" title="!la_fld_Description!" rows="10" cols="40"/>
+ <inp2:m_ParseBlock name="inp_edit_textarea" prefix="selectors" field="AdvancedCSS" title="!la_fld_AdvancedCSS!" rows="10" cols="40"/>
+
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <inp2:m_inc param="tab_index" by="1"/>
+ <td class="text" valign="top">
+ <inp2:m_phrase name="la_fld_SelectorData"/>:<br>
+ <a href="javascript:editStyle();"><img src="img/icons/icon24_link_editor.gif" style="cursor:hand" border="0"></a>
+ </td>
+ <td>
+ <table width="100%">
+ <tr>
+ <td><inp2:m_phrase name="la_StyleDefinition"/>:</td>
+ <td>
+ <inp2:selectors_PrintStyle field="SelectorData"/>
+ </td>
+ <td><inp2:m_phrase name="la_StylePreview"/>:</td>
+ <td style="<inp2:selectors_PrintStyle field="SelectorData" inline="inline"/>">
+ <inp2:m_phrase name="la_SampleText"/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td class="error">&nbsp;</td>
+ </tr>
+
+</table>
+<input type="hidden" name="main_prefix" id="main_prefix" value="selectors">
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/stylesheets/base_style_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/stylesheets/block_style_edit.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/stylesheets/block_style_edit.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/stylesheets/block_style_edit.tpl (revision 5290)
@@ -0,0 +1,113 @@
+<inp2:m_RequireLogin permissions="in-portal:configure_styles.view" system="1"/>
+<inp2:m_include t="incs/header" nobody="yes"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+<inp2:m_ParseBlock name="section_header" icon="icon46_style" title="!la_title_Stylesheets!"/>
+
+
+<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="block_style_edit" module="in-portal" icon="icon46_style"/>
+
+<!-- ToolBar --->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+ submit_event('selectors','<inp2:selectors_SaveEvent/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ submit_event('selectors','OnCancel');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+ a_toolbar.AddButton( new ToolBarButton('reset_to_base', '<inp2:m_phrase label="la_ToolTip_ResetToBase" escape="1"/>', function() {
+ submit_event('selectors','OnResetToBase');
+ }
+ ) );
+
+ a_toolbar.Render();
+
+ function ValidateRequired()
+ {
+ var $fields = new Array('<inp2:selectors_InputName field="Name"/>',
+ '<inp2:selectors_InputName field="SelectorName"/>');
+ var $ret = true;
+ var $i = 0;
+ var $value = '';
+ while($i < $fields.length)
+ {
+ $value = document.getElementById( $fields[$i] ).value;
+ $value = $value.replace(' ','');
+ if($value.length == 0)
+ {
+ $ret = false;
+ break;
+ }
+ $i++;
+ }
+ return $ret;
+ }
+
+ function editStyle()
+ {
+ if( ValidateRequired() )
+ {
+ openSelector('selectors', '<inp2:m_t t="stylesheets/style_editor" pass="all"/>', '', '850x460', 'OnOpenStyleEditor');
+ }
+ else
+ {
+ alert( RemoveTranslationLink('<inp2:m_phrase name="la_RequiredWarning"/>') );
+ }
+ }
+ </script>
+ </td>
+ </tr>
+</tbody>
+</table>
+
+<inp2:selectors_SaveWarning name="grid_save_warning"/>
+<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
+ <inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
+ <inp2:m_ParseBlock name="inp_edit_hidden" prefix="selectors" field="StylesheetId"/>
+ <input type="hidden" name="<inp2:selectors_InputName field="Type"/>" value="2">
+
+ <inp2:m_ParseBlock name="inp_id_label" prefix="selectors" field="SelectorId" title="!la_fld_SelectorId!"/>
+ <inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorName" title="!la_fld_SelectorName!" size="40"/>
+
+ <inp2:m_ParseBlock name="inp_edit_options" prefix="selectors" field="ParentId" title="!la_fld_SelectorBase!"/>
+
+ <inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="Name" title="!la_fld_Name!" size="40"/>
+ <inp2:m_ParseBlock name="inp_edit_textarea" prefix="selectors" field="Description" title="!la_fld_Description!" rows="10" cols="40"/>
+ <inp2:m_ParseBlock name="inp_edit_textarea" prefix="selectors" field="AdvancedCSS" title="!la_fld_AdvancedCSS!" rows="10" cols="40"/>
+
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <inp2:m_inc param="tab_index" by="1"/>
+ <td class="text" valign="top">
+ <inp2:m_phrase name="la_fld_SelectorData"/>:<br>
+ <a href="javascript:editStyle();"><img src="img/icons/icon24_link_editor.gif" style="cursor:hand" border="0"></a>
+ </td>
+ <td>
+ <table width="100%">
+ <tr>
+ <td><inp2:m_phrase name="la_StyleDefinition"/>:</td>
+ <td>
+ <inp2:selectors_PrintStyle field="SelectorData"/>
+ </td>
+ <td><inp2:m_phrase name="la_StylePreview"/>:</td>
+ <td style="<inp2:selectors_PrintStyle field="SelectorData" inline="inline"/>">
+ <inp2:m_phrase name="la_SampleText"/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td class="error">&nbsp;</td>
+ </tr>
+
+</table>
+<input type="hidden" name="main_prefix" id="main_prefix" value="selectors">
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/stylesheets/block_style_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.7.2/kernel/constants.php
===================================================================
--- branches/unlabeled/unlabeled-1.7.2/kernel/constants.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.7.2/kernel/constants.php (revision 5290)
@@ -0,0 +1,29 @@
+<?php
+
+ // kDBList filtering
+ define('HAVING_FILTER', 1);
+ define('WHERE_FILTER', 2);
+ define('AGGREGATE_FILTER', 3);
+
+ define('FLT_TYPE_AND', 'AND');
+ define('FLT_TYPE_OR', 'OR');
+
+ // item statuses
+ safeDefine('STATUS_DISABLED', 0);
+ safeDefine('STATUS_ACTIVE', 1);
+ safeDefine('STATUS_PENDING', 2);
+
+ // sections
+ define('stTREE', 1);
+ define('stTAB', 2);
+
+ // event statuses
+ define('erSUCCESS', 0); // event finished working succsessfully
+ define('erFAIL', -1); // event finished working, but result is unsuccsessfull
+ define('erFATAL', -2); // event experienced FATAL error - no hooks should continue!
+ define('erPERM_FAIL', -3); // event failed on internal permission checking (user has not permission)
+
+ $application =& kApplication::Instance();
+ $spacer_url = $application->BaseURL().'kernel/admin_templates/img/spacer.gif';
+ define('SPACER_URL', $spacer_url);
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.7.2/kernel/constants.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.7.2/core/units/general/custom_fields.php
===================================================================
--- branches/unlabeled/unlabeled-1.7.2/core/units/general/custom_fields.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.7.2/core/units/general/custom_fields.php (revision 5290)
@@ -0,0 +1,88 @@
+<?php
+
+/**
+ * Enter description here...
+ *
+ * @todo rewrite
+ */
+class InpCustomFieldsHelper extends kHelper {
+
+ function GetValuesHash($values_list)
+ {
+ $optionValuesStr = trim($this->ParseConfigSQL($values_list), ',');
+ $optionValuesTmp = explode(',', $optionValuesStr);
+ $optionValues = Array();
+ foreach ($optionValuesTmp as $optionValue) {
+ list($key, $val) = explode('=', $optionValue);
+ $val = (substr($val,0,1) == '+') ? substr($val, 1) : $this->Application->Phrase($val);
+ $optionValues[$key] = $val;
+ }
+ return $optionValues;
+ }
+
+ /**
+ * Replace SQL's in valueList with appropriate queried values
+ *
+ * @param string $valueString
+ * @return string
+ * @todo Apply refactoring to embedded vars stuff
+ */
+ function ParseConfigSQL($valueString)
+ {
+ $string = trim( str_replace('<PREFIX>', TABLE_PREFIX, $valueString) );
+
+ preg_match_all("|\{(.*)\}|U", $string, $embedded_vars, PREG_SET_ORDER);
+
+ /*
+ <SQL> in ValueList now can use globally available variables.
+ Usage: {$_POST['variable']|what to output if $_POST['variable'] is set}
+ e.g. $_POST['variable']='Hello'
+ Will output: what to output if Hello is set
+ */
+
+ if ($embedded_vars) {
+ for ($i = 0; $i < count($embedded_vars); $i++) {
+ $embedded_var = $embedded_vars[$i][1];
+ $embedded_var_src = $embedded_vars[$i][0];
+
+ list($var_name, $pattern) = explode('|', $embedded_var);
+ eval('$var_value = (isset('.$var_name.')?'.$var_name.':false);');
+
+ if ($var_value !== false) {
+ $pattern = str_replace($var_name, $var_value, $pattern);
+ $string = str_replace($embedded_var_src, $pattern, $string);
+ }
+ else {
+ $string = str_replace($embedded_var_src, '', $string);
+ }
+ }
+ }
+
+ if (preg_match_all('/<SQL([+]{0,1})>(.*?)<\/SQL>/', $string, $regs)) {
+ $i = 0;
+ $sql_count = count($regs[0]);
+ while ($i < $sql_count) {
+ $string = str_replace('<SQL'.$regs[1][$i].'>'.$regs[2][$i].'</SQL>', $this->QueryConfigSQL($regs[2][$i], $regs[1][$i]), $string);
+ $i++;
+ }
+ $string = preg_replace('/(,){2,}/', ',', $string); // trim trailing commas inside string
+ }
+
+ return $string;
+ }
+
+ function QueryConfigSQL($sql, $plus = '')
+ {
+ $valArray = $this->Conn->Query($sql);
+ for($i=0; $i<sizeof($valArray); $i++)
+ {
+ $valArray[$i] = $valArray[$i]['OptionValue'].'='.$plus.$valArray[$i]['OptionName'];
+ $valArray[$i] = str_replace(',', ';', $valArray[$i]);
+ }
+ return implode(',', $valArray);
+ }
+
+
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.7.2/core/units/general/custom_fields.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.7.2/core/admin_templates/groups/permissions_selector.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.7.2/core/admin_templates/groups/permissions_selector.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.7.2/core/admin_templates/groups/permissions_selector.tpl (revision 5290)
@@ -0,0 +1,80 @@
+<inp2:m_RequireLogin permissions="in-portal:user_groups.view" system="1"/>
+<inp2:m_include t="incs/header" nobody="yes"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+
+<inp2:m_ParseBlock name="section_header" prefix="g" icon="icon46_usergroups" module="in-portal" title="!la_title_Groups!"/>
+
+<inp2:m_ParseBlock name="blue_bar" prefix="g" title_preset="groups_edit_additional_permissions" module="in-portal" icon="icon46_usergroups"/>
+
+<!-- ToolBar --->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+ <tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+ set_hidden_field('advanced_save', 1);
+ submit_event('g-perm','OnSavePermissions');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ window.close();
+ }
+ ) );
+
+ a_toolbar.Render();
+ </script>
+
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<inp2:g_SaveWarning name="grid_save_warning"/>
+
+<inp2:m_DefineElement name="permission_element" prefix="g-perm">
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <td>
+ <inp2:m_param name="section_name"/>.<inp2:m_param name="perm_name"/>
+ </td>
+ <td>
+ <input type="hidden" id="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" value="<inp2:$prefix_PermissionValue section_name="$section_name" perm_name="$perm_name"/>">
+ <input type="checkbox" align="absmiddle" id="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" <inp2:m_if check="{$prefix}_PermissionValue" section_name="$section_name" perm_name="$perm_name" value="1">checked</inp2:m_if> onchange="update_checkbox(this, document.getElementById('<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]'));">
+ </td>
+ </tr>
+</inp2:m_DefineElement>
+
+
+<inp2:m_DefineElement name="old_permission_element" prefix="g-perm">
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <td>
+ <inp2:m_phrase name="$label"/>
+ </td>
+ <td>
+ <input type="hidden" id="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" value="<inp2:$prefix_PermissionValue section_name="$section_name" perm_name="$perm_name"/>">
+ <input type="checkbox" align="absmiddle" id="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" <inp2:m_if check="{$prefix}_PermissionValue" section_name="$section_name" perm_name="$perm_name" value="1">checked</inp2:m_if> onchange="update_checkbox(this, document.getElementById('<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]'));">
+ </td>
+ </tr>
+</inp2:m_DefineElement>
+
+<inp2:g-perm_LoadPermissions/>
+
+<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
+ <inp2:m_set {$PrefixSpecial}_sequence="1" odd_even="table_color1"/>
+
+ <tr class="subsectiontitle">
+ <td><inp2:m_phrase label="la_col_PermissionName"/></td>
+ <td><inp2:m_phrase label="la_col_PermissionValue"/></td>
+ </tr>
+ <inp2:m_if check="m_GetEquals" name="section_name" value="in-portal:root">
+ <inp2:m_RenderElement name="old_permission_element" section_name="in-portal:root" perm_name="LOGIN" label="lu_PermName_Login_desc"/>
+ <inp2:m_RenderElement name="old_permission_element" section_name="in-portal:root" perm_name="ADMIN" label="lu_PermName_Admin_desc"/>
+ <inp2:m_RenderElement name="old_permission_element" section_name="in-portal:root" perm_name="SYSTEM_ACCESS.READONLY" label="la_PermName_SystemAccess.ReadOnly_desc"/>
+ <inp2:m_else/>
+ <inp2:adm_ListSectionPermissions render_as="permission_element" type="1"/>
+ </inp2:m_if>
+</table>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.7.2/core/admin_templates/groups/permissions_selector.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.7.2/core/admin_templates/stylesheets/stylesheets_list.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.7.2/core/admin_templates/stylesheets/stylesheets_list.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.7.2/core/admin_templates/stylesheets/stylesheets_list.tpl (revision 5290)
@@ -0,0 +1,75 @@
+<inp2:m_RequireLogin permissions="in-portal:configure_styles.view" system="1"/>
+<inp2:m_include t="incs/header" nobody="yes"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+<inp2:m_ParseBlock name="section_header" icon="icon46_style" title="!la_title_Stylesheets!"/>
+
+<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="styles_list" module="in-portal" icon="icon46_style"/>
+
+<!-- ToolBar --->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ //do not rename - this function is used in default grid for double click!
+ function edit()
+ {
+ std_edit_item('css', 'stylesheets/stylesheets_edit');
+ }
+
+ var a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('new_style', '<inp2:m_phrase label="la_ToolTip_NewStylesheet" escape="1"/>',
+ function() {
+ std_precreate_item('css', 'stylesheets/stylesheets_edit')
+ } ) );
+
+ a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+ a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+ function() {
+ std_delete_items('css')
+ } ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+ a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+ submit_event('css','OnMassApprove');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
+ submit_event('css','OnMassDecline');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+ a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>', function() {
+ submit_event('css','OnMassClone');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+ a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+ show_viewmenu(a_toolbar,'view');
+ }
+ ) );
+
+ a_toolbar.Render();
+ </script>
+ </td>
+ </tr>
+</tbody>
+</table>
+
+<inp2:m_block name="grid_description_td" />
+ <td valign="top" class="text"><inp2:$PrefixSpecial_field field="$field" grid="$grid" no_special="$no_special" cut_first="100"/></td>
+<inp2:m_blockend />
+
+<inp2:m_ParseBlock name="grid" PrefixSpecial="css" IdField="StylesheetId" grid="Default" menu_filters="yes"/>
+<script type="text/javascript">
+ Grids['css'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','clone') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.7.2/core/admin_templates/stylesheets/stylesheets_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.7.2/core/admin_templates/stylesheets/stylesheets_edit_block.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.7.2/core/admin_templates/stylesheets/stylesheets_edit_block.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.7.2/core/admin_templates/stylesheets/stylesheets_edit_block.tpl (revision 5290)
@@ -0,0 +1,111 @@
+<inp2:m_RequireLogin permissions="in-portal:configure_styles.view" system="1"/>
+<inp2:m_include t="incs/header" nobody="yes"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+<inp2:m_ParseBlock name="section_header" icon="icon46_style" title="!la_title_Stylesheets!"/>
+
+<inp2:m_include t="stylesheets/stylesheets_tabs"/>
+
+<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="block_styles" module="in-portal" icon="icon46_style"/>
+
+<!-- ToolBar --->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+ submit_event('css','<inp2:css_SaveEvent/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ submit_event('css','OnCancelEdit');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+ a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+ go_to_id('css', '<inp2:css_PrevId/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+ go_to_id('css', '<inp2:css_NextId/>');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+ //Relations related:
+ a_toolbar.AddButton( new ToolBarButton('new_selector', '<inp2:m_phrase label="la_ToolTip_NewBlockStyle" escape="1"/>',
+ function() {
+ set_hidden_field('remove_specials[selectors.block]',1);
+ std_new_item('selectors.block', 'stylesheets/block_style_edit')
+ } ) );
+
+ function edit()
+ {
+ set_hidden_field('remove_specials[selectors.block]',1);
+ std_edit_temp_item('selectors.block', 'stylesheets/block_style_edit');
+ }
+
+ a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+ a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+ function() {
+ std_delete_items('selectors.block')
+ } ) );
+
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+ a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>', function() {
+ set_hidden_field('remove_specials[selectors.block]',1);
+ submit_event('selectors.block','OnMassClone');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarButton('reset_to_base', '<inp2:m_phrase label="la_ToolTip_ResetToBase" escape="1"/>', function() {
+ set_hidden_field('remove_specials[selectors.block]',1);
+ submit_event('selectors.block','OnMassResetToBase');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep4') );
+
+ a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+ show_viewmenu(a_toolbar,'view');
+ }
+ ) );
+
+ a_toolbar.Render();
+
+ <inp2:m_if prefix="css" function="IsSingle"/>
+ a_toolbar.HideButton('prev');
+ a_toolbar.HideButton('next');
+ a_toolbar.HideButton('sep1');
+ //a_toolbar.HideButton('sep2');
+ <inp2:m_else/>
+ <inp2:m_if prefix="css" function="IsLast"/>
+ a_toolbar.DisableButton('next');
+ <inp2:m_endif/>
+ <inp2:m_if prefix="css" function="IsFirst"/>
+ a_toolbar.DisableButton('prev');
+ <inp2:m_endif/>
+ <inp2:m_endif/>
+ </script>
+ </td>
+ </tr>
+</tbody>
+</table>
+
+<inp2:m_block name="grid_description_td" />
+ <td valign="top" class="text"><inp2:$PrefixSpecial_field field="$field" grid="$grid" no_special="$no_special" cut_first="100"/></td>
+<inp2:m_blockend />
+
+<inp2:m_ParseBlock name="grid" PrefixSpecial="selectors.block" IdField="SelectorId" grid="BlockStyles" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
+<script type="text/javascript">
+ Grids['selectors.block'].SetDependantToolbarButtons( new Array('edit','delete','clone','reset_to_base') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.7.2/core/admin_templates/stylesheets/stylesheets_edit_block.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.7.2/core/admin_templates/stylesheets/base_style_edit.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.7.2/core/admin_templates/stylesheets/base_style_edit.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.7.2/core/admin_templates/stylesheets/base_style_edit.tpl (revision 5290)
@@ -0,0 +1,103 @@
+<inp2:m_RequireLogin permissions="in-portal:configure_styles.view" system="1"/>
+<inp2:m_include t="incs/header" nobody="yes"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+<inp2:m_ParseBlock name="section_header" icon="icon46_style" title="!la_title_Stylesheets!"/>
+
+
+<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="base_style_edit" module="in-portal" icon="icon46_style"/>
+
+<!-- ToolBar --->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+ submit_event('selectors','<inp2:selectors_SaveEvent/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ submit_event('selectors','OnCancel');
+ }
+ ) );
+
+ a_toolbar.Render();
+
+ function ValidateRequired()
+ {
+ var $fields = new Array('<inp2:selectors_InputName field="Name"/>',
+ '<inp2:selectors_InputName field="SelectorName"/>');
+ var $ret = true;
+ var $i = 0;
+ var $value = '';
+ while($i < $fields.length)
+ {
+ $value = document.getElementById( $fields[$i] ).value;
+ $value = $value.replace(' ','');
+ if($value.length == 0)
+ {
+ $ret = false;
+ break;
+ }
+ $i++;
+ }
+ return $ret;
+ }
+
+ function editStyle()
+ {
+ if( ValidateRequired() )
+ {
+ openSelector('selectors', '<inp2:m_t t="stylesheets/style_editor" pass="all"/>', '', '850x460', 'OnOpenStyleEditor');
+ }
+ else
+ {
+ alert( RemoveTranslationLink('<inp2:m_phrase name="la_RequiredWarning"/>') );
+ }
+ }
+ </script>
+ </td>
+ </tr>
+</tbody>
+</table>
+
+<inp2:selectors_SaveWarning name="grid_save_warning"/>
+<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
+ <inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
+ <inp2:m_ParseBlock name="inp_edit_hidden" prefix="selectors" field="StylesheetId"/>
+ <input type="hidden" name="<inp2:selectors_InputName field="Type"/>" value="1">
+
+ <inp2:m_ParseBlock name="inp_id_label" prefix="selectors" field="SelectorId" title="!la_fld_SelectorId!"/>
+ <inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorName" title="!la_fld_SelectorName!" size="40"/>
+ <inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="Name" title="!la_fld_Name!" size="40"/>
+ <inp2:m_ParseBlock name="inp_edit_textarea" prefix="selectors" field="Description" title="!la_fld_Description!" rows="10" cols="40"/>
+ <inp2:m_ParseBlock name="inp_edit_textarea" prefix="selectors" field="AdvancedCSS" title="!la_fld_AdvancedCSS!" rows="10" cols="40"/>
+
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <inp2:m_inc param="tab_index" by="1"/>
+ <td class="text" valign="top">
+ <inp2:m_phrase name="la_fld_SelectorData"/>:<br>
+ <a href="javascript:editStyle();"><img src="img/icons/icon24_link_editor.gif" style="cursor:hand" border="0"></a>
+ </td>
+ <td>
+ <table width="100%">
+ <tr>
+ <td><inp2:m_phrase name="la_StyleDefinition"/>:</td>
+ <td>
+ <inp2:selectors_PrintStyle field="SelectorData"/>
+ </td>
+ <td><inp2:m_phrase name="la_StylePreview"/>:</td>
+ <td style="<inp2:selectors_PrintStyle field="SelectorData" inline="inline"/>">
+ <inp2:m_phrase name="la_SampleText"/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td class="error">&nbsp;</td>
+ </tr>
+
+</table>
+<input type="hidden" name="main_prefix" id="main_prefix" value="selectors">
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.7.2/core/admin_templates/stylesheets/base_style_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.7.2/core/admin_templates/stylesheets/block_style_edit.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.7.2/core/admin_templates/stylesheets/block_style_edit.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.7.2/core/admin_templates/stylesheets/block_style_edit.tpl (revision 5290)
@@ -0,0 +1,113 @@
+<inp2:m_RequireLogin permissions="in-portal:configure_styles.view" system="1"/>
+<inp2:m_include t="incs/header" nobody="yes"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+<inp2:m_ParseBlock name="section_header" icon="icon46_style" title="!la_title_Stylesheets!"/>
+
+
+<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="block_style_edit" module="in-portal" icon="icon46_style"/>
+
+<!-- ToolBar --->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+ submit_event('selectors','<inp2:selectors_SaveEvent/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ submit_event('selectors','OnCancel');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+ a_toolbar.AddButton( new ToolBarButton('reset_to_base', '<inp2:m_phrase label="la_ToolTip_ResetToBase" escape="1"/>', function() {
+ submit_event('selectors','OnResetToBase');
+ }
+ ) );
+
+ a_toolbar.Render();
+
+ function ValidateRequired()
+ {
+ var $fields = new Array('<inp2:selectors_InputName field="Name"/>',
+ '<inp2:selectors_InputName field="SelectorName"/>');
+ var $ret = true;
+ var $i = 0;
+ var $value = '';
+ while($i < $fields.length)
+ {
+ $value = document.getElementById( $fields[$i] ).value;
+ $value = $value.replace(' ','');
+ if($value.length == 0)
+ {
+ $ret = false;
+ break;
+ }
+ $i++;
+ }
+ return $ret;
+ }
+
+ function editStyle()
+ {
+ if( ValidateRequired() )
+ {
+ openSelector('selectors', '<inp2:m_t t="stylesheets/style_editor" pass="all"/>', '', '850x460', 'OnOpenStyleEditor');
+ }
+ else
+ {
+ alert( RemoveTranslationLink('<inp2:m_phrase name="la_RequiredWarning"/>') );
+ }
+ }
+ </script>
+ </td>
+ </tr>
+</tbody>
+</table>
+
+<inp2:selectors_SaveWarning name="grid_save_warning"/>
+<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
+ <inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
+ <inp2:m_ParseBlock name="inp_edit_hidden" prefix="selectors" field="StylesheetId"/>
+ <input type="hidden" name="<inp2:selectors_InputName field="Type"/>" value="2">
+
+ <inp2:m_ParseBlock name="inp_id_label" prefix="selectors" field="SelectorId" title="!la_fld_SelectorId!"/>
+ <inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorName" title="!la_fld_SelectorName!" size="40"/>
+
+ <inp2:m_ParseBlock name="inp_edit_options" prefix="selectors" field="ParentId" title="!la_fld_SelectorBase!"/>
+
+ <inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="Name" title="!la_fld_Name!" size="40"/>
+ <inp2:m_ParseBlock name="inp_edit_textarea" prefix="selectors" field="Description" title="!la_fld_Description!" rows="10" cols="40"/>
+ <inp2:m_ParseBlock name="inp_edit_textarea" prefix="selectors" field="AdvancedCSS" title="!la_fld_AdvancedCSS!" rows="10" cols="40"/>
+
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <inp2:m_inc param="tab_index" by="1"/>
+ <td class="text" valign="top">
+ <inp2:m_phrase name="la_fld_SelectorData"/>:<br>
+ <a href="javascript:editStyle();"><img src="img/icons/icon24_link_editor.gif" style="cursor:hand" border="0"></a>
+ </td>
+ <td>
+ <table width="100%">
+ <tr>
+ <td><inp2:m_phrase name="la_StyleDefinition"/>:</td>
+ <td>
+ <inp2:selectors_PrintStyle field="SelectorData"/>
+ </td>
+ <td><inp2:m_phrase name="la_StylePreview"/>:</td>
+ <td style="<inp2:selectors_PrintStyle field="SelectorData" inline="inline"/>">
+ <inp2:m_phrase name="la_SampleText"/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td class="error">&nbsp;</td>
+ </tr>
+
+</table>
+<input type="hidden" name="main_prefix" id="main_prefix" value="selectors">
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.7.2/core/admin_templates/stylesheets/block_style_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property

Event Timeline