Add todo for code that will not be used in future after revamping all
the files. Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
This commit is contained in:
parent
8111151049
commit
ce8d11c858
@ -1,7 +1,8 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Exporting of translated messages from PHP to Javascript
|
||||
* Exporting of common params defined in Header.php to make them available in
|
||||
* the global window object and then serialize these variables in the modules.
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
|
||||
@ -5107,6 +5107,8 @@ jQuery.fn.getPostData = function () {
|
||||
};
|
||||
|
||||
/**
|
||||
* @todo REMOVE THESE FUNCTIONS AFTER COMPLETE CODE BEING MODULAR
|
||||
*
|
||||
* Copy of functions copied from different files to make them globally
|
||||
* available so that build does not break during modularisation
|
||||
*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { PMA_ajaxShowMessage } from './utils/show_ajax_messages';
|
||||
import { PMA_Messages as PMA_messages } from './variables/export_variables';
|
||||
import { PMA_commonParams } from './variables/common_params';
|
||||
import { jQuery as $ } from './utils/extend_jquery';
|
||||
import { jQuery as $ } from './utils/JqueryExtended';
|
||||
import { PMA_getImage } from './functions/get_image';
|
||||
|
||||
/**
|
||||
@ -222,7 +222,6 @@ export let AJAX = {
|
||||
* @return void
|
||||
*/
|
||||
requestHandler: function (event) {
|
||||
console.log('i am called');
|
||||
// In some cases we don't want to handle the request here and either
|
||||
// leave the browser deal with it natively (e.g: file download)
|
||||
// or leave an existing ajax event handler present elsewhere deal with it
|
||||
|
||||
@ -4,11 +4,10 @@
|
||||
* @returns void
|
||||
*/
|
||||
import { PMA_commonParams } from '../variables/common_params';
|
||||
export function PMA_showCurrentNavigation() {
|
||||
export function PMA_showCurrentNavigation () {
|
||||
var db = PMA_commonParams.get('db');
|
||||
var table = PMA_commonParams.get('table');
|
||||
console.log(db);
|
||||
console.log(table);
|
||||
|
||||
$('#pma_navigation_tree').find('li.selected').removeClass('selected');
|
||||
if (db) {
|
||||
var $dbItem = findLoadedItem($('#pma_navigation_tree').find('> div'), db, 'database', !table);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { AJAX } from './ajax';
|
||||
import './variables/import_variables';
|
||||
import { jQuery as $ } from './utils/extend_jquery';
|
||||
import { jQuery as $ } from './utils/JqueryExtended';
|
||||
import files from './consts/files';
|
||||
|
||||
/**
|
||||
|
||||
@ -12,22 +12,14 @@ import './variables/import_variables';
|
||||
import { PMA_ajaxShowMessage } from './utils/show_ajax_messages';
|
||||
import { escapeHtml } from './utils/Sanitise';
|
||||
import { PMA_Messages as PMA_messages } from './variables/export_variables';
|
||||
import { jQuery as $ } from './utils/extend_jquery';
|
||||
import { jQuery as $ } from './utils/JqueryExtended';
|
||||
import { AJAX } from './ajax';
|
||||
import { PMA_commonParams } from './variables/common_params';
|
||||
|
||||
// console.log(AJAX.test);
|
||||
// console.log(PMA_messages);
|
||||
// console.log(PMA_commonParams.get('server'));
|
||||
// console.log(AJAX.test);
|
||||
// AJAX.checkTest();
|
||||
// console.log(AJAX.test);
|
||||
// console.log(a.test);
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
export function teardown1 () {
|
||||
// console.log('firing event');
|
||||
$(document).off('submit', '#dbStatsForm');
|
||||
$(document).off('submit', '#create_database_form.ajax');
|
||||
}
|
||||
@ -157,18 +149,3 @@ export function onload1 () {
|
||||
});
|
||||
});
|
||||
}
|
||||
// export default function server_databases () {
|
||||
// console.log('aadd');
|
||||
// AJAX.registerTeardown('server_databases_new.js', );
|
||||
//
|
||||
// /**
|
||||
// * AJAX scripts for server_databases.php
|
||||
// *
|
||||
// * Actions ajaxified here:
|
||||
// * Drop Databases
|
||||
// *
|
||||
// */
|
||||
//
|
||||
// AJAX.registerOnload('server_databases_new.js', ); // end $()
|
||||
//
|
||||
// };
|
||||
|
||||
@ -14,12 +14,7 @@ import { checkPasswordStrength, displayPasswordGenerateButton } from './utils/pa
|
||||
import { PMA_Messages as PMA_messages } from './variables/export_variables';
|
||||
import { PMA_ajaxShowMessage, PMA_ajaxRemoveMessage } from './utils/show_ajax_messages';
|
||||
import { PMA_commonParams } from './variables/common_params';
|
||||
import { jQuery as $ } from './utils/extend_jquery';
|
||||
|
||||
|
||||
// console.log(AJAX.test);
|
||||
// AJAX.test = true;
|
||||
// console.log(AJAX.test);
|
||||
import { jQuery as $ } from './utils/JqueryExtended';
|
||||
|
||||
/**
|
||||
* AJAX scripts for server_privileges page.
|
||||
@ -36,7 +31,6 @@ import { jQuery as $ } from './utils/extend_jquery';
|
||||
* @name document.ready
|
||||
*/
|
||||
|
||||
// console.log(AJAX.test);
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
@ -88,7 +82,6 @@ export function onload1 () {
|
||||
var meter_obj_label;
|
||||
var username;
|
||||
$(document).on('keyup', '#text_pma_pw', function () {
|
||||
console.log('random');
|
||||
meter_obj = $('#password_strength_meter');
|
||||
meter_obj_label = $('#password_strength');
|
||||
username = $('input[name="username"]');
|
||||
@ -433,9 +426,7 @@ export function onload1 () {
|
||||
|
||||
$('input.autofocus').focus();
|
||||
$(checkboxes_sel).trigger('change');
|
||||
console.log('randmo1');
|
||||
displayPasswordGenerateButton();
|
||||
console.log('randmo2');
|
||||
if ($('#edit_user_dialog').length > 0) {
|
||||
addOrUpdateSubmenu();
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ $.fn.PMA_confirm = function (question, url, callbackFn, openCallback) {
|
||||
$.fn.getPostData = function () {
|
||||
var dataPost = this.attr('data-post');
|
||||
// Strip possible leading ?
|
||||
if (dataPost !== undefined && dataPost.substring(0,1) == '?') {
|
||||
if (dataPost !== undefined && dataPost.substring(0,1) === '?') {
|
||||
dataPost = dataPost.substr(1);
|
||||
}
|
||||
return dataPost;
|
||||
@ -21,7 +21,6 @@
|
||||
*/
|
||||
function MenuResizer ($container, widthCalculator) {
|
||||
var self = this;
|
||||
console.log(this);
|
||||
self.$container = $container;
|
||||
self.widthCalculator = widthCalculator;
|
||||
var windowWidth = $(window).width();
|
||||
|
||||
@ -52,7 +52,6 @@ export function suggestPassword (passwd_form) {
|
||||
*
|
||||
*/
|
||||
export function displayPasswordGenerateButton () {
|
||||
console.log('random');
|
||||
var generatePwdRow = $('<tr />').addClass('vmiddle');
|
||||
$('<td />').html(PMA_messages.strGeneratePassword).appendTo(generatePwdRow);
|
||||
var pwdCell = $('<td />').appendTo(generatePwdRow);
|
||||
@ -76,7 +75,6 @@ export function displayPasswordGenerateButton () {
|
||||
.appendTo(generatePwdDiv);
|
||||
pwdButton.clone(true).appendTo(optionsSpan);
|
||||
pwdTextbox.clone(true).appendTo(generatePwdDiv);
|
||||
console.log($('#div_element_before_generate_password'));
|
||||
$('#div_element_before_generate_password').parent().append(generatePwdDiv);
|
||||
}
|
||||
|
||||
|
||||
@ -8,7 +8,6 @@
|
||||
* Module imports
|
||||
*/
|
||||
import { PMA_Messages as PMA_messages } from '../variables/export_variables';
|
||||
// import { PMA_highlightSQL } from './sql';
|
||||
|
||||
/**
|
||||
* @var int ajax_message_count Number of AJAX messages shown since page load
|
||||
|
||||
@ -27,8 +27,6 @@ export const PMA_commonParams = (function () {
|
||||
var updateNavigation = false;
|
||||
for (var i in obj) {
|
||||
if (params[i] !== undefined && params[i] !== obj[i]) {
|
||||
console.log('randoma5sd');
|
||||
|
||||
if (i === 'db' || i === 'table') {
|
||||
updateNavigation = true;
|
||||
}
|
||||
@ -39,7 +37,6 @@ export const PMA_commonParams = (function () {
|
||||
if (updateNavigation &&
|
||||
$('#pma_navigation_tree').hasClass('synced')
|
||||
) {
|
||||
console.log('random');
|
||||
PMA_showCurrentNavigation();
|
||||
}
|
||||
},
|
||||
|
||||
@ -5,8 +5,6 @@ var jqueryValidations = {
|
||||
validationFormat: window.validateFormat,
|
||||
validationMessage: window.validationMessage
|
||||
};
|
||||
// console.log('random');
|
||||
// console.log(window.PMA_messages);
|
||||
Variables.setAllMessages(window.PMA_messages);
|
||||
Variables.setTimePickerVars({
|
||||
datePicker: window.datePicker,
|
||||
@ -14,7 +12,6 @@ Variables.setTimePickerVars({
|
||||
});
|
||||
Variables.setValidatorMessages(jqueryValidations);
|
||||
Variables.setGlobalVars(window.globalVars);
|
||||
// console.log(Variables.getMessages());
|
||||
|
||||
/**
|
||||
* This statement to be placed in the file going to be
|
||||
|
||||
@ -164,18 +164,18 @@ class Header
|
||||
private function _addDefaultScripts(): void
|
||||
{
|
||||
// Localised strings
|
||||
$this->_scripts->addFile('vendor/jquery/jquery.min.js');/////////////////////
|
||||
$this->_scripts->addFile('vendor/jquery/jquery-migrate.js');/////////////////
|
||||
$this->_scripts->addFile('vendor/jquery/jquery.min.js');
|
||||
$this->_scripts->addFile('vendor/jquery/jquery-migrate.js');
|
||||
$this->_scripts->addFile('whitelist.php');
|
||||
$this->_scripts->addFile('vendor/sprintf.js');
|
||||
$this->_scripts->addFile('ajax.js');
|
||||
$this->_scripts->addFile('keyhandler.js');
|
||||
$this->_scripts->addFile('vendor/jquery/jquery-ui.min.js');/////////////////
|
||||
$this->_scripts->addFile('vendor/jquery/jquery-ui.min.js');
|
||||
$this->_scripts->addFile('vendor/js.cookie.js');
|
||||
$this->_scripts->addFile('vendor/jquery/jquery.mousewheel.js');/////////////
|
||||
$this->_scripts->addFile('vendor/jquery/jquery.event.drag-2.2.js');/////////
|
||||
$this->_scripts->addFile('vendor/jquery/jquery.validate.js');///////////////
|
||||
$this->_scripts->addFile('vendor/jquery/jquery-ui-timepicker-addon.js');////
|
||||
$this->_scripts->addFile('vendor/jquery/jquery.mousewheel.js');
|
||||
$this->_scripts->addFile('vendor/jquery/jquery.event.drag-2.2.js');
|
||||
$this->_scripts->addFile('vendor/jquery/jquery.validate.js');
|
||||
$this->_scripts->addFile('vendor/jquery/jquery-ui-timepicker-addon.js');
|
||||
$this->_scripts->addFile('vendor/jquery/jquery.ba-hashchange-1.3.js');
|
||||
$this->_scripts->addFile('vendor/jquery/jquery.debounce-1.0.5.js');
|
||||
$this->_scripts->addFile('menu_resizer.js');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user