From b57e186331d2f1abeff9febbf8f9933d906eb029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 8 Aug 2011 13:53:41 +0200 Subject: [PATCH] Drop another ocurence of inline js --- js/functions.js | 16 ++++++++++++++++ libraries/Theme.class.php | 13 +++++++------ themes.php | 16 +--------------- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/js/functions.js b/js/functions.js index 9b80619ec6..008dcf2f6e 100644 --- a/js/functions.js +++ b/js/functions.js @@ -3127,4 +3127,20 @@ $(document).ready(function() { $('.autosubmit').change(function(e) { e.target.form.submit(); }); + + /** + * Theme changer. + */ + $('.take_theme').live('click', function(e) { + alert(e.target.nodeName); + var evt = $(e); + var what = evt.target.id; + if (window.opener && window.opener.document.forms['setTheme'].elements['set_theme']) { + window.opener.document.forms['setTheme'].elements['set_theme'].value = what; + window.opener.document.forms['setTheme'].submit(); + window.close(); + return false; + } + return true; + }); }); diff --git a/libraries/Theme.class.php b/libraries/Theme.class.php index 0347ac8bc9..252d554cec 100644 --- a/libraries/Theme.class.php +++ b/libraries/Theme.class.php @@ -321,12 +321,13 @@ class PMA_Theme { echo '
'; echo '

' . htmlspecialchars($this->getName()) - .' (' . htmlspecialchars($this->getVersion()) . ')

' - .'

' - .''; + .' (' . htmlspecialchars($this->getVersion()) . ')'; + echo '

'; + echo ''; if (@file_exists($this->getPath() . '/screen.png')) { // if screen exists then output diff --git a/themes.php b/themes.php index 732f1e3082..166333466c 100644 --- a/themes.php +++ b/themes.php @@ -19,22 +19,8 @@ require './libraries/header_http.inc.php'; /* HTML header */ $page_title = 'phpMyAdmin - ' . __('Theme'); require './libraries/header_meta_style.inc.php'; +require './libraries/header_scripts.inc.php'; ?> -