Index: admin_templates/incs/header.tpl =================================================================== --- admin_templates/incs/header.tpl (revision 14656) +++ admin_templates/incs/header.tpl (working copy) @@ -99,6 +99,14 @@ + + + + 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'; }