diff --git a/web/pgadmin/browser/server_groups/servers/static/js/privilege.js b/web/pgadmin/browser/server_groups/servers/static/js/privilege.js index cb9f36526..ec2992d15 100644 --- a/web/pgadmin/browser/server_groups/servers/static/js/privilege.js +++ b/web/pgadmin/browser/server_groups/servers/static/js/privilege.js @@ -479,7 +479,7 @@ define(['sources/gettext', 'underscore', 'jquery', 'backbone', 'backform', * 3. Deselect and disable the checkbox for ALL with grant privilege. */ $allPrivileges.prop('checked', false); - $elGrant.prop('checked', false), + $elGrant.prop('checked', false); $allGrants.prop('checked', false); $elGrant.prop('disabled', true); $allGrants.prop('disabled', true); diff --git a/web/pgadmin/browser/static/js/datamodel.js b/web/pgadmin/browser/static/js/datamodel.js index 974eda6a4..4994fc809 100644 --- a/web/pgadmin/browser/static/js/datamodel.js +++ b/web/pgadmin/browser/static/js/datamodel.js @@ -162,7 +162,7 @@ define([ self.origSessAttrs = {}; self.objects = []; self.arrays = []; - self.attrName = options.attrName, + self.attrName = options.attrName; self.top = (options.top || self.collection && self.collection.top || self.collection || self); self.handler = options.handler || (self.collection && self.collection.handler); diff --git a/web/pgadmin/browser/static/js/node.js b/web/pgadmin/browser/static/js/node.js index 21a731d21..7828b30c0 100644 --- a/web/pgadmin/browser/static/js/node.js +++ b/web/pgadmin/browser/static/js/node.js @@ -631,7 +631,7 @@ define('pgadmin.browser.node', [ } } - x = (b.offsetWidth - w) / 2, + x = (b.offsetWidth - w) / 2; y = (b.offsetHeight - h) / 4; var p = pgBrowser.docker.addPanel( diff --git a/web/pgadmin/dashboard/static/js/dashboard.js b/web/pgadmin/dashboard/static/js/dashboard.js index 3e1446a49..275c36e1a 100644 --- a/web/pgadmin/dashboard/static/js/dashboard.js +++ b/web/pgadmin/dashboard/static/js/dashboard.js @@ -58,7 +58,7 @@ define('pgadmin.dashboard', [ if (e.keyCode == 32) { self.$el.click(); } - }), + }); this.delegateEvents(); return this; }, diff --git a/web/pgadmin/misc/file_manager/static/js/utility.js b/web/pgadmin/misc/file_manager/static/js/utility.js index 7f2a1cf41..329fdde80 100644 --- a/web/pgadmin/misc/file_manager/static/js/utility.js +++ b/web/pgadmin/misc/file_manager/static/js/utility.js @@ -841,7 +841,7 @@ define([ $this = $('.fileinfo').find( 'table#contents tbody tr.selected td.tbl_file' ); - orig_value = decodeURI($this.find('span.less_text').html()), + orig_value = decodeURI($this.find('span.less_text').html()); newvalue = orig_value.substring(0, orig_value.lastIndexOf('.')); if (orig_value.lastIndexOf('/') == orig_value.length - 1 || newvalue === '') { diff --git a/web/pgadmin/static/js/backgrid.pgadmin.js b/web/pgadmin/static/js/backgrid.pgadmin.js index 225870758..78e44ce70 100644 --- a/web/pgadmin/static/js/backgrid.pgadmin.js +++ b/web/pgadmin/static/js/backgrid.pgadmin.js @@ -147,7 +147,11 @@ define([ } // if descending order, swap left and right - if (order === 1) t = _l, _l = _r, _r = t; + if (order === 1) { + t = _l; + _l = _r; + _r = t; + } if (_l.eq(_r)) // If both are equals return 0; @@ -157,7 +161,11 @@ define([ return 1; } else { // if descending order, swap left and right - if (order === 1) t = l, l = r, r = t; + if (order === 1) { + t = l; + l = r; + r = t; + } // compare as usual if (l === r) return 0; diff --git a/web/pgadmin/static/js/pgadmin.js b/web/pgadmin/static/js/pgadmin.js index dc2c2f4c8..1786a8571 100644 --- a/web/pgadmin/static/js/pgadmin.js +++ b/web/pgadmin/static/js/pgadmin.js @@ -21,15 +21,21 @@ define([], function() { var n, l, m, c = (e.match(s) || [])[2], f = 'px' === c ? 1 : d[c + 'toPx'], u = /r?em/i; - if (f || u.test(c) && !p) t = f ? t : 'rem' === c ? i : 'fontSize' === r ? t.parentNode || t : t, f = f || parseFloat(a(t, 'fontSize')), m = parseFloat(e) * f; + if (f || u.test(c) && !p){ + t = f ? t : 'rem' === c ? i : 'fontSize' === r ? t.parentNode || t : t; + f = f || parseFloat(a(t, 'fontSize')); + m = parseFloat(e) * f; + } else { - n = t.style, l = n[r]; + n = t.style; + l = n[r]; try { n[r] = e; } catch (x) { return 0; } - m = n[r] ? parseFloat(a(t, r)) : 0, n[r] = l !== o ? l : null; + m = n[r] ? parseFloat(a(t, r)) : 0; + n[r] = l !== o ? l : null; } return m; } @@ -61,7 +67,7 @@ define([], function() { f = ['mm', 'cm', 'pt', 'pc', 'in', 'mozmm'], u = 6; for (i.appendChild(n), m && (n.style.marginTop = '1%', p = '1%' === m(n).marginTop); u--;) d[f[u] + 'toPx'] = c[u] ? c[u] * d.inToPx : r(n, '1' + f[u]); - i.removeChild(n), n = o, t.toPx = r; + i.removeChild(n); t.toPx = r; })(pgAdmin, window.document); // Reference: diff --git a/web/pgadmin/static/vendor/backgrid/backgrid.js b/web/pgadmin/static/vendor/backgrid/backgrid.js index 7a71354d8..3e80146ae 100644 --- a/web/pgadmin/static/vendor/backgrid/backgrid.js +++ b/web/pgadmin/static/vendor/backgrid/backgrid.js @@ -339,7 +339,7 @@ var PercentFormatter = Backgrid.PercentFormatter = function () { Backgrid.NumberFormatter.apply(this, arguments); }; -PercentFormatter.prototype = new Backgrid.NumberFormatter(), +PercentFormatter.prototype = new Backgrid.NumberFormatter(); _.extend(PercentFormatter.prototype, { @@ -2656,7 +2656,11 @@ var Body = Backgrid.Body = Backbone.View.extend({ var l = func(left, attr), r = func(right, attr), t; // if descending order, swap left and right - if (order === 1) t = l, l = r, r = t; + if (order === 1) { + t = l; + l = r; + r = t; + } // compare as usual if (l === r) return 0; diff --git a/web/pgadmin/tools/schema_diff/static/js/schema_diff_ui.js b/web/pgadmin/tools/schema_diff/static/js/schema_diff_ui.js index fcc1bf177..fc4d3cfff 100644 --- a/web/pgadmin/tools/schema_diff/static/js/schema_diff_ui.js +++ b/web/pgadmin/tools/schema_diff/static/js/schema_diff_ui.js @@ -33,7 +33,7 @@ export default class SchemaDiffUI { this.filters = ['Identical', 'Different', 'Source Only', 'Target Only']; this.sel_filters = ['Different', 'Source Only', 'Target Only']; this.dataView = null; - this.grid = null, + this.grid = null; this.selection = {}; this.model = new Backbone.Model({ diff --git a/web/regression/javascript/sqleditor/keyboard_shortcuts_spec.js b/web/regression/javascript/sqleditor/keyboard_shortcuts_spec.js index b64f9b6c0..c8415a089 100644 --- a/web/regression/javascript/sqleditor/keyboard_shortcuts_spec.js +++ b/web/regression/javascript/sqleditor/keyboard_shortcuts_spec.js @@ -567,19 +567,27 @@ describe('the keyboard shortcuts', () => { }); it('shortcut_title',()=>{ - shortcut.alt = true, shortcut.shift = false, shortcut.control = false; + shortcut.alt = true; + shortcut.shift = false; + shortcut.control = false; expect(keyboardShortcuts.shortcut_title( 'Title', shortcut)).toEqual(gettext('Title (Alt+A)')); - shortcut.alt = false, shortcut.shift = true, shortcut.control = false; + shortcut.alt = false; + shortcut.shift = true; + shortcut.control = false; expect(keyboardShortcuts.shortcut_title( 'Title', shortcut)).toEqual(gettext('Title (Shift+A)')); - shortcut.alt = false, shortcut.shift = false, shortcut.control = true; + shortcut.alt = false; + shortcut.shift = false; + shortcut.control = true; expect(keyboardShortcuts.shortcut_title( 'Title', shortcut)).toEqual(gettext('Title (Ctrl+A)')); - shortcut.alt = true, shortcut.shift = true, shortcut.control = true; + shortcut.alt = true; + shortcut.shift = true; + shortcut.control = true; expect(keyboardShortcuts.shortcut_title( 'Title', shortcut)).toEqual(gettext('Title (Alt+Shift+Ctrl+A)')); });