Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Tue, May 20, 4:25 PM

in-portal

Index: branches/unlabeled/unlabeled-1.1.2/core/units/selectors/selectors_tag_processor.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/units/selectors/selectors_tag_processor.php (revision 1421)
+++ branches/unlabeled/unlabeled-1.1.2/core/units/selectors/selectors_tag_processor.php (revision 1422)
@@ -1,63 +1,62 @@
<?php
class SelectorsTagProcessor extends kDBTagProcessor
{
function PrintStyle($params)
{
$object =& $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix, $params );
$style_data = $object->GetDBField( $params['field'] );
$ret = '';
if($style_data)
{
- //$style_attribs = unserialize($style_data);
+ $separator = getArrayValue($params,'inline') ? ' ' : '<br>';
foreach($style_data as $property_name => $property_value)
{
- $ret .= $property_name.': '.$property_value.';<br>';
+ $ret .= $property_name.': '.$property_value.';'.$separator;
}
-
}
return $ret;
}
/**
* Returns input field name to
* be placed on form (for correct
* event processing)
*
* @param Array $params
* @return string
* @access public
*/
function InputName($params)
{
$ret = parent::InputName($params);
$subfield = getArrayValue($params,'subfield');
if($subfield && $subfield != '$subfield')
{
$ret .= '['.$subfield.']';
}
return $ret;
}
function Field($params)
{
$subfield = getArrayValue($params,'subfield');
if($subfield && $subfield != '$subfield')
{
$params['no_special'] = 'no_special';
}
$ret = parent::Field($params);
if($subfield && $subfield != '$subfield')
{
$ret = getArrayValue($ret,$subfield);
return $ret !== false ? $ret : '';
}
return $ret;
}
}
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/units/selectors/selectors_tag_processor.php
___________________________________________________________________
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/units/selectors/selectors_item.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/units/selectors/selectors_item.php (revision 1421)
+++ branches/unlabeled/unlabeled-1.1.2/core/units/selectors/selectors_item.php (revision 1422)
@@ -1,25 +1,27 @@
<?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 .= $this->GetDBField('SelectorName')." {\n";
foreach($selector_data as $property_name => $property_value)
{
$ret .= "\t$property_name: $property_value;\n";
}
- $ret .= $this->GetDBField('AdvancedCSS');
$ret .= "}\n";
+
+ $ret .= $this->GetDBField('AdvancedCSS')."\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.1
\ No newline at end of property
+1.1.2.2
\ 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 1421)
+++ branches/unlabeled/unlabeled-1.1.2/core/units/selectors/selectors_config.php (revision 1422)
@@ -1,106 +1,112 @@
<?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'),
'DoPrefix' => '',
'DoSpecial' => '',
'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.6
\ No newline at end of property
+1.1.2.7
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/units/stylesheets/stylesheets_event_handler.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/units/stylesheets/stylesheets_event_handler.php (revision 1421)
+++ branches/unlabeled/unlabeled-1.1.2/core/units/stylesheets/stylesheets_event_handler.php (revision 1422)
@@ -1,62 +1,66 @@
<?php
class StylesheetsEventHandler extends InpDBEventHandler
{
/**
* Compile stylesheet file based on theme definitions
*
* @param kEvent $event
*/
function OnCompileStylesheet(&$event)
{
$this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
$object =& $event->getObject();
+ $object->SwitchToLive();
- $ids = explode(',', $this->Application->RecallVar($event->getPrefixSpecial().'_selected_ids') );
+ $ids = explode(',', $event->MasterEvent->getEventParam('ids') );
- $ret = '/* This file is generated automatically. Don\'t edit it manually ! */'."\n\n";
if($ids)
{
- $selector_item =& $this->Application->recallObject('selectors.item', 'selectors');
+ $this->Application->setUnitOption('selectors','AutoLoad',false);
+ $selector_item =& $this->Application->recallObject('selectors.item', 'selectors', Array('live_table'=>true) );
$parent_field = $this->Application->getUnitOption($selector_item->Prefix,'ForeignKey');
- $sql = 'SELECT '.$selector_item->IDField.' FROM '.$selector_item->TableName.' WHERE '.$parent_field.' = '.$id;
- $selectors_ids = $this->Conn->GetCol($sql);
+ $sql_template = 'SELECT '.$selector_item->IDField.' FROM '.$selector_item->TableName.' WHERE '.$parent_field.' = %s';
foreach($ids as $id)
{
$object->Load($id);
+ $selectors_ids = $this->Conn->GetCol( sprintf($sql_template,$id) );
+ $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 .= $object->GetDBField('AdvancedCSS');
+
$compile_ts = time();
- $css_path = DOC_ROOT.BASE_PATH.'/themes/';
+ $css_path = DOC_ROOT.BASE_PATH.'/kernel/stylesheets/';
- $css_file = $css_path.$compile_ts.'-'.strtolower($object->GetDBField('Name')).'.css';
+ $css_file = $css_path.strtolower($object->GetDBField('Name')).'-'.$compile_ts.'.css';
$fp = fopen($css_file,'w');
if($fp)
{
- $prev_css = $css_path.$object->GetDBField('LastCompiled').'-'.strtolower($object->GetDBField('Name')).'.css';
+ $prev_css = $css_path.strtolower($object->GetDBField('Name')).'-'.$object->GetDBField('LastCompiled').'.css';
if( file_exists($prev_css) ) unlink($prev_css);
fwrite($fp, $ret);
fclose($fp);
$object->SetDBField('LastCompiled_date', $compile_ts);
$object->SetDBField('LastCompiled_time', $compile_ts);
$object->Update();
}
}
}
}
}
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/units/stylesheets/stylesheets_event_handler.php
___________________________________________________________________
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
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 1421)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/stylesheets/stylesheets_edit_base.tpl (revision 1422)
@@ -1,96 +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') );
-
- //Relations related:
+
a_toolbar.AddButton( new ToolBarButton('new_base_style', '<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.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/admin_templates/stylesheets/stylesheets_edit_block.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/stylesheets/stylesheets_edit_block.tpl (revision 1421)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/stylesheets/stylesheets_edit_block.tpl (revision 1422)
@@ -1,96 +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"/>',
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.1
\ No newline at end of property
+1.1.2.2
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/stylesheets/base_style_edit.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/stylesheets/base_style_edit.tpl (revision 1421)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/stylesheets/base_style_edit.tpl (revision 1422)
@@ -1,90 +1,102 @@
<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_ParseBlock name="blue_bar" prefix="css" title_preset="base_style_edit" 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('selectors','<inp2:selectors_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel"/>', 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="in-commerce/stylesheets/style_editor" pass="all"/>',null,850,460,'OnOpenStyleEditor');
}
else
{
alert( RemoveTranslationLink('<inp2:m_phrase name="la_RequiredWarning"/>') );
}
}
</script>
</td>
</tr>
</tbody>
</table>
<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>
- <inp2:selectors_PrintStyle field="SelectorData"/>
+ <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.1.2/core/admin_templates/stylesheets/base_style_edit.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/block_style_edit.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/stylesheets/block_style_edit.tpl (revision 1421)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/stylesheets/block_style_edit.tpl (revision 1422)
@@ -1,93 +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_ParseBlock name="blue_bar" prefix="css" title_preset="block_style_edit" 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('selectors','<inp2:selectors_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel"/>', 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="in-commerce/stylesheets/style_editor" pass="all"/>',null,850,460,'OnOpenStyleEditor');
}
else
{
alert( RemoveTranslationLink('<inp2:m_phrase name="la_RequiredWarning"/>') );
}
}
</script>
</td>
</tr>
</tbody>
</table>
<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>
- <inp2:selectors_PrintStyle field="SelectorData"/>
+ <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.1.2/core/admin_templates/stylesheets/block_style_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.1
\ No newline at end of property
+1.1.2.2
\ No newline at end of property

Event Timeline