Removed inline call to confirmLink() for 'Drop Event' action
This commit is contained in:
@@ -1804,11 +1804,11 @@ jQuery.fn.PMA_confirm = function(question, url, callbackFn) {
|
|||||||
callbackFn.call(this, url);
|
callbackFn.call(this, url);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
button_options[PMA_messages['strCancel']] = function() { $(this).dialog("close").remove(); }
|
button_options[PMA_messages['strCancel']] = function() {$(this).dialog("close").remove();}
|
||||||
|
|
||||||
$('<div id="confirm_dialog"></div>')
|
$('<div id="confirm_dialog"></div>')
|
||||||
.prepend(question)
|
.prepend(question)
|
||||||
.dialog({ buttons: button_options });
|
.dialog({buttons: button_options});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1935,7 +1935,32 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
})//end Add Primary Key
|
||||||
|
|
||||||
|
//Drop Event
|
||||||
|
$('.drop_event_anchor').live('click', function(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
var curr_event_row = $(this).parents('tr');
|
||||||
|
var curr_event_name = $(curr_event_row).children('td:first').text();
|
||||||
|
var question = 'DROP EVENT ' + curr_event_name;
|
||||||
|
|
||||||
|
$(this).PMA_confirm(question, $(this).attr('href') , function(url) {
|
||||||
|
|
||||||
|
PMA_ajaxShowMessage(PMA_messages['strDroppingEvent']);
|
||||||
|
|
||||||
|
$.get(url, {'is_js_confirmed': 1, 'ajax_request': true}, function(data) {
|
||||||
|
if(data.success == true) {
|
||||||
|
PMA_ajaxShowMessage(data.message);
|
||||||
|
$(curr_event_row).hide("medium").remove();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : " + data.error);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
//end Drop Event
|
||||||
|
|
||||||
}, 'top.frame_content'); //end $(document).ready() for db_structure.php
|
}, 'top.frame_content'); //end $(document).ready() for db_structure.php
|
||||||
|
|
||||||
@@ -1953,7 +1978,7 @@ $(document).ready(function() {
|
|||||||
/* @todo Validate this form! */
|
/* @todo Validate this form! */
|
||||||
|
|
||||||
var button_options = {};
|
var button_options = {};
|
||||||
button_options[PMA_messages['strCancel']] = function() {$(this).dialog('close').remove(); }
|
button_options[PMA_messages['strCancel']] = function() {$(this).dialog('close').remove();}
|
||||||
|
|
||||||
PMA_ajaxShowMessage();
|
PMA_ajaxShowMessage();
|
||||||
$(this).append('<input type="hidden" name="ajax_request" value="true" />');
|
$(this).append('<input type="hidden" name="ajax_request" value="true" />');
|
||||||
|
@@ -29,6 +29,7 @@ $js_messages['strNoDropDatabases'] = __('"DROP DATABASE" statements are disabled
|
|||||||
/* For confirmations */
|
/* For confirmations */
|
||||||
$js_messages['strDoYouReally'] = __('Do you really want to ');
|
$js_messages['strDoYouReally'] = __('Do you really want to ');
|
||||||
$js_messages['strDropDatabaseStrongWarning'] = __('You are about to DESTROY a complete database!');
|
$js_messages['strDropDatabaseStrongWarning'] = __('You are about to DESTROY a complete database!');
|
||||||
|
$js_messages['strDroppingEvent'] = __('Dropping Event');
|
||||||
|
|
||||||
/* For blobstreaming */
|
/* For blobstreaming */
|
||||||
$js_messages['strBLOBRepositoryDisableStrongWarning'] = __('You are about to DISABLE a BLOB Repository!');
|
$js_messages['strBLOBRepositoryDisableStrongWarning'] = __('You are about to DISABLE a BLOB Repository!');
|
||||||
|
@@ -51,7 +51,7 @@ if ($events) {
|
|||||||
($ct%2 == 0) ? 'even' : 'odd',
|
($ct%2 == 0) ? 'even' : 'odd',
|
||||||
$event['EVENT_NAME'],
|
$event['EVENT_NAME'],
|
||||||
! empty($definition) ? PMA_linkOrButton('db_sql.php?' . $url_query . '&sql_query=' . urlencode($definition) . '&show_query=1&delimiter=' . urlencode($delimiter), $titles['Structure']) : ' ',
|
! empty($definition) ? PMA_linkOrButton('db_sql.php?' . $url_query . '&sql_query=' . urlencode($definition) . '&show_query=1&delimiter=' . urlencode($delimiter), $titles['Structure']) : ' ',
|
||||||
'<a href="sql.php?' . $url_query . '&sql_query=' . urlencode($sqlDrop) . '" onclick="return confirmLink(this, \'' . PMA_jsFormat($sqlDrop, false) . '\')">' . $titles['Drop'] . '</a>',
|
'<a class="drop_event_anchor" href="sql.php?' . $url_query . '&sql_query=' . urlencode($sqlDrop) . '" >' . $titles['Drop'] . '</a>',
|
||||||
$event['EVENT_TYPE']);
|
$event['EVENT_TYPE']);
|
||||||
$ct++;
|
$ct++;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user