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'; ?> -