Merge branch 'images'

This commit is contained in:
Juan Ferrer Toribio 2017-05-09 14:03:20 +02:00
commit c8816fad3e
41 changed files with 307 additions and 165 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (1.403-deb8) stable; urgency=low hedera-web (1.404-deb8) stable; urgency=low
* Initial Release. * Initial Release.

View File

@ -2,22 +2,5 @@
Hedera.Items = new Class Hedera.Items = new Class
({ ({
Extends: Hedera.Form 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);
}
}); });

View File

@ -0,0 +1,4 @@
{
"Items": "Artícles",
"Enter a search term": "Introdueix un terme de cerca"
}

11
forms/admin/items/locale/en.json Normal file → Executable file
View File

@ -1,9 +1,4 @@
{ {
"Item list": "Item list" "Items": "Items",
"Enter a search term": "Enter a search term"
,"Store": "Store" }
,"Realm": "Realm"
,"Rate": "Rate"
,"Preview": "Preview"
}

9
forms/admin/items/locale/es.json Normal file → Executable file
View File

@ -1,9 +1,4 @@
{ {
"Item list": "Listado de artículos" "Items": "Artículos",
"Enter a search term": "Introduce un término de búsqueda"
,"Store": "Almacén"
,"Realm": "Reino"
,"Rate": "Tarifa"
,"Preview": "Mostrar"
} }

View File

@ -0,0 +1,4 @@
{
"Items": "Articles",
"Enter a search term": "Entrez un terme de recherche"
}

11
forms/admin/items/locale/mn.json Normal file → Executable file
View File

@ -1,9 +1,4 @@
{ {
"Item list": "Item list" "Items": "Items",
"Enter a search term": "Enter a search term"
,"Store": "Store" }
,"Realm": "Realm"
,"Rate": "Rate"
,"Preview": "Preview"
}

View File

@ -1,9 +1,4 @@
{ {
"Item list": "Lista de Ítens" "Items": "Artigos",
"Enter a search term": "Digite um termo de pesquisa"
,"Store": "Armazém" }
,"Realm": "Reino"
,"Rate": "Tarifa"
,"Preview": "Mostrar"
}

View File

@ -1,43 +1,42 @@
.items .items
{ {
padding: 1em; padding: 1em;
} }
.items .box .items .box
{
max-width: 30em;
padding: 2em;
}
.items .form
{ {
max-width: 25em; max-width: 25em;
margin: auto; margin: 0 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%;
} }
/* Footer */ /* Row */
.items .footer .items .row
{ {
text-align: center; padding: 1em;
margin-top: 1.5em; 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;
} }

View File

