From bda508ec7d3750125d69833c4b576a7af9975e99 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 9 May 2017 14:03:06 +0200 Subject: [PATCH] =?UTF-8?q?Subir=20im=C3=A1genes=20Beta=20II?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 2 +- forms/admin/items/items.js | 17 ---- forms/admin/items/locale/ca.json | 4 + forms/admin/items/locale/en.json | 11 +-- forms/admin/items/locale/es.json | 9 +- forms/admin/items/locale/fr.json | 4 + forms/admin/items/locale/mn.json | 11 +-- forms/admin/items/locale/pt.json | 11 +-- forms/admin/items/style.css | 57 ++++++------ forms/admin/items/ui.xml | 91 ++++++++++--------- forms/admin/photos/locale/ca.json | 15 +-- forms/admin/photos/locale/en.json | 15 +-- forms/admin/photos/locale/es.json | 13 +-- forms/admin/photos/locale/fr.json | 15 +-- forms/admin/photos/locale/mn.json | 17 ++-- forms/admin/photos/locale/pt.json | 15 +-- forms/admin/photos/photos.js | 2 +- forms/admin/photos/ui.xml | 4 +- forms/reports/items-form/items-form.js | 23 +++++ forms/reports/items-form/locale/en.json | 9 ++ forms/reports/items-form/locale/es.json | 9 ++ forms/reports/items-form/locale/mn.json | 9 ++ forms/reports/items-form/locale/pt.json | 9 ++ forms/reports/items-form/style.css | 43 +++++++++ forms/reports/items-form/ui.xml | 49 ++++++++++ .../{admin => reports}/shelves/locale/ca.json | 0 .../{admin => reports}/shelves/locale/en.json | 0 .../{admin => reports}/shelves/locale/es.json | 0 .../{admin => reports}/shelves/locale/fr.json | 0 .../{admin => reports}/shelves/locale/mn.json | 0 .../{admin => reports}/shelves/locale/pt.json | 0 forms/{admin => reports}/shelves/shelves.js | 0 forms/{admin => reports}/shelves/style.css | 0 forms/{admin => reports}/shelves/ui.xml | 0 js/hedera/gui.js | 2 +- js/hedera/locale/ca.json | 1 + js/hedera/locale/en.json | 1 + js/hedera/locale/es.json | 1 + js/hedera/locale/fr.json | 1 + js/hedera/locale/mn.json | 1 + js/hedera/locale/pt.json | 1 + 41 files changed, 307 insertions(+), 165 deletions(-) create mode 100755 forms/admin/items/locale/ca.json mode change 100644 => 100755 forms/admin/items/locale/en.json mode change 100644 => 100755 forms/admin/items/locale/es.json create mode 100755 forms/admin/items/locale/fr.json mode change 100644 => 100755 forms/admin/items/locale/mn.json create mode 100644 forms/reports/items-form/items-form.js create mode 100644 forms/reports/items-form/locale/en.json create mode 100644 forms/reports/items-form/locale/es.json create mode 100644 forms/reports/items-form/locale/mn.json create mode 100644 forms/reports/items-form/locale/pt.json create mode 100644 forms/reports/items-form/style.css create mode 100755 forms/reports/items-form/ui.xml rename forms/{admin => reports}/shelves/locale/ca.json (100%) rename forms/{admin => reports}/shelves/locale/en.json (100%) rename forms/{admin => reports}/shelves/locale/es.json (100%) rename forms/{admin => reports}/shelves/locale/fr.json (100%) rename forms/{admin => reports}/shelves/locale/mn.json (100%) rename forms/{admin => reports}/shelves/locale/pt.json (100%) rename forms/{admin => reports}/shelves/shelves.js (100%) rename forms/{admin => reports}/shelves/style.css (100%) rename forms/{admin => reports}/shelves/ui.xml (100%) diff --git a/debian/changelog b/debian/changelog index 30af5d44..117c9294 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (1.403-deb8) stable; urgency=low +hedera-web (1.404-deb8) stable; urgency=low * Initial Release. diff --git a/forms/admin/items/items.js b/forms/admin/items/items.js index b029e140..96c5e973 100644 --- a/forms/admin/items/items.js +++ b/forms/admin/items/items.js @@ -2,22 +2,5 @@ Hedera.Items = new Class ({ Extends: Hedera.Form - - ,activate: function () - { - this.$('warehouse').value = 7; - this.$('realm').value = null; - } - - ,onPreviewClick: function () - { - var batch = new Sql.Batch (); - batch.addValues ({ - 'warehouse': this.$('warehouse').value - ,'realm': this.$('realm').value - ,'rate': this.$('rate').value - }); - this.gui.openReport ('items-report', batch); - } }); diff --git a/forms/admin/items/locale/ca.json b/forms/admin/items/locale/ca.json new file mode 100755 index 00000000..eab281b3 --- /dev/null +++ b/forms/admin/items/locale/ca.json @@ -0,0 +1,4 @@ +{ + "Items": "Artícles", + "Enter a search term": "Introdueix un terme de cerca" +} diff --git a/forms/admin/items/locale/en.json b/forms/admin/items/locale/en.json old mode 100644 new mode 100755 index 53a2579c..b59e1d2f --- a/forms/admin/items/locale/en.json +++ b/forms/admin/items/locale/en.json @@ -1,9 +1,4 @@ { - "Item list": "Item list" - - ,"Store": "Store" - ,"Realm": "Realm" - ,"Rate": "Rate" - - ,"Preview": "Preview" -} + "Items": "Items", + "Enter a search term": "Enter a search term" +} \ No newline at end of file diff --git a/forms/admin/items/locale/es.json b/forms/admin/items/locale/es.json old mode 100644 new mode 100755 index 68eee4ef..649219de --- a/forms/admin/items/locale/es.json +++ b/forms/admin/items/locale/es.json @@ -1,9 +1,4 @@ { - "Item list": "Listado de artículos" - - ,"Store": "Almacén" - ,"Realm": "Reino" - ,"Rate": "Tarifa" - - ,"Preview": "Mostrar" + "Items": "Artículos", + "Enter a search term": "Introduce un término de búsqueda" } diff --git a/forms/admin/items/locale/fr.json b/forms/admin/items/locale/fr.json new file mode 100755 index 00000000..bf70e9ab --- /dev/null +++ b/forms/admin/items/locale/fr.json @@ -0,0 +1,4 @@ +{ + "Items": "Articles", + "Enter a search term": "Entrez un terme de recherche" +} \ No newline at end of file diff --git a/forms/admin/items/locale/mn.json b/forms/admin/items/locale/mn.json old mode 100644 new mode 100755 index 53a2579c..b59e1d2f --- a/forms/admin/items/locale/mn.json +++ b/forms/admin/items/locale/mn.json @@ -1,9 +1,4 @@ { - "Item list": "Item list" - - ,"Store": "Store" - ,"Realm": "Realm" - ,"Rate": "Rate" - - ,"Preview": "Preview" -} + "Items": "Items", + "Enter a search term": "Enter a search term" +} \ No newline at end of file diff --git a/forms/admin/items/locale/pt.json b/forms/admin/items/locale/pt.json index 8bf6f7f2..54f69e72 100644 --- a/forms/admin/items/locale/pt.json +++ b/forms/admin/items/locale/pt.json @@ -1,9 +1,4 @@ { - "Item list": "Lista de Ítens" - - ,"Store": "Armazém" - ,"Realm": "Reino" - ,"Rate": "Tarifa" - - ,"Preview": "Mostrar" -} + "Items": "Artigos", + "Enter a search term": "Digite um termo de pesquisa" +} \ No newline at end of file diff --git a/forms/admin/items/style.css b/forms/admin/items/style.css index ff9ba1be..efe68e09 100644 --- a/forms/admin/items/style.css +++ b/forms/admin/items/style.css @@ -1,43 +1,42 @@ - .items -{ +{ padding: 1em; } .items .box -{ - max-width: 30em; - padding: 2em; -} -.items .form { max-width: 25em; - margin: auto; -} -.items .form-group -{ - padding: 0.4em; -} -.items form label -{ - display: block; - margin-bottom: 0.5em; -} -.items input[type=text], -.items select -{ - margin: 0; - width: 100%; + margin: 0 auto; } -/* Footer */ +/* Row */ -.items .footer +.items .row { - text-align: center; - margin-top: 1.5em; + padding: 1em; + border-bottom: 1px solid #DDD; } -.items .footer > button +.items .row > .photo { - margin: 0 .2em; + margin-right: 1em; + float: left; + border-radius: 50%; + height: 3.2em; + width: 3.2em; +} +.items .row > p +{ + margin: .1em 0; + margin-left: 5em; +} +.items .row > p.important +{ + font-size: 1.2em; +} + +/* Topbar */ + +.action-bar .htk-search-entry +{ + margin: .8em .6em; } diff --git a/forms/admin/items/ui.xml b/forms/admin/items/ui.xml index 07fc6174..2632fb94 100755 --- a/forms/admin/items/ui.xml +++ b/forms/admin/items/ui.xml @@ -1,49 +1,58 @@ + + + +
-

Item list

+

Items

-
- +
+
-
-
-
- - - - - - SELECT id, name FROM vn2008.warehouse - WHERE reserve ORDER BY name - - - -
-
- - - - - - SELECT id, reino FROM vn2008.reinos - WHERE display != FALSE ORDER BY reino - - - -
-
- - -
-
+
+ + + + SELECT Id_Article, Article, Medida, Categoria, Foto + FROM vn2008.Articles + WHERE Article LIKE CONCAT('%', #filter, '%') + OR Id_Article = #filter + ORDER BY Article LIMIT 50 + + + + + + + + +
+ +

+ + + +

+

+ +

+

+ +

+
+
+ +
diff --git a/forms/admin/photos/locale/ca.json b/forms/admin/photos/locale/ca.json index 33d37b50..704fe00c 100755 --- a/forms/admin/photos/locale/ca.json +++ b/forms/admin/photos/locale/ca.json @@ -1,12 +1,13 @@ { - "Photos": "Fotos" + "Images": "Imatges" - ,"Collection": "Colección" - ,"ImageName": "Nom de la imatge" - ,"Id": "Id" - ,"ImageFile": "Arxiu d'imatge" + ,"Collection": "Col·lecció" + ,"Click or drop files here": "Prem o deixa anar els arxius aquí" - ,"Upload": "Enviar" + ,"Clear all": "Netejar tot" + ,"Upload files": "Pujar arxius" - ,"ImageUploaded": "Imatge pujada correctament" + ,"Upload finished successfully": "Imatges pujades correctament" + ,"Some errors happened on upload": "Van ocórrer errors en pujar alguna de les imatges" + ,"There are no files to upload": "No s'ha seleccionat arxius per pujar" } diff --git a/forms/admin/photos/locale/en.json b/forms/admin/photos/locale/en.json index 402722b4..c160093c 100755 --- a/forms/admin/photos/locale/en.json +++ b/forms/admin/photos/locale/en.json @@ -1,12 +1,13 @@ { - "Photos": "Photos" + "Images": "Images" ,"Collection": "Collection" - ,"ImageName": "Image name" - ,"Id": "Id" - ,"ImageFile": "Image file" + ,"Click or drop files here": "Click or drop files here" - ,"Upload": "Upload" + ,"Clear all": "Clear all" + ,"Upload files": "Upload files" - ,"ImageUploaded": "Image uploaded successfully" -} + ,"Upload finished successfully": "Upload finished successfully" + ,"Some errors happened on upload": "Some errors happened on upload" + ,"There are no files to upload": "There are no files to upload" +} \ No newline at end of file diff --git a/forms/admin/photos/locale/es.json b/forms/admin/photos/locale/es.json index 65031e5f..841acff0 100755 --- a/forms/admin/photos/locale/es.json +++ b/forms/admin/photos/locale/es.json @@ -1,12 +1,13 @@ { - "Photos": "Fotos" + "Images": "Imágenes" ,"Collection": "Colección" - ,"ImageName": "Nombre de la imagen" - ,"Id": "Id" - ,"ImageFile": "Archivo de imagen" + ,"Click or drop files here": "Pulsa o suelta los archivos aquí" - ,"Upload": "Enviar" + ,"Clear all": "Limpiar todo" + ,"Upload files": "Subir archivos" - ,"ImageUploaded": "Imagen subida correctamente" + ,"Upload finished successfully": "Imágenes subidas correctamente" + ,"Some errors happened on upload": "Ocurrieron errores al subir alguna de las imágenes" + ,"There are no files to upload": "No se han seleccionado archivos para subir" } diff --git a/forms/admin/photos/locale/fr.json b/forms/admin/photos/locale/fr.json index b6be33d7..c2b17151 100755 --- a/forms/admin/photos/locale/fr.json +++ b/forms/admin/photos/locale/fr.json @@ -1,12 +1,13 @@ { - "Photos": "Photos" + "Images": "Images" ,"Collection": "Collection" - ,"ImageName": "Nom de l'image" - ,"Id": "Id" - ,"ImageFile": "Fichier image" + ,"Click or drop files here": "Cliquez ici ou déposer des fichiers" - ,"Upload": "Télécharger" + ,"Clear all": "Tout effacer" + ,"Upload files": "Upload Files" - ,"ImageUploaded": "téléchargement correct" -} + ,"Upload finished successfully": "Les images téléchargées correctement" + ,"Some errors happened on upload": "Des erreurs sont survenues lors du téléchargement des images" + ,"There are no files to upload": "Aucun fichier sélectionné pour télécharger" +} \ No newline at end of file diff --git a/forms/admin/photos/locale/mn.json b/forms/admin/photos/locale/mn.json index f40f409e..c160093c 100755 --- a/forms/admin/photos/locale/mn.json +++ b/forms/admin/photos/locale/mn.json @@ -1,12 +1,13 @@ { - "Photos": "Photos" + "Images": "Images" - ,"Collection": "цуглуулга" - ,"ImageName": "Image name" - ,"Id": "Id" - ,"ImageFile": "Image file" + ,"Collection": "Collection" + ,"Click or drop files here": "Click or drop files here" - ,"Upload": "Upload" + ,"Clear all": "Clear all" + ,"Upload files": "Upload files" - ,"ImageUploaded": "Image uploaded successfully" -} + ,"Upload finished successfully": "Upload finished successfully" + ,"Some errors happened on upload": "Some errors happened on upload" + ,"There are no files to upload": "There are no files to upload" +} \ No newline at end of file diff --git a/forms/admin/photos/locale/pt.json b/forms/admin/photos/locale/pt.json index 28ad4bb6..728f208e 100644 --- a/forms/admin/photos/locale/pt.json +++ b/forms/admin/photos/locale/pt.json @@ -1,12 +1,13 @@ { - "Photos": "Fotos" + "Images": "Imagens" ,"Collection": "Coleção" - ,"ImageName": "Nome da imagem" - ,"Id": "Id" - ,"ImageFile": "Arquivo de imagem" + ,"Click or drop files here": "Clique ou soltar arquivos aqui" - ,"Upload": "Enviar" + ,"Clear all": "Clear All" + ,"Upload files": "Fazer upload de arquivos" - ,"ImageUploaded": "Imagem subida correctamente" -} + ,"Upload finished successfully": "Upload concluído com sucesso" + ,"Some errors happened on upload": "Ocurrieron erros ao subir alguma das imagens" + ,"There are no files to upload": "Não há arquivos selecionados para upload" +} \ No newline at end of file diff --git a/forms/admin/photos/photos.js b/forms/admin/photos/photos.js index 0b7510e8..7fab2c61 100644 --- a/forms/admin/photos/photos.js +++ b/forms/admin/photos/photos.js @@ -90,7 +90,7 @@ Hedera.Photos = new Class } if (count === 0) - Htk.Toast.showWarning ('There are no files to upload'); + Htk.Toast.showWarning (_('There are no files to upload')); } ,onFileUpload: function (fileData, data, error) diff --git a/forms/admin/photos/ui.xml b/forms/admin/photos/ui.xml index 4e4caf53..a0a8ee1b 100755 --- a/forms/admin/photos/ui.xml +++ b/forms/admin/photos/ui.xml @@ -1,6 +1,6 @@
-

