From 2f6ae4b70c6c1edb1c691dfabececd7bade13fff Mon Sep 17 00:00:00 2001 From: flyskyko Date: Thu, 31 Jan 2013 02:20:42 +0000 Subject: [PATCH] issue 2878, fixed a bug. does not resize on popup layout. git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12627 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/display/HTMLDisplayHandler.php | 15 +++++++++++++++ common/tpl/popup_layout.html | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/classes/display/HTMLDisplayHandler.php b/classes/display/HTMLDisplayHandler.php index 54a0c9ef4..75465e0ed 100644 --- a/classes/display/HTMLDisplayHandler.php +++ b/classes/display/HTMLDisplayHandler.php @@ -93,6 +93,21 @@ class HTMLDisplayHandler if(!$layout_file) $layout_file = 'default_layout'; $output = $oTemplate->compile($layout_path, $layout_file, $edited_layout_file); + // if popup_layout, remove admin bar. + $realLayoutPath = FileHandler::getRealPath($layout_path); + if(substr($realLayoutPath, -1) != '/') + { + $realLayoutPath .= '/'; + } + + $pathInfo = pathinfo($layout_file); + $onlyLayoutFile = $pathInfo['filename']; + + if($realLayoutPath === _XE_PATH_ . 'common/tpl/' && $onlyLayoutFile === 'popup_layout') + { + Context::set('admin_bar', 'false'); + } + if(__DEBUG__==3) $GLOBALS['__layout_compile_elapsed__'] = getMicroTime()-$start; if(preg_match('/MSIE/i',$_SERVER['HTTP_USER_AGENT']) && (Context::get('_use_ssl') == 'optional' || Context::get('_use_ssl') == 'always')) diff --git a/common/tpl/popup_layout.html b/common/tpl/popup_layout.html index 2ece6bceb..82d637c23 100644 --- a/common/tpl/popup_layout.html +++ b/common/tpl/popup_layout.html @@ -2,7 +2,7 @@ -
+