From 5be1075f26bf103d034eaf9cf129f9c958f80a80 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 14 May 2016 12:38:31 +0200 Subject: [PATCH] move empty.html used for autocomplete to api/templates/default/, as $app/src/ will not be available for direct requests --- api/js/etemplate/etemplate2.js | 2 +- api/src/Etemplate.php | 2 +- api/{src/Etemplate => templates/default}/empty.html | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename api/{src/Etemplate => templates/default}/empty.html (100%) diff --git a/api/js/etemplate/etemplate2.js b/api/js/etemplate/etemplate2.js index 1b696aa05f..936e93c308 100644 --- a/api/js/etemplate/etemplate2.js +++ b/api/js/etemplate/etemplate2.js @@ -653,7 +653,7 @@ etemplate2.prototype.autocomplete_fixer = function () // Safari shows same warning, thought Chrome userAgent also includes Safari if (navigator.userAgent.match(/(firefox|safari|iceweasel)/i) && !navigator.userAgent.match(/chrome/i)) { - jQuery(form).attr({action: egw.webserverUrl+'/etemplate/empty.html',method:'post'}); + jQuery(form).attr({action: egw.webserverUrl+'/api/templates/default/empty.html',method:'post'}); } // need to trigger submit because submit() would not trigger onsubmit event // since the submit does not get fired directly via user interaction. diff --git a/api/src/Etemplate.php b/api/src/Etemplate.php index 171ea61624..4a76c4f87a 100644 --- a/api/src/Etemplate.php +++ b/api/src/Etemplate.php @@ -224,7 +224,7 @@ class Etemplate extends Etemplate\Widget\Template $form_action = "about:blank"; if (in_array(Header\UserAgent::type(), array('firefox', 'safari'))) { - $form_action = $GLOBALS['egw_info']['server']['webserver_url'].'/api/src/Etemplate/empty.html'; + $form_action = $GLOBALS['egw_info']['server']['webserver_url'].'/api/templates/default/empty.html'; } // check if we are in an ajax-exec call from jdots template (or future other tabbed templates) if (isset($GLOBALS['egw']->framework->response)) diff --git a/api/src/Etemplate/empty.html b/api/templates/default/empty.html similarity index 100% rename from api/src/Etemplate/empty.html rename to api/templates/default/empty.html