0
1
Fork 0

Bugs solved on images, server locale files rolled back to json

This commit is contained in:
Juan 2018-08-24 15:20:18 +02:00
parent 9394ca8c51
commit 1ade47299a
31 changed files with 183 additions and 159 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (1.406.16) stable; urgency=low
hedera-web (1.406.17) stable; urgency=low
* Initial Release.

View File

@ -1,6 +1,8 @@
Hedera.Items = new Class
({
Extends: Hedera.Form
Hedera.Items = new Class({
Extends: Hedera.Form,
activate: function() {
this.$('items').setInfo('item', 'item', 'vn', ['id']);
}
});

View File

@ -7,20 +7,17 @@
<h1><t>Items</t></h1>
</div>
<div id="actions">
<htk-search-entry
param="filter"/>
<htk-search-entry param="filter"/>
</div>
<div id="form" class="items">
<div class="rows box">
<htk-repeater form-id="iter" empty-message="_Enter a search term">
<db-model property="model">
<custom>
<db-model property="model" id="items">
SELECT id, longName, size, category, image
FROM vn.item
WHERE longName LIKE CONCAT('%', #filter, '%')
OR id = #filter
ORDER BY longName LIMIT 50
</custom>
<sql-batch property="batch">
<custom>
<item name="filter" param="filter"/>

View File

@ -7,22 +7,18 @@ var Tpl = require ('./image-editor.xml');
* A form to handle the image database, it allows to add new images or
* replace it.
**/
module.exports = new Class
({
Extends: Component
,Properties:
{
module.exports = new Class({
Extends: Component,
Properties: {
/**
* The REST connection used to upload the image.
**/
conn:
{
conn: {
type: Vn.JsonConnection
}
}
},
,initialize: function (props)
{
initialize: function(props) {
this.builderInitString(Tpl);
var self = this;
@ -30,29 +26,27 @@ module.exports = new Class
{ self._onSubmit(); return false; };
this.parent(props);
}
},
,onNameChange: function ()
{
onNameChange: function() {
var newValue = this.$('name').value;
if (!newValue)
newValue = null
this.signalEmit('name-changed', newValue);
}
},
,_onSubmit: function ()
{
_onSubmit: function() {
this.$('hidden-name').value = this.$('name').value;
this.$('submit').disabled = true;
this.$('spinner').start();
this.conn.sendFormMultipart(this.$('form'),
this._onResponse.bind(this));
}
},
,_onResponse: function (json, error)
{
_onResponse: function(json, error) {
this.$('submit').disabled = false;
this.$('spinner').stop();
@ -61,10 +55,9 @@ module.exports = new Class
Toast.showMessage(_('ImageAdded'));
this.signalEmit('file-uploaded', this.$('name').value);
}
},
,setData: function (image, directory)
{
setData: function(image, directory) {
this.$('name').value = image;
this.$('schema').value = directory;
}

View File

@ -1,13 +1,15 @@
<vn>
<div id="main" class="htk-image-editor">
<div class="form-group">
<label for="name"><t>FileName</t></label>
<input id="name" type="text" on-change="onNameChange"/>
</div>
<form
id="form"
enctype="multipart/form-data">
<input type="hidden" name="srv" value="json:image/upload"/>
<div class="form-group">
<label for="name"><t>FileName</t></label>
<input id="name" type="text" name="name" on-change="onNameChange"/>
</div>
<input type="hidden" name="schema" id="schema"/>
<input type="hidden" name="name" id="hidden-name"/>
<div class="form-group">
<label for="file"><t>File</t></label>
<input id="file" type="file" name="image"/>
@ -17,7 +19,6 @@
<htk-spinner id="spinner"/>
<div class="clear"/>
</div>
<input id="schema" type="hidden" name="schema"/>
</form>
</div>
</vn>

View File

@ -340,8 +340,9 @@ td.cell-image .htk-image
.htk-image-editor
{
width: 20em;
width: 18em;
margin: 0 auto;
padding: 1.5em;
}
.htk-image-editor h2
{
@ -358,10 +359,6 @@ td.cell-image .htk-image
{
display: none;
}
.htk-image-editor form
{
padding: 1.5em;
}
.htk-image-editor .footer
{
margin-top: 2em;

View File

@ -1,6 +1,6 @@
{
"name": "hedera-web",
"version": "1.406.16",
"version": "1.406.17",
"description": "Verdnatura web page",
"license": "GPL-3.0",
"repository": {

5
rest/core/locale/ca.json Normal file
View File

@ -0,0 +1,5 @@
{
"InvalidAction": "Acció invàlida"
,"EmptyQuery": "Consulta buida"
}

View File

@ -1,2 +0,0 @@
InvalidAction: Acció invàlida
EmptyQuery: Consulta buida

5
rest/core/locale/en.json Normal file
View File

@ -0,0 +1,5 @@
{
"InvalidAction": "Invalid action"
,"EmptyQuery": "Empty query"
}

View File

@ -1,2 +0,0 @@
InvalidAction: Invalid action
EmptyQuery: Empty query

7
rest/core/locale/es.json Normal file
View File

@ -0,0 +1,7 @@
{
"InvalidAction": "Acción inválida"
,"EmptyQuery": "Consulta vacía"
,"Invalid password": "Contraseña inválida"
,"Password does not meet requirements":
"La nueva contraseña no reune los requisitos de seguridad necesarios"
}

View File

@ -1,4 +0,0 @@
InvalidAction: Acción inválida
EmptyQuery: Consulta vacía
Invalid password: Contraseña inválida
Password does not meet requirements: La nueva contraseña no reune los requisitos de seguridad necesarios

5
rest/core/locale/fr.json Normal file
View File

@ -0,0 +1,5 @@
{
"InvalidAction": "Action non valide"
,"EmptyQuery": "Requête vide"
}

View File

@ -1,2 +0,0 @@
InvalidAction: Action non valide
EmptyQuery: Requête vide

5
rest/core/locale/mn.json Normal file
View File

@ -0,0 +1,5 @@
{
"InvalidAction": "Invalid action"
,"EmptyQuery": "Empty query"
}

View File

@ -1,2 +0,0 @@
InvalidAction: Invalid action
EmptyQuery: Empty query

5
rest/core/locale/pt.json Normal file
View File

@ -0,0 +1,5 @@
{
"InvalidAction": "Ação Inválida"
,"EmptyQuery": "Consulta vazía"
}

View File

@ -1,2 +0,0 @@
InvalidAction: Ação Inválida
EmptyQuery: Consulta vazía

28
rest/image/locale/en.json Normal file
View File

@ -0,0 +1,28 @@
{
"Cant lock cache": "The cache could not be blocked"
,"Bad file format": "Unrecognized file format"
,"File not choosed": "You have not selected any file"
,"Permission denied": "You are not allowed to upload the file"
,"File upload error": "Failed to upload the file, check that size is not too large"
,"File save error": "Failed to save the file: %s"
,"File size error": "The file must be no longer than %.2f MB"
,"Bad file name": "The file name must contain only lowercase letters, digits or the '_' character"
,"Bad schema name": "Invalid schema name"
,"Schema not exists": "Schema does not exist"
,"Unreferenced file": "The file is not referenced by the database"
,"Com error": "Error communicating with the server"
,"Image open error": "Error opening the image file"
,"Operation disabled": "Operation disabled for security"
,"Image added": "Image added correctly"
,"ErrIniSize": "File exceeds the upload_max_filesize directive in php.ini"
,"ErrFormSize": "File exceeds the MAX_FILE_SIZE specified in the HTML form"
,"ErrPartial": "File was partially uploaded"
,"ErrNoFile": "No file was uploaded"
,"ErrNoTmpDir": "Missing a temporary folder"
,"ErrCantWrite": "Failed to write file to disk"
,"ErrExtension": "File upload stopped by extension"
,"ErrDefault": "Unknown upload error"
,"Sync complete": "Synchronization complete"
}

View File

@ -1,24 +0,0 @@
Cant lock cache: The cache could not be blocked
Bad file format: Unrecognized file format
File not choosed: You have not selected any file
Permission denied: You are not allowed to upload the file
File upload error: 'Failed to upload the file, check that size is not too large'
File save error: 'Failed to save the file: %s'
File size error: The file must be no longer than %.2f MB
Bad file name: 'The file name must contain only lowercase letters, digits or the ''_'' character'
Bad schema name: Invalid schema name
Schema not exists: Schema does not exist
Unreferenced file: The file is not referenced by the database
Com error: Error communicating with the server
Image open error: Error opening the image file
Operation disabled: Operation disabled for security
Image added: Image added correctly
ErrIniSize: File exceeds the upload_max_filesize directive in php.ini
ErrFormSize: File exceeds the MAX_FILE_SIZE specified in the HTML form
ErrPartial: File was partially uploaded
ErrNoFile: No file was uploaded
ErrNoTmpDir: Missing a temporary folder
ErrCantWrite: Failed to write file to disk
ErrExtension: File upload stopped by extension
ErrDefault: Unknown upload error
Sync complete: Synchronization complete

28
rest/image/locale/es.json Normal file
View File

@ -0,0 +1,28 @@
{
"Cant lock cache": "La caché no pudo ser bloqueada"
,"Bad file format": "Formato de archivo no reconocido"
,"File not choosed": "No has seleccionado ningún archivo"
,"Permission denied": "No tienes permiso para subir el fichero"
,"File upload error": "Error al subir el fichero, comprueba que su tamaño no sea demasiado grande"
,"File save error": "Error al guardar el fichero: %s"
,"File size error": "El fichero no debe ocupar más de %.2f MB"
,"Bad file name": "El nombre del archivo solo debe contener letras minúsculas, dígitos o el carácter '_'"
,"Bad schema name": "Nombre de esquema no válido"
,"Schema not exists": "El esquema no existe"
,"Unreferenced file": "El archivo no está referenciado por la base de datos"
,"Com error": "Error en la comunicación con el servidor"
,"Image open error": "Error al abrir el archivo de imagen"
,"Operation disabled": "Operación deshabilitada por seguridad"
,"Image added": "Imagen añadida correctamente"
,"ErrIniSize": "File exceeds the upload_max_filesize directive in php.ini"
,"ErrFormSize": "File exceeds the MAX_FILE_SIZE specified in the HTML form"
,"ErrPartial": "File was partially uploaded"
,"ErrNoFile": "No file was uploaded"
,"ErrNoTmpDir": "Missing a temporary folder"
,"ErrCantWrite": "Failed to write file to disk"
,"ErrExtension": "File upload stopped by extension"
,"ErrDefault": "Unknown upload error"
,"Sync complete": "Sincronización completada"
}

View File

@ -1,26 +0,0 @@
Cant lock cache: La caché no pudo ser bloqueada
Bad file format: Formato de archivo no reconocido
File not choosed: No has seleccionado ningún archivo
Permission denied: No tienes permiso para subir el fichero
File upload error: 'Error al subir el fichero, comprueba que su tamaño no sea demasiado grande'
File save error: 'Error al guardar el fichero: %s'
File size error: El fichero no debe ocupar más de %.2f MB
Bad file name: >-
El nombre del archivo solo debe contener letras minúsculas, dígitos o el
carácter '_'
Bad schema name: Nombre de esquema no válido
Schema not exists: El esquema no existe
Unreferenced file: El archivo no está referenciado por la base de datos
Com error: Error en la comunicación con el servidor
Image open error: Error al abrir el archivo de imagen
Operation disabled: Operación deshabilitada por seguridad
Image added: Imagen añadida correctamente
ErrIniSize: File exceeds the upload_max_filesize directive in php.ini
ErrFormSize: File exceeds the MAX_FILE_SIZE specified in the HTML form
ErrPartial: File was partially uploaded
ErrNoFile: No file was uploaded
ErrNoTmpDir: Missing a temporary folder
ErrCantWrite: Failed to write file to disk
ErrExtension: File upload stopped by extension
ErrDefault: Unknown upload error
Sync complete: Sincronización completada

28
rest/image/locale/pt.json Normal file
View File

@ -0,0 +1,28 @@
{
"Cant lock cache": "O cache não pôde ser bloqueado"
,"Bad file format": "Formato de arquivo inválido"
,"File not choosed": "Não selecionastes nenhum arquivo"
,"Permission denied": "Não estas autorizado a subir o arquivo"
,"File upload error": "Erro ao subir o arquivo, verifique o tamanho"
,"File save error": "Erro ao salvar o arquivo: %s"
,"File size error": "O arquivo não deve ser maior que: %.2f MB"
,"Bad file name": "O nome do arquivo deve conter somente letras minusculas, numeros ou '_' "
,"Bad schema name": "Nome de esquema inválido"
,"Schema not exists": "Esquema não existe"
,"Unreferenced file": "O arquivo não é referenciado pelo banco de dados"
,"Com error": "Erro de comunicação com o servidor"
,"Image open error": "Erro ao abrir a imagem"
,"Operation disabled": "Operação desativada por segurança"
,"Image added": "Imagem adicionada corretamente"
,"ErrIniSize": "Arquivo supera o tamanho maximo de protocolo em php.ini"
,"ErrFormSize": "Arquivo supera o tamanho maximo de protocolo em HTML form"
,"ErrPartial": "Arquivo subido parcialmente"
,"ErrNoFile": "Nenhum arquivo subido"
,"ErrNoTmpDir": "Falta a pasta de arquivo temporal"
,"ErrCantWrite": "Erro ao gravar arquivo no disco"
,"ErrExtension": "Erro de extensão do arquivo"
,"ErrDefault": "Erro desconhecido ao subir arquivo"
,"Sync complete": "Sincronização completa"
}

View File

@ -1,24 +0,0 @@
Cant lock cache: O cache não pôde ser bloqueado
Bad file format: Formato de arquivo inválido
File not choosed: Não selecionastes nenhum arquivo
Permission denied: Não estas autorizado a subir o arquivo
File upload error: 'Erro ao subir o arquivo, verifique o tamanho'
File save error: 'Erro ao salvar o arquivo: %s'
File size error: 'O arquivo não deve ser maior que: %.2f MB'
Bad file name: 'O nome do arquivo deve conter somente letras minusculas, numeros ou ''_'' '
Bad schema name: Nome de esquema inválido
Schema not exists: Esquema não existe
Unreferenced file: O arquivo não é referenciado pelo banco de dados
Com error: Erro de comunicação com o servidor
Image open error: Erro ao abrir a imagem
Operation disabled: Operação desativada por segurança
Image added: Imagem adicionada corretamente
ErrIniSize: Arquivo supera o tamanho maximo de protocolo em php.ini
ErrFormSize: Arquivo supera o tamanho maximo de protocolo em HTML form
ErrPartial: Arquivo subido parcialmente
ErrNoFile: Nenhum arquivo subido
ErrNoTmpDir: Falta a pasta de arquivo temporal
ErrCantWrite: Erro ao gravar arquivo no disco
ErrExtension: Erro de extensão do arquivo
ErrDefault: Erro desconhecido ao subir arquivo
Sync complete: Sincronização completa

5
web/locale/en.json Normal file
View File

@ -0,0 +1,5 @@
{
"Something went wrong": "Something went wrong"
,"You don't have enough privileges": "You don't have enough privileges"
,"Missing parameters": "Missing parameters"
}

View File

@ -1,3 +0,0 @@
Something went wrong: Something went wrong
You don't have enough privileges: You don't have enough privileges
Missing parameters: Missing parameters

5
web/locale/es.json Normal file
View File

@ -0,0 +1,5 @@
{
"Something went wrong": "Algo salió mal"
,"You don't have enough privileges": "No tienes suficientes privilegios"
,"Missing parameters": "Faltan parámetros"
}

View File

@ -1,3 +0,0 @@
Something went wrong: Algo salió mal
You don't have enough privileges: No tienes suficientes privilegios
Missing parameters: Faltan parámetros

5
web/locale/pt.json Normal file
View File

@ -0,0 +1,5 @@
{
"Something went wrong": "Algo deu errado"
,"You don't have enough privileges": "Não tens previlegios suficientes"
,"Missing parameters": "Faltam parametros"
}

View File

@ -1,3 +0,0 @@
Something went wrong: Algo deu errado
You don't have enough privileges: Não tens previlegios suficientes
Missing parameters: Faltam parametros