diff options
| author | Greg Roach <fisharebest@gmail.com> | 2017-03-07 12:02:25 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2017-06-17 16:17:44 +0100 |
| commit | 15d603e7c7c15d20f055d3d9c38d6b133453c5be (patch) | |
| tree | 14cd348cd8d2cbb465626429334a9558c0bf5a43 /app/Controller/PageController.php | |
| parent | 95664b44addad5559917902d85518988a3ea7bc4 (diff) | |
| download | webtrees-15d603e7c7c15d20f055d3d9c38d6b133453c5be.tar.gz webtrees-15d603e7c7c15d20f055d3d9c38d6b133453c5be.tar.bz2 webtrees-15d603e7c7c15d20f055d3d9c38d6b133453c5be.zip | |
jQuery-3, Bootstrap-4, FontAwesome-4.7, Select2-4, remove popup windows
Diffstat (limited to 'app/Controller/PageController.php')
| -rw-r--r-- | app/Controller/PageController.php | 58 |
1 files changed, 10 insertions, 48 deletions
diff --git a/app/Controller/PageController.php b/app/Controller/PageController.php index 7a62a3716f..8c9986509f 100644 --- a/app/Controller/PageController.php +++ b/app/Controller/PageController.php @@ -34,9 +34,6 @@ class PageController extends BaseController { /** @var string <head><title> $page_title </title></head> */ private $page_title = WT_WEBTREES; - /** @var bool Is this a popup window? */ - private $popup; - /** * What should this page show in the browser’s title bar? * @@ -103,35 +100,15 @@ class PageController extends BaseController { public function pageFooter() { echo Theme::theme()->footerContainer() . - '<!--[if lt IE 9]><script src="' . WT_JQUERY_JS_URL . '"></script><![endif]-->' . - '<!--[if gte IE 9]><!--><script src="' . WT_JQUERY2_JS_URL . '"></script><!--<![endif]-->' . - '<script src="' . WT_JQUERYUI_JS_URL . '"></script>' . - '<script src="' . WT_WEBTREES_JS_URL . '"></script>' . - $this->getJavascript() . - Theme::theme()->hookFooterExtraJavascript() . - (WT_DEBUG_SQL ? Database::getQueryLog() : '') . - '</body>' . - '</html>' . PHP_EOL . - '<!-- webtrees: ' . WT_VERSION . ' -->' . - '<!-- Execution time: ' . I18N::number(microtime(true) - WT_START_TIME, 3) . ' seconds -->' . - '<!-- Memory: ' . I18N::number(memory_get_peak_usage(true) / 1024) . ' KB -->' . - '<!-- SQL queries: ' . I18N::number(Database::getQueryCount()) . ' -->'; - } - - /** - * Print the page footer, using the theme - * Note that popup windows are deprecated - */ - public function pageFooterPopupWindow() { - echo - Theme::theme()->footerContainerPopupWindow() . - '<!--[if lt IE 9]><script src="' . WT_JQUERY_JS_URL . '"></script><![endif]-->' . - '<!--[if gte IE 9]><!--><script src="' . WT_JQUERY2_JS_URL . '"></script><!--<![endif]-->' . - '<script src="' . WT_JQUERYUI_JS_URL . '"></script>' . + '<script src="' . WT_JQUERY_JS_URL . '"></script>' . + '<script src="' . WT_TETHER_JS_URL . '"></script>' . + '<script src="' . WT_BOOTSTRAP_JS_URL . '"></script>' . + '<script src="' . WT_DATATABLES_JS_URL . '"></script>' . + '<script src="' . WT_DATATABLES_BOOTSTRAP_JS_URL . '"></script>' . + '<script src="' . WT_SELECT2_JS_URL . '"></script>' . '<script src="' . WT_WEBTREES_JS_URL . '"></script>' . $this->getJavascript() . Theme::theme()->hookFooterExtraJavascript() . - (WT_DEBUG_SQL ? Database::getQueryLog() : '') . '</body>' . '</html>' . PHP_EOL . '<!-- webtrees: ' . WT_VERSION . ' -->' . @@ -143,15 +120,9 @@ class PageController extends BaseController { /** * Print the page header, using the theme * - * @param bool $popup Is this a popup window - * * @return $this */ - public function pageHeader($popup = false) { - global $WT_TREE; - - $this->popup = $popup; - + public function pageHeader() { // Give Javascript access to some PHP constants $this->addInlineJavascript(' var WT_STATIC_URL = "' . Filter::escapeJs(WT_STATIC_URL) . '"; @@ -160,24 +131,15 @@ class PageController extends BaseController { var textDirection = "' . Filter::escapeJs(I18N::direction()) . '"; var WT_SCRIPT_NAME = "' . Filter::escapeJs(WT_SCRIPT_NAME) . '"; var WT_LOCALE = "' . Filter::escapeJs(WT_LOCALE) . '"; - var WT_CSRF_TOKEN = "' . Filter::escapeJs(Filter::getCsrfToken()) . '"; ', self::JS_PRIORITY_HIGH); Theme::theme()->sendHeaders(); echo Theme::theme()->doctype(); echo Theme::theme()->html(); echo Theme::theme()->head($this); - - if ($this->popup) { - echo Theme::theme()->bodyHeaderPopupWindow(); - // We've displayed the header - display the footer automatically - register_shutdown_function([$this, 'pageFooterPopupWindow'], $this->popup); - - } else { - echo Theme::theme()->bodyHeader(); - // We've displayed the header - display the footer automatically - register_shutdown_function([$this, 'pageFooter'], $this->popup); - } + echo Theme::theme()->bodyHeader(); + // We've displayed the header - display the footer automatically + register_shutdown_function([$this, 'pageFooter']); return $this; } |
