Merge branch 'QA_4_4'
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
This commit is contained in:
commit
1a2fee8fbb
@ -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
|
||||
|
||||
@ -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 = $('<div class="json-highlight cm-s-default"></div>');
|
||||
$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();
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -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 = $('<div class="xml-highlight cm-s-default"></div>');
|
||||
$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();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@ -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 .= '<div id="pma_console_container"><div id="pma_console">';
|
||||
|
||||
// The templates, use sprintf() to output them
|
||||
|
||||
@ -406,6 +406,7 @@ class PMA_Header
|
||||
}
|
||||
$this->_scripts->addCode('ConsoleEnterExecutes='
|
||||
. ($GLOBALS['cfg']['ConsoleEnterExecutes'] ? 'true' : 'false'));
|
||||
$this->_scripts->addFiles($this->_console->getScripts());
|
||||
if ($this->_userprefsOfferImport) {
|
||||
$this->_scripts->addFile('config.js');
|
||||
}
|
||||
|
||||
@ -42,10 +42,13 @@ class Text_Plain_JsonEditor extends CodeMirrorEditorTransformationsPlugin
|
||||
*/
|
||||
public function getScripts()
|
||||
{
|
||||
return array(
|
||||
'codemirror/mode/javascript/javascript.js',
|
||||
'transformations/json_editor.js'
|
||||
);
|
||||
$scripts = array();
|
||||
if ($GLOBALS['cfg']['CodemirrorEnable']) {
|
||||
$scripts[] = 'codemirror/lib/codemirror.js';
|
||||
$scripts[] = 'codemirror/mode/javascript/javascript.js';
|
||||
$scripts[] = 'transformations/json_editor.js';
|
||||
}
|
||||
return $scripts;
|
||||
}
|
||||
|
||||
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
@ -42,9 +42,13 @@ class Text_Plain_SqlEditor extends CodeMirrorEditorTransformationsPlugin
|
||||
*/
|
||||
public function getScripts()
|
||||
{
|
||||
return array(
|
||||
'transformations/sql_editor.js'
|
||||
);
|
||||
$scripts = array();
|
||||
if ($GLOBALS['cfg']['CodemirrorEnable']) {
|
||||
$scripts[] = 'codemirror/lib/codemirror.js';
|
||||
$scripts[] = 'codemirror/mode/sql/sql.js';
|
||||
$scripts[] = 'transformations/sql_editor.js';
|
||||
}
|
||||
return $scripts;
|
||||
}
|
||||
|
||||
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
@ -42,10 +42,13 @@ class Text_Plain_XmlEditor extends CodeMirrorEditorTransformationsPlugin
|
||||
*/
|
||||
public function getScripts()
|
||||
{
|
||||
return array(
|
||||
'codemirror/mode/xml/xml.js',
|
||||
'transformations/xml_editor.js'
|
||||
);
|
||||
$scripts = array();
|
||||
if ($GLOBALS['cfg']['CodemirrorEnable']) {
|
||||
$scripts[] = 'codemirror/lib/codemirror.js';
|
||||
$scripts[] = 'codemirror/mode/xml/xml.js';
|
||||
$scripts[] = 'transformations/xml_editor.js';
|
||||
}
|
||||
return $scripts;
|
||||
}
|
||||
|
||||
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
@ -23,10 +23,14 @@ class Text_Plain_Json extends TransformationsPlugin
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$response = PMA_Response::getInstance();
|
||||
$scripts = $response->getHeader()->getScripts();
|
||||
$scripts->addFile('codemirror/mode/javascript/javascript.js');
|
||||
$scripts->addFile('transformations/json.js');
|
||||
if (! empty($GLOBALS['cfg']['CodemirrorEnable'])) {
|
||||
$response = PMA_Response::getInstance();
|
||||
$scripts = $response->getHeader()->getScripts();
|
||||
$scripts->addFile('codemirror/lib/codemirror.js');
|
||||
$scripts->addFile('codemirror/mode/javascript/javascript.js');
|
||||
$scripts->addFile('codemirror/addon/runmode/runmode.js');
|
||||
$scripts->addFile('transformations/json.js');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -22,6 +22,18 @@ require_once 'libraries/plugins/transformations/abstract/'
|
||||
*/
|
||||
class Text_Plain_Sql extends SQLTransformationsPlugin
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
if (! empty($GLOBALS['cfg']['CodemirrorEnable'])) {
|
||||
$response = PMA_Response::getInstance();
|
||||
$scripts = $response->getHeader()->getScripts();
|
||||
$scripts->addFile('codemirror/lib/codemirror.js');
|
||||
$scripts->addFile('codemirror/mode/sql/sql.js');
|
||||
$scripts->addFile('codemirror/addon/runmode/runmode.js');
|
||||
$scripts->addFile('function.js');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the plugin`s MIME type
|
||||
*
|
||||
|
||||
@ -23,10 +23,14 @@ class Text_Plain_Xml extends TransformationsPlugin
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$response = PMA_Response::getInstance();
|
||||
$scripts = $response->getHeader()->getScripts();
|
||||
$scripts->addFile('codemirror/mode/xml/xml.js');
|
||||
$scripts->addFile('transformations/xml.js');
|
||||
if (! empty($GLOBALS['cfg']['CodemirrorEnable'])) {
|
||||
$response = PMA_Response::getInstance();
|
||||
$scripts = $response->getHeader()->getScripts();
|
||||
$scripts->addFile('codemirror/lib/codemirror.js');
|
||||
$scripts->addFile('codemirror/mode/xml/xml.js');
|
||||
$scripts->addFile('codemirror/addon/runmode/runmode.js');
|
||||
$scripts->addFile('transformations/xml.js');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user