' +
' ' +
' ' +
' | ' +
' ' +
' ' +
' | ' +
' ' + $('').text(db + '.' + table).html() + ' | ' +
'
');
$('#id_scroll_tab table').first().append($new_table_line);
$($new_table_line).find('.scroll_tab_struct').click(function () {
Start_tab_upd(db, table);
});
$($new_table_line).on('click', '.designer_Tabs2,.designer_Tabs', function () {
Select_tab($(this).attr('designer_url_table_name'));
});
$($new_table_line).find('.scroll_tab_checkbox').click(function () {
VisibleTab(this,$(this).val());
});
var $tables_counter = $('#tables_counter');
$tables_counter.text(parseInt($tables_counter.text(), 10) + 1);
}
function Add_Other_db_tables () {
var button_options = {};
button_options[PMA_messages.strGo] = function () {
var db = $('#add_table_from').val();
var table = $('#add_table').val();
// Check if table already imported or not.
var $table = $('[id="' + encodeURIComponent(db) + '.' + encodeURIComponent(table) + '"]');
if ($table.length !== 0) {
PMA_ajaxShowMessage(
PMA_sprintf(PMA_messages.strTableAlreadyExists, db + '.' + table),
undefined,
'error'
);
return;
}
$.post('db_designer.php', {
'ajax_request' : true,
'dialog' : 'add_table',
'db' : db,
'table' : table,
'server': PMA_commonParams.get('server')
}, function (data) {
var $newTableDom = $(data.message);
$newTableDom.find('a').first().remove();
var dbEncoded = $($newTableDom).find('.small_tab_pref').attr('db_url');
var tableEncoded = $($newTableDom).find('.small_tab_pref').attr('table_name_url');
if (typeof dbEncoded === 'string' && typeof tableEncoded === 'string' ) { // Do not try to add if attr not found !
$('#container-form').append($newTableDom);
enableTableEvents(null, $newTableDom);
addTableToTablesList(null, $newTableDom);
j_tabs[dbEncoded + '.' + tableEncoded] = 1;
MarkUnsaved();
}
});
$(this).dialog('close');
};
button_options[PMA_messages.strCancel] = function () {
$(this).dialog('close');
};
var $select_db = $('