Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F773518
in-portal
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Feb 2, 2:50 PM
Size
16 KB
Mime Type
text/x-diff
Expires
Tue, Feb 4, 2:50 PM (2 h, 12 m)
Engine
blob
Format
Raw Data
Handle
556734
Attached To
rINP In-Portal
in-portal
View Options
Index: branches/unlabeled/unlabeled-1.1.2/core/units/selectors/selectors_item.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/units/selectors/selectors_item.php (revision 1468)
+++ branches/unlabeled/unlabeled-1.1.2/core/units/selectors/selectors_item.php (revision 1469)
@@ -1,29 +1,29 @@
<?php
class SelectorsItem extends kDBItem
{
/**
* Returns compiled selector for inserting into css file
*
* @return string
*/
function CompileStyle()
{
$selector_data = $this->GetDBField('SelectorData');
- $ret = $this->GetDBField('Type') == STYLE_BASE ? '.' : '';
+ $ret = '';
$ret .= $this->GetDBField('SelectorName')." {\n";
foreach($selector_data as $property_name => $property_value)
{
if ($property_value == '') continue;
$ret .= "\t$property_name: $property_value;\n";
}
$ret .= $this->GetDBField('AdvancedCSS')."\n";
$ret .= "}\n";
return $ret;
}
}
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/units/selectors/selectors_item.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.3
\ No newline at end of property
+1.1.2.4
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/units/selectors/selectors_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/units/selectors/selectors_config.php (revision 1468)
+++ branches/unlabeled/unlabeled-1.1.2/core/units/selectors/selectors_config.php (revision 1469)
@@ -1,112 +1,123 @@
<?php
define('STYLE_BASE', 1);
define('STYLE_BLOCK', 2);
$config = Array(
'Prefix' => 'selectors',
'ItemClass' => Array('class'=>'SelectorsItem','file'=>'selectors_item.php','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'SelectorsEventHandler','file'=>'selectors_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'SelectorsTagProcessor','file'=>'selectors_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
'Hooks' => Array(
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'selectors',
'HookToSpecial' => '',
'HookToEvent' => Array('OnBeforeItemUpdate','OnBeforeItemCreate'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnSerializeSelectorData',
),
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'selectors',
'HookToSpecial' => '',
'HookToEvent' => Array('OnAfterItemUpdate','OnAfterItemCreate'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnUnserializeSelectorData',
),
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'selectors',
'HookToSpecial' => '',
- 'HookToEvent' => Array('OnItemBuild','OnListBuild'),
+ 'HookToEvent' => Array('OnItemBuild'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnPrepareBaseStyles',
),
+
+ Array(
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'selectors',
+ 'HookToSpecial' => 'block',
+ 'HookToEvent' => Array('OnListBuild'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => 'block',
+ 'DoEvent' => 'OnPrepareBaseStyles',
+ ),
),
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
),
'IDField' => 'SelectorId',
'TitleField' => 'Name',
'TableName' => TABLE_PREFIX.'StylesheetSelectors',
'ForeignKey' => 'StylesheetId',
'ParentTableKey' => 'StylesheetId',
'ParentPrefix' => 'css',
'AutoDelete' => true,
'AutoClone' => true,
'Constrain' => 'Type = '.STYLE_BASE,
'SubItems' => Array('SAME: Type='.STYLE_BLOCK),
'ForeignKey1' => 'ParentId',
'ListSQLs' => Array( ''=>' SELECT %1$s.*
FROM %s',
), // key - special, value - list select sql
'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
),
'ListSortings' => Array(
'' => Array(
'Sorting' => Array('Name' => 'asc'),
)
),
'Fields' => Array(
'SelectorId' => Array(),
'StylesheetId' => Array('type' => 'int','not_null' => '1','default' => '0'),
'Name' => Array('type' => 'string','not_null' => '1','default' => '','required'=>1),
'SelectorName' => Array('type' => 'string','not_null' => '1','default' => '','required'=>1),
'SelectorData' => Array('not_null' => '1','default' => ''),
'Description' => Array('type' => 'string','not_null' => '1','default' => ''),
'Type' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array( STYLE_BASE => 'la_BaseSelectors', STYLE_BLOCK => 'la_BlockSelectors'), 'use_phrases' => 1, 'not_null' => '1','default' => '0'),
'AdvancedCSS' => Array('type' => 'string','not_null' => '1','default' => ''),
'ParentId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array(0=>''), 'not_null' => '1','default' => '0'),
),
'VirtualFields' => Array( ),
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon16_selector.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' ),
),
),
'BlockStyles' => Array(
'Icons' => Array('default'=>'icon16_selector.gif'),
'Fields' => Array(
'Name' => Array( 'title'=>'la_col_Name', 'data_block' => 'grid_checkbox_td'),
'SelectorName' => Array( 'title'=>'la_col_SelectorName'),
'Description' => Array( 'title'=>'la_col_Description', 'data_block' => 'grid_description_td' ),
'ParentId' => Array('title'=>'la_col_Basedon'),
),
),
),
);
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/units/selectors/selectors_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.7
\ No newline at end of property
+1.1.2.8
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/stylesheets/stylesheets_edit_base.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/stylesheets/stylesheets_edit_base.tpl (revision 1468)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/stylesheets/stylesheets_edit_base.tpl (revision 1469)
@@ -1,103 +1,103 @@
<inp2:m_set nobody="yes"/>
<inp2:m_include t="incs/header"/>
<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="in-commerce/stylesheets/stylesheets_tabs"/>
<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="base_styles" module="in-commerce" 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"/>', function() {
submit_event('css','<inp2:css_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel"/>', function() {
submit_event('css','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev"/>', function() {
go_to_id('css', '<inp2:css_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next"/>', function() {
go_to_id('css', '<inp2:css_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
- a_toolbar.AddButton( new ToolBarButton('new_base_style', '<inp2:m_phrase label="la_ToolTip_NewBaseStyle"/>',
+ a_toolbar.AddButton( new ToolBarButton('new_selector', '<inp2:m_phrase label="la_ToolTip_NewBaseStyle"/>',
function() {
set_hidden_field('remove_specials[selectors.base]',1);
std_new_item('selectors.base', 'in-commerce/stylesheets/base_style_edit')
} ) );
function edit()
{
set_hidden_field('remove_specials[selectors.base]',1);
std_edit_temp_item('selectors.base', 'in-commerce/stylesheets/base_style_edit');
}
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete"/>',
function() {
std_delete_items('selectors.base')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone"/>', function() {
set_hidden_field('remove_specials[selectors.base]',1);
submit_event('selectors.base','OnMassClone');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep4') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View"/>', 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.base" IdField="SelectorId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
<script type="text/javascript">
Grids['selectors.base'].SetDependantToolbarButtons( new Array('edit','delete') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/stylesheets/stylesheets_edit_base.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.4
\ No newline at end of property
+1.1.2.5
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/stylesheets/stylesheets_edit_block.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/stylesheets/stylesheets_edit_block.tpl (revision 1468)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/stylesheets/stylesheets_edit_block.tpl (revision 1469)
@@ -1,105 +1,105 @@
<inp2:m_set nobody="yes"/>
<inp2:m_include t="incs/header"/>
<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="in-commerce/stylesheets/stylesheets_tabs"/>
<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="block_styles" module="in-commerce" 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"/>', function() {
submit_event('css','<inp2:css_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel"/>', function() {
submit_event('css','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev"/>', function() {
go_to_id('css', '<inp2:css_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next"/>', function() {
go_to_id('css', '<inp2:css_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
//Relations related:
- a_toolbar.AddButton( new ToolBarButton('new_block_style', '<inp2:m_phrase label="la_ToolTip_NewBlockStyle"/>',
+ a_toolbar.AddButton( new ToolBarButton('new_selector', '<inp2:m_phrase label="la_ToolTip_NewBlockStyle"/>',
function() {
set_hidden_field('remove_specials[selectors.block]',1);
std_new_item('selectors.block', 'in-commerce/stylesheets/block_style_edit')
} ) );
function edit()
{
set_hidden_field('remove_specials[selectors.block]',1);
std_edit_temp_item('selectors.block', 'in-commerce/stylesheets/block_style_edit');
}
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete"/>',
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"/>', function() {
set_hidden_field('remove_specials[selectors.block]',1);
submit_event('selectors.block','OnMassClone');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep4') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View"/>', 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') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/stylesheets/stylesheets_edit_block.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.2
\ No newline at end of property
+1.1.2.3
\ No newline at end of property
Event Timeline
Log In to Comment