Photos

+

Images

@@ -22,7 +22,7 @@ on-drop="onDrop" on-dragend="onDragEnd" on-click="onDropzoneClick"> - Click or drop files here! + Click or drop files here
button +{ + margin: 0 .2em; +} + diff --git a/forms/reports/items-form/ui.xml b/forms/reports/items-form/ui.xml new file mode 100755 index 00000000..07fc6174 --- /dev/null +++ b/forms/reports/items-form/ui.xml @@ -0,0 +1,49 @@ + +
+

Item list

+
+
+ +
+
+
+
+
+ + + + + + SELECT id, name FROM vn2008.warehouse + WHERE reserve ORDER BY name + + + +
+
+ + + + + + SELECT id, reino FROM vn2008.reinos + WHERE display != FALSE ORDER BY reino + + + +
+
+ + +
+
+
+
+
diff --git a/forms/admin/shelves/locale/ca.json b/forms/reports/shelves/locale/ca.json similarity index 100% rename from forms/admin/shelves/locale/ca.json rename to forms/reports/shelves/locale/ca.json diff --git a/forms/admin/shelves/locale/en.json b/forms/reports/shelves/locale/en.json similarity index 100% rename from forms/admin/shelves/locale/en.json rename to forms/reports/shelves/locale/en.json diff --git a/forms/admin/shelves/locale/es.json b/forms/reports/shelves/locale/es.json similarity index 100% rename from forms/admin/shelves/locale/es.json rename to forms/reports/shelves/locale/es.json diff --git a/forms/admin/shelves/locale/fr.json b/forms/reports/shelves/locale/fr.json similarity index 100% rename from forms/admin/shelves/locale/fr.json rename to forms/reports/shelves/locale/fr.json diff --git a/forms/admin/shelves/locale/mn.json b/forms/reports/shelves/locale/mn.json similarity index 100% rename from forms/admin/shelves/locale/mn.json rename to forms/reports/shelves/locale/mn.json diff --git a/forms/admin/shelves/locale/pt.json b/forms/reports/shelves/locale/pt.json similarity index 100% rename from forms/admin/shelves/locale/pt.json rename to forms/reports/shelves/locale/pt.json diff --git a/forms/admin/shelves/shelves.js b/forms/reports/shelves/shelves.js similarity index 100% rename from forms/admin/shelves/shelves.js rename to forms/reports/shelves/shelves.js diff --git a/forms/admin/shelves/style.css b/forms/reports/shelves/style.css similarity index 100% rename from forms/admin/shelves/style.css rename to forms/reports/shelves/style.css diff --git a/forms/admin/shelves/ui.xml b/forms/reports/shelves/ui.xml similarity index 100% rename from forms/admin/shelves/ui.xml rename to forms/reports/shelves/ui.xml diff --git a/js/hedera/gui.js b/js/hedera/gui.js index a4285b17..afa6a80f 100644 --- a/js/hedera/gui.js +++ b/js/hedera/gui.js @@ -175,7 +175,7 @@ module.exports = new Class ,loadMenu: function () { - var sql = 'CALL form_list ()'; + var sql = 'CALL formList ()'; this._conn.execQuery (sql, this._onMenuLoad.bind (this)); } diff --git a/js/hedera/locale/ca.json b/js/hedera/locale/ca.json index 6e8a99f0..4e07c231 100644 --- a/js/hedera/locale/ca.json +++ b/js/hedera/locale/ca.json @@ -50,6 +50,7 @@ ,"Visits": "Visites" ,"News": "Noticies" ,"Photos": "Fotos" + ,"Items": "Artícles" ,"Reports": "Informes" ,"Shelves": "Estanterías" ,"Items list": "Llistat articles" diff --git a/js/hedera/locale/en.json b/js/hedera/locale/en.json index ea6d9e3f..2f599146 100644 --- a/js/hedera/locale/en.json +++ b/js/hedera/locale/en.json @@ -50,6 +50,7 @@ ,"Visits": "Visits" ,"News": "News" ,"Photos": "Photos" + ,"Items": "Items" ,"Reports": "Reports" ,"Shelves": "Shelves" ,"Items list": "Items list" diff --git a/js/hedera/locale/es.json b/js/hedera/locale/es.json index 93a365f5..6efbf899 100644 --- a/js/hedera/locale/es.json +++ b/js/hedera/locale/es.json @@ -50,6 +50,7 @@ ,"Visits": "Visitas" ,"News": "Noticias" ,"Photos": "Fotos" + ,"Items": "Artículos" ,"Reports": "Informes" ,"Shelves": "Estanterías" ,"Items list": "Listado artículos" diff --git a/js/hedera/locale/fr.json b/js/hedera/locale/fr.json index 9ff1e6fb..e3c46d25 100644 --- a/js/hedera/locale/fr.json +++ b/js/hedera/locale/fr.json @@ -50,6 +50,7 @@ ,"Visits": "Visites" ,"News": "Nouvelles" ,"Photos": "Photos" + ,"Items": "Articles" ,"Reports": "Rapport" ,"Shelves": "Etagères" ,"Items list": "Liste des articles" diff --git a/js/hedera/locale/mn.json b/js/hedera/locale/mn.json index 425a379b..53ada016 100644 --- a/js/hedera/locale/mn.json +++ b/js/hedera/locale/mn.json @@ -50,6 +50,7 @@ ,"Visits": "уулзалт" ,"News": "мэдээ" ,"Photos": "Фото зураг" + ,"Items": "зүйл" ,"Reports": "мэдээ" ,"Shelves": "тавиур" ,"Items list": "зүйлс жагсаалт" diff --git a/js/hedera/locale/pt.json b/js/hedera/locale/pt.json index 55356558..e8fe2c92 100644 --- a/js/hedera/locale/pt.json +++ b/js/hedera/locale/pt.json @@ -50,6 +50,7 @@ ,"Visits": "Visitas" ,"News": "Noticias" ,"Photos": "Fotos" + ,"Items": "Artigos" ,"Reports": "Relatórios" ,"Shelves": "Estantes" ,"Items list": "Lista de Itens"