From a04e26d2ce0992a7f0a8721c7983a3939b4c4564 Mon Sep 17 00:00:00 2001 From: Vincent LAURENT Date: Thu, 20 Apr 2023 16:11:53 +0200 Subject: [PATCH 1/4] metadata: bug loading value --- public/js/metadata.js | 2 +- templates/metadata.html.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/metadata.js b/public/js/metadata.js index 7f2597b..ab05082 100644 --- a/public/js/metadata.js +++ b/public/js/metadata.js @@ -104,7 +104,7 @@ var pageRender = async function(pageIndex) { var addMetadata = function(key, value, type, focus) { let input = document.querySelector('.input-metadata input[name="'+key+'"]'); - if(input && input.value === null) { + if(input && !input.value) { input.value = value; } if(input && focus) { diff --git a/templates/metadata.html.php b/templates/metadata.html.php index e65127e..7b3fa46 100644 --- a/templates/metadata.html.php +++ b/templates/metadata.html.php @@ -102,6 +102,6 @@ - + From e488e20fadd3140b62933dbcc48a4735b6658ac9 Mon Sep 17 00:00:00 2001 From: Vincent LAURENT Date: Thu, 20 Apr 2023 16:24:23 +0200 Subject: [PATCH 2/4] metadata: wording --- public/js/metadata.js | 1 + templates/metadata.html.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/public/js/metadata.js b/public/js/metadata.js index ab05082..fcf92c6 100644 --- a/public/js/metadata.js +++ b/public/js/metadata.js @@ -127,6 +127,7 @@ var addMetadata = function(key, value, type, focus) { label.innerText = key; let deleteButton = document.createElement('div') + deleteButton.title = "Supprimer cette metadonnée" deleteButton.innerHTML = "×" deleteButton.classList.add('delete-metadata') diff --git a/templates/metadata.html.php b/templates/metadata.html.php index 7b3fa46..6c615cc 100644 --- a/templates/metadata.html.php +++ b/templates/metadata.html.php @@ -73,7 +73,7 @@
-
Édition des métadonnées
+
Édition des métadonnées

From 9b36ae02e59661aef5a3c8214752a77f21ff0ab4 Mon Sep 17 00:00:00 2001 From: Vincent LAURENT Date: Thu, 20 Apr 2023 16:29:58 +0200 Subject: [PATCH 3/4] metadata: favicon --- public/favicon-metadata.ico | Bin 0 -> 15406 bytes templates/metadata.html.php | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 public/favicon-metadata.ico diff --git a/public/favicon-metadata.ico b/public/favicon-metadata.ico new file mode 100644 index 0000000000000000000000000000000000000000..b1d72f50442ce8c2b04fa221fadf78c08a5c64f0 GIT binary patch literal 15406 zcmeI1TZ~oJ8GsM>n*pQ<6eyg4QlJ*7fMB@|atCGbUQ3jriZFmg3tFoJ83%`}0-~aV zFd#4tpb#!XYb~*DEN#=67?Z|^#58?v+BALWLm%k(4QEXb<388f2ik-``PlpHv)5Yx zeXThp5-k#~5?#9{xF!=zS|<{>ClZNd^77}wHzpE$cs620>ia>7#HTkU5`%e%A&j{E zoJ%3nf|t9)gD?ZW0iD3-xg?BT#EXZZ9PWpQp&zt_Op-pfo|hhlrSL8sfDLdnM9mR3 zb{X$(g;9Wq5<6idG@T>cSjV*iyqx$BG@T=#u?%aF^f|O82|Yny1$%?eVO_quLY%|z z4ua!WLB3;owZWFrTo1sH;7gbfD_|RBT9>aH#(t0ME~tjS@K-2@>uZWXA z3}e@E-#_)e<0rv+xD9>+&b1nxL&-GO@6yMQQGbKI{6?Pv*^#P6J^H}pxv z&t1SAEs5A?l28WrrJ z@B`5Q>huXFWLw`@ya7ic^z*pvRw3)c+SJDt zum=u;Hctc3S-%9&GohcyWw(AZR{G7@xo#b7fC+FDT!KG>``B1`5?+PZq1bpcG}7+l zJYNsm*$))gzW{T=eS9yR1^4)3rP=bJurm^(hDIvM&sU@h}l? z1#6}QL`hVp3_ACtwZS4WV~%+bD(D9R_7u-*w$HSAlDP4Cmn( zsDpk;mqP6hW3#P4f|vG#{@4W7pbq-MSOh7??l3mn`onn1J^a_O4b(wD=nwNjDc0`G zqoeard-Z=3RzMx7gU?;td>9JNv76xy@=yN#2&O>D|FFJ)J52_4&=1DKd{DQ((6p~* z%X40jlrMQ&5Bjs|`tHl>kOX64J`4cs!rHVyr1!O``sS6aV((uGgJC3?-+zE-K|768u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BIR#9{R@P=wN9h-@4<5!0oq_3)`In5O)m#~ z>sUyF`?Pb70ndV~;7u@2`@ouUUz`g1r7aXA7a8<9cwV>{%=0MyyYsvwXoKsSOV-0Q zm<0CLLEw1b?FJ)ZA#8@-@E#lh?KRd>=NTRsB%kp1Sy&Glo#74Afq%vNX_dOS2A>0U)du5WE`3!1f9BoaKpmLx#_e`c z@7559?o9JFX~Pq9y&SY*BbYzd!`=ee#k-FEG3fV+kOciyO3^RYl{OfMGO!+Ifqf}o xe7_9z`4F(y&COEzov9neHH?G%PY1AXb}9nLI)^?tXIj8@x$c4M9*D^U{{>zsSe*a> literal 0 HcmV?d00001 diff --git a/templates/metadata.html.php b/templates/metadata.html.php index 6c615cc..48c7a83 100644 --- a/templates/metadata.html.php +++ b/templates/metadata.html.php @@ -8,7 +8,7 @@ - + Édition des métadonnées d'un PDF From de66c05f2a6696eea3e87072b321da6240a20453 Mon Sep 17 00:00:00 2001 From: Vincent LAURENT Date: Thu, 20 Apr 2023 16:36:48 +0200 Subject: [PATCH 4/4] metadata: Document of configuration defaults fields --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 35e5fd7..0281779 100644 --- a/README.md +++ b/README.md @@ -249,6 +249,17 @@ Pour desactiver le mode Organiser, ajouter `DISABLE_ORGANIZATION=true` dans le f Pour cacher le lien de pdf de démo, ajouter `PDF_DEMO_LINK=false` dans le fichier `config/config.ini`. +### Champs chargés par défaut pour l'édition de métadonnéés + +Dans le fichier de configuration `config/config.ini` il est possible de rajouter autant de champs que l'on souhaite avec le type HTML de l'input (text, date, number email, etc ...) qui seront préchargées pour chaque PDF. + +``` +METADATA_DEFAULT_FIELDS[field1].type = "text" +METADATA_DEFAULT_FIELDS[field2].type = "text" +METADATA_DEFAULT_FIELDS[field3].type = "date" +METADATA_DEFAULT_FIELDS[field4].type = "number" +``` + ## Mise à jour La dernière version stable est sur la branche `master`, pour la mise à jour il suffit de récupérer les dernières modifications :