diff --git a/ChangeLog b/ChangeLog index 1af92a2c4f..2e6c142a13 100644 --- a/ChangeLog +++ b/ChangeLog @@ -29,6 +29,7 @@ phpMyAdmin - ChangeLog - bug #4754 pMA DB not detected properly - bug #4825 Datepicker missing when changing number of rows on Insert page - bug #4824 INNODB STATUS page is empty +- bug #4828 JavaScript is loaded in wrong order 4.4.0.0 (2015-04-01) + rfe #1553 InnoDB presently supports one FULLTEXT index creation at a time diff --git a/js/transformations/json.js b/js/transformations/json.js index d2cd111ee3..98c4b33c40 100644 --- a/js/transformations/json.js +++ b/js/transformations/json.js @@ -3,18 +3,16 @@ * JSON syntax highlighting transformation plugin */ AJAX.registerOnload('transformations/json.js', function() { - var $elm = $('#page_content').find('code.json'); - $elm.each(function () { + var $elm = $('#page_content').find('code.json'); + $elm.each(function () { var $json = $(this); var $pre = $json.find('pre'); /* We only care about visible elements to avoid double processing */ if ($pre.is(":visible")) { var $highlight = $('
'); $json.append($highlight); - if (typeof CodeMirror != 'undefined') { - CodeMirror.runMode($json.text(), 'application/json', $highlight[0]); - $pre.hide(); - } + CodeMirror.runMode($json.text(), 'application/json', $highlight[0]); + $pre.hide(); } }); }); \ No newline at end of file diff --git a/js/transformations/xml.js b/js/transformations/xml.js index c6ed64b1f1..dd4eef6602 100644 --- a/js/transformations/xml.js +++ b/js/transformations/xml.js @@ -3,7 +3,7 @@ * XML syntax highlighting transformation plugin */ AJAX.registerOnload('transformations/xml.js', function() { - var $elm = $('#page_content').find('code.xml'); + var $elm = $('#page_content').find('code.xml'); $elm.each(function () { var $json = $(this); var $pre = $json.find('pre'); @@ -11,10 +11,8 @@ AJAX.registerOnload('transformations/xml.js', function() { if ($pre.is(":visible")) { var $highlight = $(''); $json.append($highlight); - if (typeof CodeMirror != 'undefined') { - CodeMirror.runMode($json.text(), 'application/xml', $highlight[0]); - $pre.hide(); - } + CodeMirror.runMode($json.text(), 'application/xml', $highlight[0]); + $pre.hide(); } }); }); diff --git a/libraries/Console.class.php b/libraries/Console.class.php index a8efb9f03e..db9d66341f 100644 --- a/libraries/Console.class.php +++ b/libraries/Console.class.php @@ -20,13 +20,6 @@ require_once 'libraries/bookmark.lib.php'; */ class PMA_Console { - /** - * PMA_Scripts instance - * - * @access private - * @var PMA_Scripts - */ - private $_scripts; /** * Whether to display anything * @@ -41,7 +34,6 @@ class PMA_Console public function __construct() { $this->_isEnabled = true; - $this->_scripts = new PMA_Scripts(); } /** @@ -147,6 +139,16 @@ class PMA_Console return $output; } + /** + * Returns the list of JS scripts required by console + * + * @return array list of scripts + */ + public function getScripts() + { + return array('console.js'); + } + /** * Renders the console * @@ -158,15 +160,6 @@ class PMA_Console $output = ''; if ((! $this->_isAjax) && $this->_isEnabled) { $cfgBookmark = PMA_Bookmark_getParams(); - if ($GLOBALS['cfg']['CodemirrorEnable']) { - $this->_scripts->addFile('codemirror/lib/codemirror.js'); - $this->_scripts->addFile('codemirror/mode/sql/sql.js'); - $this->_scripts->addFile('codemirror/addon/runmode/runmode.js'); - $this->_scripts->addFile('codemirror/addon/hint/show-hint.js'); - $this->_scripts->addFile('codemirror/addon/hint/sql-hint.js'); - } - $this->_scripts->addFile('console.js'); - $output .= $this->_scripts->getDisplay(); $output .= '