Index: branches/RC/core/units/admin/admin_tag_processor.php =================================================================== diff -u -N -r11538 -r11576 --- branches/RC/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 11538) +++ branches/RC/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 11576) @@ -445,6 +445,31 @@ } /** + * Renders inividual catalog tab based on prefix and title_property given + * + * @param Array $params + * @return string + */ + function CatalogTab($params) + { + $icon = $this->Application->getUnitOption($params['prefix'], 'CatalogTabIcon'); + if (strpos($icon, ':') !== false) { + list ($icon_module, $icon) = explode(':', $icon, 2); + } + else { + $icon_module = 'core'; + } + + $block_params = $this->prepareTagParams($params); + $block_params['name'] = $params['render_as']; + $block_params['icon_module'] = $icon_module; + $block_params['icon'] = $icon; + $block_params['title'] = $this->Application->getUnitOption($params['prefix'], $params['title_property']); + + return $this->Application->ParseBlock($block_params); + } + + /** * Allows to construct link for opening any type of catalog item selector * * @param Array $params Index: branches/RC/core/admin_templates/catalog/catalog_elements.tpl =================================================================== diff -u -N -r11566 -r11576 --- branches/RC/core/admin_templates/catalog/catalog_elements.tpl (.../catalog_elements.tpl) (revision 11566) +++ branches/RC/core/admin_templates/catalog/catalog_elements.tpl (.../catalog_elements.tpl) (revision 11576) @@ -14,16 +14,17 @@ + - +   - + Index: branches/RC/core/admin_templates/catalog_tab.tpl =================================================================== diff -u -N -r11525 -r11576 --- branches/RC/core/admin_templates/catalog_tab.tpl (.../catalog_tab.tpl) (revision 11525) +++ branches/RC/core/admin_templates/catalog_tab.tpl (.../catalog_tab.tpl) (revision 11576) @@ -14,7 +14,7 @@ -
+
Index: branches/RC/core/admin_templates/users/user_edit_items.tpl =================================================================== diff -u -N -r11546 -r11576 --- branches/RC/core/admin_templates/users/user_edit_items.tpl (.../user_edit_items.tpl) (revision 11546) +++ branches/RC/core/admin_templates/users/user_edit_items.tpl (.../user_edit_items.tpl) (revision 11576) @@ -144,11 +144,11 @@ - + - + Index: branches/RC/core/admin_templates/config/config_universal.tpl =================================================================== diff -u -N -r11538 -r11576 --- branches/RC/core/admin_templates/config/config_universal.tpl (.../config_universal.tpl) (revision 11538) +++ branches/RC/core/admin_templates/config/config_universal.tpl (.../config_universal.tpl) (revision 11576) @@ -2,7 +2,7 @@ - + Index: branches/RC/core/admin_templates/js/script.js =================================================================== diff -u -N -r11546 -r11576 --- branches/RC/core/admin_templates/js/script.js (.../script.js) (revision 11546) +++ branches/RC/core/admin_templates/js/script.js (.../script.js) (revision 11576) @@ -709,11 +709,8 @@ // sets hidden field value // if the field does not exist - creates it -function setInnerHTML($field_id, $value) -{ - var $element = document.getElementById($field_id); - if (!$element) return false; - $element.innerHTML = $value; +function setInnerHTML($field_id, $value) { + $( jq('#' + $field_id) ).html($value); } function get_hidden_field($field) @@ -738,13 +735,24 @@ function search_keydown($event, $prefix_special, $grid, $ajax) { - $event = $event ? $event : event; + if ($prefix_special !== undefined) { + // if $prefix_special is passed, then keydown event was not assigned by jQuery + $event = $event ? $event : event; - if (window.event) {// IE - var $key_code = $event.keyCode; + if (window.event) {// IE + var $key_code = $event.keyCode; + } + else if($event.which) { // Netscape/Firefox/Opera + var $key_code = $event.which; + } } - else if($event.which) { // Netscape/Firefox/Opera + else { + // event bind with jQuery, so always use which var $key_code = $event.which; + + $prefix_special = $(this).attr('PrefixSpecial'); + $grid = $(this).attr('Grid'); + $ajax = $(this).attr('ajax'); } switch ($key_code) { @@ -1534,11 +1542,14 @@ } function findPos(obj, with_scroll) { + /*var $offset = $(obj).offset(); + + return [$offset.left, $offset.top];*/ + if (!with_scroll) var with_scroll = false; var curleft = curtop = 0; if (obj.offsetParent) { - // could raise "Unspecified error" in IE curleft = obj.offsetLeft - (with_scroll ? obj.scrollLeft : 0) curtop = obj.offsetTop - (with_scroll ? obj.scrollTop : 0) while (obj = obj.offsetParent) { Index: branches/RC/core/units/configuration/configuration_config.php =================================================================== diff -u -N -r10294 -r11576 --- branches/RC/core/units/configuration/configuration_config.php (.../configuration_config.php) (revision 10294) +++ branches/RC/core/units/configuration/configuration_config.php (.../configuration_config.php) (revision 11576) @@ -1,5 +1,5 @@ 'conf', 'ItemClass' => Array('class'=>'ConfigurationItem','file'=>'configuration.php','build_event'=>'OnItemBuild'), @@ -14,37 +14,39 @@ 3 => 'event', 4 => 'mode', ), - + 'IDField' => 'VariableId', 'TitleField' => 'VariableName', 'TitlePresets' => Array( 'default' => Array('tag_params' => Array('conf' => Array('per_page' => -1))), - + 'config_list_general' => Array('prefixes' => Array('conf_List'), 'format' => "!la_updating_config!"), 'config_list_output' => Array('prefixes' => Array('conf_List'), 'format' => "!la_updating_config!"), 'config_list_contacts' => Array('prefixes' => Array('conf_List'), 'format' => "!la_updating_config!"), - + 'config_list_categories' => Array('prefixes' => Array('conf_List'), 'format' => "!la_updating_config!"), 'config_list_users' => Array('prefixes' => Array('conf_List'), 'format' => "!la_updating_config!"), + + 'section_label' => Array('prefixes' => Array('conf_List'), 'format' => "#section_label#"), ), - + 'TableName' => TABLE_PREFIX.'ConfigurationValues', 'ListSQLs' => Array('' => ' SELECT %1$s.* %2$s FROM '.TABLE_PREFIX.'ConfigurationAdmin ca LEFT JOIN %1$s USING(VariableName)'), - + 'ItemSQLs' => Array('' => ' SELECT %1$s.* %2$s FROM '.TABLE_PREFIX.'ConfigurationAdmin ca LEFT JOIN %1$s USING(VariableName)'), - 'ListSortings' => Array( + 'ListSortings' => Array( '' => Array( 'Sorting' => Array('DisplayOrder' => 'asc', 'GroupDisplayOrder' => 'asc'), ) ), - + 'CalculatedFields' => Array ( '' => Array ( 'heading' => 'ca.heading', @@ -56,7 +58,7 @@ 'Install' => 'ca.Install', ), ), - + 'Fields' => Array( 'VariableId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), 'VariableName' => Array('type' => 'string','not_null' => '1','default' => ''), @@ -75,7 +77,7 @@ 'Install' => Array('type' => 'int', 'not_null' => '1', 'default' => 1), 'DirectOptions' => Array('type' => 'string', 'default' => ''), ), - + 'Grids' => Array(), ); Index: branches/RC/core/admin_templates/categories/permissions_tab.tpl =================================================================== diff -u -N -r11546 -r11576 --- branches/RC/core/admin_templates/categories/permissions_tab.tpl (.../permissions_tab.tpl) (revision 11546) +++ branches/RC/core/admin_templates/categories/permissions_tab.tpl (.../permissions_tab.tpl) (revision 11576) @@ -1,5 +1,5 @@ -
_div" prefix="" group_id="-1" class="catalog-tab">
+
_div" prefix="" group_id="-1" class="catalog-tab">
Index: branches/RC/core/admin_templates/catalog/catalog.tpl =================================================================== diff -u -N -r11538 -r11576 --- branches/RC/core/admin_templates/catalog/catalog.tpl (.../catalog.tpl) (revision 11538) +++ branches/RC/core/admin_templates/catalog/catalog.tpl (.../catalog.tpl) (revision 11576) @@ -256,7 +256,7 @@ - +