@@ -64,20 +64,20 @@ Refine.DatabaseSourceUI.prototype.attachUI = function(body) {
6464 this . _elmts = DOM . bind ( this . _body ) ;
6565 var self = this ;
6666
67- $ ( '#database-title' ) . text ( $ . i18n . _ ( 'database-import/title' ) ) ;
68- $ ( '#connectionNameLabel' ) . html ( $ . i18n . _ ( 'database-source/connectionNameLabel' ) ) ;
69- $ ( '#databaseTypeLabel' ) . html ( $ . i18n . _ ( 'database-source/databaseTypeLabel' ) ) ;
70- $ ( '#databaseHostLabel' ) . text ( $ . i18n . _ ( 'database-source/databaseHostLabel' ) ) ;
71- $ ( '#databasePortLabel' ) . text ( $ . i18n . _ ( 'database-source/databasePortLabel' ) ) ;
72- $ ( '#databaseUserLabel' ) . text ( $ . i18n . _ ( 'database-source/databaseUserLabel' ) ) ;
73- $ ( '#databasePasswordLabel' ) . text ( $ . i18n . _ ( 'database-source/databasePasswordLabel' ) ) ;
74- $ ( '#databaseNameLabel' ) . text ( $ . i18n . _ ( 'database-source/databaseNameLabel' ) ) ;
75- $ ( '#databaseSchemaLabel' ) . text ( $ . i18n . _ ( 'database-source/databaseSchemaLabel' ) ) ;
76- $ ( '#databaseTestButton' ) . text ( $ . i18n . _ ( 'database-source/databaseTestButton' ) ) ;
77- $ ( '#databaseSaveButton' ) . text ( $ . i18n . _ ( 'database-source/databaseSaveButton' ) ) ;
78- $ ( '#databaseConnectButton' ) . text ( $ . i18n . _ ( 'database-source/databaseConnectButton' ) ) ;
79- $ ( '#newConnectionButtonDiv' ) . text ( $ . i18n . _ ( 'database-source/newConnectionButtonDiv' ) ) ;
80- $ ( '#savedConnectionSpan' ) . text ( $ . i18n . _ ( 'database-source/savedConnectionSpan' ) ) ;
67+ $ ( '#database-title' ) . text ( $ . i18n ( 'database-import/title' ) ) ;
68+ $ ( '#connectionNameLabel' ) . html ( $ . i18n ( 'database-source/connectionNameLabel' ) ) ;
69+ $ ( '#databaseTypeLabel' ) . html ( $ . i18n ( 'database-source/databaseTypeLabel' ) ) ;
70+ $ ( '#databaseHostLabel' ) . text ( $ . i18n ( 'database-source/databaseHostLabel' ) ) ;
71+ $ ( '#databasePortLabel' ) . text ( $ . i18n ( 'database-source/databasePortLabel' ) ) ;
72+ $ ( '#databaseUserLabel' ) . text ( $ . i18n ( 'database-source/databaseUserLabel' ) ) ;
73+ $ ( '#databasePasswordLabel' ) . text ( $ . i18n ( 'database-source/databasePasswordLabel' ) ) ;
74+ $ ( '#databaseNameLabel' ) . text ( $ . i18n ( 'database-source/databaseNameLabel' ) ) ;
75+ $ ( '#databaseSchemaLabel' ) . text ( $ . i18n ( 'database-source/databaseSchemaLabel' ) ) ;
76+ $ ( '#databaseTestButton' ) . text ( $ . i18n ( 'database-source/databaseTestButton' ) ) ;
77+ $ ( '#databaseSaveButton' ) . text ( $ . i18n ( 'database-source/databaseSaveButton' ) ) ;
78+ $ ( '#databaseConnectButton' ) . text ( $ . i18n ( 'database-source/databaseConnectButton' ) ) ;
79+ $ ( '#newConnectionButtonDiv' ) . text ( $ . i18n ( 'database-source/newConnectionButtonDiv' ) ) ;
80+ $ ( '#savedConnectionSpan' ) . text ( $ . i18n ( 'database-source/savedConnectionSpan' ) ) ;
8181
8282
8383 this . _elmts . newConnectionButton . click ( function ( evt ) {
@@ -129,7 +129,7 @@ Refine.DatabaseSourceUI.prototype.attachUI = function(body) {
129129 if ( self . _validateNewConnectionForm ( ) == true ) {
130130 var connectionNameInput = $ . trim ( self . _elmts . connectionNameInput [ 0 ] . value ) ;
131131 if ( connectionNameInput . length === 0 ) {
132- window . alert ( $ . i18n . _ ( 'database-source/alert-connection-name' ) ) ;
132+ window . alert ( $ . i18n ( 'database-source/alert-connection-name' ) ) ;
133133 } else {
134134 self . _saveConnection ( self . _getConnectionInfo ( ) ) ;
135135 }
@@ -152,7 +152,7 @@ Refine.DatabaseSourceUI.prototype.attachUI = function(body) {
152152// if(jdbcQueryInfo.query && jdbcQueryInfo.query.length > 0 ) {
153153// self._executeQuery(jdbcQueryInfo);
154154// }else{
155- // window.alert($.i18n._ ('database-source/alert-query'));
155+ // window.alert($.i18n('database-source/alert-query'));
156156// }
157157
158158 if ( self . validateQuery ( jdbcQueryInfo . query ) ) {
@@ -171,7 +171,7 @@ Refine.DatabaseSourceUI.prototype.attachUI = function(body) {
171171 if ( self . _validateNewConnectionForm ( ) == true ) {
172172 var connectionNameInput = $ . trim ( self . _elmts . connectionNameInput [ 0 ] . value ) ;
173173 if ( connectionNameInput . length === 0 ) {
174- window . alert ( $ . i18n . _ ( 'database-source/alert-connection-name' ) ) ;
174+ window . alert ( $ . i18n ( 'database-source/alert-connection-name' ) ) ;
175175 } else {
176176 self . _editConnection ( self . _getConnectionInfo ( ) ) ;
177177 }
@@ -198,38 +198,38 @@ Refine.DatabaseSourceUI.prototype.focus = function() {
198198Refine . DatabaseSourceUI . prototype . validateQuery = function ( query ) {
199199 //alert("query::" + query);
200200 if ( ! query || query . length <= 0 ) {
201- window . alert ( $ . i18n . _ ( 'database-source/alert-query' ) ) ;
201+ window . alert ( $ . i18n ( 'database-source/alert-query' ) ) ;
202202 return false ;
203203 }
204204
205205 var allCapsQuery = query . toUpperCase ( ) ;
206206
207207 if ( allCapsQuery . indexOf ( 'DROP' ) > - 1 ) {
208- window . alert ( $ . i18n . _ ( 'database-source/alert-invalid-query-keyword' ) + " DROP" ) ;
208+ window . alert ( $ . i18n ( 'database-source/alert-invalid-query-keyword' ) + " DROP" ) ;
209209 return false ;
210210 } else if ( allCapsQuery . indexOf ( 'TRUNCATE' ) > - 1 ) {
211- window . alert ( $ . i18n . _ ( 'database-source/alert-invalid-query-keyword' ) + " TRUNCATE" ) ;
211+ window . alert ( $ . i18n ( 'database-source/alert-invalid-query-keyword' ) + " TRUNCATE" ) ;
212212 return false ;
213213 } else if ( allCapsQuery . indexOf ( 'DELETE' ) > - 1 ) {
214- window . alert ( $ . i18n . _ ( 'database-source/alert-invalid-query-keyword' ) + " DELETE" ) ;
214+ window . alert ( $ . i18n ( 'database-source/alert-invalid-query-keyword' ) + " DELETE" ) ;
215215 return false ;
216216 } else if ( allCapsQuery . indexOf ( 'ROLLBACK' ) > - 1 ) {
217- window . alert ( $ . i18n . _ ( 'database-source/alert-invalid-query-keyword' ) + " ROLLBACK" ) ;
217+ window . alert ( $ . i18n ( 'database-source/alert-invalid-query-keyword' ) + " ROLLBACK" ) ;
218218 return false ;
219219 } else if ( allCapsQuery . indexOf ( 'SHUTDOWN' ) > - 1 ) {
220- window . alert ( $ . i18n . _ ( 'database-source/alert-invalid-query-keyword' ) + " SHUTDOWN" ) ;
220+ window . alert ( $ . i18n ( 'database-source/alert-invalid-query-keyword' ) + " SHUTDOWN" ) ;
221221 return false ;
222222 } else if ( allCapsQuery . indexOf ( 'INSERT' ) > - 1 ) {
223- window . alert ( $ . i18n . _ ( 'database-source/alert-invalid-query-keyword' ) + " INSERT" ) ;
223+ window . alert ( $ . i18n ( 'database-source/alert-invalid-query-keyword' ) + " INSERT" ) ;
224224 return false ;
225225 } else if ( allCapsQuery . indexOf ( 'ALTER' ) > - 1 ) {
226- window . alert ( $ . i18n . _ ( 'database-source/alert-invalid-query-keyword' ) + " ALTER" ) ;
226+ window . alert ( $ . i18n ( 'database-source/alert-invalid-query-keyword' ) + " ALTER" ) ;
227227 return false ;
228228 } else if ( allCapsQuery . indexOf ( 'UPDATE' ) > - 1 ) {
229- window . alert ( $ . i18n . _ ( 'database-source/alert-invalid-query-keyword' ) + " UPDATE" ) ;
229+ window . alert ( $ . i18n ( 'database-source/alert-invalid-query-keyword' ) + " UPDATE" ) ;
230230 return false ;
231231 } else if ( allCapsQuery . indexOf ( 'LIMIT' ) > - 1 ) {
232- window . alert ( $ . i18n . _ ( 'database-source/alert-invalid-query-keyword' ) + " LIMIT" ) ;
232+ window . alert ( $ . i18n ( 'database-source/alert-invalid-query-keyword' ) + " LIMIT" ) ;
233233 return false ;
234234 }
235235
@@ -238,12 +238,12 @@ Refine.DatabaseSourceUI.prototype.validateQuery = function(query) {
238238// || (allCapsQuery.indexOf('SHUTDOWN') > -1) || (allCapsQuery.indexOf('INSERT') > -1)
239239// || (allCapsQuery.indexOf('ALTER') > -1) || (allCapsQuery.indexOf('UPDATE') > -1))
240240// {
241- // window.alert($.i18n._ ('database-source/alert-invalid-query-keyword'));
241+ // window.alert($.i18n('database-source/alert-invalid-query-keyword'));
242242// return false;
243243// }
244244
245245 if ( ! allCapsQuery . startsWith ( 'SELECT' ) ) {
246- window . alert ( $ . i18n . _ ( 'database-source/alert-invalid-query-select' ) ) ;
246+ window . alert ( $ . i18n ( 'database-source/alert-invalid-query-select' ) ) ;
247247 return false ;
248248 }
249249
@@ -273,7 +273,7 @@ Refine.DatabaseSourceUI.prototype._editConnection = function(connectionInfo) {
273273 } )
274274
275275 $ ( "#menuListUl" ) . append ( items . join ( '' ) ) ;
276- window . alert ( $ . i18n . _ ( 'database-source/alert-connection-edit' ) ) ;
276+ window . alert ( $ . i18n ( 'database-source/alert-connection-edit' ) ) ;
277277 }
278278 }
279279 } ) . fail ( function ( jqXhr , textStatus , errorThrown ) {
@@ -286,7 +286,7 @@ Refine.DatabaseSourceUI.prototype._executeQuery = function(jdbcQueryInfo) {
286286 var self = this ;
287287 //remove start line
288288
289- var dismiss = DialogSystem . showBusy ( $ . i18n . _ ( 'database-import/checking' ) ) ;
289+ var dismiss = DialogSystem . showBusy ( $ . i18n ( 'database-import/checking' ) ) ;
290290 //$("#executeQueryBtn").text('Please wait ...').attr('disabled','disabled');
291291
292292 $ . post (
@@ -467,16 +467,16 @@ Refine.DatabaseSourceUI.prototype._validateNewConnectionForm = function() {
467467 var initialSchemaInput = $ . trim ( self . _elmts . initialSchemaInput [ 0 ] . value ) ;
468468
469469 if ( databaseHostInput . length === 0 ) {
470- window . alert ( $ . i18n . _ ( 'database-source/alert-server' ) ) ;
470+ window . alert ( $ . i18n ( 'database-source/alert-server' ) ) ;
471471 return false ;
472472 } else if ( databasePortInput . length === 0 ) {
473- window . alert ( $ . i18n . _ ( 'database-source/alert-port' ) ) ;
473+ window . alert ( $ . i18n ( 'database-source/alert-port' ) ) ;
474474 return false ;
475475 } else if ( databaseUserInput . length === 0 ) {
476- window . alert ( $ . i18n . _ ( 'database-source/alert-user' ) ) ;
476+ window . alert ( $ . i18n ( 'database-source/alert-user' ) ) ;
477477 return false ;
478478 } else if ( initialDatabaseInput . length === 0 ) {
479- window . alert ( $ . i18n . _ ( 'database-source/alert-initial-database' ) ) ;
479+ window . alert ( $ . i18n ( 'database-source/alert-initial-database' ) ) ;
480480 return false ;
481481 }
482482 else {
0 commit comments