Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Sun, Feb 2, 4:05 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 1483)
+++ branches/unlabeled/unlabeled-1.1.2/core/units/selectors/selectors_tag_processor.php (revision 1484)
@@ -1,62 +1,54 @@
<?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)
- {
- $separator = getArrayValue($params,'inline') ? ' ' : '<br>';
- foreach($style_data as $property_name => $property_value)
- {
- $ret .= $property_name.': '.$property_value.';'.$separator;
- }
- }
+ $ret = $object->CompileStyleBody( getArrayValue($params,'inline') ? STYLE_INLINE : STYLE_PREVIEW );
+
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.5
\ No newline at end of property
+1.1.2.6
\ 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 1483)
+++ branches/unlabeled/unlabeled-1.1.2/core/units/selectors/selectors_item.php (revision 1484)
@@ -1,29 +1,38 @@
<?php
+ define('STYLE_INLINE', ' ');
+ define('STYLE_FILE', "\n");
+ define('STYLE_PREVIEW', '<br>');
+
class SelectorsItem extends kDBItem
{
/**
* Returns compiled selector for inserting into css file
*
* @return string
*/
- function CompileStyle()
+ function CompileStyle($separator = STYLE_FILE)
+ {
+ $ret = $this->GetDBField('SelectorName')." {\n";
+ $ret .= $this->CompileStyleBody($separator);
+ $ret .= $separator."}\n";
+ return $ret;
+ }
+
+ function CompileStyleBody($separator)
{
- $selector_data = $this->GetDBField('SelectorData');
$ret = '';
+ $selector_data = $this->GetDBField('SelectorData');
+ if(!$selector_data) return $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 .= "\t$property_name: $property_value;".$separator;
}
- $ret .= $this->GetDBField('AdvancedCSS')."\n";
- $ret .= "}\n";
-
-
+ $ret .= $this->GetDBField('AdvancedCSS');
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.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_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/units/selectors/selectors_config.php (revision 1483)
+++ branches/unlabeled/unlabeled-1.1.2/core/units/selectors/selectors_config.php (revision 1484)
@@ -1,123 +1,127 @@
<?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'),
'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( ),
+ 'VirtualFields' => Array(
+ 'FontStyle' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array('inherit'=>'inherit','normal'=>'normal','italic'=>'italic','oblique'=>'oblique') ),
+
+
+ ),
'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.8
\ No newline at end of property
+1.1.2.9
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/colorselector.js
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/colorselector.js (revision 1483)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/colorselector.js (revision 1484)
@@ -1,85 +1,86 @@
// color Selector
var aColors = '000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF';
- function kColorSelector($field)
+ function kColorSelector()
{
- this.Field = $field;
-
var $selector = document.getElementById('colorSelector_div');
+
this.updateColor = updateColor;
this.colorMouseOver = colorMouseOver;
this.colorMouseOut = colorMouseOut;
this.colorClick = colorClick;
if( !isset($selector) )
{
- var $s_table = document.createElement('TABLE');
- $s_table.id = 'colorSelector';
- $selector.appendChild($s_table);
-
var $selector = document.createElement('DIV');
$selector.id = 'colorSelector_div';
$selector.className = 'table_color1';
$selector.style.width = '178px';
$selector.style.borderWidth = '1px';
$selector.style.borderColor = '#000000';
$selector.style.display = 'none';
$selector.style.position = 'absolute';
$selector.style.borderStyle = 'solid';
document.appendChild($selector);
+ alert('1');
+ var $s_table = document.createElement('TABLE');
+ $s_table.id = 'colorSelector';
+ $selector.appendChild($s_table);
+ alert('2');
var oTable = document.getElementById('colorSelector');
var iCounter = 0;
aColors = aColors.split(',');
-
+ alert('3');
while(iCounter < aColors.length)
{
+ alert('aa');
var oRow = oTable.insertRow(-1);
for(var i = 0; i < 8 && iCounter < aColors.length; i++, iCounter++)
{
var $cell = document.createElement('TD');
$cell.innerHTML = '<div class="ColorBox" style="background-color: #'+aColors[iCounter]+'"></div>';
$cell.onmouseover = this.colorMouseOver;
$cell.onmouseout = this.colorMouseOut;
$cell.onclick = this.colorClick;
$cell.setAttribute('ColorIndex', iCounter);
var oDiv=oRow.insertCell(-1).appendChild($cell);
};
}
}
}
function updateColor($event,$color_preview)
{
alert('e: '+$event+'; cp: '+$color_preview);
document.getElementById('color_'+$color_preview).style.backgroundColor = document.getElementById($color_preview).value;
}
function colorMouseOver($e)
{
if(!$e) $e = window.event;
//print_pre(this);
this.parentNode.style.backgroundColor = '#C8D3E2';
this.parentNode.style.borderColor = '#7196CC';
}
function colorMouseOut($e)
{
if(!$e) $e = window.event;
this.parentNode.style.backgroundColor = '#F6F6F6';
this.parentNode.style.borderColor = '#F6F6F6';
}
function colorClick($e)
{
if(!$e) $e = window.event;
var $color = aColors[ this.getAttribute('ColorIndex') ];
document.getElementById('color_'+$input_name).style.backgroundColor = $color;
document.getElementById($input_name).value = '#' + $color;
document.getElementById('colorSelector_div').style.display = 'none';
colorMouseOut($e);
}
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/colorselector.js
___________________________________________________________________
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/style_editor.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/stylesheets/style_editor.tpl (revision 1483)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/stylesheets/style_editor.tpl (revision 1484)
@@ -1,175 +1,190 @@
<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="blue_bar" prefix="css" title_preset="style_edit" module="in-commerce" icon="icon46_style"/>
<script src="incs/colorselector.js" type="text/javascript" language="javascript"></script>
<style type="text/css">
.ColorBox
{
font-size: 1px;
border: #808080 1px solid;
width: 10px;
position: static;
height: 10px;
}
</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','OnSaveStyle');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel"/>', function() {
window.close();
}
) );
a_toolbar.Render();
function openColorSelector($e, $field)
{
+ alert('onpen colorselector called');
+
var $div = document.getElementById('colorSelector_div');
var posx = 0;
var posy = 0;
if (!$e) var $e = window.event;
if ($e.pageX || $e.pageY)
{
posx = $e.pageX;
posy = $e.pageY;
}
else if ($e.clientX || $e.clientY)
{
posx = $e.clientX + document.body.scrollLeft;
posy = $e.clientY + document.body.scrollTop;
}
$div.style.left = posx;
$div.style.top = posy;
$div.style.display = 'block';
}
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_block name="inp_edit_color"/>
- <script language="javascript">
- $cs = new kColorSelector('<inp2:$prefix_InputName field="$field" subfield="$subfield"/>');
- </script>
<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
<inp2:m_ParseBlock name="inp_edit_field_caption" prefix="$prefix" field="$field" title_phrase="$title_phrase" title="$title" is_last="$is_last"/>
<td>
<input type="text"
name="<inp2:$prefix_InputName field="$field" subfield="$subfield"/>"
id="<inp2:$prefix_InputName field="$field" subfield="$subfield"/>"
value="<inp2:$prefix_Field field="$field" subfield="$subfield"/>"
tabindex="<inp2:m_get param="tab_index"/>"
size="<inp2:m_param name="size"/>"
maxlength="<inp2:m_param name="maxlength"/>"
class="<inp2:m_param name="class"/>"
- onkeypress="$cs.updateColor(event,'color_<inp2:$prefix_InputName field="$field" subfield="$subfield"/>')"
+ onkeyup="updateColor(event,'<inp2:$prefix_InputName field="$field" subfield="$subfield"/>')"
onblur="<inp2:m_Param name="onblur"/>">
<div id="color_<inp2:$prefix_InputName field="$field" subfield="$subfield"/>" style="display: inline; border: 1px solid #000000;" onclick="openColorSelector(event,'<inp2:$prefix_InputName field="$field" subfield="$subfield"/>');">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
+ <script language="javascript">
+ updateColor(event,'<inp2:$prefix_InputName field="$field" subfield="$subfield"/>');
+ </script>
+ </td>
+ <td class="error"><inp2:$prefix_Error field="$field"/>&nbsp;</td>
+ </tr>
+<inp2:m_blockend/>
+
+<inp2:m_block name="inp_edit_options_style"/>
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <inp2:m_ParseBlock name="inp_edit_field_caption" prefix="$prefix" field="$field" title_phrase="$title_phrase" title="$title" is_last="$is_last"/>
+ <td>
+ <select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:$prefix_InputName field="$field"/>" id="<inp2:$prefix_InputName field="$field"/>" onchange="<inp2:m_Param name="onchange"/>">
+ <inp2:$prefix_PredefinedOptions field="$value_field" block="inp_option_item" selected="selected"/>
+ </select>
</td>
<td class="error"><inp2:$prefix_Error field="$field"/>&nbsp;</td>
</tr>
<inp2:m_blockend/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<inp2:m_ParseBlock name="subsection" title="!la_FontAttributes!"/>
<inp2:m_ParseBlock name="inp_edit_color" prefix="selectors" field="SelectorData" subfield="color" title="!la_fld_FontColor!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="font-size" title="!la_fld_FontSize!"/>
- <inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="font-style" title="!la_fld_FontStyle!"/>
+ <inp2:m_ParseBlock name="inp_edit_options_style" prefix="selectors" field="SelectorData" subfield="font-style" value_field="FontStyle" title="!la_fld_FontStyle!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="font-weight" title="!la_fld_FontWeight!"/>
<inp2:m_ParseBlock name="subsection" title="!la_BackgroundAndBorders!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="background-color" title="!la_fld_BackgroundColor!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="border" title="!la_fld_Border!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="padding" title="!la_fld_Padding!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="margin" title="!la_fld_Margins!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="margin-top" title="!la_fld_MarginTop!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="margin-right" title="!la_fld_MarginRight!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="margin-bottom" title="!la_fld_MarginBottom!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="margin-left" title="!la_fld_MarginLeft!"/>
</table>
<script language="javascript" type="text/javascript">
+ $cs = new kColorSelector();
+
var $input_name = '<inp2:selectors_InputName field="SelectorData" subfield="color"/>';
var oTable = document.getElementById('colorSelector');
var iCounter = 0;
var aColors = '000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF';
aColors = aColors.split(',');
- function updateColor($event,$color_preview)
+ function updateColor($event,$color_id)
{
- alert('e: '+$event+'; cp: '+$color_preview);
- document.getElementById('color_'+$color_preview).style.backgroundColor = document.getElementById($color_preview).value;
+ document.getElementById('color_'+$color_id).style.backgroundColor = document.getElementById($color_id).value;
}
function colorMouseOver($e)
{
if(!$e) $e = window.event;
//print_pre(this);
this.parentNode.style.backgroundColor = '#C8D3E2';
this.parentNode.style.borderColor = '#7196CC';
}
function colorMouseOut($e)
{
if(!$e) $e = window.event;
this.parentNode.style.backgroundColor = '#F6F6F6';
this.parentNode.style.borderColor = '#F6F6F6';
}
function colorClick($e)
{
if(!$e) $e = window.event;
var $color = aColors[ this.getAttribute('ColorIndex') ];
document.getElementById('color_'+$input_name).style.backgroundColor = $color;
document.getElementById($input_name).value = '#' + $color;
document.getElementById('colorSelector_div').style.display = 'none';
colorMouseOut($e);
}
while(iCounter < aColors.length)
{
var oRow=oTable.insertRow(-1);
for(var i=0; i<8 && iCounter < aColors.length; i++,iCounter++)
{
var $cell = document.createElement('TD');
$cell.innerHTML = '<div class="ColorBox" style="background-color: #'+aColors[iCounter]+'"></div>';
$cell.onmouseover = colorMouseOver;
$cell.onmouseout = colorMouseOut;
$cell.onclick = colorClick;
$cell.setAttribute('ColorIndex', iCounter);
var oDiv=oRow.insertCell(-1).appendChild($cell);
};
}
</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/style_editor.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/block_style_edit.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/stylesheets/block_style_edit.tpl (revision 1483)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/stylesheets/block_style_edit.tpl (revision 1484)
@@ -1,105 +1,111 @@
<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>
<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>
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <inp2:m_inc param="tab_index" by="1"/>
+ <td colspan="3">
+ <input type="button" class="button" onclick="submit_event('selectors','OnResetToBase');" value="<inp2:m_phrase name="la_reset_to_base"/>">
+ </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.2
\ No newline at end of property
+1.1.2.3
\ No newline at end of property

Event Timeline