mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Update jQuery to 3.3.1. Fixes #3271
Patch by Aditya, with test enhancements from Anthony and Joao at Pivotal.
This commit is contained in:
committed by
Dave Page
parent
61d8072a8c
commit
9f13865777
@@ -96,7 +96,7 @@ define([
|
||||
if (contentType) {
|
||||
try {
|
||||
if (contentType.indexOf('application/json') == 0) {
|
||||
var resp = $.parseJSON(msg);
|
||||
var resp = JSON.parse(msg);
|
||||
|
||||
if (resp.result != null && (!resp.errormsg || resp.errormsg == '') &&
|
||||
onJSONResult && typeof(onJSONResult) == 'function') {
|
||||
@@ -253,7 +253,7 @@ define([
|
||||
var contentType = xhr.getResponseHeader('Content-Type'),
|
||||
jsonResp = contentType &&
|
||||
contentType.indexOf('application/json') == 0 &&
|
||||
$.parseJSON(xhr.responseText);
|
||||
JSON.parse(xhr.responseText);
|
||||
|
||||
if (
|
||||
jsonResp && (
|
||||
|
||||
@@ -1081,7 +1081,7 @@ define([
|
||||
|
||||
// Add button callback
|
||||
if (!(data.disabled || data.canAdd == false)) {
|
||||
$dialog.find('button.add').first().click(function(e) {
|
||||
$dialog.find('button.add').first().on('click',(e) => {
|
||||
e.preventDefault();
|
||||
var canAddRow = _.isFunction(data.canAddRow) ?
|
||||
data.canAddRow.apply(self, [self.model]) : true;
|
||||
@@ -1361,7 +1361,7 @@ define([
|
||||
var $dialog = gridBody.append(subNodeGrid);
|
||||
|
||||
// Add button callback
|
||||
$dialog.find('button.add').click(function(e) {
|
||||
$dialog.find('button.add').on('click',(e) => {
|
||||
e.preventDefault();
|
||||
var canAddRow = _.isFunction(data.canAddRow) ?
|
||||
data.canAddRow.apply(self, [self.model]) : true;
|
||||
@@ -1379,7 +1379,7 @@ define([
|
||||
grid.insertRow({});
|
||||
|
||||
var newRow = $(grid.body.rows[collection.length - 1].$el);
|
||||
newRow.attr('class', 'new').click(function() {
|
||||
newRow.attr('class', 'new').on('click',() => {
|
||||
$(this).attr('class', 'editable');
|
||||
});
|
||||
$(newRow).pgMakeVisible('backform-tab');
|
||||
@@ -2367,7 +2367,7 @@ define([
|
||||
if (widget) {
|
||||
setTimeout(function() {
|
||||
picker.toggle();
|
||||
self.$el.find('input').first().blur();
|
||||
self.$el.find('input').first().trigger('blur');
|
||||
}, 10);
|
||||
} else {
|
||||
setTimeout(function() {
|
||||
@@ -2380,7 +2380,7 @@ define([
|
||||
// blur the input
|
||||
setTimeout(
|
||||
function() {
|
||||
self.$el.find('input').first().blur();
|
||||
self.$el.find('input').first().trigger('blur');
|
||||
}, 10
|
||||
);
|
||||
}
|
||||
@@ -2390,7 +2390,7 @@ define([
|
||||
var picker = this;
|
||||
setTimeout(function() {
|
||||
picker.toggle();
|
||||
self.$el.find('input').first().blur();
|
||||
self.$el.find('input').first().trigger('blur');
|
||||
}, 10);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -348,7 +348,7 @@ define([
|
||||
this.$el.html('<i class=\'fa fa-pencil-square-o\' title=\'' + _('Edit row') + '\'></i>');
|
||||
this.delegateEvents();
|
||||
if (this.grabFocus)
|
||||
this.$el.focus();
|
||||
this.$el.trigger('focus');
|
||||
return this;
|
||||
},
|
||||
exitEditMode: function() {
|
||||
@@ -465,7 +465,7 @@ define([
|
||||
|
||||
enterEditMode: function() {
|
||||
this.$el.addClass('editor');
|
||||
$(this.$el.find('input')).focus();
|
||||
$(this.$el.find('input')).trigger('focus');
|
||||
},
|
||||
|
||||
exitEditMode: function() {
|
||||
@@ -537,7 +537,7 @@ define([
|
||||
});
|
||||
self.model.trigger('backgrid:edited', self.model,
|
||||
self.column, command);
|
||||
gotoCell.focus();
|
||||
gotoCell.trigger('focus');
|
||||
}
|
||||
}, 20);
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ function keyboardShortcutsDebugger($el, event, user_defined_shortcuts) {
|
||||
if(panel_content.length) {
|
||||
$input = $(panel_content).find('td.editable:first');
|
||||
if($input.length)
|
||||
$input.click();
|
||||
$input.trigger('click');
|
||||
}
|
||||
} else if(this.validateShortcutKeys(next_panel_keys, event)) {
|
||||
this._stopEventPropagation(event);
|
||||
|
||||
Reference in New Issue
Block a user