Added JSDoc-Toolkit compatible documentation to js/db_operations.js
This commit is contained in:
@@ -1,13 +1,19 @@
|
|||||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||||
/**
|
/**
|
||||||
* function used in server privilege pages
|
* @fileoverview function used in server privilege pages
|
||||||
|
* @name Database Operations
|
||||||
|
*
|
||||||
|
* @requires jQuery
|
||||||
|
* @requires jQueryUI
|
||||||
|
* @requires js/functions.js
|
||||||
*
|
*
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add Ajax event handlers here for db_operations.php
|
* Ajax event handlers here for db_operations.php
|
||||||
*
|
*
|
||||||
|
* Actions Ajaxified here:
|
||||||
* Rename Database
|
* Rename Database
|
||||||
* Copy Database
|
* Copy Database
|
||||||
* Change charset
|
* Change charset
|
||||||
@@ -15,13 +21,21 @@
|
|||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
//Rename Database
|
/**
|
||||||
|
* Ajax event handlers for 'Rename Database'
|
||||||
|
*
|
||||||
|
* @uses $.PMA_confirm()
|
||||||
|
* @uses PMA_ajaxShowUser()
|
||||||
|
*/
|
||||||
$("#rename_db_form").live('submit', function(event) {
|
$("#rename_db_form").live('submit', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
var question = 'CREATE DATABASE ... and then DROP DATABASE ' + window.parent.db;
|
var question = 'CREATE DATABASE ... and then DROP DATABASE ' + window.parent.db;
|
||||||
$(this).append('<input type="hidden" name="ajax_request" value="true" />');
|
$(this).append('<input type="hidden" name="ajax_request" value="true" />');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var button_options Object containing options for jQueryUI dialog buttons
|
||||||
|
*/
|
||||||
var button_options = {};
|
var button_options = {};
|
||||||
button_options[PMA_messages['strYes']] = function() {
|
button_options[PMA_messages['strYes']] = function() {
|
||||||
$(this).dialog("close").remove();
|
$(this).dialog("close").remove();
|
||||||
@@ -37,7 +51,9 @@ $(document).ready(function() {
|
|||||||
if(data.success == true) {
|
if(data.success == true) {
|
||||||
|
|
||||||
PMA_ajaxShowMessage(data.message);
|
PMA_ajaxShowMessage(data.message);
|
||||||
|
|
||||||
window.parent.db = data.newname;
|
window.parent.db = data.newname;
|
||||||
|
|
||||||
$("#topmenucontainer")
|
$("#topmenucontainer")
|
||||||
.next('div')
|
.next('div')
|
||||||
.remove()
|
.remove()
|
||||||
@@ -61,7 +77,11 @@ $(document).ready(function() {
|
|||||||
})
|
})
|
||||||
}); // end Rename Database
|
}); // end Rename Database
|
||||||
|
|
||||||
//Copy Database
|
/**
|
||||||
|
* Ajax Event Handler for 'Copy Database'
|
||||||
|
*
|
||||||
|
* @uses PMA_ajaxShowMessage()
|
||||||
|
*/
|
||||||
$("#copy_db_form").live('submit', function(event) {
|
$("#copy_db_form").live('submit', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
@@ -79,16 +99,21 @@ $(document).ready(function() {
|
|||||||
else {
|
else {
|
||||||
PMA_ajaxShowMessage(data.error);
|
PMA_ajaxShowMessage(data.error);
|
||||||
}
|
}
|
||||||
})
|
}) // end $.get
|
||||||
}) // end copy database
|
}) // end copy database
|
||||||
|
|
||||||
//Change charset
|
/**
|
||||||
|
* Ajax Event handler for 'Change Charset' of the database
|
||||||
|
*
|
||||||
|
* @uses PMA_ajaxShowMessage()
|
||||||
|
*/
|
||||||
$("#change_db_charset_form").live('submit', function(event) {
|
$("#change_db_charset_form").live('submit', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
$(this).append('<input type="hidden" name="ajax_request" value="true" />');
|
$(this).append('<input type="hidden" name="ajax_request" value="true" />');
|
||||||
|
|
||||||
PMA_ajaxShowMessage(PMA_messages['strChangingCharset']);
|
PMA_ajaxShowMessage(PMA_messages['strChangingCharset']);
|
||||||
|
|
||||||
$.get($(this).attr('action'), $(this).serialize() + "&submitcollation=" + $(this).find("input[name=submitcollation]").attr('value'), function(data) {
|
$.get($(this).attr('action'), $(this).serialize() + "&submitcollation=" + $(this).find("input[name=submitcollation]").attr('value'), function(data) {
|
||||||
if(data.success == true) {
|
if(data.success == true) {
|
||||||
PMA_ajaxShowMessage(data.message);
|
PMA_ajaxShowMessage(data.message);
|
||||||
@@ -96,7 +121,7 @@ $(document).ready(function() {
|
|||||||
else {
|
else {
|
||||||
PMA_ajaxShowMessage(data.error);
|
PMA_ajaxShowMessage(data.error);
|
||||||
}
|
}
|
||||||
})
|
}) // end $.get()
|
||||||
}) // end change charset
|
}) // end change charset
|
||||||
|
|
||||||
}, 'top.frame_content');
|
}, 'top.frame_content');
|
Reference in New Issue
Block a user