@ -1,49 +1,58 @@
<vn> <vn>
<vn-group>
<vn-param id="filter"/>
<vn-hash-param key="filter" param="filter"/>
</vn-group>
<div id="title"> <div id="title">
<h1><t>Item list</t></h1> <h1><t>Items</t></h1>
</div> </div>
<div id="actions" class="action-bar"> <div id="actions">
<htk-bar-button <htk-search-entry
icon="print" param="filter"/>
tip="_Preview"
on-click="onPreviewClick"/>
</div> </div>
<div id="form" class="items"> <div id="form" class="items">
<div class="box"> <div class="rows box">
<div class="form"> <htk-repeater form-id="iter" empty-message="_Enter a search term">
<div class="form-group"> <db-model property="model">
<label><t>Store</t></label> <custom>
<htk-combo> SELECT Id_Article, Article, Medida, Categoria, Foto
<vn-param property="param" id="warehouse"/> FROM vn2008.Articles
<db-model property="model"> WHERE Article LIKE CONCAT('%', #filter, '%')
<custom> OR Id_Article = #filter
SELECT id, name FROM vn2008.warehouse ORDER BY Article LIMIT 50
WHERE reserve ORDER BY name </custom>
</custom> <sql-batch property="batch">
</db-model> <custom>
</htk-combo> <item name="filter" param="filter"/>
</div> </custom>
<div class="form-group"> </sql-batch>
<label><t>Realm</t></label> </db-model>
<htk-combo not-null="false"> <custom>
<vn-param property="param" id="realm"/> <div class="row">
<db-model property="model"> <htk-image
<custom> form="iter"
SELECT id, reino FROM vn2008.reinos column="Foto"
WHERE display != FALSE ORDER BY reino class="photo"
</custom> directory="catalog"
</db-model> subdir="200x200"
</htk-combo> full-dir="900x900"
</div> editable="true"
<div class="form-group"> conn="conn"/>
<label><t>Rate</t></label> <p class="concept">
<select id="rate"> <htk-text form="iter" column="Article"/>
<option>3</option> <htk-text form="iter" column="Medida"/>
<option>2</option> <htk-text form="iter" column="Categoria"/>
<option>1</option> </p>
</select> <p>
</div> <htk-text form="iter" column="Id_Article"/>
</div> </p>
<p>
<htk-text form="iter" column="Foto"/>
</p>
<div class="clear"/>
</div>
</custom>
</htk-repeater>
</div> </div>
</div> </div>
</vn> </vn>

View File

@ -1,12 +1,13 @@
{ {
"Photos": "Fotos" "Images": "Imatges"
,"Collection": "Colección" ,"Collection": "Col·lecció"
,"ImageName": "Nom de la imatge" ,"Click or drop files here": "Prem o deixa anar els arxius aquí"
,"Id": "Id"
,"ImageFile": "Arxiu d'imatge"
,"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"
} }

View File

@ -1,12 +1,13 @@
{ {
"Photos": "Photos" "Images": "Images"
,"Collection": "Collection" ,"Collection": "Collection"
,"ImageName": "Image name" ,"Click or drop files here": "Click or drop files here"
,"Id": "Id"
,"ImageFile": "Image file"
,"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"
}

View File

@ -1,12 +1,13 @@
{ {
"Photos": "Fotos" "Images": "Imágenes"
,"Collection": "Colección" ,"Collection": "Colección"
,"ImageName": "Nombre de la imagen" ,"Click or drop files here": "Pulsa o suelta los archivos aquí"
,"Id": "Id"
,"ImageFile": "Archivo de imagen"
,"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"
} }

View File

@ -1,12 +1,13 @@
{ {
"Photos": "Photos" "Images": "Images"
,"Collection": "Collection" ,"Collection": "Collection"
,"ImageName": "Nom de l'image" ,"Click or drop files here": "Cliquez ici ou déposer des fichiers"
,"Id": "Id"
,"ImageFile": "Fichier image"
,"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"
}

View File

@ -1,12 +1,13 @@
{ {
"Photos": "Photos" "Images": "Images"
,"Collection": "цуглуулга" ,"Collection": "Collection"
,"ImageName": "Image name" ,"Click or drop files here": "Click or drop files here"
,"Id": "Id"
,"ImageFile": "Image file"
,"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"
}

View File

@ -1,12 +1,13 @@
{ {
"Photos": "Fotos" "Images": "Imagens"
,"Collection": "Coleção" ,"Collection": "Coleção"
,"ImageName": "Nome da imagem" ,"Click or drop files here": "Clique ou soltar arquivos aqui"
,"Id": "Id"
,"ImageFile": "Arquivo de imagem"
,"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"
}

View File

@ -90,7 +90,7 @@ Hedera.Photos = new Class
} }
if (count === 0) 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) ,onFileUpload: function (fileData, data, error)

View File

@ -1,6 +1,6 @@
<vn> <vn>
<div id="title"> <div id="title">
<h1><t>Photos</t></h1> <h1><t>Images</t></h1>
</div> </div>
<div id="form" class="photos"> <div id="form" class="photos">
<div class="box"> <div class="box">
@ -22,7 +22,7 @@
on-drop="onDrop" on-drop="onDrop"
on-dragend="onDragEnd" on-dragend="onDragEnd"
on-click="onDropzoneClick"> on-click="onDropzoneClick">
Click or drop files here! <t>Click or drop files here</t>
</div> </div>
<input <input
id="file" id="file"

View File

@ -0,0 +1,23 @@
Hedera.ItemsForm = 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);
}
});

View File

@ -0,0 +1,9 @@
{
"Item list": "Item list"
,"Store": "Store"
,"Realm": "Realm"
,"Rate": "Rate"
,"Preview": "Preview"
}

View File

@ -0,0 +1,9 @@
{
"Item list": "Listado de artículos"
,"Store": "Almacén"
,"Realm": "Reino"
,"Rate": "Tarifa"
,"Preview": "Mostrar"
}

View File

@ -0,0 +1,9 @@
{
"Item list": "Item list"
,"Store": "Store"
,"Realm": "Realm"
,"Rate": "Rate"
,"Preview": "Preview"
}

View File

@ -0,0 +1,9 @@
{
"Item list": "Lista de Ítens"
,"Store": "Armazém"
,"Realm": "Reino"
,"Rate": "Tarifa"
,"Preview": "Mostrar"
}

View File

