diff --git a/extensions/database/module/langs/translation-en.json b/extensions/database/module/langs/translation-en.json index b4ffadf48..ac286b651 100644 --- a/extensions/database/module/langs/translation-en.json +++ b/extensions/database/module/langs/translation-en.json @@ -20,8 +20,18 @@ "database-source/databasePortLabel": "Port:", "database-source/databaseUserLabel": "User:", "database-source/databasePasswordLabel": "Password:", - "database-source/databaseNameLabel": "Database:", + "database-source/databaseNameLabel": "Database name:", + "database-source/databaseFileNameLabel": "Database file:", "database-source/databaseSchemaLabel": "Schema:", + "database-source/connectionNamePlaceholder": "Enter a new Connection Name", + "database-source/databaseHostPlaceholder": "Enter the database server domain or IP", + "database-source/databasePortPlaceholder": "Enter the database port e.g. 3306", + "database-source/databaseUserPlaceholder": "Enter the database user", + "database-source/databasePasswordPlaceholder": "Enter the database password", + "database-source/databaseNamePlaceholder": "Enter the name of the database", + "database-source/databaseFileNamePlaceholder": "Enter the full path to the database file", + "database-source/databaseSchemaPlaceholder": "Enter the initial schema of the database", + "database-source/connectionNameDefaultValue": "New_Connection_Name", "database-source/databaseTestButton": "Test", "database-source/databaseSaveButton": "Save", "database-source/databaseConnectButton": "Connect", diff --git a/extensions/database/module/langs/translation-en_GB.json b/extensions/database/module/langs/translation-en_GB.json index e39b68f00..f6c6f421b 100644 --- a/extensions/database/module/langs/translation-en_GB.json +++ b/extensions/database/module/langs/translation-en_GB.json @@ -28,6 +28,7 @@ "database-source/databaseTestButton": "Test", "database-source/databaseSchemaLabel": "Schema:", "database-source/databaseNameLabel": "Database:", + "database-source/databaseFileNameLabel": "Database file:", "database-source/databasePasswordLabel": "Password:", "database-source/databaseUserLabel": "User:", "database-source/databasePortLabel": "Port:", diff --git a/extensions/database/module/langs/translation-fr.json b/extensions/database/module/langs/translation-fr.json index f8d2b9468..ba2384135 100644 --- a/extensions/database/module/langs/translation-fr.json +++ b/extensions/database/module/langs/translation-fr.json @@ -21,7 +21,17 @@ "database-source/databaseUserLabel": "Utilisateur :", "database-source/databasePasswordLabel": "Mot de passe :", "database-source/databaseNameLabel": "Base de données :", + "database-source/databaseFileNameLabel": "Fichier de données :", "database-source/databaseSchemaLabel": "Schéma :", + "database-source/connectionNamePlaceholder": "Entrez le nom de la connexion", + "database-source/databaseHostPlaceholder": "Entrez l’adresse de l’hôte de la base de données", + "database-source/databasePortPlaceholder": "Entrez le port de la base de données e.g. 3306", + "database-source/databaseUserPlaceholder": "Entrez l’utilisateur de la base de données", + "database-source/databasePasswordPlaceholder": "Entrez le mot de passe de l’utilisateur", + "database-source/databaseNamePlaceholder": "Entrez le nom de la base de données", + "database-source/databaseFileNamePlaceholder": "Entrez le chemin du fichier base de données", + "database-source/databaseSchemaPlaceholder": "Entrez le schéma initial", + "database-source/connectionNameDefaultValue": "Nom_nouvelle_connexion", "database-source/databaseTestButton": "Test", "database-source/databaseSaveButton": "Enregistrer", "database-source/databaseConnectButton": "Connexion", diff --git a/extensions/database/module/langs/translation-it.json b/extensions/database/module/langs/translation-it.json index fca8d8507..5d4b4c141 100644 --- a/extensions/database/module/langs/translation-it.json +++ b/extensions/database/module/langs/translation-it.json @@ -20,6 +20,7 @@ "database-source/databaseUserLabel": "Utente:", "database-source/databasePasswordLabel": "Password:", "database-source/databaseNameLabel": "Database:", + "database-source/databaseFileNameLabel": "Database file:", "database-source/databaseSchemaLabel": "Schema:", "database-source/databaseTestButton": "Test", "database-source/databaseSaveButton": "Salva", diff --git a/extensions/database/module/langs/translation-jp.json b/extensions/database/module/langs/translation-jp.json index 8c428b9b6..662a8e98b 100644 --- a/extensions/database/module/langs/translation-jp.json +++ b/extensions/database/module/langs/translation-jp.json @@ -21,6 +21,7 @@ "database-source/databaseUserLabel": "User:", "database-source/databasePasswordLabel": "Password:", "database-source/databaseNameLabel": "Database:", + "database-source/databaseFileNameLabel": "Database file:", "database-source/databaseSchemaLabel": "スキーマ :", "database-source/databaseTestButton": "テスト", "database-source/databaseSaveButton": "保存", diff --git a/extensions/database/module/langs/translation-ko.json b/extensions/database/module/langs/translation-ko.json index 83584429f..52b227021 100644 --- a/extensions/database/module/langs/translation-ko.json +++ b/extensions/database/module/langs/translation-ko.json @@ -21,6 +21,7 @@ "database-source/databaseUserLabel": "사용자:", "database-source/databasePasswordLabel": "비밀번호:", "database-source/databaseNameLabel": "데이터베이스:", + "database-source/databaseFileNameLabel": "데이터베이스:", "database-source/databaseSchemaLabel": "스키마:", "database-source/databaseTestButton": "테스트", "database-source/databaseSaveButton": "저장", diff --git a/extensions/database/module/langs/translation-nb_NO.json b/extensions/database/module/langs/translation-nb_NO.json index ae2520712..f55bf0e02 100644 --- a/extensions/database/module/langs/translation-nb_NO.json +++ b/extensions/database/module/langs/translation-nb_NO.json @@ -19,6 +19,7 @@ "database-source/databaseUserLabel": "Bruker:", "database-source/databasePasswordLabel": "Passord:", "database-source/databaseNameLabel": "Database:", + "database-source/databaseFileNameLabel": "Database file:", "database-source/databaseSchemaLabel": "Skjema:", "database-source/databaseTestButton": "Test", "database-source/databaseSaveButton": "Lagre", diff --git a/extensions/database/module/langs/translation-sv.json b/extensions/database/module/langs/translation-sv.json index fe6a68cd7..677aa882f 100644 --- a/extensions/database/module/langs/translation-sv.json +++ b/extensions/database/module/langs/translation-sv.json @@ -21,6 +21,7 @@ "database-source/databaseUserLabel": "Användare:", "database-source/databasePasswordLabel": "Lösenord:", "database-source/databaseNameLabel": "Databas:", + "database-source/databaseFileNameLabel": "Databas file:", "database-source/databaseSchemaLabel": "Schema:", "database-source/databaseTestButton": "Test", "database-source/databaseSaveButton": "Spara", diff --git a/extensions/database/module/scripts/database-extension.js b/extensions/database/module/scripts/database-extension.js index ab4235945..db871124e 100644 --- a/extensions/database/module/scripts/database-extension.js +++ b/extensions/database/module/scripts/database-extension.js @@ -139,33 +139,30 @@ DatabaseExtension.handleDeleteConnectionClicked = function(connectionName) { } DatabaseExtension.handleEditConnectionClicked = function(connectionName) { - - $.get( - "command/database/saved-connection" + '?' + $.param({"connectionName": connectionName}), - null, - function(savedDatabaseConfig) { - - if(savedDatabaseConfig){ - - var savedConfig = savedDatabaseConfig.savedConnections[0]; - $( "#connectionName" ).val(savedConfig.connectionName); - $( "#databaseTypeSelect" ).val(savedConfig.databaseType); - $( "#databaseHost" ).val(savedConfig.databaseHost); - $( "#databasePort" ).val(savedConfig.databasePort); - $( "#databaseUser" ).val(savedConfig.databaseUser); - $( "#databasePassword" ).val(savedConfig.databasePassword); - $( "#initialDatabase" ).val(savedConfig.databaseName); - $( "#initialSchema" ).val(savedConfig.databaseSchema); - $( "#newConnectionControlDiv" ).hide(); - $( "#editConnectionControlDiv" ).show(); - $( "#newConnectionDiv" ).show(); - $('#sqlEditorDiv').hide(); - $("#connectionName").attr('readonly', 'readonly'); - - } - - }, - "json" - ); + $.get( + "command/database/saved-connection" + '?' + $.param({ "connectionName": connectionName }), + null, + function(savedDatabaseConfig) { + if (savedDatabaseConfig) { + var savedConfig = savedDatabaseConfig.savedConnections[0]; + $( "#connectionName" ).val(savedConfig.connectionName); + $( "select#databaseTypeSelect" ).val(savedConfig.databaseType); + Refine.DatabaseSourceUI.prototype._updateDatabaseType(savedConfig.databaseType); + + $( "#databaseHost" ).val(savedConfig.databaseHost); + $( "#databasePort" ).val(savedConfig.databasePort); + $( "#databaseUser" ).val(savedConfig.databaseUser); + $( "#databasePassword" ).val(savedConfig.databasePassword); + $( "#initialDatabase" ).val(savedConfig.databaseName); + $( "#initialSchema" ).val(savedConfig.databaseSchema); + $( "#newConnectionControlDiv" ).hide(); + $( "#editConnectionControlDiv" ).show(); + $( "#newConnectionDiv" ).show(); + $('#sqlEditorDiv').hide(); + $("#connectionName").attr('readonly', 'readonly'); + } + }, + "json" + ); } diff --git a/extensions/database/module/scripts/index/database-import-form.html b/extensions/database/module/scripts/index/database-import-form.html index cff60ed20..5bd8fe593 100644 --- a/extensions/database/module/scripts/index/database-import-form.html +++ b/extensions/database/module/scripts/index/database-import-form.html @@ -28,45 +28,44 @@