Attached Files |
wrong_category_import_logic.patch [^] (645 bytes) 2011-07-05 03:40
[Show Content]
Index: cat_dbitem_export_helper.php
===================================================================
--- cat_dbitem_export_helper.php (revision 14360)
+++ cat_dbitem_export_helper.php (working copy)
@@ -697,7 +697,7 @@
$this->curItem->CategoryPath[ (int)substr($field_name, 8) - 1 ] = $value;
}
elseif (substr($field_name, 0, 20) == '__CATEGORY__Category') {
- $this->curItem->CategoryPath[ (int)substr($field_name, 20) ] = $value;
+ $this->curItem->CategoryPath[ (int)substr($field_name, 20) - 1 ] = $value;
}
elseif (substr($field_name, 0, 11) == '__VIRTUAL__') {
$field_name = substr($field_name, 11);
categoryitem_import_problems_core.patch [^] (5,993 bytes) 2011-07-06 05:57
[Show Content]
Index: admin_templates/incs/header.tpl
===================================================================
--- admin_templates/incs/header.tpl (revision 14318)
+++ admin_templates/incs/header.tpl (working copy)
@@ -98,6 +98,14 @@
</style>
</inp2:m_if>
+<inp2:m_ifnot check="adm_UsePopups">
+ <style type="text/css">
+ table.edit-form {
+ border: 1px solid black;
+ }
+ </style>
+</inp2:m_ifnot>
+
</head>
<inp2:m_include t="incs/blocks"/>
Index: admin_templates/incs/style_template.css
===================================================================
--- admin_templates/incs/style_template.css (revision 14318)
+++ admin_templates/incs/style_template.css (working copy)
@@ -60,7 +60,7 @@
}
.bordered, table.bordered, .bordered-no-bottom {
- border: 1px solid #000000;
+ border: 1px solid #000000 !important;
border-top-width: 0px;
border-collapse: collapse;
}
@@ -413,7 +413,7 @@
/* Forms */
table.edit-form {
border: none;
- border-top-width: 0px;
+ border-top-width: 0px !important;
border-collapse: collapse;
width: 100%;
}
Index: admin_templates/js/forms.js
===================================================================
--- admin_templates/js/forms.js (revision 14318)
+++ admin_templates/js/forms.js (working copy)
@@ -239,6 +239,11 @@
// alert('h after correction is '+h);
+ /*
+ // use this 2 lines, instead of next 3 lines, when scrolling without popups needed
+ var w = $(window.document.body).outerWidth(false);
+ w -= ($div.outerWidth() - $div.width());*/
+
window.document.body.style.width = '100%';
var w = (document.all ? window.document.body.offsetWidth : window.innerWidth);
Index: install/upgrades.css
===================================================================
--- install/upgrades.css (revision 14318)
+++ install/upgrades.css (working copy)
@@ -673,3 +673,27 @@
+ padding-bottom: 4px;
}
\ No newline at end of file
+
+# ===== v 5.1.3-RC1 =====
+Index: style_template.css
+===================================================================
+--- style_template.css (revision 14318)
++++ style_template.css (working copy)
+@@ -60,7 +60,7 @@
+ }
+
+ .bordered, table.bordered, .bordered-no-bottom {
+- border: 1px solid #000000;
++ border: 1px solid #000000 !important;
+ border-top-width: 0px;
+ border-collapse: collapse;
+ }
+@@ -413,7 +413,7 @@
+ /* Forms */
+ table.edit-form {
+ border: none;
+- border-top-width: 0px;
++ border-top-width: 0px !important;
+ border-collapse: collapse;
+ width: 100%;
+ }
Index: kernel/db/cat_event_handler.php
===================================================================
--- kernel/db/cat_event_handler.php (revision 14321)
+++ kernel/db/cat_event_handler.php (working copy)
@@ -947,13 +947,13 @@
// linking existing images for item with virtual fields
$image_helper =& $this->Application->recallObject('ImageHelper');
/* @var $image_helper ImageHelper */
-
+
$image_helper->LoadItemImages($object);
-
+
// linking existing files for item with virtual fields
$file_helper =& $this->Application->recallObject('FileHelper');
/* @var $file_helper FileHelper */
-
+
$file_helper->LoadItemFiles($object);
}
@@ -1876,14 +1876,11 @@
if ($field_values['start_from'] == $field_values['total_records']) {
if ($event->Special == 'import') {
$this->Application->StoreVar('PermCache_UpdateRequired', 1);
- $url_params = Array(
- 't' => 'catalog/catalog',
- 'm_cat_id' => $this->Application->RecallVar('ImportCategory'),
- 'anchor' => 'tab-' . $event->Prefix,
- );
- $this->Application->EventManager->openerStackChange($url_params);
- $event->SetRedirectParam('opener', 'u');
+ $event->SetRedirectParam('m_cat_id', $this->Application->RecallVar('ImportCategory'));
+ $event->SetRedirectParam('anchor', 'tab-' . $event->Prefix);
+
+ $event->redirect = 'catalog/catalog';
}
elseif ($event->Special == 'export') {
$event->redirect = $export_object->getModuleName($event) . '/' . $event->Special . '_finish';
@@ -2607,7 +2604,7 @@
if ( !$this->Application->isAdmin ) {
$file_helper =& $this->Application->recallObject('FileHelper');
/* @var $file_helper FileHelper */
-
+
$file_helper->createItemFiles($event->Prefix, true); // create image fields
$file_helper->createItemFiles($event->Prefix, false); // create file fields
}
Index: units/admin/admin_events_handler.php
===================================================================
--- units/admin/admin_events_handler.php (revision 14402)
+++ units/admin/admin_events_handler.php (working copy)
@@ -1220,10 +1220,6 @@
$section_ajustments['in-portal:user_groups'] = 'remove';
}
- if ( $this->Application->ConfigValue('UsePopups') ) { // 1 - pop-up, 2 - modal
- $section_ajustments['in-portal:main_import'] = Array('onclick' => 'direct_edit(\'adm\', this.href);');
- }
-
$this->Application->setUnitOption($event->Prefix, 'SectionAdjustments', $section_ajustments);
}
Index: units/helpers/cat_dbitem_export_helper.php
===================================================================
--- units/helpers/cat_dbitem_export_helper.php (revision 14360)
+++ units/helpers/cat_dbitem_export_helper.php (working copy)
@@ -697,7 +697,7 @@
$this->curItem->CategoryPath[ (int)substr($field_name, 8) - 1 ] = $value;
}
elseif (substr($field_name, 0, 20) == '__CATEGORY__Category') {
- $this->curItem->CategoryPath[ (int)substr($field_name, 20) ] = $value;
+ $this->curItem->CategoryPath[ (int)substr($field_name, 20) - 1 ] = $value;
}
elseif (substr($field_name, 0, 11) == '__VIRTUAL__') {
$field_name = substr($field_name, 11);
@@ -726,6 +726,7 @@
break;
}
$this->curItem->Clear();
+ $this->curItem->SetDBField('CategoryId', NULL); // since default value is import root category
$this->customFields = $this->Application->getUnitOption($event->Prefix, 'CustomFields');
if (isset($record_data)) {
categoryitem_import_problems_modules.patch [^] (54,942 bytes) 2011-07-06 05:58
[Show Content]
Index: in-commerce/admin_templates/import.tpl
===================================================================
--- in-commerce/admin_templates/import.tpl (revision 14318)
+++ in-commerce/admin_templates/import.tpl (working copy)
@@ -11,6 +11,12 @@
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
+
+ a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+ location.href = '<inp2:m_Link t="tools/import2"/>';
+ }
+ ) );
+
a_toolbar.AddButton( new ToolBarButton('import', '<inp2:m_phrase label="la_ToolTip_Import" escape="1"/>', function() {
document.getElementById('export_columns').value = select_to_string('<inp2:p.import_InputName field="ExportColumns"/>');
@@ -18,10 +24,6 @@
}
) );
- a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
- submit_event('p.import','OnGoBack');
- }
- ) );
a_toolbar.Render();
@@ -88,134 +90,132 @@
<inp2:p.import_SaveWarning name="grid_save_warning"/>
<inp2:p.import_ErrorWarning name="form_error_warning"/>
-<div id="scroll_container">
- <table class="edit-form">
- <inp2:m_RenderElement name="subsection" title="la_section_General"/>
- <inp2:m_RenderElement design="form_row" prefix="p.import" field="ImportSource" title="la_fld_ImportFilename">
- <td class="control-cell">
- <table border="0">
- <tr>
- <td>
- <input type="radio" name="<inp2:p.import_InputName field="ImportSource"/>" id="<inp2:p.import_InputName field="ImportSource"/>_1"<inp2:m_if check="p.import_FieldEquals" field="ImportSource" value="1"> checked</inp2:m_if> value="1" />
- </td>
- <td>
- <label for="<inp2:p.import_InputName field="ImportSource"/>_1">upload</label>
- </td>
- <td>
- <input type="file" name="<inp2:p.import_InputName field="ImportFilename"/>" id="<inp2:p.import_InputName field="ImportFilename"/>" onclick="check_radio('<inp2:p.import_InputName field="ImportSource"/>_1');">
- </td>
- </tr>
+<table class="edit-form bordered">
+ <inp2:m_RenderElement name="subsection" title="la_section_General"/>
+ <inp2:m_RenderElement design="form_row" prefix="p.import" field="ImportSource" title="la_fld_ImportFilename">
+ <td class="control-cell">
+ <table border="0">
+ <tr>
+ <td>
+ <input type="radio" name="<inp2:p.import_InputName field="ImportSource"/>" id="<inp2:p.import_InputName field="ImportSource"/>_1"<inp2:m_if check="p.import_FieldEquals" field="ImportSource" value="1"> checked</inp2:m_if> value="1" />
+ </td>
+ <td>
+ <label for="<inp2:p.import_InputName field="ImportSource"/>_1">upload</label>
+ </td>
+ <td>
+ <input type="file" name="<inp2:p.import_InputName field="ImportFilename"/>" id="<inp2:p.import_InputName field="ImportFilename"/>" onclick="check_radio('<inp2:p.import_InputName field="ImportSource"/>_1');">
+ </td>
+ </tr>
- <tr>
- <td>
- <input type="radio" name="<inp2:p.import_InputName field="ImportSource"/>" id="<inp2:p.import_InputName field="ImportSource"/>_2"<inp2:m_if check="p.import_FieldEquals" field="ImportSource" value="2"> checked</inp2:m_if> value="2" />
- </td>
- <td>
- <label for="<inp2:p.import_InputName field="ImportSource"/>_2">select</label>
- </td>
- <td>
- <select name="<inp2:p.import_InputName field="ImportLocalFilename"/>" onclick="check_radio('<inp2:p.import_InputName field="ImportSource"/>_2');">
- <inp2:p.import_PredefinedOptions field="ImportLocalFilename" block="inp_option_item" selected="selected"/>
- </select>
- </td>
- </tr>
+ <tr>
+ <td>
+ <input type="radio" name="<inp2:p.import_InputName field="ImportSource"/>" id="<inp2:p.import_InputName field="ImportSource"/>_2"<inp2:m_if check="p.import_FieldEquals" field="ImportSource" value="2"> checked</inp2:m_if> value="2" />
+ </td>
+ <td>
+ <label for="<inp2:p.import_InputName field="ImportSource"/>_2">select</label>
+ </td>
+ <td>
+ <select name="<inp2:p.import_InputName field="ImportLocalFilename"/>" onclick="check_radio('<inp2:p.import_InputName field="ImportSource"/>_2');">
+ <inp2:p.import_PredefinedOptions field="ImportLocalFilename" block="inp_option_item" selected="selected"/>
+ </select>
+ </td>
+ </tr>
- </table>
- </td>
- </inp2:m_RenderElement>
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="p.import" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="p.import" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="p.import" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p.import" field="SkipFirstRow" title="la_fld_SkipFirstRow"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="p.import" field="FieldTitles" title="la_fld_FieldTitles" onclick="reflectFormFields();"/>
-
- <inp2:m_RenderElement design="form_row" prefix="p.import" field="ExportColumns" title="la_fld_ImportColumns">
- <td class="control-cell">
- <table cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td>
- <input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" id="btn_move_up" onclick="move_options_up('<inp2:p.import_InputName field="ExportColumns"/>', 1)" class="button">
- <input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" id="btn_move_down" onclick="move_options_down('<inp2:p.import_InputName field="ExportColumns"/>', 1)" class="button"><br />
- <img src="img/spacer.gif" width="1" height="5" alt=""><br />
- </td>
- <td><img src="img/spacer.gif" width="45" height="1" alt=""><br></td>
- <td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
- </tr>
- <tr>
- <td>
- <select multiple id="<inp2:p.import_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
- <inp2:p.import_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
- </select>
- <input type="hidden" id="export_columns" name="<inp2:p.import_InputName field="ExportColumns"/>" value="<inp2:p.import_Field field="ExportColumns"/>" />
- </td>
- <td align="center">
- <input type="button" value=" «« " id="btn_move_left" onclick="move_selected('<inp2:p.import_InputName field="AvailableColumns"/>', '<inp2:p.import_InputName field="ExportColumns"/>')" class="button"><br>
- <img src="img/spacer.gif" width="1" height="4" alt=""><br>
- <input type="button" value=" »» " id="btn_move_right" onclick="move_selected('<inp2:p.import_InputName field="ExportColumns"/>', '<inp2:p.import_InputName field="AvailableColumns"/>'); select_sort('<inp2:p.import_InputName field="AvailableColumns"/>');" class="button">
- </td>
- <td>
- <select multiple id="<inp2:p.import_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
- <inp2:p.import_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
- </select>
- </td>
- </tr>
- </table>
- </td>
- </inp2:m_RenderElement>
-
- <!-- CATEGORY SELECTOR: BEGIN -->
- <inp2:m_DefineElement name="root_cat_caption">
- <inp2:m_Phrase name="la_rootcategory_name"/>
- </inp2:m_DefineElement>
-
- <inp2:m_DefineElement name="category_caption">
- <inp2:m_param name="separator"/><inp2:m_param name="cat_name"/>
- </inp2:m_DefineElement>
-
- <inp2:m_RenderElement design="form_row" prefix="p.import" field="CategoryId" title="la_fld_ImportCategory">
- <td class="control-cell">
- <b><inp2:p.import_CategoryPath separator=" > " root_cat_render_as="root_cat_caption" render_as="category_caption" session_var="ImportCategory"/></b>
- <input type="hidden" name="<inp2:p.import_InputName field='CategoryId'/>" value="<inp2:p.import_Field field='CategoryId' db='db'/>" />
- <a href="javascript:openSelector('p.import', '<inp2:adm_SelectorLink prefix="p.import" selection_mode="single" tab_prefixes="none"/>', 'ImportCategory', null, 'OnSaveSettings');"><img src="img/icons/icon24_cat.gif" border="0" align="absmiddle" /></a>
+ </table>
</td>
</inp2:m_RenderElement>
- <!-- CATEGORY SELECTOR: END -->
- <inp2:m_RenderElement name="inp_edit_box" prefix="p.import" field="CategorySeparator" title="la_fld_CategorySeparator" size="2" maxlength="1"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p.import" field="ReplaceDuplicates" title="la_fld_ReplaceDuplicates" />
+ <inp2:m_RenderElement name="inp_edit_box" prefix="p.import" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="p.import" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="p.import" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p.import" field="SkipFirstRow" title="la_fld_SkipFirstRow"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="p.import" field="FieldTitles" title="la_fld_FieldTitles" onclick="reflectFormFields();"/>
- <inp2:m_RenderElement design="form_row" prefix="p.import" field="CheckDuplicatesMethod" title="la_fld_CheckDuplicatesMethod">
+ <inp2:m_RenderElement design="form_row" prefix="p.import" field="ExportColumns" title="la_fld_ImportColumns">
<td class="control-cell">
- <table cellspacing="0" cellpadding="0">
+ <table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td valign="top">
- <input type="radio"<inp2:m_if check="p.import_FieldEquals" field="CheckDuplicatesMethod" value="1"> checked</inp2:m_if> name="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_1" value="1" />
- </td>
<td>
- <label for="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_1"><inp2:m_phrase name="la_IDField" />: PRODUCTID</label>
+ <input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" id="btn_move_up" onclick="move_options_up('<inp2:p.import_InputName field="ExportColumns"/>', 1)" class="button">
+ <input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" id="btn_move_down" onclick="move_options_down('<inp2:p.import_InputName field="ExportColumns"/>', 1)" class="button"><br />
+ <img src="img/spacer.gif" width="1" height="5" alt=""><br />
</td>
+ <td><img src="img/spacer.gif" width="45" height="1" alt=""><br></td>
+ <td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
</tr>
-
<tr>
- <td valign="top">
- <input type="radio"<inp2:m_if check="p.import_FieldEquals" field="CheckDuplicatesMethod" value="2"> checked</inp2:m_if> name="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_2" value="2" />
+ <td>
+ <select multiple id="<inp2:p.import_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
+ <inp2:p.import_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
+ </select>
+ <input type="hidden" id="export_columns" name="<inp2:p.import_InputName field="ExportColumns"/>" value="<inp2:p.import_Field field="ExportColumns"/>" />
</td>
+ <td align="center">
+ <input type="button" value=" «« " id="btn_move_left" onclick="move_selected('<inp2:p.import_InputName field="AvailableColumns"/>', '<inp2:p.import_InputName field="ExportColumns"/>')" class="button"><br>
+ <img src="img/spacer.gif" width="1" height="4" alt=""><br>
+ <input type="button" value=" »» " id="btn_move_right" onclick="move_selected('<inp2:p.import_InputName field="ExportColumns"/>', '<inp2:p.import_InputName field="AvailableColumns"/>'); select_sort('<inp2:p.import_InputName field="AvailableColumns"/>');" class="button">
+ </td>
<td>
- <label for="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_2"><inp2:m_phrase name="la_OtherFields" />: </label>
- <inp2:p.import_PredefinedOptions prefix="p.import" field="DuplicateCheckFields" block="inp_checkbox_item" selected="checked"/>
-
- <inp2:m_RenderElement prefix="p.import" name="inp_edit_hidden" field="DuplicateCheckFields"/>
+ <select multiple id="<inp2:p.import_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
+ <inp2:p.import_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
+ </select>
</td>
</tr>
</table>
</td>
</inp2:m_RenderElement>
- <inp2:m_RenderElement name="inp_edit_filler"/>
- </table>
-</div>
+<!-- CATEGORY SELECTOR: BEGIN -->
+ <inp2:m_DefineElement name="root_cat_caption">
+ <inp2:m_Phrase name="la_rootcategory_name"/>
+ </inp2:m_DefineElement>
+ <inp2:m_DefineElement name="category_caption">
+ <inp2:m_param name="separator"/><inp2:m_param name="cat_name"/>
+ </inp2:m_DefineElement>
+
+ <inp2:m_RenderElement design="form_row" prefix="p.import" field="CategoryId" title="la_fld_ImportCategory">
+ <td class="control-cell">
+ <b><inp2:p.import_CategoryPath separator=" > " root_cat_render_as="root_cat_caption" render_as="category_caption" session_var="ImportCategory"/></b>
+ <input type="hidden" name="<inp2:p.import_InputName field='CategoryId'/>" value="<inp2:p.import_Field field='CategoryId' db='db'/>" />
+ <a href="javascript:openSelector('p.import', '<inp2:adm_SelectorLink prefix="p.import" selection_mode="single" tab_prefixes="none"/>', 'ImportCategory', null, 'OnSaveSettings');"><img src="img/icons/icon24_cat.gif" border="0" align="absmiddle" /></a>
+ </td>
+ </inp2:m_RenderElement>
+
+<!-- CATEGORY SELECTOR: END -->
+ <inp2:m_RenderElement name="inp_edit_box" prefix="p.import" field="CategorySeparator" title="la_fld_CategorySeparator" size="2" maxlength="1"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p.import" field="ReplaceDuplicates" title="la_fld_ReplaceDuplicates" />
+
+ <inp2:m_RenderElement design="form_row" prefix="p.import" field="CheckDuplicatesMethod" title="la_fld_CheckDuplicatesMethod">
+ <td class="control-cell">
+ <table cellspacing="0" cellpadding="0">
+ <tr>
+ <td valign="top">
+ <input type="radio"<inp2:m_if check="p.import_FieldEquals" field="CheckDuplicatesMethod" value="1"> checked</inp2:m_if> name="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_1" value="1" />
+ </td>
+ <td>
+ <label for="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_1"><inp2:m_phrase name="la_IDField" />: PRODUCTID</label>
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top">
+ <input type="radio"<inp2:m_if check="p.import_FieldEquals" field="CheckDuplicatesMethod" value="2"> checked</inp2:m_if> name="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_2" value="2" />
+ </td>
+ <td>
+ <label for="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_2"><inp2:m_phrase name="la_OtherFields" />: </label>
+ <inp2:p.import_PredefinedOptions prefix="p.import" field="DuplicateCheckFields" block="inp_checkbox_item" selected="checked"/>
+
+ <inp2:m_RenderElement prefix="p.import" name="inp_edit_hidden" field="DuplicateCheckFields"/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </inp2:m_RenderElement>
+
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+</table>
+
<script language="javascript" type="text/javascript">
reflectFormFields();
</script>
Index: in-commerce/units/orders/orders_config.php
===================================================================
--- in-commerce/units/orders/orders_config.php (revision 14318)
+++ in-commerce/units/orders/orders_config.php (working copy)
@@ -478,7 +478,7 @@
// export related fields: begin
'ExportFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
'ExportFilename' => Array ('type' => 'string', 'default' => ''),
- 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ', '),
+ 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ','),
'FieldsEnclosedBy' => Array ('type' => 'string', 'default' => '"'),
'LineEndings' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
'LineEndingsInside' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CRLF', 2 => 'LF'), 'default' => 2),
Index: in-commerce/units/products/products_config.php
===================================================================
--- in-commerce/units/products/products_config.php (revision 14318)
+++ in-commerce/units/products/products_config.php (working copy)
@@ -492,12 +492,12 @@
'Expire' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' =>null),
'Type' => Array (
'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1,
+ 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1,
'options' => Array (
PRODUCT_TYPE_TANGIBLE => 'la_product_tangible',
PRODUCT_TYPE_SUBSCRIPTION => 'la_product_subscription',
PRODUCT_TYPE_SERVICE => 'la_product_service',
- PRODUCT_TYPE_DOWNLOADABLE => 'la_product_downloadable',
+ PRODUCT_TYPE_DOWNLOADABLE => 'la_product_downloadable',
/* PRODUCT_TYPE_PACKAGE => 'la_product_package', */
),
'not_null' => 1, 'default' => 1,
@@ -506,9 +506,9 @@
'ModifiedById' => Array ('type' => 'int', 'default' => NULL),
'CreatedById' => Array (
'type' => 'int',
- 'formatter' => 'kLEFTFormatter',
+ 'formatter' => 'kLEFTFormatter',
'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),
- 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'PortalUser
+ 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'PortalUser
WHERE `%s` = \'%s\'',
'left_key_field' => 'PortalUserId',
'left_title_field' => 'Login',
@@ -574,7 +574,7 @@
'CategoryId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0),
'ExportFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
'ExportFilename' => Array ('type' => 'string', 'default' => ''),
- 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ', '),
+ 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ','),
'FieldsEnclosedBy' => Array ('type' => 'string', 'default' => '"'),
'LineEndings' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
'LineEndingsInside' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CRLF', 2 => 'LF'), 'default' => 2),
Index: in-link/admin_templates/import.tpl
===================================================================
--- in-link/admin_templates/import.tpl (revision 14318)
+++ in-link/admin_templates/import.tpl (working copy)
@@ -11,6 +11,11 @@
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+ location.href = '<inp2:m_Link t="tools/import2"/>';
+ }
+ ) );
+
a_toolbar.AddButton( new ToolBarButton('import', '<inp2:m_phrase label="la_ToolTip_Import" escape="1"/>', function() {
document.getElementById('export_columns').value = select_to_string('<inp2:l.import_InputName field="ExportColumns"/>');
@@ -18,10 +23,6 @@
}
) );
- a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
- submit_event('l.import','OnGoBack');
- }
- ) );
a_toolbar.Render();
@@ -87,134 +88,132 @@
<inp2:l.import_SaveWarning name="grid_save_warning"/>
<inp2:l.import_ErrorWarning name="form_error_warning"/>
-<div id="scroll_container">
- <table class="edit-form">
- <inp2:m_RenderElement name="subsection" title="la_section_General"/>
- <inp2:m_RenderElement design="form_row" prefix="l.import" field="ImportSource" title="la_fld_ImportFilename">
- <td class="control-cell">
- <table border="0">
- <tr>
- <td>
- <input type="radio" name="<inp2:l.import_InputName field="ImportSource"/>" id="<inp2:l.import_InputName field="ImportSource"/>_1"<inp2:m_if check="l.import_FieldEquals" field="ImportSource" value="1"> checked</inp2:m_if> value="1" />
- </td>
- <td>
- <label for="<inp2:l.import_InputName field="ImportSource"/>_1">upload</label>
- </td>
- <td>
- <input type="file" name="<inp2:l.import_InputName field="ImportFilename"/>" id="<inp2:l.import_InputName field="ImportFilename"/>" onclick="check_radio('<inp2:l.import_InputName field="ImportSource"/>_1');">
- </td>
- </tr>
+<table class="edit-form bordered">
+ <inp2:m_RenderElement name="subsection" title="la_section_General"/>
+ <inp2:m_RenderElement design="form_row" prefix="l.import" field="ImportSource" title="la_fld_ImportFilename">
+ <td class="control-cell">
+ <table border="0">
+ <tr>
+ <td>
+ <input type="radio" name="<inp2:l.import_InputName field="ImportSource"/>" id="<inp2:l.import_InputName field="ImportSource"/>_1"<inp2:m_if check="l.import_FieldEquals" field="ImportSource" value="1"> checked</inp2:m_if> value="1" />
+ </td>
+ <td>
+ <label for="<inp2:l.import_InputName field="ImportSource"/>_1">upload</label>
+ </td>
+ <td>
+ <input type="file" name="<inp2:l.import_InputName field="ImportFilename"/>" id="<inp2:l.import_InputName field="ImportFilename"/>" onclick="check_radio('<inp2:l.import_InputName field="ImportSource"/>_1');">
+ </td>
+ </tr>
- <tr>
- <td>
- <input type="radio" name="<inp2:l.import_InputName field="ImportSource"/>" id="<inp2:l.import_InputName field="ImportSource"/>_2"<inp2:m_if check="l.import_FieldEquals" field="ImportSource" value="2"> checked</inp2:m_if> value="2" />
- </td>
- <td>
- <label for="<inp2:l.import_InputName field="ImportSource"/>_2">select</label>
- </td>
- <td>
- <select name="<inp2:l.import_InputName field="ImportLocalFilename"/>" onclick="check_radio('<inp2:l.import_InputName field="ImportSource"/>_2');">
- <inp2:l.import_PredefinedOptions field="ImportLocalFilename" block="inp_option_item" selected="selected"/>
- </select>
- </td>
- </tr>
+ <tr>
+ <td>
+ <input type="radio" name="<inp2:l.import_InputName field="ImportSource"/>" id="<inp2:l.import_InputName field="ImportSource"/>_2"<inp2:m_if check="l.import_FieldEquals" field="ImportSource" value="2"> checked</inp2:m_if> value="2" />
+ </td>
+ <td>
+ <label for="<inp2:l.import_InputName field="ImportSource"/>_2">select</label>
+ </td>
+ <td>
+ <select name="<inp2:l.import_InputName field="ImportLocalFilename"/>" onclick="check_radio('<inp2:l.import_InputName field="ImportSource"/>_2');">
+ <inp2:l.import_PredefinedOptions field="ImportLocalFilename" block="inp_option_item" selected="selected"/>
+ </select>
+ </td>
+ </tr>
- </table>
- </td>
- </inp2:m_RenderElement>
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="l.import" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="l.import" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="l.import" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="l.import" field="SkipFirstRow" title="la_fld_SkipFirstRow"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="l.import" field="FieldTitles" title="la_fld_FieldTitles" onclick="reflectFormFields();"/>
-
- <inp2:m_RenderElement design="form_row" prefix="l.import" field="ExportColumns" title="la_fld_ImportColumns">
- <td class="control-cell">
- <table cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td>
- <input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" id="btn_move_up" onclick="move_options_up('<inp2:l.import_InputName field="ExportColumns"/>', 1)" class="button">
- <input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" id="btn_move_down" onclick="move_options_down('<inp2:l.import_InputName field="ExportColumns"/>', 1)" class="button"><br />
- <img src="img/spacer.gif" width="1" height="5" alt=""><br />
- </td>
- <td><img src="img/spacer.gif" width="45" height="1" alt=""><br></td>
- <td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
- </tr>
- <tr>
- <td>
- <select multiple id="<inp2:l.import_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
- <inp2:l.import_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
- </select>
- <input type="hidden" id="export_columns" name="<inp2:l.import_InputName field="ExportColumns"/>" value="<inp2:l.import_Field field="ExportColumns"/>" />
- </td>
- <td align="center">
- <input type="button" value=" «« " id="btn_move_left" onclick="move_selected('<inp2:l.import_InputName field="AvailableColumns"/>', '<inp2:l.import_InputName field="ExportColumns"/>')" class="button"><br>
- <img src="img/spacer.gif" width="1" height="4" alt=""><br>
- <input type="button" value=" »» " id="btn_move_right" onclick="move_selected('<inp2:l.import_InputName field="ExportColumns"/>', '<inp2:l.import_InputName field="AvailableColumns"/>'); select_sort('<inp2:l.import_InputName field="AvailableColumns"/>');" class="button">
- </td>
- <td>
- <select multiple id="<inp2:l.import_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
- <inp2:l.import_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
- </select>
- </td>
- </tr>
- </table>
- </td>
- </inp2:m_RenderElement>
-
- <!-- CATEGORY SELECTOR: BEGIN -->
- <inp2:m_DefineElement name="root_cat_caption">
- <inp2:m_Phrase name="la_rootcategory_name"/>
- </inp2:m_DefineElement>
-
- <inp2:m_DefineElement name="category_caption">
- <inp2:m_param name="separator"/><inp2:m_param name="cat_name"/>
- </inp2:m_DefineElement>
-
- <inp2:m_RenderElement design="form_row" prefix="l.import" field="CategoryId" title="la_fld_ImportCategory">
- <td class="control-cell">
- <b><inp2:l.import_CategoryPath separator=" > " root_cat_render_as="root_cat_caption" render_as="category_caption" session_var="ImportCategory"/></b>
- <input type="hidden" name="<inp2:l.import_InputName field='CategoryId'/>" value="<inp2:l.import_Field field='CategoryId' db='db'/>" />
- <a href="javascript:openSelector('l.import', '<inp2:adm_SelectorLink prefix="l.import" selection_mode="single" tab_prefixes="none"/>', 'ImportCategory', null, 'OnSaveSettings');"><img src="img/icons/icon24_cat.gif" border="0" align="absmiddle" /></a>
+ </table>
</td>
</inp2:m_RenderElement>
- <!-- CATEGORY SELECTOR: END -->
- <inp2:m_RenderElement name="inp_edit_box" prefix="l.import" field="CategorySeparator" title="la_fld_CategorySeparator" size="2" maxlength="1"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="l.import" field="ReplaceDuplicates" title="la_fld_ReplaceDuplicates" />
+ <inp2:m_RenderElement name="inp_edit_box" prefix="l.import" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="l.import" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="l.import" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="l.import" field="SkipFirstRow" title="la_fld_SkipFirstRow"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="l.import" field="FieldTitles" title="la_fld_FieldTitles" onclick="reflectFormFields();"/>
- <inp2:m_RenderElement design="form_row" prefix="l.import" field="CheckDuplicatesMethod" title="la_fld_CheckDuplicatesMethod">
+ <inp2:m_RenderElement design="form_row" prefix="l.import" field="ExportColumns" title="la_fld_ImportColumns">
<td class="control-cell">
- <table cellspacing="0" cellpadding="0">
+ <table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td valign="top">
- <input type="radio"<inp2:m_if check="l.import_FieldEquals" field="CheckDuplicatesMethod" value="1"> checked</inp2:m_if> name="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>_1" value="1" />
- </td>
<td>
- <label for="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>_1"><inp2:m_phrase name="la_IDField" />: LINKID</label>
+ <input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" id="btn_move_up" onclick="move_options_up('<inp2:l.import_InputName field="ExportColumns"/>', 1)" class="button">
+ <input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" id="btn_move_down" onclick="move_options_down('<inp2:l.import_InputName field="ExportColumns"/>', 1)" class="button"><br />
+ <img src="img/spacer.gif" width="1" height="5" alt=""><br />
</td>
+ <td><img src="img/spacer.gif" width="45" height="1" alt=""><br></td>
+ <td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
</tr>
-
<tr>
- <td valign="top">
- <input type="radio"<inp2:m_if check="l.import_FieldEquals" field="CheckDuplicatesMethod" value="2"> checked</inp2:m_if> name="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>_2" value="2" />
+ <td>
+ <select multiple id="<inp2:l.import_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
+ <inp2:l.import_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
+ </select>
+ <input type="hidden" id="export_columns" name="<inp2:l.import_InputName field="ExportColumns"/>" value="<inp2:l.import_Field field="ExportColumns"/>" />
</td>
+ <td align="center">
+ <input type="button" value=" «« " id="btn_move_left" onclick="move_selected('<inp2:l.import_InputName field="AvailableColumns"/>', '<inp2:l.import_InputName field="ExportColumns"/>')" class="button"><br>
+ <img src="img/spacer.gif" width="1" height="4" alt=""><br>
+ <input type="button" value=" »» " id="btn_move_right" onclick="move_selected('<inp2:l.import_InputName field="ExportColumns"/>', '<inp2:l.import_InputName field="AvailableColumns"/>'); select_sort('<inp2:l.import_InputName field="AvailableColumns"/>');" class="button">
+ </td>
<td>
- <label for="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>_2"><inp2:m_phrase name="la_OtherFields" />: </label>
- <inp2:l.import_PredefinedOptions prefix="l.import" field="DuplicateCheckFields" block="inp_checkbox_item" selected="checked"/>
-
- <inp2:m_RenderElement prefix="l.import" name="inp_edit_hidden" field="DuplicateCheckFields"/>
+ <select multiple id="<inp2:l.import_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
+ <inp2:l.import_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
+ </select>
</td>
</tr>
</table>
</td>
</inp2:m_RenderElement>
- <inp2:m_RenderElement name="inp_edit_filler"/>
- </table>
-</div>
+<!-- CATEGORY SELECTOR: BEGIN -->
+ <inp2:m_DefineElement name="root_cat_caption">
+ <inp2:m_Phrase name="la_rootcategory_name"/>
+ </inp2:m_DefineElement>
+ <inp2:m_DefineElement name="category_caption">
+ <inp2:m_param name="separator"/><inp2:m_param name="cat_name"/>
+ </inp2:m_DefineElement>
+
+ <inp2:m_RenderElement design="form_row" prefix="l.import" field="CategoryId" title="la_fld_ImportCategory">
+ <td class="control-cell">
+ <b><inp2:l.import_CategoryPath separator=" > " root_cat_render_as="root_cat_caption" render_as="category_caption" session_var="ImportCategory"/></b>
+ <input type="hidden" name="<inp2:l.import_InputName field='CategoryId'/>" value="<inp2:l.import_Field field='CategoryId' db='db'/>" />
+ <a href="javascript:openSelector('l.import', '<inp2:adm_SelectorLink prefix="l.import" selection_mode="single" tab_prefixes="none"/>', 'ImportCategory', null, 'OnSaveSettings');"><img src="img/icons/icon24_cat.gif" border="0" align="absmiddle" /></a>
+ </td>
+ </inp2:m_RenderElement>
+<!-- CATEGORY SELECTOR: END -->
+
+ <inp2:m_RenderElement name="inp_edit_box" prefix="l.import" field="CategorySeparator" title="la_fld_CategorySeparator" size="2" maxlength="1"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="l.import" field="ReplaceDuplicates" title="la_fld_ReplaceDuplicates" />
+
+ <inp2:m_RenderElement design="form_row" prefix="l.import" field="CheckDuplicatesMethod" title="la_fld_CheckDuplicatesMethod">
+ <td class="control-cell">
+ <table cellspacing="0" cellpadding="0">
+ <tr>
+ <td valign="top">
+ <input type="radio"<inp2:m_if check="l.import_FieldEquals" field="CheckDuplicatesMethod" value="1"> checked</inp2:m_if> name="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>_1" value="1" />
+ </td>
+ <td>
+ <label for="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>_1"><inp2:m_phrase name="la_IDField" />: LINKID</label>
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top">
+ <input type="radio"<inp2:m_if check="l.import_FieldEquals" field="CheckDuplicatesMethod" value="2"> checked</inp2:m_if> name="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>_2" value="2" />
+ </td>
+ <td>
+ <label for="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>_2"><inp2:m_phrase name="la_OtherFields" />: </label>
+ <inp2:l.import_PredefinedOptions prefix="l.import" field="DuplicateCheckFields" block="inp_checkbox_item" selected="checked"/>
+
+ <inp2:m_RenderElement prefix="l.import" name="inp_edit_hidden" field="DuplicateCheckFields"/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </inp2:m_RenderElement>
+
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+</table>
+
<script language="javascript" type="text/javascript">
reflectFormFields();
</script>
Index: in-link/units/links/links_config.php
===================================================================
--- in-link/units/links/links_config.php (revision 14318)
+++ in-link/units/links/links_config.php (working copy)
@@ -515,7 +515,7 @@
'CategoryId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0),
'ExportFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
'ExportFilename' => Array ('type' => 'string', 'default' => ''),
- 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ', '),
+ 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ','),
'FieldsEnclosedBy' => Array ('type' => 'string', 'default' => '"'),
'LineEndings' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
'LineEndingsInside' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CRLF', 2 => 'LF'), 'default' => 2),
Index: in-news/admin_templates/import.tpl
===================================================================
--- in-news/admin_templates/import.tpl (revision 14318)
+++ in-news/admin_templates/import.tpl (working copy)
@@ -11,6 +11,12 @@
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
+
+ a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+ location.href = '<inp2:m_Link t="tools/import2"/>';
+ }
+ ) );
+
a_toolbar.AddButton( new ToolBarButton('import', '<inp2:m_phrase label="la_ToolTip_Import" escape="1"/>', function() {
document.getElementById('export_columns').value = select_to_string('<inp2:n.import_InputName field="ExportColumns"/>');
@@ -18,10 +24,6 @@
}
) );
- a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
- submit_event('n.import','OnGoBack');
- }
- ) );
a_toolbar.Render();
@@ -88,134 +90,132 @@
<inp2:n.import_SaveWarning name="grid_save_warning"/>
<inp2:n.import_ErrorWarning name="form_error_warning"/>
-<div id="scroll_container">
- <table class="edit-form">
- <inp2:m_RenderElement name="subsection" title="la_section_General"/>
- <inp2:m_RenderElement design="form_row" prefix="n.import" field="ImportSource" title="la_fld_ImportFilename">
- <td class="control-cell">
- <table border="0">
- <tr>
- <td>
- <input type="radio" name="<inp2:n.import_InputName field="ImportSource"/>" id="<inp2:n.import_InputName field="ImportSource"/>_1"<inp2:m_if check="n.import_FieldEquals" field="ImportSource" value="1"> checked</inp2:m_if> value="1" />
- </td>
- <td>
- <label for="<inp2:n.import_InputName field="ImportSource"/>_1">upload</label>
- </td>
- <td>
- <input type="file" name="<inp2:n.import_InputName field="ImportFilename"/>" id="<inp2:n.import_InputName field="ImportFilename"/>" onclick="check_radio('<inp2:n.import_InputName field="ImportSource"/>_1');">
- </td>
- </tr>
+<table class="edit-form bordered">
+ <inp2:m_RenderElement name="subsection" title="la_section_General"/>
+ <inp2:m_RenderElement design="form_row" prefix="n.import" field="ImportSource" title="la_fld_ImportFilename">
+ <td class="control-cell">
+ <table border="0">
+ <tr>
+ <td>
+ <input type="radio" name="<inp2:n.import_InputName field="ImportSource"/>" id="<inp2:n.import_InputName field="ImportSource"/>_1"<inp2:m_if check="n.import_FieldEquals" field="ImportSource" value="1"> checked</inp2:m_if> value="1" />
+ </td>
+ <td>
+ <label for="<inp2:n.import_InputName field="ImportSource"/>_1">upload</label>
+ </td>
+ <td>
+ <input type="file" name="<inp2:n.import_InputName field="ImportFilename"/>" id="<inp2:n.import_InputName field="ImportFilename"/>" onclick="check_radio('<inp2:n.import_InputName field="ImportSource"/>_1');">
+ </td>
+ </tr>
- <tr>
- <td>
- <input type="radio" name="<inp2:n.import_InputName field="ImportSource"/>" id="<inp2:n.import_InputName field="ImportSource"/>_2"<inp2:m_if check="n.import_FieldEquals" field="ImportSource" value="2"> checked</inp2:m_if> value="2" />
- </td>
- <td>
- <label for="<inp2:n.import_InputName field="ImportSource"/>_2">select</label>
- </td>
- <td>
- <select name="<inp2:n.import_InputName field="ImportLocalFilename"/>" onclick="check_radio('<inp2:n.import_InputName field="ImportSource"/>_2');">
- <inp2:n.import_PredefinedOptions field="ImportLocalFilename" block="inp_option_item" selected="selected"/>
- </select>
- </td>
- </tr>
+ <tr>
+ <td>
+ <input type="radio" name="<inp2:n.import_InputName field="ImportSource"/>" id="<inp2:n.import_InputName field="ImportSource"/>_2"<inp2:m_if check="n.import_FieldEquals" field="ImportSource" value="2"> checked</inp2:m_if> value="2" />
+ </td>
+ <td>
+ <label for="<inp2:n.import_InputName field="ImportSource"/>_2">select</label>
+ </td>
+ <td>
+ <select name="<inp2:n.import_InputName field="ImportLocalFilename"/>" onclick="check_radio('<inp2:n.import_InputName field="ImportSource"/>_2');">
+ <inp2:n.import_PredefinedOptions field="ImportLocalFilename" block="inp_option_item" selected="selected"/>
+ </select>
+ </td>
+ </tr>
- </table>
- </td>
- </inp2:m_RenderElement>
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="n.import" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="n.import" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="n.import" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="n.import" field="SkipFirstRow" title="la_fld_SkipFirstRow"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="n.import" field="FieldTitles" title="la_fld_FieldTitles" onclick="reflectFormFields();"/>
-
- <inp2:m_RenderElement design="form_row" prefix="n.import" field="ExportColumns" title="la_fld_ImportColumns">
- <td class="control-cell">
- <table cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td>
- <input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" id="btn_move_up" onclick="move_options_up('<inp2:n.import_InputName field="ExportColumns"/>', 1)" class="button">
- <input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" id="btn_move_down" onclick="move_options_down('<inp2:n.import_InputName field="ExportColumns"/>', 1)" class="button"><br />
- <img src="img/spacer.gif" width="1" height="5" alt=""><br />
- </td>
- <td><img src="img/spacer.gif" width="45" height="1" alt=""><br></td>
- <td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
- </tr>
- <tr>
- <td>
- <select multiple id="<inp2:n.import_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
- <inp2:n.import_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
- </select>
- <input type="hidden" id="export_columns" name="<inp2:n.import_InputName field="ExportColumns"/>" value="<inp2:n.import_Field field="ExportColumns"/>" />
- </td>
- <td align="center">
- <input type="button" value=" «« " id="btn_move_left" onclick="move_selected('<inp2:n.import_InputName field="AvailableColumns"/>', '<inp2:n.import_InputName field="ExportColumns"/>')" class="button"><br>
- <img src="img/spacer.gif" width="1" height="4" alt=""><br>
- <input type="button" value=" »» " id="btn_move_right" onclick="move_selected('<inp2:n.import_InputName field="ExportColumns"/>', '<inp2:n.import_InputName field="AvailableColumns"/>'); select_sort('<inp2:n.import_InputName field="AvailableColumns"/>');" class="button">
- </td>
- <td>
- <select multiple id="<inp2:n.import_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
- <inp2:n.import_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
- </select>
- </td>
- </tr>
- </table>
- </td>
- </inp2:m_RenderElement>
-
- <!-- CATEGORY SELECTOR: BEGIN -->
- <inp2:m_DefineElement name="root_cat_caption">
- <inp2:m_Phrase name="la_rootcategory_name"/>
- </inp2:m_DefineElement>
-
- <inp2:m_DefineElement name="category_caption">
- <inp2:m_param name="separator"/><inp2:m_param name="cat_name"/>
- </inp2:m_DefineElement>
-
- <inp2:m_RenderElement design="form_row" prefix="n.import" field="CategoryId" title="la_fld_ImportCategory">
- <td class="control-cell">
- <b><inp2:n.import_CategoryPath separator=" > " root_cat_render_as="root_cat_caption" render_as="category_caption" session_var="ImportCategory"/></b>
- <input type="hidden" name="<inp2:n.import_InputName field='CategoryId'/>" value="<inp2:n.import_Field field='CategoryId' db='db'/>" />
- <a href="javascript:openSelector('n.import', '<inp2:adm_SelectorLink prefix="n.import" selection_mode="single" tab_prefixes="none"/>', 'ImportCategory', null, 'OnSaveSettings');"><img src="img/icons/icon24_cat.gif" border="0" align="absmiddle" /></a>
+ </table>
</td>
</inp2:m_RenderElement>
- <!-- CATEGORY SELECTOR: END -->
- <inp2:m_RenderElement name="inp_edit_box" prefix="n.import" field="CategorySeparator" title="la_fld_CategorySeparator" size="2" maxlength="1"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="n.import" field="ReplaceDuplicates" title="la_fld_ReplaceDuplicates" />
+ <inp2:m_RenderElement name="inp_edit_box" prefix="n.import" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="n.import" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="n.import" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="n.import" field="SkipFirstRow" title="la_fld_SkipFirstRow"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="n.import" field="FieldTitles" title="la_fld_FieldTitles" onclick="reflectFormFields();"/>
- <inp2:m_RenderElement design="form_row" prefix="n.import" field="CheckDuplicatesMethod" title="la_fld_CheckDuplicatesMethod">
+ <inp2:m_RenderElement design="form_row" prefix="n.import" field="ExportColumns" title="la_fld_ImportColumns">
<td class="control-cell">
- <table cellspacing="0" cellpadding="0">
+ <table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td valign="top">
- <input type="radio"<inp2:m_if check="n.import_FieldEquals" field="CheckDuplicatesMethod" value="1"> checked</inp2:m_if> name="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>_1" value="1" />
- </td>
<td>
- <label for="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>_1"><inp2:m_phrase name="la_IDField" />: ARTICLEID</label>
+ <input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" id="btn_move_up" onclick="move_options_up('<inp2:n.import_InputName field="ExportColumns"/>', 1)" class="button">
+ <input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" id="btn_move_down" onclick="move_options_down('<inp2:n.import_InputName field="ExportColumns"/>', 1)" class="button"><br />
+ <img src="img/spacer.gif" width="1" height="5" alt=""><br />
</td>
+ <td><img src="img/spacer.gif" width="45" height="1" alt=""><br></td>
+ <td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
</tr>
-
<tr>
- <td valign="top">
- <input type="radio"<inp2:m_if check="n.import_FieldEquals" field="CheckDuplicatesMethod" value="2"> checked</inp2:m_if> name="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>_2" value="2" />
+ <td>
+ <select multiple id="<inp2:n.import_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
+ <inp2:n.import_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
+ </select>
+ <input type="hidden" id="export_columns" name="<inp2:n.import_InputName field="ExportColumns"/>" value="<inp2:n.import_Field field="ExportColumns"/>" />
</td>
+ <td align="center">
+ <input type="button" value=" «« " id="btn_move_left" onclick="move_selected('<inp2:n.import_InputName field="AvailableColumns"/>', '<inp2:n.import_InputName field="ExportColumns"/>')" class="button"><br>
+ <img src="img/spacer.gif" width="1" height="4" alt=""><br>
+ <input type="button" value=" »» " id="btn_move_right" onclick="move_selected('<inp2:n.import_InputName field="ExportColumns"/>', '<inp2:n.import_InputName field="AvailableColumns"/>'); select_sort('<inp2:n.import_InputName field="AvailableColumns"/>');" class="button">
+ </td>
<td>
- <label for="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>_2"><inp2:m_phrase name="la_OtherFields" />: </label>
- <inp2:n.import_PredefinedOptions prefix="n.import" field="DuplicateCheckFields" block="inp_checkbox_item" selected="checked"/>
-
- <inp2:m_RenderElement prefix="n.import" name="inp_edit_hidden" field="DuplicateCheckFields"/>
+ <select multiple id="<inp2:n.import_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
+ <inp2:n.import_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
+ </select>
</td>
</tr>
</table>
</td>
</inp2:m_RenderElement>
- <inp2:m_RenderElement name="inp_edit_filler"/>
- </table>
-</div>
+<!-- CATEGORY SELECTOR: BEGIN -->
+ <inp2:m_DefineElement name="root_cat_caption">
+ <inp2:m_Phrase name="la_rootcategory_name"/>
+ </inp2:m_DefineElement>
+ <inp2:m_DefineElement name="category_caption">
+ <inp2:m_param name="separator"/><inp2:m_param name="cat_name"/>
+ </inp2:m_DefineElement>
+
+ <inp2:m_RenderElement design="form_row" prefix="n.import" field="CategoryId" title="la_fld_ImportCategory">
+ <td class="control-cell">
+ <b><inp2:n.import_CategoryPath separator=" > " root_cat_render_as="root_cat_caption" render_as="category_caption" session_var="ImportCategory"/></b>
+ <input type="hidden" name="<inp2:n.import_InputName field='CategoryId'/>" value="<inp2:n.import_Field field='CategoryId' db='db'/>" />
+ <a href="javascript:openSelector('n.import', '<inp2:adm_SelectorLink prefix="n.import" selection_mode="single" tab_prefixes="none"/>', 'ImportCategory', null, 'OnSaveSettings');"><img src="img/icons/icon24_cat.gif" border="0" align="absmiddle" /></a>
+ </td>
+ </inp2:m_RenderElement>
+<!-- CATEGORY SELECTOR: END -->
+
+ <inp2:m_RenderElement name="inp_edit_box" prefix="n.import" field="CategorySeparator" title="la_fld_CategorySeparator" size="2" maxlength="1"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="n.import" field="ReplaceDuplicates" title="la_fld_ReplaceDuplicates" />
+
+ <inp2:m_RenderElement design="form_row" prefix="n.import" field="CheckDuplicatesMethod" title="la_fld_CheckDuplicatesMethod">
+ <td class="control-cell">
+ <table cellspacing="0" cellpadding="0">
+ <tr>
+ <td valign="top">
+ <input type="radio"<inp2:m_if check="n.import_FieldEquals" field="CheckDuplicatesMethod" value="1"> checked</inp2:m_if> name="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>_1" value="1" />
+ </td>
+ <td>
+ <label for="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>_1"><inp2:m_phrase name="la_IDField" />: ARTICLEID</label>
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top">
+ <input type="radio"<inp2:m_if check="n.import_FieldEquals" field="CheckDuplicatesMethod" value="2"> checked</inp2:m_if> name="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>_2" value="2" />
+ </td>
+ <td>
+ <label for="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>_2"><inp2:m_phrase name="la_OtherFields" />: </label>
+ <inp2:n.import_PredefinedOptions prefix="n.import" field="DuplicateCheckFields" block="inp_checkbox_item" selected="checked"/>
+
+ <inp2:m_RenderElement prefix="n.import" name="inp_edit_hidden" field="DuplicateCheckFields"/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </inp2:m_RenderElement>
+
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+</table>
+
<script language="javascript" type="text/javascript">
reflectFormFields();
</script>
Index: in-news/units/articles/articles_config.php
===================================================================
--- in-news/units/articles/articles_config.php (revision 14318)
+++ in-news/units/articles/articles_config.php (working copy)
@@ -397,9 +397,9 @@
'CachedVotesQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'CreatedById' => Array (
'type' => 'int',
- 'formatter' => 'kLEFTFormatter',
+ 'formatter' => 'kLEFTFormatter',
'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),
- 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'PortalUser
+ 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'PortalUser
WHERE `%s` = \'%s\'',
'left_key_field' => 'PortalUserId',
'left_title_field' => 'Login',
@@ -473,7 +473,7 @@
'CategoryId' => Array ('type' => 'int', 'default' => 0),
'ExportFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
'ExportFilename' => Array ('type' => 'string', 'default' => ''),
- 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ', '),
+ 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ','),
'FieldsEnclosedBy' => Array ('type' => 'string', 'default' => '"'),
'LineEndings' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
'LineEndingsInside' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CRLF', 2 => 'LF'), 'default' => 2),
test.csv [^] (116 bytes) 2011-09-07 17:57
categoryitem_import_problems_core.2.patch [^] (8,402 bytes) 2011-10-14 12:17
[Show Content]
Index: admin_templates/incs/header.tpl
===================================================================
--- admin_templates/incs/header.tpl (revision 14656)
+++ admin_templates/incs/header.tpl (working copy)
@@ -99,6 +99,14 @@
</style>
</inp2:m_if>
+<inp2:m_ifnot check="adm_UsePopups">
+ <style type="text/css">
+ table.edit-form {
+ border: 1px solid black;
+ }
+ </style>
+</inp2:m_ifnot>
+
</head>
<inp2:m_include t="incs/blocks"/>
Index: admin_templates/incs/style_template.css
===================================================================
--- admin_templates/incs/style_template.css (revision 14656)
+++ admin_templates/incs/style_template.css (working copy)
@@ -60,7 +60,7 @@
}
.bordered, table.bordered, .bordered-no-bottom {
- border: 1px solid #000000;
+ border: 1px solid #000000 !important;
border-top-width: 0px;
border-collapse: collapse;
}
@@ -436,7 +436,7 @@
/* Forms */
table.edit-form {
border: none;
- border-top-width: 0px;
+ border-top-width: 0px !important;
border-collapse: collapse;
width: 100%;
}
Index: admin_templates/js/forms.js
===================================================================
--- admin_templates/js/forms.js (revision 14656)
+++ admin_templates/js/forms.js (working copy)
@@ -239,6 +239,11 @@
// alert('h after correction is '+h);
+ /*
+ // use this 2 lines, instead of next 3 lines, when scrolling without popups needed
+ var w = $(window.document.body).outerWidth(false);
+ w -= ($div.outerWidth() - $div.width());*/
+
window.document.body.style.width = '100%';
var w = (document.all ? window.document.body.offsetWidth : window.innerWidth);
Index: install/upgrades.css
===================================================================
--- install/upgrades.css (revision 14656)
+++ install/upgrades.css (working copy)
@@ -674,6 +674,30 @@
}
\ No newline at end of file
+# ===== v 5.1.3-RC1 =====
+Index: style_template.css
+===================================================================
+--- style_template.css (revision 14318)
++++ style_template.css (working copy)
+@@ -60,7 +60,7 @@
+ }
+
+ .bordered, table.bordered, .bordered-no-bottom {
+- border: 1px solid #000000;
++ border: 1px solid #000000 !important;
+ border-top-width: 0px;
+ border-collapse: collapse;
+ }
+@@ -413,7 +413,7 @@
+ /* Forms */
+ table.edit-form {
+ border: none;
+- border-top-width: 0px;
++ border-top-width: 0px !important;
+ border-collapse: collapse;
+ width: 100%;
+ }
+
# ===== v 5.2.0-B1 =====
Index: style_template.css
===================================================================
Index: kernel/db/cat_event_handler.php
===================================================================
--- kernel/db/cat_event_handler.php (revision 14656)
+++ kernel/db/cat_event_handler.php (working copy)
@@ -1904,14 +1904,11 @@
if ($field_values['start_from'] == $field_values['total_records']) {
if ($event->Special == 'import') {
$this->Application->StoreVar('PermCache_UpdateRequired', 1);
- $url_params = Array(
- 't' => 'catalog/catalog',
- 'm_cat_id' => $this->Application->RecallVar('ImportCategory'),
- 'anchor' => 'tab-' . $event->Prefix,
- );
- $this->Application->EventManager->openerStackChange($url_params);
- $event->SetRedirectParam('opener', 'u');
+ $event->SetRedirectParam('m_cat_id', $this->Application->RecallVar('ImportCategory'));
+ $event->SetRedirectParam('anchor', 'tab-' . $event->Prefix);
+
+ $event->redirect = 'catalog/catalog';
}
elseif ($event->Special == 'export') {
$event->redirect = $export_object->getModuleName($event) . '/' . $event->Special . '_finish';
@@ -2849,4 +2846,23 @@
$this->Application->setUnitOption($event->MasterEvent->Prefix, 'Clones', $clones);
}
}
+
+ /**
+ * Enter description here...
+ *
+ * @param kEvent $event
+ */
+ function OnExportCancel(&$event)
+ {
+
+ if ($event->Special == 'import') {
+ $event->SetRedirectParam('m_cat_id', $this->Application->RecallVar('ImportCategory'));
+ $event->SetRedirectParam('anchor', 'tab-' . $event->Prefix);
+
+ $event->redirect = 'catalog/catalog';
+ return;
+ }
+
+ parent::OnExportCancel($event);
+ }
}
\ No newline at end of file
Index: units/admin/admin_events_handler.php
===================================================================
--- units/admin/admin_events_handler.php (revision 14656)
+++ units/admin/admin_events_handler.php (working copy)
@@ -1259,10 +1259,6 @@
$section_ajustments['in-portal:user_groups'] = 'remove';
}
- if ( $this->Application->ConfigValue('UsePopups') ) { // 1 - pop-up, 2 - modal
- $section_ajustments['in-portal:main_import'] = Array('onclick' => 'direct_edit(\'adm\', this.href);');
- }
-
$section_ajustments['in-portal:root'] = Array (
'label' => $this->Application->ConfigValue('Site_Name')
);
Index: units/helpers/cat_dbitem_export_helper.php
===================================================================
--- units/helpers/cat_dbitem_export_helper.php (revision 14656)
+++ units/helpers/cat_dbitem_export_helper.php (working copy)
@@ -160,6 +160,10 @@
$has_empty = false;
$fields = $object->getFields();
+ if ( isset($fields['CreatedById']) && $object->isRequired('CreatedById') && !$object->GetDBField('CreatedById') ) {
+ $object->SetDBField('CreatedById', $this->Application->RecallVar('user_id'));
+ }
+
foreach ($fields as $field_name => $field_options) {
if ( $object->isVirtualField($field_name) || !$object->isRequired($field_name) ) {
continue;
@@ -170,12 +174,12 @@
}
$formatter_class = getArrayValue($field_options, 'formatter');
-
+
if ( $formatter_class ) {
// not tested
$formatter =& $this->Application->recallObject($formatter_class);
/* @var $formatter kFormatter */
-
+
$sample_value = $formatter->GetSample($field_name, $field_options, $object);
}
@@ -419,7 +423,7 @@
/* @var $ml_formatter kMultiLanguage */
$custom_sql = '';
-
+
foreach ($this->customFields as $custom_id => $custom_name) {
$custom_sql .= 'custom_data.' . $ml_formatter->LangFieldName('cust_' . $custom_id) . ' AS cust_' . $custom_name . ', ';
}
@@ -437,7 +441,7 @@
else {
$items_list =& $this->Application->recallObject($this->curItem->Prefix.'.export-items-list', $this->curItem->Prefix.'_List');
/* @var $items_list kDBList */
-
+
$items_list->SetPerPage(-1);
if ($options['export_ids'] != '') {
@@ -729,7 +733,7 @@
$this->curItem->CategoryPath[(int)substr($field_name, 8) - 1] = $value;
}
elseif ( substr($field_name, 0, 20) == '__CATEGORY__Category' ) {
- $this->curItem->CategoryPath[(int)substr($field_name, 20)] = $value;
+ $this->curItem->CategoryPath[(int)substr($field_name, 20) - 1] = $value;
}
elseif ( substr($field_name, 0, 11) == '__VIRTUAL__' ) {
$field_name = substr($field_name, 11);
@@ -747,7 +751,7 @@
/**
* Resets import object
- *
+ *
* @param kEvent $event
* @param int $object_type
* @param Array $record_data
@@ -765,6 +769,7 @@
break;
}
$this->curItem->Clear();
+ $this->curItem->SetDBField('CategoryId', NULL); // since default value is import root category
$this->customFields = $this->Application->getUnitOption($event->Prefix, 'CustomFields');
if (isset($record_data)) {
@@ -1260,7 +1265,7 @@
$handler =& $this->Application->recallObject($event->Prefix.'_EventHandler');
/* @var $handler kDBEventHandler */
-
+
$available_columns = array_merge($available_columns, $handler->getCustomExportColumns($event));
// custom fields
@@ -1328,7 +1333,7 @@
}
$export_presets = array ('' => '');
-
+
foreach ($export_settings[$event->Prefix] as $key => $val) {
$export_presets[implode('|', $val['ExportColumns'])] = $key;
}
@@ -1479,7 +1484,7 @@
else {
// make uploaded file local & change source selection
$filename = getArrayValue($field_values, 'ImportFilename');
-
+
if ( $filename ) {
$this->updateImportFiles($event);
$object->SetDBField('ImportSource', 2);
@@ -1522,7 +1527,7 @@
$object =& $event->getObject();
/* @var $object kDBItem */
-
+
if ($this->_getExportSavePreset($object)) {
$required_fields['export'][] = 'ExportPresetName';
}
categoryitem_import_problems_modules.2.patch [^] (52,845 bytes) 2011-10-14 12:17
[Show Content]
Index: in-commerce/admin_templates/import.tpl
===================================================================
--- in-commerce/admin_templates/import.tpl (revision 14656)
+++ in-commerce/admin_templates/import.tpl (working copy)
@@ -11,6 +11,12 @@
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
+
+ a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+ location.href = '<inp2:m_Link t="tools/import2"/>';
+ }
+ ) );
+
a_toolbar.AddButton( new ToolBarButton('import', '<inp2:m_phrase label="la_ToolTip_Import" escape="1"/>', function() {
document.getElementById('export_columns').value = select_to_string('<inp2:p.import_InputName field="ExportColumns"/>');
@@ -18,10 +24,6 @@
}
) );
- a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
- submit_event('p.import','OnGoBack');
- }
- ) );
a_toolbar.Render();
@@ -88,134 +90,132 @@
<inp2:p.import_SaveWarning name="grid_save_warning"/>
<inp2:p.import_ErrorWarning name="form_error_warning"/>
-<div id="scroll_container">
- <table class="edit-form">
- <inp2:m_RenderElement name="subsection" title="la_section_General"/>
- <inp2:m_RenderElement design="form_row" prefix="p.import" field="ImportSource" title="la_fld_ImportFilename">
- <td class="control-cell">
- <table border="0">
- <tr>
- <td>
- <input type="radio" name="<inp2:p.import_InputName field="ImportSource"/>" id="<inp2:p.import_InputName field="ImportSource"/>_1"<inp2:m_if check="p.import_FieldEquals" field="ImportSource" value="1"> checked</inp2:m_if> value="1" />
- </td>
- <td>
- <label for="<inp2:p.import_InputName field="ImportSource"/>_1">upload</label>
- </td>
- <td>
- <input type="file" name="<inp2:p.import_InputName field="ImportFilename"/>" id="<inp2:p.import_InputName field="ImportFilename"/>" onclick="check_radio('<inp2:p.import_InputName field="ImportSource"/>_1');">
- </td>
- </tr>
+<table class="edit-form bordered">
+ <inp2:m_RenderElement name="subsection" title="la_section_General"/>
+ <inp2:m_RenderElement design="form_row" prefix="p.import" field="ImportSource" title="la_fld_ImportFilename">
+ <td class="control-cell">
+ <table border="0">
+ <tr>
+ <td>
+ <input type="radio" name="<inp2:p.import_InputName field="ImportSource"/>" id="<inp2:p.import_InputName field="ImportSource"/>_1"<inp2:m_if check="p.import_FieldEquals" field="ImportSource" value="1"> checked</inp2:m_if> value="1" />
+ </td>
+ <td>
+ <label for="<inp2:p.import_InputName field="ImportSource"/>_1">upload</label>
+ </td>
+ <td>
+ <input type="file" name="<inp2:p.import_InputName field="ImportFilename"/>" id="<inp2:p.import_InputName field="ImportFilename"/>" onclick="check_radio('<inp2:p.import_InputName field="ImportSource"/>_1');">
+ </td>
+ </tr>
- <tr>
- <td>
- <input type="radio" name="<inp2:p.import_InputName field="ImportSource"/>" id="<inp2:p.import_InputName field="ImportSource"/>_2"<inp2:m_if check="p.import_FieldEquals" field="ImportSource" value="2"> checked</inp2:m_if> value="2" />
- </td>
- <td>
- <label for="<inp2:p.import_InputName field="ImportSource"/>_2">select</label>
- </td>
- <td>
- <select name="<inp2:p.import_InputName field="ImportLocalFilename"/>" onclick="check_radio('<inp2:p.import_InputName field="ImportSource"/>_2');">
- <inp2:p.import_PredefinedOptions field="ImportLocalFilename" block="inp_option_item" selected="selected"/>
- </select>
- </td>
- </tr>
+ <tr>
+ <td>
+ <input type="radio" name="<inp2:p.import_InputName field="ImportSource"/>" id="<inp2:p.import_InputName field="ImportSource"/>_2"<inp2:m_if check="p.import_FieldEquals" field="ImportSource" value="2"> checked</inp2:m_if> value="2" />
+ </td>
+ <td>
+ <label for="<inp2:p.import_InputName field="ImportSource"/>_2">select</label>
+ </td>
+ <td>
+ <select name="<inp2:p.import_InputName field="ImportLocalFilename"/>" onclick="check_radio('<inp2:p.import_InputName field="ImportSource"/>_2');">
+ <inp2:p.import_PredefinedOptions field="ImportLocalFilename" block="inp_option_item" selected="selected"/>
+ </select>
+ </td>
+ </tr>
- </table>
- </td>
- </inp2:m_RenderElement>
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="p.import" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="p.import" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="p.import" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p.import" field="SkipFirstRow" title="la_fld_SkipFirstRow"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="p.import" field="FieldTitles" title="la_fld_FieldTitles" onclick="reflectFormFields();"/>
-
- <inp2:m_RenderElement design="form_row" prefix="p.import" field="ExportColumns" title="la_fld_ImportColumns">
- <td class="control-cell">
- <table cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td>
- <input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" id="btn_move_up" onclick="move_options_up('<inp2:p.import_InputName field="ExportColumns"/>', 1)" class="button">
- <input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" id="btn_move_down" onclick="move_options_down('<inp2:p.import_InputName field="ExportColumns"/>', 1)" class="button"><br />
- <img src="img/spacer.gif" width="1" height="5" alt=""><br />
- </td>
- <td><img src="img/spacer.gif" width="45" height="1" alt=""><br></td>
- <td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
- </tr>
- <tr>
- <td>
- <select multiple id="<inp2:p.import_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
- <inp2:p.import_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
- </select>
- <input type="hidden" id="export_columns" name="<inp2:p.import_InputName field="ExportColumns"/>" value="<inp2:p.import_Field field="ExportColumns"/>" />
- </td>
- <td align="center">
- <input type="button" value=" «« " id="btn_move_left" onclick="move_selected('<inp2:p.import_InputName field="AvailableColumns"/>', '<inp2:p.import_InputName field="ExportColumns"/>')" class="button"><br>
- <img src="img/spacer.gif" width="1" height="4" alt=""><br>
- <input type="button" value=" »» " id="btn_move_right" onclick="move_selected('<inp2:p.import_InputName field="ExportColumns"/>', '<inp2:p.import_InputName field="AvailableColumns"/>'); select_sort('<inp2:p.import_InputName field="AvailableColumns"/>');" class="button">
- </td>
- <td>
- <select multiple id="<inp2:p.import_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
- <inp2:p.import_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
- </select>
- </td>
- </tr>
- </table>
- </td>
- </inp2:m_RenderElement>
-
- <!-- CATEGORY SELECTOR: BEGIN -->
- <inp2:m_DefineElement name="root_cat_caption">
- <inp2:m_Phrase name="la_rootcategory_name"/>
- </inp2:m_DefineElement>
-
- <inp2:m_DefineElement name="category_caption">
- <inp2:m_param name="separator"/><inp2:m_param name="cat_name"/>
- </inp2:m_DefineElement>
-
- <inp2:m_RenderElement design="form_row" prefix="p.import" field="CategoryId" title="la_fld_ImportCategory">
- <td class="control-cell">
- <b><inp2:p.import_CategoryPath separator=" > " root_cat_render_as="root_cat_caption" render_as="category_caption" session_var="ImportCategory"/></b>
- <input type="hidden" name="<inp2:p.import_InputName field='CategoryId'/>" value="<inp2:p.import_Field field='CategoryId' db='db'/>" />
- <a href="javascript:openSelector('p.import', '<inp2:adm_SelectorLink prefix="p.import" selection_mode="single" tab_prefixes="none"/>', 'ImportCategory', null, 'OnSaveSettings');"><img src="img/icons/icon24_cat.gif" border="0" align="absmiddle" /></a>
+ </table>
</td>
</inp2:m_RenderElement>
- <!-- CATEGORY SELECTOR: END -->
- <inp2:m_RenderElement name="inp_edit_box" prefix="p.import" field="CategorySeparator" title="la_fld_CategorySeparator" size="2" maxlength="1"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p.import" field="ReplaceDuplicates" title="la_fld_ReplaceDuplicates" />
+ <inp2:m_RenderElement name="inp_edit_box" prefix="p.import" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="p.import" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="p.import" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p.import" field="SkipFirstRow" title="la_fld_SkipFirstRow"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="p.import" field="FieldTitles" title="la_fld_FieldTitles" onclick="reflectFormFields();"/>
- <inp2:m_RenderElement design="form_row" prefix="p.import" field="CheckDuplicatesMethod" title="la_fld_CheckDuplicatesMethod">
+ <inp2:m_RenderElement design="form_row" prefix="p.import" field="ExportColumns" title="la_fld_ImportColumns">
<td class="control-cell">
- <table cellspacing="0" cellpadding="0">
+ <table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td valign="top">
- <input type="radio"<inp2:m_if check="p.import_FieldEquals" field="CheckDuplicatesMethod" value="1"> checked</inp2:m_if> name="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_1" value="1" />
- </td>
<td>
- <label for="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_1"><inp2:m_phrase name="la_IDField" />: PRODUCTID</label>
+ <input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" id="btn_move_up" onclick="move_options_up('<inp2:p.import_InputName field="ExportColumns"/>', 1)" class="button">
+ <input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" id="btn_move_down" onclick="move_options_down('<inp2:p.import_InputName field="ExportColumns"/>', 1)" class="button"><br />
+ <img src="img/spacer.gif" width="1" height="5" alt=""><br />
</td>
+ <td><img src="img/spacer.gif" width="45" height="1" alt=""><br></td>
+ <td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
</tr>
-
<tr>
- <td valign="top">
- <input type="radio"<inp2:m_if check="p.import_FieldEquals" field="CheckDuplicatesMethod" value="2"> checked</inp2:m_if> name="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_2" value="2" />
+ <td>
+ <select multiple id="<inp2:p.import_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
+ <inp2:p.import_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
+ </select>
+ <input type="hidden" id="export_columns" name="<inp2:p.import_InputName field="ExportColumns"/>" value="<inp2:p.import_Field field="ExportColumns"/>" />
</td>
+ <td align="center">
+ <input type="button" value=" «« " id="btn_move_left" onclick="move_selected('<inp2:p.import_InputName field="AvailableColumns"/>', '<inp2:p.import_InputName field="ExportColumns"/>')" class="button"><br>
+ <img src="img/spacer.gif" width="1" height="4" alt=""><br>
+ <input type="button" value=" »» " id="btn_move_right" onclick="move_selected('<inp2:p.import_InputName field="ExportColumns"/>', '<inp2:p.import_InputName field="AvailableColumns"/>'); select_sort('<inp2:p.import_InputName field="AvailableColumns"/>');" class="button">
+ </td>
<td>
- <label for="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_2"><inp2:m_phrase name="la_OtherFields" />: </label>
- <inp2:p.import_PredefinedOptions prefix="p.import" field="DuplicateCheckFields" block="inp_checkbox_item" selected="checked"/>
-
- <inp2:m_RenderElement prefix="p.import" name="inp_edit_hidden" field="DuplicateCheckFields"/>
+ <select multiple id="<inp2:p.import_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
+ <inp2:p.import_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
+ </select>
</td>
</tr>
</table>
</td>
</inp2:m_RenderElement>
- <inp2:m_RenderElement name="inp_edit_filler"/>
- </table>
-</div>
+<!-- CATEGORY SELECTOR: BEGIN -->
+ <inp2:m_DefineElement name="root_cat_caption">
+ <inp2:m_Phrase name="la_rootcategory_name"/>
+ </inp2:m_DefineElement>
+ <inp2:m_DefineElement name="category_caption">
+ <inp2:m_param name="separator"/><inp2:m_param name="cat_name"/>
+ </inp2:m_DefineElement>
+
+ <inp2:m_RenderElement design="form_row" prefix="p.import" field="CategoryId" title="la_fld_ImportCategory">
+ <td class="control-cell">
+ <b><inp2:p.import_CategoryPath separator=" > " root_cat_render_as="root_cat_caption" render_as="category_caption" session_var="ImportCategory"/></b>
+ <input type="hidden" name="<inp2:p.import_InputName field='CategoryId'/>" value="<inp2:p.import_Field field='CategoryId' db='db'/>" />
+ <a href="javascript:openSelector('p.import', '<inp2:adm_SelectorLink prefix="p.import" selection_mode="single" tab_prefixes="none"/>', 'ImportCategory', null, 'OnSaveSettings');"><img src="img/icons/icon24_cat.gif" border="0" align="absmiddle" /></a>
+ </td>
+ </inp2:m_RenderElement>
+
+<!-- CATEGORY SELECTOR: END -->
+ <inp2:m_RenderElement name="inp_edit_box" prefix="p.import" field="CategorySeparator" title="la_fld_CategorySeparator" size="2" maxlength="1"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p.import" field="ReplaceDuplicates" title="la_fld_ReplaceDuplicates" />
+
+ <inp2:m_RenderElement design="form_row" prefix="p.import" field="CheckDuplicatesMethod" title="la_fld_CheckDuplicatesMethod">
+ <td class="control-cell">
+ <table cellspacing="0" cellpadding="0">
+ <tr>
+ <td valign="top">
+ <input type="radio"<inp2:m_if check="p.import_FieldEquals" field="CheckDuplicatesMethod" value="1"> checked</inp2:m_if> name="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_1" value="1" />
+ </td>
+ <td>
+ <label for="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_1"><inp2:m_phrase name="la_IDField" />: PRODUCTID</label>
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top">
+ <input type="radio"<inp2:m_if check="p.import_FieldEquals" field="CheckDuplicatesMethod" value="2"> checked</inp2:m_if> name="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_2" value="2" />
+ </td>
+ <td>
+ <label for="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_2"><inp2:m_phrase name="la_OtherFields" />: </label>
+ <inp2:p.import_PredefinedOptions prefix="p.import" field="DuplicateCheckFields" block="inp_checkbox_item" selected="checked"/>
+
+ <inp2:m_RenderElement prefix="p.import" name="inp_edit_hidden" field="DuplicateCheckFields"/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </inp2:m_RenderElement>
+
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+</table>
+
<script language="javascript" type="text/javascript">
reflectFormFields();
</script>
Index: in-commerce/units/orders/orders_config.php
===================================================================
--- in-commerce/units/orders/orders_config.php (revision 14656)
+++ in-commerce/units/orders/orders_config.php (working copy)
@@ -496,7 +496,7 @@
// export related fields: begin
'ExportFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
'ExportFilename' => Array ('type' => 'string', 'default' => ''),
- 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ', '),
+ 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ','),
'FieldsEnclosedBy' => Array ('type' => 'string', 'default' => '"'),
'LineEndings' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
'LineEndingsInside' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CRLF', 2 => 'LF'), 'default' => 2),
Index: in-commerce/units/products/products_config.php
===================================================================
--- in-commerce/units/products/products_config.php (revision 14656)
+++ in-commerce/units/products/products_config.php (working copy)
@@ -574,7 +574,7 @@
'CategoryId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0),
'ExportFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
'ExportFilename' => Array ('type' => 'string', 'default' => ''),
- 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ', '),
+ 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ','),
'FieldsEnclosedBy' => Array ('type' => 'string', 'default' => '"'),
'LineEndings' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
'LineEndingsInside' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CRLF', 2 => 'LF'), 'default' => 2),
Index: in-link/admin_templates/import.tpl
===================================================================
--- in-link/admin_templates/import.tpl (revision 14656)
+++ in-link/admin_templates/import.tpl (working copy)
@@ -11,6 +11,11 @@
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+ location.href = '<inp2:m_Link t="tools/import2"/>';
+ }
+ ) );
+
a_toolbar.AddButton( new ToolBarButton('import', '<inp2:m_phrase label="la_ToolTip_Import" escape="1"/>', function() {
document.getElementById('export_columns').value = select_to_string('<inp2:l.import_InputName field="ExportColumns"/>');
@@ -18,10 +23,6 @@
}
) );
- a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
- submit_event('l.import','OnGoBack');
- }
- ) );
a_toolbar.Render();
@@ -87,134 +88,132 @@
<inp2:l.import_SaveWarning name="grid_save_warning"/>
<inp2:l.import_ErrorWarning name="form_error_warning"/>
-<div id="scroll_container">
- <table class="edit-form">
- <inp2:m_RenderElement name="subsection" title="la_section_General"/>
- <inp2:m_RenderElement design="form_row" prefix="l.import" field="ImportSource" title="la_fld_ImportFilename">
- <td class="control-cell">
- <table border="0">
- <tr>
- <td>
- <input type="radio" name="<inp2:l.import_InputName field="ImportSource"/>" id="<inp2:l.import_InputName field="ImportSource"/>_1"<inp2:m_if check="l.import_FieldEquals" field="ImportSource" value="1"> checked</inp2:m_if> value="1" />
- </td>
- <td>
- <label for="<inp2:l.import_InputName field="ImportSource"/>_1">upload</label>
- </td>
- <td>
- <input type="file" name="<inp2:l.import_InputName field="ImportFilename"/>" id="<inp2:l.import_InputName field="ImportFilename"/>" onclick="check_radio('<inp2:l.import_InputName field="ImportSource"/>_1');">
- </td>
- </tr>
+<table class="edit-form bordered">
+ <inp2:m_RenderElement name="subsection" title="la_section_General"/>
+ <inp2:m_RenderElement design="form_row" prefix="l.import" field="ImportSource" title="la_fld_ImportFilename">
+ <td class="control-cell">
+ <table border="0">
+ <tr>
+ <td>
+ <input type="radio" name="<inp2:l.import_InputName field="ImportSource"/>" id="<inp2:l.import_InputName field="ImportSource"/>_1"<inp2:m_if check="l.import_FieldEquals" field="ImportSource" value="1"> checked</inp2:m_if> value="1" />
+ </td>
+ <td>
+ <label for="<inp2:l.import_InputName field="ImportSource"/>_1">upload</label>
+ </td>
+ <td>
+ <input type="file" name="<inp2:l.import_InputName field="ImportFilename"/>" id="<inp2:l.import_InputName field="ImportFilename"/>" onclick="check_radio('<inp2:l.import_InputName field="ImportSource"/>_1');">
+ </td>
+ </tr>
- <tr>
- <td>
- <input type="radio" name="<inp2:l.import_InputName field="ImportSource"/>" id="<inp2:l.import_InputName field="ImportSource"/>_2"<inp2:m_if check="l.import_FieldEquals" field="ImportSource" value="2"> checked</inp2:m_if> value="2" />
- </td>
- <td>
- <label for="<inp2:l.import_InputName field="ImportSource"/>_2">select</label>
- </td>
- <td>
- <select name="<inp2:l.import_InputName field="ImportLocalFilename"/>" onclick="check_radio('<inp2:l.import_InputName field="ImportSource"/>_2');">
- <inp2:l.import_PredefinedOptions field="ImportLocalFilename" block="inp_option_item" selected="selected"/>
- </select>
- </td>
- </tr>
+ <tr>
+ <td>
+ <input type="radio" name="<inp2:l.import_InputName field="ImportSource"/>" id="<inp2:l.import_InputName field="ImportSource"/>_2"<inp2:m_if check="l.import_FieldEquals" field="ImportSource" value="2"> checked</inp2:m_if> value="2" />
+ </td>
+ <td>
+ <label for="<inp2:l.import_InputName field="ImportSource"/>_2">select</label>
+ </td>
+ <td>
+ <select name="<inp2:l.import_InputName field="ImportLocalFilename"/>" onclick="check_radio('<inp2:l.import_InputName field="ImportSource"/>_2');">
+ <inp2:l.import_PredefinedOptions field="ImportLocalFilename" block="inp_option_item" selected="selected"/>
+ </select>
+ </td>
+ </tr>
- </table>
- </td>
- </inp2:m_RenderElement>
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="l.import" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="l.import" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="l.import" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="l.import" field="SkipFirstRow" title="la_fld_SkipFirstRow"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="l.import" field="FieldTitles" title="la_fld_FieldTitles" onclick="reflectFormFields();"/>
-
- <inp2:m_RenderElement design="form_row" prefix="l.import" field="ExportColumns" title="la_fld_ImportColumns">
- <td class="control-cell">
- <table cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td>
- <input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" id="btn_move_up" onclick="move_options_up('<inp2:l.import_InputName field="ExportColumns"/>', 1)" class="button">
- <input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" id="btn_move_down" onclick="move_options_down('<inp2:l.import_InputName field="ExportColumns"/>', 1)" class="button"><br />
- <img src="img/spacer.gif" width="1" height="5" alt=""><br />
- </td>
- <td><img src="img/spacer.gif" width="45" height="1" alt=""><br></td>
- <td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
- </tr>
- <tr>
- <td>
- <select multiple id="<inp2:l.import_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
- <inp2:l.import_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
- </select>
- <input type="hidden" id="export_columns" name="<inp2:l.import_InputName field="ExportColumns"/>" value="<inp2:l.import_Field field="ExportColumns"/>" />
- </td>
- <td align="center">
- <input type="button" value=" «« " id="btn_move_left" onclick="move_selected('<inp2:l.import_InputName field="AvailableColumns"/>', '<inp2:l.import_InputName field="ExportColumns"/>')" class="button"><br>
- <img src="img/spacer.gif" width="1" height="4" alt=""><br>
- <input type="button" value=" »» " id="btn_move_right" onclick="move_selected('<inp2:l.import_InputName field="ExportColumns"/>', '<inp2:l.import_InputName field="AvailableColumns"/>'); select_sort('<inp2:l.import_InputName field="AvailableColumns"/>');" class="button">
- </td>
- <td>
- <select multiple id="<inp2:l.import_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
- <inp2:l.import_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
- </select>
- </td>
- </tr>
- </table>
- </td>
- </inp2:m_RenderElement>
-
- <!-- CATEGORY SELECTOR: BEGIN -->
- <inp2:m_DefineElement name="root_cat_caption">
- <inp2:m_Phrase name="la_rootcategory_name"/>
- </inp2:m_DefineElement>
-
- <inp2:m_DefineElement name="category_caption">
- <inp2:m_param name="separator"/><inp2:m_param name="cat_name"/>
- </inp2:m_DefineElement>
-
- <inp2:m_RenderElement design="form_row" prefix="l.import" field="CategoryId" title="la_fld_ImportCategory">
- <td class="control-cell">
- <b><inp2:l.import_CategoryPath separator=" > " root_cat_render_as="root_cat_caption" render_as="category_caption" session_var="ImportCategory"/></b>
- <input type="hidden" name="<inp2:l.import_InputName field='CategoryId'/>" value="<inp2:l.import_Field field='CategoryId' db='db'/>" />
- <a href="javascript:openSelector('l.import', '<inp2:adm_SelectorLink prefix="l.import" selection_mode="single" tab_prefixes="none"/>', 'ImportCategory', null, 'OnSaveSettings');"><img src="img/icons/icon24_cat.gif" border="0" align="absmiddle" /></a>
+ </table>
</td>
</inp2:m_RenderElement>
- <!-- CATEGORY SELECTOR: END -->
- <inp2:m_RenderElement name="inp_edit_box" prefix="l.import" field="CategorySeparator" title="la_fld_CategorySeparator" size="2" maxlength="1"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="l.import" field="ReplaceDuplicates" title="la_fld_ReplaceDuplicates" />
+ <inp2:m_RenderElement name="inp_edit_box" prefix="l.import" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="l.import" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="l.import" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="l.import" field="SkipFirstRow" title="la_fld_SkipFirstRow"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="l.import" field="FieldTitles" title="la_fld_FieldTitles" onclick="reflectFormFields();"/>
- <inp2:m_RenderElement design="form_row" prefix="l.import" field="CheckDuplicatesMethod" title="la_fld_CheckDuplicatesMethod">
+ <inp2:m_RenderElement design="form_row" prefix="l.import" field="ExportColumns" title="la_fld_ImportColumns">
<td class="control-cell">
- <table cellspacing="0" cellpadding="0">
+ <table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td valign="top">
- <input type="radio"<inp2:m_if check="l.import_FieldEquals" field="CheckDuplicatesMethod" value="1"> checked</inp2:m_if> name="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>_1" value="1" />
- </td>
<td>
- <label for="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>_1"><inp2:m_phrase name="la_IDField" />: LINKID</label>
+ <input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" id="btn_move_up" onclick="move_options_up('<inp2:l.import_InputName field="ExportColumns"/>', 1)" class="button">
+ <input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" id="btn_move_down" onclick="move_options_down('<inp2:l.import_InputName field="ExportColumns"/>', 1)" class="button"><br />
+ <img src="img/spacer.gif" width="1" height="5" alt=""><br />
</td>
+ <td><img src="img/spacer.gif" width="45" height="1" alt=""><br></td>
+ <td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
</tr>
-
<tr>
- <td valign="top">
- <input type="radio"<inp2:m_if check="l.import_FieldEquals" field="CheckDuplicatesMethod" value="2"> checked</inp2:m_if> name="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>_2" value="2" />
+ <td>
+ <select multiple id="<inp2:l.import_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
+ <inp2:l.import_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
+ </select>
+ <input type="hidden" id="export_columns" name="<inp2:l.import_InputName field="ExportColumns"/>" value="<inp2:l.import_Field field="ExportColumns"/>" />
</td>
+ <td align="center">
+ <input type="button" value=" «« " id="btn_move_left" onclick="move_selected('<inp2:l.import_InputName field="AvailableColumns"/>', '<inp2:l.import_InputName field="ExportColumns"/>')" class="button"><br>
+ <img src="img/spacer.gif" width="1" height="4" alt=""><br>
+ <input type="button" value=" »» " id="btn_move_right" onclick="move_selected('<inp2:l.import_InputName field="ExportColumns"/>', '<inp2:l.import_InputName field="AvailableColumns"/>'); select_sort('<inp2:l.import_InputName field="AvailableColumns"/>');" class="button">
+ </td>
<td>
- <label for="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>_2"><inp2:m_phrase name="la_OtherFields" />: </label>
- <inp2:l.import_PredefinedOptions prefix="l.import" field="DuplicateCheckFields" block="inp_checkbox_item" selected="checked"/>
-
- <inp2:m_RenderElement prefix="l.import" name="inp_edit_hidden" field="DuplicateCheckFields"/>
+ <select multiple id="<inp2:l.import_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
+ <inp2:l.import_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
+ </select>
</td>
</tr>
</table>
</td>
</inp2:m_RenderElement>
- <inp2:m_RenderElement name="inp_edit_filler"/>
- </table>
-</div>
+<!-- CATEGORY SELECTOR: BEGIN -->
+ <inp2:m_DefineElement name="root_cat_caption">
+ <inp2:m_Phrase name="la_rootcategory_name"/>
+ </inp2:m_DefineElement>
+ <inp2:m_DefineElement name="category_caption">
+ <inp2:m_param name="separator"/><inp2:m_param name="cat_name"/>
+ </inp2:m_DefineElement>
+
+ <inp2:m_RenderElement design="form_row" prefix="l.import" field="CategoryId" title="la_fld_ImportCategory">
+ <td class="control-cell">
+ <b><inp2:l.import_CategoryPath separator=" > " root_cat_render_as="root_cat_caption" render_as="category_caption" session_var="ImportCategory"/></b>
+ <input type="hidden" name="<inp2:l.import_InputName field='CategoryId'/>" value="<inp2:l.import_Field field='CategoryId' db='db'/>" />
+ <a href="javascript:openSelector('l.import', '<inp2:adm_SelectorLink prefix="l.import" selection_mode="single" tab_prefixes="none"/>', 'ImportCategory', null, 'OnSaveSettings');"><img src="img/icons/icon24_cat.gif" border="0" align="absmiddle" /></a>
+ </td>
+ </inp2:m_RenderElement>
+<!-- CATEGORY SELECTOR: END -->
+
+ <inp2:m_RenderElement name="inp_edit_box" prefix="l.import" field="CategorySeparator" title="la_fld_CategorySeparator" size="2" maxlength="1"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="l.import" field="ReplaceDuplicates" title="la_fld_ReplaceDuplicates" />
+
+ <inp2:m_RenderElement design="form_row" prefix="l.import" field="CheckDuplicatesMethod" title="la_fld_CheckDuplicatesMethod">
+ <td class="control-cell">
+ <table cellspacing="0" cellpadding="0">
+ <tr>
+ <td valign="top">
+ <input type="radio"<inp2:m_if check="l.import_FieldEquals" field="CheckDuplicatesMethod" value="1"> checked</inp2:m_if> name="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>_1" value="1" />
+ </td>
+ <td>
+ <label for="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>_1"><inp2:m_phrase name="la_IDField" />: LINKID</label>
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top">
+ <input type="radio"<inp2:m_if check="l.import_FieldEquals" field="CheckDuplicatesMethod" value="2"> checked</inp2:m_if> name="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>_2" value="2" />
+ </td>
+ <td>
+ <label for="<inp2:l.import_InputName field="CheckDuplicatesMethod"/>_2"><inp2:m_phrase name="la_OtherFields" />: </label>
+ <inp2:l.import_PredefinedOptions prefix="l.import" field="DuplicateCheckFields" block="inp_checkbox_item" selected="checked"/>
+
+ <inp2:m_RenderElement prefix="l.import" name="inp_edit_hidden" field="DuplicateCheckFields"/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </inp2:m_RenderElement>
+
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+</table>
+
<script language="javascript" type="text/javascript">
reflectFormFields();
</script>
Index: in-link/units/links/links_config.php
===================================================================
--- in-link/units/links/links_config.php (revision 14656)
+++ in-link/units/links/links_config.php (working copy)
@@ -515,7 +515,7 @@
'CategoryId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0),
'ExportFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
'ExportFilename' => Array ('type' => 'string', 'default' => ''),
- 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ', '),
+ 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ','),
'FieldsEnclosedBy' => Array ('type' => 'string', 'default' => '"'),
'LineEndings' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
'LineEndingsInside' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CRLF', 2 => 'LF'), 'default' => 2),
Index: in-news/admin_templates/import.tpl
===================================================================
--- in-news/admin_templates/import.tpl (revision 14656)
+++ in-news/admin_templates/import.tpl (working copy)
@@ -11,6 +11,12 @@
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
+
+ a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+ location.href = '<inp2:m_Link t="tools/import2"/>';
+ }
+ ) );
+
a_toolbar.AddButton( new ToolBarButton('import', '<inp2:m_phrase label="la_ToolTip_Import" escape="1"/>', function() {
document.getElementById('export_columns').value = select_to_string('<inp2:n.import_InputName field="ExportColumns"/>');
@@ -18,10 +24,6 @@
}
) );
- a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
- submit_event('n.import','OnGoBack');
- }
- ) );
a_toolbar.Render();
@@ -88,134 +90,132 @@
<inp2:n.import_SaveWarning name="grid_save_warning"/>
<inp2:n.import_ErrorWarning name="form_error_warning"/>
-<div id="scroll_container">
- <table class="edit-form">
- <inp2:m_RenderElement name="subsection" title="la_section_General"/>
- <inp2:m_RenderElement design="form_row" prefix="n.import" field="ImportSource" title="la_fld_ImportFilename">
- <td class="control-cell">
- <table border="0">
- <tr>
- <td>
- <input type="radio" name="<inp2:n.import_InputName field="ImportSource"/>" id="<inp2:n.import_InputName field="ImportSource"/>_1"<inp2:m_if check="n.import_FieldEquals" field="ImportSource" value="1"> checked</inp2:m_if> value="1" />
- </td>
- <td>
- <label for="<inp2:n.import_InputName field="ImportSource"/>_1">upload</label>
- </td>
- <td>
- <input type="file" name="<inp2:n.import_InputName field="ImportFilename"/>" id="<inp2:n.import_InputName field="ImportFilename"/>" onclick="check_radio('<inp2:n.import_InputName field="ImportSource"/>_1');">
- </td>
- </tr>
+<table class="edit-form bordered">
+ <inp2:m_RenderElement name="subsection" title="la_section_General"/>
+ <inp2:m_RenderElement design="form_row" prefix="n.import" field="ImportSource" title="la_fld_ImportFilename">
+ <td class="control-cell">
+ <table border="0">
+ <tr>
+ <td>
+ <input type="radio" name="<inp2:n.import_InputName field="ImportSource"/>" id="<inp2:n.import_InputName field="ImportSource"/>_1"<inp2:m_if check="n.import_FieldEquals" field="ImportSource" value="1"> checked</inp2:m_if> value="1" />
+ </td>
+ <td>
+ <label for="<inp2:n.import_InputName field="ImportSource"/>_1">upload</label>
+ </td>
+ <td>
+ <input type="file" name="<inp2:n.import_InputName field="ImportFilename"/>" id="<inp2:n.import_InputName field="ImportFilename"/>" onclick="check_radio('<inp2:n.import_InputName field="ImportSource"/>_1');">
+ </td>
+ </tr>
- <tr>
- <td>
- <input type="radio" name="<inp2:n.import_InputName field="ImportSource"/>" id="<inp2:n.import_InputName field="ImportSource"/>_2"<inp2:m_if check="n.import_FieldEquals" field="ImportSource" value="2"> checked</inp2:m_if> value="2" />
- </td>
- <td>
- <label for="<inp2:n.import_InputName field="ImportSource"/>_2">select</label>
- </td>
- <td>
- <select name="<inp2:n.import_InputName field="ImportLocalFilename"/>" onclick="check_radio('<inp2:n.import_InputName field="ImportSource"/>_2');">
- <inp2:n.import_PredefinedOptions field="ImportLocalFilename" block="inp_option_item" selected="selected"/>
- </select>
- </td>
- </tr>
+ <tr>
+ <td>
+ <input type="radio" name="<inp2:n.import_InputName field="ImportSource"/>" id="<inp2:n.import_InputName field="ImportSource"/>_2"<inp2:m_if check="n.import_FieldEquals" field="ImportSource" value="2"> checked</inp2:m_if> value="2" />
+ </td>
+ <td>
+ <label for="<inp2:n.import_InputName field="ImportSource"/>_2">select</label>
+ </td>
+ <td>
+ <select name="<inp2:n.import_InputName field="ImportLocalFilename"/>" onclick="check_radio('<inp2:n.import_InputName field="ImportSource"/>_2');">
+ <inp2:n.import_PredefinedOptions field="ImportLocalFilename" block="inp_option_item" selected="selected"/>
+ </select>
+ </td>
+ </tr>
- </table>
- </td>
- </inp2:m_RenderElement>
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="n.import" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="n.import" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="n.import" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="n.import" field="SkipFirstRow" title="la_fld_SkipFirstRow"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="n.import" field="FieldTitles" title="la_fld_FieldTitles" onclick="reflectFormFields();"/>
-
- <inp2:m_RenderElement design="form_row" prefix="n.import" field="ExportColumns" title="la_fld_ImportColumns">
- <td class="control-cell">
- <table cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td>
- <input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" id="btn_move_up" onclick="move_options_up('<inp2:n.import_InputName field="ExportColumns"/>', 1)" class="button">
- <input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" id="btn_move_down" onclick="move_options_down('<inp2:n.import_InputName field="ExportColumns"/>', 1)" class="button"><br />
- <img src="img/spacer.gif" width="1" height="5" alt=""><br />
- </td>
- <td><img src="img/spacer.gif" width="45" height="1" alt=""><br></td>
- <td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
- </tr>
- <tr>
- <td>
- <select multiple id="<inp2:n.import_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
- <inp2:n.import_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
- </select>
- <input type="hidden" id="export_columns" name="<inp2:n.import_InputName field="ExportColumns"/>" value="<inp2:n.import_Field field="ExportColumns"/>" />
- </td>
- <td align="center">
- <input type="button" value=" «« " id="btn_move_left" onclick="move_selected('<inp2:n.import_InputName field="AvailableColumns"/>', '<inp2:n.import_InputName field="ExportColumns"/>')" class="button"><br>
- <img src="img/spacer.gif" width="1" height="4" alt=""><br>
- <input type="button" value=" »» " id="btn_move_right" onclick="move_selected('<inp2:n.import_InputName field="ExportColumns"/>', '<inp2:n.import_InputName field="AvailableColumns"/>'); select_sort('<inp2:n.import_InputName field="AvailableColumns"/>');" class="button">
- </td>
- <td>
- <select multiple id="<inp2:n.import_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
- <inp2:n.import_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
- </select>
- </td>
- </tr>
- </table>
- </td>
- </inp2:m_RenderElement>
-
- <!-- CATEGORY SELECTOR: BEGIN -->
- <inp2:m_DefineElement name="root_cat_caption">
- <inp2:m_Phrase name="la_rootcategory_name"/>
- </inp2:m_DefineElement>
-
- <inp2:m_DefineElement name="category_caption">
- <inp2:m_param name="separator"/><inp2:m_param name="cat_name"/>
- </inp2:m_DefineElement>
-
- <inp2:m_RenderElement design="form_row" prefix="n.import" field="CategoryId" title="la_fld_ImportCategory">
- <td class="control-cell">
- <b><inp2:n.import_CategoryPath separator=" > " root_cat_render_as="root_cat_caption" render_as="category_caption" session_var="ImportCategory"/></b>
- <input type="hidden" name="<inp2:n.import_InputName field='CategoryId'/>" value="<inp2:n.import_Field field='CategoryId' db='db'/>" />
- <a href="javascript:openSelector('n.import', '<inp2:adm_SelectorLink prefix="n.import" selection_mode="single" tab_prefixes="none"/>', 'ImportCategory', null, 'OnSaveSettings');"><img src="img/icons/icon24_cat.gif" border="0" align="absmiddle" /></a>
+ </table>
</td>
</inp2:m_RenderElement>
- <!-- CATEGORY SELECTOR: END -->
- <inp2:m_RenderElement name="inp_edit_box" prefix="n.import" field="CategorySeparator" title="la_fld_CategorySeparator" size="2" maxlength="1"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="n.import" field="ReplaceDuplicates" title="la_fld_ReplaceDuplicates" />
+ <inp2:m_RenderElement name="inp_edit_box" prefix="n.import" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="n.import" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="n.import" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="n.import" field="SkipFirstRow" title="la_fld_SkipFirstRow"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="n.import" field="FieldTitles" title="la_fld_FieldTitles" onclick="reflectFormFields();"/>
- <inp2:m_RenderElement design="form_row" prefix="n.import" field="CheckDuplicatesMethod" title="la_fld_CheckDuplicatesMethod">
+ <inp2:m_RenderElement design="form_row" prefix="n.import" field="ExportColumns" title="la_fld_ImportColumns">
<td class="control-cell">
- <table cellspacing="0" cellpadding="0">
+ <table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td valign="top">
- <input type="radio"<inp2:m_if check="n.import_FieldEquals" field="CheckDuplicatesMethod" value="1"> checked</inp2:m_if> name="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>_1" value="1" />
- </td>
<td>
- <label for="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>_1"><inp2:m_phrase name="la_IDField" />: ARTICLEID</label>
+ <input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" id="btn_move_up" onclick="move_options_up('<inp2:n.import_InputName field="ExportColumns"/>', 1)" class="button">
+ <input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" id="btn_move_down" onclick="move_options_down('<inp2:n.import_InputName field="ExportColumns"/>', 1)" class="button"><br />
+ <img src="img/spacer.gif" width="1" height="5" alt=""><br />
</td>
+ <td><img src="img/spacer.gif" width="45" height="1" alt=""><br></td>
+ <td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
</tr>
-
<tr>
- <td valign="top">
- <input type="radio"<inp2:m_if check="n.import_FieldEquals" field="CheckDuplicatesMethod" value="2"> checked</inp2:m_if> name="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>_2" value="2" />
+ <td>
+ <select multiple id="<inp2:n.import_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
+ <inp2:n.import_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
+ </select>
+ <input type="hidden" id="export_columns" name="<inp2:n.import_InputName field="ExportColumns"/>" value="<inp2:n.import_Field field="ExportColumns"/>" />
</td>
+ <td align="center">
+ <input type="button" value=" «« " id="btn_move_left" onclick="move_selected('<inp2:n.import_InputName field="AvailableColumns"/>', '<inp2:n.import_InputName field="ExportColumns"/>')" class="button"><br>
+ <img src="img/spacer.gif" width="1" height="4" alt=""><br>
+ <input type="button" value=" »» " id="btn_move_right" onclick="move_selected('<inp2:n.import_InputName field="ExportColumns"/>', '<inp2:n.import_InputName field="AvailableColumns"/>'); select_sort('<inp2:n.import_InputName field="AvailableColumns"/>');" class="button">
+ </td>
<td>
- <label for="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>_2"><inp2:m_phrase name="la_OtherFields" />: </label>
- <inp2:n.import_PredefinedOptions prefix="n.import" field="DuplicateCheckFields" block="inp_checkbox_item" selected="checked"/>
-
- <inp2:m_RenderElement prefix="n.import" name="inp_edit_hidden" field="DuplicateCheckFields"/>
+ <select multiple id="<inp2:n.import_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
+ <inp2:n.import_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
+ </select>
</td>
</tr>
</table>
</td>
</inp2:m_RenderElement>
- <inp2:m_RenderElement name="inp_edit_filler"/>
- </table>
-</div>
+<!-- CATEGORY SELECTOR: BEGIN -->
+ <inp2:m_DefineElement name="root_cat_caption">
+ <inp2:m_Phrase name="la_rootcategory_name"/>
+ </inp2:m_DefineElement>
+ <inp2:m_DefineElement name="category_caption">
+ <inp2:m_param name="separator"/><inp2:m_param name="cat_name"/>
+ </inp2:m_DefineElement>
+
+ <inp2:m_RenderElement design="form_row" prefix="n.import" field="CategoryId" title="la_fld_ImportCategory">
+ <td class="control-cell">
+ <b><inp2:n.import_CategoryPath separator=" > " root_cat_render_as="root_cat_caption" render_as="category_caption" session_var="ImportCategory"/></b>
+ <input type="hidden" name="<inp2:n.import_InputName field='CategoryId'/>" value="<inp2:n.import_Field field='CategoryId' db='db'/>" />
+ <a href="javascript:openSelector('n.import', '<inp2:adm_SelectorLink prefix="n.import" selection_mode="single" tab_prefixes="none"/>', 'ImportCategory', null, 'OnSaveSettings');"><img src="img/icons/icon24_cat.gif" border="0" align="absmiddle" /></a>
+ </td>
+ </inp2:m_RenderElement>
+<!-- CATEGORY SELECTOR: END -->
+
+ <inp2:m_RenderElement name="inp_edit_box" prefix="n.import" field="CategorySeparator" title="la_fld_CategorySeparator" size="2" maxlength="1"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="n.import" field="ReplaceDuplicates" title="la_fld_ReplaceDuplicates" />
+
+ <inp2:m_RenderElement design="form_row" prefix="n.import" field="CheckDuplicatesMethod" title="la_fld_CheckDuplicatesMethod">
+ <td class="control-cell">
+ <table cellspacing="0" cellpadding="0">
+ <tr>
+ <td valign="top">
+ <input type="radio"<inp2:m_if check="n.import_FieldEquals" field="CheckDuplicatesMethod" value="1"> checked</inp2:m_if> name="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>_1" value="1" />
+ </td>
+ <td>
+ <label for="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>_1"><inp2:m_phrase name="la_IDField" />: ARTICLEID</label>
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top">
+ <input type="radio"<inp2:m_if check="n.import_FieldEquals" field="CheckDuplicatesMethod" value="2"> checked</inp2:m_if> name="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>_2" value="2" />
+ </td>
+ <td>
+ <label for="<inp2:n.import_InputName field="CheckDuplicatesMethod"/>_2"><inp2:m_phrase name="la_OtherFields" />: </label>
+ <inp2:n.import_PredefinedOptions prefix="n.import" field="DuplicateCheckFields" block="inp_checkbox_item" selected="checked"/>
+
+ <inp2:m_RenderElement prefix="n.import" name="inp_edit_hidden" field="DuplicateCheckFields"/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </inp2:m_RenderElement>
+
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+</table>
+
<script language="javascript" type="text/javascript">
reflectFormFields();
</script>
Index: in-news/units/articles/articles_config.php
===================================================================
--- in-news/units/articles/articles_config.php (revision 14656)
+++ in-news/units/articles/articles_config.php (working copy)
@@ -473,7 +473,7 @@
'CategoryId' => Array ('type' => 'int', 'default' => 0),
'ExportFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
'ExportFilename' => Array ('type' => 'string', 'default' => ''),
- 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ', '),
+ 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ','),
'FieldsEnclosedBy' => Array ('type' => 'string', 'default' => '"'),
'LineEndings' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
'LineEndingsInside' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CRLF', 2 => 'LF'), 'default' => 2),
categoryitem_import_problems_core_v3.patch [^] (50,510 bytes) 2011-10-19 05:54
[Show Content]
Index: admin_templates/incs/header.tpl
===================================================================
--- admin_templates/incs/header.tpl (revision 14653)
+++ admin_templates/incs/header.tpl (working copy)
@@ -99,6 +99,14 @@
</style>
</inp2:m_if>
+<inp2:m_ifnot check="adm_UsePopups">
+ <style type="text/css">
+ table.edit-form {
+ border: 1px solid black;
+ }
+ </style>
+</inp2:m_ifnot>
+
</head>
<inp2:m_include t="incs/blocks"/>
Index: admin_templates/incs/style_template.css
===================================================================
--- admin_templates/incs/style_template.css (revision 14590)
+++ admin_templates/incs/style_template.css (working copy)
@@ -60,7 +60,7 @@
}
.bordered, table.bordered, .bordered-no-bottom {
- border: 1px solid #000000;
+ border: 1px solid #000000 !important;
border-top-width: 0px;
border-collapse: collapse;
}
@@ -346,6 +346,29 @@
background-color: #FFFF00;
}
+div.filter, div.filter-active {
+ background-color: white;
+ border: 1px solid #AAAAAA;
+ color: black;
+ font-weight: normal;
+ padding: 3px;
+}
+
+div.filter-active {
+ background-color: #FFFF00;
+}
+
+div.multioptions_filter {
+ position: absolute;
+ z-index: 100;
+ color: black;
+ background-color: white;
+ border: 1px solid black;
+ padding: 3px 5px;
+ display: none;
+ vertical-align: middle;
+}
+
/* Column titles row */
tr.grid-header-row-0 td {
height: 25px;
@@ -413,7 +436,7 @@
/* Forms */
table.edit-form {
border: none;
- border-top-width: 0px;
+ border-top-width: 0px !important;
border-collapse: collapse;
width: 100%;
}
@@ -493,11 +516,18 @@
border-top-width: 0px;
}
+.form-notice, .form-warning {
+ font-size: 11px;
+}
+
.form-warning {
color: red;
- font-size: 11px;
}
+.form-notice {
+ color: green;
+}
+
.priority {
color: red;
padding-left: 1px;
Index: admin_templates/js/forms.js
===================================================================
--- admin_templates/js/forms.js (revision 14653)
+++ admin_templates/js/forms.js (working copy)
@@ -239,6 +239,11 @@
// alert('h after correction is '+h);
+ /*
+ // use this 2 lines, instead of next 3 lines, when scrolling without popups needed
+ var w = $(window.document.body).outerWidth(false);
+ w -= ($div.outerWidth() - $div.width());*/
+
window.document.body.style.width = '100%';
var w = (document.all ? window.document.body.offsetWidth : window.innerWidth);
Index: install/install_data.sql
===================================================================
--- install/install_data.sql (revision 14662)
+++ install/install_data.sql (working copy)
@@ -693,7 +693,7 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:permission_types.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:permission_types.delete', 11, 1, 1, 0);
-INSERT INTO Skins VALUES (DEFAULT, 'Default', '/* General elements */\r\n\r\nhtml {\r\n height: 100%;\r\n}\r\n\r\nbody {\r\n font-family: verdana,arial,helvetica,sans-serif;\r\n color: #000000;\r\n overflow-x: auto; overflow-y: auto;\r\n margin: 0px 0px 0px 0px;\r\n text-decoration: none;\r\n}\r\n\r\nbody, td {\r\n /* fix for Firefox, when font-size was not inherited in table cells */\r\n font-size: 9pt;\r\n}\r\n\r\na {\r\n color: #006699;\r\n text-decoration: none;\r\n}\r\n\r\na:hover {\r\n color: #009ff0;\r\n text-decoration: none;\r\n}\r\n\r\nform {\r\n display: inline;\r\n}\r\n\r\nimg { border: 0px; }\r\n\r\nbody.height-100 {\r\n height: 100%;\r\n}\r\n\r\nbody.regular-body {\r\n margin: 0px 10px 5px 10px;\r\n color: #000000;\r\n background-color: @@SectionBgColor@@;\r\n}\r\n\r\nbody.edit-popup {\r\n margin: 0px 0px 0px 0px;\r\n}\r\n\r\ntable.collapsed {\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered, table.bordered, .bordered-no-bottom {\r\n border: 1px solid #000000;\r\n border-top-width: 0px;\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered-no-bottom {\r\n border-top-width: 1px;\r\n border-bottom: none;\r\n}\r\n\r\n.login-table td {\r\n padding: 1px;\r\n}\r\n\r\n.disabled {\r\n background-color: #ebebeb;\r\n}\r\n\r\n/* Head frame */\r\ntable.head-table {\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/right_background.png'') top right @@HeadBgColor@@ no-repeat;\r\n}\r\n\r\n.head-table tr td, .head-table tr td a {\r\n color: @@HeadColor@@\r\n}\r\n\r\ndiv#extra_toolbar td.button-active {\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/toolbar_button_background.gif'') bottom left repeat-x;\r\n height: 22px;\r\n}\r\n\r\ndiv#extra_toolbar td.button-active a {\r\n color: black;\r\n text-decoration: none;\r\n}\r\n\r\ntd.kx-block-header, .head-table tr td.kx-block-header{\r\n color: @@HeadBarColor@@;\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/toolbar_background.gif'') repeat-x top left;\r\n /*background-color: @@HeadBarBgColor@@;*/\r\n padding-left: 7px;\r\n padding-right: 7px;\r\n}\r\n\r\na.kx-header-link {\r\n text-decoration: underline;\r\n font-weight: bold;\r\n color: #0080C8;\r\n}\r\n\r\na.kx-header-link:hover {\r\n color: #FFCB05;\r\n text-decoration: none;\r\n}\r\n\r\n.kx-secondary-foreground {\r\n color: #FFFFFF;\r\n /*background-color: @@HeadBarBgColor@@;*/\r\n}\r\n\r\n.kx-login-button {\r\n background-color: #2D79D6;\r\n color: #FFFFFF;\r\n}\r\n\r\n/* General form button (yellow) */\r\n.button {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #000000;\r\n background: url(''@@base_url@@/core/admin_templates/img/button_back.gif'') #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Disabled (grayed-out) form button */\r\n.button-disabled {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #676767;\r\n background: url(''@@base_url@@/core/admin_templates/img/button_back_disabled.gif'') #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Tabs bar */\r\n\r\n.tab, .tab-active {\r\n background-color: #F0F1EB;\r\n padding: 3px 7px 2px 7px;\r\n border-top: 1px solid black;\r\n border-left: 1px solid black;\r\n border-right: 1px solid black;\r\n margin-left: 3px !important;\r\n white-space: nowrap;\r\n}\r\n\r\n.tab-active {\r\n background-color: #4487D9;\r\n}\r\n\r\n.tab a {\r\n color: #4487D9;\r\n font-weight: bold;\r\n}\r\n\r\n.tab-active a {\r\n color: #FFFFFF;\r\n font-weight: bold;\r\n}\r\n\r\na.scroll-left, a.scroll-right {\r\n cursor: pointer;\r\n display: block;\r\n float: left;\r\n height: 18px;\r\n margin: 0px 1px;\r\n width: 18px;\r\n}\r\n\r\na.scroll-left {\r\n background: transparent url(''@@base_url@@/core/admin_templates/img/tabs/left.png'') no-repeat scroll 0 0;\r\n}\r\n\r\na.scroll-right {\r\n background: transparent url(''@@base_url@@/core/admin_templates/img/tabs/right.png'') no-repeat scroll 0 0;\r\n}\r\n\r\na.disabled {\r\n visibility: hidden !important;\r\n}\r\n\r\na.scroll-left:hover, a.scroll-right:hover {\r\n background-position: 0 -18px;\r\n}\r\n\r\ntd.scroll-right-container {\r\n width: 20px;\r\n}\r\n\r\ntd.scroll-right-container.disabled, td.scroll-right-container.disabled * {\r\n width: 0px;\r\n margin: 0px;\r\n}\r\n\r\ntd.scroll-right-container.disabled br {\r\n display: none;\r\n}\r\n\r\n/* Toolbar */\r\n\r\n.toolbar {\r\n font-size: 8pt;\r\n border: 1px solid #000000;\r\n border-width: 0px 1px 1px 1px;\r\n background-color: @@ToolbarBgColor@@;\r\n border-collapse: collapse;\r\n}\r\n\r\n.toolbar td {\r\n height: 100%;\r\n}\r\n\r\n.toolbar-button, .toolbar-button-disabled, .toolbar-button-over {\r\n float: left;\r\n text-align: center;\r\n font-size: 8pt;\r\n padding: 5px 5px 5px 5px;\r\n vertical-align: middle;\r\n color: #006F99;\r\n}\r\n\r\n.toolbar-button-over {\r\n color: #000;\r\n}\r\n\r\n.toolbar-button-disabled {\r\n color: #444;\r\n}\r\n\r\n/* Scrollable Grids */\r\n\r\n\r\n.layout-only-table td {\r\n border: none !important;\r\n}\r\n\r\n/* Main Grid class */\r\n.grid-scrollable {\r\n padding: 0px;\r\n border: 1px solid black !important;\r\n border-top: none !important;\r\n}\r\n\r\n/* Div generated by js, which contains all the scrollable grid elements, affects the style of scrollable area without data (if there are too few rows) */\r\n.grid-container {\r\n background-color: #fff;\r\n}\r\n\r\n.grid-container table {\r\n border-collapse: collapse;\r\n}\r\n\r\n/* Inner div generated in each data-cell */\r\n.grid-cell-div {\r\n overflow: hidden;\r\n height: auto;\r\n}\r\n\r\n/* Main row definition */\r\n.grid-data-row td, .grid-data-row-selected td, .grid-data-row-even-selected td, .grid-data-row-mouseover td, .table-color1, .table-color2 {\r\n font-weight: normal;\r\n color: @@OddColor@@;\r\n background-color: @@OddBgColor@@;\r\n padding: 3px 5px 3px 5px;\r\n overflow: hidden;\r\n border-right: 1px solid #c9c9c9;\r\n}\r\n.grid-data-row-even td, .table-color2 {\r\n background-color: @@EvenBgColor@@;\r\n color: @@EvenColor@@;\r\n}\r\n.grid-data-row td a, .grid-data-row-selected td a, .grid-data-row-mouseover td a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* mouse-over rows */\r\n.grid-data-row-mouseover td, table tr.grid-data-row[_row_highlighted] td {\r\n background: #FFFDF4;\r\n}\r\n\r\n/* Selected row, applies to both checkbox and data areas */\r\n.grid-data-row-selected td, table tr.grid-data-row[_row_selected] td {\r\n background: #FEF2D6;\r\n}\r\n\r\n.grid-data-row-even-selected td, .grid-data-row-even[_row_selected] td {\r\n background: #FFF7E0;\r\n}\r\n\r\n/* General header cell definition */\r\n.grid-header-row td {\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n text-decoration: none;\r\n padding: 3px 5px 3px 5px;\r\n color: @@ColumnTitlesColor@@;\r\n border-right: none;\r\n text-align: left;\r\n vertical-align: middle !important;\r\n white-space: nowrap;\r\n border-right: 1px solid #777;\r\n}\r\n\r\n/* Filters row */\r\ntr.grid-header-row-1 td {\r\n background-color: @@FiltersBgColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\n/* Grid Filters */\r\ntable.range-filter {\r\n width: 100%;\r\n}\r\n\r\n.range-filter td {\r\n padding: 0px 0px 2px 2px !important;\r\n border: none !important;\r\n font-size: 8pt !important;\r\n font-weight: normal !important;\r\n text-align: left;\r\n color: #000000 !important;\r\n}\r\n\r\ninput.filter, select.filter, input.filter-active, select.filter-active {\r\n margin-bottom: 0px;\r\n border: 1px solid #aaa;\r\n}\r\n\r\ninput.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\nselect.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\ndiv.filter, div.filter-active {\r\n background-color: white;\r\n border: 1px solid #AAAAAA;\r\n color: black;\r\n font-weight: normal;\r\n padding: 3px;\r\n}\r\n\r\ndiv.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\ndiv.multioptions_filter {\r\n position: absolute;\r\n z-index: 100;\r\n color: black;\r\n background-color: white;\r\n border: 1px solid black;\r\n padding: 3px 5px;\r\n display: none;\r\n vertical-align: middle;\r\n}\r\n\r\n/* Column titles row */\r\ntr.grid-header-row-0 td {\r\n height: 25px;\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n color: @@ColumnTitlesColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\ntr.grid-header-row-0 td a {\r\n color: @@ColumnTitlesColor@@;\r\n}\r\n\r\ntr.grid-header-row-0 td a:hover {\r\n color: #FFCC00;\r\n}\r\n\r\n\r\n.grid-footer-row td {\r\n background-color: #D7D7D7;\r\n font-weight: bold;\r\n border-right: 1px solid #C9C9C9;\r\n padding: 3px 5px 3px 5px;\r\n}\r\n\r\ntd.grid-header-last-cell, td.grid-data-last-cell, td.grid-footer-last-cell {\r\n border-right: none !important;\r\n}\r\n\r\ntd.grid-data-col-0, td.grid-data-col-0 div {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-1 td.grid-header-col-1 {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-1 td.grid-header-col-1 div {\r\n display: table-cell;\r\n vertical-align: middle;\r\n}\r\n\r\n.grid-status-bar {\r\n border: 1px solid black;\r\n border-top: none;\r\n padding: 0px;\r\n width: 100%;\r\n border-collapse: collapse;\r\n height: 30px;\r\n}\r\n\r\n.grid-status-bar td {\r\n background-color: @@TitleBarBgColor@@;\r\n color: @@TitleBarColor@@;\r\n font-size: 11pt;\r\n font-weight: normal;\r\n padding: 2px 8px 2px 8px;\r\n}\r\n\r\n/* /Scrollable Grids */\r\n\r\n\r\n/* Forms */\r\ntable.edit-form {\r\n border: none;\r\n border-top-width: 0px;\r\n border-collapse: collapse;\r\n width: 100%;\r\n}\r\n\r\n.edit-form-odd, .edit-form-even {\r\n padding: 0px;\r\n}\r\n\r\n.subsectiontitle {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #4A92CE;\r\n color: #fff;\r\n height: 25px;\r\n border-top: 1px solid black;\r\n vertical-align: middle;\r\n}\r\n\r\n/* remove top-border from first sub-section element */\r\ntable.edit-form .subsectiontitle:first-child, table.bordered .subsectiontitle:first-child {\r\n border-top-width: 0;\r\n}\r\n\r\n.subsectiontitle td {\r\n vertical-align: middle;\r\n /*padding: 3px 5px 3px 5px;*/\r\n padding: 1px 5px;\r\n}\r\n\r\n.label-cell {\r\n background: #DEE7F6 url(''@@base_url@@/core/admin_templates/img/bgr_input_name_line.gif'') no-repeat right bottom;\r\n font: 12px arial, sans-serif;\r\n padding: 4px 20px;\r\n width: 160px;\r\n}\r\n\r\n.control-mid {\r\n width: 13px;\r\n border-left: 1px solid #7A95C2;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/bgr_mid.gif'') repeat-x left bottom;\r\n}\r\n\r\n.control-cell {\r\n font: 11px arial, sans-serif;\r\n padding: 4px 10px 5px 5px;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/bgr_input_line.gif'') no-repeat left bottom;\r\n width: auto;\r\n vertical-align: middle;\r\n}\r\n\r\n.label-cell-filler {\r\n background: #DEE7F6 none;\r\n}\r\n.control-mid-filler {\r\n background: #fff none;\r\n border-left: 1px solid #7A95C2;\r\n}\r\n.control-cell-filler {\r\n background: #fff none;\r\n}\r\n\r\n.error {\r\n color: red;\r\n}\r\n.error-cell {\r\n color: red;\r\n}\r\n\r\n.field-required {\r\n color: red;\r\n}\r\n\r\n.warning-table {\r\n background-color: #F0F1EB;\r\n border: 1px solid #000000;\r\n border-collapse: collapse;\r\n border-top-width: 0px;\r\n}\r\n\r\n.form-notice, .form-warning {\r\n font-size: 11px;\r\n}\r\n\r\n.form-warning {\r\n color: red;\r\n}\r\n\r\n.form-notice {\r\n color: green;\r\n}\r\n\r\n.priority {\r\n color: red;\r\n padding-left: 1px;\r\n padding-right: 1px;\r\n font-size: 11px;\r\n}\r\n\r\n.small-statistics {\r\n font-size: 11px;\r\n color: #707070;\r\n}\r\n\r\n.req-note {\r\n font-style: italic;\r\n color: #333;\r\n}\r\n\r\n#scroll_container table.tableborder {\r\n border-collapse: separate\r\n}\r\n\r\n/* Uploader */\r\n.uploader-queue div.file {\r\n font-size: 11px;\r\n border: 1px solid #7F99C5;\r\n padding: 3px;\r\n background-color: #DEE7F6;\r\n margin-bottom: 2px;\r\n}\r\n\r\n.uploader-queue .left {\r\n float: left;\r\n vertical-align: top;\r\n}\r\n\r\n.uploader-queue .file-label {\r\n margin-left: 5px;\r\n}\r\n\r\n.uploader-queue .preview .delete-checkbox {\r\n margin-top: -3px;\r\n}\r\n\r\n.uploader-queue .progress-container {\r\n margin: 2px 5px 0px 5px;\r\n}\r\n\r\n.uploader-queue .progress-empty {\r\n width: 150px;\r\n height: 9px;\r\n border: 1px solid black;\r\n background: url(''@@base_url@@/core/admin_templates/img/progress_left.gif'') repeat-x;\r\n}\r\n\r\n.uploader-queue .progress-full {\r\n height: 9px;\r\n background: url(''@@base_url@@/core/admin_templates/img/progress_done.gif'');\r\n}\r\n\r\n.uploader-queue .thumbnail {\r\n /*margin-bottom: 2px;*/\r\n border: 1px solid black;\r\n background-color: grey;\r\n}\r\n\r\n/* To be sorted */\r\nspan#category_path, span#category_path a {\r\n color: #FFFFFF;\r\n}\r\n\r\nspan#category_path a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* Section title, right to the big icon */\r\n.admintitle {\r\n font-size: 16pt;\r\n font-weight: bold;\r\n color: @@SectionColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Left side of bluebar */\r\n.header_left_bg {\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n padding-left: 5px;\r\n}\r\n\r\n/* Right side of bluebar */\r\n.tablenav, tablenav a {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n\r\n text-decoration: none;\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n}\r\n\r\n/* Section title in the bluebar * -- why ''link''? :S */\r\n.tablenav_link {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Active page in top and bottom bluebars pagination */\r\n.current_page {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #fff;\r\n color: #2D79D6;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Other pages and arrows in pagination on blue */\r\n.nav_url {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n color: #fff;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Tree */\r\n.tree-body {\r\n background-color: @@TreeBgColor@@;\r\n height: 100%\r\n}\r\n\r\n.tree_head.td, .tree_head, .tree_head:hover {\r\n font-weight: bold;\r\n font-size: 10px;\r\n color: #FFFFFF;\r\n font-family: Verdana, Arial;\r\n text-decoration: none;\r\n}\r\n\r\n.tree {\r\n padding: 0px;\r\n border: none;\r\n border-collapse: collapse;\r\n}\r\n\r\n.tree tr td {\r\n padding: 0px;\r\n margin: 0px;\r\n font-family: helvetica, arial, verdana,;\r\n font-size: 11px;\r\n white-space: nowrap;\r\n}\r\n\r\n.tree tr td a {\r\n font-size: 11px;\r\n color: @@TreeColor@@;\r\n font-family: Helvetica, Arial, Verdana;\r\n text-decoration: none;\r\n padding: 2px;\r\n}\r\n\r\n.tree tr td a:hover, .tree tr td a.debug-only-item:hover {\r\n color: @@TreeHoverColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a, .tree tr.highlighted td a.debug-only-item {\r\n color: @@TreeHighColor@@;\r\n background-color: @@TreeHighBgColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a:hover {\r\n color: @@TreeHighHoverColor@@;\r\n}\r\n\r\n.tree tr td a.debug-only-item {\r\n color: grey;\r\n}\r\n\r\n/* Ajax Dropdown */\r\n.suggest-box {\r\n border: 1px solid #999;\r\n background-color: #fff;\r\n}\r\n\r\n.suggest-item, .suggest-item-over {\r\n padding: 1px 2px 0px 2px;\r\n font-family: arial,verdana;\r\n font-size: 12px;\r\n}\r\n\r\n.suggest-item-over {\r\n background-color: #3366CC;\r\n color: #fff;\r\n}\r\n\r\n/* Dashboard Summary Boxes */\r\n.summary-box {\r\n border: 1px solid black;\r\n margin-bottom: 4px;\r\n}\r\n\r\n.summary-box .title {\r\n color: white;\r\n font-weight: bold;\r\n padding: 6px 5px;\r\n vertical-align: middle;\r\n background-color: #4A92CE;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\n.summary-box .content {\r\n padding: 4px;\r\n background-color: #F6F6F6;\r\n}\r\n\r\n.summary-box .group {\r\n border-bottom: 1px solid black;\r\n margin-bottom: 10px;\r\n padding: 0 0 10px 10px;\r\n}\r\n\r\n.summary-box .group.last {\r\n border-width: 0px;\r\n margin-bottom: 0;\r\n padding-bottom: 5px;\r\n}\r\n\r\n.summary-box h4 {\r\n margin: 0;\r\n padding: 0 0 3px 0;\r\n font-size: 11px;\r\n font-weight: bold;\r\n}\r\n\r\n.summary-box .hint {\r\n font-size: 10px;\r\n color: grey;\r\n margin-bottom: 3px;\r\n}\r\n\r\n.summary-box .hint .cache-key {\r\n margin-bottom: 7px;\r\n margin-left: 3px;\r\n}\r\n\r\n.summary-box ul {\r\n margin-top: 5px;\r\n margin-bottom: 3px;\r\n padding-left: 30px;\r\n}\r\n\r\n.summary-box li {\r\n padding-bottom: 4px;\r\n}', 'in-portal_logo_img.jpg', 'in-portal_logo_img2.jpg', 'in-portal_logo_login.gif', 'a:22:{s:11:"HeadBgColor";a:2:{s:11:"Description";s:27:"Head frame background color";s:5:"Value";s:7:"#007BF4";}s:9:"HeadColor";a:2:{s:11:"Description";s:21:"Head frame text color";s:5:"Value";s:7:"#FFFFFF";}s:14:"SectionBgColor";a:2:{s:11:"Description";s:28:"Section bar background color";s:5:"Value";s:7:"#FFFFFF";}s:12:"SectionColor";a:2:{s:11:"Description";s:22:"Section bar text color";s:5:"Value";s:7:"#2D79D6";}s:12:"HeadBarColor";a:1:{s:5:"Value";s:7:"#000000";}s:14:"HeadBarBgColor";a:1:{s:5:"Value";s:7:"#1961B8";}s:13:"TitleBarColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TitleBarBgColor";a:1:{s:5:"Value";s:7:"#2D79D6";}s:14:"ToolbarBgColor";a:1:{s:5:"Value";s:7:"#F0F1EB";}s:14:"FiltersBgColor";a:1:{s:5:"Value";s:7:"#D7D7D7";}s:17:"ColumnTitlesColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:19:"ColumnTitlesBgColor";a:1:{s:5:"Value";s:7:"#999999";}s:8:"OddColor";a:1:{s:5:"Value";s:7:"#000000";}s:10:"OddBgColor";a:1:{s:5:"Value";s:7:"#F6F6F6";}s:9:"EvenColor";a:1:{s:5:"Value";s:7:"#000000";}s:11:"EvenBgColor";a:1:{s:5:"Value";s:7:"#EBEBEB";}s:9:"TreeColor";a:1:{s:5:"Value";s:7:"#000000";}s:14:"TreeHoverColor";a:1:{s:5:"Value";s:7:"#009FF0";}s:13:"TreeHighColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:18:"TreeHighHoverColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TreeHighBgColor";a:1:{s:5:"Value";s:7:"#4A92CE";}s:11:"TreeBgColor";a:1:{s:5:"Value";s:7:"#DCECF6";}}', 1317819843, 1, 1);
+INSERT INTO Skins VALUES (DEFAULT, 'Default', '/* General elements */\r\n\r\nhtml {\r\n height: 100%;\r\n}\r\n\r\nbody {\r\n font-family: verdana,arial,helvetica,sans-serif;\r\n color: #000000;\r\n overflow-x: auto; overflow-y: auto;\r\n margin: 0px 0px 0px 0px;\r\n text-decoration: none;\r\n}\r\n\r\nbody, td {\r\n /* fix for Firefox, when font-size was not inherited in table cells */\r\n font-size: 9pt;\r\n}\r\n\r\na {\r\n color: #006699;\r\n text-decoration: none;\r\n}\r\n\r\na:hover {\r\n color: #009ff0;\r\n text-decoration: none;\r\n}\r\n\r\nform {\r\n display: inline;\r\n}\r\n\r\nimg { border: 0px; }\r\n\r\nbody.height-100 {\r\n height: 100%;\r\n}\r\n\r\nbody.regular-body {\r\n margin: 0px 10px 5px 10px;\r\n color: #000000;\r\n background-color: @@SectionBgColor@@;\r\n}\r\n\r\nbody.edit-popup {\r\n margin: 0px 0px 0px 0px;\r\n}\r\n\r\ntable.collapsed {\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered, table.bordered, .bordered-no-bottom {\r\n border: 1px solid #000000 !important;\r\n border-top-width: 0px;\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered-no-bottom {\r\n border-top-width: 1px;\r\n border-bottom: none;\r\n}\r\n\r\n.login-table td {\r\n padding: 1px;\r\n}\r\n\r\n.disabled {\r\n background-color: #ebebeb;\r\n}\r\n\r\n/* Head frame */\r\ntable.head-table {\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/right_background.png'') top right @@HeadBgColor@@ no-repeat;\r\n}\r\n\r\n.head-table tr td, .head-table tr td a {\r\n color: @@HeadColor@@\r\n}\r\n\r\ndiv#extra_toolbar td.button-active {\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/toolbar_button_background.gif'') bottom left repeat-x;\r\n height: 22px;\r\n}\r\n\r\ndiv#extra_toolbar td.button-active a {\r\n color: black;\r\n text-decoration: none;\r\n}\r\n\r\ntd.kx-block-header, .head-table tr td.kx-block-header{\r\n color: @@HeadBarColor@@;\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/toolbar_background.gif'') repeat-x top left;\r\n /*background-color: @@HeadBarBgColor@@;*/\r\n padding-left: 7px;\r\n padding-right: 7px;\r\n}\r\n\r\na.kx-header-link {\r\n text-decoration: underline;\r\n font-weight: bold;\r\n color: #0080C8;\r\n}\r\n\r\na.kx-header-link:hover {\r\n color: #FFCB05;\r\n text-decoration: none;\r\n}\r\n\r\n.kx-secondary-foreground {\r\n color: #FFFFFF;\r\n /*background-color: @@HeadBarBgColor@@;*/\r\n}\r\n\r\n.kx-login-button {\r\n background-color: #2D79D6;\r\n color: #FFFFFF;\r\n}\r\n\r\n/* General form button (yellow) */\r\n.button {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #000000;\r\n background: url(''@@base_url@@/core/admin_templates/img/button_back.gif'') #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Disabled (grayed-out) form button */\r\n.button-disabled {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #676767;\r\n background: url(''@@base_url@@/core/admin_templates/img/button_back_disabled.gif'') #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Tabs bar */\r\n\r\n.tab, .tab-active {\r\n background-color: #F0F1EB;\r\n padding: 3px 7px 2px 7px;\r\n border-top: 1px solid black;\r\n border-left: 1px solid black;\r\n border-right: 1px solid black;\r\n margin-left: 3px !important;\r\n white-space: nowrap;\r\n}\r\n\r\n.tab-active {\r\n background-color: #4487D9;\r\n}\r\n\r\n.tab a {\r\n color: #4487D9;\r\n font-weight: bold;\r\n}\r\n\r\n.tab-active a {\r\n color: #FFFFFF;\r\n font-weight: bold;\r\n}\r\n\r\na.scroll-left, a.scroll-right {\r\n cursor: pointer;\r\n display: block;\r\n float: left;\r\n height: 18px;\r\n margin: 0px 1px;\r\n width: 18px;\r\n}\r\n\r\na.scroll-left {\r\n background: transparent url(''@@base_url@@/core/admin_templates/img/tabs/left.png'') no-repeat scroll 0 0;\r\n}\r\n\r\na.scroll-right {\r\n background: transparent url(''@@base_url@@/core/admin_templates/img/tabs/right.png'') no-repeat scroll 0 0;\r\n}\r\n\r\na.disabled {\r\n visibility: hidden !important;\r\n}\r\n\r\na.scroll-left:hover, a.scroll-right:hover {\r\n background-position: 0 -18px;\r\n}\r\n\r\ntd.scroll-right-container {\r\n width: 20px;\r\n}\r\n\r\ntd.scroll-right-container.disabled, td.scroll-right-container.disabled * {\r\n width: 0px;\r\n margin: 0px;\r\n}\r\n\r\ntd.scroll-right-container.disabled br {\r\n display: none;\r\n}\r\n\r\n/* Toolbar */\r\n\r\n.toolbar {\r\n font-size: 8pt;\r\n border: 1px solid #000000;\r\n border-width: 0px 1px 1px 1px;\r\n background-color: @@ToolbarBgColor@@;\r\n border-collapse: collapse;\r\n}\r\n\r\n.toolbar td {\r\n height: 100%;\r\n}\r\n\r\n.toolbar-button, .toolbar-button-disabled, .toolbar-button-over {\r\n float: left;\r\n text-align: center;\r\n font-size: 8pt;\r\n padding: 5px 5px 5px 5px;\r\n vertical-align: middle;\r\n color: #006F99;\r\n}\r\n\r\n.toolbar-button-over {\r\n color: #000;\r\n}\r\n\r\n.toolbar-button-disabled {\r\n color: #444;\r\n}\r\n\r\n/* Scrollable Grids */\r\n\r\n\r\n.layout-only-table td {\r\n border: none !important;\r\n}\r\n\r\n/* Main Grid class */\r\n.grid-scrollable {\r\n padding: 0px;\r\n border: 1px solid black !important;\r\n border-top: none !important;\r\n}\r\n\r\n/* Div generated by js, which contains all the scrollable grid elements, affects the style of scrollable area without data (if there are too few rows) */\r\n.grid-container {\r\n background-color: #fff;\r\n}\r\n\r\n.grid-container table {\r\n border-collapse: collapse;\r\n}\r\n\r\n/* Inner div generated in each data-cell */\r\n.grid-cell-div {\r\n overflow: hidden;\r\n height: auto;\r\n}\r\n\r\n/* Main row definition */\r\n.grid-data-row td, .grid-data-row-selected td, .grid-data-row-even-selected td, .grid-data-row-mouseover td, .table-color1, .table-color2 {\r\n font-weight: normal;\r\n color: @@OddColor@@;\r\n background-color: @@OddBgColor@@;\r\n padding: 3px 5px 3px 5px;\r\n overflow: hidden;\r\n border-right: 1px solid #c9c9c9;\r\n}\r\n.grid-data-row-even td, .table-color2 {\r\n background-color: @@EvenBgColor@@;\r\n color: @@EvenColor@@;\r\n}\r\n.grid-data-row td a, .grid-data-row-selected td a, .grid-data-row-mouseover td a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* mouse-over rows */\r\n.grid-data-row-mouseover td, table tr.grid-data-row[_row_highlighted] td {\r\n background: #FFFDF4;\r\n}\r\n\r\n/* Selected row, applies to both checkbox and data areas */\r\n.grid-data-row-selected td, table tr.grid-data-row[_row_selected] td {\r\n background: #FEF2D6;\r\n}\r\n\r\n.grid-data-row-even-selected td, .grid-data-row-even[_row_selected] td {\r\n background: #FFF7E0;\r\n}\r\n\r\n/* General header cell definition */\r\n.grid-header-row td {\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n text-decoration: none;\r\n padding: 3px 5px 3px 5px;\r\n color: @@ColumnTitlesColor@@;\r\n border-right: none;\r\n text-align: left;\r\n vertical-align: middle !important;\r\n white-space: nowrap;\r\n border-right: 1px solid #777;\r\n}\r\n\r\n/* Filters row */\r\ntr.grid-header-row-1 td {\r\n background-color: @@FiltersBgColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\n/* Grid Filters */\r\ntable.range-filter {\r\n width: 100%;\r\n}\r\n\r\n.range-filter td {\r\n padding: 0px 0px 2px 2px !important;\r\n border: none !important;\r\n font-size: 8pt !important;\r\n font-weight: normal !important;\r\n text-align: left;\r\n color: #000000 !important;\r\n}\r\n\r\ninput.filter, select.filter, input.filter-active, select.filter-active {\r\n margin-bottom: 0px;\r\n border: 1px solid #aaa;\r\n}\r\n\r\ninput.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\nselect.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\ndiv.filter, div.filter-active {\r\n background-color: white;\r\n border: 1px solid #AAAAAA;\r\n color: black;\r\n font-weight: normal;\r\n padding: 3px;\r\n}\r\n\r\ndiv.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\ndiv.multioptions_filter {\r\n position: absolute;\r\n z-index: 100;\r\n color: black;\r\n background-color: white;\r\n border: 1px solid black;\r\n padding: 3px 5px;\r\n display: none;\r\n vertical-align: middle;\r\n}\r\n\r\n/* Column titles row */\r\ntr.grid-header-row-0 td {\r\n height: 25px;\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n color: @@ColumnTitlesColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\ntr.grid-header-row-0 td a {\r\n color: @@ColumnTitlesColor@@;\r\n}\r\n\r\ntr.grid-header-row-0 td a:hover {\r\n color: #FFCC00;\r\n}\r\n\r\n\r\n.grid-footer-row td {\r\n background-color: #D7D7D7;\r\n font-weight: bold;\r\n border-right: 1px solid #C9C9C9;\r\n padding: 3px 5px 3px 5px;\r\n}\r\n\r\ntd.grid-header-last-cell, td.grid-data-last-cell, td.grid-footer-last-cell {\r\n border-right: none !important;\r\n}\r\n\r\ntd.grid-data-col-0, td.grid-data-col-0 div {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-1 td.grid-header-col-1 {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-1 td.grid-header-col-1 div {\r\n display: table-cell;\r\n vertical-align: middle;\r\n}\r\n\r\n.grid-status-bar {\r\n border: 1px solid black;\r\n border-top: none;\r\n padding: 0px;\r\n width: 100%;\r\n border-collapse: collapse;\r\n height: 30px;\r\n}\r\n\r\n.grid-status-bar td {\r\n background-color: @@TitleBarBgColor@@;\r\n color: @@TitleBarColor@@;\r\n font-size: 11pt;\r\n font-weight: normal;\r\n padding: 2px 8px 2px 8px;\r\n}\r\n\r\n/* /Scrollable Grids */\r\n\r\n\r\n/* Forms */\r\ntable.edit-form {\r\n border: none;\r\n border-top-width: 0px !important;\r\n border-collapse: collapse;\r\n width: 100%;\r\n}\r\n\r\n.edit-form-odd, .edit-form-even {\r\n padding: 0px;\r\n}\r\n\r\n.subsectiontitle {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #4A92CE;\r\n color: #fff;\r\n height: 25px;\r\n border-top: 1px solid black;\r\n vertical-align: middle;\r\n}\r\n\r\n/* remove top-border from first sub-section element */\r\ntable.edit-form .subsectiontitle:first-child, table.bordered .subsectiontitle:first-child {\r\n border-top-width: 0;\r\n}\r\n\r\n.subsectiontitle td {\r\n vertical-align: middle;\r\n /*padding: 3px 5px 3px 5px;*/\r\n padding: 1px 5px;\r\n}\r\n\r\n.label-cell {\r\n background: #DEE7F6 url(''@@base_url@@/core/admin_templates/img/bgr_input_name_line.gif'') no-repeat right bottom;\r\n font: 12px arial, sans-serif;\r\n padding: 4px 20px;\r\n width: 160px;\r\n}\r\n\r\n.control-mid {\r\n width: 13px;\r\n border-left: 1px solid #7A95C2;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/bgr_mid.gif'') repeat-x left bottom;\r\n}\r\n\r\n.control-cell {\r\n font: 11px arial, sans-serif;\r\n padding: 4px 10px 5px 5px;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/bgr_input_line.gif'') no-repeat left bottom;\r\n width: auto;\r\n vertical-align: middle;\r\n}\r\n\r\n.label-cell-filler {\r\n background: #DEE7F6 none;\r\n}\r\n.control-mid-filler {\r\n background: #fff none;\r\n border-left: 1px solid #7A95C2;\r\n}\r\n.control-cell-filler {\r\n background: #fff none;\r\n}\r\n\r\n.error {\r\n color: red;\r\n}\r\n.error-cell {\r\n color: red;\r\n}\r\n\r\n.field-required {\r\n color: red;\r\n}\r\n\r\n.warning-table {\r\n background-color: #F0F1EB;\r\n border: 1px solid #000000;\r\n border-collapse: collapse;\r\n border-top-width: 0px;\r\n}\r\n\r\n.form-notice, .form-warning {\r\n font-size: 11px;\r\n}\r\n\r\n.form-warning {\r\n color: red;\r\n}\r\n\r\n.form-notice {\r\n color: green;\r\n}\r\n\r\n.priority {\r\n color: red;\r\n padding-left: 1px;\r\n padding-right: 1px;\r\n font-size: 11px;\r\n}\r\n\r\n.small-statistics {\r\n font-size: 11px;\r\n color: #707070;\r\n}\r\n\r\n.req-note {\r\n font-style: italic;\r\n color: #333;\r\n}\r\n\r\n#scroll_container table.tableborder {\r\n border-collapse: separate\r\n}\r\n\r\n/* Uploader */\r\n.uploader-queue div.file {\r\n font-size: 11px;\r\n border: 1px solid #7F99C5;\r\n padding: 3px;\r\n background-color: #DEE7F6;\r\n margin-bottom: 2px;\r\n}\r\n\r\n.uploader-queue .left {\r\n float: left;\r\n vertical-align: top;\r\n}\r\n\r\n.uploader-queue .file-label {\r\n margin-left: 5px;\r\n}\r\n\r\n.uploader-queue .preview .delete-checkbox {\r\n margin-top: -3px;\r\n}\r\n\r\n.uploader-queue .progress-container {\r\n margin: 2px 5px 0px 5px;\r\n}\r\n\r\n.uploader-queue .progress-empty {\r\n width: 150px;\r\n height: 9px;\r\n border: 1px solid black;\r\n background: url(''@@base_url@@/core/admin_templates/img/progress_left.gif'') repeat-x;\r\n}\r\n\r\n.uploader-queue .progress-full {\r\n height: 9px;\r\n background: url(''@@base_url@@/core/admin_templates/img/progress_done.gif'');\r\n}\r\n\r\n.uploader-queue .thumbnail {\r\n /*margin-bottom: 2px;*/\r\n border: 1px solid black;\r\n background-color: grey;\r\n}\r\n\r\n/* To be sorted */\r\nspan#category_path, span#category_path a {\r\n color: #FFFFFF;\r\n}\r\n\r\nspan#category_path a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* Section title, right to the big icon */\r\n.admintitle {\r\n font-size: 16pt;\r\n font-weight: bold;\r\n color: @@SectionColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Left side of bluebar */\r\n.header_left_bg {\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n padding-left: 5px;\r\n}\r\n\r\n/* Right side of bluebar */\r\n.tablenav, tablenav a {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n\r\n text-decoration: none;\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n}\r\n\r\n/* Section title in the bluebar * -- why ''link''? :S */\r\n.tablenav_link {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Active page in top and bottom bluebars pagination */\r\n.current_page {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #fff;\r\n color: #2D79D6;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Other pages and arrows in pagination on blue */\r\n.nav_url {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n color: #fff;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Tree */\r\n.tree-body {\r\n background-color: @@TreeBgColor@@;\r\n height: 100%\r\n}\r\n\r\n.tree_head.td, .tree_head, .tree_head:hover {\r\n font-weight: bold;\r\n font-size: 10px;\r\n color: #FFFFFF;\r\n font-family: Verdana, Arial;\r\n text-decoration: none;\r\n}\r\n\r\n.tree {\r\n padding: 0px;\r\n border: none;\r\n border-collapse: collapse;\r\n}\r\n\r\n.tree tr td {\r\n padding: 0px;\r\n margin: 0px;\r\n font-family: helvetica, arial, verdana,;\r\n font-size: 11px;\r\n white-space: nowrap;\r\n}\r\n\r\n.tree tr td a {\r\n font-size: 11px;\r\n color: @@TreeColor@@;\r\n font-family: Helvetica, Arial, Verdana;\r\n text-decoration: none;\r\n padding: 2px;\r\n}\r\n\r\n.tree tr td a:hover, .tree tr td a.debug-only-item:hover {\r\n color: @@TreeHoverColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a, .tree tr.highlighted td a.debug-only-item {\r\n color: @@TreeHighColor@@;\r\n background-color: @@TreeHighBgColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a:hover {\r\n color: @@TreeHighHoverColor@@;\r\n}\r\n\r\n.tree tr td a.debug-only-item {\r\n color: grey;\r\n}\r\n\r\n/* Ajax Dropdown */\r\n.suggest-box {\r\n border: 1px solid #999;\r\n background-color: #fff;\r\n}\r\n\r\n.suggest-item, .suggest-item-over {\r\n padding: 1px 2px 0px 2px;\r\n font-family: arial,verdana;\r\n font-size: 12px;\r\n}\r\n\r\n.suggest-item-over {\r\n background-color: #3366CC;\r\n color: #fff;\r\n}\r\n\r\n/* Dashboard Summary Boxes */\r\n.summary-box {\r\n border: 1px solid black;\r\n margin-bottom: 4px;\r\n}\r\n\r\n.summary-box .title {\r\n color: white;\r\n font-weight: bold;\r\n padding: 6px 5px;\r\n vertical-align: middle;\r\n background-color: #4A92CE;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\n.summary-box .content {\r\n padding: 4px;\r\n background-color: #F6F6F6;\r\n}\r\n\r\n.summary-box .group {\r\n border-bottom: 1px solid black;\r\n margin-bottom: 10px;\r\n padding: 0 0 10px 10px;\r\n}\r\n\r\n.summary-box .group.last {\r\n border-width: 0px;\r\n margin-bottom: 0;\r\n padding-bottom: 5px;\r\n}\r\n\r\n.summary-box h4 {\r\n margin: 0;\r\n padding: 0 0 3px 0;\r\n font-size: 11px;\r\n font-weight: bold;\r\n}\r\n\r\n.summary-box .hint {\r\n font-size: 10px;\r\n color: grey;\r\n margin-bottom: 3px;\r\n}\r\n\r\n.summary-box .hint .cache-key {\r\n margin-bottom: 7px;\r\n margin-left: 3px;\r\n}\r\n\r\n.summary-box ul {\r\n margin-top: 5px;\r\n margin-bottom: 3px;\r\n padding-left: 30px;\r\n}\r\n\r\n.summary-box li {\r\n padding-bottom: 4px;\r\n}', 'in-portal_logo_img.jpg', 'in-portal_logo_img2.jpg', 'in-portal_logo_login.gif', 'a:22:{s:11:"HeadBgColor";a:2:{s:11:"Description";s:27:"Head frame background color";s:5:"Value";s:7:"#007BF4";}s:9:"HeadColor";a:2:{s:11:"Description";s:21:"Head frame text color";s:5:"Value";s:7:"#FFFFFF";}s:14:"SectionBgColor";a:2:{s:11:"Description";s:28:"Section bar background color";s:5:"Value";s:7:"#FFFFFF";}s:12:"SectionColor";a:2:{s:11:"Description";s:22:"Section bar text color";s:5:"Value";s:7:"#2D79D6";}s:12:"HeadBarColor";a:1:{s:5:"Value";s:7:"#000000";}s:14:"HeadBarBgColor";a:1:{s:5:"Value";s:7:"#1961B8";}s:13:"TitleBarColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TitleBarBgColor";a:1:{s:5:"Value";s:7:"#2D79D6";}s:14:"ToolbarBgColor";a:1:{s:5:"Value";s:7:"#F0F1EB";}s:14:"FiltersBgColor";a:1:{s:5:"Value";s:7:"#D7D7D7";}s:17:"ColumnTitlesColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:19:"ColumnTitlesBgColor";a:1:{s:5:"Value";s:7:"#999999";}s:8:"OddColor";a:1:{s:5:"Value";s:7:"#000000";}s:10:"OddBgColor";a:1:{s:5:"Value";s:7:"#F6F6F6";}s:9:"EvenColor";a:1:{s:5:"Value";s:7:"#000000";}s:11:"EvenBgColor";a:1:{s:5:"Value";s:7:"#EBEBEB";}s:9:"TreeColor";a:1:{s:5:"Value";s:7:"#000000";}s:14:"TreeHoverColor";a:1:{s:5:"Value";s:7:"#009FF0";}s:13:"TreeHighColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:18:"TreeHighHoverColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TreeHighBgColor";a:1:{s:5:"Value";s:7:"#4A92CE";}s:11:"TreeBgColor";a:1:{s:5:"Value";s:7:"#DCECF6";}}', 1319019189, 1, 1);
INSERT INTO LocalesList VALUES
(1, '0x0436', 'Afrikaans (South Africa)', 'af-ZA', 'Latn', '1252'),
Index: install/upgrades.css
===================================================================
--- install/upgrades.css (revision 14653)
+++ install/upgrades.css (working copy)
@@ -679,6 +679,15 @@
===================================================================
--- style_template.css (revision 14590)
+++ style_template.css (working copy)
+@@ -60,7 +60,7 @@
+ }
+
+ .bordered, table.bordered, .bordered-no-bottom {
+- border: 1px solid #000000;
++ border: 1px solid #000000 !important;
+ border-top-width: 0px;
+ border-collapse: collapse;
+ }
@@ -346,6 +346,29 @@
background-color: #FFFF00;
}
@@ -709,6 +718,15 @@
/* Column titles row */
tr.grid-header-row-0 td {
height: 25px;
+@@ -413,7 +436,7 @@
+ /* Forms */
+ table.edit-form {
+ border: none;
+- border-top-width: 0px;
++ border-top-width: 0px !important;
+ border-collapse: collapse;
+ width: 100%;
+ }
@@ -493,11 +516,18 @@
border-top-width: 0px;
}
Index: kernel/db/cat_event_handler.php
===================================================================
--- kernel/db/cat_event_handler.php (revision 14674)
+++ kernel/db/cat_event_handler.php (working copy)
@@ -1916,7 +1916,6 @@
$event->SetRedirectParam('m_cat_id', $this->Application->RecallVar('ImportCategory'));
$event->SetRedirectParam('anchor', 'tab-' . $event->Prefix);
- $event->SetRedirectParam('opener', 'u');
$event->redirect = 'catalog/catalog';
}
Index: units/admin/admin_events_handler.php
===================================================================
--- units/admin/admin_events_handler.php (revision 14653)
+++ units/admin/admin_events_handler.php (working copy)
@@ -1253,21 +1253,17 @@
{
parent::OnAfterConfigRead($event);
- $section_ajustments = $this->Application->getUnitOption($event->Prefix, 'SectionAdjustments', Array());
+ $section_adjustments = $this->Application->getUnitOption($event->Prefix, 'SectionAdjustments', Array());
if ( !$this->Application->ConfigValue('AdvancedUserManagement') ) {
- $section_ajustments['in-portal:user_groups'] = 'remove';
+ $section_adjustments['in-portal:user_groups'] = 'remove';
}
- if ( $this->Application->ConfigValue('UsePopups') ) { // 1 - pop-up, 2 - modal
- $section_ajustments['in-portal:main_import'] = Array('onclick' => 'direct_edit(\'adm\', this.href);');
- }
-
- $section_ajustments['in-portal:root'] = Array (
+ $section_adjustments['in-portal:root'] = Array (
'label' => $this->Application->ConfigValue('Site_Name')
);
- $this->Application->setUnitOption($event->Prefix, 'SectionAdjustments', $section_ajustments);
+ $this->Application->setUnitOption($event->Prefix, 'SectionAdjustments', $section_adjustments);
}
/**
Index: units/helpers/cat_dbitem_export_helper.php
===================================================================
--- units/helpers/cat_dbitem_export_helper.php (revision 14653)
+++ units/helpers/cat_dbitem_export_helper.php (working copy)
@@ -160,6 +160,17 @@
$has_empty = false;
$fields = $object->getFields();
+ if ( $object->isField('CreatedById') ) {
+ // CSV file was created without required CreatedById column
+ if ( $object->isRequired('CreatedById') ) {
+ $object->setRequired('CreatedById', false);
+ }
+
+ if ( !is_numeric( $object->GetDBField('CreatedById') ) ) {
+ $object->SetDBField('CreatedById', $this->Application->RecallVar('user_id'));
+ }
+ }
+
foreach ($fields as $field_name => $field_options) {
if ( $object->isVirtualField($field_name) || !$object->isRequired($field_name) ) {
continue;
@@ -170,12 +181,12 @@
}
$formatter_class = getArrayValue($field_options, 'formatter');
-
+
if ( $formatter_class ) {
// not tested
$formatter =& $this->Application->recallObject($formatter_class);
/* @var $formatter kFormatter */
-
+
$sample_value = $formatter->GetSample($field_name, $field_options, $object);
}
@@ -419,7 +430,7 @@
/* @var $ml_formatter kMultiLanguage */
$custom_sql = '';
-
+
foreach ($this->customFields as $custom_id => $custom_name) {
$custom_sql .= 'custom_data.' . $ml_formatter->LangFieldName('cust_' . $custom_id) . ' AS cust_' . $custom_name . ', ';
}
@@ -427,78 +438,79 @@
return substr($custom_sql, 0, -2);
}
- function getPlainExportSQL($count_only = false) {
- if ($count_only && isset($this->exportOptions['ForceCountSQL'])) {
+ function getPlainExportSQL($count_only = false)
+ {
+ if ( $count_only && isset($this->exportOptions['ForceCountSQL']) ) {
$sql = $this->exportOptions['ForceCountSQL'];
}
- elseif (!$count_only && isset($this->exportOptions['ForceSelectSQL'])) {
+ elseif ( !$count_only && isset($this->exportOptions['ForceSelectSQL']) ) {
$sql = $this->exportOptions['ForceSelectSQL'];
}
else {
- $items_list =& $this->Application->recallObject($this->curItem->Prefix.'.export-items-list', $this->curItem->Prefix.'_List');
+ $items_list =& $this->Application->recallObject($this->curItem->Prefix . '.export-items-list', $this->curItem->Prefix . '_List');
/* @var $items_list kDBList */
-
+
$items_list->SetPerPage(-1);
- if ($options['export_ids'] != '') {
- $items_list->addFilter('export_ids', $items_list->TableName.'.'.$items_list->IDField.' IN ('.implode(',',$options['export_ids']).')');
+ if ( $this->exportOptions['export_ids'] != '' ) {
+ $items_list->addFilter('export_ids', $items_list->TableName . '.' . $items_list->IDField . ' IN (' . implode(',', $this->exportOptions['export_ids']) . ')');
}
- if ($count_only) {
- $sql = $items_list->getCountSQL( $items_list->GetSelectSQL(true,false) );
+ if ( $count_only ) {
+ $sql = $items_list->getCountSQL($items_list->GetSelectSQL(true, false));
}
else {
$sql = $items_list->GetSelectSQL();
}
}
- if (!$count_only)
- {
- $sql .= ' LIMIT '.$this->exportOptions['start_from'].','.EXPORT_STEP;
+ if ( !$count_only ) {
+ $sql .= ' LIMIT ' . $this->exportOptions['start_from'] . ',' . EXPORT_STEP;
}
-// else {
-// $sql = preg_replace("/^.*SELECT(.*?)FROM(?!_)/is", "SELECT COUNT(*) AS count FROM ", $sql);
-// }
+ /*else {
+ $sql = preg_replace("/^.*SELECT(.*?)FROM(?!_)/is", "SELECT COUNT(*) AS count FROM ", $sql);
+ }*/
return $sql;
}
function getExportSQL($count_only = false)
{
- if (!$this->Application->getUnitOption($this->curItem->Prefix, 'CatalogItem')) {
+ if ( !$this->Application->getUnitOption($this->curItem->Prefix, 'CatalogItem') ) {
return $this->GetPlainExportSQL($count_only); // in case this is not a CategoryItem
}
- if ($this->exportOptions['export_ids'] === false)
- {
+ if ( $this->exportOptions['export_ids'] === false ) {
// get links from current category & all it's subcategories
- $join_clauses = Array();
+ $join_clauses = Array ();
$custom_sql = $this->getCustomSQL();
- if ($custom_sql) {
- $custom_table = $this->Application->getUnitOption($this->curItem->Prefix.'-cdata', 'TableName');
- $join_clauses[$custom_table.' custom_data'] = 'custom_data.ResourceId = item_table.ResourceId';
+
+ if ( $custom_sql ) {
+ $custom_table = $this->Application->getUnitOption($this->curItem->Prefix . '-cdata', 'TableName');
+ $join_clauses[$custom_table . ' custom_data'] = 'custom_data.ResourceId = item_table.ResourceId';
}
- $join_clauses[TABLE_PREFIX.'CategoryItems ci'] = 'ci.ItemResourceId = item_table.ResourceId';
- $join_clauses[TABLE_PREFIX.'Category c'] = 'c.CategoryId = ci.CategoryId';
+ $join_clauses[TABLE_PREFIX . 'CategoryItems ci'] = 'ci.ItemResourceId = item_table.ResourceId';
+ $join_clauses[TABLE_PREFIX . 'Category c'] = 'c.CategoryId = ci.CategoryId';
- $sql = 'SELECT item_table.*, ci.CategoryId'.($custom_sql ? ', '.$custom_sql : '').'
- FROM '.$this->curItem->TableName.' item_table';
+ $sql = 'SELECT item_table.*, ci.CategoryId' . ($custom_sql ? ', ' . $custom_sql : '') . '
+ FROM ' . $this->curItem->TableName . ' item_table';
foreach ($join_clauses as $table_name => $join_expression) {
- $sql .= ' LEFT JOIN '.$table_name.' ON '.$join_expression;
+ $sql .= ' LEFT JOIN ' . $table_name . ' ON ' . $join_expression;
}
+
$sql .= ' WHERE ';
- if ($this->exportOptions['export_cats_ids'][0] == 0)
- {
+ if ( $this->exportOptions['export_cats_ids'][0] == 0 ) {
$sql .= '1';
}
else {
foreach ($this->exportOptions['export_cats_ids'] as $category_id) {
- $sql .= '(c.ParentPath LIKE "%|'.$category_id.'|%") OR ';
+ $sql .= '(c.ParentPath LIKE "%|' . $category_id . '|%") OR ';
}
+
$sql = substr($sql, 0, -4);
}
@@ -506,14 +518,13 @@
}
else {
// get only selected links
- $sql = 'SELECT item_table.*, '.$this->exportOptions['export_cats_ids'][0].' AS CategoryId
- FROM '.$this->curItem->TableName.' item_table
- WHERE '.$this->curItem->IDField.' IN ('.implode(',', $this->exportOptions['export_ids']).')';
+ $sql = 'SELECT item_table.*, ' . $this->exportOptions['export_cats_ids'][0] . ' AS CategoryId
+ FROM ' . $this->curItem->TableName . ' item_table
+ WHERE ' . $this->curItem->IDField . ' IN (' . implode(',', $this->exportOptions['export_ids']) . ')';
}
- if (!$count_only)
- {
- $sql .= ' LIMIT '.$this->exportOptions['start_from'].','.EXPORT_STEP;
+ if ( !$count_only ) {
+ $sql .= ' LIMIT ' . $this->exportOptions['start_from'] . ',' . EXPORT_STEP;
}
else {
$sql = preg_replace("/^.*SELECT(.*?)FROM(?!_)/is", "SELECT COUNT(*) AS count FROM ", $sql);
@@ -729,7 +740,7 @@
$this->curItem->CategoryPath[(int)substr($field_name, 8) - 1] = $value;
}
elseif ( substr($field_name, 0, 20) == '__CATEGORY__Category' ) {
- $this->curItem->CategoryPath[(int)substr($field_name, 20)] = $value;
+ $this->curItem->CategoryPath[(int)substr($field_name, 20) - 1] = $value;
}
elseif ( substr($field_name, 0, 11) == '__VIRTUAL__' ) {
$field_name = substr($field_name, 11);
@@ -747,7 +758,7 @@
/**
* Resets import object
- *
+ *
* @param kEvent $event
* @param int $object_type
* @param Array $record_data
@@ -765,6 +776,7 @@
break;
}
$this->curItem->Clear();
+ $this->curItem->SetDBField('CategoryId', NULL); // since default value is import root category
$this->customFields = $this->Application->getUnitOption($event->Prefix, 'CustomFields');
if (isset($record_data)) {
@@ -1260,7 +1272,7 @@
$handler =& $this->Application->recallObject($event->Prefix.'_EventHandler');
/* @var $handler kDBEventHandler */
-
+
$available_columns = array_merge($available_columns, $handler->getCustomExportColumns($event));
// custom fields
@@ -1328,7 +1340,7 @@
}
$export_presets = array ('' => '');
-
+
foreach ($export_settings[$event->Prefix] as $key => $val) {
$export_presets[implode('|', $val['ExportColumns'])] = $key;
}
@@ -1479,7 +1491,7 @@
else {
// make uploaded file local & change source selection
$filename = getArrayValue($field_values, 'ImportFilename');
-
+
if ( $filename ) {
$this->updateImportFiles($event);
$object->SetDBField('ImportSource', 2);
@@ -1522,7 +1534,7 @@
$object =& $event->getObject();
/* @var $object kDBItem */
-
+
if ($this->_getExportSavePreset($object)) {
$required_fields['export'][] = 'ExportPresetName';
}
|