From 2e64aec16e23d8f640c97b8abb4ec9e32b46c0cf Mon Sep 17 00:00:00 2001 From: Piyush Agrawal Date: Tue, 23 Feb 2016 01:05:11 +0530 Subject: [PATCH] Templating toggleButton() and getDivForSliderEffect() Signed-off-by: Piyush Agrawal --- libraries/Util.php | 75 +++++-------------- templates/getDivForSliderEffect.phtml | 15 ++++ templates/toggleButton.phtml | 27 +++++++ .../common/PMA_getDivForSliderEffect_test.php | 8 +- 4 files changed, 64 insertions(+), 61 deletions(-) create mode 100644 templates/getDivForSliderEffect.phtml create mode 100644 templates/toggleButton.phtml diff --git a/libraries/Util.php b/libraries/Util.php index 8feb574434..4771ba78ba 100644 --- a/libraries/Util.php +++ b/libraries/Util.php @@ -16,6 +16,7 @@ use stdClass; use SqlParser\Utils\Error as ParserError; use PMA\libraries\URL; use PMA\libraries\Sanitize; +use PMA\libraries\Template; if (! defined('PHPMYADMIN')) { exit; @@ -2879,26 +2880,11 @@ class Util */ public static function getDivForSliderEffect($id = '', $message = '') { - if ($GLOBALS['cfg']['InitialSlidersState'] == 'disabled') { - return ''; - } - /** - * Bad hack on the next line. document.write() conflicts with jQuery, - * hence, opening the
with PHP itself instead of JavaScript. - * - * @todo find a better solution that uses $.append(), the recommended - * method maybe by using an additional param, the id of the div to - * append to - */ - - return '