Properly open and select database when "Use <db>" command is issued
This commit is contained in:
parent
6f29a89aec
commit
9c8267a9a8
@ -78,7 +78,7 @@ var PMA_commonParams = (function () {
|
||||
PMA_querywindow.refresh();
|
||||
}
|
||||
params[name] = value;
|
||||
if(name == 'db' || name == 'table') {
|
||||
if (name == 'db' || name == 'table') {
|
||||
PMA_showCurrentNavigation();
|
||||
}
|
||||
return this;
|
||||
@ -117,9 +117,7 @@ var PMA_commonActions = {
|
||||
*/
|
||||
setDb: function (new_db) {
|
||||
if (new_db != PMA_commonParams.get('db')) {
|
||||
PMA_commonParams.set('db', new_db);
|
||||
PMA_showCurrentNavigation();
|
||||
PMA_querywindow.refresh();
|
||||
PMA_commonParams.setAll({'db': new_db, 'table': ''});
|
||||
}
|
||||
},
|
||||
/**
|
||||
|
||||
16
js/sql.js
16
js/sql.js
@ -296,7 +296,17 @@ AJAX.registerOnload('sql.js', function() {
|
||||
} else if (typeof data.reload != 'undefined') {
|
||||
// this happens if a USE or DROP command was typed
|
||||
PMA_commonActions.setDb(data.db);
|
||||
PMA_commonActions.refreshMain(false, function () {
|
||||
var url;
|
||||
if (data.db) {
|
||||
if (data.table) {
|
||||
url = 'table_sql.php';
|
||||
} else {
|
||||
url = 'db_sql.php';
|
||||
}
|
||||
} else {
|
||||
url = 'server_sql.php';
|
||||
}
|
||||
PMA_commonActions.refreshMain(url, function () {
|
||||
if ($('#result_query').length) {
|
||||
$('#result_query').remove();
|
||||
}
|
||||
@ -307,7 +317,7 @@ AJAX.registerOnload('sql.js', function() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$sqlqueryresults.show().trigger('makegrid');
|
||||
$('#togglequerybox').show();
|
||||
PMA_init_slider();
|
||||
@ -581,7 +591,7 @@ function makeProfilingChart()
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var data = [];
|
||||
$.each(jQuery.parseJSON($('#profilingChartData').html()),function(key,value) {
|
||||
data.push([key,parseFloat(value)]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user