@@ -5,7 +5,6 @@ import { CommonParams } from './common.js';
55import tooltip from './tooltip.js' ;
66import highlightSql from './sql-highlight.js' ;
77import { ajaxRemoveMessage , ajaxShowMessage } from './ajax-message.js' ;
8- import handleCreateViewModal from './functions/handleCreateViewModal.js' ;
98import { escapeHtml } from './functions/escape.js' ;
109import getImageTag from './functions/getImageTag.js' ;
1110import handleRedirectAndReload from './functions/handleRedirectAndReload.js' ;
@@ -3222,17 +3221,7 @@ Functions.getAutoSubmitEventHandler = function () {
32223221 } ;
32233222} ;
32243223
3225- /**
3226- * @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
3227- */
3228- const PrintPage = {
3229- handleEvent : ( ) => {
3230- window . print ( ) ;
3231- }
3232- } ;
3233-
32343224Functions . teardownCreateView = ( ) => {
3235- $ ( document ) . off ( 'click' , 'a.create_view.ajax' ) ;
32363225 $ ( document ) . off ( 'keydown' , '#createViewModal input, #createViewModal select' ) ;
32373226 $ ( document ) . off ( 'change' , '#fkc_checkbox' ) ;
32383227} ;
@@ -3249,13 +3238,6 @@ Functions.onloadCreateView = function () {
32493238 sessionStorage . clear ( ) ;
32503239 return false ;
32513240 } ) ;
3252- /**
3253- * Ajaxification for the "Create View" action
3254- */
3255- $ ( document ) . on ( 'click' , 'a.create_view.ajax' , function ( e ) {
3256- e . preventDefault ( ) ;
3257- handleCreateViewModal ( $ ( this ) ) ;
3258- } ) ;
32593241 /**
32603242 * Attach Ajax event handlers for input fields in the editor
32613243 * and used to submit the Ajax request when the ENTER key is pressed.
@@ -3582,79 +3564,4 @@ Functions.getPostData = function () {
35823564} ;
35833565$ . fn . getPostData = Functions . getPostData ;
35843566
3585- /**
3586- * @return {function }
3587- */
3588- Functions . off = function ( ) {
3589- return function ( ) {
3590- Functions . teardownIdleEvent ( ) ;
3591- $ ( document ) . off ( 'click' , 'input:checkbox.checkall' ) ;
3592- Functions . teardownSqlQueryEditEvents ( ) ;
3593- Functions . removeAutocompleteInfo ( ) ;
3594- Functions . teardownCreateTableEvents ( ) ;
3595- Functions . teardownEnumSetEditorMessage ( ) ;
3596- Functions . teardownEnumSetEditor ( ) ;
3597- $ ( document ) . off ( 'click' , '#index_frm input[type=submit]' ) ;
3598- $ ( 'div.toggle-container' ) . off ( 'click' ) ;
3599- $ ( document ) . off ( 'change' , 'select.pageselector' ) ;
3600- Functions . teardownRecentFavoriteTables ( ) ;
3601- Functions . teardownCodeMirrorEditor ( ) ;
3602- $ ( document ) . off ( 'change' , '.autosubmit' ) ;
3603- document . querySelectorAll ( '.jsPrintButton' ) . forEach ( item => {
3604- item . removeEventListener ( 'click' , PrintPage ) ;
3605- } ) ;
3606- Functions . teardownCreateView ( ) ;
3607- $ ( document ) . off ( 'keydown' , 'form input, form textarea, form select' ) ;
3608- $ ( document ) . off ( 'change' , 'input[type=radio][name="pw_hash"]' ) ;
3609- Functions . teardownSortLinkMouseEvent ( ) ;
3610- } ;
3611- } ;
3612-
3613- /**
3614- * @return {function }
3615- */
3616- Functions . on = function ( ) {
3617- return function ( ) {
3618- Functions . onloadIdleEvent ( ) ;
3619- $ ( document ) . on ( 'click' , 'input:checkbox.checkall' , Functions . getCheckAllCheckboxEventHandler ( ) ) ;
3620- Functions . addDateTimePicker ( ) ;
3621-
3622- /**
3623- * Add attribute to text boxes for iOS devices (based on bugID: 3508912)
3624- */
3625- if ( navigator . userAgent . match ( / ( i p h o n e | i p o d | i p a d ) / i) ) {
3626- $ ( 'input[type=text]' ) . attr ( 'autocapitalize' , 'off' ) . attr ( 'autocorrect' , 'off' ) ;
3627- }
3628-
3629- Functions . onloadSqlQueryEditEvents ( ) ;
3630- Functions . onloadCreateTableEvents ( ) ;
3631- Functions . onloadChangePasswordEvents ( ) ;
3632- Functions . onloadEnumSetEditorMessage ( ) ;
3633- Functions . onloadEnumSetEditor ( ) ;
3634- $ ( document ) . on ( 'click' , '#index_frm input[type=submit]' , Functions . getAddIndexEventHandler ( ) ) ;
3635- Functions . showHints ( ) ;
3636- Functions . initializeToggleButtons ( ) ;
3637- $ ( document ) . on ( 'change' , 'select.pageselector' , Functions . getPageSelectorEventHandler ( ) ) ;
3638- Functions . onloadRecentFavoriteTables ( ) ;
3639- Functions . onloadCodeMirrorEditor ( ) ;
3640- Functions . onloadLockPage ( ) ;
3641- $ ( document ) . on ( 'change' , '.autosubmit' , Functions . getAutoSubmitEventHandler ( ) ) ;
3642- document . querySelectorAll ( '.jsPrintButton' ) . forEach ( item => {
3643- item . addEventListener ( 'click' , PrintPage ) ;
3644- } ) ;
3645- Functions . onloadCreateView ( ) ;
3646- $ ( document ) . on ( 'change' , checkboxesSel , Functions . checkboxesChanged ) ;
3647- $ ( document ) . on ( 'change' , 'input.checkall_box' , Functions . getCheckAllBoxEventHandler ( ) ) ;
3648- $ ( document ) . on ( 'click' , '.checkall-filter' , Functions . getCheckAllFilterEventHandler ( ) ) ;
3649- $ ( document ) . on ( 'change' , checkboxesSel + ', input.checkall_box:checkbox:enabled' , Functions . subCheckboxesChanged ) ;
3650- $ ( document ) . on ( 'change' , 'input.sub_checkall_box' , Functions . getSubCheckAllBoxEventHandler ( ) ) ;
3651- $ ( document ) . on ( 'keyup' , '#filterText' , Functions . getFilterTextEventHandler ( ) ) ;
3652- Functions . onloadFilterText ( ) ;
3653- Functions . onloadLoginForm ( ) ;
3654- $ ( 'form input, form textarea, form select' ) . on ( 'keydown' , Functions . getKeyboardFormSubmitEventHandler ( ) ) ;
3655- $ ( document ) . on ( 'change' , 'select#select_authentication_plugin_cp' , Functions . getSslPasswordEventHandler ( ) ) ;
3656- Functions . onloadSortLinkMouseEvent ( ) ;
3657- } ;
3658- } ;
3659-
36603567export { Functions } ;
0 commit comments