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
diff options
context:
space:
mode:
authorAtul Pratap Singh <atulpratapsingh05@gmail.com>2014-10-01 08:30:54 +0400
committerAtul Pratap Singh <atulpratapsingh05@gmail.com>2014-10-01 08:30:54 +0400
commita020eac11a26977295cf2439ddd2e5b4af2c88fe (patch)
treea25ad8d5dbfdc66f96321930dab50de9fe242e3b /js/gis_data_editor.js
parentdbdd90511bcb24fefcf2b88f12bd342d4abef9b2 (diff)
Add js checks in multiple files if data is undefined
Signed-off-by: Atul Pratap Singh <atulpratapsingh05@gmail.com>
Diffstat (limited to 'js/gis_data_editor.js')
-rw-r--r--js/gis_data_editor.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/gis_data_editor.js b/js/gis_data_editor.js
index e8860242df..2074b57f49 100644
--- a/js/gis_data_editor.js
+++ b/js/gis_data_editor.js
@@ -147,7 +147,7 @@ function loadGISEditor(value, field, type, input_name, token) {
'token' : token,
'ajax_request': true
}, function (data) {
- if (data.success === true) {
+ if (typeof data !== 'undefined' && data.success === true) {
$gis_editor.html(data.gis_editor);
initGISEditorVisualization();
prepareJSVersion();
@@ -197,7 +197,7 @@ function insertDataAndClose() {
var input_name = $form.find("input[name='input_name']").val();
$.post('gis_data_editor.php', $form.serialize() + "&generate=true&ajax_request=true", function (data) {
- if (data.success === true) {
+ if (typeof data !== 'undefined' && data.success === true) {
$("input[name='" + input_name + "']").val(data.result);
} else {
PMA_ajaxShowMessage(data.error, false);
@@ -248,7 +248,7 @@ AJAX.registerOnload('gis_data_editor.js', function () {
$('#gis_editor').find("input[type='text']").live('change', function () {
var $form = $('form#gis_data_editor_form');
$.post('gis_data_editor.php', $form.serialize() + "&generate=true&ajax_request=true", function (data) {
- if (data.success === true) {
+ if (typeof data !== 'undefined' && data.success === true) {
$('#gis_data_textarea').val(data.result);
$('#placeholder').empty().removeClass('hasSVG').html(data.visualization);
$('#openlayersmap').empty();
@@ -269,7 +269,7 @@ AJAX.registerOnload('gis_data_editor.js', function () {
var $form = $('form#gis_data_editor_form');
$.post('gis_data_editor.php', $form.serialize() + "&get_gis_editor=true&ajax_request=true", function (data) {
- if (data.success === true) {
+ if (typeof data !== 'undefined' && data.success === true) {
$gis_editor.html(data.gis_editor);
initGISEditorVisualization();
prepareJSVersion();