Ajaxified Create Database action. Have to append newly created db to table yet though

This commit is contained in:
ninadsp
2010-07-31 02:25:29 +05:30
parent b19fa7c60f
commit e6f083c703
3 changed files with 33 additions and 1 deletions

View File

@@ -2049,4 +2049,27 @@ $(document).ready(function() {
})
});
}); //end of Drop Database Ajax action
})
/**
* jQuery coding for 'Create Database'. Used wherever libraries/
* display_create_database.lib.php is used, ie main.php and server_databases.php
*/
$(document).ready(function() {
$('#create_database_form').live('submit', function(event) {
event.preventDefault();
PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']);
$(this).append('<input type="hidden" name="ajax_request" value="true" />');
$.post($(this).attr('action'), $(this).serialize(), function(data) {
if(data.success == true) {
PMA_ajaxShowMessage(data.message);
}
else {
PMA_ajaxShowMessage(data.error);
}
})
})
})