Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Tue, Sep 23, 1:27 AM

in-portal

Index: branches/unlabeled/unlabeled-1.5.32/core/units/stylesheets/stylesheets_item.php
===================================================================
--- branches/unlabeled/unlabeled-1.5.32/core/units/stylesheets/stylesheets_item.php (revision 5724)
+++ branches/unlabeled/unlabeled-1.5.32/core/units/stylesheets/stylesheets_item.php (revision 5725)
@@ -1,44 +1,43 @@
<?php
class StylesheetsItem extends kDBItem
{
function Compile()
{
- $this->Application->setUnitOption('selectors', 'AutoLoad', false);
- $selector_item =& $this->Application->recallObject('selectors.item', 'selectors', Array('live_table'=>true) );
+ $selector_item =& $this->Application->recallObject('selectors.item', 'selectors', Array('live_table'=>true, 'skip_autoload' => true) );
$parent_field = $this->Application->getUnitOption($selector_item->Prefix, 'ForeignKey');
$sql_template = 'SELECT '.$selector_item->IDField.' FROM '.$selector_item->TableName.' WHERE '.$parent_field.' = %s ORDER BY SelectorName ASC';
$selectors_ids = $this->Conn->GetCol( sprintf($sql_template, $this->GetID() ) );
$ret = '/* This file is generated automatically. Don\'t edit it manually ! */'."\n\n";
foreach($selectors_ids as $selector_id)
{
$selector_item->Load($selector_id);
$ret .= $selector_item->CompileStyle()."\n";
}
$ret .= $this->GetDBField('AdvancedCSS');
$compile_ts = adodb_mktime();
$css_path = FULL_PATH.'/kernel/stylesheets/';
$css_file = $css_path.strtolower($this->GetDBField('Name')).'-'.$compile_ts.'.css';
$fp = fopen($css_file,'w');
if($fp)
{
$prev_css = $css_path.strtolower($this->GetDBField('Name')).'-'.$this->GetDBField('LastCompiled').'.css';
if( file_exists($prev_css) ) unlink($prev_css);
fwrite($fp, $ret);
fclose($fp);
$sql = 'UPDATE '.$this->TableName.' SET LastCompiled = '.$compile_ts.' WHERE '.$this->IDField.' = '.$this->GetID();
$this->Conn->Query($sql);
}
}
}
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.5.32/core/units/stylesheets/stylesheets_item.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.5
\ No newline at end of property
+1.5.32.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.8.26/core/units/selectors/selectors_event_handler.php
===================================================================
--- branches/unlabeled/unlabeled-1.8.26/core/units/selectors/selectors_event_handler.php (revision 5724)
+++ branches/unlabeled/unlabeled-1.8.26/core/units/selectors/selectors_event_handler.php (revision 5725)
@@ -1,356 +1,368 @@
<?php
safeDefine('STYLE_BASE', 1);
safeDefine('STYLE_BLOCK', 2);
class SelectorsEventHandler extends InpDBEventHandler
{
+ /**
+ * Allows to override standart permission mapping
+ *
+ */
+ function mapPermissions()
+ {
+ parent::mapPermissions();
+ $permissions = Array(
+ 'OnResetToBase' => Array('subitem' => 'add|edit'),
+ 'OnMassResetToBase' => Array('subitem' => 'add|edit'),
+
+ 'OnOpenStyleEditor' => Array('subitem' => 'add|edit'),
+ 'OnSaveStyle' => Array('subitem' => 'add|edit'),
+ );
+ $this->permMapping = array_merge($this->permMapping, $permissions);
+ }
/**
* Occures before an item has been cloned
* Id of newly created item is passed as event' 'id' param
*
* @param kEvent $event
*/
function OnBeforeClone(&$event)
{
$event->Init($event->Prefix, '-item');
$object =& $event->getObject();
$title_field = 'SelectorName';
$new_name = $object->GetDBField($title_field);
$original_checked = false;
$foreign_key = $event->getEventParam('foreign_key'); // in case if whole stylesheet is cloned
if($foreign_key === false) $foreign_key = $object->GetDBField('StylesheetId'); // in case if selector is copied ifself
do {
if ( preg_match('/(.*)-([\d]+)/', $new_name, $regs) ) {
$new_name = $regs[1].'-'.($regs[2]+1);
}
elseif ($original_checked) {
$new_name = $new_name.'-1';
}
// if we are cloning in temp table this will look for names in temp table,
// since object' TableName contains correct TableName (for temp also!)
// if we are cloning live - look in live
$query = ' SELECT '.$title_field.'
FROM '.$object->TableName.'
WHERE '.$title_field.' = '.$this->Conn->qstr($new_name).' AND StylesheetId = '.$foreign_key;
$res = $this->Conn->GetOne($query);
/*// if not found in live table, check in temp table if applicable
if ($res === false && $object->Special == 'temp') {
$query = 'SELECT '.$name_field.' FROM '.$this->GetTempName($master['TableName']).'
WHERE '.$name_field.' = '.$this->Conn->qstr($new_name);
$res = $this->Conn->GetOne($query);
}*/
$original_checked = true;
} while ($res !== false);
$object->SetDBField($title_field, $new_name);
}
/**
* Show base styles or block styles
*
* @param kEvent $event
*/
function SetCustomQuery(&$event)
{
$object =& $event->getObject();
switch ($event->Special)
{
case 'base':
$object->addFilter('type_filter', '%1$s.Type = 1');
break;
case 'block':
$object->addFilter('type_filter', '%1$s.Type = 2');
break;
}
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnBeforeItemUpdate(&$event)
{
$this->SerializeSelectorData($event);
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnBeforeItemCreate(&$event)
{
$this->SerializeSelectorData($event);
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnAfterItemUpdate(&$event)
{
$this->UnserializeSelectorData($event);
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnAfterItemCreate(&$event)
{
$this->UnserializeSelectorData($event);
}
/**
* Get's special of main item for linking with subitem
*
* @param kEvent $event
* @return string
*/
function getMainSpecial(&$event)
{
return '';
}
/**
* Save css-style name & description before opening css editor
*
* @param kEvent $event
*/
function OnOpenStyleEditor(&$event)
{
$this->SaveChanges($event);
$event->redirect = false;
}
/**
* Saves Changes to Item
*
* @param kEvent $event
*/
function SaveChanges(&$event)
{
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if($items_info)
{
list($id,$field_values) = each($items_info);
if($id == 0)
{
$parent_id = getArrayValue($field_values,'ParentId');
if($parent_id) $object->Load($parent_id);
$object->SetFieldsFromHash($field_values);
$object->Create();
if( $object->IsTempTable() ) $object->setTempID();
$this->Application->SetVar($event->getPrefixSpecial().'_id', $object->GetID() );
}
else
{
$object->Load($id);
$object->SetFieldsFromHash($field_values);
$object->Update();
}
}
}
/**
* Save style changes from style editor
*
* @param kEvent $event
*/
function OnSaveStyle(&$event)
{
$this->SaveChanges($event);
$object =& $event->getObject();
$this->Application->SetVar($event->getPrefixSpecial().'_id', $object->GetId() );
- $return_tpl = $object->GetDBField('Type') == 1 ? 'base_style_edit' : 'block_style_edit';
-
- $this->finalizePopup($event, 'selectors.base','stylesheets/'.$return_tpl);
+ $this->finalizePopup($event);
}
/**
* Extract styles
*
* @param kEvent $event
*/
function OnAfterItemLoad(&$event)
{
$object =& $event->getObject();
$selector_data = $object->GetDBField('SelectorData');
if($selector_data)
{
$selector_data = unserialize($selector_data);
$object->SetDBField('SelectorData', $selector_data);
}
else
{
$selector_data = Array();
}
$this->AddParentProperties($event, $selector_data);
}
/**
* Serialize item before saving to db
*
* @param kEvent $event
*/
function SerializeSelectorData(&$event)
{
$object =& $event->getObject();
$selector_data = $object->GetDBField('SelectorData');
if(!$selector_data) $selector_data = Array();
$selector_data = $this->RemoveParentProperties($event, $selector_data);
if( !IsSerialized($selector_data) ) $selector_data = serialize($selector_data);
$object->SetDBField('SelectorData', $selector_data);
}
/**
* Unserialize data back when update was made
*
* @param kEvent $event
*/
function UnserializeSelectorData(&$event)
{
$object =& $event->getObject();
$selector_data = $object->GetDBField('SelectorData');
if(!$selector_data) $selector_data = Array();
if( IsSerialized($selector_data) ) $selector_data = unserialize($selector_data);
$selector_data = $this->AddParentProperties($event, $selector_data);
$object->SetDBField('SelectorData', $selector_data);
}
/**
* Populate options based on temporary table :)
*
* @param kEvent $event
*/
function OnPrepareBaseStyles(&$event)
{
$object =& $event->getObject();
$parent_info = $object->getLinkedInfo();
$title_field = $this->Application->getUnitOption($event->Prefix,'TitleField');
$sql = 'SELECT '.$title_field.', '.$object->IDField.' FROM '.$object->TableName.' WHERE Type = 1 AND StylesheetId = '.$parent_info['ParentId'].' ORDER BY '.$title_field;
$object->Fields['ParentId']['options'] = $this->Conn->GetCol($sql,$object->IDField);
}
/**
* Remove properties of parent style that match by value from style
*
* @param kEvent $event
*/
function RemoveParentProperties(&$event, $selector_data)
{
$object =& $event->getObject();
$parent_id = $object->GetDBField('ParentId');
if($parent_id)
{
$sql = 'SELECT SelectorData FROM '.$object->TableName.' WHERE '.$object->IDField.' = '.$parent_id;
$base_selector_data = $this->Conn->GetOne($sql);
if( IsSerialized($base_selector_data) ) $base_selector_data = unserialize($base_selector_data);
foreach($selector_data as $prop_name => $prop_value)
{
if( !$prop_value || getArrayValue($base_selector_data,$prop_name) == $prop_value )
{
unset($selector_data[$prop_name]);
}
}
$object->SetDBField('SelectorData', $selector_data);
return $selector_data;
}
else
{
foreach($selector_data as $prop_name => $prop_value)
{
if(!$prop_value) unset($selector_data[$prop_name]);
}
$object->SetDBField('SelectorData', $selector_data);
return $selector_data;
}
}
/**
* Add back properties from parent style, that match this style property values
*
* @param kEvent $event
*/
function AddParentProperties(&$event, $selector_data)
{
$object =& $event->getObject();
$parent_id = $object->GetDBField('ParentId');
if($parent_id)
{
$sql = 'SELECT SelectorData FROM '.$object->TableName.' WHERE '.$object->IDField.' = '.$parent_id;
$base_selector_data = $this->Conn->GetOne($sql);
if( IsSerialized($base_selector_data) ) $base_selector_data = unserialize($base_selector_data);
$selector_data = array_merge_recursive2($base_selector_data,$selector_data);
$object->SetDBField('SelectorData', $selector_data);
return $selector_data;
}
return $selector_data;
}
/**
* Reset Style definition to base style -> no customizations
*
* @param kEvent $event
*/
function OnResetToBase(&$event)
{
$object =& $event->getObject();
$object->SetFieldsFromHash( $this->getSubmittedFields($event) );
$object->ResetStyle();
$event->redirect_params['pass'] = 'all,'.$event->getPrefixSpecial();
}
/**
* Resets selected styles properties to values of their base classes
*
* @param kEvent $event
*/
function OnMassResetToBase(&$event)
{
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if($items_info)
{
foreach($items_info as $id => $field_values)
{
$object->Load($id);
$object->ResetStyle();
}
}
}
}
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.8.26/core/units/selectors/selectors_event_handler.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.8
\ No newline at end of property
+1.8.26.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.5.2/core/units/config_search/config_search_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.5.2/core/units/config_search/config_search_config.php (revision 5724)
+++ branches/unlabeled/unlabeled-1.5.2/core/units/config_search/config_search_config.php (revision 5725)
@@ -1,107 +1,115 @@
<?php
$config = Array(
'Prefix' => 'confs',
'Clones' => Array(
'confs-cf' => Array(
'Prefix' => 'confs-cf',
'ParentPrefix' => 'cf',
'ParentTableKey' => 'CustomFieldId', // linked field in master table
'ForeignKey' => 'CustomFieldId', // linked field in subtable
'AutoClone' => false, // because OnCreateCustomField hook does the stuff
'AutoDelete' => true,
'Hooks' => Array(
Array(
'Mode' => hAFTER,
'Conditional' => false,
- 'HookToPrefix' => 'cf',
+ 'HookToPrefix' => '#PARENT#',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnAfterItemCreate', 'OnAfterItemUpdate'),
- 'DoPrefix' => 'confs-cf',
+ 'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnCreateCustomField',
),
),
),
),
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'ConfigSearchEventHandler','file'=>'config_search_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'ConfigSearchTagProcessor','file'=>'config_search_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
'hooks' => Array(),
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
),
'IDField' => 'SearchConfigId',
+ 'TitleField' => 'FieldName',
+
'TitlePresets' => Array(
+ 'default' => Array( 'new_status_labels' => Array('confs'=>'!la_title_Adding_ConfigSearch!'),
+ 'edit_status_labels' => Array('confs'=>'!la_title_Editing_ConfigSearch!'),
+ 'new_titlefield' => Array('confs'=>'!la_title_New_ConfigSearch!'),
+ ),
+
+ 'configsearch_edit' => Array('prefixes' => Array('confs'), 'format' => "#confs_status# '#confs_titlefield#' - !la_title_General!"),
'config_list_search' => Array('prefixes' => Array('confs_List'), 'tag_params' => Array('confs' => Array('per_page' => -1) ), 'format' => "!la_updating_config!"),
),
'TableName' => TABLE_PREFIX.'SearchConfig',
'CalculatedFields' => Array(
'' => Array(
'IsCustom' => 'IF(CustomFieldId IS NULL, 0, 1)',
),
),
'ListSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'),
'ItemSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'),
'Fields' => Array(
- 'TableName' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'FieldName' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'SimpleSearch' => Array('type' => 'int','not_null' => '1','default' => '0'),
- 'AdvancedSearch' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ 'TableName' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''),
+ 'FieldName' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''),
+ 'SimpleSearch' => Array('type' => 'int','not_null' => '1','default' => '1'),
+ 'AdvancedSearch' => Array('type' => 'int','not_null' => '1','default' => '1'),
'Description' => Array('type' => 'string','default' => ''),
- 'DisplayName' => Array('type' => 'string','default' => ''),
- 'ModuleName' => Array('type' => 'string','default' => ''),
- 'ConfigHeader' => Array('type' => 'string','default' => ''),
+ 'DisplayName' => Array('type' => 'string', 'required' => 1, 'default' => ''),
+ 'ModuleName' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>''), 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Modules WHERE Loaded = 1 ORDER BY LoadOrder', 'option_key_field'=>'Name', 'option_title_field'=>'Name', 'not_null' => '1','default' => 'In-Portal'),
+ 'ConfigHeader' => Array('type' => 'string', 'required' => 1, 'default' => ''),
'DisplayOrder' => Array('type' => 'int','not_null' => '1','default' => '0'),
'SearchConfigId' => Array('type' => 'int','not_null' => '1','default' => ''),
'Priority' => Array('type' => 'int','not_null' => '1','default' => '0'),
- 'FieldType' => Array('type' => 'string','not_null' => '1','default' => 'text'),
- 'ForeignField' => Array('type' => 'string','default' => ''),
- 'JoinClause' => Array('type' => 'string','default' => ''),
- 'IsWhere' => Array('type' => 'string','default' => ''),
- 'IsNotWhere' => Array('type' => 'string','default' => ''),
- 'ContainsWhere' => Array('type' => 'string','default' => ''),
- 'NotContainsWhere' => Array('type' => 'string','default' => ''),
- 'CustomFieldId' => Array('type' => 'int', 'default' => ''),
+ 'FieldType' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array('text' => 'text', 'range' => 'range', 'boolean' => 'boolean', 'date' => 'date'), 'not_null' => '1', 'required' => 1, 'default' => 'text'),
+ 'ForeignField' => Array('type' => 'string','default' => null),
+ 'JoinClause' => Array('type' => 'string','default' => null),
+ 'IsWhere' => Array('type' => 'string','default' => null),
+ 'IsNotWhere' => Array('type' => 'string','default' => null),
+ 'ContainsWhere' => Array('type' => 'string','default' => null),
+ 'NotContainsWhere' => Array('type' => 'string','default' => null),
+ 'CustomFieldId' => Array('type' => 'int', 'default' => null),
),
'VirtualFields' => Array(
'IsCustom' => Array('type' => 'int', 'default' => 0),
),
'ListSortings' => Array(
'' => Array(
'ForcedSorting' => Array('IsCustom' => 'asc'),
'Sorting' => Array('DisplayOrder' => 'asc'),
)
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon16_custom.gif'), // icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used
'Fields' => Array(
'TableName' => Array( 'title'=>'la_col_TableName', 'data_block' => 'grid_data_td'),
'FieldName' => Array( 'title'=>'la_col_FieldName', 'data_block' => 'grid_data_td' ),
'SimpleSearch' => Array( 'title'=>'la_col_SimpleSearch', 'data_block' => 'grid_data_td'),
),
),
),
);
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.5.2/core/units/config_search/config_search_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.5
\ No newline at end of property
+1.5.2.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.5.2/core/admin_templates/incs/custom_blocks.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.5.2/core/admin_templates/incs/custom_blocks.tpl (revision 5724)
+++ branches/unlabeled/unlabeled-1.5.2/core/admin_templates/incs/custom_blocks.tpl (revision 5725)
@@ -1,44 +1,67 @@
<inp2:m_DefineElement name="config_edit_text">
<input type="text" name="<inp2:CustomInputName/>" value="<inp2:Field field="$field"/>" />
</inp2:m_DefineElement>
<inp2:m_DefineElement name="config_edit_password">
<input type="password" primarytype="password" name="<inp2:CustomInputName/>" id="<inp2:CustomInputName/>" value="" />
<input type="password" name="verify_<inp2:CustomInputName/>" id="verify_<inp2:CustomInputName/>" value="" />
&nbsp;<span class="error" id="error_<inp2:CustomInputName/>"></span>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="config_edit_option">
<option value="<inp2:m_param name="key"/>"<inp2:m_param name="selected"/>><inp2:m_param name="option"/></option>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="config_edit_select">
<select name="<inp2:CustomInputName/>">
<inp2:PredefinedOptions field="$field" tabindex="$pass_tabindex" block="config_edit_option" selected="selected"/>
</select>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="config_edit_checkbox">
<input type="hidden" id="<inp2:CustomInputName/>" name="<inp2:CustomInputName/>" value="<inp2:Field field="$field" db="db"/>">
<input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:m_param name="field"/>" name="_cb_<inp2:m_param name="field"/>" <inp2:Field field="$field" checked="checked" db="db"/> class="<inp2:m_param name="field_class"/>" onclick="update_checkbox(this, document.getElementById('<inp2:CustomInputName/>'))">
</inp2:m_DefineElement>
<inp2:m_DefineElement name="config_edit_textarea">
<textarea name="<inp2:CustomInputName/>" <inp2:m_param name="field_params" />><inp2:Field field="$field" /></textarea>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="config_radio_item">
<input type="radio" <inp2:m_param name="checked"/> name="<inp2:CustomInputName/>" id="<inp2:CustomInputName/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>"><label for="<inp2:CustomInputName/>_<inp2:m_param name="key"/>"><inp2:m_param name="option"/></label>&nbsp;
</inp2:m_DefineElement>
<inp2:m_DefineElement name="config_edit_radio">
<inp2:PredefinedOptions field="$field" tabindex="$pass_tabindex" block="config_radio_item" selected="checked"/>
</inp2:m_DefineElement>
+<inp2:m_DefineElement name="cv_row_block">
+ <inp2:m_if check="m_ParamEquals" name="show_heading" value="1">
+ <tr class="subsectiontitle">
+ <td colspan="5">
+ <inp2:Field name="Heading" as_label="1"/>
+ </td>
+ </tr>
+ </inp2:m_if>
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>" >
+ <inp2:m_ParseBlock name="grid_data_label_ml_td" grid="$grid" SourcePrefix="$SourcePrefix" value_field="$value_field" ElementTypeField="ElementType" field="Prompt" PrefixSpecial="$PrefixSpecial"/>
+ <td valign="top" class="text">
+ <inp2:ConfigFormElement field="Value" blocks_prefix="config_edit_" element_type_field="ElementType" value_list_field="ValueList" />
+ </td>
+ <td class="error">&nbsp;</td>
+ </tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="edit_custom_td">
+ <td valign="top" class="text">
+ <inp2:ConfigFormElement field="Value" blocks_prefix="config_edit_" element_type_field="ElementType" value_list_field="ValueList" />
+ </td>
+</inp2:m_DefineElement>
+
<!--<inp2:m_DefineElement name="edit_custom_td">
<td valign="top" class="text">
<input type="hidden" name="<inp2:InputName field="ResourceId"/>" id="<inp2:InputName field="ResourceId"/>" value="<inp2:Field field="ResourceId" grid="$grid"/>">
<input type="hidden" name="<inp2:InputName field="CustomDataId"/>" id="<inp2:InputName field="CustomDataId"/>" value="<inp2:Field field="CustomDataId" grid="$grid"/>">
<inp2:ConfigFormElement field="Value" blocks_prefix="config_edit_" element_type_field="ElementType" value_list_field="ValueList" />
</td>
</inp2:m_DefineElement>-->
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.5.2/core/admin_templates/incs/custom_blocks.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.5
\ No newline at end of property
+1.5.2.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.6.10/core/admin_templates/stylesheets/stylesheets_edit_block.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.6.10/core/admin_templates/stylesheets/stylesheets_edit_block.tpl (revision 5724)
+++ branches/unlabeled/unlabeled-1.6.10/core/admin_templates/stylesheets/stylesheets_edit_block.tpl (revision 5725)
@@ -1,111 +1,111 @@
-<inp2:m_set nobody="yes"/>
-<inp2:m_include t="incs/header"/>
+<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.6.10/core/admin_templates/stylesheets/stylesheets_edit_block.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.6
\ No newline at end of property
+1.6.10.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.10.2/core/units/config_search/config_search_event_handler.php
===================================================================
--- branches/unlabeled/unlabeled-1.10.2/core/units/config_search/config_search_event_handler.php (revision 5724)
+++ branches/unlabeled/unlabeled-1.10.2/core/units/config_search/config_search_event_handler.php (revision 5725)
@@ -1,89 +1,104 @@
<?php
class ConfigSearchEventHandler extends InpDBEventHandler {
/**
+ * Changes permission section to one from REQUEST, not from config
+ *
+ * @param kEvent $event
+ */
+ function CheckPermission(&$event)
+ {
+ $module = $this->Application->GetVar('module');
+ $main_prefix = $this->Application->findModule('Name', $module, 'Var');
+ $section = $this->Application->getUnitOption($main_prefix.'.search', 'PermSection');
+ $event->setEventParam('PermSection', $section);
+ return parent::CheckPermission($event);
+ }
+
+ /**
* Apply any custom changes to list's sql query
*
* @param kEvent $event
* @access protected
* @see OnListBuild
*/
function SetCustomQuery(&$event)
{
$object =& $event->getObject();
// show only items that belong to selected module
$module = $this->Application->GetVar('module');
$object->addFilter('module_filter', '%1$s.ModuleName = '.$this->Conn->qstr($module));
// don't show disabled search items
$object->addFilter('active_filter', '%1$s.SimpleSearch <> -1');
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnUpdate(&$event)
{
- if (!$this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 0)) {
+ if (!$this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
parent::OnUpdate($event);
$conf_update = new kEvent('conf:OnUpdate');
$conf_update->redirect = false;
$this->Application->HandleEvent($conf_update);
}
$event->SetRedirectParam('opener', 's');
}
function OnCancel(&$event)
{
parent::OnCancel($event);
$event->SetRedirectParam('opener', 's');
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnCreateCustomField(&$event)
{
$custom_field =& $event->MasterEvent->getObject();
- if ($custom_field->GetDBField('Type') == 6) {
- // user custom fields are not searchable
+ if ($custom_field->GetDBField('Type') == 6 || $custom_field->GetDBField('IsSystem') == 1) {
+ // user & system custom fields are not searchable
return false;
}
- $sql = 'SELECT Module
- FROM '.TABLE_PREFIX.'ItemTypes
- WHERE ItemType = '.$custom_field->GetDBField('Type');
- $module_name = $this->Conn->GetOne($sql);
-
$object =& $event->getObject( Array('skip_autoload' => true) );
$custom_id = $custom_field->GetID();
if ($custom_id) {
$object->Load($custom_id, 'CustomFieldId');
$object->SetDBField('CustomFieldId', $custom_id); // for cloning only
}
$cf_search = Array();
$cf_search['DisplayOrder'] = $custom_field->GetDBField('DisplayOrder');
$cf_search['ElementType'] = $custom_field->GetDBField('ElementType');
$cf_search['DisplayName'] = $custom_field->GetDBField('FieldLabel');
$cf_search['FieldName'] = $custom_field->GetDBField('FieldName');
$cf_search['Description'] = $custom_field->GetDBField('Prompt');
$cf_search['ConfigHeader'] = $custom_field->GetDBField('Heading'); // 'la_Text_CustomFields';
$cf_search['TableName'] = 'CustomField';
- $cf_search['ModuleName'] = $module_name;
+
+ $sql = 'SELECT Module
+ FROM '.TABLE_PREFIX.'ItemTypes
+ WHERE ItemType = '.$custom_field->GetDBField('Type');
+
+ $cf_search['ModuleName'] = $this->Conn->GetOne($sql);
+
$object->SetFieldsFromHash($cf_search);
$result = $object->isLoaded() ? $object->Update() : $object->Create();
}
}
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.10.2/core/units/config_search/config_search_event_handler.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.10
\ No newline at end of property
+1.10.2.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.10/core/admin_templates/stylesheets/stylesheets_edit.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.4.10/core/admin_templates/stylesheets/stylesheets_edit.tpl (revision 5724)
+++ branches/unlabeled/unlabeled-1.4.10/core/admin_templates/stylesheets/stylesheets_edit.tpl (revision 5725)
@@ -1,70 +1,70 @@
-<inp2:m_set nobody="yes"/>
-<inp2:m_include t="incs/header"/>
+<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="stylesheets_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('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.Render();
<inp2:m_if prefix="css" function="IsSingle"/>
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<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:css_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_id_label" prefix="css" field="StylesheetId" title="!la_fld_StylesheetId!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="css" field="Name" title="!la_fld_Name!" size="40"/>
<inp2:m_ParseBlock name="inp_edit_textarea" prefix="css" field="Description" title="!la_fld_Description!" rows="10" cols="40"/>
<inp2:m_ParseBlock name="inp_edit_textarea" prefix="css" field="AdvancedCSS" title="!la_fld_AdvancedCSS!" rows="10" cols="40"/>
<inp2:m_ParseBlock name="inp_edit_checkbox" prefix="css" field="Enabled" title="!la_fld_Enabled!"/>
</table>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.10/core/admin_templates/stylesheets/stylesheets_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4
\ No newline at end of property
+1.4.10.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.11.2/core/admin_templates/logs/visits/visits_list.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.11.2/core/admin_templates/logs/visits/visits_list.tpl (revision 5724)
+++ branches/unlabeled/unlabeled-1.11.2/core/admin_templates/logs/visits/visits_list.tpl (revision 5725)
@@ -1,122 +1,122 @@
-<inp2:m_set nobody="yes"/>
-<inp2:m_include t="incs/header"/>
+<inp2:m_RequireLogin permissions="in-portal:visits.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_visits" title="!la_title_Visits!"/>
<inp2:m_ParseBlock name="blue_bar" prefix="visits" title_preset="visits_list" module="in-portal" icon="icon46_visits"/>
<!-- 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();
function edit()
{
}
a_toolbar.AddButton( new ToolBarButton('search', '<inp2:m_phrase label="la_ToolTip_Search" escape="1"/>',
function() {
set_hidden_field('grid_name', 'Default');
submit_event('visits','OnSearch');
} ) );
a_toolbar.AddButton( new ToolBarButton('search_reset', '<inp2:m_phrase label="la_ToolTip_SearchReset" escape="1"/>',
function() {
set_hidden_field('grid_name', 'Default');
submit_event('visits','OnSearchReset');
} ) );
a_toolbar.AddButton( new ToolBarButton('refresh', '<inp2:m_phrase label="la_ToolTip_Refresh" escape="1"/>', function() {
window.location.href = window.location.href;
}
) );
a_toolbar.AddButton( new ToolBarButton('reset', '<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>', function() {
std_delete_items('visits');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
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>
<script type="text/javascript" src="incs/calendar.js"></script>
<inp2:m_DefineElement name="search_calendar_td" class="">
<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="text"><inp2:m_phrase label="la_from_date"/>:</td>
<td>
<input type="text" name="<inp2:SearchInputName field="$field" type="datefrom"/>" id="<inp2:SearchInputName field="$field" type="datefrom"/>" value="<inp2:SearchField field="$field" format="_regional_InputDateFormat" type="datefrom"/>" size="<inp2:SearchFormat field="{$field}_date" input_format="1" edit_size="1"/>" datepickerIcon="<inp2:m_ProjectBase/>admin/images/ddarrow.gif">
<span class="small">(<inp2:SearchFormat field="{$field}_date" input_format="1" human="true"/>)</span>
<script type="text/javascript">
initCalendar("<inp2:SearchInputName field="$field" type="datefrom"/>", "<inp2:SearchFormat field="{$field}_date" input_format="1"/>");
</script>
</td>
<td class="error"><inp2:SearchError field="$field" type="datefrom"/>&nbsp;</td>
<td class="text"><inp2:m_phrase label="la_to_date"/>:</td>
<td>
<input type="text" name="<inp2:SearchInputName field="$field" type="dateto"/>" id="<inp2:SearchInputName field="$field" type="dateto"/>" value="<inp2:SearchField field="$field" format="_regional_InputDateFormat" type="dateto"/>" size="<inp2:SearchFormat field="{$field}_date" input_format="1" edit_size="1"/>" datepickerIcon="<inp2:m_ProjectBase/>admin/images/ddarrow.gif">
<span class="small">(<inp2:SearchFormat field="{$field}_date" input_format="1" human="true"/>)</span>
<script type="text/javascript">
initCalendar("<inp2:SearchInputName field="$field" type="dateto"/>", "<inp2:SearchFormat field="{$field}_date" input_format="1"/>");
</script>
</td>
<td class="error"><inp2:SearchError field="$field" type="dateto"/>&nbsp;</td>
</tr>
</inp2:m_DefineElement>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder" style="border-bottom: 0px;">
<inp2:m_ParseBlock name="search_calendar_td" prefix="visits" field="VisitDate"/>
</table>
<inp2:m_block name="grid_userlink_td" />
<td valign="top" class="text">
<inp2:m_if check="UserFound" user_field="$user_field">
<a href="<inp2:$PrefixSpecial_UserLink user_field="$user_field"/>" title="<inp2:m_phrase name="la_Edit_User"/>"><inp2:$PrefixSpecial_field field="$field" grid="$grid"/></a>
<inp2:m_else/>
<inp2:$PrefixSpecial_field field="$field" grid="$grid"/>
</inp2:m_if>
</td>
<inp2:m_blockend />
<inp2:m_block name="grid_referer_td" />
<td valign="top" class="text">
<div style="overflow: hidden">
<inp2:m_if check="FieldEquals" field="$field" value="">
<span style="white-space: nowrap;"><inp2:m_Phrase label="la_visit_DirectReferer"/></span>
<inp2:m_else/>
<a href="<inp2:Field field="$field" grid="$grid"/>"><inp2:Field field="$field" grid="$grid" /></a>
</inp2:m_if>
</div>
</td>
<inp2:m_blockend />
-<inp2:m_SaveReturnScript/>
+<inp2:adm_SaveReturnScript/>
<inp2:m_ParseBlock name="grid" PrefixSpecial="visits" IdField="VisitId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" search="on" no_toolbar="no_toolbar"/>
<script type="text/javascript">
Grids['visits'].SetDependantToolbarButtons( new Array('reset') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.11.2/core/admin_templates/logs/visits/visits_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.11
\ No newline at end of property
+1.11.2.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.34/core/units/stylesheets/stylesheets_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.4.34/core/units/stylesheets/stylesheets_config.php (revision 5724)
+++ branches/unlabeled/unlabeled-1.4.34/core/units/stylesheets/stylesheets_config.php (revision 5725)
@@ -1,114 +1,129 @@
<?php
$config = Array(
'Prefix' => 'css',
'ItemClass' => Array('class'=>'StylesheetsItem','file'=>'stylesheets_item.php','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'StylesheetsEventHandler','file'=>'stylesheets_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
'AutoLoad' => true,
'Hooks' => Array(
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'css',
'HookToSpecial' => '',
'HookToEvent' => Array('OnSave'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnCompileStylesheet',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'StylesheetId',
'StatusField' => Array('Enabled'),
'TitleField' => 'Name',
'TitlePresets' => Array(
'default' => Array( 'new_status_labels' => Array('css'=>'!la_title_Adding_Stylesheet!'),
'edit_status_labels' => Array('css'=>'!la_title_Editing_Stylesheet!'),
'new_titlefield' => Array('css'=>'!la_title_New_Stylesheet!'),
),
'styles_list' => Array('prefixes' => Array('css_List'), 'format' => "!la_title_Stylesheets! (#css_recordcount#)"),
'stylesheets_edit' => Array('prefixes' => Array('css'), 'format' => "#css_status# '#css_titlefield#' - !la_title_General!"),
'base_styles' => Array('prefixes' => Array('css','selectors.base_List'), 'format' => "#css_status# '#css_titlefield#' - !la_title_BaseStyles! (#selectors.base_recordcount#)"),
'block_styles' => Array('prefixes' => Array('css','selectors.block_List'), 'format' => "#css_status# '#css_titlefield#' - !la_title_BlockStyles! (#selectors.block_recordcount#)"),
'base_style_edit' => Array( 'prefixes' => Array('css','selectors'),
'new_status_labels' => Array('selectors'=>'!la_title_Adding_BaseStyle!'),
'edit_status_labels' => Array('selectors'=>'!la_title_Editing_BaseStyle!'),
'new_titlefield' => Array('selectors'=>'!la_title_New_BaseStyle!'),
'format' => "#css_status# '#css_titlefield#' - #selectors_status# '#selectors_titlefield#'"),
'block_style_edit' => Array( 'prefixes' => Array('css','selectors'),
'new_status_labels' => Array('selectors'=>'!la_title_Adding_BlockStyle!'),
'edit_status_labels' => Array('selectors'=>'!la_title_Editing_BlockStyle!'),
'new_titlefield' => Array('selectors'=>'!la_title_New_BlockStyle!'),
'format' => "#css_status# '#css_titlefield#' - #selectors_status# '#selectors_titlefield#'"),
'style_edit' => Array('prefixes' => Array('selectors'), 'format' => "!la_title_EditingStyle! '#selectors_titlefield#'"),
),
+
+ 'PermSection' => Array('main' => 'in-portal:configure_styles'),
+
+ 'Sections' => Array(
+ 'in-portal:configure_styles' => Array(
+ 'parent' => 'in-portal:system',
+ 'icon' => 'style',
+ 'label' => 'la_tab_Stylesheets',
+ 'url' => Array('t' => 'stylesheets/stylesheets_list', 'pass' => 'm'),
+ 'permissions' => Array('view', 'add', 'edit', 'delete'),
+ 'priority' => 3,
+ 'type' => stTREE,
+ ),
+ ),
+
'TableName' => TABLE_PREFIX.'Stylesheets',
'SubItems' => Array('selectorsbase', 'selectorsblock'),
'FilterMenu' => Array(
'Groups' => Array(
Array('mode' => 'AND', 'filters' => Array(0,1), 'type' => WHERE_FILTER),
),
'Filters' => Array(
0 => Array('label' =>'la_Enabled', 'on_sql' => '', 'off_sql' => '%1$s.Enabled != 1' ),
1 => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Enabled != 0' ),
)
),
'AutoDelete' => true,
'AutoClone' => true,
'ListSQLs' => Array( ''=>'SELECT * FROM %s',
), // key - special, value - list select sql
'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
),
'ListSortings' => Array(
'' => Array(
'Sorting' => Array('Name' => 'asc'),
)
),
'Fields' => Array(
'StylesheetId' => Array(),
'Name' => Array('type' => 'string','not_null' => '1','default' => '','required'=>1),
'Description' => Array('type' => 'string','not_null' => '1','default' => ''),
'AdvancedCSS' => Array('type' => 'string','not_null' => '1','default' => ''),
'LastCompiled' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'not_null' => '1','default' => '0'),
'Enabled' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array(0 => 'la_Disabled', 1 => 'la_Enabled'), 'use_phrases' => 1, 'not_null' => '1','default' => 0),
),
'VirtualFields' => Array(),
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon16_custom.gif',0=>'icon16_style_disabled.gif',1=>'icon16_style.gif'),
'Fields' => Array(
'Name' => Array( 'title'=>'la_col_Name', 'data_block' => 'grid_checkbox_td'),
'Description' => Array( 'title'=>'la_col_Description', 'data_block' => 'grid_description_td' ),
'Enabled' => Array( 'title'=>'la_col_Status' ),
'LastCompiled' => Array('title' => 'la_col_LastCompiled'),
),
),
),
);
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.34/core/units/stylesheets/stylesheets_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4
\ No newline at end of property
+1.4.34.1
\ No newline at end of property

Event Timeline