mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-25 18:20:20 -06:00
More jQuery 3 updates.
This commit is contained in:
parent
d1784137a5
commit
3b862bd70b
@ -230,7 +230,7 @@ define([
|
||||
finishWizard: function() {
|
||||
this.onFinish();
|
||||
this.remove(); // Remove view from DOM
|
||||
this.unbind(); // Unbind all local event bindings
|
||||
this.off(); // Unbind all local event bindings
|
||||
delete this.$el; // Delete the jQuery wrapped object variable
|
||||
delete this.el; // Delete the variable reference to this node
|
||||
return true;
|
||||
|
@ -1355,7 +1355,7 @@ define([
|
||||
|
||||
self.data_cap = cap;
|
||||
|
||||
$('.storage_dialog #uploader .input-path').keyup(function(e) {
|
||||
$('.storage_dialog #uploader .input-path').on('keyup',function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
e.stopPropagation();
|
||||
var path = $(this).val();
|
||||
@ -1567,7 +1567,7 @@ define([
|
||||
$file_element.find('p input').toggle().val(lg.new_folder).select();
|
||||
|
||||
// rename folder/file on pressing enter key
|
||||
$('.file_manager').bind().on('keyup', function(e) {
|
||||
$('.file_manager').on('keyup', function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
e.stopPropagation();
|
||||
$file_element.find('p input').trigger('blur');
|
||||
@ -1608,7 +1608,7 @@ define([
|
||||
$file_element_list.find('p input').toggle().val(lg.new_folder).select();
|
||||
|
||||
// rename folder/file on pressing enter key
|
||||
$('.file_manager').bind().on('keyup', function(e) {
|
||||
$('.file_manager').on('keyup', function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
e.stopPropagation();
|
||||
$file_element_list.find('p input').trigger('blur');
|
||||
|
@ -36,7 +36,7 @@ define('pgadmin.settings', [
|
||||
})
|
||||
.done(function() {
|
||||
// Prevent saving layout on server for next page reload.
|
||||
$(window).unbind('unload');
|
||||
$(window).off('unload');
|
||||
window.onbeforeunload = null;
|
||||
// Now reload page
|
||||
location.reload(true);
|
||||
|
@ -247,7 +247,7 @@ function keyboardShortcutsQueryTool(
|
||||
isDivider = false;
|
||||
}
|
||||
}
|
||||
currLi.find('a:first').focus();
|
||||
currLi.find('a:first').trigger('focus');
|
||||
}
|
||||
} else if(keyCode === LEFT_KEY || keyCode === RIGHT_KEY) {
|
||||
/*Apply only for dropdown*/
|
||||
@ -269,7 +269,7 @@ function keyboardShortcutsQueryTool(
|
||||
currLi = currLiMenu.closest('.dropdown-submenu');
|
||||
}
|
||||
}
|
||||
currLi.find('a:first').focus();
|
||||
currLi.find('a:first').trigger('focus');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ define([
|
||||
grid.registerPlugin(_selector);
|
||||
_selector.onCellRangeSelected.subscribe(handleCellRangeSelected);
|
||||
_selector.onBeforeCellRangeSelected.subscribe(handleBeforeCellRangeSelected);
|
||||
$(window.parent).mouseup(handleWindowMouseUp);
|
||||
$(window.parent).on('mouseup',handleWindowMouseUp);
|
||||
}
|
||||
|
||||
function destroy() {
|
||||
|
@ -138,10 +138,10 @@
|
||||
|
||||
$buttons.find('button:first').on('click', this.save);
|
||||
$buttons.find('button:last').on('click', this.cancel);
|
||||
$input.bind('keydown', this.handleKeyDown);
|
||||
$input.on('keydown', this.handleKeyDown);
|
||||
|
||||
scope.position(args.position);
|
||||
$input.focus().select();
|
||||
$input.trigger('focus').trigger('select');
|
||||
};
|
||||
|
||||
this.handleKeyDown = function(e) {
|
||||
@ -188,7 +188,7 @@
|
||||
};
|
||||
|
||||
this.focus = function() {
|
||||
$input.focus();
|
||||
$input.trigger('focus');
|
||||
};
|
||||
|
||||
// When text editor opens
|
||||
@ -210,11 +210,11 @@
|
||||
$input.val(defaultValue = '\\"\\"');
|
||||
} else {
|
||||
$input.val(defaultValue = item[args.column.field]);
|
||||
$input.select();
|
||||
$input.trigger('select');
|
||||
}
|
||||
} else {
|
||||
$input.val(defaultValue = item[args.column.field]);
|
||||
$input.select();
|
||||
$input.trigger('select');
|
||||
}
|
||||
};
|
||||
|
||||
@ -295,10 +295,10 @@
|
||||
|
||||
$buttons.find('button:first').on('click', this.save);
|
||||
$buttons.find('button:last').on('click', this.cancel);
|
||||
$input.bind('keydown', this.handleKeyDown);
|
||||
$input.on('keydown', this.handleKeyDown);
|
||||
|
||||
scope.position(args.position);
|
||||
$input.focus().select();
|
||||
$input.trigger('focus').trigger('select');
|
||||
};
|
||||
|
||||
this.handleKeyDown = function(e) {
|
||||
@ -345,7 +345,7 @@
|
||||
};
|
||||
|
||||
this.focus = function() {
|
||||
$input.focus();
|
||||
$input.trigger('focus');
|
||||
};
|
||||
|
||||
this.loadValue = function(item) {
|
||||
@ -364,7 +364,7 @@
|
||||
data = '[' + temp.join() + ']';
|
||||
}
|
||||
$input.val(data);
|
||||
$input.select();
|
||||
$input.trigger('select');
|
||||
};
|
||||
|
||||
this.serializeValue = function() {
|
||||
@ -417,10 +417,10 @@
|
||||
$buttons = getButtons(false).appendTo($wrapper);
|
||||
|
||||
$buttons.find('button:first').on('click', this.cancel);
|
||||
$input.bind('keydown', this.handleKeyDown);
|
||||
$input.on('keydown', this.handleKeyDown);
|
||||
|
||||
scope.position(args.position);
|
||||
$input.focus().select();
|
||||
$input.trigger('focus').trigger('select');
|
||||
};
|
||||
|
||||
this.handleKeyDown = function(e) {
|
||||
@ -465,12 +465,12 @@
|
||||
};
|
||||
|
||||
this.focus = function() {
|
||||
$input.focus();
|
||||
$input.trigger('focus');
|
||||
};
|
||||
|
||||
this.loadValue = function(item) {
|
||||
$input.val(defaultValue = item[args.column.field]);
|
||||
$input.select();
|
||||
$input.trigger('select');
|
||||
};
|
||||
|
||||
this.serializeValue = function() {
|
||||
@ -516,10 +516,10 @@
|
||||
$buttons = getButtons(false).appendTo($wrapper);
|
||||
|
||||
$buttons.find('button:first').on('click', this.cancel);
|
||||
$input.bind('keydown', this.handleKeyDown);
|
||||
$input.on('keydown', this.handleKeyDown);
|
||||
|
||||
scope.position(args.position);
|
||||
$input.focus().select();
|
||||
$input.trigger('focus').trigger('select');
|
||||
};
|
||||
|
||||
this.handleKeyDown = function(e) {
|
||||
@ -564,7 +564,7 @@
|
||||
};
|
||||
|
||||
this.focus = function() {
|
||||
$input.focus();
|
||||
$input.trigger('focus');
|
||||
};
|
||||
|
||||
this.loadValue = function(item) {
|
||||
@ -583,7 +583,7 @@
|
||||
data = '[' + temp.join() + ']';
|
||||
}
|
||||
$input.val(data);
|
||||
$input.select();
|
||||
$input.trigger('select');
|
||||
};
|
||||
|
||||
this.serializeValue = function() {
|
||||
@ -622,13 +622,13 @@
|
||||
this.init = function() {
|
||||
$input = $('<INPUT type=text class=\'editor-text\' readonly/>')
|
||||
.appendTo(args.container)
|
||||
.bind('keydown.nav', function(e) {
|
||||
.on('keydown.nav', function(e) {
|
||||
if (e.keyCode === $.ui.keyCode.LEFT || e.keyCode === $.ui.keyCode.RIGHT) {
|
||||
e.stopImmediatePropagation();
|
||||
}
|
||||
})
|
||||
.focus()
|
||||
.select();
|
||||
.trigger('focus')
|
||||
.trigger('select');
|
||||
};
|
||||
|
||||
this.destroy = function() {
|
||||
@ -636,7 +636,7 @@
|
||||
};
|
||||
|
||||
this.focus = function() {
|
||||
$input.focus();
|
||||
$input.trigger('focus');
|
||||
};
|
||||
|
||||
this.getValue = function() {
|
||||
@ -653,7 +653,7 @@
|
||||
defaultValue = value;
|
||||
$input.val(defaultValue);
|
||||
$input[0].defaultValue = defaultValue;
|
||||
$input.select();
|
||||
$input.trigger('select');
|
||||
};
|
||||
|
||||
this.serializeValue = function() {
|
||||
@ -692,7 +692,7 @@
|
||||
this.init = function() {
|
||||
$select = $('<INPUT type=checkbox value=\'true\' class=\'editor-checkbox\' hideFocus disabled>');
|
||||
$select.appendTo(args.container);
|
||||
$select.focus();
|
||||
$select.trigger('focus');
|
||||
};
|
||||
|
||||
this.destroy = function() {
|
||||
@ -700,7 +700,7 @@
|
||||
};
|
||||
|
||||
this.focus = function() {
|
||||
$select.focus();
|
||||
$select.trigger('focus');
|
||||
};
|
||||
|
||||
this.loadValue = function(item) {
|
||||
@ -755,14 +755,14 @@
|
||||
this.init = function() {
|
||||
$input = $('<INPUT type=text class=\'editor-text\' />');
|
||||
|
||||
$input.bind('keydown.nav', function(e) {
|
||||
$input.on('keydown.nav', function(e) {
|
||||
if (e.keyCode === $.ui.keyCode.LEFT || e.keyCode === $.ui.keyCode.RIGHT) {
|
||||
e.stopImmediatePropagation();
|
||||
}
|
||||
});
|
||||
|
||||
$input.appendTo(args.container);
|
||||
$input.focus().select();
|
||||
$input.trigger('focus').trigger('select');
|
||||
};
|
||||
|
||||
this.destroy = function() {
|
||||
@ -770,7 +770,7 @@
|
||||
};
|
||||
|
||||
this.focus = function() {
|
||||
$input.focus();
|
||||
$input.trigger('focus');
|
||||
};
|
||||
|
||||
this.loadValue = function(item) {
|
||||
@ -783,7 +783,7 @@
|
||||
}
|
||||
|
||||
$input[0].defaultValue = defaultValue;
|
||||
$input.select();
|
||||
$input.trigger('select');
|
||||
};
|
||||
|
||||
this.serializeValue = function() {
|
||||
@ -888,10 +888,10 @@
|
||||
this.init = function() {
|
||||
$select = $('<div class=\'multi-checkbox\'><span class=\'check\' hideFocus></span></div>');
|
||||
$select.appendTo(args.container);
|
||||
$select.focus();
|
||||
$select.trigger('focus');
|
||||
|
||||
// The following code is taken from https://css-tricks.com/indeterminate-checkboxes/
|
||||
$select.bind('click', function() {
|
||||
$select.on('click', function() {
|
||||
el = $(this);
|
||||
var states = ['unchecked', 'partial', 'checked'];
|
||||
var curState = el.find('.check').data('state');
|
||||
@ -908,7 +908,7 @@
|
||||
};
|
||||
|
||||
this.focus = function() {
|
||||
$select.focus();
|
||||
$select.trigger('focus');
|
||||
};
|
||||
|
||||
this.loadValue = function(item) {
|
||||
|
Loading…
Reference in New Issue
Block a user