Index: branches/RC/core/admin_templates/js/frame_resizer.js =================================================================== diff -u --- branches/RC/core/admin_templates/js/frame_resizer.js (revision 0) +++ branches/RC/core/admin_templates/js/frame_resizer.js (revision 9238) @@ -0,0 +1,39 @@ +function FrameResizer($show_title, $hide_title, $frameset) { + this.StatusIcon = {0: 'img/list_arrow_desc.gif', 1 : 'img/list_arrow_no.gif'}; + this.StatusText = {0: $hide_title, 1 : $show_title}; + this.StatusImage = document.getElementById('menu_toggle'); + this.Frameset = $frameset; + + this.SubFrameset = $frameset.document.getElementById('sub_frameset'); + this.TopFrameset = $frameset.document.getElementById('top_frameset'); +} + +FrameResizer.prototype.InitControls = function ($instance) { + this.StatusImage.onclick = function () { + $instance.FrameToggle(); + } +} + +FrameResizer.prototype.MenuVisible = function () { + return new RegExp('(.*)' + this.StatusIcon[0] + '$').exec(this.StatusImage.src); +} + +FrameResizer.prototype.SetStatus = function ($status) { + this.StatusImage.src = this.StatusIcon[$status]; + this.StatusImage.alt = this.StatusText[$status]; + this.StatusImage.title = this.StatusText[$status]; + document.getElementById('site_logo').style.display = $status ? 'none' : 'block'; +} + +FrameResizer.prototype.FrameToggle = function () { + if (this.MenuVisible()) { + this.TopFrameset.setAttribute('rows', '25,*'); + this.SubFrameset.setAttribute('cols', '0,*'); + this.SetStatus(1); + } + else { + this.TopFrameset.setAttribute('rows', this.Frameset.$top_height + ',*'); + this.SubFrameset.setAttribute('cols', '200,*'); + this.SetStatus(0); + } +} \ No newline at end of file Index: branches/RC/core/admin_templates/index.tpl =================================================================== diff -u -r8929 -r9238 --- branches/RC/core/admin_templates/index.tpl (.../index.tpl) (revision 8929) +++ branches/RC/core/admin_templates/index.tpl (.../index.tpl) (revision 9238) @@ -16,22 +16,17 @@ " name="head" scrolling="no" noresize="noresize"> - + " name="menu" target="main" noresize scrolling="auto" marginwidth="0" marginheight="0"> " name="main" marginwidth="0" marginheight="0" frameborder="no" noresize scrolling="auto"> Index: branches/RC/core/kernel/processors/main_processor.php =================================================================== diff -u -r8929 -r9238 --- branches/RC/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 8929) +++ branches/RC/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 9238) @@ -271,11 +271,23 @@ */ function Recall($params) { - $ret = $this->Application->RecallVar( $this->SelectParam($params,'name,var,param') ); + $var_name = $this->SelectParam($params,'name,var,param'); + + if (isset($params['persistent']) && $params['persistent']) { + $ret = $this->Application->RecallPersistentVar($var_name); + } + else { + $ret = $this->Application->RecallVar($var_name); + } + $ret = ($ret === false && isset($params['no_null'])) ? '' : $ret; - if( getArrayValue($params,'special') || getArrayValue($params,'htmlchars')) $ret = htmlspecialchars($ret); + if (getArrayValue($params, 'special') || getArrayValue($params, 'htmlchars')) { + $ret = htmlspecialchars($ret); + } - if ( getArrayValue($params, 'urlencode') ) $ret = urlencode($ret); + if (getArrayValue($params, 'urlencode')) { + $ret = urlencode($ret); + } return $ret; } @@ -527,6 +539,11 @@ { $name = $this->SelectParam($params, 'name,var'); $value = $params['value']; + + if (isset($params['persistent']) && $params['persistent']) { + return $this->Application->RecallPersistentVar($name) == $value; + } + return ($this->Application->RecallVar($name) == $value); } Index: branches/RC/core/kernel/db/db_tag_processor.php =================================================================== diff -u -r9033 -r9238 --- branches/RC/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 9033) +++ branches/RC/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 9238) @@ -1287,10 +1287,15 @@ $preset_name = replaceModuleSection($params['title_preset']); $title_presets = $this->Application->getUnitOption($this->Prefix,'TitlePresets'); $title_info = getArrayValue($title_presets, $preset_name); - if($title_info === false) return str_replace('#preset_name#', $preset_name, $params['title']); + if ($title_info === false) { + $title = str_replace('#preset_name#', $preset_name, $params['title']); + if ($this->Application->ConfigValue('UseSmallHeader') && isset($params['group_title']) && $params['group_title']) { + $title .= ' - '.$params['group_title']; + } + return $title; + } - if( getArrayValue($title_presets,'default') ) - { + if (getArrayValue($title_presets,'default')) { // use default labels + custom labels specified in preset used $title_info = array_merge_recursive2($title_presets['default'], $title_info); } @@ -1304,8 +1309,7 @@ $prefixes = getArrayValue($title_info,'prefixes'); $all_tag_params = getArrayValue($title_info,'tag_params'); - if($prefixes) - { + if ($prefixes) { // extract tag_perams passed directly to SectionTitle tag for specific prefix foreach ($params as $tp_name => $tp_value) { if (preg_match('/(.*)\[(.*)\]/', $tp_name, $regs)) { @@ -1315,31 +1319,27 @@ } $tag_params = Array(); - foreach($prefixes as $prefix_special) - { + foreach ($prefixes as $prefix_special) { $prefix_data = $this->Application->processPrefix($prefix_special); $prefix_data['prefix_special'] = rtrim($prefix_data['prefix_special'],'.'); - if($all_tag_params) - { + if ($all_tag_params) { $tag_params = getArrayValue($all_tag_params, $prefix_data['prefix_special']); - if(!$tag_params) $tag_params = Array(); + if (!$tag_params) $tag_params = Array(); } $tag_params = array_merge_recursive2($params, $tag_params); $objects[ $prefix_data['prefix_special'] ] =& $this->Application->recallObject($prefix_data['prefix_special'], $prefix_data['prefix'], $tag_params); $object_status[ $prefix_data['prefix_special'] ] = $objects[ $prefix_data['prefix_special'] ]->IsNewItem() ? 'new' : 'edit'; // a. set object's status field (adding item/editing item) for each object in title - if( getArrayValue($title_info[ $object_status[ $prefix_data['prefix_special'] ].'_status_labels' ],$prefix_data['prefix_special']) ) - { + if (getArrayValue($title_info[ $object_status[ $prefix_data['prefix_special'] ].'_status_labels' ],$prefix_data['prefix_special'])) { $status_labels[ $prefix_data['prefix_special'] ] = $title_info[ $object_status[ $prefix_data['prefix_special'] ].'_status_labels' ][ $prefix_data['prefix_special'] ]; $title = str_replace('#'.$prefix_data['prefix_special'].'_status#', $status_labels[ $prefix_data['prefix_special'] ], $title); } // b. setting object's titlefield value (in titlebar ONLY) to default in case if object beeing created with no titlefield filled in - if( $object_status[ $prefix_data['prefix_special'] ] == 'new' ) - { + if ($object_status[ $prefix_data['prefix_special'] ] == 'new') { $new_value = $this->getInfo( $objects[ $prefix_data['prefix_special'] ], 'titlefield' ); if(!$new_value && getArrayValue($title_info['new_titlefield'],$prefix_data['prefix_special']) ) $new_value = $this->Application->Phrase($title_info['new_titlefield'][ $prefix_data['prefix_special'] ]); $title = str_replace('#'.$prefix_data['prefix_special'].'_titlefield#', $new_value, $title); @@ -1365,9 +1365,17 @@ // replace trailing spaces inside title preset + '' occurences into single space $title = preg_replace('/[ ]*\'\'[ ]*/', ' ', $title); - $cut_first = getArrayValue($params,'cut_first'); - if( $cut_first && strlen($title) > $cut_first && !preg_match('/(.*)<\/a>/',$title) ) $title = substr($title, 0, $cut_first).' ...'; + if ($this->Application->ConfigValue('UseSmallHeader') && isset($params['group_title']) && $params['group_title']) { + $title .= ' - '.$params['group_title']; + } + $cut_first = getArrayValue($params, 'cut_first'); + if ($cut_first && strlen($title) > $cut_first) { + if (!preg_match('/(.*)<\/a>/',$title)) { + $title = substr($title, 0, $cut_first).' ...'; + } + } + return $title; }