@@ -2,11 +2,12 @@ import $ from 'jquery';
22import { AJAX } from '../modules/ajax.js' ;
33import { Functions } from '../modules/functions.js' ;
44import { Navigation } from '../modules/navigation.js' ;
5- import { CommonActions , CommonParams } from '../modules/common.js' ;
5+ import { CommonParams } from '../modules/common.js' ;
66import highlightSql from '../modules/sql-highlight.js' ;
77import { ajaxRemoveMessage , ajaxShowMessage } from '../modules/ajax-message.js' ;
88import getJsConfirmCommonParam from '../modules/functions/getJsConfirmCommonParam.js' ;
99import { escapeHtml } from '../modules/functions/escape.js' ;
10+ import refreshMainContent from '../modules/functions/refreshMainContent.js' ;
1011
1112/**
1213 * Unbind all event handlers before tearing down a page
@@ -91,7 +92,7 @@ AJAX.registerOnload('table/operations.js', function () {
9192 'table' ,
9293 $form . find ( 'input[name=\'new_name\']' ) . val ( )
9394 ) ;
94- CommonActions . refreshMain ( false ) ;
95+ refreshMainContent ( false ) ;
9596 AJAX . callback = ( ) => {
9697 ajaxShowMessage ( data . message ) ;
9798 } ;
@@ -118,7 +119,7 @@ AJAX.registerOnload('table/operations.js', function () {
118119 if ( typeof data !== 'undefined' && data . success === true ) {
119120 CommonParams . set ( 'db' , data . params . db ) ;
120121 CommonParams . set ( 'table' , data . params . table ) ;
121- CommonActions . refreshMain ( 'index.php?route=/table/sql' ) ;
122+ refreshMainContent ( 'index.php?route=/table/sql' ) ;
122123 AJAX . callback = ( ) => {
123124 ajaxShowMessage ( data . message ) ;
124125 } ;
@@ -168,7 +169,7 @@ AJAX.registerOnload('table/operations.js', function () {
168169 $ . post ( $form . attr ( 'action' ) , $form . serialize ( ) , function ( data ) {
169170 if ( typeof data !== 'undefined' && data . success === true ) {
170171 CommonParams . set ( 'table' , data . params . table ) ;
171- CommonActions . refreshMain ( false ) ;
172+ refreshMainContent ( false ) ;
172173 AJAX . callback = ( ) => {
173174 $ ( '#page_content' ) . html ( data . message ) ;
174175 highlightSql ( $ ( '#page_content' ) ) ;
@@ -293,7 +294,7 @@ AJAX.registerOnload('table/operations.js', function () {
293294 // Table deleted successfully, refresh both the frames
294295 Navigation . reload ( ) ;
295296 CommonParams . set ( 'table' , '' ) ;
296- CommonActions . refreshMain ( CommonParams . get ( 'opendb_url' ) ) ;
297+ refreshMainContent ( CommonParams . get ( 'opendb_url' ) ) ;
297298 AJAX . callback = ( ) => {
298299 ajaxShowMessage ( data . message ) ;
299300 } ;
@@ -325,7 +326,7 @@ AJAX.registerOnload('table/operations.js', function () {
325326 // Table deleted successfully, refresh both the frames
326327 Navigation . reload ( ) ;
327328 CommonParams . set ( 'table' , '' ) ;
328- CommonActions . refreshMain ( CommonParams . get ( 'opendb_url' ) ) ;
329+ refreshMainContent ( CommonParams . get ( 'opendb_url' ) ) ;
329330 AJAX . callback = ( ) => {
330331 ajaxShowMessage ( data . message ) ;
331332 } ;
0 commit comments