@ -0,0 +1,43 @@
.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%;
}
/* Footer */
.items .footer
{
text-align: center;
margin-top: 1.5em;
}
.items .footer > button
{
margin: 0 .2em;
}

49
forms/reports/items-form/ui.xml Executable file
View File

@ -0,0 +1,49 @@
<vn>
<div id="title">
<h1><t>Item list</t></h1>
</div>
<div id="actions" class="action-bar">
<htk-bar-button
icon="print"
tip="_Preview"
on-click="onPreviewClick"/>
</div>
<div id="form" class="items">
<div class="box">
<div class="form">
<div class="form-group">
<label><t>Store</t></label>
<htk-combo>
<vn-param property="param" id="warehouse"/>
<db-model property="model">
<custom>
SELECT id, name FROM vn2008.warehouse
WHERE reserve ORDER BY name
</custom>
</db-model>
</htk-combo>
</div>
<div class="form-group">
<label><t>Realm</t></label>
<htk-combo not-null="false">
<vn-param property="param" id="realm"/>
<db-model property="model">
<custom>
SELECT id, reino FROM vn2008.reinos
WHERE display != FALSE ORDER BY reino
</custom>
</db-model>
</htk-combo>
</div>
<div class="form-group">
<label><t>Rate</t></label>
<select id="rate">
<option>3</option>
<option>2</option>
<option>1</option>
</select>
</div>
</div>
</div>
</div>
</vn>

View File

@ -175,7 +175,7 @@ module.exports = new Class
,loadMenu: function () ,loadMenu: function ()
{ {
var sql = 'CALL form_list ()'; var sql = 'CALL formList ()';
this._conn.execQuery (sql, this._onMenuLoad.bind (this)); this._conn.execQuery (sql, this._onMenuLoad.bind (this));
} }

View File

@ -50,6 +50,7 @@
,"Visits": "Visites" ,"Visits": "Visites"
,"News": "Noticies" ,"News": "Noticies"
,"Photos": "Fotos" ,"Photos": "Fotos"
,"Items": "Artícles"
,"Reports": "Informes" ,"Reports": "Informes"
,"Shelves": "Estanterías" ,"Shelves": "Estanterías"
,"Items list": "Llistat articles" ,"Items list": "Llistat articles"

View File

@ -50,6 +50,7 @@
,"Visits": "Visits" ,"Visits": "Visits"
,"News": "News" ,"News": "News"
,"Photos": "Photos" ,"Photos": "Photos"
,"Items": "Items"
,"Reports": "Reports" ,"Reports": "Reports"
,"Shelves": "Shelves" ,"Shelves": "Shelves"
,"Items list": "Items list" ,"Items list": "Items list"

View File

@ -50,6 +50,7 @@
,"Visits": "Visitas" ,"Visits": "Visitas"
,"News": "Noticias" ,"News": "Noticias"
,"Photos": "Fotos" ,"Photos": "Fotos"
,"Items": "Artículos"
,"Reports": "Informes" ,"Reports": "Informes"
,"Shelves": "Estanterías" ,"Shelves": "Estanterías"
,"Items list": "Listado artículos" ,"Items list": "Listado artículos"

View File

@ -50,6 +50,7 @@
,"Visits": "Visites" ,"Visits": "Visites"
,"News": "Nouvelles" ,"News": "Nouvelles"
,"Photos": "Photos" ,"Photos": "Photos"
,"Items": "Articles"
,"Reports": "Rapport" ,"Reports": "Rapport"
,"Shelves": "Etagères" ,"Shelves": "Etagères"
,"Items list": "Liste des articles" ,"Items list": "Liste des articles"

View File

@ -50,6 +50,7 @@
,"Visits": "уулзалт" ,"Visits": "уулзалт"
,"News": "мэдээ" ,"News": "мэдээ"
,"Photos": "Фото зураг" ,"Photos": "Фото зураг"
,"Items": "зүйл"
,"Reports": "мэдээ" ,"Reports": "мэдээ"
,"Shelves": "тавиур" ,"Shelves": "тавиур"
,"Items list": "зүйлс жагсаалт" ,"Items list": "зүйлс жагсаалт"

View File

@ -50,6 +50,7 @@
,"Visits": "Visitas" ,"Visits": "Visitas"
,"News": "Noticias" ,"News": "Noticias"
,"Photos": "Fotos" ,"Photos": "Fotos"
,"Items": "Artigos"
,"Reports": "Relatórios" ,"Reports": "Relatórios"
,"Shelves": "Estantes" ,"Shelves": "Estantes"
,"Items list": "Lista de Itens" ,"Items list": "Lista de Itens"