Skip to content

Commit

Permalink
Merge branch 'master' into refactor/minor-styles
Browse files Browse the repository at this point in the history
* master:
  chore: update version
  Clone: handle reset and unique fields (#1062)
  chore: update version
  fix: warning modal
  fix: tests
  feat: get coordinates from address
  • Loading branch information
qwerg committed Dec 6, 2023
2 parents 079e122 + e14b78f commit 305cce7
Show file tree
Hide file tree
Showing 19 changed files with 863 additions and 479 deletions.
634 changes: 345 additions & 289 deletions config/app_local.example.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion config/version.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[Manager]
version=4.14.0
version=4.14.2
37 changes: 21 additions & 16 deletions locales/default.pot
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: BEdita 4 \n"
"POT-Creation-Date: 2023-11-16 16:11:10 \n"
"POT-Creation-Date: 2023-11-30 09:02:53 \n"
"MIME-Version: 1.0 \n"
"Content-Transfer-Encoding: 8bit \n"
"Language-Team: BEdita I18N & I10N Team \n"
Expand Down Expand Up @@ -163,9 +163,6 @@ msgstr ""
msgid "Config"
msgstr ""

msgid "Configuration key"
msgstr ""

msgid "Confirm new password"
msgstr ""

Expand Down Expand Up @@ -718,9 +715,6 @@ msgstr ""
msgid "Search"
msgstr ""

msgid "See Wiki for help"
msgstr ""

msgid "Select a project"
msgstr ""

Expand Down Expand Up @@ -1116,6 +1110,12 @@ msgstr ""
msgid "Options"
msgstr ""

msgid "Configuration key"
msgstr ""

msgid "See wiki for help"
msgstr ""

msgid "Remove item. Are you sure?"
msgstr ""

Expand Down Expand Up @@ -1147,6 +1147,14 @@ msgstr ""
msgid "At least ${ len } characters"
msgstr ""

msgid "GET"
msgstr ""

msgid ""
"Missing data to search coordinates: insert at least \"Address\" and "
"\"Locality\" (optional: \"Zipcode\", \"Country\", \"Region\")"
msgstr ""

msgid "stop"
msgstr ""

Expand Down Expand Up @@ -1229,6 +1237,12 @@ msgstr ""
msgid "Error on deleting tag"
msgstr ""

msgid "Hide"
msgstr ""

msgid "Show"
msgstr ""

msgid "copied in the clipboard"
msgstr ""

Expand Down Expand Up @@ -1295,18 +1309,12 @@ msgstr ""
msgid "Action ${ action } performed by"
msgstr ""

msgid "Hide"
msgstr ""

msgid "Inherited from"
msgstr ""

msgid "Readonly"
msgstr ""

msgid "Show"
msgstr ""

msgid "Translatable"
msgstr ""

Expand All @@ -1325,9 +1333,6 @@ msgstr ""
msgid "edit"
msgstr ""

msgid "GET"
msgstr ""

msgid "Pitch"
msgstr ""

Expand Down
37 changes: 21 additions & 16 deletions locales/en_US/default.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: BEdita Manager \n"
"POT-Creation-Date: 2023-11-16 16:11:10 \n"
"POT-Creation-Date: 2023-11-30 09:02:53 \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: BEdita I18N & I10N Team \n"
Expand Down Expand Up @@ -166,9 +166,6 @@ msgstr ""
msgid "Config"
msgstr ""

msgid "Configuration key"
msgstr ""

msgid "Confirm new password"
msgstr ""

Expand Down Expand Up @@ -721,9 +718,6 @@ msgstr ""
msgid "Search"
msgstr ""

msgid "See Wiki for help"
msgstr ""

msgid "Select a project"
msgstr ""

Expand Down Expand Up @@ -1119,6 +1113,12 @@ msgstr ""
msgid "Options"
msgstr ""

msgid "Configuration key"
msgstr ""

msgid "See wiki for help"
msgstr ""

msgid "Remove item. Are you sure?"
msgstr ""

Expand Down Expand Up @@ -1150,6 +1150,14 @@ msgstr ""
msgid "At least ${ len } characters"
msgstr ""

msgid "GET"
msgstr ""

msgid ""
"Missing data to search coordinates: insert at least \"Address\" and "
"\"Locality\" (optional: \"Zipcode\", \"Country\", \"Region\")"
msgstr ""

msgid "stop"
msgstr ""

Expand Down Expand Up @@ -1232,6 +1240,12 @@ msgstr ""
msgid "Error on deleting tag"
msgstr ""

msgid "Hide"
msgstr ""

msgid "Show"
msgstr ""

msgid "copied in the clipboard"
msgstr ""

Expand Down Expand Up @@ -1298,18 +1312,12 @@ msgstr ""
msgid "Action ${ action } performed by"
msgstr ""

msgid "Hide"
msgstr ""

msgid "Inherited from"
msgstr ""

msgid "Readonly"
msgstr ""

msgid "Show"
msgstr ""

msgid "Translatable"
msgstr ""

Expand All @@ -1328,9 +1336,6 @@ msgstr ""
msgid "edit"
msgstr ""

msgid "GET"
msgstr ""

msgid "Pitch"
msgstr ""

Expand Down
45 changes: 27 additions & 18 deletions locales/it_IT/default.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: BEdita Manager \n"
"POT-Creation-Date: 2023-11-16 16:11:10 \n"
"POT-Creation-Date: 2023-11-30 09:02:53 \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: BEdita I18N & I10N Team \n"
Expand Down Expand Up @@ -168,9 +168,6 @@ msgstr "Redattori concorrenti"
msgid "Config"
msgstr "Configurazioni"

msgid "Configuration key"
msgstr "Chiave configurazione"

msgid "Confirm new password"
msgstr "Conferma nuova password"

Expand Down Expand Up @@ -725,9 +722,6 @@ msgstr "Partenza"
msgid "Search"
msgstr "Cerca"

msgid "See Wiki for help"
msgstr "Vedi pagina Wiki per informazioni"

msgid "Select a project"
msgstr "Seleziona un progetto"

Expand Down Expand Up @@ -1070,7 +1064,7 @@ msgid "copy"
msgstr "copia"

msgid "Clone relations"
msgstr ""
msgstr "Clona le relazioni"

msgid "If you confirm, this data will be gone forever. Are you sure?"
msgstr "Questo dato verrà eliminato definitivamente. Vuoi proseguire?"
Expand Down Expand Up @@ -1104,7 +1098,9 @@ msgstr "Errore nella traduzione da \"${ from }\" a \"${ to }\""
msgid ""
"Could not translate field \"${ field }\" with translation engine "
"\"${ engine }\""
msgstr "Non è stato possibile tradurre il campo \"${ field }\" con il motore \"${ engine }\""
msgstr ""
"Non è stato possibile tradurre il campo \"${ field }\" con il motore "
"\"${ engine }\""

msgid "OOOPS! Something went wrong"
msgstr "OOOPS! Qualcosa è andato storto"
Expand All @@ -1125,6 +1121,12 @@ msgstr "Nessuna opzione per questo tipo di file"
msgid "Options"
msgstr "Opzioni"

msgid "Configuration key"
msgstr "Chiave configurazione"

msgid "See wiki for help"
msgstr "Vedi pagina Wiki per informazioni"

msgid "Remove item. Are you sure?"
msgstr "Stai per eliminare l'elemento. Vuoi procedere?"

Expand Down Expand Up @@ -1158,6 +1160,16 @@ msgstr "Tipi consentiti"
msgid "At least ${ len } characters"
msgstr "Almeno ${ len } caratteri"

msgid "GET"
msgstr ""

msgid ""
"Missing data to search coordinates: insert at least \"Address\" and "
"\"Locality\" (optional: \"Zipcode\", \"Country\", \"Region\")"
msgstr ""
"Dati mancanti per la ricerca delle coordinate: inserire almeno \"Indirizzo\" "
"e \"Località\" (opzionali: \"CAP\", \"Paese\", \"Regione\")"

msgid "stop"
msgstr "interrompi"

Expand Down Expand Up @@ -1240,6 +1252,12 @@ msgstr "Errore nel salvataggio del tag"
msgid "Error on deleting tag"
msgstr "Errore nell'eliminazione del tag"

msgid "Hide"
msgstr "Nascondi"

msgid "Show"
msgstr "Mostra"

msgid "copied in the clipboard"
msgstr "copiato negli appunti"

Expand Down Expand Up @@ -1306,18 +1324,12 @@ msgstr "con applicazione"
msgid "Action ${ action } performed by"
msgstr "Azione ${ action } eseguita da"

msgid "Hide"
msgstr "Nascondi"

msgid "Inherited from"
msgstr "Ereditato da"

msgid "Readonly"
msgstr "Sola lettura"

msgid "Show"
msgstr "Mostra"

msgid "Translatable"
msgstr "Traducibile"

Expand All @@ -1336,9 +1348,6 @@ msgstr ""
msgid "edit"
msgstr "modifica"

msgid "GET"
msgstr ""

msgid "Pitch"
msgstr ""

Expand Down
29 changes: 19 additions & 10 deletions resources/js/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,26 +198,35 @@ const _vueInstance = new Vue({
PanelEvents.closePanel();
},

/**
* Clone object
* Prompt for title change
*
* @return {void}
*/
clone() {
clone(objectType) {
const unique = BEDITA.cloneConfig[objectType]?.unique || [];
const title = document.getElementById('title').value || t('Untitled');
const msg = t`Please insert a new title on "${title}" clone`;
const defaultTitle = title + '-' + t`copy`;
const confirmCallback = (cloneTitle, cloneRelations, dialog) => {
const query = `?title=${cloneTitle || defaultTitle}&cloneRelations=${cloneRelations || false}`;
const confirmCallback = (cloneTitle, cloneRelations, dialog, unique) => {
let query = `?title=${cloneTitle || defaultTitle}`;
for (const uitem of unique) {
query += `&${uitem.field}=${uitem.value}`;
}
query += `&cloneRelations=${cloneRelations || false}`;
const origin = window.location.origin;
const path = window.location.pathname.replace('/view/', '/clone/');
const url = `${origin}${path}${query}`;
const newTab = window.open(url, '_blank');
newTab.focus();
dialog.hide(true);
};
const options = { checkLabel: t`Clone relations`, checkValue: false };
const uniqueOptions = [];
for (const field of unique) {
let label = document.querySelector(`label[for=${field}]`)?.innerText;
label = label || this.$helpers.humanize(field);
uniqueOptions.push({
field: field,
label: label,
value: document.getElementById(field).value + '-' + t`copy`,
});
}
const options = { checkLabel: t`Clone relations`, checkValue: false, unique: uniqueOptions };

prompt(msg, defaultTitle, confirmCallback, document.body, options);
},
Expand Down
Loading

0 comments on commit 305cce7

Please sign in to comment.