Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js/rte.js
diff options
context:
space:
mode:
authorMichal Čihař <mcihar@suse.cz>2013-04-16 15:32:51 +0400
committerMichal Čihař <mcihar@suse.cz>2013-04-16 15:32:51 +0400
commit27b213431cd07b3dcaba89d9504d39e166ed0c5f (patch)
tree3281a8f79e8d6925ccdd258c55861ec7a02bfa2e /js/rte.js
parentb3ee21036a18c4661d9835083e5b13e8eb6fddc4 (diff)
Reference javascript messages by dot notation instead of using ['strFoo']
Diffstat (limited to 'js/rte.js')
-rw-r--r--js/rte.js32
1 files changed, 16 insertions, 16 deletions
diff --git a/js/rte.js b/js/rte.js
index 20ef257c2f..fb19666a2f 100644
--- a/js/rte.js
+++ b/js/rte.js
@@ -72,7 +72,7 @@ RTE.COMMON = {
$elm = $('table.rte_table').last().find('input[name=item_name]');
if ($elm.val() === '') {
$elm.focus();
- alert(PMA_messages['strFormEmpty']);
+ alert(PMA_messages.strFormEmpty);
return false;
}
$elm = $('table.rte_table').find('textarea[name=item_definition]');
@@ -83,7 +83,7 @@ RTE.COMMON = {
else {
$('textarea[name=item_definition]').last().focus();
}
- alert(PMA_messages['strFormEmpty']);
+ alert(PMA_messages.strFormEmpty);
return false;
}
// The validation has so far passed, so now
@@ -119,7 +119,7 @@ RTE.COMMON = {
* for jQueryUI dialog buttons
*/
var button_options = {};
- button_options[PMA_messages['strClose']] = function () {
+ button_options[PMA_messages.strClose] = function () {
$(this).dialog("close").remove();
};
/**
@@ -176,7 +176,7 @@ RTE.COMMON = {
PMA_ajaxRemoveMessage($msg);
// Now define the function that is called when
// the user presses the "Go" button
- that.buttonOptions[PMA_messages['strGo']] = function () {
+ that.buttonOptions[PMA_messages.strGo] = function () {
// Move the data from the codemirror editor back to the
// textarea, where it can be used in the form submission.
if (typeof CodeMirror != 'undefined') {
@@ -189,7 +189,7 @@ RTE.COMMON = {
*/
var data = $('form.rte_form').last().serialize();
$msg = PMA_ajaxShowMessage(
- PMA_messages['strProcessingRequest']
+ PMA_messages.strProcessingRequest
);
var url = $('form.rte_form').last().attr('action');
$.post(url, data, function (data) {
@@ -290,7 +290,7 @@ RTE.COMMON = {
}); // end $.post()
} // end "if (that.validate())"
}; // end of function that handles the submission of the Editor
- that.buttonOptions[PMA_messages['strClose']] = function () {
+ that.buttonOptions[PMA_messages.strClose] = function () {
$(this).dialog("close");
};
/**
@@ -361,7 +361,7 @@ RTE.COMMON = {
* @var msg jQuery object containing the reference to
* the AJAX message shown to the user
*/
- var $msg = PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']);
+ var $msg = PMA_ajaxShowMessage(PMA_messages.strProcessingRequest);
$.get(url, {'is_js_confirmed': 1, 'ajax_request': true}, function (data) {
if (data.success === true) {
/**
@@ -430,7 +430,7 @@ RTE.EVENT = {
$elm = this.$ajaxDialog.find('input[name=item_interval_value]');
if ($elm.val() === '') {
$elm.focus();
- alert(PMA_messages['strFormEmpty']);
+ alert(PMA_messages.strFormEmpty);
return false;
}
} else {
@@ -438,7 +438,7 @@ RTE.EVENT = {
$elm = this.$ajaxDialog.find('input[name=item_execute_at]');
if ($elm.val() === '') {
$elm.focus();
- alert(PMA_messages['strFormEmpty']);
+ alert(PMA_messages.strFormEmpty);
return false;
}
}
@@ -516,7 +516,7 @@ RTE.ROUTINE = {
}
});
if (! isSuccess) {
- alert(PMA_messages['strFormEmpty']);
+ alert(PMA_messages.strFormEmpty);
return false;
}
this.$ajaxDialog.find('table.routine_params_table').last().find('tr').each(function () {
@@ -533,7 +533,7 @@ RTE.ROUTINE = {
}
});
if (! isSuccess) {
- alert(PMA_messages['strFormEmpty']);
+ alert(PMA_messages.strFormEmpty);
return false;
}
if (this.$ajaxDialog.find('select[name=item_type]').find(':selected').val() === 'FUNCTION') {
@@ -544,7 +544,7 @@ RTE.ROUTINE = {
if (($returntyp.val() === 'ENUM' || $returntyp.val() === 'SET' || $returntyp.val().substr(0, 3) === 'VAR')
&& $returnlen.val() === '') {
$returnlen.focus();
- alert(PMA_messages['strFormEmpty']);
+ alert(PMA_messages.strFormEmpty);
return false;
}
}
@@ -552,7 +552,7 @@ RTE.ROUTINE = {
// A function must contain a RETURN statement in its definition
if (this.$ajaxDialog.find('table.rte_table').find('textarea[name=item_definition]').val().toUpperCase().indexOf('RETURN') < 0) {
this.syntaxHiglighter.focus();
- alert(PMA_messages['MissingReturn']);
+ alert(PMA_messages.MissingReturn);
return false;
}
}
@@ -665,13 +665,13 @@ RTE.ROUTINE = {
if (data.dialog) {
// Define the function that is called when
// the user presses the "Go" button
- that.buttonOptions[PMA_messages['strGo']] = function () {
+ that.buttonOptions[PMA_messages.strGo] = function () {
/**
* @var data Form data to be sent in the AJAX request
*/
var data = $('form.rte_form').last().serialize();
$msg = PMA_ajaxShowMessage(
- PMA_messages['strProcessingRequest']
+ PMA_messages.strProcessingRequest
);
$.post('db_routines.php', data, function (data) {
if (data.success === true) {
@@ -684,7 +684,7 @@ RTE.ROUTINE = {
}
});
};
- that.buttonOptions[PMA_messages['strClose']] = function () {
+ that.buttonOptions[PMA_messages.strClose] = function () {
$(this).dialog("close");
};
/**