Fixing the javascript file after running pga_eslint.js script

This commit is contained in:
Ashesh Vashi
2018-01-17 13:24:25 +05:30
parent 4d8b7556f8
commit 404f1cc8ef
5 changed files with 64 additions and 64 deletions

View File

@@ -1,6 +1,6 @@
define('app', [ define('app', [
'babel-polyfill', 'sources/pgadmin', 'bundled_browser', 'pgadmin.datagrid' 'babel-polyfill', 'sources/pgadmin', 'bundled_browser', 'pgadmin.datagrid',
], function() { ], function(babelPolyFill, pgAdmin) {
var initializeModules = function(Object) { var initializeModules = function(Object) {
for (var key in Object) { for (var key in Object) {
var module = Object[key]; var module = Object[key];
@@ -11,7 +11,7 @@ define('app', [
module.Init(); module.Init();
} }
} }
} };
// Initialize modules registered to pgAdmin, pgAdmin.Browser and Tools object. // Initialize modules registered to pgAdmin, pgAdmin.Browser and Tools object.
initializeModules(pgAdmin); initializeModules(pgAdmin);

View File

@@ -1,5 +1,5 @@
define('bundled_browser',[ define('bundled_browser',[
'pgadmin.browser' 'pgadmin.browser',
], function(pgBrowser) { ], function(pgBrowser) {
pgBrowser.init(); pgBrowser.init();
}); });

View File

@@ -13,7 +13,7 @@ import 'codemirror/addon/search/searchcursor';
import 'codemirror/addon/search/jump-to-line'; import 'codemirror/addon/search/jump-to-line';
import 'codemirror/addon/edit/matchbrackets'; import 'codemirror/addon/edit/matchbrackets';
import 'codemirror/addon/edit/closebrackets'; import 'codemirror/addon/edit/closebrackets';
import 'codemirror/addon/comment/comment' import 'codemirror/addon/comment/comment';
import '../js/codemirror/addon/fold/pgadmin-sqlfoldcode'; import '../js/codemirror/addon/fold/pgadmin-sqlfoldcode';
export default CodeMirror; export default CodeMirror;

View File

@@ -136,8 +136,8 @@ define(['jquery', 'sources/gettext'],
// We come here means we did not receive expected response // We come here means we did not receive expected response
// from server, we need to error out // from server, we need to error out
sqlEditorUtils.previousStatus = -99; sqlEditorUtils.previousStatus = -99;
msg = gettext("An unexpected error occurred - " + msg = gettext('An unexpected error occurred - ' +
"ensure you are logged into the application."); 'ensure you are logged into the application.');
$el.attr('data-content', msg); $el.attr('data-content', msg);
if(!$status_el.hasClass('fa-query-tool-disconnected')) { if(!$status_el.hasClass('fa-query-tool-disconnected')) {
$el.popover('hide'); $el.popover('hide');
@@ -148,10 +148,10 @@ define(['jquery', 'sources/gettext'],
}, },
error: function (e) { error: function (e) {
sqlEditorUtils.previousStatus = -1; sqlEditorUtils.previousStatus = -1;
var msg = gettext("Transaction status check failed."); var msg = gettext('Transaction status check failed.');
if (e.readyState == 0) { if (e.readyState == 0) {
msg = gettext("Not connected to the server or the connection to " + msg = gettext('Not connected to the server or the connection to ' +
"the server has been closed."); 'the server has been closed.');
} else if (e.responseJSON && e.responseJSON.errormsg) { } else if (e.responseJSON && e.responseJSON.errormsg) {
msg = e.responseJSON.errormsg; msg = e.responseJSON.errormsg;
} }
@@ -164,14 +164,14 @@ define(['jquery', 'sources/gettext'],
$status_el.removeClass() $status_el.removeClass()
.addClass('fa-custom fa-query-tool-disconnected'); .addClass('fa-custom fa-query-tool-disconnected');
} }
} },
}); });
}, },
// This function will update the connection status // This function will update the connection status
updateConnectionStatus: function(url, poll_time) { updateConnectionStatus: function(url, poll_time) {
var $el = $(".connection_status"), var $el = $('.connection_status'),
$status_el = $($($el).find(".fa-custom")); $status_el = $($($el).find('.fa-custom'));
// Apply popover on element // Apply popover on element
$el.popover(); $el.popover();
@@ -188,7 +188,7 @@ define(['jquery', 'sources/gettext'],
// Updates the flag for connection status poll // Updates the flag for connection status poll
updateConnectionStatusFlag: function(status) { updateConnectionStatusFlag: function(status) {
var $el = $(".connection_status"); var $el = $('.connection_status');
if ($el.data('panel-visible') != status) { if ($el.data('panel-visible') != status) {
$el.data('panel-visible', status); $el.data('panel-visible', status);
} }

View File

@@ -298,7 +298,7 @@ define('tools.querytool', [
transId = self.handler.transId; transId = self.handler.transId;
// If transaction id is already set // If transaction id is already set
if($container.data('trans-id') != transId) { if($container.data('trans-id') != transId) {
$container.data('trans-id', transId) $container.data('trans-id', transId);
} }
if (!$container.hasClass('wcPanelTabContentHidden')) { if (!$container.hasClass('wcPanelTabContentHidden')) {