/
usr
/
share
/
phpmyadmin
/
js
/
dist
/
/usr/share/phpmyadmin/js/dist
mkdir
upload
Name
Size
Mode
Actions
codemirror/
-
0755
rm
database/
-
0755
rm
designer/
-
0755
rm
jqplot/
-
0755
rm
server/
-
0755
rm
setup/
-
0755
rm
table/
-
0755
rm
transformations/
-
0755
rm
ajax.js
31313
0644
edit
dl
rm
chart.js
17840
0644
edit
dl
rm
common.js
4367
0644
edit
dl
rm
config.js
24956
0644
edit
dl
rm
console.js
49656
0644
edit
dl
rm
cross_framing_protection.js
419
0644
edit
dl
rm
doclinks.js
18275
0644
edit
dl
rm
drag_drop_import.js
12308
0644
edit
dl
rm
error_report.js
9621
0644
edit
dl
rm
export.js
33524
0644
edit
dl
rm
export_output.js
379
0644
edit
dl
rm
functions.js
160991
0644
edit
dl
rm
gis_data_editor.js
13822
0644
edit
dl
rm
import.js
6161
0644
edit
dl
rm
indexes.js
26344
0644
edit
dl
rm
jquery.sortable-table.js
9951
0644
edit
dl
rm
keyhandler.js
3003
0644
edit
dl
rm
makegrid.js
78860
0644
edit
dl
rm
menu_resizer.js
5644
0644
edit
dl
rm
microhistory.js
10074
0644
edit
dl
rm
multi_column_sort.js
1296
0644
edit
dl
rm
navigation.js
54678
0644
edit
dl
rm
normalization.js
24237
0644
edit
dl
rm
page_settings.js
1568
0644
edit
dl
rm
replication.js
3517
0644
edit
dl
rm
rte.js
40074
0644
edit
dl
rm
shortcuts_handler.js
3326
0644
edit
dl
rm
sql.js
35495
0644
edit
dl
rm
u2f.js
2953
0644
edit
dl
rm
Edit:
/usr/share/phpmyadmin/js/dist/common.js
(4367B)
"use strict"; $(function () { Functions.checkNumberOfFields(); }); /** * Holds common parameters such as server, db, table, etc * * The content for this is normally loaded from Header.php or * Response.php and executed by ajax.js * * @test-module CommonParams */ var CommonParams = function () { /** * @var hash params An associative array of key value pairs * @access private */ var params = {}; // The returned object is the public part of the module return { /** * Saves all the key value pair that * are provided in the input array * * @param obj hash The input array * * @return void */ setAll: function setAll(obj) { var updateNavigation = false; for (var i in obj) { if (params[i] !== undefined && params[i] !== obj[i]) { if (i === 'db' || i === 'table') { updateNavigation = true; } } params[i] = obj[i]; } if (updateNavigation && $('#pma_navigation_tree').hasClass('synced')) { Navigation.showCurrent(); } }, /** * Retrieves a value given its key * Returns empty string for undefined values * * @param name string The key * * @return string */ get: function get(name) { return params[name]; }, /** * Saves a single key value pair * * @param name string The key * @param value string The value * * @return self For chainability */ set: function set(name, value) { var updateNavigation = false; if (name === 'db' || name === 'table' && params[name] !== value) { updateNavigation = true; } params[name] = value; if (updateNavigation && $('#pma_navigation_tree').hasClass('synced')) { Navigation.showCurrent(); } return this; }, /** * Returns the url query string using the saved parameters * * @param {string} separator New separator * * @return string */ getUrlQuery: function getUrlQuery(separator) { var sep = typeof separator !== 'undefined' ? separator : '?'; var common = this.get('common_query'); var argsep = CommonParams.get('arg_separator'); if (typeof common === 'string') { // If the last char is the separator, do not add it // Else add it common = common.substr(common.length - 1, common.length) === argsep ? common : common + argsep; } return Functions.sprintf('%s%sserver=%s' + argsep + 'db=%s' + argsep + 'table=%s', sep, common, encodeURIComponent(this.get('server')), encodeURIComponent(this.get('db')), encodeURIComponent(this.get('table'))); } }; }(); /** * Holds common parameters such as server, db, table, etc * * The content for this is normally loaded from Header.php or * Response.php and executed by ajax.js */ // eslint-disable-next-line no-unused-vars var CommonActions = { /** * Saves the database name when it's changed * and reloads the query window, if necessary * * @param newDb string new_db The name of the new database * * @return void */ setDb: function setDb(newDb) { if (newDb !== CommonParams.get('db')) { CommonParams.setAll({ 'db': newDb, 'table': '' }); } }, /** * Opens a database in the main part of the page * * @param newDb string The name of the new database * * @return void */ openDb: function openDb(newDb) { CommonParams.set('db', newDb).set('table', ''); this.refreshMain(CommonParams.get('opendb_url')); }, /** * Refreshes the main frame * * @param mixed url Undefined to refresh to the same page * String to go to a different page, e.g: 'index.php' * * @return void */ refreshMain: function refreshMain(url, callback) { var newUrl = url; if (!newUrl) { newUrl = $('#selflink').find('a').attr('href') || window.location.pathname; newUrl = newUrl.substring(0, newUrl.indexOf('?')); } if (newUrl.indexOf('?') !== -1) { newUrl += CommonParams.getUrlQuery(CommonParams.get('arg_separator')); } else { newUrl += CommonParams.getUrlQuery('?'); } $('<a></a>', { href: newUrl }).appendTo('body').trigger('click').remove(); AJAX.callback = callback; } };
Save
cmd:
run