Index: branches/RC/core/admin_templates/js/frame_resizer.js =================================================================== diff -u -r9983 -r11396 --- branches/RC/core/admin_templates/js/frame_resizer.js (.../frame_resizer.js) (revision 9983) +++ branches/RC/core/admin_templates/js/frame_resizer.js (.../frame_resizer.js) (revision 11396) @@ -2,6 +2,7 @@ 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_img'); + this.StatusTextContainer = document.getElementById('menu_toggle_text'); this.StatusLink = document.getElementById('menu_toggle_link'); this.Frameset = $frameset; this.SaveURL = $save_url; @@ -19,17 +20,19 @@ } FrameResizer.prototype.MenuVisible = function () { - return new RegExp('(.*)' + this.StatusIcon[0] + '$').exec(this.StatusImage.src); + return new RegExp('(.*)' + this.StatusIcon[0] + '$').exec(this.StatusImage.src) ? true : false; } -FrameResizer.prototype.SetStatus = function ($status) { +FrameResizer.prototype.SetStatus = function ($status, $ajax_save) { this.StatusImage.src = this.StatusIcon[$status]; - this.StatusImage.alt = this.StatusLink.title = this.StatusText[$status]; + this.StatusImage.alt = this.StatusLink.title = this.StatusTextContainer.innerHTML = this.StatusText[$status]; document.getElementById('site_logo').style.display = $status ? 'none' : 'block'; - // save via ajax - var $url = this.SaveURL.replace('#NAME#', 'ShowAdminMenu').replace('#VALUE#', $status); - Request.makeRequest($url, false, '', this.successCallback, this.errorCallback, '', this); + if ($ajax_save) { + // save via ajax + var $url = this.SaveURL.replace('#NAME#', 'ShowAdminMenu').replace('#VALUE#', $status); + Request.makeRequest($url, false, '', this.successCallback, this.errorCallback, '', this); + } } FrameResizer.prototype.successCallback = function($request, $params, $object) { @@ -49,13 +52,22 @@ FrameResizer.prototype.FrameToggle = function () { if (this.MenuVisible()) { + this.setFullscreenMode(true, true); + } + else { + this.setFullscreenMode(false, true); + } +} + +FrameResizer.prototype.setFullscreenMode = function ($full_screen, $ajax_save) { + if ($full_screen) { this.TopFrameset.setAttribute('rows', '25,*'); this.SubFrameset.setAttribute('cols', '0,*'); - this.SetStatus(1); + this.SetStatus(1, $ajax_save); } else { this.TopFrameset.setAttribute('rows', this.Frameset.$top_height + ',*'); this.SubFrameset.setAttribute('cols', this.OpenWidth+',*'); - this.SetStatus(0); + this.SetStatus(0, $ajax_save); } } \ No newline at end of file