Update filter dialogue Javascript to use ES6.

This commit is contained in:
Murtuza Zabuawala
2018-04-06 10:38:04 +01:00
committed by Dave Page
parent a97e4c76e4
commit 78c3db6fc9
2 changed files with 351 additions and 354 deletions

View File

@@ -1,16 +1,14 @@
define([
'sources/gettext', 'sources/url_for', 'jquery', 'underscore', 'underscore.string',
'pgadmin.alertifyjs', 'sources/pgadmin', 'backbone',
'pgadmin.backgrid', 'pgadmin.backform', 'axios',
'sources/sqleditor/query_tool_actions',
'sources/sqleditor/filter_dialog_model',
//'pgadmin.browser.node.ui',
], function(
gettext, url_for, $, _, S, Alertify, pgAdmin, Backbone,
Backgrid, Backform, axios, queryToolActions, filterDialogModel
) {
import gettext from 'sources/gettext';
import url_for from 'sources/url_for';
import $ from 'jquery';
import Alertify from 'pgadmin.alertifyjs';
import pgAdmin from 'sources/pgadmin';
import Backform from 'pgadmin.backform';
import axios from 'axios';
import queryToolActions from 'sources/sqleditor/query_tool_actions';
import filterDialogModel from 'sources/sqleditor/filter_dialog_model';
let FilterDialog = {
let FilterDialog = {
'dialog': function(handler) {
let title = gettext('Sort/Filter options');
axios.get(
@@ -238,6 +236,6 @@ define([
Alertify.filterDialog(title).resizeTo('65%', '60%');
});
},
};
return FilterDialog;
});
};
module.exports = FilterDialog;

View File

@@ -1,11 +1,10 @@
define([
'sources/gettext', 'underscore', 'sources/pgadmin',
'pgadmin.backform', 'pgadmin.backgrid',
], function(
gettext, _, pgAdmin, Backform, Backgrid
) {
import gettext from 'sources/gettext';
import _ from 'underscore';
import pgAdmin from 'sources/pgadmin';
import Backgrid from 'pgadmin.backgrid';
import Backform from 'pgadmin.backform';
let initModel = function(response) {
let initModel = function(response) {
let order_mapping = {
'asc': gettext('ASC'),
@@ -127,7 +126,7 @@ define([
let model = new FilterCollectionModel();
return model;
};
};
return initModel;
});
module.exports = initModel;