|
1 | 1 | import $ from 'jquery'; |
2 | 2 | import { AJAX } from '../modules/ajax.ts'; |
3 | | -import { Functions } from '../modules/functions.ts'; |
| 3 | +import { addDatepicker, getSqlEditor, slidingMessage } from '../modules/functions.ts'; |
4 | 4 | import { Navigation } from '../modules/navigation.ts'; |
5 | 5 | import { ajaxRemoveMessage, ajaxShowMessage } from '../modules/ajax-message.ts'; |
6 | 6 | import getJsConfirmCommonParam from '../modules/functions/getJsConfirmCommonParam.ts'; |
@@ -160,7 +160,7 @@ const DatabaseRoutines = { |
160 | 160 | * to the Export textarea. |
161 | 161 | */ |
162 | 162 | var $elm = $ajaxDialog.find('textarea'); |
163 | | - Functions.getSqlEditor($elm); |
| 163 | + getSqlEditor($elm); |
164 | 164 | } // end showExport() |
165 | 165 | }, // end exportDialog() |
166 | 166 | editorDialog: function (isNew, $this) { |
@@ -235,7 +235,7 @@ const DatabaseRoutines = { |
235 | 235 |
|
236 | 236 | // Item created successfully |
237 | 237 | ajaxRemoveMessage($msg); |
238 | | - Functions.slidingMessage(data.message); |
| 238 | + slidingMessage(data.message); |
239 | 239 | that.$ajaxDialog.dialog('close'); |
240 | 240 |
|
241 | 241 | var tableId = '#' + data.tableType + 'Table'; |
@@ -366,11 +366,11 @@ const DatabaseRoutines = { |
366 | 366 |
|
367 | 367 | $(this).find('input[name=item_name]').trigger('focus'); |
368 | 368 | $(this).find('input.datefield').each(function () { |
369 | | - Functions.addDatepicker($(this).css('width', '95%'), 'date'); |
| 369 | + addDatepicker($(this).css('width', '95%'), 'date'); |
370 | 370 | }); |
371 | 371 |
|
372 | 372 | $(this).find('input.datetimefield').each(function () { |
373 | | - Functions.addDatepicker($(this).css('width', '95%'), 'datetime'); |
| 373 | + addDatepicker($(this).css('width', '95%'), 'datetime'); |
374 | 374 | }); |
375 | 375 |
|
376 | 376 | // @ts-ignore |
@@ -399,7 +399,7 @@ const DatabaseRoutines = { |
399 | 399 | var linterOptions = { |
400 | 400 | editorType: 'routine', |
401 | 401 | }; |
402 | | - that.syntaxHiglighter = Functions.getSqlEditor($elm, {}, 'vertical', linterOptions); |
| 402 | + that.syntaxHiglighter = getSqlEditor($elm, {}, 'vertical', linterOptions); |
403 | 403 | window.codeMirrorEditor = that.syntaxHiglighter; |
404 | 404 | // Execute item-specific code |
405 | 405 | that.postDialogShow(data); |
@@ -475,7 +475,7 @@ const DatabaseRoutines = { |
475 | 475 | // Get rid of the "Loading" message |
476 | 476 | ajaxRemoveMessage($msg); |
477 | 477 | // Show the query that we just executed |
478 | | - Functions.slidingMessage(data.sql_query); |
| 478 | + slidingMessage(data.sql_query); |
479 | 479 | Navigation.reload(); |
480 | 480 | }); // end $.post() |
481 | 481 | }); |
@@ -847,7 +847,7 @@ const DatabaseRoutines = { |
847 | 847 | // we just show the results of the query |
848 | 848 | if (! data.dialog) { |
849 | 849 | // Routine executed successfully |
850 | | - Functions.slidingMessage(data.message); |
| 850 | + slidingMessage(data.message); |
851 | 851 |
|
852 | 852 | return; |
853 | 853 | } |
@@ -878,7 +878,7 @@ const DatabaseRoutines = { |
878 | 878 | if (data.success === true) { |
879 | 879 | // Routine executed successfully |
880 | 880 | ajaxRemoveMessage($msg); |
881 | | - Functions.slidingMessage(data.message); |
| 881 | + slidingMessage(data.message); |
882 | 882 | $ajaxDialog.dialog('close'); |
883 | 883 | } else { |
884 | 884 | ajaxShowMessage(data.error, false); |
@@ -912,7 +912,7 @@ const DatabaseRoutines = { |
912 | 912 | * Attach the datepickers to the relevant form fields |
913 | 913 | */ |
914 | 914 | $ajaxDialog.find('input.datefield, input.datetimefield').each(function () { |
915 | | - Functions.addDatepicker($(this).css('width', '95%')); |
| 915 | + addDatepicker($(this).css('width', '95%')); |
916 | 916 | }); |
917 | 917 |
|
918 | 918 | /* |
@@ -942,7 +942,7 @@ const DatabaseRoutines = { |
942 | 942 |
|
943 | 943 | // Routine executed successfully |
944 | 944 | ajaxRemoveMessage($msg); |
945 | | - Functions.slidingMessage(data.message); |
| 945 | + slidingMessage(data.message); |
946 | 946 | $('form.rte_form').off('keyup'); |
947 | 947 | $ajaxDialog.remove(); |
948 | 948 | }); |
|
0 commit comments