diff --git a/debian/changelog b/debian/changelog index 14ede21d..e3463cb9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (1.406.16) stable; urgency=low +hedera-web (1.406.17) stable; urgency=low * Initial Release. diff --git a/forms/admin/items/items.js b/forms/admin/items/items.js index 96c5e973..9f8e66e7 100644 --- a/forms/admin/items/items.js +++ b/forms/admin/items/items.js @@ -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']); + } }); - diff --git a/forms/admin/items/ui.xml b/forms/admin/items/ui.xml index 6239f459..711fdfea 100644 --- a/forms/admin/items/ui.xml +++ b/forms/admin/items/ui.xml @@ -7,20 +7,17 @@

Items

- +
- - - SELECT id, longName, size, category, image - FROM vn.item - WHERE longName LIKE CONCAT('%', #filter, '%') - OR id = #filter - ORDER BY longName LIMIT 50 - + + SELECT id, longName, size, category, image + FROM vn.item + WHERE longName LIKE CONCAT('%', #filter, '%') + OR id = #filter + ORDER BY longName LIMIT 50 diff --git a/js/htk/image-editor.js b/js/htk/image-editor.js index 010b8d66..cb31e02b 100644 --- a/js/htk/image-editor.js +++ b/js/htk/image-editor.js @@ -1,70 +1,63 @@ -var Component = require ('./component'); -var Toast = require ('./toast'); -var Tpl = require ('./image-editor.xml'); +var Component = require('./component'); +var Toast = require('./toast'); +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) - { - this.builderInitString (Tpl); + initialize: function(props) { + this.builderInitString(Tpl); var self = this; - this.$('form').onsubmit = function () - { self._onSubmit (); return false; }; + this.$('form').onsubmit = function() + { self._onSubmit(); return false; }; - this.parent (props); - } + this.parent(props); + }, - ,onNameChange: function () - { + onNameChange: function() { var newValue = this.$('name').value; if (!newValue) newValue = null - this.signalEmit ('name-changed', newValue); - } + this.signalEmit('name-changed', newValue); + }, - ,_onSubmit: function () - { + _onSubmit: function() { + this.$('hidden-name').value = this.$('name').value; this.$('submit').disabled = true; - this.$('spinner').start (); + this.$('spinner').start(); - this.conn.sendFormMultipart (this.$('form'), - this._onResponse.bind (this)); - } + this.conn.sendFormMultipart(this.$('form'), + this._onResponse.bind(this)); + }, - ,_onResponse: function (json, error) - { + _onResponse: function(json, error) { this.$('submit').disabled = false; - this.$('spinner').stop (); + this.$('spinner').stop(); if (error) throw error; - Toast.showMessage (_('ImageAdded')); - this.signalEmit ('file-uploaded', this.$('name').value); - } + 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; } diff --git a/js/htk/image-editor.xml b/js/htk/image-editor.xml index 01aca00e..4b36e302 100644 --- a/js/htk/image-editor.xml +++ b/js/htk/image-editor.xml @@ -1,13 +1,15 @@
+
+ + +
-
- - -
+ +
@@ -17,7 +19,6 @@
-
diff --git a/js/htk/style.css b/js/htk/style.css index 34585f6e..b8612dfa 100644 --- a/js/htk/style.css +++ b/js/htk/style.css @@ -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; diff --git a/package.json b/package.json index 8fd06c99..2986ec43 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hedera-web", - "version": "1.406.16", + "version": "1.406.17", "description": "Verdnatura web page", "license": "GPL-3.0", "repository": { diff --git a/rest/core/locale/ca.json b/rest/core/locale/ca.json new file mode 100644 index 00000000..3bc546a6 --- /dev/null +++ b/rest/core/locale/ca.json @@ -0,0 +1,5 @@ +{ + "InvalidAction": "Acció invàlida" + + ,"EmptyQuery": "Consulta buida" +} diff --git a/rest/core/locale/ca.yml b/rest/core/locale/ca.yml deleted file mode 100644 index fd0c7306..00000000 --- a/rest/core/locale/ca.yml +++ /dev/null @@ -1,2 +0,0 @@ -InvalidAction: Acció invàlida -EmptyQuery: Consulta buida diff --git a/rest/core/locale/en.json b/rest/core/locale/en.json new file mode 100644 index 00000000..75f9e384 --- /dev/null +++ b/rest/core/locale/en.json @@ -0,0 +1,5 @@ +{ + "InvalidAction": "Invalid action" + + ,"EmptyQuery": "Empty query" +} diff --git a/rest/core/locale/en.yml b/rest/core/locale/en.yml deleted file mode 100644 index 9418df77..00000000 --- a/rest/core/locale/en.yml +++ /dev/null @@ -1,2 +0,0 @@ -InvalidAction: Invalid action -EmptyQuery: Empty query diff --git a/rest/core/locale/es.json b/rest/core/locale/es.json new file mode 100644 index 00000000..f33bd628 --- /dev/null +++ b/rest/core/locale/es.json @@ -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" +} diff --git a/rest/core/locale/es.yml b/rest/core/locale/es.yml deleted file mode 100644 index ad0f69fc..00000000 --- a/rest/core/locale/es.yml +++ /dev/null @@ -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 diff --git a/rest/core/locale/fr.json b/rest/core/locale/fr.json new file mode 100644 index 00000000..a9a18625 --- /dev/null +++ b/rest/core/locale/fr.json @@ -0,0 +1,5 @@ +{ + "InvalidAction": "Action non valide" + + ,"EmptyQuery": "Requête vide" +} diff --git a/rest/core/locale/fr.yml b/rest/core/locale/fr.yml deleted file mode 100644 index d34f2b44..00000000 --- a/rest/core/locale/fr.yml +++ /dev/null @@ -1,2 +0,0 @@ -InvalidAction: Action non valide -EmptyQuery: Requête vide diff --git a/rest/core/locale/mn.json b/rest/core/locale/mn.json new file mode 100644 index 00000000..75f9e384 --- /dev/null +++ b/rest/core/locale/mn.json @@ -0,0 +1,5 @@ +{ + "InvalidAction": "Invalid action" + + ,"EmptyQuery": "Empty query" +} diff --git a/rest/core/locale/mn.yml b/rest/core/locale/mn.yml deleted file mode 100644 index 9418df77..00000000 --- a/rest/core/locale/mn.yml +++ /dev/null @@ -1,2 +0,0 @@ -InvalidAction: Invalid action -EmptyQuery: Empty query diff --git a/rest/core/locale/pt.json b/rest/core/locale/pt.json new file mode 100644 index 00000000..90823f48 --- /dev/null +++ b/rest/core/locale/pt.json @@ -0,0 +1,5 @@ +{ + "InvalidAction": "Ação Inválida" + + ,"EmptyQuery": "Consulta vazía" +} diff --git a/rest/core/locale/pt.yml b/rest/core/locale/pt.yml deleted file mode 100644 index e1e7d8a5..00000000 --- a/rest/core/locale/pt.yml +++ /dev/null @@ -1,2 +0,0 @@ -InvalidAction: Ação Inválida -EmptyQuery: Consulta vazía diff --git a/rest/image/locale/en.json b/rest/image/locale/en.json new file mode 100644 index 00000000..1fa3c051 --- /dev/null +++ b/rest/image/locale/en.json @@ -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" +} diff --git a/rest/image/locale/en.yml b/rest/image/locale/en.yml deleted file mode 100644 index daf21d30..00000000 --- a/rest/image/locale/en.yml +++ /dev/null @@ -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 diff --git a/rest/image/locale/es.json b/rest/image/locale/es.json new file mode 100644 index 00000000..3d51f42e --- /dev/null +++ b/rest/image/locale/es.json @@ -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" +} diff --git a/rest/image/locale/es.yml b/rest/image/locale/es.yml deleted file mode 100644 index 16a4e4a5..00000000 --- a/rest/image/locale/es.yml +++ /dev/null @@ -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 diff --git a/rest/image/locale/pt.json b/rest/image/locale/pt.json new file mode 100644 index 00000000..796bd48c --- /dev/null +++ b/rest/image/locale/pt.json @@ -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" +} diff --git a/rest/image/locale/pt.yml b/rest/image/locale/pt.yml deleted file mode 100644 index 3f072b4d..00000000 --- a/rest/image/locale/pt.yml +++ /dev/null @@ -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 diff --git a/web/locale/en.json b/web/locale/en.json new file mode 100644 index 00000000..77ef30c8 --- /dev/null +++ b/web/locale/en.json @@ -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" +} diff --git a/web/locale/en.yml b/web/locale/en.yml deleted file mode 100644 index 440d2a1d..00000000 --- a/web/locale/en.yml +++ /dev/null @@ -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 diff --git a/web/locale/es.json b/web/locale/es.json new file mode 100644 index 00000000..ff5f8aaa --- /dev/null +++ b/web/locale/es.json @@ -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" +} diff --git a/web/locale/es.yml b/web/locale/es.yml deleted file mode 100644 index 93605262..00000000 --- a/web/locale/es.yml +++ /dev/null @@ -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 diff --git a/web/locale/pt.json b/web/locale/pt.json new file mode 100644 index 00000000..9cc71037 --- /dev/null +++ b/web/locale/pt.json @@ -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" +} diff --git a/web/locale/pt.yml b/web/locale/pt.yml deleted file mode 100644 index 110cfeac..00000000 --- a/web/locale/pt.yml +++ /dev/null @@ -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