From 7e856af544e5a6a456b8803c63c79dba5fae927f Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 3 Nov 2013 09:30:25 +0000 Subject: [PATCH] mark popups as such by enclosing there content in div#popupMainDiv and properly closing html markup for popups --- etemplate/inc/class.etemplate.inc.php | 10 ++++++++++ .../templates/idots/class.idots_framework.inc.php | 3 ++- phpgwapi/templates/idots/js/idots.js | 12 ++++++------ 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/etemplate/inc/class.etemplate.inc.php b/etemplate/inc/class.etemplate.inc.php index 8adb0db2aa..5a1862f1d7 100644 --- a/etemplate/inc/class.etemplate.inc.php +++ b/etemplate/inc/class.etemplate.inc.php @@ -208,7 +208,17 @@ class etemplate_new extends etemplate_widget_template { parse_navbar(); } + else // mark popups as such, by enclosing everything in div#popupMainDiv + { + echo '
'."\n"; + } echo '
'; + + if ($output_mode == 2) + { + echo "\n
\n"; + echo $GLOBALS['egw']->framework->footer(); + } } ob_flush(); diff --git a/phpgwapi/templates/idots/class.idots_framework.inc.php b/phpgwapi/templates/idots/class.idots_framework.inc.php index 7e6b3dd324..371ba810a6 100644 --- a/phpgwapi/templates/idots/class.idots_framework.inc.php +++ b/phpgwapi/templates/idots/class.idots_framework.inc.php @@ -758,7 +758,8 @@ egw.set_user('.$GLOBALS['egw']->accounts->json($GLOBALS['egw_info']['user']['acc $content .= $this->tpl->fp('out','footer'); } elseif (!isset($GLOBALS['egw_info']['flags']['noheader']) || !$GLOBALS['egw_info']['flags']['noheader'] || - !empty($_GET['nonavbar']) || $GLOBALS['egw_info']['flags']['currentapp'] == 'admin' && empty($_GET['ajax'])) + self::$header_done || !empty($_GET['nonavbar']) || + $GLOBALS['egw_info']['flags']['currentapp'] == 'admin' && empty($_GET['ajax'])) { $content .= "\n\n"; // close body and html tag, eg. for popups } diff --git a/phpgwapi/templates/idots/js/idots.js b/phpgwapi/templates/idots/js/idots.js index cde3020c28..fba49e9926 100644 --- a/phpgwapi/templates/idots/js/idots.js +++ b/phpgwapi/templates/idots/js/idots.js @@ -28,12 +28,12 @@ for(var i=0; i < data_slide_out.length; ++i) { var args=data_slide_out[i]; - + new ypSlideOutMenu(args.id, args.dir, args.left, args.top, args.width, args.height, args.pos); for(var selector in args.bind) { var data = args.bind[selector]; - jQuery(selector).on(data.event, {menu: args.id, method: data.method}, function(event){ + jQuery(selector).on(data.event, {menu: args.id, method: data.method}, function(event){ window.ypSlideOutMenu[event.data.method].call(window, event.data.menu); event.preventDefault(); }); @@ -41,7 +41,7 @@ } } } - + /** * Initialisation, when DOM is ready */ @@ -53,13 +53,13 @@ $j('#divStatusBar').height()-$j('#divAppboxHeader').height()-$j('#divPoweredBy').height()-20; //console.log('setting height of '+appbox_height); $j('#divAppbox').css('min-height', appbox_height+'px'); - $j('.et2_container').height(appbox_height); + $j('.et2_container').height(appbox_height-7); }); $j(window).resize(); $j(window).load(function(){ // fixes sometimes not called resize, probably due to timing issues $j(window).resize(); }); - + // allowing javascript urls in topmenu and sidebox only under CSP by binding click handlers to them var href_regexp = /^javascript:([^\(]+)\((.*)?\);?$/; jQuery('#topmenu_items,#thesideboxcolumn').on('click','a[href^="javascript:"]',function(){ @@ -76,7 +76,7 @@ // return false to not execute link itself, which would violate CSP return false; }); - + // make sidebox resizable with jQueryUI resizable jQuery('#thesideboxcolumn').resizable({handles: 'e', minWidth: 200, stop: function(event, ui){ egw.set_preference(egw_appName, 'idotssideboxwidth', ui.size.width);