Subir imágenes Beta II

This commit is contained in:
Juan Ferrer Toribio 2017-05-09 14:03:06 +02:00
parent 248c033806
commit bda508ec7d
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.

View File

@ -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);
}
});

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"
,"Store": "Store"
,"Realm": "Realm"
,"Rate": "Rate"
,"Preview": "Preview"
}
"Items": "Items",
"Enter a search term": "Enter a search term"
}

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

@ -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"
}

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"
,"Store": "Store"
,"Realm": "Realm"
,"Rate": "Rate"
,"Preview": "Preview"
}
"Items": "Items",
"Enter a search term": "Enter a search term"
}

View File

@ -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"
}

View File

@ -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;
}

View File

@ -1,49 +1,58 @@
<vn>
<vn-group>
<vn-param id="filter"/>
<vn-hash-param key="filter" param="filter"/>
</vn-group>
<div id="title">
<h1><t>Item list</t></h1>
<h1><t>Items</t></h1>
</div>
<div id="actions" class="action-bar">
<htk-bar-button
icon="print"
tip="_Preview"
on-click="onPreviewClick"/>
<div id="actions">
<htk-search-entry
param="filter"/>
</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 class="rows box">
<htk-repeater form-id="iter" empty-message="_Enter a search term">
<db-model property="model">
<custom>
SELECT Id_Article, Article, Medida, Categoria, Foto
FROM vn2008.Articles
WHERE Article LIKE CONCAT('%', #filter, '%')
OR Id_Article = #filter
ORDER BY Article LIMIT 50
</custom>
<sql-batch property="batch">
<custom>
<item name="filter" param="filter"/>
</custom>
</sql-batch>
</db-model>
<custom>
<div class="row">
<htk-image
form="iter"
column="Foto"
class="photo"
directory="catalog"
subdir="200x200"
full-dir="900x900"
editable="true"
conn="conn"/>
<p class="concept">
<htk-text form="iter" column="Article"/>
<htk-text form="iter" column="Medida"/>
<htk-text form="iter" column="Categoria"/>
</p>
<p>
<htk-text form="iter" column="Id_Article"/>
</p>
<p>
<htk-text form="iter" column="Foto"/>
</p>
<div class="clear"/>
</div>
</custom>
</htk-repeater>
</div>
</div>
</vn>

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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)

View File

@ -1,6 +1,6 @@
<vn>
<div id="title">
<h1><t>Photos</t></h1>
<h1><t>Images</t></h1>
</div>
<div id="form" class="photos">
<div class="box">
@ -22,7 +22,7 @@
on-drop="onDrop"
on-dragend="onDragEnd"
on-click="onDropzoneClick">
Click or drop files here!
<t>Click or drop files here</t>
</div>
<input
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 ()
{
var sql = 'CALL form_list ()';
var sql = 'CALL formList ()';
this._conn.execQuery (sql, this._onMenuLoad.bind (this));
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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