Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Sun, Feb 2, 7:10 PM

in-portal

Index: trunk/kernel/units/help/help_config.php
===================================================================
--- trunk/kernel/units/help/help_config.php (revision 1661)
+++ trunk/kernel/units/help/help_config.php (revision 1662)
@@ -1,15 +1,16 @@
<?php
$config = Array(
'Prefix' => 'h',
- 'EventHandlerClass' => Array('class'=>'kEventHandler','file'=>'','build_event'=>'OnBuild'),
+ 'EventHandlerClass' => Array('class'=>'HelpEventHandler','file'=>'help_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'HelpTagProcessor','file'=>'help_tag_processor.php','build_event'=>'OnBuild'),
'QueryString' => Array(
1 => 'prefix',
2 => 'icon',
3 => 'module',
4 => 'title_preset',
+ 5 => 'event',
),
);
?>
\ No newline at end of file
Property changes on: trunk/kernel/units/help/help_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.3
\ No newline at end of property
Index: trunk/kernel/units/help/help_tag_processor.php
===================================================================
--- trunk/kernel/units/help/help_tag_processor.php (revision 1661)
+++ trunk/kernel/units/help/help_tag_processor.php (revision 1662)
@@ -1,62 +1,80 @@
<?php
class HelpTagProcessor extends kDBTagProcessor
{
function SectionTitle($params)
{
$rets = explode('.', $this->Application->GetVar('h_prefix') );
$this->Prefix = $rets[0];
$this->Special = isset($rets[1]) ? $rets[1] : '';
//$this->Prefix = $this->Application->GetVar('h_prefix');
$title_preset_name = $this->Application->GetVar('h_title_preset');
$title_presets = $this->Application->getUnitOption($this->Prefix,'TitlePresets');
$format = $title_presets[$title_preset_name]['format'];
$format = preg_replace('/[ ]*( ([\'"]{1}) | ([\(]{1}) ) \#.*\# (?(2) \1 | \) )[ ]*/Ux', ' ', $format);
$title_presets[$title_preset_name]['format'] = $format;
$this->Application->setUnitOption($this->Prefix,'TitlePresets',$title_presets);
$params['title_preset'] = $title_preset_name;
$ret = parent::SectionTitle($params);
return $ret;
}
function ShowHelp($params)
{
$module = $this->Application->GetVar('h_module');
$title_preset = $this->Application->GetVar('h_title_preset');
$sql = 'SELECT Path FROM '.TABLE_PREFIX.'Modules WHERE LOWER(Name)='.$this->Conn->qstr( strtolower($module) );
$module_path = $this->Conn->GetOne($sql);
$help_file = FULL_PATH.'/'.$module_path.'module_help/'.$title_preset.'.txt';
if( $this->Application->isDebugMode() && dbg_ConstOn('DBG_EDIT_HELP') )
{
global $debugger;
$ret = 'Help file: <b>'.$debugger->getLocalFile($help_file).'</b><hr>';
}
else
{
$ret = '';
}
- if( file_exists($help_file) )
+ $help_data = file_exists($help_file) ? file_get_contents($help_file) : false;
+
+ if( $this->Application->isDebugMode() && dbg_ConstOn('DBG_HELP') )
{
- $ret .= file_get_contents($help_file);
+ $this->Application->Factory->includeClassFile('FCKeditor');
+ $oFCKeditor = new FCKeditor('HelpContent');
+
+ $oFCKeditor->BasePath = $this->Application->BaseURL('/'.ADMIN_DIR.'/editor/cmseditor');
+ $oFCKeditor->Width = '100%';
+ $oFCKeditor->Height = '300';
+ $oFCKeditor->ToolbarSet = 'Advanced';
+ $oFCKeditor->Value = $help_data;
+
+ $oFCKeditor->Config = Array(
+ 'UserFilesPath' => DOC_ROOT.BASE_PATH.'kernel/user_files',
+ 'ProjectPath' => $this->Application->ConfigValue('Site_Path'),
+ 'CustomConfigurationsPath' => rtrim( $this->Application->BaseURL('/'.ADMIN_DIR.'/editor/inp_fckconfig.js'), '/'),
+ );
+
+ $ret .= $oFCKeditor->CreateHtml();
}
else
{
- $ret .= $this->Application->Phrase('la_section_help_file_missing');
+ $ret .= $help_data ? $help_data : $this->Application->Phrase('la_section_help_file_missing');
}
+
return $ret;
}
}
?>
\ No newline at end of file
Property changes on: trunk/kernel/units/help/help_tag_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.3
\ No newline at end of property
Index: trunk/kernel/units/help/help_event_handler.php
===================================================================
--- trunk/kernel/units/help/help_event_handler.php (nonexistent)
+++ trunk/kernel/units/help/help_event_handler.php (revision 1662)
@@ -0,0 +1,30 @@
+<?php
+
+ class HelpEventHandler extends InpDBEventHandler
+ {
+
+ /**
+ * Saves help file or created new one
+ *
+ * @param kEvent $event
+ */
+ function OnSaveHelp(&$event)
+ {
+ $new_content = $this->Application->GetVar('HelpContent');
+
+ $module = $this->Application->GetVar('h_module');
+ $title_preset = $this->Application->GetVar('h_title_preset');
+
+ $sql = 'SELECT Path FROM '.TABLE_PREFIX.'Modules WHERE LOWER(Name)='.$this->Conn->qstr( strtolower($module) );
+ $module_path = $this->Conn->GetOne($sql);
+
+ $help_file = FULL_PATH.'/'.$module_path.'module_help/'.$title_preset.'.txt';
+ $help_data = $this->Application->GetVar('HelpContent');
+
+ $fp = fopen($help_file,'w');
+ fwrite($fp,$help_data);
+ fclose($fp);
+ }
+ }
+
+?>
\ No newline at end of file
Property changes on: trunk/kernel/units/help/help_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/kernel/units/general/my_application.php
===================================================================
--- trunk/kernel/units/general/my_application.php (revision 1661)
+++ trunk/kernel/units/general/my_application.php (revision 1662)
@@ -1,55 +1,46 @@
<?php
k4_include_once(MODULES_PATH.'/kernel/units/general/inp_db_event_handler.php');
class MyApplication extends kApplication {
function RegisterDefaultClasses()
{
parent::RegisterDefaultClasses();
$this->registerClass('Inp1Parser',MODULES_PATH.'/kernel/units/general/inp1_parser.php','Inp1Parser');
$this->registerClass('InpSession',MODULES_PATH.'/kernel/units/general/inp_ses_storage.php','Session');
$this->registerClass('InpSessionStorage',MODULES_PATH.'/kernel/units/general/inp_ses_storage.php','SessionStorage');
$this->registerClass('kCatDBItem',MODULES_PATH.'/kernel/units/general/cat_dbitem.php');
$this->registerClass('kCatDBList',MODULES_PATH.'/kernel/units/general/cat_dblist.php');
$this->registerClass('kCatDBEventHandler',MODULES_PATH.'/kernel/units/general/cat_event_handler.php');
$this->registerClass('InpLoginEventHandler',MODULES_PATH.'/kernel/units/general/inp_login_event_handler.php','login_EventHandler');
$this->registerClass('InpDBEventHandler',MODULES_PATH.'/kernel/units/general/inp_db_event_handler.php','kDBEventHandler');
$this->registerClass('InpTempTablesHandler',MODULES_PATH.'/kernel/units/general/inp_temp_handler.php','kTempTablesHandler');
$this->registerClass('InpUnitConfigReader',MODULES_PATH.'/kernel/units/general/inp_unit_config_reader.php','kUnitConfigReader');
$this->registerClass('InpCustomFieldsHelper',MODULES_PATH.'/kernel/units/general/custom_fields.php','InpCustomFieldsHelper');
$this->registerClass('kCountryStatesHelper',MODULES_PATH.'/kernel/units/general/country_states.php','CountryStatesHelper');
}
/**
* Checks if user is logged in, and creates
* user object if so. User object can be recalled
* later using "u" prefix. Also you may
* get user id by getting "u_id" variable.
*
* @access private
*/
function ValidateLogin()
{
$session =& $this->recallObject('Session');
$user_id = $session->GetField('PortalUserId');
if (!$user_id) $user_id = -2;
$this->SetVar('u_id', $user_id);
$this->StoreVar('user_id', $user_id);
}
-
- function Init()
- {
- parent::Init();
-
- $admin_dir = $this->ConfigValue('AdminDirectory');
- if(!$admin_dir) $admin_dir = 'admin';
- define('ADMIN_DIR', $admin_dir);
- }
}
?>
\ No newline at end of file
Property changes on: trunk/kernel/units/general/my_application.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.6
\ No newline at end of property
+1.7
\ No newline at end of property
Index: trunk/kernel/admin_templates/regional/languages_list.tpl
===================================================================
--- trunk/kernel/admin_templates/regional/languages_list.tpl (revision 1661)
+++ trunk/kernel/admin_templates/regional/languages_list.tpl (revision 1662)
@@ -1,64 +1,64 @@
<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_conf_regional" title="!la_title_Regional!"/>
-<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="languages_list" module="in-commerce" icon="icon46_conf_regional"/>
+<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="languages_list" module="in-portal" icon="icon46_conf_regional"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
std_edit_item('lang', 'regional/languages_edit');
}
var a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('new_language', '<inp2:m_phrase label="la_ToolTip_NewLanguage"/>',
function() {
std_precreate_item('lang', 'regional/languages_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('lang')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('import_language', '<inp2:m_phrase label="la_ToolTip_ImportLanguage"/>', function() {
redirect('<inp2:m_t t="regional/languages_import" phrases.import_event="OnNew" m_opener="d" pass="all,m,phrases.import" />');
}
) );
a_toolbar.AddButton( new ToolBarButton('export_language', '<inp2:m_phrase label="la_ToolTip_ExportLanguage"/>', function() {
submit_event('lang','OnExportLanguage');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_ParseBlock name="grid" PrefixSpecial="lang" IdField="LanguageId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" search="on" has_filters="has_filters"/>
<script type="text/javascript">
Grids['lang'].SetDependantToolbarButtons( new Array('edit','delete','export_language') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: trunk/kernel/admin_templates/regional/languages_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.4
\ No newline at end of property
Index: trunk/kernel/admin_templates/regional/email_messages_edit.tpl
===================================================================
--- trunk/kernel/admin_templates/regional/email_messages_edit.tpl (revision 1661)
+++ trunk/kernel/admin_templates/regional/email_messages_edit.tpl (revision 1662)
@@ -1,48 +1,48 @@
<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_conf_regional" title="!la_title_Regional!"/>
-<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="email_messages_edit" module="in-commerce" icon="icon46_conf_regional"/>
+<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="email_messages_edit" module="in-portal" icon="icon46_conf_regional"/>
<!-- 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('emailmessages','<inp2:m_if prefix="emailmessages" function="PropertyEquals" property="ID" value="0"/>OnCreate<inp2:m_else/>OnUpdate<inp2:m_endif/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel"/>', function() {
submit_event('emailmessages','OnCancel');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:lang_SaveWarning name="grid_save_warning"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
<inp2:m_ParseBlock name="inp_edit_hidden" prefix="emailmessages" field="LanguageId"/>
<inp2:m_ParseBlock name="inp_edit_hidden" prefix="emailmessages" field="EventId"/>
<!--<inp2:m_ParseBlock name="inp_label" prefix="emailmessages" field="Type" title="!la_fld_EventType!"/>-->
<inp2:m_ParseBlock name="inp_edit_box" prefix="emailmessages" field="Subject" title="!la_fld_Subject!" size="60"/>
<inp2:m_ParseBlock name="inp_edit_radio" prefix="emailmessages" field="MessageType" title="!la_fld_MessageType!"/>
<inp2:m_ParseBlock name="inp_edit_textarea" prefix="emailmessages" field="Headers" title="!la_fld_ExtraHeaders!" rows="5" cols="60"/>
<inp2:m_ParseBlock name="subsection" title="!la_section_Message!"/>
<inp2:m_ParseBlock name="inp_edit_textarea" prefix="emailmessages" field="Body" title="!la_fld_MessageBody!" rows="20" cols="85"/>
</table>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: trunk/kernel/admin_templates/regional/email_messages_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.3
\ No newline at end of property
Index: trunk/kernel/admin_templates/regional/languages_export_step2.tpl
===================================================================
--- trunk/kernel/admin_templates/regional/languages_export_step2.tpl (revision 1661)
+++ trunk/kernel/admin_templates/regional/languages_export_step2.tpl (revision 1662)
@@ -1,34 +1,34 @@
<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_conf_regional" title="!la_title_ImportLanguagePack!"/>
-<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="export_language_results" module="in-commerce" icon="icon46_conf_regional"/>
+<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="export_language_results" module="in-portal" icon="icon46_conf_regional"/>
<!-- ToolBar --->
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
<td>
<inp2:m_phrase label="la_DownloadLanguageExport"/>
<td>
<a href="<inp2:lang_ExportPath as_url="1"/><inp2:m_get name="export_file"/>"><inp2:lang_ExportPath/><inp2:m_get name="export_file"/></a>
</td>
<td class="error">&nbsp;</td>
</tr>
<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
<td colspan="3" align="left">
<a href="javascript:submit_event('lang','OnGoBack');"><inp2:m_phrase label="la_Continue"/></a>
</td>
</tr>
</table>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: trunk/kernel/admin_templates/regional/languages_export_step2.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.3
\ No newline at end of property
Index: trunk/kernel/admin_templates/regional/languages_edit_email_events.tpl
===================================================================
--- trunk/kernel/admin_templates/regional/languages_edit_email_events.tpl (revision 1661)
+++ trunk/kernel/admin_templates/regional/languages_edit_email_events.tpl (revision 1662)
@@ -1,80 +1,80 @@
<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_conf_regional" title="!la_title_RegionalSettings!"/>
<inp2:m_include t="regional/languages_edit_tabs"/>
-<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="events_list" module="in-commerce" icon="icon46_conf_regional"/>
+<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="events_list" module="in-portal" icon="icon46_conf_regional"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
function edit()
{
std_edit_temp_item('phrases', 'regional/email_messages_edit');
}
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save"/>', function() {
submit_event('lang','<inp2:lang_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel"/>', function() {
submit_event('lang','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev"/>', function() {
go_to_id('lang', '<inp2:lang_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next"/>', function() {
go_to_id('lang', '<inp2:lang_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit"/>', edit) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
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="lang" function="IsSingle"/>
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if prefix="lang" function="IsLast"/>
a_toolbar.DisableButton('next');
<inp2:m_endif/>
<inp2:m_if prefix="lang" function="IsFirst"/>
a_toolbar.DisableButton('prev');
<inp2:m_endif/>
<inp2:m_endif/>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_ParseBlock name="grid" PrefixSpecial="emailevents" IdField="EventId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" search="on" has_filters="has_filters" main_prefix="lang"/>
<script type="text/javascript">
Grids['emailevents'].SetDependantToolbarButtons( new Array('edit') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: trunk/kernel/admin_templates/regional/languages_edit_email_events.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.4
\ No newline at end of property
Index: trunk/kernel/admin_templates/regional/languages_export.tpl
===================================================================
--- trunk/kernel/admin_templates/regional/languages_export.tpl (revision 1661)
+++ trunk/kernel/admin_templates/regional/languages_export.tpl (revision 1662)
@@ -1,57 +1,57 @@
<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_conf_regional" title="!la_title_ImportLanguagePack!"/>
-<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="export_language" module="in-commerce" icon="icon46_conf_regional"/>
+<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="export_language" module="in-portal" icon="icon46_conf_regional"/>
<!-- 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('lang','OnExportProgress');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel"/>', function() {
submit_event('lang', 'OnGoBack');
}
) );
a_toolbar.Render();
</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!"/>
<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
<inp2:m_ParseBlock name="inp_edit_field_caption" prefix="phrases.export" field="LangFile" title="la_fld_ExportFileName"/>
<td>
<inp2:lang_ExportPath/> <input type="text" name="<inp2:phrases.export_InputName field="LangFile"/>" id="<inp2:phrases.export_InputName field="LangFile"/>" value="<inp2:phrases.export_Field field="LangFile"/>" />
</td>
<td class="error"><inp2:phrases.export_Error field="LangFile"/>&nbsp;</td>
</tr>
<inp2:m_block name="inp_checkbox_item"/>
<input type="checkbox" checked name="<inp2:$prefix_InputName field="$field"/>[]" id="<inp2:$prefix_InputName field="$field"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>"><label for="<inp2:$prefix_InputName field="$field"/>_<inp2:m_param name="key"/>"><inp2:m_param name="option"/></label>&nbsp;
<inp2:m_blockend/>
<inp2:m_block name="inp_checkbox_phrase"/>
<input type="checkbox" checked name="<inp2:$prefix_InputName field="$field"/>[]" id="<inp2:$prefix_InputName field="$field"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>"><label for="<inp2:$prefix_InputName field="$field"/>_<inp2:m_param name="key"/>"><inp2:m_phrase label="$option"/></label>&nbsp;
<inp2:m_blockend/>
<inp2:m_ParseBlock name="inp_edit_checkboxes" use_phrases="1" prefix="phrases.export" field="PhraseType" title="!la_fld_ExportPhraseTypes!"/>
<inp2:m_ParseBlock name="inp_edit_checkboxes" no_empty="no_empty" prefix="phrases.export" field="Module" title="!la_fld_ExportModules!"/>
</table>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: trunk/kernel/admin_templates/regional/languages_export.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.3
\ No newline at end of property
Index: trunk/kernel/admin_templates/regional/phrases_edit.tpl
===================================================================
--- trunk/kernel/admin_templates/regional/phrases_edit.tpl (revision 1661)
+++ trunk/kernel/admin_templates/regional/phrases_edit.tpl (revision 1662)
@@ -1,71 +1,71 @@
<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_conf_regional" title="!la_title_RegionalSettings!"/>
-<inp2:m_ParseBlock name="blue_bar" prefix="phrases" title_preset="phrase_edit" module="in-commerce" icon="icon46_conf_regional"/>
+<inp2:m_ParseBlock name="blue_bar" prefix="phrases" title_preset="phrase_edit" module="in-portal" icon="icon46_conf_regional"/>
<!-- 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('phrases','<inp2:phrases_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel"/>', function() {
submit_event('phrases','OnCancel');
}
) );
// a_toolbar.AddButton( new ToolBarSeparator('sep1') );
//
// a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev"/>', function() {
// go_to_id('phrases', '<inp2:phrases_PrevId/>');
// }
// ) );
// a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next"/>', function() {
// go_to_id('phrases', '<inp2:phrases_NextId/>');
// }
// ) );
a_toolbar.Render();
// <inp2:m_if prefix="phrases" function="IsSingle"/>
// a_toolbar.HideButton('prev');
// a_toolbar.HideButton('next');
// a_toolbar.HideButton('sep1');
// <inp2:m_else/>
// <inp2:m_if prefix="phrases" function="IsLast"/>
// a_toolbar.DisableButton('next');
// <inp2:m_endif/>
// <inp2:m_if prefix="phrases" function="IsFirst"/>
// a_toolbar.DisableButton('prev');
// <inp2:m_endif/>
// <inp2:m_endif/>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:phrases_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!"/>
<input type="hidden" id="phrases_label" name="phrases_label" value="<inp2:m_get name="phrases_label"/>">
<inp2:m_ParseBlock name="inp_edit_hidden" prefix="phrases" field="LanguageId"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="phrases" field="Phrase" title="!la_fld_Phrase!" size="60"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="phrases" field="Translation" title="!la_fld_Translation!" size="60"/>
<inp2:m_ParseBlock name="inp_edit_radio" prefix="phrases" field="PhraseType" title="!la_fld_PhraseType!"/>
<inp2:m_ParseBlock name="inp_edit_options" prefix="phrases" field="Module" title="!la_fld_Module!"/>
</table>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: trunk/kernel/admin_templates/regional/phrases_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.3
\ No newline at end of property
Index: trunk/kernel/admin_templates/regional/languages_edit.tpl
===================================================================
--- trunk/kernel/admin_templates/regional/languages_edit.tpl (revision 1661)
+++ trunk/kernel/admin_templates/regional/languages_edit.tpl (revision 1662)
@@ -1,96 +1,96 @@
<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_conf_regional" title="!la_title_LanguagePacks!"/>
<inp2:m_include t="regional/languages_edit_tabs"/>
-<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="languages_edit_general" module="in-commerce" icon="icon46_conf_regional"/>
+<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="languages_edit_general" module="in-portal" icon="icon46_conf_regional"/>
<!-- 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('lang','<inp2:lang_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel"/>', function() {
submit_event('lang','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev"/>', function() {
go_to_id('lang', '<inp2:lang_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next"/>', function() {
go_to_id('lang', '<inp2:lang_NextId/>');
}
) );
a_toolbar.Render();
<inp2:m_if prefix="lang" function="IsSingle"/>
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if prefix="lang" function="IsLast"/>
a_toolbar.DisableButton('next');
<inp2:m_endif/>
<inp2:m_if prefix="lang" function="IsFirst"/>
a_toolbar.DisableButton('prev');
<inp2:m_endif/>
<inp2:m_endif/>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:lang_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="lang" field="LanguageId" title="!la_fld_LanguageId!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="lang" field="PackName" title="!la_fld_PackName!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="lang" field="LocalName" title="!la_fld_LocalName!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="lang" field="Charset" title="!la_fld_Charset!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="lang" field="IconURL" title="!la_fld_IconURL!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="lang" field="DateFormat" title="!la_fld_DateFormat!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="lang" field="TimeFormat" title="!la_fld_TimeFormat!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="lang" field="DecimalPoint" title="!la_fld_DecimalPoint!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="lang" field="ThousandSep" title="!la_fld_ThousandSep!"/>
<inp2:m_ParseBlock name="inp_edit_checkbox" prefix="lang" field="PrimaryLang" title="!la_fld_PrimaryLang!"/>
<inp2:m_ParseBlock name="inp_edit_checkbox" prefix="lang" field="Enabled" title="!la_fld_Enabled!"/>
<inp2:m_if prefix="lang" function="IsNew" inverse="inverse"/>
<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 name="la_fld_CopyLabels"/>:
</td>
<td>
<input type="hidden" id="<inp2:lang_InputName field="CopyLabels"/>" name="<inp2:lang_InputName field="CopyLabels"/>" value="<inp2:lang_Field field="CopyLabels" db="db"/>">
<input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_CopyLabels" name="_cb_CopyLabels" <inp2:lang_Field field="CopyLabels" checked="checked" db="db"/> class="<inp2:m_param name="field_class"/>" onclick="update_checkbox(this, document.getElementById('<inp2:lang_InputName field="CopyLabels"/>'))">
<inp2:m_inc param="tab_index" by="1"/>
<select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:lang_InputName field="CopyFromLanguage"/>" id="<inp2:lang_InputName field="CopyFromLanguage"/>">
<option value="0">--<inp2:m_phrase name="la_prompt_Select_Source"/></option>
<inp2:lang_PredefinedOptions field="CopyFromLanguage" block="inp_option_item" selected="selected"/>
</select>
</td>
<td class="error">&nbsp;</td>
</tr>
<inp2:m_endif/>
</table>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: trunk/kernel/admin_templates/regional/languages_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.4
\ No newline at end of property
Index: trunk/kernel/admin_templates/regional/languages_import_step2.tpl
===================================================================
--- trunk/kernel/admin_templates/regional/languages_import_step2.tpl (revision 1661)
+++ trunk/kernel/admin_templates/regional/languages_import_step2.tpl (revision 1662)
@@ -1,29 +1,29 @@
<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_conf_regional" title="!la_title_ImportLanguagePack!"/>
-<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="import_language_step2" module="in-commerce" icon="icon46_conf_regional"/>
+<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="import_language_step2" module="in-portal" icon="icon46_conf_regional"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<inp2:m_ParseBlock name="subsection" title="$title"/>
<tr>
<td align="middle">
<br />
<table class="tableborder_full" width="75%">
<tr border="1">
<td width="<inp2:m_param name="percent_done"/>%" class="progress_bar">&nbsp;</td>
<td bgcolor=#FFFFFF width="<inp2:m_param name="percent_left"/>%"></td>
</tr>
</table>
<br />
<input type="submit" class="button" value="<inp2:m_phrase label="la_Cancel"/>" name="events[lang][OnImportCancel]" />
</TD>
</TR>
</table>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: trunk/kernel/admin_templates/regional/languages_import_step2.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.3
\ No newline at end of property
Index: trunk/kernel/admin_templates/regional/languages_edit_phrases.tpl
===================================================================
--- trunk/kernel/admin_templates/regional/languages_edit_phrases.tpl (revision 1661)
+++ trunk/kernel/admin_templates/regional/languages_edit_phrases.tpl (revision 1662)
@@ -1,89 +1,89 @@
<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_conf_regional" title="!la_title_RegionalSettings!"/>
<inp2:m_include t="regional/languages_edit_tabs"/>
-<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="phrases_list" module="in-commerce" icon="icon46_conf_regional"/>
+<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="phrases_list" module="in-portal" icon="icon46_conf_regional"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
function edit()
{
std_edit_temp_item('phrases', 'regional/phrases_edit');
}
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save"/>', function() {
submit_event('lang','<inp2:lang_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel"/>', function() {
submit_event('lang','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev"/>', function() {
go_to_id('lang', '<inp2:lang_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next"/>', function() {
go_to_id('lang', '<inp2:lang_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('new_language_var', '<inp2:m_phrase label="la_ToolTip_NewLabel"/>',
function() {
std_new_item('phrases', 'regional/phrases_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('phrases')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
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="lang" function="IsSingle"/>
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if prefix="lang" function="IsLast"/>
a_toolbar.DisableButton('next');
<inp2:m_endif/>
<inp2:m_if prefix="lang" function="IsFirst"/>
a_toolbar.DisableButton('prev');
<inp2:m_endif/>
<inp2:m_endif/>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_ParseBlock name="grid" PrefixSpecial="phrases" IdField="PhraseId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" search="on" has_filters="has_filters"/>
<script type="text/javascript">
Grids['phrases'].SetDependantToolbarButtons( new Array('edit','delete') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: trunk/kernel/admin_templates/regional/languages_edit_phrases.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.4
\ No newline at end of property
Index: trunk/kernel/admin_templates/regional/languages_import.tpl
===================================================================
--- trunk/kernel/admin_templates/regional/languages_import.tpl (revision 1661)
+++ trunk/kernel/admin_templates/regional/languages_import.tpl (revision 1662)
@@ -1,53 +1,53 @@
<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_conf_regional" title="!la_title_ImportLanguagePack!"/>
-<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="import_language" module="in-commerce" icon="icon46_conf_regional"/>
+<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="import_language" module="in-portal" icon="icon46_conf_regional"/>
<!-- 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('lang','OnImportLanguage');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel"/>', function() {
submit_event('lang', 'OnGoBack');
}
) );
a_toolbar.Render();
</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_upload" prefix="phrases.import" field="LangFile" title="!la_fld_LanguageFile!"/>
<inp2:m_block name="inp_checkbox_item"/>
<input type="checkbox" checked name="<inp2:$prefix_InputName field="$field"/>[]" id="<inp2:$prefix_InputName field="$field"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>"><label for="<inp2:$prefix_InputName field="$field"/>_<inp2:m_param name="key"/>"><inp2:m_param name="option"/></label>&nbsp;
<inp2:m_blockend/>
<inp2:m_block name="inp_checkbox_phrase"/>
<input type="checkbox" checked name="<inp2:$prefix_InputName field="$field"/>[]" id="<inp2:$prefix_InputName field="$field"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>"><label for="<inp2:$prefix_InputName field="$field"/>_<inp2:m_param name="key"/>"><inp2:m_phrase label="$option"/></label>&nbsp;
<inp2:m_blockend/>
<inp2:m_ParseBlock name="inp_edit_checkboxes" use_phrases="1" prefix="phrases.import" field="PhraseType" title="!la_fld_InstallPhraseTypes!"/>
<inp2:m_ParseBlock name="inp_edit_checkbox" prefix="phrases.import" field="ImportOverwrite" hint_label="la_importlang_phrasewarning" title="la_prompt_overwritephrases"/>
<!--inp2:m_ParseBlock name="inp_edit_checkboxes" no_empty="no_empty" prefix="phrases.export" field="Module" title="!la_fld_InstallModules!"-->
</table>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: trunk/kernel/admin_templates/regional/languages_import.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.4
\ No newline at end of property
Index: trunk/kernel/admin_templates/help.tpl
===================================================================
--- trunk/kernel/admin_templates/help.tpl (revision 1661)
+++ trunk/kernel/admin_templates/help.tpl (revision 1662)
@@ -1,41 +1,62 @@
<inp2:m_set nobody="yes"/>
<inp2:m_include t="incs/header"/>
<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
<!-- section header: begin -->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr class="section_header_bg">
<td valign="top" class="admintitle" align="left">
<img width="46" height="46" src="img/icons/<inp2:m_get name="h_icon"/>.gif" align="absmiddle" title="<inp2:m_phrase name="la_Help"/>">&nbsp;<inp2:m_phrase name="la_Help"/><br>
<img src="img/spacer.gif" width="1" height="4"><br>
</td>
</tr>
</table>
<!-- section header: end -->
<!-- blue_bar: begin -->
<table border="0" cellpadding="2" cellspacing="0" class="tableborder_full" width="100%" height="30">
<tr>
<td class="header_left_bg" nowrap width="80%" valign="middle">
<span class="tablenav_link"><inp2:h_SectionTitle/></span>
</td>
<td align="right" class="tablenav" width="20%" valign="middle">
</td>
</tr>
</table>
<!-- blue_bar: end -->
-
+<inp2:m_if check="m_ConstOn" name="DBG_HELP">
<!-- 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('h','OnSaveHelp');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel"/>', function() {
+ window.close();
+ }
+ ) );
+ a_toolbar.Render();
+ </script>
+ </td>
+ </tr>
+</tbody>
+</table>
+</inp2:m_if>
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
<td class="help_box">
<inp2:h_ShowHelp/>
</td>
</tr>
</tbody>
</table>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: trunk/kernel/admin_templates/help.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.3
\ No newline at end of property
Index: trunk/kernel/admin_templates/incs/form_blocks.tpl
===================================================================
--- trunk/kernel/admin_templates/incs/form_blocks.tpl (revision 1661)
+++ trunk/kernel/admin_templates/incs/form_blocks.tpl (revision 1662)
@@ -1,235 +1,235 @@
<inp2:m_block name="section_header"/>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr class="section_header_bg">
<td valign="top" class="admintitle" align="left">
<img width="46" height="46" src="img/icons/<inp2:m_param name="icon"/>.gif" align="absmiddle" title="<inp2:m_phrase label="$title"/>">&nbsp;<inp2:m_phrase label="$title"/><br>
<img src="img/spacer.gif" width="1" height="4"><br>
</td>
</tr>
</table>
<inp2:m_blockend/>
<inp2:m_block name="blue_bar"/>
<table border="0" cellpadding="2" cellspacing="0" class="tableborder_full" width="100%" height="30">
<tr>
<td class="header_left_bg" nowrap width="80%" valign="middle">
<span class="tablenav_link" id="blue_bar"><inp2:$prefix_SectionTitle title_preset="$title_preset" title="Invalid OR Missing title preset" cut_first="100"/></span>
</td>
<td align="right" class="tablenav" width="20%" valign="middle">
<script>
- var $help_url='<inp2:m_t t="help" h_prefix="$prefix" h_icon="$icon" h_module="$module" h_title_preset="$title_preset" pass="all,m,h" escape="escape"/>';
+ var $help_url='<inp2:m_t t="help" h_prefix="$prefix" h_icon="$icon" h_module="$module" h_title_preset="$title_preset" pass="all,m,h" escape="escape" front="1" />';
set_window_title( document.getElementById('blue_bar').innerHTML );
</script>
<a href="javascript: OpenHelp($help_url);">
<img src="img/blue_bar_help.gif" border="0">
</a>
</td>
</tr>
</table>
<inp2:m_blockend/>
<inp2:m_block name="subsection"/>
<tr class="subsectiontitle">
<td colspan="5"><inp2:m_phrase label="$title"/></td>
</tr>
<inp2:m_blockend/>
<inp2:m_block name="inp_edit_field_caption"/>
<inp2:m_inc param="tab_index" by="1"/>
<td class="text">
<label for="<inp2:m_param name="NamePrefix"/><inp2:$prefix_InputName field="$field" subfield="$subfield"/>">
<span class="<inp2:m_if prefix="$prefix" function="HasError" field="$field"/>error<inp2:m_endif/>">
<inp2:m_phrase label="$title"/></span><inp2:m_if prefix="$prefix" function="IsRequired" field="$field"/><span class="error"> *</span><inp2:m_endif/>:
</label>
</td>
<inp2:m_blockend/>
<inp2:m_block name="inp_label"/>
<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
<inp2:m_ParseBlock name="inp_edit_field_caption" prefix="$prefix" field_name="$field_name" title_phrase="$title_phrase" title="$title" is_last="$is_last"/>
<td valign="top"><span class="text"><inp2:$prefix_Field field="$field"/></span></td>
<td class="error"><inp2:$prefix_Error field="$field"/>&nbsp;</td>
</tr>
<inp2:m_blockend/>
<inp2:m_block name="inp_id_label"/>
<inp2:m_if prefix="$prefix" function="FieldEquals" field="$field" value="" inverse="inverse"/>
<inp2:m_ParseBlock name="inp_label" pass_params="true"/>
<inp2:m_endif/>
<inp2:m_blockend/>
<inp2:m_block name="inp_edit_box"/>
<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
<inp2:m_ParseBlock name="inp_edit_field_caption" prefix="$prefix" field="$field" subfield="$subfield" 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"/>" onblur="<inp2:m_Param name="onblur"/>">
</td>
<td class="error"><inp2:$prefix_Error field="$field"/>&nbsp;</td>
</tr>
<inp2:m_blockend/>
<inp2:m_block name="inp_edit_upload"/>
<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="file" name="<inp2:$prefix_InputName field="$field"/>" id="<inp2:$prefix_InputName field="$field"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" class="<inp2:m_param name="class"/>">
</td>
<td class="error"><inp2:$prefix_Error field="$field"/>&nbsp;</td>
</tr>
<inp2:m_blockend/>
<inp2:m_block name="inp_edit_box_ml"/>
<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
<td class="text" valign="top">
<span class="<inp2:m_if prefix="$prefix" function="HasError" field="$field"/>error<inp2:m_endif/>">
<inp2:m_phrase label="$title"/><inp2:m_if prefix="$prefix" function="IsRequired" field="$field"/><span class="error"> *</span><inp2:m_endif/>:</span><br>
<a href="javascript:PreSaveAndOpenTranslator('<inp2:m_param name="prefix"/>', '<inp2:m_param name="field"/>', 'popups/translator');" title="<inp2:m_Phrase label="la_Translate"/>"><img src="img/icons/icon24_translate.gif" style="cursor:hand" border="0"></a>
</td>
<td>
<input type="text" name="<inp2:$prefix_InputName field="$field"/>" id="<inp2:$prefix_InputName field="$field"/>" value="<inp2:$prefix_Field field="$field" format="no_default"/>" 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"/>" onblur="<inp2:m_Param name="onblur"/>">
</td>
<td class="error"><inp2:$prefix_Error field="$field"/>&nbsp;</td>
</tr>
<inp2:m_blockend/>
<inp2:m_block name="inp_edit_hidden"/>
<input type="hidden" name="<inp2:$prefix_InputName field="$field"/>" id="<inp2:$prefix_InputName field="$field"/>" value="<inp2:$prefix_Field field="$field" db="$db"/>">
<inp2:m_blockend/>
<inp2:m_block name="inp_edit_date"/>
<inp2:m_if check="m_GetEquals" name="calendar_included" value="1" inverse="inverse">
<script type="text/javascript" src="incs/calendar.js"></script>
<inp2:m_set calendar_included="1"/>
</inp2:m_if>
<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}_date"/>" id="<inp2:$prefix_InputName field="{$field}_date"/>" value="<inp2:$prefix_Field field="{$field}_date"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:$prefix_Format field="{$field}_date" edit_size="edit_size"/>" class="<inp2:m_param name="class"/>" datepickerIcon="<inp2:m_ProjectBase/>admin/images/ddarrow.gif">&nbsp;<span class="small">(<inp2:$prefix_Format field="{$field}_date" human="true"/>)</span>
<script type="text/javascript">
initCalendar("<inp2:$prefix_InputName field="{$field}_date"/>", "<inp2:$prefix_Format field="{$field}_date"/>");
</script>
<input type="hidden" name="<inp2:$prefix_InputName field="{$field}_time"/>" id="<inp2:$prefix_InputName field="{$field}_time"/>" value="">
</td>
<td class="error"><inp2:$prefix_Error field="{$field}_date"/>&nbsp;</td>
</tr>
<inp2:m_blockend/>
<inp2:m_block name="inp_edit_date_time"/>
<inp2:m_if check="m_GetEquals" name="calendar_included" value="1" inverse="inverse">
<script type="text/javascript" src="incs/calendar.js"></script>
<inp2:m_set calendar_included="1"/>
</inp2:m_if>
<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="hidden" id="<inp2:$prefix_InputName field="$field"/>" name="<inp2:$prefix_InputName field="$field"/>" value="<inp2:$prefix_Field field="$field" db="db"/>"> -->
<input type="text" name="<inp2:$prefix_InputName field="{$field}_date"/>" id="<inp2:$prefix_InputName field="{$field}_date"/>" value="<inp2:$prefix_Field field="{$field}_date"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:$prefix_Format field="{$field}_date" edit_size="edit_size"/>" class="<inp2:m_param name="class"/>" datepickerIcon="<inp2:m_ProjectBase/>admin/images/ddarrow.gif">
<span class="small">(<inp2:$prefix_Format field="{$field}_date" human="true"/>)</span>
<script type="text/javascript">
initCalendar("<inp2:$prefix_InputName field="{$field}_date"/>", "<inp2:$prefix_Format field="{$field}_date"/>");
</script>
&nbsp;<input type="text" name="<inp2:$prefix_InputName field="{$field}_time"/>" id="<inp2:$prefix_InputName field="{$field}_time"/>" value="<inp2:$prefix_Field field="{$field}_time"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:$prefix_Format field="{$field}_time" edit_size="edit_size"/>" class="<inp2:m_param name="class"/>"><span class="small"> (<inp2:$prefix_Format field="{$field}_time" human="true"/>)</span>
</td>
<td class="error"><inp2:$prefix_Error field="$field"/>&nbsp;</td>
</tr>
<inp2:m_blockend/>
<inp2:m_block name="inp_edit_textarea"/>
<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
<td class="text" valign="top">
<span class="<inp2:m_if prefix="$prefix" function="HasError" field="$field"/>error<inp2:m_endif/>">
<inp2:m_phrase label="$title"/><inp2:m_if prefix="$prefix" function="IsRequired" field="$field"/><span class="error"> *</span><inp2:m_endif/>:</span><br>
<a href="javascript:OpenEditor('&section=in-link:editlink_general','kernel_form','<inp2:$prefix_InputName field="$field"/>');"><img src="img/icons/icon24_link_editor.gif" style="cursor:hand" border="0"></a>
</td>
<td>
<textarea tabindex="<inp2:m_get param="tab_index"/>" id="<inp2:$prefix_InputName field="$field"/>" name="<inp2:$prefix_InputName field="$field"/>" cols="<inp2:m_param name="cols"/>" rows="<inp2:m_param name="rows"/>" class="<inp2:m_param name="class"/>"><inp2:$prefix_Field field="$field"/></textarea>
</td>
<td class="error"><inp2:$prefix_Error field="$field"/>&nbsp;</td>
</tr>
<inp2:m_blockend/>
<inp2:m_block name="inp_edit_user"/>
<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"/>" id="<inp2:$prefix_InputName field="$field"/>" value="<inp2:$prefix_Field field="$field"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" class="<inp2:m_param name="class"/>">
<a href="#" onclick="return OpenUserSelector('','kernel_form','<inp2:$prefix_InputName field="$field"/>');">
<img src="img/icons/icon24_link_user.gif" style="cursor:hand;" border="0">
</a>
</td>
<td class="error"><inp2:$prefix_Error field="$field"/>&nbsp;</td>
</tr>
<inp2:m_blockend/>
<inp2:m_block name="inp_option_item"/>
<option value="<inp2:m_param name="key"/>"<inp2:m_param name="selected"/>><inp2:m_param name="option"/></option>
<inp2:m_blockend/>
<inp2:m_block name="inp_option_phrase"/>
<option value="<inp2:m_param name="key"/>"<inp2:m_param name="selected"/>><inp2:m_phrase label="$option"/></option>
<inp2:m_blockend/>
<inp2:m_block name="inp_edit_options"/>
<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:m_if prefix="m" function="ParamEquals" name="use_phrases" value="1"/>
<inp2:$prefix_PredefinedOptions field="$field" block="inp_option_phrase" selected="selected"/>
<inp2:m_else/>
<inp2:$prefix_PredefinedOptions field="$field" block="inp_option_item" selected="selected"/>
<inp2:m_endif/>
</select>
</td>
<td class="error"><inp2:$prefix_Error field="$field"/>&nbsp;</td>
</tr>
<inp2:m_blockend/>
<inp2:m_block name="inp_radio_item"/>
<input type="radio" <inp2:m_param name="checked"/> name="<inp2:$prefix_InputName field="$field"/>" id="<inp2:$prefix_InputName field="$field"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>"><label for="<inp2:$prefix_InputName field="$field"/>_<inp2:m_param name="key"/>"><inp2:m_phrase label="$option"/></label>&nbsp;
<inp2:m_blockend/>
<inp2:m_block name="inp_checkbox_item"/>
<input type="checkbox" <inp2:m_param name="checked"/> name="<inp2:$prefix_InputName field="$field"/>[]" id="<inp2:$prefix_InputName field="$field"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>"><label for="<inp2:$prefix_InputName field="$field"/>_<inp2:m_param name="key"/>"><inp2:m_phrase label="$option"/></label>&nbsp;
<inp2:m_if check="$prefix_HasParam" name="hint_label"><inp2:m_phrase label="$hint_label"/></inp2:m_if>
<inp2:m_blockend/>
<inp2:m_block name="inp_edit_radio"/>
<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>
<inp2:$prefix_PredefinedOptions field="$field" tabindex="$pass_tabindex" block="inp_radio_item" selected="checked"/>
</td>
<td class="error"><inp2:$prefix_Error field="$field"/>&nbsp;</td>
</tr>
<inp2:m_blockend/>
<inp2:m_block name="inp_edit_checkbox"/>
<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" NamePrefix="_cb_"/>
<td>
<input type="hidden" id="<inp2:$prefix_InputName field="$field"/>" name="<inp2:$prefix_InputName field="$field"/>" value="<inp2:$prefix_Field field="$field" db="db"/>">
<input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:$prefix_InputName field="$field"/>" name="_cb_<inp2:$prefix_InputName field="$field"/>" <inp2:$prefix_Field field="$field" checked="checked" db="db"/> class="<inp2:m_param name="field_class"/>" onclick="update_checkbox(this, document.getElementById('<inp2:$prefix_InputName field="$field"/>'))" onchange="<inp2:m_param name="onchange" />">
<inp2:m_if check="$prefix_HasParam" name="hint_label"><inp2:m_phrase label="$hint_label"/></inp2:m_if>
</td>
<td class="error"><inp2:$prefix_Error field="$field"/>&nbsp;</td>
</tr>
<inp2:m_blockend/>
<inp2:m_block name="inp_edit_checkboxes"/>
<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>
<inp2:m_if check="m_ParamEquals" name="use_phrases" value="1">
<inp2:$prefix_PredefinedOptions field="$field" no_empty="$no_empty" tabindex="$pass_tabindex" hint_label="$hint_label" block="inp_checkbox_phrase" selected="checked"/>
<inp2:m_else/>
<inp2:$prefix_PredefinedOptions field="$field" no_empty="$no_empty" tabindex="$pass_tabindex" hint_label="$hint_label" block="inp_checkbox_item" selected="checked"/>
</inp2:m_if>
</td>
<td class="error"><inp2:$prefix_Error field="$field"/>&nbsp;</td>
</tr>
<inp2:m_blockend/>
\ No newline at end of file
Property changes on: trunk/kernel/admin_templates/incs/form_blocks.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4
\ No newline at end of property
+1.5
\ No newline at end of property
Index: trunk/kernel/admin_templates/stylesheets/style_editor.tpl
===================================================================
--- trunk/kernel/admin_templates/stylesheets/style_editor.tpl (revision 1661)
+++ trunk/kernel/admin_templates/stylesheets/style_editor.tpl (revision 1662)
@@ -1,145 +1,145 @@
<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"/>
+<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="style_edit" module="in-portal" 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.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('reset_to_base', '<inp2:m_phrase label="la_ToolTip_ResetToBase"/>', function() {
submit_event('selectors','OnResetToBase');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_block name="inp_edit_color"/>
<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"/>"
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(null,'<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" subfield="$subfield"/>" id="<inp2:$prefix_InputName field="$field" subfield="$subfield"/>" onchange="<inp2:m_Param name="onchange"/>">
<inp2:$prefix_PredefinedOptions field="$field" value_field="$value_field" subfield="$subfield" block="inp_option_item" selected="selected"/>
</select>
</td>
<td class="error"><inp2:$prefix_Error field="$field"/>&nbsp;</td>
</tr>
<inp2:m_blockend/>
<inp2:m_block name="subsection_collapse"/>
<tr class="subsectiontitle">
<td colspan="5"><inp2:m_param name="title"/></td>
</tr>
<inp2:m_blockend/>
<inp2:selectors_SaveWarning name="grid_save_warning"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<inp2:m_ParseBlock name="subsection_collapse" title="!la_Font!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="font" title="!la_fld_Font!" size="50"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="font-family" title="!la_fld_FontFamily!" size="40"/>
<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_options_style" prefix="selectors" field="SelectorData" subfield="font-style" value_field="FontStyle" title="!la_fld_FontStyle!"/>
<inp2:m_ParseBlock name="inp_edit_options_style" prefix="selectors" field="SelectorData" subfield="font-weight" value_field="FontWeight" title="!la_fld_FontWeight!"/>
<inp2:m_ParseBlock name="inp_edit_options_style" prefix="selectors" field="SelectorData" subfield="text-align" value_field="TextAlign" title="!la_fld_TextAlign!"/>
<inp2:m_ParseBlock name="inp_edit_options_style" prefix="selectors" field="SelectorData" subfield="text-decoration" value_field="TextDecoration" title="!la_fld_TextDecoration!"/>
<inp2:m_ParseBlock name="subsection_collapse" title="!la_Background!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="background" title="!la_fld_Background!" size="50"/>
<inp2:m_ParseBlock name="inp_edit_color" prefix="selectors" field="SelectorData" subfield="background-color" title="!la_fld_BackgroundColor!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="background-image" title="!la_fld_BackgroundImage!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="background-repeat" title="!la_fld_BackgroundRepeat!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="background-attachment" title="!la_fld_BackgroundAttachment!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="background-position" title="!la_fld_BackgroundPosition!"/>
<inp2:m_ParseBlock name="subsection_collapse" title="!la_Borders!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="border" title="!la_fld_Borders!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="border-top" title="!la_fld_BorderTop!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="border-right" title="!la_fld_BorderRight!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="border-bottom" title="!la_fld_BorderBottom!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="border-left" title="!la_fld_BorderLeft!"/>
<inp2:m_ParseBlock name="subsection_collapse" title="!la_Paddings!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="padding" title="!la_fld_Paddings!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="padding-top" title="!la_fld_PaddingTop!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="padding-right" title="!la_fld_PaddingRight!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="padding-bottom" title="!la_fld_PaddingBottom!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="padding-left" title="!la_fld_PaddingLeft!"/>
<inp2:m_ParseBlock name="subsection_collapse" title="!la_Margins!"/>
<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!"/>
<inp2:m_ParseBlock name="subsection_collapse" title="!la_PositionAndVisibility!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="width" title="!la_fld_Width!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="height" title="!la_fld_Height!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="left" title="!la_fld_Left!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="top" title="!la_fld_Top!"/>
<inp2:m_ParseBlock name="inp_edit_options_style" prefix="selectors" field="SelectorData" subfield="position" value_field="StylePosition" title="!la_fld_Position!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="z-index" title="!la_fld_Z-Index!"/>
<inp2:m_ParseBlock name="inp_edit_options_style" prefix="selectors" field="SelectorData" subfield="display" value_field="StyleDisplay" title="!la_fld_Display!"/>
<inp2:m_ParseBlock name="inp_edit_options_style" prefix="selectors" field="SelectorData" subfield="visibility" value_field="StyleVisibility" title="!la_fld_Visibility!"/>
<inp2:m_ParseBlock name="inp_edit_options_style" prefix="selectors" field="SelectorData" subfield="cursor" value_field="StyleCursor" title="!la_fld_Cursor!"/>
</table>
<script language="javascript" type="text/javascript">
InitColorSelector();
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: trunk/kernel/admin_templates/stylesheets/style_editor.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.3
\ No newline at end of property
Index: trunk/kernel/admin_templates/stylesheets/stylesheets_list.tpl
===================================================================
--- trunk/kernel/admin_templates/stylesheets/stylesheets_list.tpl (revision 1661)
+++ trunk/kernel/admin_templates/stylesheets/stylesheets_list.tpl (revision 1662)
@@ -1,75 +1,75 @@
<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="styles_list" module="in-commerce" icon="icon46_style"/>
+<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="styles_list" module="in-portal" icon="icon46_style"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
std_edit_item('css', 'stylesheets/stylesheets_edit');
}
var a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('new_style', '<inp2:m_phrase label="la_ToolTip_NewStylesheet"/>',
function() {
std_precreate_item('css', 'stylesheets/stylesheets_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('css')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve"/>', function() {
submit_event('css','OnMassApprove');
}
) );
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline"/>', function() {
submit_event('css','OnMassDecline');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone"/>', function() {
submit_event('css','OnMassClone');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_block name="grid_description_td" />
<td valign="top" class="text"><inp2:$PrefixSpecial_field field="$field" grid="$grid" no_special="$no_special" cut_first="100"/></td>
<inp2:m_blockend />
<inp2:m_ParseBlock name="grid" PrefixSpecial="css" IdField="StylesheetId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" has_filters="has_filters" search="on"/>
<script type="text/javascript">
Grids['css'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','clone') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: trunk/kernel/admin_templates/stylesheets/stylesheets_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.4
\ No newline at end of property
Index: trunk/kernel/admin_templates/stylesheets/stylesheets_edit_base.tpl
===================================================================
--- trunk/kernel/admin_templates/stylesheets/stylesheets_edit_base.tpl (revision 1661)
+++ trunk/kernel/admin_templates/stylesheets/stylesheets_edit_base.tpl (revision 1662)
@@ -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="stylesheets/stylesheets_tabs"/>
-<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="base_styles" module="in-commerce" icon="icon46_style"/>
+<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="base_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"/>', 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_selector', '<inp2:m_phrase label="la_ToolTip_NewBaseStyle"/>',
function() {
set_hidden_field('remove_specials[selectors.base]',1);
std_new_item('selectors.base', 'stylesheets/base_style_edit')
} ) );
function edit()
{
set_hidden_field('remove_specials[selectors.base]',1);
std_edit_temp_item('selectors.base', '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','clone') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: trunk/kernel/admin_templates/stylesheets/stylesheets_edit_base.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.4
\ No newline at end of property
Index: trunk/kernel/admin_templates/stylesheets/stylesheets_edit_block.tpl
===================================================================
--- trunk/kernel/admin_templates/stylesheets/stylesheets_edit_block.tpl (revision 1661)
+++ trunk/kernel/admin_templates/stylesheets/stylesheets_edit_block.tpl (revision 1662)
@@ -1,111 +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_include t="stylesheets/stylesheets_tabs"/>
-<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="block_styles" module="in-commerce" icon="icon46_style"/>
+<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"/>', 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_selector', '<inp2:m_phrase label="la_ToolTip_NewBlockStyle"/>',
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"/>', 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 ToolBarButton('reset_to_base', '<inp2:m_phrase label="la_ToolTip_ResetToBase"/>', 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"/>', 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') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: trunk/kernel/admin_templates/stylesheets/stylesheets_edit_block.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.4
\ No newline at end of property
Index: trunk/kernel/admin_templates/stylesheets/base_style_edit.tpl
===================================================================
--- trunk/kernel/admin_templates/stylesheets/base_style_edit.tpl (revision 1661)
+++ trunk/kernel/admin_templates/stylesheets/base_style_edit.tpl (revision 1662)
@@ -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_ParseBlock name="blue_bar" prefix="css" title_preset="base_style_edit" module="in-commerce" icon="icon46_style"/>
+<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="base_style_edit" module="in-portal" icon="icon46_style"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save"/>', 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="stylesheets/style_editor" pass="all"/>',null,850,460,'OnOpenStyleEditor');
}
else
{
alert( RemoveTranslationLink('<inp2:m_phrase name="la_RequiredWarning"/>') );
}
}
</script>
</td>
</tr>
</tbody>
</table>
<inp2:selectors_SaveWarning name="grid_save_warning"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
<inp2:m_ParseBlock name="inp_edit_hidden" prefix="selectors" field="StylesheetId"/>
<input type="hidden" name="<inp2:selectors_InputName field="Type"/>" value="1">
<inp2:m_ParseBlock name="inp_id_label" prefix="selectors" field="SelectorId" title="!la_fld_SelectorId!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorName" title="!la_fld_SelectorName!" size="40"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="Name" title="!la_fld_Name!" size="40"/>
<inp2:m_ParseBlock name="inp_edit_textarea" prefix="selectors" field="Description" title="!la_fld_Description!" rows="10" cols="40"/>
<inp2:m_ParseBlock name="inp_edit_textarea" prefix="selectors" field="AdvancedCSS" title="!la_fld_AdvancedCSS!" rows="10" cols="40"/>
<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="text" valign="top">
<inp2:m_phrase name="la_fld_SelectorData"/>:<br>
<a href="javascript:editStyle();"><img src="img/icons/icon24_link_editor.gif" style="cursor:hand" border="0"></a>
</td>
<td>
<table width="100%">
<tr>
<td><inp2:m_phrase name="la_StyleDefinition"/>:</td>
<td>
<inp2:selectors_PrintStyle field="SelectorData"/>
</td>
<td><inp2:m_phrase name="la_StylePreview"/>:</td>
<td style="<inp2:selectors_PrintStyle field="SelectorData" inline="inline"/>">
<inp2:m_phrase name="la_SampleText"/>
</td>
</tr>
</table>
</td>
<td class="error">&nbsp;</td>
</tr>
</table>
<input type="hidden" name="main_prefix" id="main_prefix" value="selectors">
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: trunk/kernel/admin_templates/stylesheets/base_style_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.4
\ No newline at end of property
Index: trunk/kernel/admin_templates/stylesheets/block_style_edit.tpl
===================================================================
--- trunk/kernel/admin_templates/stylesheets/block_style_edit.tpl (revision 1661)
+++ trunk/kernel/admin_templates/stylesheets/block_style_edit.tpl (revision 1662)
@@ -1,113 +1,113 @@
<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"/>
+<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="block_style_edit" module="in-portal" icon="icon46_style"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save"/>', 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.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('reset_to_base', '<inp2:m_phrase label="la_ToolTip_ResetToBase"/>', function() {
submit_event('selectors','OnResetToBase');
}
) );
a_toolbar.Render();
function ValidateRequired()
{
var $fields = new Array('<inp2:selectors_InputName field="Name"/>',
'<inp2:selectors_InputName field="SelectorName"/>');
var $ret = true;
var $i = 0;
var $value = '';
while($i < $fields.length)
{
$value = document.getElementById( $fields[$i] ).value;
$value = $value.replace(' ','');
if($value.length == 0)
{
$ret = false;
break;
}
$i++;
}
return $ret;
}
function editStyle()
{
if( ValidateRequired() )
{
openSelector('selectors','<inp2:m_t t="stylesheets/style_editor" pass="all"/>',null,850,460,'OnOpenStyleEditor');
}
else
{
alert( RemoveTranslationLink('<inp2:m_phrase name="la_RequiredWarning"/>') );
}
}
</script>
</td>
</tr>
</tbody>
</table>
<inp2:selectors_SaveWarning name="grid_save_warning"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
<inp2:m_ParseBlock name="inp_edit_hidden" prefix="selectors" field="StylesheetId"/>
<input type="hidden" name="<inp2:selectors_InputName field="Type"/>" value="2">
<inp2:m_ParseBlock name="inp_id_label" prefix="selectors" field="SelectorId" title="!la_fld_SelectorId!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorName" title="!la_fld_SelectorName!" size="40"/>
<inp2:m_ParseBlock name="inp_edit_options" prefix="selectors" field="ParentId" title="!la_fld_SelectorBase!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="Name" title="!la_fld_Name!" size="40"/>
<inp2:m_ParseBlock name="inp_edit_textarea" prefix="selectors" field="Description" title="!la_fld_Description!" rows="10" cols="40"/>
<inp2:m_ParseBlock name="inp_edit_textarea" prefix="selectors" field="AdvancedCSS" title="!la_fld_AdvancedCSS!" rows="10" cols="40"/>
<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="text" valign="top">
<inp2:m_phrase name="la_fld_SelectorData"/>:<br>
<a href="javascript:editStyle();"><img src="img/icons/icon24_link_editor.gif" style="cursor:hand" border="0"></a>
</td>
<td>
<table width="100%">
<tr>
<td><inp2:m_phrase name="la_StyleDefinition"/>:</td>
<td>
<inp2:selectors_PrintStyle field="SelectorData"/>
</td>
<td><inp2:m_phrase name="la_StylePreview"/>:</td>
<td style="<inp2:selectors_PrintStyle field="SelectorData" inline="inline"/>">
<inp2:m_phrase name="la_SampleText"/>
</td>
</tr>
</table>
</td>
<td class="error">&nbsp;</td>
</tr>
</table>
<input type="hidden" name="main_prefix" id="main_prefix" value="selectors">
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: trunk/kernel/admin_templates/stylesheets/block_style_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.4
\ No newline at end of property
Index: trunk/kernel/module_help/dummy
===================================================================
Index: trunk/kernel/module_help/dummy
===================================================================
--- trunk/kernel/module_help/dummy (nonexistent)
+++ trunk/kernel/module_help/dummy (revision 1662)
Property changes on: trunk/kernel/module_help/dummy
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/editor/editor_new.php
===================================================================
--- trunk/admin/editor/editor_new.php (revision 1661)
+++ trunk/admin/editor/editor_new.php (revision 1662)
@@ -1,208 +1,208 @@
<?php
##############################################################
##In-portal ##
##############################################################
## In-portal ##
## Intechnic Corporation ##
## All Rights Reserved, 1998-2002 ##
## ##
## No portion of this code may be copied, reproduced or ##
## otherwise redistributed without proper written ##
## consent of Intechnic Corporation. Violation will ##
## result in revocation of the license and support ##
## privileges along maximum prosecution allowed by law. ##
##############################################################
if(!strlen($pathtoroot))
{
$path=dirname(realpath(__FILE__));
if(strlen($path))
{
/* determine the OS type for path parsing */
$pos = strpos($path,":");
if ($pos === false)
{
$gOS_TYPE="unix";
$pathchar = "/";
}
else
{
$gOS_TYPE="win";
$pathchar="\\";
}
$p = $path.$pathchar;
/*Start looking for the root flag file */
while(!strlen($pathtoroot) && strlen($p))
{
$sub = substr($p,strlen($pathchar)*-1);
if($sub==$pathchar)
{
$filename = $p."root.flg";
}
else
$filename = $p.$pathchar."root.flg";
if(file_exists($filename))
{
$pathtoroot = $p;
}
else
{
$parent = realpath($p.$pathchar."..".$pathchar);
if($parent!=$p)
{
$p = $parent;
}
else
$p = "";
}
}
if(!strlen($pathtoroot))
$pathtoroot = ".".$pathchar;
}
else
{
$pathtoroot = ".".$pathchar;
}
}
$sub = substr($pathtoroot,strlen($pathchar)*-1);
if($sub!=$pathchar)
{
$pathtoroot = $pathtoroot.$pathchar;
}
//echo $pathtoroot;
require_once($pathtoroot."kernel/startup.php");
//admin only util
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
require_once ($pathtoroot.$admin."/include/elements.php");
require_once ($pathtoroot."kernel/admin/include/navmenu.php");
require_once($pathtoroot.$admin."/toolbar.php");
require_once($pathtoroot.$admin."/editor/cmseditor/fckeditor.php");
$style_sheet_global = $adminURL."/include/style.css";
?>
<html>
<head>
<title>Online Editor</title>
<?php print "<link rel=\"stylesheet\" type=\"text/css\" href=\"$style_sheet_global\">\n"; ?>
<?php require_once($pathtoroot.$admin."/include/mainscript.php"); ?>
<script>
function HasParam(param)
{
// checks of parameter is passed to function (cross-browser)
return typeof(param) == 'undefined' ? false : true;
}
</script>
</head>
<body marginwidth="0" leftmargin="0" topmargin="0" marginheight="0" style="overflow:auto">
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0" align="center"><tr><td align="left" valign="top">
<?php
$section=$_GET["section"];
$objListToolBar = new clsToolBar();
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass","");
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar->Add("select", "la_ToolTip_Select","#","swap('select','toolbar/tool_select_f2.gif');",
"swap('select', 'toolbar/tool_select.gif');",
"document.frm.submit();","tool_select.gif");
$objListToolBar->Add("cancel", "la_ToolTip_Stop","#","swap('cancel','toolbar/tool_stop_f2.gif');",
"swap('cancel', 'toolbar/tool_stop.gif');","window.close();","tool_stop.gif");
$title = "Online HTML Editor";
$objSections->SetCurrentSection($section);
print $objSections->section_header($envar,NULL,$title);
$TargetForm = $_GET["TargetForm"];
$TargetField = $_GET["TargetField"];
echo $objListToolBar->Build();
?>
<form name="frm" action="javascript:update_opener();">
<?php
$oFCKeditor = new FCKeditor('Content');
- $oFCKeditor->BasePath = 'cmseditor/' ;
+ $oFCKeditor->BasePath = 'cmseditor/' ;
$oFCKeditor->Width = '100%' ;
$oFCKeditor->Height = '500' ;
$oFCKeditor->ToolbarSet = 'Advanced' ;
$oFCKeditor->Value = '' ;
$oFCKeditor->Config = Array(
'UserFilesPath' => $pathtoroot.'kernel/userfiles',
'ProjectPath' => $objConfig->Get("Site_Path"),
'CustomConfigurationsPath' => $rootURL.'admin/editor/inp_fckconfig.js',
'Debug' => 1,
);
echo $oFCKeditor->CreateHtml() ;
?>
</FORM>
</td></tr></table>
</form>
</body>
<script>
<?php
print <<<END
function update_content()
{
if (window.opener)
{
if (!window.opener.closed)
{
bf = window.opener.document.$TargetForm;
// if (typeof (bf.$TargetField.value) != 'undefined') {
// current = bf.$TargetField.value;
// }
// else {
current = window.opener.document.getElementById('$TargetField').value;
// }
//f = document.getElementById('editform');
d = document.getElementById('Content');
d.value = current;
}
else
window.close()
}
else
window.close()
}
function update_opener()
{
d = document.getElementById('Content');
if (d.form)
if (d.form.onsubmit)
d.form.onsubmit()
if (!window.opener) return;
if (!window.opener.closed)
// if (typeof (bf.$TargetField.value) != 'undefined') {
// current = bf.$TargetField;
// }
// else {
current = window.opener.document.getElementById('$TargetField');
// }
current.value = d.value;
//alert('Setting bf.$TargetField.value to'+d.value);
window.close();
}
END;
?>
setTimeout('update_content();',100);
</script>
</html>
Property changes on: trunk/admin/editor/editor_new.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.4
\ No newline at end of property
Index: trunk/core/kernel/processors/main_processor.php
===================================================================
--- trunk/core/kernel/processors/main_processor.php (revision 1661)
+++ trunk/core/kernel/processors/main_processor.php (revision 1662)
@@ -1,741 +1,747 @@
<?php
class MainProcessor extends TagProcessor {
function Init($prefix,$special)
{
parent::Init($prefix,$special);
$actions =& $this->Application->recallObject('kActions');
$actions->Set('t', $this->Application->GetVar('t'));
$actions->Set('sid', $this->Application->GetSID());
$actions->Set('m_opener', $this->Application->GetVar('m_opener') );
}
/**
* Used to handle calls where tag name
* match with existing php function name
*
* @param Tag $tag
* @return string
*/
function ProcessTag(&$tag)
{
if ($tag->Tag=='include') $tag->Tag='MyInclude';
return parent::ProcessTag($tag);
}
/**
* Creates <base href ..> HTML tag for all templates
* affects future css, js files and href params of links
*
* @return string
* @access public
*/
function Base_Ref()
{
$url = $this->Application->BaseURL().substr(THEMES_PATH,1).'/';
return '<base href="'.$url.'" />';
}
/**
* Returns base url for web-site
*
* @return string
* @access public
*/
function BaseURL()
{
return $this->Application->BaseURL();
}
function TemplatesBase($params)
{
return $this->Application->BaseURL().THEMES_PATH;
}
function ProjectBase($params)
{
return $this->Application->BaseURL();
}
/*function Base($params)
{
return $this->Application->BaseURL().$params['add'];
}*/
/**
* Used to create link to any template.
* use "pass" paramter if "t" tag to specify
* prefix & special of object to be represented
* in resulting url
*
* @param Array $params
* @return string
* @access public
*/
function T($params)
{
//by default link to current template
$t = $this->SelectParam($params, 't,template');
if ($t === false) {
$t = $this->Application->GetVar('t');
}
unset($params['t']);
unset($params['template']);
$prefix=isset($params['prefix']) ? $params['prefix'] : ''; unset($params['prefix']);
$index_file = isset($params['index_file']) ? $params['index_file'] : null; unset($params['index_file']);
/*$pass=isset($params['pass']) ? $params['pass'] : $this->Application->GetVar('t_pass'); unset($params['pass']);
$this->Application->SetVar('t_pass', $pass);
$pass_events = isset($params['pass_events']) && $params['pass_events'] ? 1 : 0; unset($params['pass_events']);
$this->Application->SetVar('t_pass_events', $pass_events);*/
//Use only implicit params passing, do not set into APP
// $this->Set($params); // set other params as application vars
return str_replace('&', '&amp;', $this->Application->HREF($t,$prefix,$params,$index_file));
}
function Link($params)
{
if (isset($params['template'])) {
$params['t'] = $params['template'];
unset($params['template']);
}
if (!isset($params['pass']) && !isset($params['no_pass'])) $params['pass'] = 'm';
if (isset($params['no_pass'])) unset($params['no_pass']);
return $this->T($params);
}
function Env($params)
{
$t = $params['template'];
unset($params['template']);
return $this->Application->BuildEnv($t, $params, 'm', null, false);
}
function FormAction($params)
{
return $this->Application->ProcessParsedTag('m', 't', Array( 'pass'=>'all,m' ) );
}
/*// NEEDS TEST
function Config($params)
{
return $this->Application->ConfigOption($params['var']);
}
function Object($params)
{
$name = $params['name'];
$method = $params['method'];
$tmp =& $this->Application->recallObject($name);
if ($tmp != null) {
if (method_exists($tmp, $method))
return $tmp->$method($params);
else
echo "Method $method does not exist in object ".get_class($tmp)." named $name<br>";
}
else
echo "Object $name does not exist in the appliaction<br>";
}*/
/**
* Tag, that always returns true.
* For parser testing purposes
*
* @param Array $params
* @return bool
* @access public
*/
function True($params)
{
return true;
}
/**
* Tag, that always returns false.
* For parser testing purposes
*
* @param Array $params
* @return bool
* @access public
*/
function False($params)
{
return false;
}
/**
* Returns block parameter by name
*
* @param Array $params
* @return stirng
* @access public
*/
function Param($params)
{
//$parser =& $this->Application->recallObject('TemplateParser');
$res = $this->Application->Parser->GetParam($params['name']);
if ($res === false) $res = '';
if (isset($params['plus']))
$res += $params['plus'];
return $res;
}
/**
* Compares block parameter with value specified
*
* @param Array $params
* @return bool
* @access public
*/
function ParamEquals($params)
{
//$parser =& $this->Application->recallObject('TemplateParser');
$name = $this->SelectParam($params, 'name,var,param');
$value = $params['value'];
return ($this->Application->Parser->GetParam($name) == $value);
}
/*function PHP_Self($params)
{
return $HTTP_SERVER_VARS['PHP_SELF'];
}
*/
/**
* Returns session variable value by name
*
* @param Array $params
* @return string
* @access public
*/
function Recall($params)
{
$ret = $this->Application->RecallVar( $this->SelectParam($params,'name,var,param') );
$ret = ($ret === false && isset($params['no_null'])) ? '' : $ret;
if( getArrayValue($params,'special') || getArrayValue($params,'htmlchars')) $ret = htmlspecialchars($ret);
return $ret;
}
// bad style to store something from template to session !!! (by Alex)
// Used here only to test how session works, nothing more
function Store($params)
{
//echo"Store $params[name]<br>";
$name = $params['name'];
$value = $params['value'];
$this->Application->StoreVar($name,$value);
}
/**
* Sets application variable value(-s)
*
* @param Array $params
* @access public
*/
function Set($params)
{
foreach ($params as $param => $value) {
$this->Application->SetVar($param, $value);
}
}
/**
* Increment application variable
* specified by number specified
*
* @param Array $params
* @access public
*/
function Inc($params)
{
$this->Application->SetVar($params['param'], $this->Application->GetVar($params['param']) + $params['by']);
}
/**
* Retrieves application variable
* value by name
*
* @param Array $params
* @return string
* @access public
*/
function Get($params)
{
$ret = $this->Application->GetVar($this->SelectParam($params, 'name,var,param'), EMPTY_ON_NULL);
return getArrayValue($params, 'htmlchars') ? htmlspecialchars($ret) : $ret;
}
/**
* Retrieves application constant
* value by name
*
* @param Array $params
* @return string
* @access public
*/
function GetConst($params)
{
return defined($this->SelectParam($params, 'name,const')) ? constant($this->SelectParam($params, 'name,const,param')) : '';
}
/*function Config_Equals($params)
{
foreach ($params as $name => $val) {
if (in_array($name, Array( 'prefix', 'function'))) continue;
return $this->Application->ConfigOption($name) == $val;
}
return false;
}*/
/**
* Creates all hidden fields
* needed for kernel_form
*
* @param Array $params
* @return string
* @access public
*/
function DumpSystemInfo($params)
{
$actions =& $this->Application->recallObject('kActions');
$actions->Set('t', $this->Application->GetVar('t') );
$params = $actions->GetParams();
$o='';
foreach ($params AS $name => $val)
{
$o .= "<input type='hidden' name='$name' id='$name' value='$val'>\n";
}
return $o;
}
function GetFormHiddens($params)
{
$sid = $this->Application->GetSID();
$t = $this->SelectParam($params, 'template,t');
unset($params['template']);
$env = $this->Application->BuildEnv($t, $params, 'm', null, false);
$o = '';
if (defined('MOD_REWRITE') && MOD_REWRITE) {
$session =& $this->Application->recallObject('Session');
if ($session->NeedQueryString()) {
$o .= "<input type='hidden' name='sid' id='sid' value='$sid'>\n";
}
}
else {
$o .= "<input type='hidden' name='env' id='env' value='$env'>\n";
}
return $o;
}
function Odd_Even($params)
{
$odd = $params['odd'];
$even = $params['even'];
if (!isset($params['var'])) {
$var = 'odd_even';
}
else {
$var = $params['var'];
}
if ($this->Application->GetVar($var) == 'even') {
$this->Application->SetVar($var, 'odd');
return $even;
}
else {
$this->Application->SetVar($var, 'even');
return $odd;
}
}
/**
* Returns phrase translation by name
*
* @param Array $params
* @return string
* @access public
*/
function Phrase($params)
{
// m:phrase name="phrase_name" default="Tr-alala" updated="2004-01-29 12:49"
if (array_key_exists('default', $params)) return $params['default']; //backward compatibility
return $this->Application->Phrase($this->SelectParam($params, 'label,name,title'));
}
// for tabs
function is_active($params)
{
$test_templ = $this->SelectParam($params, 'templ,template,t');
if ( !getArrayValue($params,'allow_empty') )
{
$if_true=getArrayValue($params,'true') ? $params['true'] : 1;
$if_false=getArrayValue($params,'false') ? $params['false'] : 0;
}
else
{
$if_true=$params['true'];
$if_false=$params['false'];
}
if ( preg_match("/^".str_replace('/', '\/', $test_templ)."/", $this->Application->GetVar('t'))) {
return $if_true;
}
else {
return $if_false;
}
}
function IsNotActive($params)
{
return !$this->is_active($params);
}
function IsActive($params)
{
return $this->is_active($params);
}
function is_t_active($params)
{
return $this->is_active($params);
}
function CurrentTemplate($params)
{
return $this->is_active($params);
}
/**
* Checks if session variable
* specified by name value match
* value passed as parameter
*
* @param Array $params
* @return string
* @access public
*/
function RecallEquals($params)
{
$name = $params['var'];
$value = $params['value'];
return ($this->Application->RecallVar($name) == $value);
}
/**
* Checks if application variable
* specified by name value match
* value passed as parameter
*
* @param Array $params
* @return bool
* @access public
*/
function GetEquals($params)
{
$name = $this->SelectParam($params, 'var,name,param');
$value = $params['value'];
if ($this->Application->GetVar($name) == $value) {
return 1;
}
}
/**
* Includes template
* and returns it's
* parsed version
*
* @param Array $params
* @return string
* @access public
*/
function MyInclude($params)
{
$BlockParser =& $this->Application->makeClass('TemplateParser');
$BlockParser->SetParams($params);
$parser =& $this->Application->Parser;
$this->Application->Parser =& $BlockParser;
$t = $this->SelectParam($params, 't,template,block,name');
$t = eregi_replace("\.tpl$", '', $t);
$templates_cache =& $this->Application->recallObject('TemplatesCache');
$res = $BlockParser->Parse( $templates_cache->GetTemplateBody($t), $t );
if ( !$BlockParser->DataExists && (isset($params['data_exists']) || isset($params['block_no_data'])) ) {
if ($block_no_data = getArrayValue($params, 'block_no_data')) {
$res = $BlockParser->Parse(
$templates_cache->GetTemplateBody($block_no_data, $silent),
$t
);
}
else {
$res = '';
}
}
$this->Application->Parser =& $parser;
$this->Application->Parser->DataExists = $this->Application->Parser->DataExists || $BlockParser->DataExists;
return $res;
}
/*function Kernel_Scripts($params)
{
return '<script type="text/javascript" src="'.PROTOCOL.SERVER_NAME.BASE_PATH.'/kernel3/js/grid.js"></script>';
}*/
/*function GetUserPermission($params)
{
// echo"GetUserPermission $params[name]";
if ($this->Application->RecallVar('user_type') == 1)
return 1;
else {
$perm_name = $params[name];
$aPermissions = unserialize($this->Application->RecallVar('user_permissions'));
if ($aPermissions)
return $aPermissions[$perm_name];
}
}*/
/**
* Set's parser block param value
*
* @param Array $params
* @access public
*/
function AddParam($params)
{
$parser =& $this->Application->Parser; // recallObject('TemplateParser');
foreach ($params as $param => $value) {
$this->Application->SetVar($param, $value);
$parser->SetParam($param, $value);
$parser->AddParam('/\$'.$param.'/', $value);
}
}
/*function ParseToVar($params)
{
$var = $params['var'];
$tagdata = $params['tag'];
$parser =& $this->Application->Parser; //recallObject('TemplateParser');
$res = $this->Application->ProcessTag($tagdata);
$parser->SetParam($var, $res);
$parser->AddParam('/\$'.$var.'/', $res);
return '';
}*/
/*function TagNotEmpty($params)
{
$tagdata = $params['tag'];
$res = $this->Application->ProcessTag($tagdata);
return $res != '';
}*/
/*function TagEmpty($params)
{
return !$this->TagNotEmpty($params);
}*/
/**
* Parses block and returns result
*
* @param Array $params
* @return string
* @access public
*/
function ParseBlock($params)
{
$parser =& $this->Application->Parser; // recallObject('TemplateParser');
return $parser->ParseBlock($params);
}
function RenderElement($params)
{
return $this->ParseBlock($params);
}
/**
* Checks if debug mode is on
*
* @return bool
* @access public
*/
function IsDebugMode()
{
return $this->Application->isDebugMode();
}
function MassParse($params)
{
$qty = $params['qty'];
$block = $params['block'];
$mode = $params['mode'];
$o = '';
if ($mode == 'func') {
$func = create_function('$params', '
$o = \'<tr>\';
$o.= \'<td>a\'.$params[\'param1\'].\'</td>\';
$o.= \'<td>a\'.$params[\'param2\'].\'</td>\';
$o.= \'<td>a\'.$params[\'param3\'].\'</td>\';
$o.= \'<td>a\'.$params[\'param4\'].\'</td>\';
$o.= \'</tr>\';
return $o;
');
for ($i=1; $i<$qty; $i++) {
$block_params['param1'] = rand(1, 10000);
$block_params['param2'] = rand(1, 10000);
$block_params['param3'] = rand(1, 10000);
$block_params['param4'] = rand(1, 10000);
$o .= $func($block_params);
}
return $o;
}
$block_params['name'] = $block;
for ($i=0; $i<$qty; $i++) {
$block_params['param1'] = rand(1, 10000);
$block_params['param2'] = rand(1, 10000);
$block_params['param3'] = rand(1, 10000);
$block_params['param4'] = rand(1, 10000);
$block_params['passed'] = $params['passed'];
$block_params['prefix'] = 'm';
$o.= $this->Application->ParseBlock($block_params, 1);
}
return $o;
}
function AfterScript($params)
{
$after_script = $this->Application->GetVar('after_script');
if ( $after_script ) {
return '<script type="text/javascript">'.$after_script.'</script>';
}
return '';
}
function LoggedIn($params)
{
return $this->Application->LoggedIn();
}
/**
* Checks if user is logged in and if not redirects it to template passed
*
* @param Array $params
*/
function RequireLogin($params)
{
if($permission_groups = getArrayValue($params, 'permissions'))
{
$permission_groups = explode('|', $permission_groups);
$group_has_permission = false;
foreach($permission_groups as $permission_group)
{
$permissions = explode(',', $permission_group);
$has_permission = true;
foreach($permissions as $permission)
{
$has_permission = $has_permission && $this->Application->CheckPermission($permission);
}
$group_has_permission = $group_has_permission || $has_permission;
if($group_has_permission)
{
return;
}
}
if( !$this->Application->LoggedIn() )
{
$t = $this->Application->GetVar('t');
$this->Application->Redirect( $params['login_template'], Array('next_template'=>$t) );
}
else
{
$this->Application->Redirect( $params['no_permissions_template'] );
}
}
$condition = getArrayValue($params,'condition');
if(!$condition)
{
$condition = true;
}
else
{
if( substr($condition,0,1) == '!' )
{
$condition = !$this->Application->ConfigValue( substr($condition,1) );
}
else
{
$condition = $this->Application->ConfigValue($condition);
}
}
if( !$this->Application->LoggedIn() && $condition )
{
$t = $this->Application->GetVar('t');
$this->Application->Redirect( $params['login_template'], Array('next_template'=>$t) );
}
}
function SaveReturnScript($params)
{
// admin/save_redirect.php?do=
$url = str_replace($this->Application->BaseURL(), '', $this->T($params) );
$url = explode('?', $url, 2);
$url = 'save_redirect.php?'.$url[1].'&do='.$url[0];
$this->Application->StoreVar('ReturnScript', $url);
}
+
+ function ConstOn($params)
+ {
+ $name = $this->SelectParam($params,'name,const');
+ return $this->Application->isDebugMode() && dbg_ConstOn($name);
+ }
/*
function Login($params)
{
$user_prefix = 'users';
$this->parser->registerprefix($user_prefix);
$user_class = $this->parser->processors[$user_prefix]->item_class;
$candidate = new $user_class(NULL, $this->parser->processors[$user_prefix]);
//print_pre($this->Session->Property);
$special = array_shift($params);
//echo"$special<br>";
$candidate_id = $candidate->Login($this->Session->GetProperty('username'), $this->Session->GetProperty('password'), $special);
if ($candidate_id !== false) {
$this->Session->SetField('user_id', $candidate_id);
$this->Session->Update();
$this->Session->AfterLogin();
$this->parser->register_prefix('m');
$template = array_shift($params);
if ($template == '') $template = 'index';
$location = $this->parser->do_process_tag('m', 't', Array($template));
header("Location: $location");
exit;
}
elseif ($this->Session->GetProperty('username') != '') {
$this->Session->SetProperty('login_error', 'Incorrect username or password');
}
}
*/
}
?>
\ No newline at end of file
Property changes on: trunk/core/kernel/processors/main_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.9
\ No newline at end of property
+1.10
\ No newline at end of property
Index: trunk/core/kernel/application.php
===================================================================
--- trunk/core/kernel/application.php (revision 1661)
+++ trunk/core/kernel/application.php (revision 1662)
@@ -1,1302 +1,1313 @@
<?php
/**
* Basic class for Kernel3-based Application
*
* This class is a Facade for any other class which needs to deal with Kernel3 framework.<br>
* The class incapsulates the main run-cycle of the script, provide access to all other objects in the framework.<br>
* <br>
* The class is a singleton, which means that there could be only one instance of KernelApplication in the script.<br>
* This could be guranteed by NOT calling the class constuctor directly, but rather calling KernelApplication::Instance() method,
* which returns an instance of the application. The method gurantees that it will return exactly the same instance for any call.<br>
* See singleton pattern by GOF.
* @package kernel4
*/
class kApplication {
/**
* Holds internal TemplateParser object
* @access private
* @var TemplateParser
*/
var $Parser;
var $Profiler;
/**
* Holds parser output buffer
* @access private
* @var string
*/
var $HTML;
var $DocRoot;
var $BasePath;
var $KernelPath;
var $Server;
/**
* Prevents request from beeing proceeded twice in case if application init is called mere then one time
*
* @var bool
* @todo This is not good anyway (by Alex)
*/
var $RequestProcessed = false;
/**
* The main Factory used to create
* almost any class of kernel and
* modules
*
* @access private
* @var kFactory
*/
var $Factory;
var $XMLFactory; // in use?
/**
* Holds all phrases used
* in code and template
*
* @var PhrasesCache
*/
var $Phrases;
/**
* Holds DBConnection
*
* @var kDBConnection
*/
var $DB;
/**
* Constucts KernelApplication - constructor is PRIVATE
*
* The constuructor of KernelApplication should NOT be called directly
* To create KernelApplication, call its Instance() method
* @see KerenelApplication::Instance
* @access private
*/
function kApplication()
{
global $doc_root, $base_path, $kernel_path, $protocol, $server;
$this->DocRoot = $doc_root;
$this->BasePath = $base_path;
$this->KernelPath = $kernel_path;
$this->Protocol = $protocol;
$this->Server = $server;
}
/**
* Returns kApplication instance anywhere in the script.
*
* This method should be used to get single kApplication object instance anywhere in the
* Kernel-based application. The method is guranteed to return the SAME instance of kApplication.
* Anywhere in the script you could write:
* <code>
* $application =& kApplication::Instance();
* </code>
* or in an object:
* <code>
* $this->Application =& kApplication::Instance();
* </code>
* to get the instance of kApplication. Note that we call the Instance method as STATIC - directly from the class.
* To use descendand of standard kApplication class in your project you would need to define APPLICATION_CLASS constant
* BEFORE calling kApplication::Instance() for the first time. If APPLICATION_CLASS is not defined the method would
* create and return default KernelApplication instance.
* @static
* @access public
* @return kApplication
*/
function &Instance()
{
static $instance = false;
if (!$instance) {
if (!defined('APPLICATION_CLASS')) define('APPLICATION_CLASS', 'kApplication');
$class = APPLICATION_CLASS;
$instance = new $class();
}
return $instance;
}
/**
* Initializes the Application
*
* Creates Utilites instance, HTTPQuery, Session, Profiler, TemplatesCache, Parser
* @access public
* @see HTTPQuery
* @see Session
* @see TemplatesCache
* @return void
*/
function Init()
{
if (defined('DEBUG_MODE') && DEBUG_MODE && dbg_ConstOn('DBG_PROFILE_MEMORY') ) {
global $debugger;
$debugger->appendMemoryUsage('Application before Init:');
}
if( !$this->isDebugMode() ) set_error_handler( Array(&$this,'handleError') );
$this->DB = new kDBConnection(SQL_TYPE, Array(&$this,'handleSQLError') );
$this->DB->Connect(SQL_SERVER, SQL_USER, SQL_PASS, SQL_DB);
$this->DB->debugMode = $this->isDebugMode();
-
+
$this->SetDefaultConstants();
$this->Factory = new kFactory();
$this->registerDefaultClasses();
// 1. to read configs before doing any recallObject
$config_reader =& $this->recallObject('kUnitConfigReader');
if( !$this->GetVar('m_lang') ) $this->SetVar('m_lang', $this->GetDefaultLanguageId() );
if( !$this->GetVar('m_theme') ) $this->SetVar('m_theme', $this->GetDefaultThemeId());
$this->Phrases = new PhrasesCache( $this->GetVar('m_lang') );
$this->SetVar('lang.current_id', $this->GetVar('m_lang') );
$language =& $this->recallObject('lang.current', null, Array('live_table'=>true) );
if( !$this->GetVar('m_theme') ) $this->SetVar('m_theme', $this->GetDefaultThemeId() );
$this->SetVar('theme.current_id', $this->GetVar('m_theme') );
if ( $this->GetVar('m_cat_id') === false ) $this->SetVar('m_cat_id', 3); //need to rewrite
if( !$this->RecallVar('UserGroups') )
{
$this->StoreVar('UserGroups', $this->ConfigValue('User_GuestGroup'));
}
if (!defined('ADMIN') && !$this->GetVar('admin')) {
// define('MOD_REWRITE', 1);
}
if( !$this->RecallVar('curr_iso') ) $this->StoreVar('curr_iso', $this->GetPrimaryCurrency() );
$this->ValidateLogin(); // TODO: write that method
if( $this->isDebugMode() )
{
global $debugger;
$debugger->profileFinish('kernel4_startup');
}
}
function GetDefaultLanguageId()
{
$table = $this->getUnitOption('lang','TableName');
$id_field = $this->getUnitOption('lang','IDField');
return $this->DB->GetOne('SELECT '.$id_field.' FROM '.$table.' WHERE PrimaryLang = 1');
}
function GetDefaultThemeId()
{
if (defined('DBG_FORCE_THEME') && DBG_FORCE_THEME){
return DBG_FORCE_THEME;
}
$table = $this->getUnitOption('theme','TableName');
$id_field = $this->getUnitOption('theme','IDField');
return $this->DB->GetOne('SELECT '.$id_field.' FROM '.$table.' WHERE PrimaryTheme = 1');
}
function GetPrimaryCurrency()
{
$this->setUnitOption('mod','AutoLoad',false);
$module =& $this->recallObject('mod');
$this->setUnitOption('mod','AutoLoad',true);
if( $module->Load('In-Commerce') )
{
$table = $this->getUnitOption('curr','TableName');
return $this->DB->GetOne('SELECT ISO FROM '.$table.' WHERE IsPrimary = 1');
}
else
{
return 'USD';
}
}
/**
* Registers default classes such as ItemController, GridController and LoginController
*
* Called automatically while initializing Application
* @access private
* @return void
*/
function RegisterDefaultClasses()
{
//$this->registerClass('Utilites',KERNEL_PATH.'/utility/utilities.php');
$this->registerClass('HTTPQuery',KERNEL_PATH.'/utility/http_query.php');
$this->registerClass('Session',KERNEL_PATH.'/session/session.php');
$this->registerClass('SessionStorage',KERNEL_PATH.'/session/session.php');
$this->registerClass('LoginEventHandler',KERNEL_PATH.'/session/login_event_handler.php','login_EventHandler');
$this->registerClass('kEventManager',KERNEL_PATH.'/event_manager.php','EventManager');
$this->registerClass('kUnitConfigReader',KERNEL_PATH.'/utility/unit_config_reader.php');
$this->registerClass('Params',KERNEL_PATH.'/utility/params.php','kActions');
$this->registerClass('kArray',KERNEL_PATH.'/utility/params.php','kArray');
$this->registerClass('kFormatter', KERNEL_PATH.'/utility/formatters.php');
$this->registerClass('kOptionsFormatter', KERNEL_PATH.'/utility/formatters.php');
$this->registerClass('kPictureFormatter', KERNEL_PATH.'/utility/formatters.php');
$this->registerClass('kDateFormatter', KERNEL_PATH.'/utility/formatters.php');
$this->registerClass('kLEFTFormatter', KERNEL_PATH.'/utility/formatters.php');
$this->registerClass('kMultiLanguage', KERNEL_PATH.'/utility/formatters.php');
$this->registerClass('kPasswordFormatter', KERNEL_PATH.'/utility/formatters.php');
$this->registerClass('kCCDateFormatter', KERNEL_PATH.'/utility/formatters.php');
$this->registerClass('kTempTablesHandler', KERNEL_PATH.'/utility/temp_handler.php');
$event_manager =& $this->recallObject('EventManager');
$event_manager->registerBuildEvent('kTempTablesHandler','OnTempHandlerBuild');
//$this->registerClass('Configuration',KERNEL_PATH.'/utility/configuration.php');
$this->registerClass('TemplatesCache',KERNEL_PATH.'/parser/template.php');
$this->registerClass('Template',KERNEL_PATH.'/parser/template.php');
$this->registerClass('TemplateParser',KERNEL_PATH.'/parser/template_parser.php');
$this->registerClass('MainProcessor', KERNEL_PATH.'/processors/main_processor.php','m_TagProcessor');
$this->registerClass('kMultipleFilter', KERNEL_PATH.'/utility/filters.php');
$this->registerClass('kDBList', KERNEL_PATH.'/db/dblist.php');
$this->registerClass('kDBItem', KERNEL_PATH.'/db/dbitem.php');
$this->registerClass('kDBEventHandler', KERNEL_PATH.'/db/db_event_handler.php');
$this->registerClass('kDBTagProcessor', KERNEL_PATH.'/db/db_tag_processor.php');
$this->registerClass('kTagProcessor', KERNEL_PATH.'/processors/tag_processor.php');
$this->registerClass('kEmailMessage',KERNEL_PATH.'/utility/email.php');
$this->registerClass('kSmtpClient',KERNEL_PATH.'/utility/smtp_client.php');
if (file_exists(MODULES_PATH.'/in-commerce/units/rates/currency_rates.php')) {
$this->registerClass('kCurrencyRates',MODULES_PATH.'/in-commerce/units/rates/currency_rates.php');
}
+ $this->registerClass('FCKeditor', DOC_ROOT.BASE_PATH.'/'.ADMIN_DIR.'/editor/cmseditor/fckeditor.php');
/*$this->RegisterClass('LoginController', KERNEL_PATH.'/users/login_controller.php');*/
}
/**
* Defines default constants if it's not defined before - in config.php
*
* Called automatically while initializing Application and defines:
* LOGIN_CONTROLLER, XML_FACTORY etc.
* @access private
* @return void
*/
function SetDefaultConstants()
{
if (!defined('SERVER_NAME')) define('SERVER_NAME', $_SERVER['SERVER_NAME']);
if (!defined('LOGIN_CONTROLLER')) define('LOGIN_CONTROLLER', 'LoginController');
if (!defined('XML_FACTORY')) define('XML_FACTORY', 'XMLFactory');
if (!defined('ADMINS_LIST')) define('ADMINS_LIST', '/users/users.php');
if (!defined('USER_MODEL')) define('USER_MODEL', 'Users');
if (!defined('DEFAULT_LANGUAGE_ID')) define('DEFAULT_LANGUAGE_ID', 1);
+
+ $admin_dir = $this->ConfigValue('AdminDirectory');
+ if(!$admin_dir) $admin_dir = 'admin';
+ safeDefine('ADMIN_DIR', $admin_dir);
}
function ProcessRequest()
{
$event_manager =& $this->recallObject('EventManager');
if( $this->isDebugMode() && dbg_ConstOn('DBG_SHOW_HTTPQUERY') )
{
global $debugger;
$http_query =& $this->recallObject('HTTPQuery');
$debugger->appendHTML('HTTPQuery:');
$debugger->dumpVars($http_query->_Params);
}
$event_manager->ProcessRequest();
$this->RequestProcessed = true;
}
/**
* Actually runs the parser against current template and stores parsing result
*
* This method gets t variable passed to the script, loads the template given in t variable and
* parses it. The result is store in {@link $this->HTML} property.
* @access public
* @return void
*/
function Run()
{
if (defined('DEBUG_MODE') && DEBUG_MODE && dbg_ConstOn('DBG_PROFILE_MEMORY') ) {
global $debugger;
$debugger->appendMemoryUsage('Application before Run:');
}
if (!$this->RequestProcessed) $this->ProcessRequest();
$this->InitParser();
$template_cache =& $this->recallObject('TemplatesCache');
$t = $this->GetVar('t');
if (defined('CMS') && CMS) {
if (!$template_cache->TemplateExists($t)) {
$cms_handler =& $this->recallObject('cms_EventHandler');
$t = $cms_handler->GetDesignTemplate();
}
}
if (defined('DEBUG_MODE') && DEBUG_MODE && dbg_ConstOn('DBG_PROFILE_MEMORY') ) {
global $debugger;
$debugger->appendMemoryUsage('Application before Parsing:');
}
$this->HTML = $this->Parser->Parse( $template_cache->GetTemplateBody($t), $t );
if (defined('DEBUG_MODE') && DEBUG_MODE && dbg_ConstOn('DBG_PROFILE_MEMORY') ) {
global $debugger;
$debugger->appendMemoryUsage('Application after Parsing:');
}
}
function InitParser()
{
if( !is_object($this->Parser) ) $this->Parser =& $this->recallObject('TemplateParser');
}
/**
* Send the parser results to browser
*
* Actually send everything stored in {@link $this->HTML}, to the browser by echoing it.
* @access public
* @return void
*/
function Done()
{
if (defined('DEBUG_MODE') && DEBUG_MODE && dbg_ConstOn('DBG_PROFILE_MEMORY') ) {
global $debugger;
$debugger->appendMemoryUsage('Application before Done:');
}
if ($this->GetVar('admin')) {
$reg = '/('.preg_quote(BASE_PATH, '/').'.*\.html)(#.*){0,1}(")/sU';
$this->HTML = preg_replace($reg, "$1?admin=1$2$3", $this->HTML);
}
//eval("?".">".$this->HTML);
echo $this->HTML;
$this->Phrases->UpdateCache();
$session =& $this->recallObject('Session');
$session->SaveData();
//$this->SaveBlocksCache();
}
function SaveBlocksCache()
{
if (defined('EXPERIMENTAL_PRE_PARSE')) {
$data = serialize($this->PreParsedCache);
$this->DB->Query('REPLACE '.TABLE_PREFIX.'Cache (VarName, Data, Cached) VALUES ("blocks_cache", '.$this->DB->qstr($data).', '.time().')');
}
}
// Facade
/**
* Returns current session id (SID)
* @access public
* @return longint
*/
function GetSID()
{
$session =& $this->recallObject('Session');
return $session->GetID();
}
function DestroySession()
{
$session =& $this->recallObject('Session');
$session->Destroy();
}
/**
* Returns variable passed to the script as GET/POST/COOKIE
*
* @access public
* @param string $var Variable name
* @return mixed
*/
function GetVar($var,$mode=FALSE_ON_NULL)
{
$http_query =& $this->recallObject('HTTPQuery');
return $http_query->Get($var,$mode);
}
/**
* Returns ALL variables passed to the script as GET/POST/COOKIE
*
* @access public
* @return array
*/
function GetVars()
{
$http_query =& $this->recallObject('HTTPQuery');
return $http_query->GetParams();
}
/**
* Set the variable 'as it was passed to the script through GET/POST/COOKIE'
*
* This could be useful to set the variable when you know that
* other objects would relay on variable passed from GET/POST/COOKIE
* or you could use SetVar() / GetVar() pairs to pass the values between different objects.<br>
*
* This method is formerly known as $this->Session->SetProperty.
* @param string $var Variable name to set
* @param mixed $val Variable value
* @access public
* @return void
*/
function SetVar($var,$val)
{
$http_query =& $this->recallObject('HTTPQuery');
$http_query->Set($var,$val);
}
/**
* Deletes Session variable
*
* @param string $var
*/
function RemoveVar($var)
{
$session =& $this->recallObject('Session');
return $session->RemoveVar($var);
}
/**
* Deletes HTTPQuery variable
*
* @param string $var
* @todo think about method name
*/
function DeleteVar($var)
{
$http_query =& $this->recallObject('HTTPQuery');
return $http_query->Remove($var);
}
/**
* Returns session variable value
*
* Return value of $var variable stored in Session. An optional default value could be passed as second parameter.
*
* @see SimpleSession
* @access public
* @param string $var Variable name
* @param mixed $default Default value to return if no $var variable found in session
* @return mixed
*/
function RecallVar($var,$default=false)
{
$session =& $this->recallObject('Session');
return $session->RecallVar($var,$default);
}
/**
* Stores variable $val in session under name $var
*
* Use this method to store variable in session. Later this variable could be recalled.
* @see RecallVar
* @access public
* @param string $var Variable name
* @param mixed $val Variable value
*/
function StoreVar($var, $val)
{
$session =& $this->recallObject('Session');
$session->StoreVar($var, $val);
}
function StoreVarDefault($var, $val)
{
$session =& $this->recallObject('Session');
$session->StoreVarDefault($var, $val);
}
/**
* Links HTTP Query variable with session variable
*
* If variable $var is passed in HTTP Query it is stored in session for later use. If it's not passed it's recalled from session.
* This method could be used for making sure that GetVar will return query or session value for given
* variable, when query variable should overwrite session (and be stored there for later use).<br>
* This could be used for passing item's ID into popup with multiple tab -
* in popup script you just need to call LinkVar('id', 'current_id') before first use of GetVar('id').
* After that you can be sure that GetVar('id') will return passed id or id passed earlier and stored in session
* @access public
* @param string $var HTTP Query (GPC) variable name
* @param mixed $ses_var Session variable name
* @param mixed $default Default variable value
*/
function LinkVar($var, $ses_var=null, $default='')
{
if (!isset($ses_var)) $ses_var = $var;
if ($this->GetVar($var) !== false)
{
$this->StoreVar($ses_var, $this->GetVar($var));
}
else
{
$this->SetVar($var, $this->RecallVar($ses_var, $default));
}
}
/**
* Returns variable from HTTP Query, or from session if not passed in HTTP Query
*
* The same as LinkVar, but also returns the variable value taken from HTTP Query if passed, or from session if not passed.
* Returns the default value if variable does not exist in session and was not passed in HTTP Query
*
* @see LinkVar
* @access public
* @param string $var HTTP Query (GPC) variable name
* @param mixed $ses_var Session variable name
* @param mixed $default Default variable value
* @return mixed
*/
function GetLinkedVar($var, $ses_var=null, $default='')
{
if (!isset($ses_var)) $ses_var = $var;
$this->LinkVar($var, $ses_var, $default);
return $this->GetVar($var);
}
/*function ExtractByMask($array, $mask, $key_id=1, $ret_mode=1)
{
$utils =& $this->recallObject('Utilities');
return $utils->ExtractByMask($array, $mask, $key_id, $ret_mode);
}
function GetSelectedIDs($mask, $format)
{
$http_query =& $this->recallObject('HTTPQuery');
return $http_query->GetSelectedIDs($mask, $format);
}
function GetSelectedIDsArray($mask, $value_mask="%s,")
{
$http_query =& $this->recallObject('HTTPQuery');
return $http_query->GetSelectedIDsArray($mask, $value_mask);
}*/
/**
* Returns configurtion option
*
* @param string $option
* @return string
* @access public
*/
/*function ConfigOption($option)
{
$config =& $this->recallObject('Configuration');
return $config->Get($option);
}*/
/**
* Sets configuration option
*
* @param string $option
* @param string $value
* @return bool
* @access public
*/
/*function SetConfigOption($option,$value)
{
$config =& $this->recallObject('Configuration');
return $config->Set($option, $value);
}*/
function AddBlock($name, $tpl)
{
$this->cache[$name] = $tpl;
}
function SetTemplateBody($title,$body)
{
$templates_cache =& $this->recallObject('TemplatesCache');
$templates_cache->SetTemplateBody($title,$body);
}
function ProcessTag($tag_data)
{
$a_tag = new Tag($tag_data,$this->Parser);
return $a_tag->DoProcessTag();
}
function ProcessParsedTag($prefix, $tag, $params)
{
$a_tag = new Tag('',$this->Parser);
$a_tag->Tag = $tag;
$a_tag->Processor = $prefix;
$a_tag->NamedParams = $params;
return $a_tag->DoProcessTag();
}
/* DEFINETLY NEEDS TO BE MOVED AWAY!!!!! */
/*var $email_body;
function Email($params)
{
$this->email_body = $this->ParseBlock($params);
$from = $this->GetVar('email_from');
$to = $this->GetVar('email_to');
$replay = $this->GetVar('email_replay');
if ( $replay == "" ) $replay = $from;
$subject = $this->GetVar('email_subject');
$charset = $this->GetVar('email_charset');
// $display = $this->GetVar('email_display');
$display = 0;
if (!isset($charset) || $charset == '') $charset = 'US-ASCII';
$mime = $this->GetVar('email_mime');
if ($mime == 'yes') {
$mime_mail = new MIMEMail($to, $from, $subject, $charset);
$mime_mail->mailbody($this->email_body);
if ($f_name = $this->GetVar('email_attach')) {
$full_path = DOC_ROOT.BASE_PATH.'/'.$f_name;
$data = '';
if(file_exists($full_path)) {
$fd = fopen($full_path, "r");
$data = fread($fd, filesize($full_path));
fclose($fd);
}
else exit;
$filename = $this->GetVar('email_attach_filename');
$type = $this->GetVar('email_attach_type');
$mime_mail->attachfile_raw($data, $filename, $type);
$mime_mail->send();
}
}
else {
$headers.="From: $from\n";
$headers.="Reply-To: $replay\n";
$headers.="Content-Type: text/html; charset=\"$charset\"\n";
if ( $display == 1 ) {
echo "<pre>";
echo " from : $from <br>";
echo " to : $to <br>";
echo " replay : $replay <br>";
echo " subject : $subject <br>";
echo " this->email_body : $this->email_body <br>";
echo " headers : $headers <br>";
echo "</pre>";
}
mail($to, $subject, $this->email_body, $headers);
}
}*/
/**
* Return ADODB Connection object
*
* Returns ADODB Connection object already connected to the project database, configurable in config.php
* @access public
* @return ADODBConnection
*/
function &GetADODBConnection()
{
return $this->DB;
}
function ParseBlock($params,$pass_params=0,$as_template=false)
{
if (substr($params['name'], 0, 5) == 'html:') return substr($params['name'], 6);
return $this->Parser->ParseBlock($params, $pass_params, $as_template);
}
function &GetXMLFactory()
{
return $this->XMLFactory;
}
/**
* Return href for template
*
* @access public
* @param string $t Template path
* @var string $prefix index.php prefix - could be blank, 'admin'
*/
function HREF($t, $prefix='', $params=null, $index_file=null)
{
global $HTTP_SERVER_VARS;
if (defined('ADMIN') && $prefix == '') $prefix='/admin';
if (defined('ADMIN') && $prefix == '_FRONT_END_') $prefix = '';
$index_file = isset($index_file) ? $index_file : (defined('INDEX_FILE') ? INDEX_FILE : basename($_SERVER['PHP_SELF']));
if( isset($params['index_file']) ) $index_file = $params['index_file'];
if (getArrayValue($params, 'opener') == 'u') {
$opener_stack=$this->RecallVar('opener_stack');
if($opener_stack) {
$opener_stack=unserialize($opener_stack);
if (count($opener_stack) > 0) {
list($index_file, $env) = explode('|', $opener_stack[count($opener_stack)-1]);
$ret = $this->BaseURL($prefix).$index_file.'?'.ENV_VAR_NAME.'='.$env;
if( getArrayValue($params,'escape') ) $ret = addslashes($ret);
return $ret;
}
else {
//define('DBG_REDIRECT', 1);
$t = $this->GetVar('t');
}
}
else {
//define('DBG_REDIRECT', 1);
$t = $this->GetVar('t');
}
}
$pass = isset($params['pass']) ? $params['pass'] : '';
$pass_events = isset($params['pass_events']) ? $params['pass_events'] : false; // pass events with url
if (defined('MOD_REWRITE') && MOD_REWRITE) {
$env = $this->BuildEnv('', $params, $pass, $pass_events, false);
$env = ltrim($env, ':-');
$session =& $this->recallObject('Session');
$sid = $session->NeedQueryString() ? '?sid='.$this->GetSID() : '';
// $env = str_replace(':', '/', $env);
$ret = rtrim($this->BaseURL($prefix).$t.'.html/'.$env.'/'.$sid, '/');
}
else {
$env = $this->BuildEnv($t, $params, $pass, $pass_events);
$ret = $this->BaseURL($prefix).$index_file.'?'.$env;
}
return $ret;
}
function BuildEnv($t, $params, $pass='all', $pass_events=false, $env_var=true)
{
$session =& $this->recallObject('Session');
$sid = $session->NeedQueryString() && !(defined('MOD_REWRITE') && MOD_REWRITE) ? $this->GetSID() : '';
if( getArrayValue($params,'admin') == 1 ) $sid = $this->GetSID();
$ret = '';
if ($env_var) {
$ret = ENV_VAR_NAME.'=';
}
$ret .= defined('INPORTAL_ENV') ? $sid.'-'.$t : $sid.':'.$t;
$pass = str_replace('all', trim($this->GetVar('passed'), ','), $pass);
if(strlen($pass) > 0)
{
$pass_info = array_unique( explode(',',$pass) ); // array( prefix[.special], prefix[.special] ...
foreach($pass_info as $pass_element)
{
$ret.=':';
list($prefix)=explode('.',$pass_element);
$query_vars = $this->getUnitOption($prefix,'QueryString');
//if pass events is off and event is not implicity passed
if(!$pass_events && !isset($params[$pass_element.'_event'])) {
$params[$pass_element.'_event'] = ''; // remove event from url if requested
//otherwise it will use value from get_var
}
if($query_vars)
{
$tmp_string=Array(0=>$pass_element);
foreach($query_vars as $index => $var_name)
{
//if value passed in params use it, otherwise use current from application
$tmp_string[$index] = isset( $params[$pass_element.'_'.$var_name] ) ? $params[$pass_element.'_'.$var_name] : $this->GetVar($pass_element.'_'.$var_name);
if ( isset($params[$pass_element.'_'.$var_name]) ) {
unset( $params[$pass_element.'_'.$var_name] );
}
}
$escaped = array();
foreach ($tmp_string as $tmp_val) {
$escaped[] = str_replace(Array('-',':'), Array('\-','\:'), $tmp_val);
}
if ($this->getUnitOption($prefix, 'PortalStyleEnv') == true) {
$ret.= array_shift($escaped).array_shift($escaped).'-'.implode('-',$escaped);
}
else {
$ret.=implode('-',$escaped);
}
}
}
}
unset($params['pass']);
unset($params['opener']);
unset($params['m_event']);
if ($this->GetVar('admin') && !isset($params['admin'])) {
$params['admin'] = 1;
}
+ if( getArrayValue($params,'escape') )
+ {
+ $ret = addslashes($ret);
+ unset($params['escape']);
+ }
+
foreach ($params as $param => $value)
{
$ret .= '&'.$param.'='.$value;
}
- if( getArrayValue($params,'escape') ) $ret = addslashes($ret);
+
return $ret;
}
function BaseURL($prefix='')
{
return PROTOCOL.SERVER_NAME.(defined('PORT')?':'.PORT : '').BASE_PATH.$prefix.'/';
}
function Redirect($t='', $params=null, $prefix='', $index_file=null)
{
if ($t == '' || $t === true) $t = $this->GetVar('t');
// pass prefixes and special from previous url
if (!isset($params['pass'])) $params['pass'] = 'all';
$location = $this->HREF($t, $prefix, $params, $index_file);
$a_location = $location;
$location = "Location: $location";
//echo " location : $location <br>";
if (headers_sent() != '' || ($this->isDebugMode() && dbg_ConstOn('DBG_REDIRECT')) ) {
/*$GLOBALS['debugger']->appendTrace();
echo "<b>Debug output above!!!</b> Proceed to redirect: <a href=\"$a_location\">$a_location</a><br>";*/
echo '<script language="javascript" type="text/javascript">window.location.href = \''.$a_location.'\';</script>';
}
else {
header("$location");
}
$session =& $this->recallObject('Session');
$session->SaveData();
$this->SaveBlocksCache();
exit;
}
function Phrase($label)
{
return $this->Phrases->GetPhrase($label);
}
/**
* Replace language tags in exclamation marks found in text
*
* @param string $text
* @param bool $force_escape force escaping, not escaping of resulting string
* @return string
* @access public
*/
function ReplaceLanguageTags($text, $force_escape=null)
{
return $this->Phrases->ReplaceLanguageTags($text,$force_escape);
}
/**
* Validtates user in session if required
*
*/
function ValidateLogin()
{
if (defined('LOGIN_REQUIRED'))
{
// Original Kostja call
//$login_controller =& $this->Factory->MakeClass(LOGIN_CONTROLLER, Array('model' => USER_MODEL, 'prefix' => 'login'));
// Call proposed by Alex
//$login_controller =& $this->RecallObject(LOGIN_CONTROLLER, Array('model' => USER_MODEL, 'prefix' => 'login'));
//$login_controller->CheckLogin();
}
}
/**
* Returns configuration option value by name
*
* @param string $name
* @return string
*/
function ConfigValue($name)
{
return $this->DB->GetOne('SELECT VariableValue FROM '.TABLE_PREFIX.'ConfigurationValues WHERE VariableName = '.$this->DB->qstr($name) );
}
/**
* Allows to process any type of event
*
* @param kEvent $event
* @access public
* @author Alex
*/
function HandleEvent(&$event, $params=null, $specificParams=null)
{
if ( isset($params) ) {
$event = new kEvent( $params, $specificParams );
}
$event_manager =& $this->recallObject('EventManager');
$event_manager->HandleEvent($event);
}
/**
* Registers new class in the factory
*
* @param string $real_class
* @param string $file
* @param string $pseudo_class
* @access public
* @author Alex
*/
function registerClass($real_class,$file,$pseudo_class=null)
{
$this->Factory->registerClass($real_class,$file,$pseudo_class);
}
/**
* Registers Hook from subprefix event to master prefix event
*
* @param string $hookto_prefix
* @param string $hookto_special
* @param string $hookto_event
* @param string $mode
* @param string $do_prefix
* @param string $do_special
* @param string $do_event
* @param string $conditional
* @access public
* @todo take care of a lot parameters passed
* @author Kostja
*/
function registerHook($hookto_prefix, $hookto_special, $hookto_event, $mode, $do_prefix, $do_special, $do_event, $conditional)
{
$event_manager =& $this->recallObject('EventManager');
$event_manager->registerHook($hookto_prefix, $hookto_special, $hookto_event, $mode, $do_prefix, $do_special, $do_event, $conditional);
}
/**
* Allows one TagProcessor tag act as other TagProcessor tag
*
* @param Array $tag_info
* @author Kostja
*/
function registerAggregateTag($tag_info)
{
$aggregator =& $this->recallObject('TagsAggregator', 'kArray');
$aggregator->SetArrayValue($tag_info['AggregateTo'], $tag_info['AggregatedTagName'], Array($tag_info['LocalPrefix'], $tag_info['LocalTagName']));
}
/**
* Returns object using params specified,
* creates it if is required
*
* @param string $name
* @param string $pseudo_class
* @param Array $event_params
* @return Object
* @author Alex
*/
function &recallObject($name,$pseudo_class=null,$event_params=Array())
{
$o1 =& $this->Factory->getObject($name,$pseudo_class,$event_params);
//$o1->param1 = 'one';
/*$func_args = func_get_args();
$factory =& $this->Factory;
$o2 =& call_user_func_array( Array(&$factory, 'getObject'), $func_args );*/
//$o2->param1 = 'two';
return $o1;
}
/**
* Checks if object with prefix passes was already created in factory
*
* @param string $name object presudo_class, prefix
* @return bool
* @author Kostja
*/
function hasObject($name)
{
return isset($this->Factory->Storage[$name]);
}
/**
* Removes object from storage by given name
*
* @param string $name Object's name in the Storage
* @author Kostja
*/
function removeObject($name)
{
$this->Factory->DestroyObject($name);
}
/**
* Get's real class name for pseudo class,
* includes class file and creates class
* instance
*
* @param string $pseudo_class
* @return Object
* @access public
* @author Alex
*/
function &makeClass($pseudo_class)
{
$func_args = func_get_args();
return call_user_func_array( Array(&$this->Factory, 'makeClass'), $func_args);
}
/**
* Checks if application is in debug mode
*
* @return bool
* @access public
* @author Alex
*/
function isDebugMode()
{
return defined('DEBUG_MODE') && DEBUG_MODE;
}
/**
* Checks if it is admin
*
* @return bool
* @author Alex
*/
function IsAdmin()
{
return defined('ADMIN') && ADMIN;
}
/**
* Reads unit (specified by $prefix)
* option specified by $option
*
* @param string $prefix
* @param string $option
* @return string
* @access public
* @author Alex
*/
function getUnitOption($prefix,$option)
{
$unit_config_reader =& $this->recallObject('kUnitConfigReader');
return $unit_config_reader->getUnitOption($prefix,$option);
}
/**
* Set's new unit option value
*
* @param string $prefix
* @param string $name
* @param string $value
* @author Alex
* @access public
*/
function setUnitOption($prefix,$option,$value)
{
$unit_config_reader =& $this->recallObject('kUnitConfigReader');
return $unit_config_reader->setUnitOption($prefix,$option,$value);
}
/**
* Read all unit with $prefix options
*
* @param string $prefix
* @return Array
* @access public
* @author Alex
*/
function getUnitOptions($prefix)
{
$unit_config_reader =& $this->recallObject('kUnitConfigReader');
return $unit_config_reader->getUnitOptions($prefix);
}
/**
* Splits any mixing of prefix and
* special into correct ones
*
* @param string $prefix_special
* @return Array
* @access public
* @author Alex
*/
function processPrefix($prefix_special)
{
return $this->Factory->processPrefix($prefix_special);
}
/**
* Set's new event for $prefix_special
* passed
*
* @param string $prefix_special
* @param string $event_name
* @access public
*/
function setEvent($prefix_special,$event_name)
{
$event_manager =& $this->recallObject('EventManager');
$event_manager->setEvent($prefix_special,$event_name);
}
/**
* SQL Error Handler
*
* @param int $code
* @param string $msg
* @param string $sql
* @return bool
* @access private
* @author Alex
*/
function handleSQLError($code,$msg,$sql)
{
global $debugger;
if($debugger)
{
$errorLevel=defined('DBG_SQL_FAILURE') && DBG_SQL_FAILURE ? E_USER_ERROR : E_USER_WARNING;
$debugger->dumpVars($_REQUEST);
$debugger->appendTrace();
$error_msg = '<span class="debug_error">'.$msg.' ('.$code.')</span><br><a href="javascript:SetClipboard(\''.htmlspecialchars($sql).'\');"><b>SQL</b></a>: '.$debugger->formatSQL($sql);
$long_id=$debugger->mapLongError($error_msg);
trigger_error( substr($msg.' ('.$code.') ['.$sql.']',0,1000).' #'.$long_id, $errorLevel);
return true;
}
else
{
$errorLevel = defined('IS_INSTALL') && IS_INSTALL ? E_USER_WARNING : E_USER_ERROR;
trigger_error('<b>SQL Error</b> in sql: '.$sql.', code <b>'.$code.'</b> ('.$msg.')', $errorLevel);
/*echo '<b>xProcessing SQL</b>: '.$sql.'<br>';
echo '<b>Error ('.$code.'):</b> '.$msg.'<br>';*/
return $errorLevel == E_USER_ERROR ? false : true;
}
}
/**
* Default error handler
*
* @param int $errno
* @param string $errstr
* @param string $errfile
* @param int $errline
* @param Array $errcontext
*/
function handleError($errno, $errstr, $errfile = '', $errline = '', $errcontext = '')
{
$fp = fopen(DOC_ROOT.BASE_PATH.'/silent_log.txt','a');
$time = date('d/m/Y H:i:s');
fwrite($fp, '['.$time.'] #'.$errno.': '.strip_tags($errstr).' in ['.$errfile.'] on line '.$errline."\n");
fclose($fp);
}
/**
* Returns & blocks next ResourceId available in system
*
* @return int
* @access public
* @author Eduard
*/
function NextResourceId()
{
$this->DB->Query('LOCK TABLES '.TABLE_PREFIX.'IdGenerator WRITE');
$this->DB->Query('UPDATE '.TABLE_PREFIX.'IdGenerator SET lastid = lastid+1');
$id = $this->DB->GetOne("SELECT lastid FROM ".TABLE_PREFIX."IdGenerator");
$this->DB->Query('UNLOCK TABLES');
return $id;
}
/**
* Returns main prefix for subtable prefix passes
*
* @param string $current_prefix
* @return string
* @access public
* @author Kostja
*/
function GetTopmostPrefix($current_prefix)
{
while ( $parent_prefix = $this->getUnitOption($current_prefix, 'ParentPrefix') )
{
$current_prefix = $parent_prefix;
}
return $current_prefix;
}
function EmailEventAdmin($email_event_name, $to_user_id = -1, $send_params = false)
{
return $this->EmailEvent($email_event_name, 1, $to_user_id, $send_params);
}
function EmailEventUser($email_event_name, $to_user_id = -1, $send_params = false)
{
return $this->EmailEvent($email_event_name, 0, $to_user_id, $send_params);
}
function EmailEvent($email_event_name, $email_event_type, $to_user_id = -1, $send_params = false)
{
$event = new kEvent('emailevents:OnEmailEvent');
$event->setEventParam('EmailEventName', $email_event_name);
$event->setEventParam('EmailEventToUserId', $to_user_id);
$event->setEventParam('EmailEventType', $email_event_type);
if ($send_params){
$event->setEventParam('DirectSendParams', $send_params);
}
$this->HandleEvent($event);
return $event;
}
function LoggedIn()
{
$user =& $this->recallObject('u');
return ($user->GetDBField('PortalUserId') > 0);
}
function CheckPermission($name, $cat_id = null)
{
if(!$cat_id)
{
$cat_id = $this->GetVar('m_cat_id');
}
$sql = 'SELECT ParentPath FROM '.$this->getUnitOption('c', 'TableName').'
WHERE CategoryId = '.$cat_id;
$cat_hierarchy = $this->DB->GetOne($sql);
$cat_hierarchy = explode('|', $cat_hierarchy);
array_shift($cat_hierarchy);
array_pop($cat_hierarchy);
$cat_hierarchy = array_reverse($cat_hierarchy);
$groups = $this->RecallVar('UserGroups');
foreach($cat_hierarchy as $category_id)
{
$sql = 'SELECT PermissionValue FROM '.TABLE_PREFIX.'Permissions
WHERE Permission = "'.$name.'"
AND CatId = '.$category_id.'
AND GroupId IN ('.$groups.')';
$res = $this->DB->GetOne($sql);
if( $res !== false )
{
return $res;
}
}
return 0;
}
}
?>
\ No newline at end of file
Property changes on: trunk/core/kernel/application.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.19
\ No newline at end of property
+1.20
\ No newline at end of property
Index: trunk/core/units/help/help_config.php
===================================================================
--- trunk/core/units/help/help_config.php (revision 1661)
+++ trunk/core/units/help/help_config.php (revision 1662)
@@ -1,15 +1,16 @@
<?php
$config = Array(
'Prefix' => 'h',
- 'EventHandlerClass' => Array('class'=>'kEventHandler','file'=>'','build_event'=>'OnBuild'),
+ 'EventHandlerClass' => Array('class'=>'HelpEventHandler','file'=>'help_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'HelpTagProcessor','file'=>'help_tag_processor.php','build_event'=>'OnBuild'),
'QueryString' => Array(
1 => 'prefix',
2 => 'icon',
3 => 'module',
4 => 'title_preset',
+ 5 => 'event',
),
);
?>
\ No newline at end of file
Property changes on: trunk/core/units/help/help_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.3
\ No newline at end of property
Index: trunk/core/units/help/help_tag_processor.php
===================================================================
--- trunk/core/units/help/help_tag_processor.php (revision 1661)
+++ trunk/core/units/help/help_tag_processor.php (revision 1662)
@@ -1,62 +1,80 @@
<?php
class HelpTagProcessor extends kDBTagProcessor
{
function SectionTitle($params)
{
$rets = explode('.', $this->Application->GetVar('h_prefix') );
$this->Prefix = $rets[0];
$this->Special = isset($rets[1]) ? $rets[1] : '';
//$this->Prefix = $this->Application->GetVar('h_prefix');
$title_preset_name = $this->Application->GetVar('h_title_preset');
$title_presets = $this->Application->getUnitOption($this->Prefix,'TitlePresets');
$format = $title_presets[$title_preset_name]['format'];
$format = preg_replace('/[ ]*( ([\'"]{1}) | ([\(]{1}) ) \#.*\# (?(2) \1 | \) )[ ]*/Ux', ' ', $format);
$title_presets[$title_preset_name]['format'] = $format;
$this->Application->setUnitOption($this->Prefix,'TitlePresets',$title_presets);
$params['title_preset'] = $title_preset_name;
$ret = parent::SectionTitle($params);
return $ret;
}
function ShowHelp($params)
{
$module = $this->Application->GetVar('h_module');
$title_preset = $this->Application->GetVar('h_title_preset');
$sql = 'SELECT Path FROM '.TABLE_PREFIX.'Modules WHERE LOWER(Name)='.$this->Conn->qstr( strtolower($module) );
$module_path = $this->Conn->GetOne($sql);
$help_file = FULL_PATH.'/'.$module_path.'module_help/'.$title_preset.'.txt';
if( $this->Application->isDebugMode() && dbg_ConstOn('DBG_EDIT_HELP') )
{
global $debugger;
$ret = 'Help file: <b>'.$debugger->getLocalFile($help_file).'</b><hr>';
}
else
{
$ret = '';
}
- if( file_exists($help_file) )
+ $help_data = file_exists($help_file) ? file_get_contents($help_file) : false;
+
+ if( $this->Application->isDebugMode() && dbg_ConstOn('DBG_HELP') )
{
- $ret .= file_get_contents($help_file);
+ $this->Application->Factory->includeClassFile('FCKeditor');
+ $oFCKeditor = new FCKeditor('HelpContent');
+
+ $oFCKeditor->BasePath = $this->Application->BaseURL('/'.ADMIN_DIR.'/editor/cmseditor');
+ $oFCKeditor->Width = '100%';
+ $oFCKeditor->Height = '300';
+ $oFCKeditor->ToolbarSet = 'Advanced';
+ $oFCKeditor->Value = $help_data;
+
+ $oFCKeditor->Config = Array(
+ 'UserFilesPath' => DOC_ROOT.BASE_PATH.'kernel/user_files',
+ 'ProjectPath' => $this->Application->ConfigValue('Site_Path'),
+ 'CustomConfigurationsPath' => rtrim( $this->Application->BaseURL('/'.ADMIN_DIR.'/editor/inp_fckconfig.js'), '/'),
+ );
+
+ $ret .= $oFCKeditor->CreateHtml();
}
else
{
- $ret .= $this->Application->Phrase('la_section_help_file_missing');
+ $ret .= $help_data ? $help_data : $this->Application->Phrase('la_section_help_file_missing');
}
+
return $ret;
}
}
?>
\ No newline at end of file
Property changes on: trunk/core/units/help/help_tag_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.3
\ No newline at end of property
Index: trunk/core/units/help/help_event_handler.php
===================================================================
--- trunk/core/units/help/help_event_handler.php (nonexistent)
+++ trunk/core/units/help/help_event_handler.php (revision 1662)
@@ -0,0 +1,30 @@
+<?php
+
+ class HelpEventHandler extends InpDBEventHandler
+ {
+
+ /**
+ * Saves help file or created new one
+ *
+ * @param kEvent $event
+ */
+ function OnSaveHelp(&$event)
+ {
+ $new_content = $this->Application->GetVar('HelpContent');
+
+ $module = $this->Application->GetVar('h_module');
+ $title_preset = $this->Application->GetVar('h_title_preset');
+
+ $sql = 'SELECT Path FROM '.TABLE_PREFIX.'Modules WHERE LOWER(Name)='.$this->Conn->qstr( strtolower($module) );
+ $module_path = $this->Conn->GetOne($sql);
+
+ $help_file = FULL_PATH.'/'.$module_path.'module_help/'.$title_preset.'.txt';
+ $help_data = $this->Application->GetVar('HelpContent');
+
+ $fp = fopen($help_file,'w');
+ fwrite($fp,$help_data);
+ fclose($fp);
+ }
+ }
+
+?>
\ No newline at end of file
Property changes on: trunk/core/units/help/help_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/core/units/general/my_application.php
===================================================================
--- trunk/core/units/general/my_application.php (revision 1661)
+++ trunk/core/units/general/my_application.php (revision 1662)
@@ -1,55 +1,46 @@
<?php
k4_include_once(MODULES_PATH.'/kernel/units/general/inp_db_event_handler.php');
class MyApplication extends kApplication {
function RegisterDefaultClasses()
{
parent::RegisterDefaultClasses();
$this->registerClass('Inp1Parser',MODULES_PATH.'/kernel/units/general/inp1_parser.php','Inp1Parser');
$this->registerClass('InpSession',MODULES_PATH.'/kernel/units/general/inp_ses_storage.php','Session');
$this->registerClass('InpSessionStorage',MODULES_PATH.'/kernel/units/general/inp_ses_storage.php','SessionStorage');
$this->registerClass('kCatDBItem',MODULES_PATH.'/kernel/units/general/cat_dbitem.php');
$this->registerClass('kCatDBList',MODULES_PATH.'/kernel/units/general/cat_dblist.php');
$this->registerClass('kCatDBEventHandler',MODULES_PATH.'/kernel/units/general/cat_event_handler.php');
$this->registerClass('InpLoginEventHandler',MODULES_PATH.'/kernel/units/general/inp_login_event_handler.php','login_EventHandler');
$this->registerClass('InpDBEventHandler',MODULES_PATH.'/kernel/units/general/inp_db_event_handler.php','kDBEventHandler');
$this->registerClass('InpTempTablesHandler',MODULES_PATH.'/kernel/units/general/inp_temp_handler.php','kTempTablesHandler');
$this->registerClass('InpUnitConfigReader',MODULES_PATH.'/kernel/units/general/inp_unit_config_reader.php','kUnitConfigReader');
$this->registerClass('InpCustomFieldsHelper',MODULES_PATH.'/kernel/units/general/custom_fields.php','InpCustomFieldsHelper');
$this->registerClass('kCountryStatesHelper',MODULES_PATH.'/kernel/units/general/country_states.php','CountryStatesHelper');
}
/**
* Checks if user is logged in, and creates
* user object if so. User object can be recalled
* later using "u" prefix. Also you may
* get user id by getting "u_id" variable.
*
* @access private
*/
function ValidateLogin()
{
$session =& $this->recallObject('Session');
$user_id = $session->GetField('PortalUserId');
if (!$user_id) $user_id = -2;
$this->SetVar('u_id', $user_id);
$this->StoreVar('user_id', $user_id);
}
-
- function Init()
- {
- parent::Init();
-
- $admin_dir = $this->ConfigValue('AdminDirectory');
- if(!$admin_dir) $admin_dir = 'admin';
- define('ADMIN_DIR', $admin_dir);
- }
}
?>
\ No newline at end of file
Property changes on: trunk/core/units/general/my_application.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.6
\ No newline at end of property
+1.7
\ No newline at end of property
Index: trunk/core/admin_templates/stylesheets/style_editor.tpl
===================================================================
--- trunk/core/admin_templates/stylesheets/style_editor.tpl (revision 1661)
+++ trunk/core/admin_templates/stylesheets/style_editor.tpl (revision 1662)
@@ -1,145 +1,145 @@
<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"/>
+<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="style_edit" module="in-portal" 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.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('reset_to_base', '<inp2:m_phrase label="la_ToolTip_ResetToBase"/>', function() {
submit_event('selectors','OnResetToBase');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_block name="inp_edit_color"/>
<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"/>"
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(null,'<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" subfield="$subfield"/>" id="<inp2:$prefix_InputName field="$field" subfield="$subfield"/>" onchange="<inp2:m_Param name="onchange"/>">
<inp2:$prefix_PredefinedOptions field="$field" value_field="$value_field" subfield="$subfield" block="inp_option_item" selected="selected"/>
</select>
</td>
<td class="error"><inp2:$prefix_Error field="$field"/>&nbsp;</td>
</tr>
<inp2:m_blockend/>
<inp2:m_block name="subsection_collapse"/>
<tr class="subsectiontitle">
<td colspan="5"><inp2:m_param name="title"/></td>
</tr>
<inp2:m_blockend/>
<inp2:selectors_SaveWarning name="grid_save_warning"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<inp2:m_ParseBlock name="subsection_collapse" title="!la_Font!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="font" title="!la_fld_Font!" size="50"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="font-family" title="!la_fld_FontFamily!" size="40"/>
<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_options_style" prefix="selectors" field="SelectorData" subfield="font-style" value_field="FontStyle" title="!la_fld_FontStyle!"/>
<inp2:m_ParseBlock name="inp_edit_options_style" prefix="selectors" field="SelectorData" subfield="font-weight" value_field="FontWeight" title="!la_fld_FontWeight!"/>
<inp2:m_ParseBlock name="inp_edit_options_style" prefix="selectors" field="SelectorData" subfield="text-align" value_field="TextAlign" title="!la_fld_TextAlign!"/>
<inp2:m_ParseBlock name="inp_edit_options_style" prefix="selectors" field="SelectorData" subfield="text-decoration" value_field="TextDecoration" title="!la_fld_TextDecoration!"/>
<inp2:m_ParseBlock name="subsection_collapse" title="!la_Background!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="background" title="!la_fld_Background!" size="50"/>
<inp2:m_ParseBlock name="inp_edit_color" prefix="selectors" field="SelectorData" subfield="background-color" title="!la_fld_BackgroundColor!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="background-image" title="!la_fld_BackgroundImage!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="background-repeat" title="!la_fld_BackgroundRepeat!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="background-attachment" title="!la_fld_BackgroundAttachment!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="background-position" title="!la_fld_BackgroundPosition!"/>
<inp2:m_ParseBlock name="subsection_collapse" title="!la_Borders!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="border" title="!la_fld_Borders!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="border-top" title="!la_fld_BorderTop!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="border-right" title="!la_fld_BorderRight!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="border-bottom" title="!la_fld_BorderBottom!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="border-left" title="!la_fld_BorderLeft!"/>
<inp2:m_ParseBlock name="subsection_collapse" title="!la_Paddings!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="padding" title="!la_fld_Paddings!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="padding-top" title="!la_fld_PaddingTop!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="padding-right" title="!la_fld_PaddingRight!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="padding-bottom" title="!la_fld_PaddingBottom!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="padding-left" title="!la_fld_PaddingLeft!"/>
<inp2:m_ParseBlock name="subsection_collapse" title="!la_Margins!"/>
<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!"/>
<inp2:m_ParseBlock name="subsection_collapse" title="!la_PositionAndVisibility!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="width" title="!la_fld_Width!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="height" title="!la_fld_Height!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="left" title="!la_fld_Left!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="top" title="!la_fld_Top!"/>
<inp2:m_ParseBlock name="inp_edit_options_style" prefix="selectors" field="SelectorData" subfield="position" value_field="StylePosition" title="!la_fld_Position!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorData" subfield="z-index" title="!la_fld_Z-Index!"/>
<inp2:m_ParseBlock name="inp_edit_options_style" prefix="selectors" field="SelectorData" subfield="display" value_field="StyleDisplay" title="!la_fld_Display!"/>
<inp2:m_ParseBlock name="inp_edit_options_style" prefix="selectors" field="SelectorData" subfield="visibility" value_field="StyleVisibility" title="!la_fld_Visibility!"/>
<inp2:m_ParseBlock name="inp_edit_options_style" prefix="selectors" field="SelectorData" subfield="cursor" value_field="StyleCursor" title="!la_fld_Cursor!"/>
</table>
<script language="javascript" type="text/javascript">
InitColorSelector();
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: trunk/core/admin_templates/stylesheets/style_editor.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.3
\ No newline at end of property
Index: trunk/core/admin_templates/stylesheets/stylesheets_list.tpl
===================================================================
--- trunk/core/admin_templates/stylesheets/stylesheets_list.tpl (revision 1661)
+++ trunk/core/admin_templates/stylesheets/stylesheets_list.tpl (revision 1662)
@@ -1,75 +1,75 @@
<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="styles_list" module="in-commerce" icon="icon46_style"/>
+<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="styles_list" module="in-portal" icon="icon46_style"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
std_edit_item('css', 'stylesheets/stylesheets_edit');
}
var a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('new_style', '<inp2:m_phrase label="la_ToolTip_NewStylesheet"/>',
function() {
std_precreate_item('css', 'stylesheets/stylesheets_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('css')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve"/>', function() {
submit_event('css','OnMassApprove');
}
) );
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline"/>', function() {
submit_event('css','OnMassDecline');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone"/>', function() {
submit_event('css','OnMassClone');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_block name="grid_description_td" />
<td valign="top" class="text"><inp2:$PrefixSpecial_field field="$field" grid="$grid" no_special="$no_special" cut_first="100"/></td>
<inp2:m_blockend />
<inp2:m_ParseBlock name="grid" PrefixSpecial="css" IdField="StylesheetId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" has_filters="has_filters" search="on"/>
<script type="text/javascript">
Grids['css'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','clone') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: trunk/core/admin_templates/stylesheets/stylesheets_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.4
\ No newline at end of property
Index: trunk/core/admin_templates/stylesheets/stylesheets_edit_base.tpl
===================================================================
--- trunk/core/admin_templates/stylesheets/stylesheets_edit_base.tpl (revision 1661)
+++ trunk/core/admin_templates/stylesheets/stylesheets_edit_base.tpl (revision 1662)
@@ -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="stylesheets/stylesheets_tabs"/>
-<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="base_styles" module="in-commerce" icon="icon46_style"/>
+<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="base_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"/>', 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_selector', '<inp2:m_phrase label="la_ToolTip_NewBaseStyle"/>',
function() {
set_hidden_field('remove_specials[selectors.base]',1);
std_new_item('selectors.base', 'stylesheets/base_style_edit')
} ) );
function edit()
{
set_hidden_field('remove_specials[selectors.base]',1);
std_edit_temp_item('selectors.base', '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','clone') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: trunk/core/admin_templates/stylesheets/stylesheets_edit_base.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.4
\ No newline at end of property
Index: trunk/core/admin_templates/stylesheets/stylesheets_edit_block.tpl
===================================================================
--- trunk/core/admin_templates/stylesheets/stylesheets_edit_block.tpl (revision 1661)
+++ trunk/core/admin_templates/stylesheets/stylesheets_edit_block.tpl (revision 1662)
@@ -1,111 +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_include t="stylesheets/stylesheets_tabs"/>
-<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="block_styles" module="in-commerce" icon="icon46_style"/>
+<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"/>', 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_selector', '<inp2:m_phrase label="la_ToolTip_NewBlockStyle"/>',
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"/>', 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 ToolBarButton('reset_to_base', '<inp2:m_phrase label="la_ToolTip_ResetToBase"/>', 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"/>', 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') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: trunk/core/admin_templates/stylesheets/stylesheets_edit_block.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.4
\ No newline at end of property
Index: trunk/core/admin_templates/stylesheets/base_style_edit.tpl
===================================================================
--- trunk/core/admin_templates/stylesheets/base_style_edit.tpl (revision 1661)
+++ trunk/core/admin_templates/stylesheets/base_style_edit.tpl (revision 1662)
@@ -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_ParseBlock name="blue_bar" prefix="css" title_preset="base_style_edit" module="in-commerce" icon="icon46_style"/>
+<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="base_style_edit" module="in-portal" icon="icon46_style"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save"/>', 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="stylesheets/style_editor" pass="all"/>',null,850,460,'OnOpenStyleEditor');
}
else
{
alert( RemoveTranslationLink('<inp2:m_phrase name="la_RequiredWarning"/>') );
}
}
</script>
</td>
</tr>
</tbody>
</table>
<inp2:selectors_SaveWarning name="grid_save_warning"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
<inp2:m_ParseBlock name="inp_edit_hidden" prefix="selectors" field="StylesheetId"/>
<input type="hidden" name="<inp2:selectors_InputName field="Type"/>" value="1">
<inp2:m_ParseBlock name="inp_id_label" prefix="selectors" field="SelectorId" title="!la_fld_SelectorId!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorName" title="!la_fld_SelectorName!" size="40"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="Name" title="!la_fld_Name!" size="40"/>
<inp2:m_ParseBlock name="inp_edit_textarea" prefix="selectors" field="Description" title="!la_fld_Description!" rows="10" cols="40"/>
<inp2:m_ParseBlock name="inp_edit_textarea" prefix="selectors" field="AdvancedCSS" title="!la_fld_AdvancedCSS!" rows="10" cols="40"/>
<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="text" valign="top">
<inp2:m_phrase name="la_fld_SelectorData"/>:<br>
<a href="javascript:editStyle();"><img src="img/icons/icon24_link_editor.gif" style="cursor:hand" border="0"></a>
</td>
<td>
<table width="100%">
<tr>
<td><inp2:m_phrase name="la_StyleDefinition"/>:</td>
<td>
<inp2:selectors_PrintStyle field="SelectorData"/>
</td>
<td><inp2:m_phrase name="la_StylePreview"/>:</td>
<td style="<inp2:selectors_PrintStyle field="SelectorData" inline="inline"/>">
<inp2:m_phrase name="la_SampleText"/>
</td>
</tr>
</table>
</td>
<td class="error">&nbsp;</td>
</tr>
</table>
<input type="hidden" name="main_prefix" id="main_prefix" value="selectors">
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: trunk/core/admin_templates/stylesheets/base_style_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.4
\ No newline at end of property
Index: trunk/core/admin_templates/stylesheets/block_style_edit.tpl
===================================================================
--- trunk/core/admin_templates/stylesheets/block_style_edit.tpl (revision 1661)
+++ trunk/core/admin_templates/stylesheets/block_style_edit.tpl (revision 1662)
@@ -1,113 +1,113 @@
<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"/>
+<inp2:m_ParseBlock name="blue_bar" prefix="css" title_preset="block_style_edit" module="in-portal" icon="icon46_style"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save"/>', 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.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('reset_to_base', '<inp2:m_phrase label="la_ToolTip_ResetToBase"/>', function() {
submit_event('selectors','OnResetToBase');
}
) );
a_toolbar.Render();
function ValidateRequired()
{
var $fields = new Array('<inp2:selectors_InputName field="Name"/>',
'<inp2:selectors_InputName field="SelectorName"/>');
var $ret = true;
var $i = 0;
var $value = '';
while($i < $fields.length)
{
$value = document.getElementById( $fields[$i] ).value;
$value = $value.replace(' ','');
if($value.length == 0)
{
$ret = false;
break;
}
$i++;
}
return $ret;
}
function editStyle()
{
if( ValidateRequired() )
{
openSelector('selectors','<inp2:m_t t="stylesheets/style_editor" pass="all"/>',null,850,460,'OnOpenStyleEditor');
}
else
{
alert( RemoveTranslationLink('<inp2:m_phrase name="la_RequiredWarning"/>') );
}
}
</script>
</td>
</tr>
</tbody>
</table>
<inp2:selectors_SaveWarning name="grid_save_warning"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
<inp2:m_ParseBlock name="inp_edit_hidden" prefix="selectors" field="StylesheetId"/>
<input type="hidden" name="<inp2:selectors_InputName field="Type"/>" value="2">
<inp2:m_ParseBlock name="inp_id_label" prefix="selectors" field="SelectorId" title="!la_fld_SelectorId!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="SelectorName" title="!la_fld_SelectorName!" size="40"/>
<inp2:m_ParseBlock name="inp_edit_options" prefix="selectors" field="ParentId" title="!la_fld_SelectorBase!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="selectors" field="Name" title="!la_fld_Name!" size="40"/>
<inp2:m_ParseBlock name="inp_edit_textarea" prefix="selectors" field="Description" title="!la_fld_Description!" rows="10" cols="40"/>
<inp2:m_ParseBlock name="inp_edit_textarea" prefix="selectors" field="AdvancedCSS" title="!la_fld_AdvancedCSS!" rows="10" cols="40"/>
<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="text" valign="top">
<inp2:m_phrase name="la_fld_SelectorData"/>:<br>
<a href="javascript:editStyle();"><img src="img/icons/icon24_link_editor.gif" style="cursor:hand" border="0"></a>
</td>
<td>
<table width="100%">
<tr>
<td><inp2:m_phrase name="la_StyleDefinition"/>:</td>
<td>
<inp2:selectors_PrintStyle field="SelectorData"/>
</td>
<td><inp2:m_phrase name="la_StylePreview"/>:</td>
<td style="<inp2:selectors_PrintStyle field="SelectorData" inline="inline"/>">
<inp2:m_phrase name="la_SampleText"/>
</td>
</tr>
</table>
</td>
<td class="error">&nbsp;</td>
</tr>
</table>
<input type="hidden" name="main_prefix" id="main_prefix" value="selectors">
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: trunk/core/admin_templates/stylesheets/block_style_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.4
\ No newline at end of property
Index: trunk/core/module_help/dummy
===================================================================
Index: trunk/core/module_help/dummy
===================================================================
--- trunk/core/module_help/dummy (nonexistent)
+++ trunk/core/module_help/dummy (revision 1662)
Property changes on: trunk/core/module_help/dummy
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property

Event Timeline