Skip to content

Commit

Permalink
Bug fix for undefined variables and PMA_Console in working state now.
Browse files Browse the repository at this point in the history
Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
  • Loading branch information
Piyush3079 committed Jul 27, 2018
1 parent e18c6b9 commit de78e79
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion js/src/classes/ErrorReport.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { PMA_commonParams } from '../variables/common_params';
import { PMA_ajaxShowMessage } from '../utils/show_ajax_messages';
import { PMA_getImage } from '../functions/get_image';
import TraceKit from 'tracekit';
import { jQuery as $ } from '../utils/extend_jquery';
import { jQuery as $ } from '../utils/JqueryExtended';

/**
* This Object uses the library TraceKit to generate the backtrace of the
Expand Down
8 changes: 5 additions & 3 deletions js/src/console.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import PMA_consoleResizer from './classes/Console/PMA_ConsoleResizer';
/**
* Console object
*/
export var PMA_console = {
var PMA_console = {
/**
* @var object, jQuery object, selector is '#pma_console>.content'
* @access private
Expand Down Expand Up @@ -290,7 +290,7 @@ export var PMA_console = {
PMA_console.setConfig('Mode', 'show');

var pmaConsoleHeight = Math.max(92, PMA_console.config.Height);
pmaConsoleHeight = Math.min(PMA_console.config.Height, (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight)-25);
pmaConsoleHeight = Math.min(PMA_console.config.Height, (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight) - 25);
PMA_console.$consoleContent.css({ display:'block' });
if (PMA_console.$consoleToolbar.hasClass('collapsed')) {
PMA_console.$consoleToolbar.removeClass('collapsed');
Expand Down Expand Up @@ -414,4 +414,6 @@ export var PMA_console = {
var reg_exp = /^SELECT\s+/i;
return reg_exp.test(queryString);
}
}
};

export default PMA_console;
2 changes: 1 addition & 1 deletion js/src/functions/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export function PMA_showCurrentNavigation () {

function isItemInContainer ($container, name, clazz) {
var $whichItem = null;
$items = $container.find(clazz);
var $items = $container.find(clazz);
var found = false;
$items.each(function () {
if ($(this).children('a').text() === name) {
Expand Down
5 changes: 5 additions & 0 deletions js/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { AJAX } from './ajax';
import './variables/import_variables';
import { jQuery as $ } from './utils/JqueryExtended';
import files from './consts/files';
import Console from './console';

/**
* Page load event handler
Expand Down Expand Up @@ -84,3 +85,7 @@ if (typeof files[firstPage] !== 'undefined' && firstPage.toLocaleLowerCase() !==
AJAX.scriptHandler.add(files[indexPage][i], 1);
}
}

$(function () {
Console.initialize();
});
2 changes: 1 addition & 1 deletion libraries/classes/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public static function getBookmarkContent(): string
*/
public function getScripts(): array
{
return ['console.js'];
return ['console'];
}

/**
Expand Down

0 comments on commit de78e79

Please sign in to comment.