0
1
Fork 0

Merge pull request '3971-modernizeStyle' (#6) from 3971-modernizeStyle into test

Reviewed-on: verdnatura/hedera-web#6
This commit is contained in:
Juan Ferrer 2022-05-26 08:02:24 +00:00
commit 09e418da95
263 changed files with 15924 additions and 17343 deletions

2
debian/changelog vendored
View File

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

View File

@ -3,39 +3,39 @@ Hedera.AddressList = new Class
({
Extends: Hedera.Form
,activate: function ()
{
this.$('user-model').setInfo ('c', 'myClient', 'hedera');
this.$('addresses').setInfo ('a', 'myAddress', 'hedera');
,activate: function() {
this.$('user-model').setInfo('c', 'myClient', 'hedera');
this.$('addresses').setInfo('a', 'myAddress', 'hedera');
}
,onAddAddressClick: function ()
{
this.hash.set ({
,onAddAddressClick: function() {
this.hash.set({
form: 'account/address',
address: 0
});
}
,onReturnClick: function ()
{
,onReturnClick: function() {
window.history.back();
}
,onSetDefaultClick: function(event, addressId) {
if (event.defaultPrevented) return;
this.$('defaultAddress').value = addressId;
Htk.Toast.showMessage(_('DefaultAddressModified'));
}
,onRemoveAddressClick: function (button, form)
{
if (confirm (_('AreYouSureDeleteAddress')))
{
form.set ('isActive', false);
form.refresh ();
,onRemoveAddressClick: function(form) {
if (confirm(_('AreYouSureDeleteAddress'))) {
form.set('isActive', false);
form.refresh();
}
}
,onEditAddressClick: function (button, form)
{
this.hash.set ({
,onEditAddressClick: function(id) {
this.hash.set({
form: 'account/address',
address: form.get ('id')
address: id
});
}
});

View File

@ -5,3 +5,4 @@ SetAsDefault: Establir com per defecte
RemoveAddress: Esborrar direcció
EditAddress: Modificar direcció
AreYouSureDeleteAddress: Estàs segur de que vols eliminar la direcció?
DefaultAddressModified: Adreça per defecte modificada

View File

@ -5,3 +5,4 @@ SetAsDefault: Set as default
RemoveAddress: Remove address
EditAddress: Edit address
AreYouSureDeleteAddress: Are you sure you want to delete the address?
DefaultAddressModified: Default address modified

View File

@ -5,3 +5,4 @@ SetAsDefault: Establecer como predeterminada
RemoveAddress: Borrar dirección
EditAddress: Modificar dirección
AreYouSureDeleteAddress: ¿Estás seguro de que quieres borrar la dirección?
DefaultAddressModified: Dirección por defecto modificada

View File

@ -5,3 +5,4 @@ SetAsDefault: Définir par défaut
RemoveAddress: Supprimer l'adresse
EditAddress: Changement d'adresse
AreYouSureDeleteAddress: Souhaitez-vous vraiment supprier l'adresse?
DefaultAddressModified: Adresse par défaut modifiée

View File

@ -5,3 +5,4 @@ SetAsDefault: Selecionar como pre-determinado
RemoveAddress: Eliminar Morada
EditAddress: Modificar Morada
AreYouSureDeleteAddress: Tens certeza que queres eliminar esta morada?
DefaultAddressModified: Endereço padrão modificado

View File

@ -1,48 +1,4 @@
.address-list
{
padding: 1em;
}
.address-list .box
{
max-width: 30em;
}
.address-list .form
{
margin: 0 auto;
max-width: 25em;
padding: 2em;
}
.address
{
padding: 1em;
border-bottom: 1px solid #DDD;
}
.address p
{
margin: 0.2em 0;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.address p.important
{
font-size: 1.2em;
}
.address .actions
{
float: right;
}
.address .actions > .htk-button
{
margin: 0;
}
.address .actions > *
{
display: inline-block;
vertical-align: middle;
}
.address .actions > input
{
margin: .6em;
.address-list .htk-list .side {
padding-right: 16px;
}

View File

@ -25,46 +25,47 @@
<htk-bar-button
icon="add"
tip="_AddAddress"
on-click="onAddAddressClick"/>
on-click="this.onAddAddressClick()"/>
</div>
<div id="form" class="address-list">
<div class="box">
<div class="box vn-w-sm">
<htk-radio-group
id="default-address"
column="defaultAddressFk"
form="user-form"/>
<htk-repeater model="addresses" form-id="iter">
<htk-repeater model="addresses" form-id="address" class="htk-list">
<custom>
<div class="address">
<div class="actions">
<div class="item clickable" on-click="this.onSetDefaultClick($event, address.id)">
<div class="side">
<htk-radio
form="iter"
column="id"
radio-group="default-address"
tip="_SetAsDefault"/>
<htk-button
form="iter"
column="id"
tip="_RemoveAddress"
icon="delete"
on-click="onRemoveAddressClick"/>
<htk-button
form="iter"
column="id"
tip="_EditAddress"
icon="edit"
on-click="onEditAddressClick"/>
val="{{address.id}}"
tip="_SetAsDefault"
name="test"/>
</div>
<div class="content">
<p class="important">
{{address.nickname}}
</p>
<p>
{{address.street}}
</p>
<p>
{{address.postalCode}}, {{address.city}}
</p>
</div>
<div
class="actions"
on-click="$event.preventDefault()">
<htk-button
icon="delete"
tip="_RemoveAddress"
on-click="this.onRemoveAddressClick($.address)"/>
<htk-button
icon="edit"
tip="_EditAddress"
on-click="this.onEditAddressClick(address.id)"/>
</div>
<p class="important">
<htk-text form="iter" column="nickname"/>
</p>
<p>
<htk-text form="iter" column="street"/>
</p>
<p>
<htk-text form="iter" column="postalCode"/>,
<htk-text form="iter" column="city"/>
</p>
</div>
</custom>
</htk-repeater>

View File

@ -8,9 +8,9 @@ Hedera.Address = new Class({
new Sql.Function({schema: 'account', name: 'myUser_getId'}));
},
onStatusChange: function(form) {
if (form.ready && this.$('address').value == 0)
form.insertRow();
onStatusChange: function() {
if (this.$('iter').ready && this.$('address').value == 0)
this.$('iter').insertRow();
},
onOperationsDone: function() {

View File

@ -1,16 +0,0 @@
.address
{
padding: 1em;
}
.address .box
{
max-width: 30em;
padding: 2em;
}
.address .form
{
margin: 0 auto;
max-width: 25em;
}

View File

@ -2,13 +2,13 @@
<vn-group>
<vn-param id="address"/>
<vn-hash-param key="address" param="address"/>
<db-form id="iter" on-status-changed="onStatusChange">
<db-form id="iter" on-status-changed="this.onStatusChange()">
<db-model
id="model"
property="model"
updatable="true"
mode="ON_DEMAND"
on-operations-done="onOperationsDone">
on-operations-done="this.onOperationsDone()">
SELECT a.id, a.street, a.nickname, a.city,
a.postalCode, a.provinceFk, p.countryFk
FROM myAddress a
@ -23,67 +23,74 @@
</db-form>
</vn-group>
<div id="title">
<h1><t>AddEditAddress</t></h1>
<h1><t>Configuration</t></h1>
</div>
<div id="actions">
<htk-bar-button
icon="ok"
tip="_Accept"
on-click="onAcceptClick"/>
<htk-bar-button
icon="close"
tip="_Return"
on-click="onReturnClick"/>
on-click="this.onReturnClick()"/>
<htk-bar-button
icon="check"
tip="_Accept"
on-click="this.onAcceptClick()"/>
</div>
<div id="form" class="address">
<div class="box">
<div class="form">
<div class="form-group">
<label><t>Name</t></label>
<htk-entry column="nickname" form="iter"/>
</div>
<div class="form-group">
<label><t>Address</t></label>
<htk-entry column="street" form="iter"/>
</div>
<div class="form-group">
<label><t>City</t></label>
<htk-entry column="city" form="iter"/>
</div>
<div class="form-group">
<label><t>ZipCode</t></label>
<htk-entry column="postalCode" form="iter"/>
</div>
<div class="form-group">
<label><t>Country</t></label>
<htk-combo>
<db-param
id="country"
property="param"
form="iter"
column="countryFk"
one-way="true"/>
<db-model property="model">
SELECT id, country FROM vn.country
ORDER BY country
</db-model>
</htk-combo>
</div>
<div class="form-group">
<label><t>Province</t></label>
<htk-combo column="provinceFk" form="iter">
<db-model property="model">
SELECT id, name FROM vn.province
WHERE countryFk = #country
ORDER BY name
<sql-batch property="batch">
<custom>
<item name="country" param="country"/>
</custom>
</sql-batch>
</db-model>
</htk-combo>
</div>
<div class="form box vn-w-sm vn-pa-lg">
<h5 class="vn-mb-md">
<t>AddEditAddress</t>
</h5>
<div class="form-group">
<htk-entry
placeholder="_Name"
column="nickname" form="iter"/>
</div>
<div class="form-group">
<htk-entry
placeholder="_Address"
column="street" form="iter"/>
</div>
<div class="form-group">
<htk-entry
placeholder="_City"
column="city" form="iter"/>
</div>
<div class="form-group">
<htk-entry
placeholder="_ZipCode"
column="postalCode" form="iter"/>
</div>
<div class="form-group">
<htk-combo
placeholder="_Country">
<db-param
id="country"
property="param"
form="iter"
column="countryFk"
one-way="true"/>
<db-model property="model">
SELECT id, country FROM vn.country
ORDER BY country
</db-model>
</htk-combo>
</div>
<div class="form-group">
<htk-combo
placeholder="_Province"
column="provinceFk"
form="iter">
<db-model property="model">
SELECT id, name FROM vn.province
WHERE countryFk = #country
ORDER BY name
<sql-batch property="batch">
<custom>
<item name="country" param="country"/>
</custom>
</sql-batch>
</db-model>
</htk-combo>
</div>
</div>
</div>

View File

@ -4,6 +4,7 @@ Hedera.Conf = new Class({
,activate: function() {
this.$('user-model').setInfo('c', 'myClient', 'hedera');
this.$('user-model').setInfo('u', 'myUser', 'account');
if (this.hash.get('verificationToken'))
this.onPassChangeClick();

View File

@ -1,4 +1,5 @@
Configuration: Configuració
Personal information: Dades personals
Username: Nom d'usuari
Password: Contrasenya
Email: Correu electrònic
@ -9,7 +10,7 @@ Receive invoices by email: Rebre factures per correu electrònic
Old password: Contrasenya antiga
New password: Nova contrasenya
Repeat password: Repetir contrasenya
Info: Info
Requirements: Requisits
Modify: Modificar
Password requirements: Requisits de contrasenya
characters long: caràcters de longitud

View File

@ -1,4 +1,5 @@
Configuration: Configuration
Personal information: Personal information
Username: Username
Password: Password
Email: Email
@ -9,7 +10,7 @@ Receive invoices by email: Receive invoices by email
Old password: Old password
New password: New password
Repeat password: Repeat password
Info: Info
Requirements: Requirements
Modify: Modify
Password requirements: Password requirements
characters long: characters long

View File

@ -1,4 +1,5 @@
Configuration: Configuración
Personal information: Datos personales
Username: Nombre de usuario
Password: Contraseña
Email: Correo electrónico
@ -9,7 +10,7 @@ Receive invoices by email: Recibir facturas por correo electrónico
Old password: Contaseña antigua
New password: Nueva contraseña
Repeat password: Repetir contraseña
Info: Info
Requirements: Requisitos
Modify: Modificar
Password requirements: Requisitos de constraseña
characters long: carácteres de longitud

View File

@ -1,4 +1,5 @@
Configuration: Configuration
Personal information: Informations personnelles
Username: Utilisateur
Password: Mot de passe
Email: Courriel
@ -9,7 +10,7 @@ Receive invoices by email: Recevoir des factures par e-mail
Old password: Ancien mot de passe
New password: Nouveau mot de passe
Repeat password: Répéter le mot de passe
Info: Info
Requirements: Exigences
Modify: Modifier
Password requirements: Mot de passe exigences
characters long: Longs caractères

View File

@ -1,4 +1,5 @@
Configuration: Configuração
Personal information: Dados pessoais
Username: Nome de usuario
Password: Palavra-Passe
Email: E-Mail
@ -9,7 +10,7 @@ Receive invoices by email: Receber facturas por e-mail
Old password: Palavra-Passe antiga
New password: Nova Palavra-Passe
Repeat password: Repetir Palavra-Passe
Info: Info
Requirements: Requisitos
Modify: Modificar
Password requirements: Requisitos de Palavra-Passe
characters long: caracteres

View File

@ -1,33 +1,4 @@
.conf
{
padding: 1em;
}
.conf .box
{
max-width: 30em;
padding: 2em;
}
.conf .form
{
margin: 0 auto;
max-width: 25em;
}
.conf .form-group input[type=password]
{
margin-bottom: 0.5em;
}
.pass-change
{
max-width: 15em;
}
.pass-info
{
width: 15em;
}
.pass-info ul
{
.pass-info ul {
list-style-type: none;
}

View File

@ -27,49 +27,65 @@
<htk-bar-button
icon="place"
tip="_Addresses"
on-click="onAddressesClick"/>
on-click="this.onAddressesClick()"/>
<htk-bar-button
icon="preferences"
icon="lock_reset"
tip="_Change password"
on-click="onPassChangeClick"/>
on-click="this.onPassChangeClick()"/>
</div>
<div id="form" class="conf">
<div class="box">
<div class="form">
<div class="form-group">
<label for="user-name"><t>Username</t></label>
<htk-text form="user-form" column="name"/>
</div>
<div class="form-group">
<label for="email"><t>Email</t></label>
<htk-entry form="user-form" column="email"></htk-entry>
</div>
<div class="form-group">
<label for="nickname"><t>Display name</t></label>
<htk-entry form="user-form" column="nickname"/>
</div>
<div class="form-group">
<label for="lang"><t>Language</t></label>
<htk-combo form="user-form" column="lang">
<db-model property="model">
<custom>
SELECT code, name FROM language WHERE isActive
</custom>
</db-model>
</htk-combo>
</div>
<div class="form-group">
<label for="mail"><t>Receive invoices by email</t></label>
<div class="form box vn-w-sm vn-pa-lg">
<h5 class="vn-mb-md">
<t>Personal information</t>
</h5>
<div class="form-group">
<htk-entry
placeholder="_Username"
disabled="true"
form="user-form"
column="name"/>
</div>
<div class="form-group">
<htk-entry
placeholder="_Email"
form="user-form"
column="email">
</htk-entry>
</div>
<div class="form-group">
<htk-entry
placeholder="_Display name"
form="user-form"
column="nickname"/>
</div>
<div class="form-group">
<htk-combo
placeholder="_Language"
form="user-form"
column="lang">
<db-model property="model">
<custom>
SELECT code, name FROM language WHERE isActive
</custom>
</db-model>
</htk-combo>
</div>
<div class="form-group">
<label>
<htk-check form="user-form" column="isToBeMailed"/>
</div>
<t>Receive invoices by email</t>
</label>
</div>
</div>
</div>
<htk-popup
id="change-password"
modal="true">
<div property="child-node" class="htk-dialog pass-change">
<div>
<div property="child-node" class="htk-dialog vn-w-xs vn-pa-lg">
<div class="form">
<h5 class="vn-mb-md">
<t>Change password</t>
</h5>
<input
id="old-password"
type="password"
@ -84,11 +100,11 @@
placeholder="_Repeat password"/>
</div>
<div class="button-bar">
<button class="thin" on-click="onPassModifyClick">
<button class="thin" on-click="this.onPassModifyClick()">
<t>Modify</t>
</button>
<button class="thin" on-click="onPassInfoClick">
<t>Info</t>
<button class="thin" on-click="this.onPassInfoClick()">
<t>Requirements</t>
</button>
<div class="clear"/>
</div>
@ -97,10 +113,10 @@
<htk-popup
id="password-info"
modal="true">
<div property="child-node" class="htk-dialog pass-info">
<h3>
<div property="child-node" class="htk-dialog pass-info vn-w-xs vn-pa-lg">
<h5 class="vn-mb-md">
<t>Password requirements</t>
</h3>
</h5>
<ul>
<li>
<htk-text form="password-form" column="length"/>

View File

@ -1,6 +1,5 @@
Hedera.AccessLog = new Class
({
Hedera.AccessLog = new Class({
Extends: Hedera.Form
});

View File

@ -1,36 +1,12 @@
.access-log
{
padding: 1em;
}
.access-log .box
{
max-width: 25em;
margin: 0 auto;
}
.access-log .form
{
padding: 2em;
}
.access-log .form > p
{
.access-log .form > p {
font-size: 1.2em;
margin: .1em 0;
}
/* List */
.access-log .list
{
margin-top: 1em;
}
.access-log .item
{
display: block;
padding: 1em;
border-bottom: 1px solid #DDD;
}
.access-log .item > p
{
margin: .1em 0;
.access-log .htk-list {
margin-top: 16px;
}

View File

@ -2,11 +2,14 @@
<vn-group>
<vn-param id="user"/>
<vn-hash-param key="user" param="user"/>
<db-form id="user-form">
<db-form id="userForm">
<db-model property="model">
<custom>
SELECT Id_Cliente, Cliente, Telefono, movil
FROM vn2008.Clientes WHERE Id_Cliente = #user
SELECT u.id, u.name user, u.nickname, u.email, c.phone, r.name role
FROM account.user u
JOIN account.role r ON r.id = u.role
LEFT JOIN vn.client c ON c.id = u.id
WHERE u.id = #user
</custom>
<sql-batch property="batch">
<custom>
@ -20,55 +23,44 @@
<h1><t>AccessLog</t></h1>
</div>
<div id="form" class="access-log">
<div class="box">
<div class="box vn-w-xs vn-pa-lg">
<div class="form">
<p>
<htk-text form="user-form" column="Id_Cliente"/>
</p>
<p>
<htk-text form="user-form" column="Cliente"/>
</p>
<p>
<htk-text form="user-form" column="Telefono"/>
</p>
<p>
<htk-text form="user-form" column="movil"/>
</p>
<h4><htk-text form="user-form" column="nickname"/></h4>
<p>#<htk-text form="user-form" column="id"/> - <htk-text form="user-form" column="user"/></p>
<p><htk-text form="user-form" column="role"/></p>
<p><htk-text form="user-form" column="email"/></p>
<p><htk-text form="user-form" column="phone"/></p>
</div>
</div>
<div class="list box">
<div>
<htk-repeater form-id="iter">
<db-model property="model">
<custom>
SELECT u.stamp, a.platform, a.browser, a.version, a.javascript, a.cookies
FROM visitUser u
JOIN visitAccess c ON c.id = u.accessFk
JOIN visitAgent a ON a.id = c.agentFk
WHERE u.userFk = #user
ORDER BY u.stamp DESC
LIMIT 8
</custom>
<sql-batch property="batch">
<custom>
<item name="user" param="user"/>
</custom>
</sql-batch>
</db-model>
<htk-repeater form-id="iter" class="box vn-w-xs htk-list vn-mt-md">
<db-model property="model">
<custom>
SELECT u.stamp, a.platform, a.browser, a.version, a.javascript, a.cookies
FROM visitUser u
JOIN visitAccess c ON c.id = u.accessFk
JOIN visitAgent a ON a.id = c.agentFk
WHERE u.userFk = #user
ORDER BY u.stamp DESC
LIMIT 8
</custom>
<sql-batch property="batch">
<custom>
<div class="item">
<p>
<htk-text form="iter" column="stamp" format="_%a, %e %b %Y at %T"/>
</p>
<p>
<htk-text form="iter" column="platform"/> -
<htk-text form="iter" column="browser"/>
<htk-text form="iter" column="version"/>
</p>
</div>
<item name="user" param="user"/>
</custom>
</htk-repeater>
</div>
</div>
</sql-batch>
</db-model>
<custom>
<div class="item">
<div class="content">
<p>
{{Vn.Value.format(iter.stamp, _('%a, %e %b %Y at %T'))}}
</p>
<p>
{{iter.platform}} - {{iter.browser}} {{iter.version}}
</p>
</div>
</div>
</custom>
</htk-repeater>
</div>
</vn>

View File

@ -4,33 +4,23 @@ Hedera.Connections = new Class({
,_timeoutId: null
,onModelStatusChange: function(model) {
if (!model.ready)
,onModelStatusChange: function() {
if (!this.$('sessions').ready)
return;
if (this._timeoutId)
clearTimeout(this._timeoutId);
this._timeoutId = setTimeout(this.onRefreshClick.bind(this), 60000);
this._timeoutId = setTimeout(
() => this.$('sessions').refresh(), 60000);
}
,deactivate: function() {
clearTimeout(this._timeoutId);
}
,onRefreshClick: function() {
this.$('sessions').refresh();
}
,onAccessLogClick: function(button, form) {
this.hash.set({
form: 'admin/access-log'
,user: form.get('userId')
});
}
,onChangeUserClick: function(button, form) {
this.gui.supplantUser(form.get('user'),
,onChangeUserClick: function(userName) {
this.gui.supplantUser(userName,
this._onUserSupplant.bind(this));
}

View File

@ -1,44 +1,6 @@
.connections
{
padding: 1em;
}
.connections .box
{
max-width: 25em;
margin: 0 auto;
}
.action-bar .connections-sum
{
.action-bar .connections-sum {
padding: .4em;
margin-top: .9em;
margin-right: .5em;
background-color: #1e88e5;
border-radius: 0.1em;
box-shadow: 0 0 0.4em #666;
border-radius: .1em;
}
/* List */
.connections .item
{
display: block;
padding: 1em;
border-bottom: 1px solid #DDD;
}
.connections .item > button
{
float: right;
margin: 0;
}
.connections .item > p
{
margin: .1em 0;
}
.connections .item > p.important
{
font-size: 1.2em;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}

View File

@ -6,7 +6,7 @@
<htk-bar-button
icon="refresh"
tip="_Refresh"
on-click="onRefreshClick"/>
on-click="$.sessions.refresh()"/>
<div class="connections-sum">
<htk-text>
<db-calc-sum
@ -18,50 +18,48 @@
</div>
</div>
<div id="form" class="connections">
<div class="box">
<htk-repeater form-id="iter">
<db-model property="model" id="sessions" on-status-changed="onModelStatusChange">
<custom>
SELECT vu.userFk userId, vu.stamp, u.nickname, s.lastUpdate,
a.platform, a.browser, a.version, u.name user
FROM userSession s
JOIN visitUser vu ON vu.id = s.userVisitFk
JOIN visitAccess ac ON ac.id = vu.accessFk
JOIN visitAgent a ON a.id = ac.agentFk
JOIN visit v ON v.id = a.visitFk
JOIN account.user u ON u.id = vu.userFk
ORDER BY lastUpdate DESC
</custom>
</db-model>
<htk-repeater form-id="iter" class="box htk-list vn-w-xs">
<db-model
property="model"
id="sessions"
on-status-changed="this.onModelStatusChange()">
<custom>
<div class="item">
<htk-button
form="iter"
column="id"
tip="_Supplant user"
icon="incognito"
on-click="onChangeUserClick"/>
<htk-button
form="iter"
column="id"
tip="_Access log"
icon="gnome"
on-click="onAccessLogClick"/>
SELECT vu.userFk userId, vu.stamp, u.nickname, s.lastUpdate,
a.platform, a.browser, a.version, u.name user
FROM userSession s
JOIN visitUser vu ON vu.id = s.userVisitFk
JOIN visitAccess ac ON ac.id = vu.accessFk
JOIN visitAgent a ON a.id = ac.agentFk
JOIN visit v ON v.id = a.visitFk
JOIN account.user u ON u.id = vu.userFk
ORDER BY lastUpdate DESC
</custom>
</db-model>
<custom>
<a class="item"
href="{{`#!form=admin/access-log&amp;user=${iter.userId}`}}"
title="_Access log">
<div class="content">
<p class="important">
<htk-text form="iter" column="nickname"/>
{{iter.nickname}}
</p>
<p>
<htk-text form="iter" column="stamp" format="%a, %T"/> -
<htk-text form="iter" column="lastUpdate" format="%T"/>
{{Vn.Value.format(iter.stamp, '%a, %T')}} -
{{Vn.Value.format(iter.lastUpdate, '%T')}}
</p>
<p>
<htk-text form="iter" column="platform"/> -
<htk-text form="iter" column="browser"/>
<htk-text form="iter" column="version"/>
{{iter.platform}} - {{iter.browser}} {{iter.version}}
</p>
</div>
</custom>
</htk-repeater>
</div>
<div class="actions"
on-click="$event.preventDefault()">
<htk-button
tip="_Supplant user"
icon="supervisor_account"
on-click="this.onChangeUserClick(iter.user)"/>
</div>
</a>
</custom>
</htk-repeater>
</div>
</vn>

View File

@ -1,41 +1,6 @@
.items
{
padding: 1em;
}
.items .box
{
max-width: 25em;
margin: 0 auto;
}
/* Row */
.items .row
{
padding: 1em;
border-bottom: 1px solid #DDD;
.items .item .photo {
border-radius: 50%;
height: 80px;
width: 80px;
}
.items .row > .photo
{
margin-right: 1em;
float: left;
border-radius: 3%;
height: 5.5em;
width: 5.5em;
}
.items .row > p
{
margin: .1em 0;
margin-left: 5em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Topbar */
.action-bar .htk-search-entry
{
margin: .8em .6em;
}

View File

@ -10,27 +10,30 @@
<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" id="items">
SELECT i.id, i.longName, i.size, i.category,
i.value5, i.value6, i.value7,
i.image, im.updated
FROM vn.item i
LEFT JOIN image im
ON im.collectionFk = 'catalog'
AND im.name = i.image
WHERE i.longName LIKE CONCAT('%', #filter, '%')
OR i.id = #filter
ORDER BY i.longName LIMIT 50
<sql-batch property="batch">
<custom>
<item name="filter" param="filter"/>
</custom>
</sql-batch>
</db-model>
<custom>
<div class="row">
<htk-repeater
class="htk-list rows box vn-w-xs"
form-id="iter"
empty-message="_Enter a search term">
<db-model property="model" id="items">
SELECT i.id, i.longName, i.size, i.category,
i.value5, i.value6, i.value7,
i.image, im.updated
FROM vn.item i
LEFT JOIN image im
ON im.collectionFk = 'catalog'
AND im.name = i.image
WHERE i.longName LIKE CONCAT('%', #filter, '%')
OR i.id = #filter
ORDER BY i.longName LIMIT 50
<sql-batch property="batch">
<custom>
<item name="filter" param="filter"/>
</custom>
</sql-batch>
</db-model>
<custom>
<div class="item">
<div class="side vn-mr-md">
<htk-image
form="iter"
column="image"
@ -41,24 +44,23 @@
full-dir="1600x900"
editable="true"
conn="conn"/>
<p class="concept">
<htk-text form="iter" column="longName"/>
</div>
<div class="content">
<p class="important">
{{iter.longName}}
</p>
<p class="tags">
<htk-text form="iter" column="value5"/>
<htk-text form="iter" column="value6"/>
<htk-text form="iter" column="value7"/>
{{iter.value5}} {{iter.value6}} {{iter.value7}}
</p>
<p>
#<htk-text form="iter" column="id"/>
{{iter.id}}
</p>
<p>
<htk-text form="iter" column="image"/>
{{iter.image}}
</p>
<div class="clear"/>
</div>
</custom>
</htk-repeater>
</div>
</div>
</custom>
</htk-repeater>
</div>
</vn>

View File

@ -1,11 +1,5 @@
Hedera.Links = new Class
({
Hedera.Links = new Class({
Extends: Hedera.Form
,repeaterFunc: function (res, form)
{
res.$('link').href = form.get ('link');
}
});

View File

@ -1,38 +1,50 @@
.cpanel
{
padding: 1em;
.cpanel .items > div {
max-width: 900px;
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 16px;
margin: 0 auto;
}
.cpanel .box
{
max-width: 30em;
.cpanel .item {
display: flex;
flex-direction: column;
align-items: center;
margin: 0;
width: 140px;
padding: 15px;
text-align: center;
transition: background-color 250ms ease-out;
}
/* Items */
.cpanel .item
{
display: block;
padding: 1em;
border-bottom: 1px solid #DDD;
}
.cpanel .item:hover
{
.cpanel .item:hover {
background-color: rgba(1, 1, 1, 0.05);
}
.cpanel .item > .htk-image
{
.cpanel .item > .htk-image {
display: flex;
justify-content: center;
align-items: center;
margin: 0;
margin-right: 1em;
float: left;
max-height: 2.8em;
max-width: 2.8em;
height: 80px;
}
.cpanel .item > p
{
.cpanel .item > .htk-image > img {
max-height: 60px;
max-width: 60px;
padding: 0;
}
.cpanel .item > h6 {
flex: none;
margin: .1em 0;
font-size: .9rem;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.cpanel .item > p.important
{
font-size: 1.2em;
.cpanel .item > .text-secondary {
flex: none;
margin: 0;
font-size: .8rem;
height: 40px;
overflow: hidden;
}

View File

@ -3,30 +3,29 @@
<h1><t>ControlPanel</t></h1>
</div>
<div id="form" class="cpanel">
<div class="box">
<htk-repeater form-id="iter" renderer="repeaterFunc">
<db-model property="model">
<custom>
SELECT image, name, description, link FROM link
ORDER BY name
</custom>
</db-model>
<htk-repeater form-id="iter" class="items">
<db-model property="model">
<custom>
<a id="link" class="item" target="_blank">
<htk-image
form="iter"
column="image"
directory="link"
subdir="full"/>
<p class="important">
<htk-text form="iter" column="name"/>
</p>
<p>
<htk-text form="iter" column="description"/>
</p>
</a>
SELECT image, name, description, link FROM link
ORDER BY name
</custom>
</htk-repeater>
</div>
</db-model>
<custom>
<a class="item box"
href="{{iter.link}}"
target="_blank">
<htk-image
value="{{iter.image}}"
directory="link"
subdir="full"/>
<h6>
{{iter.name}}
</h6>
<p class="text-secondary">
{{iter.description}}
</p>
</a>
</custom>
</htk-repeater>
</div>
</vn>

View File

@ -6,8 +6,7 @@ var Status = {
,UPLOADED : 3
};
Hedera.Photos = new Class
({
Hedera.Photos = new Class({
Extends: Hedera.Form
,filesData: []
,uploadCount: 0
@ -54,21 +53,22 @@ Hedera.Photos = new Class
statusNode.className = 'status';
li.appendChild(statusNode);
var button = new Htk.Button({
tip: 'Remove',
icon: 'delete'
});
button.on('click', this.onFileRemove, this);
li.appendChild(button.node);
var fileData = {
li: li,
file: file,
name: name,
statusNode: statusNode
};
var button = new Htk.Button({
tip: 'Remove',
icon: 'delete'
});
button.node.addEventListener('click',
() => this.onFileRemove(fileData));
li.appendChild(button.node);
this.filesData.push(fileData);
button.value = fileData;
this.$('file-list').appendChild(li);
this.setImageStatus(fileData, Status.NONE, 'add', _('Pending upload'));
@ -151,8 +151,7 @@ Hedera.Photos = new Class
statusNode.title = title ? title : '';
}
,onFileRemove: function(button) {
var fileData = button.value;
,onFileRemove: function(fileData) {
this.$('file-list').removeChild(fileData.li);
for (var i = 0; i < this.filesData.length; i++)

View File

@ -1,12 +1,4 @@
.photos {
padding: 1em;
}
.photos .box {
max-width: 25em;
padding: 2em;
}
/* Dropzone */
.photos .dropzone {

View File

@ -3,7 +3,7 @@
<h1><t>Images</t></h1>
</div>
<div id="form" class="photos">
<div class="box">
<div class="box form vn-w-sm vn-pa-lg">
<div class="form-group">
<label><t>Collection</t></label>
<htk-combo id="schema">

View File

@ -1,102 +1,91 @@
Hedera.Queries = new Class
({
Hedera.Queries = new Class({
Extends: Hedera.Form
,activate: function ()
{
,activate: function() {
this.$('result-index').value = 0;
}
,clean: function ()
{
if (this._grid)
{
this.$('grid-holder').removeChild (this._grid.node);
this._grid.unref ();
,clean: function() {
if (this._grid) {
this.$('grid-holder').removeChild(this._grid.node);
this._grid.unref();
this._grid = null;
}
}
,_onExecuteClick: function ()
{
this.clean ();
,onExecuteClick: function() {
this.clean();
var model = new Db.Model ({
var model = new Db.Model({
conn: this.conn,
query: this.$('sql').value,
resultIndex: this.$('result-index').value,
updatable: this.$('updatable').value
});
model.on ('status-changed', this._onModelChange, this);
model.on('status-changed', this.onModelChange, this);
}
,_onCleanClick: function ()
{
this.clean ();
,onCleanClick: function() {
this.clean();
}
,_onModelChange: function (model, status)
{
if (status !== Db.Model.Status.LOADING)
{
model.disconnect ('status-changed', this._onModelChange, this);
model.unref ();
,onModelChange: function(model, status) {
if (status !== Db.Model.Status.LOADING) {
model.disconnect('status-changed', this.onModelChange, this);
model.unref();
}
if (status !== Db.Model.Status.READY)
return;
Htk.Toast.showMessage (_('Query executed!'));
Htk.Toast.showMessage(_('Query executed!'));
var gridHolder = this.$('grid-holder');
if (gridHolder.firstChild)
gridHolder.removeChilds (gridHolder.firstChild);
gridHolder.removeChilds(gridHolder.firstChild);
var grid = new Htk.Grid ();
var grid = new Htk.Grid();
var columns = model.columns;
for (var i = 0; i < columns.length; i++)
{
for (var i = 0; i < columns.length; i++) {
var c = columns[i];
switch (c.type)
{
switch (c.type) {
case Db.Conn.Type.BOOLEAN:
var column = new Htk.ColumnCheck ();
var column = new Htk.ColumnCheck();
break;
case Db.Conn.Type.INTEGER:
var column = new Htk.ColumnSpin ();
var column = new Htk.ColumnSpin();
break;
case Db.Conn.Type.DOUBLE:
var column = new Htk.ColumnSpin ({digits: 2});
var column = new Htk.ColumnSpin({digits: 2});
break;
case Db.Conn.Type.DATE:
var column = new Htk.ColumnDate ({format: '%a, %e %b %Y'});
var column = new Htk.ColumnDate({format: '%a, %e %b %Y'});
break;
case Db.Conn.Type.DATE_TIME:
var column = new Htk.ColumnDate ({format: '%a, %e %b %Y, %T'});
var column = new Htk.ColumnDate({format: '%a, %e %b %Y, %T'});
break;
case Db.Conn.Type.STRING:
default:
var column = new Htk.ColumnText ();
var column = new Htk.ColumnText();
}
column.setProperties ({
column.setProperties({
title: c.name,
editable: this.$('updatable').value,
columnIndex: i
});
grid.appendColumn (column);
grid.appendColumn(column);
}
grid.model = model;
gridHolder.appendChild (grid.node);
gridHolder.appendChild(grid.node);
this._grid = grid;
}
});

View File

@ -1,25 +1,20 @@
.queries
{
.queries {
padding: 1em;
}
.queries .box
{
max-width: 40em;
.queries .box {
max-width: 600px;
margin: 0 auto;
}
.queries .form
{
.queries .form {
box-sizing: border-box;
padding: 2em;
}
.queries textarea
{
.queries textarea {
display: block;
width: 100%;
height: 8em;
}
.queries .result
{
.queries .result {
margin-top: 1em;
overflow: auto;
}

View File

@ -6,11 +6,11 @@
<htk-bar-button
icon="ok"
tip="_Execute"
on-click="_onExecuteClick"/>
on-click="this.onExecuteClick()"/>
<htk-bar-button
icon="delete"
tip="_Clean"
on-click="_onCleanClick"/>
on-click="this.onCleanClick()"/>
</div>
<div id="form" class="queries">
<div class="box form">

View File

@ -1,45 +1,11 @@
.users
{
padding: 1em;
.users-box.item > .actions {
display: flex;
}
.users .box
{
max-width: 30em;
margin: 0 auto;
}
.users-box
{
padding: 1em;
border-bottom: 1px solid #DDD;
}
.users-box > button
{
float: right;
margin: 0;
}
.users-box > p
{
margin: .2em 0;
}
.users-box > p.important
{
font-size: 1.2em;
}
.users-box > .disabled
{
float: right;
.users-box .disabled {
color: white;
background-color: #F66;
border-radius: .2em;
padding: .2em;
margin: .3em;
padding: .3em;
font-size: .8em;
}
/* Topbar */
.action-bar .htk-search-entry
{
margin: .8em .6em;
}

View File

@ -11,52 +11,47 @@
param="user-name"/>
</div>
<div id="form" class="users">
<div class="box">
<htk-repeater form-id="iter" renderer="rendererFunc">
<db-model property="model">
<custom>
SELECT u.id, u.name, u.nickname, u.active
FROM account.user u
WHERE u.name LIKE CONCAT('%', #user, '%')
OR u.nickname LIKE CONCAT('%', #user, '%')
OR u.id = #user
ORDER BY u.name LIMIT 200
</custom>
<sql-batch property="batch">
<custom>
<item name="user" param="user-name"/>
</custom>
</sql-batch>
</db-model>
<htk-repeater form-id="iter" renderer="rendererFunc" class="htk-list box vn-w-xs">
<db-model property="model">
<custom>
<div class="users-box">
<htk-button
form="iter"
column="id"
tip="_Access log"
icon="gnome"
on-click="onAccessLogClick"/>
<htk-button
id="impersonate"
form="iter"
column="id"
tip="_Impersonate user"
icon="incognito"
on-click="onChangeUserClick"/>
SELECT u.id, u.name, u.nickname, u.active
FROM account.user u
WHERE u.name LIKE CONCAT('%', #user, '%')
OR u.nickname LIKE CONCAT('%', #user, '%')
OR u.id = #user
ORDER BY u.name LIMIT 200
</custom>
<sql-batch property="batch">
<custom>
<item name="user" param="user-name"/>
</custom>
</sql-batch>
</db-model>
<custom>
<a class="users-box item"
href="{{`#!form=admin/access-log&amp;user=${iter.id}`}}"
title="_Access log">
<div class="content">
<p class="important">
{{iter.nickname}}
</p>
<p>
#{{iter.id}} - {{iter.name}}
</p>
</div>
<div class="actions"
on-click="$event.preventDefault()">
<span id="disabled" class="disabled">
<t>Disabled</t>
</span>
<p class="important">
<htk-text form="iter" column="nickname"/>
</p>
<p>
#<htk-text form="iter" column="id"/> -
<htk-text form="iter" column="name"/>
</p>
<div class="clear"/>
<htk-button
id="impersonate"
icon="supervisor_account"
tip="_Impersonate user"
on-click="this.onChangeUserClick(iter.name)"/>
</div>
</custom>
</htk-repeater>
</div>
</a>
</custom>
</htk-repeater>
</div>
</vn>

View File

@ -2,13 +2,6 @@
Hedera.Users = new Class({
Extends: Hedera.Form
,onAccessLogClick: function(button, form) {
this.hash.set({
'form': 'admin/access-log'
,'user': form.get('id')
});
}
,rendererFunc: function(scope, form) {
var isEnabled = form.get('active')
scope.$('disabled').style.display = isEnabled ?
@ -17,8 +10,8 @@ Hedera.Users = new Class({
'block' : 'none';
}
,onChangeUserClick: function(button, form) {
this.gui.supplantUser(form.get('name'),
,onChangeUserClick: function(userName) {
this.gui.supplantUser(userName,
this.onUserSupplant.bind(this));
}

View File

@ -1,46 +1,12 @@
.visits
{
padding: 1em;
.visits .box {
margin-bottom: 16px;
}
.visits .box
{
max-width: 25em;
margin: 0 auto;
.visits .box:last-child {
margin-bottom: 0;
}
.visits .form
{
padding: 1.5em;
max-width: 20em;
}
.visits .summary
{
margin-top: 1em;
}
.visits .summary p
{
padding: 1.5em;
.visits .summary p {
font-size: 1.4em;
margin: 0;
text-align: right;
}
/* List */
.visits .list
{
margin-top: 1em;
}
.visits .item
{
display: block;
padding: 1em;
border-bottom: 1px solid #DDD;
}
.visits .item > p
{
margin: .1em 0;
}
.visits .item > p.important
{
font-size: 1.2em;
}

View File

@ -6,15 +6,15 @@
<htk-bar-button
icon="refresh"
tip="_Refresh"
on-click="onRefreshClick"/>
on-click="this.onRefreshClick()"/>
<htk-bar-button
icon="user-info"
icon="visibility"
tip="_Connections"
on-click="onSessionsClick"/>
on-click="this.onSessionsClick()"/>
</div>
<div id="form" class="visits">
<div class="box">
<div class="form">
<div class="vn-w-xs">
<div class="form vn-pa-lg box">
<div class="form-group">
<label><t>From</t></label>
<htk-date-chooser>
@ -28,27 +28,28 @@
</htk-date-chooser>
</div>
</div>
</div>
<div class="summary box">
<p>
<htk-text>
<db-calc-sum
property="param"
model="visits"
column-name="visits"/>
</htk-text>
<t>visits</t>,
<htk-text>
<db-calc-sum
property="param"
model="visits"
column-name="newVisits"/>
</htk-text>
<t>news</t>
</p>
</div>
<div class="list box">
<htk-repeater form-id="iter" empty-message="_Select date interval">
<div class="summary vn-pa-lg box">
<p>
<htk-text>
<db-calc-sum
property="param"
model="visits"
column-name="visits"/>
</htk-text>
<t>visits</t>,
<htk-text>
<db-calc-sum
property="param"
model="visits"
column-name="newVisits"/>
</htk-text>
<t>news</t>
</p>
</div>
<htk-repeater
class="box htk-list"
form-id="iter"
empty-message="_Select date interval">
<db-model property="model" id="visits">
<custom>
SELECT browser,
@ -73,20 +74,18 @@
</db-model>
<custom>
<div class="item">
<p class="important">
<htk-text form="iter" column="browser"/>
<htk-text form="iter" column="minVersion"/> -
<htk-text form="iter" column="maxVersion"/>
</p>
<p>
<htk-text form="iter" column="visits"/>
<t>visits</t>,
<htk-text form="iter" column="newVisits"/>
<t>news</t>
</p>
<p>
<htk-text form="iter" column="lastVisit" format="_%a, %e %b %Y at %T"/>
</p>
<div class="content">
<p class="important">
{{iter.browser}} {{iter.minVersion}} - {{iter.maxVersion}}
</p>
<p>
{{iter.visits}} <t>visits</t>,
{{iter.newVisits}} <t>news</t>
</p>
<p>
{{Vn.Value.format(iter.lastVisit, _('%a, %e %b %Y at %T'))}}
</p>
</div>
</div>
</custom>
</htk-repeater>

View File

@ -1,22 +1,18 @@
Hedera.Visits = new Class
({
Hedera.Visits = new Class({
Extends: Hedera.Form
,activate: function ()
{
this.$('from').value = new Date ();
this.$('to').value = new Date ();
,activate: function() {
this.$('from').value = new Date();
this.$('to').value = new Date();
}
,onRefreshClick: function ()
{
this.$('visits').refresh ();
,onRefreshClick: function() {
this.$('visits').refresh();
}
,onSessionsClick: function ()
{
this.hash.set ({'form': 'admin/connections'});
,onSessionsClick: function() {
this.hash.set({form: 'admin/connections'});
}
});

View File

@ -1,13 +1,11 @@
Hedera.Packages = new Class
({
Hedera.Packages = new Class({
Extends: Hedera.Form
,onShowClick: function (column, agencyId)
{
this.hash.set ({
'form': 'agencies/provinces',
'agency': agencyId
,onShowClick: function(column, agencyId) {
this.hash.set({
form: 'agencies/provinces',
agency: agencyId
});
}
});

View File

@ -1,9 +0,0 @@
.packages
{
padding: 1em;
}
.packages .box
{
max-width: 40em;
margin: 0 auto;
}

View File

@ -3,7 +3,7 @@
<h1><t>ListByAgency</t></h1>
</div>
<div id="form" class="packages">
<div class="box">
<div class="box vn-w-sm">
<htk-grid>
<db-model property="model">
<custom>
@ -12,7 +12,7 @@
</db-model>
<htk-column-button
column="agency_id"
icon="show"
icon="search"
tip="_ShowByProvince"
on-clicked="onShowClick"/>
<htk-column-text title="_Agency" column="Agencia"/>

View File

@ -1,9 +0,0 @@
.provinces
{
padding: 1em;
}
.provinces .box
{
max-width: 40em;
margin: 0 auto;
}

View File

@ -6,12 +6,12 @@
<div id="title">
<h1><t>ByProvince</t></h1>
</div>
<div id="form" class="provinces">
<div id="form" class="provinces vn-w-sm">
<div class="box">
<htk-grid>
<db-model property="model">
<custom>
CALL vn2008.desglose_volume (#agency)
CALL vn2008.desglose_volume(#agency)
</custom>
<sql-batch property="batch">
<custom>

View File

@ -1,15 +1,5 @@
.about
{
padding: 1em;
}
.about .cols
{
max-width: 85em;
margin: 0 auto;
}
@media screen and (min-width: 1000px) /* and (max-width: 1399px) */
{
@media screen and (min-width: 1000px) /* and (max-width: 1399px) */ {
.about .cols
{
column-count: 2;
@ -17,8 +7,7 @@
-webkit-column-count: 2;
}
}/*
@media screen and (min-width: 1400px)
{
@media screen and (min-width: 1400px) {
.about .cols
{
column-count: 3;
@ -26,8 +15,7 @@
-webkit-column-count: 3;
}
}
@media screen and (min-width: 2000px)
{
@media screen and (min-width: 2000px) {
.about .cols
{
column-count: 4;
@ -35,39 +23,33 @@
-webkit-column-count: 4;
}
}*/
.about .box
{
.about .box {
margin-bottom: 1em;
padding: 2em;
}
.about h1
{
.about h1 {
padding: 0;
margin: 0;
font-weight: normal;
font-size: 1.6em;
}
.about h2
{
.about h2 {
text-align: center;
font-size: 1.2em;
font-weight: normal;
margin: 1em;
}
.about h3
{
.about h3 {
text-align: center;
font-size: 1.2em;
font-weight: normal;
padding: 1em;
color: #00796B;
}
.about p
{
.about p {
margin: 1em 0;
}
.about p.summary
{
.about p.summary {
max-width: 26em;
text-align: center;
background-color: #FF8;
@ -79,8 +61,7 @@
/* Images */
.about img
{
.about img {
max-width: 90%;
text-align: center;
padding: 1em;
@ -90,16 +71,13 @@
.about img[alt="producers"],
.about img[alt="4_control"],
.about img[alt="dealer"],
.about img[alt="goods_transport"]
{
.about img[alt="goods_transport"] {
float: right;
}
.about img[alt="2_control"]
{
.about img[alt="2_control"] {
float: left;
}
.about img[alt="glass"]
{
.about img[alt="glass"] {
display: inline;
padding: 0;
padding-left: 0.9em;

View File

@ -3,7 +3,7 @@
<h1><t>About</t></h1>
</div>
<div id="form" class="about">
<div class="cols">
<div class="cols vn-w-lg">
<div class="box">
<h1>
<t>QualityAndVariety</t>

View File

@ -1,55 +1,38 @@
.contact
{
padding: 1em;
}
.contact .box
{
max-width: 30em;
padding: 2em;
}
.contact .form
{
.contact .form {
position: relative;
text-align: left;
max-width: 25em;
margin: 0 auto;
}
.contact form
{
.contact form {
margin: 0 auto;
}
.contact form p
{
.contact form p {
margin: 1em auto;
display: block;
margin-top: 2em;
}
.contact textarea
{
.contact textarea {
height: 5em;
}
.contact button
{
.contact button {
display: block;
margin: 0 auto;
margin-top: 1em;
padding: 0.6em;
}
.contact .mandatory-message
{
.contact .mandatory-message {
font-size: .9em;
}
/* Captcha */
.captcha img
{
.captcha img {
vertical-align: middle;
margin-left: 1em;
}
.captcha input
{
.captcha input {
max-width: 8em;
}

View File

@ -3,54 +3,47 @@
<h1><t>IWantCustomer</t></h1>
</div>
<div id="form" class="contact">
<div class="box">
<div class="form">
<p>
<t>FillFormData</t>
<div class="box form vn-w-xs vn-pa-lg">
<p><t>FillFormData</t></p>
<p><t>OrCallUs</t></p>
<form id="contact-form">
<input type="hidden" name="srv" value="json:misc/contact"/>
<div class="form-group">
<label><t>Name</t></label>
<input type="text" name="name"/>
</div>
<div class="form-group">
<label><t>City</t></label>
<input type="text" name="city"/>
</div>
<div class="form-group">
<label><t>PC</t></label>
<input type="text" name="pc"/>
</div>
<div class="form-group">
<label><t>Phone</t></label>
<input type="text" name="phone"/>
</div>
<div class="form-group">
<label><t>EMail</t></label>
<input type="text" name="email"/>
</div>
<div class="form-group">
<label><t>Message</t></label>
<textarea name="message"/>
</div>
<div class="form-group captcha">
<label><t>Anti-Spam</t></label>
<input type="text" name="captcha"/>
<img alt="Captcha" id="captcha-img"/>
</div>
<p class="mandatory-message">
<t>AllFieldsMandatory</t>
</p>
<p>
<t>OrCallUs</t>
</p>
<form
id="contact-form">
<input type="hidden" name="srv" value="json:misc/contact"/>
<div class="form-group">
<label><t>Name</t></label>
<input type="text" name="name"/>
</div>
<div class="form-group">
<label><t>City</t></label>
<input type="text" name="city"/>
</div>
<div class="form-group">
<label><t>PC</t></label>
<input type="text" name="pc"/>
</div>
<div class="form-group">
<label><t>Phone</t></label>
<input type="text" name="phone"/>
</div>
<div class="form-group">
<label><t>EMail</t></label>
<input type="text" name="email"/>
</div>
<div class="form-group">
<label><t>Message</t></label>
<textarea name="message"/>
</div>
<div class="form-group captcha">
<label><t>Anti-Spam</t></label>
<input type="text" name="captcha"/>
<img alt="Captcha" id="captcha-img"/>
</div>
<p class="mandatory-message">
<t>AllFieldsMandatory</t>
</p>
<button class="thin">
<t>Send</t>
</button>
</form>
</div>
<button>
<t>Send</t>
</button>
</form>
</div>
</div>
</vn>

View File

@ -1,9 +1,5 @@
Hedera.Home = new Class({
Extends: Hedera.Form
,onStartOrderClick: function() {
this.hash.set({form: 'ecomerce/catalog'});
}
});

View File

@ -1,70 +1,61 @@
.home {
padding: 0 !important;
}
/* News panel */
.column
{
.column {
margin: .5em;
max-width: 120em;
}
.action-bar button.start-order
{
background-color: #EF5350;
margin: .7em;
padding: .5em;
box-shadow: 0 0 0.4em rgba(1, 1, 1, 0.4);
.action-bar button.start-order {
border: 1px solid white;
}
.action-bar button.start-order:hover
{
background-color: #F44336;
.action-bar button.start-order:hover {
background-color: white !important;
color: black;
}
/* New */
.new
{
.new {
text-align: left;
background-color: white;
color: #222;
border: none;
border-radius: 0.1em;
box-shadow: 0 0.2em 0.2em rgba(1, 1, 1, 0.2);
margin: .5em;
}
.new img
{
.new img {
display: block;
margin: auto;
width: 100%;
}
.new .top
{
.new .top {
padding: 1.5em;
padding-bottom: 1px;
}
.new h2
{
.new h2 {
font-size: 1.6em;
color: black;
font-weight: normal;
padding: 0;
}
.new-info
{
.new-info {
font-size: 0.9em;
color: #444;
text-align: right;
margin: 0.8em 0;
margin: .8em 0;
}
.new-text
{
.new-text {
margin: 1.5em 0;
font-family: 'Open Sans';
line-height: 1.3em;
}
.new-text a
{
color: blue;
.new-text a {
color: #6a1;
}
.new-text a:hover {
text-decoration: underline;
}
.new-text li
{
.new-text li {
margin: 0.4em 0;
}
}

View File

@ -5,13 +5,13 @@
<div id="actions" class="catalog-actions">
<htk-bar-button
class="start-order"
icon="new-order"
icon="add_shopping_cart"
tip="_Start order"
on-click="onStartOrderClick"/>
on-click="this.hash.set({form: 'ecomerce/catalog'})"/>
</div>
<div id="form" class="home">
<div class="column mansonry" id="news-column">
<htk-repeater form-id="new">
<htk-repeater form-id="iter">
<db-model property="model">
<custom>
SELECT title, text, image, id FROM news
@ -21,18 +21,17 @@
</db-model>
<custom>
<div class="masonry-box">
<div class="new">
<div class="new box">
<htk-image
directory="news"
subdir="full"
form="new"
column="image"
value="{{iter.image}}"
editable="false"
full-dir="full"/>
<div class="top">
<h2><htk-text form="new" column="title"/></h2>
<h2>{{iter.title}}</h2>
<div class="new-text">
<htk-html form="new" column="text"/>
<htk-html value="{{iter.text}}"/>
</div>
</div>
</div>

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1,59 +0,0 @@
/* News panel */
.column
{
margin: .5em;
max-width: 120em;
}
/* New */
.new
{
text-align: left;
background-color: white;
color: #222;
border: none;
border-radius: 0.1em;
box-shadow: 0 0.2em 0.2em rgba(1, 1, 1, 0.2);
margin: .5em;
}
.new img
{
display: block;
margin: auto;
width: 100%;
}
.new .top
{
padding: 1.5em;
padding-bottom: 1px;
}
.new h2
{
font-size: 1.6em;
color: black;
font-weight: normal;
padding: 0;
}
.new-info
{
font-size: 0.9em;
color: #444;
text-align: right;
margin: 0.8em 0;
}
.new-text
{
margin: 1.5em 0;
}
.new-text a
{
color: blue;
text-decoration: underline;
}
.new-text li
{
margin: 0.4em 0;
}

View File

@ -1,5 +0,0 @@
Hedera.Training = new Class
({
Extends: Hedera.Form
});

View File

@ -1,41 +0,0 @@
<vn>
<div id="title">
<h1><t>Training</t></h1>
</div>
<div id="form" class="training">
<div class="column mansonry" id="news-column">
<htk-repeater form-id="new">
<db-model property="model">
<custom>
SELECT title, created, text, image, id FROM news
WHERE tag = 'course'
ORDER BY priority, created DESC
</custom>
</db-model>
<custom>
<div class="masonry-box">
<div class="new">
<htk-image
directory="news"
subdir="full"
form="new"
column="image"
editable="false"
full-dir="full"/>
<div class="top">
<h2><htk-text form="new" column="title"/></h2>
<p class="new-info">
<htk-text format="_%a, %e %b %Y" form="new" column="created"/>
</p>
<div class="new-text">
<htk-html form="new" column="text"/>
</div>
</div>
</div>
</div>
</custom>
</htk-repeater>
<div class="clear"/>
</div>
</div>
</vn>

View File

@ -1,27 +1,13 @@
.why
{
padding: 1em;
}
.why .box
{
max-width: 40em;
margin: 0 auto;
}
.why ul
{
.why ul {
list-style-type: none;
padding: 0 1em;
padding-bottom: 1em;
max-width: 36em;
margin: 0 auto;
padding: 0;
margin-top: 0;
}
.why li
{
padding: 0.5em 0;
.why li {
padding-bottom: 16px;
}
.why img
{
.why img {
display: block;
margin: 0 auto;
max-width: 95%;

View File

@ -3,20 +3,18 @@
<h1><t>AboutCompany</t></h1>
</div>
<div id="form" class="why">
<div class="box">
<div class="body">
<ul>
<li><t>BecauseOurBigCatalog</t></li>
<li><t>BecauseThisWeb</t></li>
<li><t>BecauseOurShoppingDep</t></li>
<li><t>BecauseOrderIsEasy</t></li>
<li><t>BecauseOurPlant</t></li>
<li><t>BecauseOurSalesDep</t></li>
<li><t>BecauseOurWorkShop</t></li>
<li><t>BecauseWeHaveWhatYouNeed</t></li>
</ul>
<img src="forms/cms/why/store.png" alt="Store photo"/>
</div>
<div class="box vn-w-sm vn-pa-lg">
<ul class="vn-mb-lg">
<li><t>BecauseOurBigCatalog</t></li>
<li><t>BecauseThisWeb</t></li>
<li><t>BecauseOurShoppingDep</t></li>
<li><t>BecauseOrderIsEasy</t></li>
<li><t>BecauseOurPlant</t></li>
<li><t>BecauseOurSalesDep</t></li>
<li><t>BecauseOurWorkShop</t></li>
<li><t>BecauseWeHaveWhatYouNeed</t></li>
</ul>
<img src="forms/cms/why/store.png" alt="Store photo"/>
</div>
</div>
</vn>

View File

@ -1,58 +1,36 @@
Hedera.Basket = new Class
({
Hedera.Basket = new Class({
Extends: Hedera.Form
,open: function ()
{
this.close ();
,open: function() {
this.close();
this.isOpen = true;
Hedera.BasketChecker.check (this.conn,
this.onBasketCheck.bind (this));
Hedera.BasketChecker.check(this.conn,
this.onBasketCheck.bind(this));
}
,onBasketCheck: function (isOk)
{
,onBasketCheck: function(isOk) {
if (isOk)
this.loadUi ();
this.loadUi();
}
,activate: function ()
{
this.$('items').setInfo ('bi', 'myBasketItem', 'hedera');
,activate: function() {
this.$('items').setInfo('bi', 'myBasketItem', 'hedera');
}
,onConfigureClick: function ()
{
Htk.Toast.showWarning (_('RememberReconfiguringImpact'));
this.hash.set ({form: 'ecomerce/checkout'});
,onConfigureClick: function() {
Htk.Toast.showWarning(_('RememberReconfiguringImpact'));
this.hash.set({form: 'ecomerce/checkout'});
}
,onCatalogClick: function ()
{
this.hash.set ({form: 'ecomerce/catalog'});
,onDeleteClick: function(form) {
if (confirm(_('ReallyDelete')))
form.deleteRow();
}
,onCheckoutClick: function ()
{
this.hash.set ({form: 'ecomerce/confirm'});
}
,repeaterFunc: function (res, form)
{
res.$('subtotal').value = this.subtotal (form);
}
,onDeleteClick: function (button, form)
{
if (confirm (_('ReallyDelete')))
form.deleteRow ();
}
,subtotal: function (form)
{
return form.get ('amount') * form.get ('price');
,subtotal: function(form) {
return form.get('amount') * form.get('price');
}
});

View File

@ -1,91 +1,65 @@
.basket
{
padding: 1em;
.basket .head {
border-bottom: 1px solid #DDD;
}
.basket .box
{
max-width: 30em;
margin: 0 auto;
padding: 0 2em;
.basket .head p {
font-weight: bold;
margin: 0;
padding: 0;
font-size: 1.4em;
text-align: right;
}
.basket .form > p
{
.basket .form > p {
margin: 0;
font-size: 1.4em;
color: white;
text-align: right;
}
.basket .head
{
padding: 1.8em 0;
margin: 0;
border-bottom: 1px solid #DDD;
}
.basket .head p
{
margin: 0;
padding: 0;
font-size: 1.4em;
text-align: right;
}
/* Lines */
.basket .lines
{
padding: .8em 0;
.basket .line {
display: flex;
gap: 20px;
margin: 24px 0;
height: 65px;
}
.basket .line
{
padding: 1em 0;
.basket .line:last-child {
margin-bottom: 0;
}
.basket .line > .delete
{
margin: -0.5em;
margin-top: 1em;
margin-right: .5em;
float: left;
.basket .line > .delete {
align-self: center;
}
.basket .line > .photo
{
margin-right: 1em;
float: left;
.basket .line > .photo {
flex: none;
border-radius: 50%;
height: 4.25em;
width: 4.25em;
width: 65px;
}
.basket .line > .info
{
margin-left: 7.5em;
.basket .line > .info {
flex: 1;
}
.basket .line > .info > h2
{
.basket .line > .info > h2 {
font-size: 1em;
font-weight: normal;
padding: 0;
padding-bottom: .1em;
}
.basket .line > .info > p
{
.basket .line > .info > p {
margin: 0;
}
.basket .line > .info > .tags
{
.basket .line > .info > .tags {
color: #777;
}
.basket .line .subtotal
{
.basket .line .subtotal {
float: right;
}
/* Fields */
.basket td.available-exceeded input
{
.basket td.available-exceeded input {
background-color: #FCC;
}
.basket .icon > img
{
.basket .icon > img {
border-radius: 50%;
}

View File

@ -4,21 +4,21 @@
</div>
<div id="actions">
<htk-bar-button
icon="ok"
tip="_Checkout"
on-click="onCheckoutClick"/>
<htk-bar-button
icon="view-dual"
tip="_Catalog"
on-click="onCatalogClick"/>
<htk-bar-button
icon="preferences"
icon="settings"
tip="_ConfigureOrder"
on-click="onConfigureClick"/>
on-click="this.onConfigureClick()"/>
<htk-bar-button
icon="local_florist"
tip="_Catalog"
on-click="this.hash.set({form: 'ecomerce/catalog'})"/>
<htk-bar-button
icon="shopping_cart_checkout"
tip="_Checkout"
on-click="this.hash.set({form: 'ecomerce/confirm'})"/>
</div>
<div id="form" class="basket">
<div class="box">
<div class="head">
<div class="box vn-w-sm vn-pa-lg">
<div class="head vn-pb-lg">
<p>
<t>Total</t>
<htk-text format="%.2d€">
@ -27,7 +27,7 @@
</p>
</div>
<div class="lines">
<htk-repeater form-id="iter" renderer="repeaterFunc">
<htk-repeater form-id="iter">
<db-model id="items" property="model" updatable="true">
SELECT bi.id, bi.amount, bi.price, i.longName item,
i.tag5, i.value5, i.tag6, i.value6, i.tag7, i.value7,
@ -41,12 +41,10 @@
<custom>
<div class="line">
<htk-button
form="iter"
column="id"
class="delete"
tip="_Remove"
icon="delete"
on-click="onDeleteClick"/>
on-click="this.onDeleteClick($.iter)"/>
<htk-image
form="iter"
column="image"
@ -60,19 +58,15 @@
<htk-text form="iter" column="item"/>
</h2>
<p class="tags">
<htk-text form="iter" column="value5"/>
<htk-text form="iter" column="value6"/>
<htk-text form="iter" column="value7"/>
{{iter.value5}} {{iter.value6}} {{iter.value7}}
</p>
<p class="amount">
<htk-text form="iter" column="amount"/> x
<htk-text form="iter" column="price" format="%.2d€"/>
{{iter.amount}} x {{Vn.Value.format(iter.price, '%.2d€')}}
<span class="subtotal">
<htk-text id="subtotal" format="%.2d€"/>
{{Vn.Value.format(iter.price * iter.amount, '%.2d€')}}
</span>
</p>
</div>
<div class="clear"/>
</div>
</custom>
</htk-repeater>

View File

@ -42,14 +42,14 @@ Hedera.Catalog = new Class({
,setView: function(view) {
if (view === Hedera.Catalog.View.GRID) {
this.$('view-button').setProperties({
icon: 'view-list',
icon: 'view_list',
tip: _('List view')
});
this.view = Hedera.Catalog.View.GRID;
var className = 'grid-view';
} else {
this.$('view-button').setProperties({
icon: 'view-grid',
icon: 'grid_on',
tip: _('Grid view')
});
this.view = Hedera.Catalog.View.LIST;
@ -103,11 +103,6 @@ Hedera.Catalog = new Class({
'form': this.hash.get('form'),
'realm': form.get('id')
});
var img = builder.$('image');
img.src = 'image/family/light/'+ form.get('code') +'.svg';
img.title = form.get('name');
img.alt = img.title;
}
,onRealmChange: function(param, newValue) {
@ -118,8 +113,7 @@ Hedera.Catalog = new Class({
this.$('filters').style.display = 'none';
this.$('realm-msg').style.display = 'block';
}
this.refreshTitleColor();
this.refreshFilter(newValue, undefined);
}
@ -143,25 +137,6 @@ Hedera.Catalog = new Class({
batch.changed();
}
,refreshTitleColor: function() {
var realms = this.$('realms-model');
if (!realms.ready)
return;
var color = null;
var realm = this.$('realm').value;
if (realm) {
var row = realms.search('id', realm);
if (row != -1)
color = '#'+ realms.get(row, 'color');
}
this.gui.$('top-bar').style.backgroundColor = color;
}
,refreshTitle: function() {
var types = this.$('types-model');
@ -320,10 +295,8 @@ Vn.Filter = new Class({
Extends: Htk.Field
,Tag: 'vn-filter'
,Child: 'model'
,Properties:
{
model:
{
,Properties: {
model: {
type: Db.Model
,set: function(x) {
x.batch = this._batch;
@ -334,8 +307,7 @@ Vn.Filter = new Class({
return this._model;
}
},
placeholder:
{
placeholder: {
type: String
,set: function(x) {
this._select.placeholder = x;
@ -345,8 +317,7 @@ Vn.Filter = new Class({
return this._placeholder;
}
},
filter:
{
filter: {
type: Sql.Filter
,set: function(x) {
this._filter = x;
@ -355,7 +326,7 @@ Vn.Filter = new Class({
,get: function() {
return this._filter;
}
},
}
}
,_valueColumnIndex: 0
@ -439,7 +410,7 @@ Vn.Filter = new Class({
li.appendChild(button);
var icon = new Htk.Icon({
icon: 'close',
name: 'close',
alt: _('Close')
});
button.appendChild(icon.node);
@ -457,18 +428,24 @@ Vn.Filter = new Class({
if (!this._label)
return;
var row = -1;
let row = -1;
const model = this._model;
if (this._model.ready)
row = this._model.searchByIndex(this._valueColumnIndex, this._value);
if (model) {
if (this._model.ready)
row = model.searchByIndex(this._valueColumnIndex, this._value);
if (row != -1) {
var label = this._model.getByIndex(row, this._showColumnIndex);
this._label.nodeValue = label;
this._emptyLabel = false;
if (row != -1) {
var label = model.getByIndex(row, this._showColumnIndex);
this._label.nodeValue = label;
this._emptyLabel = false;
} else {
this._emptyLabel = true;
this._label.nodeValue = _('Loading...');
}
} else {
this._emptyLabel = true;
this._label.nodeValue = _('Loading...');
this._label.nodeValue = '';
}
}
});

View File

@ -2,7 +2,7 @@ Catalog: Catàleg
SearchResults: Resultats de cerca
SelectFamily: Selecciona una família
Choose filter from right menu: Tria un filtre en el menú de la dreta
Choose a realm: Tria un regne
Choose a realm: Tria un categoria
ArticleNotFound: Artcle no trobat
ArticleNotAvailable: Article no disponible
List view: Vista de lista
@ -15,7 +15,7 @@ Warehouse: Magatzem
Filter by: Filtrar per
Order by: Ordenar per
Search: Cercar
Change: Cambiar
Modify: Modificar
Size: Mida
Realm: Regne
Family: Família

View File

@ -2,7 +2,7 @@ Catalog: Catalog
SearchResults: Search results
SelectFamily: Select family
Choose filter from right menu: Choose a filter from the right menu
Choose a realm: Choose a realm
Choose a realm: Choose a category
ArticleNotFound: Item not found
ArticleNotAvailable: Item not available
List view: List view
@ -15,7 +15,7 @@ Warehouse: Warehouse
Filter by: Filter by
Order by: Order by
Search: Search
Change: Change
Modify: Modify
Size: Size
Realm: Realm
Family: Family

View File

@ -2,7 +2,7 @@ Catalog: Catálogo
SearchResults: Resultados de búsqueda
SelectFamily: Selecciona una familia
Choose filter from right menu: Elige un filtro en el menú de la derecha
Choose a realm: Elige un reino
Choose a realm: Elige una categoría
ArticleNotFound: Artículo no encontrado
ArticleNotAvailable: Artículo no disponible
List view: Vista de lista
@ -15,7 +15,7 @@ Warehouse: Almacén
Filter by: Filtrar por
Order by: Ordenar por
Search: Buscar
Change: Cambiar
Modify: Modificar
Size: Medida
Realm: Reino
Family: Familia

View File

@ -2,7 +2,7 @@ Catalog: Catalogue
SearchResults: Résultats de la recherche
SelectFamily: Choisissez une famille
Choose filter from right menu: Choisissez un filtre dans le menu de droite
Choose a realm: Choisissez un royaume
Choose a realm: Choisissez une catégorie
ArticleNotFound: Article non trouvé
ArticleNotAvailable: Article non disponible
List view: Liste voir
@ -15,7 +15,7 @@ Warehouse: Entrepôt
Filter by: Filtrer par
Order by: Trier par
Search: Recherche
Change: Modifier
Modify: Modifier
Size: Mesure
Realm: Famille
Family: Sous-genre

View File

@ -2,7 +2,7 @@ Catalog: Catálogo
SearchResults: Resultados de busca
SelectFamily: Seleccione uma família
Choose filter from right menu: Escolha um filtro no menú da direita
Choose a realm: Escolha um reino
Choose a realm: Escolha uma categoria
ArticleNotFound: Ítem não encontrado
ArticleNotAvailable: Ítem não disponível
List view: Ver como lista
@ -15,7 +15,7 @@ Warehouse: Armazém
Filter by: Filtrar por
Order by: Ordenar por
Search: Buscar
Change: Modificar
Modify: Modificar
Size: Medida
Realm: Reino
Family: Família

View File

@ -1,120 +1,109 @@
.catalog
{
margin-right: 17em;
.catalog {
padding: 0 !important;
margin-right: 18em;
}
/* Topbar */
.catalog-actions > .htk-search-entry
{
margin-top: .8em;
.catalog-actions > .htk-search-entry {
margin-right: .4em;
}
/* Right panel */
.right-panel
{
.right-panel {
position: fixed;
top: 3.9em;
top: 4.4em;
bottom: 0;
right: 0;
width: 17em;
background-color: white;
box-shadow: 0 0 .2em rgba(1, 1, 1, .2);
width: 18em;
overflow: auto;
background-color: #fafafa;
}
.right-panel .basket-info
{
background-color: #00ACC1;
.right-panel .basket-info {
background-color: #8cc63f;
color: white;
box-shadow: 0 .1em .1em rgba(1, 1, 1, .3);
padding: 1.2em 2em;
border-radius: .5em;
margin: 1em;
text-align: center;
}
.right-panel .basket-info > button
{
color: #E0F2F1;
.right-panel .basket-info > button {
color: white;
margin: 0 auto;
display: block;
margin-top: .4em;
}
.right-panel .basket-info > p
{
.right-panel .basket-info > button:hover {
background-color: white;
color: #60872c;
}
.right-panel .basket-info > p {
margin: 0;
padding: .4em 0;
font-size: 1.1em;
text-align: left;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.right-panel .filter
{
padding: 1em;
.right-panel .filter {
margin: 1em;
}
.right-panel .categories,
.right-panel .filters,
.right-panel .order {
margin: 1.5em 0;
}
.right-panel .filters,
.right-panel .order
{
.right-panel .order {
display: none;
}
.right-panel .realm-msg
{
.right-panel .realm-msg {
margin-top: 1em;
}
.right-panel .realm-msg > h1
{
.right-panel .realm-msg > h5 {
font-weight: normal;
text-align: center;
padding: 2.5em 0;
color: #777;
}
.right-panel h2
{
.right-panel h2 {
font-weight: normal;
padding: .4em 0;
color: #777;
font-size: 1.1em;
}
.right-panel .realms > div > div
{
.right-panel .realms > div > div {
text-align: center;
}
.right-panel .realms a
{
.right-panel .realms a {
display: inline-block;
width: 30%;
width: 25%;
padding: .6em;
box-sizing: border-box;
}
.right-panel .realms a:hover
{
.right-panel .realms a:hover {
background-color: rgba(1, 1, 1, .05);
border-radius: .15em;
}
.right-panel .realms a > img
{
.right-panel .realms a > img {
display: block;
padding: 0;
width: 100%;
}
.right-panel .vn-filter,
.right-panel select
{
.right-panel select {
margin: 0 auto;
margin-bottom: .7em;
width: 90%;
display: block;
}
.vn-filter > ul
{
.vn-filter > ul {
margin: 0;
list-style-type: none;
text-align: left;
color: #666;
padding-left: .8em;
}
.vn-filter li
{
.vn-filter li {
margin: 0;
margin-top: .3em;
line-height: 2em;
@ -123,16 +112,17 @@
white-space: nowrap;
overflow: hidden;
}
.vn-filter li > button
{
.vn-filter li > button {
vertical-align: middle;
text-align: center;
padding: .2em;
margin: 0;
margin-right: .2em;
}
.right-panel .filters > button
{
.vn-filter li > button > span {
display: block;
}
.right-panel .filters > button {
display: block;
margin: 0 auto;
margin-top: 1em;
@ -140,41 +130,34 @@
/* Items */
.item-box
{
.item-box {
transition: background-color 200ms ease-in;
}
.item-box:hover
{
.item-box:hover {
cursor: pointer;
background-color: #eee;
}
.item-info
{
.item-info {
position: relative;
}
.item-info .second-category
{
.item-info .second-category {
font-weight: bold;
color: orange;
}
.item-info .third-category
{
.item-info .third-category {
font-weight: bold;
color: red;
}
.item-info > h2
{
.item-info > h2 {
padding: 0;
margin-bottom: .15em;
font-weight: normal;
font-size: 1em;
text-overflow: ellipsis;
overflow: hidden;
max-height: 3.8em;
max-height: 2.8em;
}
.item-info > p
{
.item-info > p {
margin: 0;
padding: 0;
color: #777;
@ -183,24 +166,20 @@
white-space: nowrap;
overflow: hidden;
}
.item-info .sub-name
{
.item-info .sub-name {
text-transform: uppercase;
padding: 0;
margin-bottom: .2em;
font-size: .9em;
}
.item-info > .htk-button
{
.item-info > .htk-button {
margin: -0.3em;
padding: .3em;
}
.item-info > .htk-button > img
{
.item-info > .htk-button > img {
vertical-align: middle;
}
.item-info .available-price
{
.item-info .available-price {
white-space: nowrap;
font-size: .95em;
text-align: right;
@ -208,32 +187,27 @@
column-gap: .2em;
display: flex;
}
.item-info .available-price > *
{
.item-info .available-price > * {
border-radius: .2em;
padding: .3em;
padding: .1em .3em;
border: .1em transparent solid;
background-color: white;
}
.item-info .grouping
{
.item-info .grouping {
width: 2em;
background-color: #ddd;
}
.item-info .available
{
.item-info .available {
width: 3.3em;
border-color: #bbb;
color: #777;
}
.item-info .price
{
.item-info .price {
width: 4em;
border-color: #9cbc28;
color: #748c1e;
}
.tags
{
.tags {
font-size: .8em;
display: table;
color: #333;
@ -248,14 +222,12 @@
/* List view */
.list-view
{
max-width: 30em;
.list-view {
max-width: 420px;
margin: 0 auto;
padding: 1em;
}
.list-view .item-box
{
.list-view .item-box {
display: block;
position: relative;
width: 100%;
@ -264,20 +236,17 @@
overflow: visible;
border-bottom: 1px solid #DDD;
}
.list-view .item-box > .htk-image
{
.list-view .item-box > .htk-image {
margin: 1em;
width: 3.5em;
height: 3.5em;
float: left;
overflow: hidden;
}
.list-view .item-box > .htk-image > img
{
.list-view .item-box > .htk-image > img {
border-radius: 50%;
}
.list-view .item-info
{
.list-view .item-info {
position: absolute;
left: 5.5em;
right: 0;
@ -286,59 +255,49 @@
margin: .8em;
margin-left: 0;
}
.list-view .item-info > h2
{
.list-view .item-info > h2 {
font-size: 1em;
white-space: nowrap;
}
.list-view .item-info > .color
{
.list-view .item-info > .color {
display: none;
}
.list-view .item-info > .htk-button
{
.list-view .item-info > .htk-button {
float: right;
}
.list-view .item-info .available-price
{
.list-view .item-info .available-price {
clear: both;
float: right;
position:absolute;
bottom: 0;
right: 0;
}
.list-view .item-info .tags
{
.list-view .item-info .tags {
display: block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.list-view .item-info .tags > tr
{
.list-view .item-info .tags > tr {
display: inline-block;
}
.list-view .item-info .tags td
{
.list-view .item-info .tags td {
display: inline-block;
padding-right: .5em;
}
.list-view .item-info .tags td:first-child
{
.list-view .item-info .tags td:first-child {
display: none;
}
/* Grid view */
.grid-view
{
.grid-view {
padding: 1em;
padding-right: .2em;
padding-bottom: .4em;
text-align: center;
}
.grid-view .item-box
{
.grid-view .item-box {
text-align: left;
position: relative;
display: inline-block;
@ -349,14 +308,12 @@
height: 11em;
overflow: hidden;
}
.grid-view .item-box > .htk-image
{
.grid-view .item-box > .htk-image {
width: 11em;
height: 100%;
float: left;
}
.grid-view .item-info
{
.grid-view .item-info {
position: absolute;
left: 11.4em;
right: 0;
@ -364,8 +321,7 @@
bottom: 0;
margin: .6em;
}
.grid-view .item-info .available-price
{
.grid-view .item-info .available-price {
position: absolute;
bottom: 0;
right: 0;
@ -381,107 +337,79 @@
/* Card */
.card-popup
{
.card-popup {
overflow: auto;
}
.item-card
{
.item-card {
font-size: .9em;
width: 20em;
}
.item-card .top
{
.item-card .top {
padding: 1em;
}
.item-card .item-info
{
.item-card .item-info {
margin-left: 9em;
height: 8em;
}
.item-card .htk-image
{
.item-card .htk-image {
height: 8em;
width: 8em;
float: left;
border-radius: .3em;
}
.item-card .desc
{
.item-card .desc {
clear: both;
margin-top: 1em 0;
font-size: .9em;
}
.item-card .lots-grid
{
.item-card .lots-grid {
border-top: 1px solid #DDD;
}
.item-card .lots-grid tr
{
.item-card .lots-grid tr {
height: 3em;
}
.item-card .lots-grid .cell-spin
{
.item-card .lots-grid .cell-spin {
max-width: initial;
width: 3em;
}
.item-card .lots-grid .price-kg
{
.item-card .lots-grid .price-kg {
font-size: .8em;
color: #999;
width: 1px;
}
.item-card .lots-grid .cell-text
{
.item-card .lots-grid .cell-text {
max-width: initial;
width: auto;
}
.item-card .lots-grid .cell-button
{
.item-card .lots-grid .cell-button {
max-width: initial;
width: 1em;
}
.item-card .footer
{
text-align: center;
background-color: #009688;
.item-card .footer {
display: flex;
align-items: center;
justify-content: space-between;
background-color: #1a1a1a;
color: white;
line-height: 2em;
padding: .4em;
padding: 10px;
}
.item-card .footer > button
{
margin: 0;
.item-card .footer > button:hover {
background-color: rgba(255, 255, 255, .1);
}
.item-card .erase
{
float: left;
}
.item-card .confirm
{
float: right;
}
.item-card .erase > img,
.item-card .confirm > img
{
.item-card .footer > button > .htk-icon {
display: block;
height: 1em;
}
/* Mobile */
.catalog-actions > button.menu
{
.catalog-actions > button.menu {
display: none;
padding: 1.1em .5em;
}
.catalog-actions > button.menu > img
{
height: 1.8em;
.catalog-actions > button.menu > .htk-icon {
display: block;
}
@media (max-width: 960px)
{
@media (max-width: 960px) {
.catalog-actions > button.menu
{
display: block;
@ -489,15 +417,15 @@
.right-panel
{
top: 0;
right: -17em;
right: -18em;
z-index: 20;
transition: transform 200ms ease-out;
-webkit-transition: transform 200ms ease-out;
}
.right-panel.show
{
transform: translateZ(0) translateX(-17em);
-webkit-transform: translateZ(0) translateX(-17em);
transform: translateZ(0) translateX(-18em);
-webkit-transform: translateZ(0) translateX(-18em);
}
.catalog
{

View File

@ -94,19 +94,22 @@
<h1 id="title-text"><t>Catalog</t></h1>
</div>
<div id="actions" class="catalog-actions">
<button class="menu" on-click="onShowMenuClick">
<img src="image/icon/dark/menu.svg" alt="_Menu"/>
</button>
<htk-bar-button
icon="basket"
tip="_ShoppingBasket"
on-click="onBasketClick"/>
<htk-search-entry
param="search"/>
<htk-bar-button
id="view-button"
tip="_Switch view"
on-click="onSwitchViewClick"/>
<htk-search-entry
param="search"/>
icon="view_list"
on-click="this.onSwitchViewClick()"/>
<htk-bar-button
icon="shopping_cart_checkout"
tip="_ShoppingBasket"
on-click="this.onBasketClick()"/>
<button
class="menu"
on-click="onShowMenuClick">
<htk-icon name="menu" alt="_Menu"/>
</button>
</div>
<div id="form" class="catalog">
<div id="main" class="main">
@ -120,7 +123,7 @@
<div
id="item-box"
class="box item-box"
title="_AddToBasket">
title="{{_('AddToBasket')}}">
<htk-image
directory="catalog"
subdir="200x200"
@ -130,34 +133,34 @@
full-dir="1600x900"/>
<div class="item-info">
<h2>
<htk-text form="item" column="item"/>
{{item.item}}
</h2>
<p class="sub-name">
<htk-text form="item" column="subName"/>
{{item.subName}}
</p>
<table class="tags">
<tr>
<td><htk-text form="item" column="tag5"/></td>
<td><htk-text form="item" column="value5"/></td>
<td>{{item.tag5}}</td>
<td>{{item.value5}}</td>
</tr>
<tr>
<td><htk-text form="item" column="tag6"/></td>
<td><htk-text form="item" column="value6"/></td>
<td>{{item.tag6}}</td>
<td>{{item.value6}}</td>
</tr>
<tr>
<td><htk-text form="item" column="tag7"/></td>
<td><htk-text form="item" column="value7"/></td>
<td>{{item.tag7}}</td>
<td>{{item.value7}}</td>
</tr>
</table>
<div class="available-price">
<span class="grouping" title="_MinimalGrouping">
<htk-text form="item" column="grouping" format="x%.0d"/>
{{Vn.Value.format(item.grouping, 'x%.0d')}}
</span>
<span class="available" title="_Available">
<htk-text form="item" column="available"/>
{{item.available}}
</span>
<span class="price" title="_GroupingPrice">
<htk-text form="item" column="price" format="%.2d€"/>
{{Vn.Value.format(item.price, 'x%.0d')}}
</span>
</div>
</div>
@ -176,7 +179,7 @@
<htk-text form="basket" column="agency"/>
</p>
<button class="thin" on-click="onConfigureClick">
<t>Change</t>
<t>Modify</t>
</button>
</div>
<div class="filter">
@ -184,13 +187,12 @@
<div class="realms">
<htk-repeater
model="realms-model"
form-id="realm-form"
form-id="form"
renderer="realmRenderer"
class="realms-box">
<db-model
id="realms-model"
property="model"
on-status-changed="refreshTitleColor">
property="model">
SELECT c.id, l.name, c.color, c.code
FROM vn.itemCategory c
JOIN vn.itemCategoryL10n l ON l.id = c.id
@ -199,7 +201,11 @@
</db-model>
<custom>
<a id="link">
<img id="image"/>
<img
id="image"
src="{{`image/family/black/${form.code}.svg`}}"
title="{{form.name}}"
alt="{{form.name}}"/>
</a>
</custom>
</htk-repeater>
@ -207,7 +213,7 @@
</div>
</div>
<div id="realm-msg" class="realm-msg">
<h1><t>Choose a realm</t></h1>
<h5><t>Choose a realm</t></h5>
</div>
<div id="filters" class="filters">
<h2><t>Filter by</t></h2>
@ -461,20 +467,25 @@
on-clicked="onAddLotClick"/>
</htk-grid>
<div class="footer">
<button on-click="onEraseClick" title="_Erase" class="erase">
<button
title="_Erase"
on-click="this.onEraseClick()"
class="erase">
<htk-icon
icon="delete"
name="delete"
theme="dark"
alt="_Erase"/>
</button>
<htk-text id="amount"/>
<button on-click="onConfirmClick" title="_Confirm" class="confirm">
<button
title="_Confirm"
on-click="this.onConfirmClick()"
class="confirm">
<htk-icon
icon="ok"
name="done"
theme="dark"
alt="_Confirm"/>
</button>
<div class="clear"/>
</div>
</div>
</htk-popup>

View File

@ -11,7 +11,7 @@ AddressQuestion: On vols rebre la comanda?
AddressQuestionPickup: A què direcció vols associar la comanda? (Opcional)
AgencyQuestion: Com vols rebre la comanda?
PickupWarehouseQuestion: En quin magatzem vols recollir la comanda?
ConfirmToAccessCatalog: Confirma les dades per accedir al catàleg
ConfirmData: Confirma les dades
Arrival: Arribada
Pickup: Recollida
Agency: Agència

View File

@ -11,7 +11,7 @@ AddressQuestion: Where do you want to receive the order?
AddressQuestionPickup: To which address do you want to associate the order? (Optional)
AgencyQuestion: How you want to receive the order?
PickupWarehouseQuestion: What store you want to pickup your order?
ConfirmToAccessCatalog: Confirm the data to access the catalog
ConfirmData: Confirm the data
Arrival: Arrival
Pickup: Pickup
Agency: Agency

View File

@ -11,7 +11,7 @@ AddressQuestion: ¿Dónde quieres recibir el pedido?
AddressQuestionPickup: ¿A qué dirección quieres asociar el pedido? (Opcional)
AgencyQuestion: ¿Cómo quieres recibir el pedido?
PickupWarehouseQuestion: ¿En qué almacén quieres recoger el pedido?
ConfirmToAccessCatalog: Confirma los datos para acceder al catálogo
ConfirmData: Confirma los datos
Arrival: Llegada
Pickup: Recogida
Agency: Agencia

View File

@ -11,7 +11,7 @@ AddressQuestion: Adresse livraison?
AddressQuestionPickup: À quelle adresse voulez-vous associer la commande? (Optionnel)
AgencyQuestion: Agence de livraison
PickupWarehouseQuestion: Dans quel magasin vuoulez-vous retirer votre commande?
ConfirmToAccessCatalog: Confirmez les coordonnées pour accéder au catalogue
ConfirmData: Confirmez les coordonnées
Arrival: Arrivée
Pickup: Retrait
Agency: Agence

View File

@ -11,7 +11,7 @@ AddressQuestion: Onde queres receber a encomenda?
AddressQuestionPickup: Para qual endereço deseja associar o pedido? (Opcional)
AgencyQuestion: Como queres receber a encomenda?
PickupWarehouseQuestion: Em qual armazém queres levantar a encomenda?
ConfirmToAccessCatalog: Confirme os dados para entrar no catálogo
ConfirmData: Confirme os dados
Arrival: Chegada
Pickup: Recolhida
Agency: Agência

View File

@ -1,89 +1,54 @@
.checkout
{
padding: 1em;
max-width: 40em;
margin: 0 auto;
}
.checkout .bar
{
margin-bottom: 1em;
}
.checkout .form
{
max-width: 40em;
padding: 4em 2em;
.checkout .bar {
margin-bottom: 16px;
}
/* Step */
.answers button,
.answers p,
.radio > div
{
.radio > div {
font-size: 1.2em;
}
.answers .htk-select {
max-width: 15em;
margin: 0 auto;
font-size: 1.4em;
}
.answers .htk-select
{
max-width: 10em;
display: block;
margin: 0 auto;
font-size: 1.6em;
height: 1.8em;
}
.answers p
{
.answers p {
margin: 0.3em 0;
}
.target
{
.target {
max-width: 28em;
margin: 0 auto;
}
.address
{
.address {
border-radius: 0.1em;
padding: 0.6em 1.4em;
}
.address.selected
{
.address.selected {
background-color: rgba(1, 1, 1, .1);
}
.address:hover
{
.address:hover {
cursor: pointer;
background-color: rgba(1, 1, 1, .05);
}
.address p.consignee
{
.address p.consignee {
font-weight: bold;
}
.radio
{
.radio {
max-width: 20em;
margin: 0 auto;
}
.radio > div
{
.radio > div {
padding: 0.5em;
border-top: 1px solid #AAA;
}
.radio > div:first-child
{
border-top: none;
}
.thin-calendar
{
width: inherit;
.thin-calendar {
max-width: 24em;
margin: 0 auto;
box-shadow: 0 0.1em 0.3em #ccc;
box-shadow: none;
}
.thin-calendar tr > th
{
color: white;
}
.htk-assistant .thin
{
.htk-assistant .thin {
float: right;
}

View File

@ -68,144 +68,146 @@
on-click="onCancelClick"/>
</div>
<div id="form" class="checkout">
<div class="box bar">
<htk-assistant-bar
id="assistant-bar"
assistant="assistant"/>
</div>
<div class="box">
<div class="form">
<htk-assistant id="assistant"
endFunc="onConfirmClick">
<htk-step
name="method"
validate-func="methodValidate">
<h2><t>DeliveryOrPickupQuestion</t></h2>
<div class="answers radio">
<htk-radio-group
id="rg-method"
param="method"
on-changed="onMethodChange"/>
<div>
<label>
<htk-radio radio-group="rg-method" value="AGENCY"/>
<t>Receive the order</t>
</label>
<div class="vn-w-sm">
<div class="box bar">
<htk-assistant-bar
id="assistant-bar"
assistant="assistant"/>
</div>
<div class="box vn-px-lg vn-py-xl">
<div class="form">
<htk-assistant id="assistant"
endFunc="onConfirmClick">
<htk-step
name="method"
validate-func="methodValidate">
<h2><t>DeliveryOrPickupQuestion</t></h2>
<div class="answers radio">
<htk-radio-group
id="rg-method"
param="method"
on-changed="onMethodChange"/>
<div>
<label>
<htk-radio radio-group="rg-method" value="AGENCY"/>
<t>Receive the order</t>
</label>
</div>
<div>
<label>
<htk-radio radio-group="rg-method" value="PICKUP"/>
<t>PickupInStore</t>
</label>
</div>
</div>
<div>
<label>
<htk-radio radio-group="rg-method" value="PICKUP"/>
<t>PickupInStore</t>
</label>
</htk-step>
<htk-step
name="date"
show-func="dateShow"
validate-func="dateValidate">
<h2 id="date-question"/>
<div class="answers">
<htk-calendar
id="calendar"
class="thin-calendar"
param="date"
restrict-func="calendarRestrict"
on-changed="onFieldChange"/>
</div>
</div>
</htk-step>
<htk-step
name="date"
show-func="dateShow"
validate-func="dateValidate">
<h2 id="date-question"/>
<div class="answers">
<htk-calendar
id="calendar"
class="thin-calendar"
param="date"
restrict-func="calendarRestrict"
on-changed="onFieldChange"/>
</div>
</htk-step>
<htk-step
name="address"
show-func="addressShow"
validate-func="addressValidate">
<h2 id="address-question"/>
<div class="answers target">
<db-form id="address-form" model="addresses"/>
<htk-repeater
id="repeater"
form-id="iter"
on-change="onAddressChange"
renderer="addressRenderer">
<db-model property="model" id="addresses">
SELECT a.id, a.nickname, p.name province, a.city, a.street, a.isActive, c.country
FROM myAddress a
LEFT JOIN vn.province p ON p.id = a.provinceFk
JOIN vn.country c ON c.id = p.countryFk
WHERE a.isActive
</db-model>
<custom>
<div class="address" id="address">
<p class="consignee">
<htk-text form="iter" column="nickname"/>
</p>
<p>
<htk-text form="iter" column="street"/>
</p>
</div>
</custom>
</htk-repeater>
</div>
</htk-step>
<htk-step
name="agency"
show-func="agencyShow"
validate-func="agencyValidate">
<h2><t>AgencyQuestion</t></h2>
<div class="answers target">
<htk-combo
id="agency-combo"
param="agency"
on-changed="onFieldChange"
model="agencies"/>
</div>
</htk-step>
<htk-step
name="pickup"
show-func="pickupShow"
validate-func="pickupValidate">
<h2><t>PickupWarehouseQuestion</t></h2>
<div class="answers target">
<htk-combo
id="warehouse-combo"
param="agency"
on-changed="onFieldChange"
model="warehouses"/>
</div>
</htk-step>
<htk-step
name="confirm-delivery">
<h2><t>ConfirmToAccessCatalog</t></h2>
<div class="answers target">
<p>
<t>Arrival</t>
<htk-text format="%D" param="date"/>
</p>
<p>
<htk-text form="address-form" column="street"/>
</p>
<p>
<t>Agency</t>
<htk-text form="agency-combo" column="description"/>
</p>
<div class="clear"/>
</div>
</htk-step>
<htk-step
name="confirm-pickup">
<h2><t>ConfirmToAccessCatalog</t></h2>
<div class="answers target">
<p>
<t>Pickup</t>
<htk-text format="%D" param="date"/>
</p>
<p>
<t>Warehouse</t>
<htk-text form="warehouse-combo" column="description"/>
</p>
<div class="clear"/>
</div>
</htk-step>
</htk-assistant>
</htk-step>
<htk-step
name="address"
show-func="addressShow"
validate-func="addressValidate">
<h2 id="address-question"/>
<div class="answers target">
<db-form id="address-form" model="addresses"/>
<htk-repeater
id="repeater"
form-id="iter"
on-change="onAddressChange"
renderer="addressRenderer">
<db-model property="model" id="addresses">
SELECT a.id, a.nickname, p.name province, a.city, a.street, a.isActive, c.country
FROM myAddress a
LEFT JOIN vn.province p ON p.id = a.provinceFk
JOIN vn.country c ON c.id = p.countryFk
WHERE a.isActive
</db-model>
<custom>
<div class="address" id="address">
<p class="consignee">
<htk-text form="iter" column="nickname"/>
</p>
<p>
<htk-text form="iter" column="street"/>
</p>
</div>
</custom>
</htk-repeater>
</div>
</htk-step>
<htk-step
name="agency"
show-func="agencyShow"
validate-func="agencyValidate">
<h2><t>AgencyQuestion</t></h2>
<div class="answers target">
<htk-combo
id="agency-combo"
param="agency"
on-changed="onFieldChange"
model="agencies"/>
</div>
</htk-step>
<htk-step
name="pickup"
show-func="pickupShow"
validate-func="pickupValidate">
<h2><t>PickupWarehouseQuestion</t></h2>
<div class="answers target">
<htk-combo
id="warehouse-combo"
param="agency"
on-changed="onFieldChange"
model="warehouses"/>
</div>
</htk-step>
<htk-step
name="confirm-delivery">
<h2><t>ConfirmData</t></h2>
<div class="answers target">
<p>
<t>Arrival</t>
<htk-text format="%D" param="date"/>
</p>
<p>
<htk-text form="address-form" column="street"/>
</p>
<p>
<t>Agency</t>
<htk-text form="agency-combo" column="description"/>
</p>
<div class="clear"/>
</div>
</htk-step>
<htk-step
name="confirm-pickup">
<h2><t>ConfirmData</t></h2>
<div class="answers target">
<p>
<t>Pickup</t>
<htk-text format="%D" param="date"/>
</p>
<p>
<t>Warehouse</t>
<htk-text form="warehouse-combo" column="description"/>
</p>
<div class="clear"/>
</div>
</htk-step>
</htk-assistant>
</div>
</div>
</div>
</div>

View File

@ -1,24 +1,11 @@
.confirm
{
padding: 1em;
max-width: 30em;
margin: 0 auto;
color: #555;
.confirm .summary {
margin-bottom: 16px;
}
.confirm .box
{
padding: 2.2em 2.5em;
}
.confirm .summary
{
margin-bottom: 1em;
}
.confirm .address
{
.confirm .address {
margin-top: .8em;
}
.confirm h2
{
.confirm h2 {
font-size: 1.1em;
font-weight: normal;
padding: 0;
@ -26,61 +13,48 @@
margin-bottom: .5em;
color: #333;
}
.confirm button
{
.confirm button {
font-size: 1.4em;
}
.confirm p
{
.confirm p {
margin: .2em 0;
}
.confirm .modify-order
{
.confirm .modify-order {
float: left;
}
.confirm .confirm-order
{
.confirm .confirm-order {
float: right;
}
.confirm .payment > div
{
.confirm .payment > div {
margin-bottom: 1.4em;
}
.confirm .payment > .button-bar
{
.confirm .payment > .button-bar {
margin: 0;
margin-top: 1.8em;
}
/* Table */
.confirm .debt-info
{
.confirm .debt-info {
padding: 0;
}
.confirm .debt-info > table
{
.confirm .debt-info > table {
border-collapse: collapse;
}
.confirm td
{
.confirm td {
padding: .15em 0;
}
.confirm .sum-total > td
{
.confirm .sum-total > td {
border-top: solid 1px #DDD;
font-weight: bold;
}
.confirm .currency
{
.confirm .currency {
text-align: right;
}
.confirm .credit-info
{
.confirm .credit-info {
display: none;
}
.confirm .exceeded-info
{
.confirm .exceeded-info {
display: none;
color: #E53935;
}
@ -88,34 +62,27 @@
/* Pay */
.confirm .amount-selector,
.confirm .pay-methods > div
{
.confirm .pay-methods > div {
display: none;
}
.confirm .pay-methods > div
{
.confirm .pay-methods > div {
margin: .3em 0;
}
.confirm .pay-methods > div > label > input[type=radio]
{
.confirm .pay-methods > div > label > input[type=radio] {
margin: 0;
margin-right: .5em;
vertical-align: middle;
}
.confirm .pay-methods > div > div
{
.confirm .pay-methods > div > div {
padding: .5em 1.5em;
display: none;
}
.confirm .pay-methods > div.selected > div
{
.confirm .pay-methods > div.selected > div {
display: block;
}
.confirm .transfer-account
{
.confirm .transfer-account {
margin-top: .5em;
}
.confirm .transfer-account > p
{
.confirm .transfer-account > p {
margin: .1em 0;
}

View File

@ -30,181 +30,183 @@
<h1><t>Order summary</t></h1>
</div>
<div id="form" class="confirm">
<div class="box summary">
<div>
<div class="delivery">
<p>
<t>Delivery at</t>
<htk-text format="%D" form="order-form" column="sent"/>
</p>
<p>
<span id="method"><t>Agency</t></span>
<htk-text form="order-form" column="agency"/>
</p>
</div>
<div id="address" class="address">
<p>
<htk-text form="order-form" column="nickname"/>
</p>
<p>
<htk-text form="order-form" column="street"/>
</p>
<p>
<htk-text form="order-form" column="postalCode"/>,
<htk-text form="order-form" column="city"/>
</p>
</div>
</div>
</div>
<div class="box payment">
<div>
<table class="debt-info">
<tbody>
<tr>
<td>
<t>Previous balance</t>
</td>
<td class="currency">
<htk-text format="%.2d€" id="debt"/>
</td>
</tr>
<tr>
<td>
<t>Order total</t>
</td>
<td class="currency">
<htk-text format="%.2d€" form="order-form" column="taxableBase"/>
</td>
</tr>
<tr>
<td>
<t>Order VAT</t>
</td>
<td class="currency">
<htk-text format="%.2d€" form="order-form" column="tax"/>
</td>
</tr>
<tr class="total-debt sum-total">
<td>
<t>Total debt</t>
</td>
<td class="currency">
<htk-text format="%.2d€" id="total-debt"/>
</td>
</tr>
<tr id="credit-info" class="credit-info">
<td>
<t>Credit</t>
</td>
<td class="currency">
<htk-text format="%.2d€" form="order-form" column="credit"/>
</td>
</tr>
<tr id="exceeded-info" class="exceeded-info sum-total">
<td>
<t>Exceeded credit</t>
</td>
<td class="currency">
<htk-text format="%.2d€" id="credit-excess"/>
</td>
</tr>
</tbody>
</table>
</div>
<div id="amount-selector" class="amount-selector">
<h2>
<t>Amount to pay</t>
</h2>
<div class="radio">
<htk-radio-group
id="pay-amount"/>
<div>
<htk-radio radio-group="pay-amount" value="ALL"/>
<label>
<t>Total debt</t>,
<htk-text format="%.2d€" id="total-amount"/>
</label>
<div class="vn-w-sm">
<div class="box vn-pa-lg summary">
<div>
<div class="delivery">
<p>
<t>Delivery at</t>
<htk-text format="%D" form="order-form" column="sent"/>
</p>
<p>
<span id="method"><t>Agency</t></span>
<htk-text form="order-form" column="agency"/>
</p>
</div>
<div>
<htk-radio radio-group="pay-amount" value="EXCEEDED"/>
<label>
<t>Exceeded credit</t>,
<htk-text format="%.2d€" id="excess-amount"/>
</label>
<div id="address" class="address">
<p>
<htk-text form="order-form" column="nickname"/>
</p>
<p>
<htk-text form="order-form" column="street"/>
</p>
<p>
<htk-text form="order-form" column="postalCode"/>,
<htk-text form="order-form" column="city"/>
</p>
</div>
</div>
</div>
<div>
<h2>
<t>Pay method</t>
</h2>
<div class="pay-methods">
<htk-radio-group
id="pay-method"
on-changed="onPayMethodChange"/>
<div id="balance-method">
<label>
<htk-radio radio-group="pay-method" value="BALANCE"/>
<t>Use my balance</t>
</label>
<div class="box vn-pa-lg payment">
<div>
<table class="debt-info">
<tbody>
<tr>
<td>
<t>Previous balance</t>
</td>
<td class="currency">
<htk-text format="%.2d€" id="debt"/>
</td>
</tr>
<tr>
<td>
<t>Order total</t>
</td>
<td class="currency">
<htk-text format="%.2d€" form="order-form" column="taxableBase"/>
</td>
</tr>
<tr>
<td>
<t>Order VAT</t>
</td>
<td class="currency">
<htk-text format="%.2d€" form="order-form" column="tax"/>
</td>
</tr>
<tr class="total-debt sum-total">
<td>
<t>Total debt</t>
</td>
<td class="currency">
<htk-text format="%.2d€" id="total-debt"/>
</td>
</tr>
<tr id="credit-info" class="credit-info">
<td>
<t>Credit</t>
</td>
<td class="currency">
<htk-text format="%.2d€" form="order-form" column="credit"/>
</td>
</tr>
<tr id="exceeded-info" class="exceeded-info sum-total">
<td>
<t>Exceeded credit</t>
</td>
<td class="currency">
<htk-text format="%.2d€" id="credit-excess"/>
</td>
</tr>
</tbody>
</table>
</div>
<div id="amount-selector" class="amount-selector">
<h2>
<t>Amount to pay</t>
</h2>
<div class="radio">
<htk-radio-group
id="pay-amount"/>
<div>
<t>You have a favorable balance.</t>
<htk-radio radio-group="pay-amount" value="ALL"/>
<label>
<t>Total debt</t>,
<htk-text format="%.2d€" id="total-amount"/>
</label>
</div>
</div>
<div id="credit-method">
<label>
<htk-radio radio-group="pay-method" value="CREDIT"/>
<t>Use my credit</t>
</label>
<div>
<t>You have a favorable credit.</t>
<htk-radio radio-group="pay-amount" value="EXCEEDED"/>
<label>
<t>Exceeded credit</t>,
<htk-text format="%.2d€" id="excess-amount"/>
</label>
</div>
</div>
<div id="card-method">
<label>
<htk-radio radio-group="pay-method" value="CARD"/>
<t>Credit card</t>
</label>
<div>
<t>You will be redirected to the payment.</t>
</div>
</div>
<div id="transfer-method">
<label>
<htk-radio radio-group="pay-method" value="TRANSFER"/>
<t>Bank Transfer</t>
</label>
<div>
<t>Make a transfer to one account.</t>
<htk-repeater form-id="iter">
<db-model property="model">
SELECT name, iban FROM mainAccountBank
</db-model>
<custom>
<div class="transfer-account">
<p><htk-text form="iter" column="name"/></p>
<p><htk-text form="iter" column="iban"/></p>
</div>
</custom>
</htk-repeater>
</div>
</div>
<div id="later-method">
<label>
<htk-radio radio-group="pay-method" value="LATER"/>
<t>Pay later</t>
</label>
</div>
</div>
</div>
<div class="button-bar">
<button on-click="onModifyClick" id="modify" class="thin modify-order">
<t>Modify</t>
</button>
<button on-click="onConfirmClick" id="confirm" class="thin confirm-order">
<t>Confirm</t>
</button>
<div class="clear"/>
<div>
<h2>
<t>Pay method</t>
</h2>
<div class="pay-methods">
<htk-radio-group
id="pay-method"
on-changed="onPayMethodChange"/>
<div id="balance-method">
<label>
<htk-radio radio-group="pay-method" value="BALANCE"/>
<t>Use my balance</t>
</label>
<div>
<t>You have a favorable balance.</t>
</div>
</div>
<div id="credit-method">
<label>
<htk-radio radio-group="pay-method" value="CREDIT"/>
<t>Use my credit</t>
</label>
<div>
<t>You have a favorable credit.</t>
</div>
</div>
<div id="card-method">
<label>
<htk-radio radio-group="pay-method" value="CARD"/>
<t>Credit card</t>
</label>
<div>
<t>You will be redirected to the payment.</t>
</div>
</div>
<div id="transfer-method">
<label>
<htk-radio radio-group="pay-method" value="TRANSFER"/>
<t>Bank Transfer</t>
</label>
<div>
<t>Make a transfer to one account.</t>
<htk-repeater form-id="iter">
<db-model property="model">
SELECT name, iban FROM mainAccountBank
</db-model>
<custom>
<div class="transfer-account">
<p><htk-text form="iter" column="name"/></p>
<p><htk-text form="iter" column="iban"/></p>
</div>
</custom>
</htk-repeater>
</div>
</div>
<div id="later-method">
<label>
<htk-radio radio-group="pay-method" value="LATER"/>
<t>Pay later</t>
</label>
</div>
</div>
</div>
<div class="button-bar">
<button on-click="onModifyClick" id="modify" class="thin modify-order">
<t>Modify</t>
</button>
<button on-click="onConfirmClick" id="confirm" class="thin confirm-order">
<t>Confirm</t>
</button>
<div class="clear"/>
</div>
</div>
</div>
</div>

View File

@ -1,14 +0,0 @@
.invoices
{
padding: 1em;
}
.invoices .box
{
max-width: 40em;
}
.invoices .box > .header,
.invoices .htk-grid > thead > tr
{
background-color: #3F51B6;
}

View File

@ -3,9 +3,9 @@
<h1><t>Invoices</t></h1>
</div>
<div id="form" class="invoices">
<div class="box">
<div>
<htk-grid show-header="false">
<htk-grid
class="box vn-w-sm"
show-header="false">
<db-model property="model" id="tickets">
SELECT id, ref, issued, amount, hasPdf
FROM myInvoice
@ -19,7 +19,5 @@
renderer="donwloadRenderer"
target="_blank"/>
</htk-grid>
</div>
</div>
</div>
</vn>

View File

@ -1,73 +1,36 @@
.orders
{
padding: 1em;
}
.orders .box
{
max-width: 25em;
}
/* Balance */
.balance
{
margin-top: 1.2em;
.balance {
margin-right: .5em;
}
.balance > *
{
.balance > * {
vertical-align: middle;
}
.balance > .amount
{
.balance > .amount {
color: white;
padding: 0.3em;
}
.balance > .info
{
.balance > .info {
display: inline;
cursor: pointer;
height: 1.2em;
cursor: pointer;
}
.balance > .negative
{
.balance > .negative {
background-color: #EF5350;
border-radius: 0.1em;
box-shadow: 0 0 0.4em #666;
}
.balance-popup
{
.balance-popup {
width: 25em;
}
.balance-grid
{
.balance-grid {
width: 100%;
margin: auto;
}
/* List */
.orders .item
{
display: block;
padding: 1em;
border-bottom: 1px solid #DDD;
}
.orders .item:hover
{
background-color: rgba(1, 1, 1, 0.05);
}
.orders .item > p
{
margin: .1em 0;
}
.orders .item > p.important
{
font-size: 1.2em;
}
.orders .item > p.total
{
.orders .htk-list .total {
float: right;
}

View File

@ -3,17 +3,6 @@
<h1><t>LastOrders</t></h1>
</div>
<div id="actions">
<htk-bar-button
icon="basket"
tip="_ShoppingBasket"
show-text="false"
on-click="onBasketClick"/>
<htk-bar-button
id="pay-button"
icon="pay"
tip="_MakePayment"
show-text="false"
on-click="onPayButtonClick"/>
<div class="balance">
<span class="label">
<t>Balance:</t>
@ -38,37 +27,42 @@
class="info"
alt="Info"/>
</div>
<htk-bar-button
id="pay-button"
icon="payments"
tip="_MakePayment"
on-click="onPayButtonClick"/>
<htk-bar-button
icon="shopping_cart"
tip="_ShoppingBasket"
on-click="onBasketClick"/>
</div>
<div id="form" class="orders">
<div class="box confirmed">
<htk-repeater form-id="iter" renderer="repeaterFunc">
<db-model property="model" id="tickets">
<custom>
CALL myTicket_list (NULL, NULL);
</custom>
</db-model>
<htk-repeater
class="htk-list box confirmed vn-w-sm"
form-id="iter"
renderer="repeaterFunc">
<db-model property="model" id="tickets">
<custom>
<a id="link" class="item" title="_SeeOrder">
CALL myTicket_list (NULL, NULL);
</custom>
</db-model>
<custom>
<a id="link" class="item" title="{{_('SeeOrder')}}">
<div class="content">
<p class="important total">
<htk-text form="iter" column="total" format="%.2d€"/>
{{Vn.Value.format(iter.total, '%.2d€')}}
</p>
<p class="important">
<htk-text form="iter" column="landed" format="%D"/>
{{Vn.Value.format(iter.landed, '%D')}}
</p>
<p>
#<htk-text form="iter" column="id"/>
</p>
<p>
<htk-text form="iter" column="nickname"/>
</p>
<p>
<htk-text form="iter" column="agency"/>
</p>
<div class="clear"/>
</a>
</custom>
</htk-repeater>
</div>
<p>#{{iter.id}}</p>
<p>{{iter.nickname}}</p>
<p>{{iter.agency}}</p>
</div>
</a>
</custom>
</htk-repeater>
</div>
<htk-dialog
id="error-dialog"

View File

@ -1,4 +1,6 @@
OrderDetail: Detall de l'encarrec
ShippingInformation: Dades d'enviament
DeliveryAddress: Adreça de lliurament
Print delivery note: Imprimir albarà
Agency: Agència
Warehouse: Magatzem

View File

@ -1,4 +1,6 @@
OrderDetail: Order detail
ShippingInformation: Shipping information
DeliveryAddress: Delivery address
Print delivery note: Print delivery note
Agency: Agency
Warehouse: Store

View File

@ -1,4 +1,6 @@
OrderDetail: Detalle del pedido
ShippingInformation: Datos de envío
DeliveryAddress: Dirección de entrega
Print delivery note: Imprimir albarán
Agency: Agencia
Warehouse: Almacén

View File

@ -1,4 +1,6 @@
OrderDetail: Détails de la commande
ShippingInformation: Informations sur la livraison
DeliveryAddress: Addresse de livraison
Print delivery note: Imprimer bulletin de livraison
Agency: Agence
Warehouse: Entrepôt

View File

@ -1,4 +1,6 @@
OrderDetail: Detalhes da encomenda
ShippingInformation: Dados de envio
DeliveryAddress: Endereço de entrega
Print delivery note: Imprimir nota de entrega
Agency: Agência
Warehouse: Armazém

View File

@ -1,47 +1,29 @@
.ticket
{
padding: 1em;
}
.ticket .box
{
max-width: 30em;
margin: 0 auto;
padding: 2em;
color: #333;
}
/* Header */
.ticket .head
{
.ticket .head {
padding: 0;
padding-bottom: .2em;
border-bottom: 1px solid #DDD;
margin-bottom: 1em;
}
.ticket .address,
.ticket .total
{
margin-top: .8em;
.ticket .head > div > div {
margin: 15px 0;
}
.ticket .head > div
{
padding-bottom: .8em;
.ticket .head > div > div:first-child {
margin: 0;
}
.ticket .head p
{
margin: .2em;
.ticket .head p {
margin: .2em 0;
}
.ticket .head p.important
{
font-size: 1.4em;
.ticket .head p.important {
font-size: 1.2rem;
font-weight: bold;
}
.ticket .total
{
.ticket .total {
text-align: right;
}
.ticket .packages
{
.ticket .packages {
margin-top: 1em;
padding-top: 1em;
border-top: 1px solid #DDD;
@ -50,47 +32,42 @@
/* Lines */
.ticket .line
{
padding: .5em 0;
.ticket .line {
display: flex;
gap: 20px;
margin: 24px 0;
height: 65px;
}
.ticket .line > .photo
{
margin-right: 1em;
float: left;
.ticket .line:last-child {
margin-bottom: 0;
}
.ticket .line > .photo {
flex: none;
border-radius: 50%;
height: 4.25em;
width: 4.25em;
width: 65px;
}
.ticket .line > .info
{
margin-left: 5.25em;
.ticket .line > .info {
flex: 1;
}
.ticket .line > .info > h2
{
.ticket .line > .info > h2 {
font-size: 1em;
font-weight: normal;
padding: 0;
padding-bottom: .1em;
}
.ticket .line > .info > p
{
.ticket .line > .info > p {
margin: 0;
}
.ticket .line > .info > .tags
{
.ticket .line > .info > .tags {
color: #777;
}
.ticket .line > .info .discount
{
.ticket .line > .info .discount {
color: green;
}
.ticket .line > .info > .amount
{
.ticket .line > .info > .amount {
float: left;
}
.ticket .line > .info > .subtotal
{
.ticket .line > .info > .subtotal {
float: right;
}

View File

@ -23,12 +23,11 @@
on-click="onPrintClick"/>
</div>
<div id="form" class="ticket">
<div class="box">
<div class="box vn-w-sm vn-pa-lg">
<htk-loader class="head" form="ticket">
<h5>#<htk-text column="id" form="ticket"/></h5>
<div>
<p class="important ticket-id">
#<htk-text column="id" form="ticket"/>
</p>
<h6><t>ShippingInformation</t></h6>
<p>
<t>Preparation</t> <htk-text form="ticket" column="shipped" format="%D"/>
</p>
@ -40,6 +39,7 @@
</p>
</div>
<div class="address">
<h6><t>DeliveryAddress</t></h6>
<p>
<htk-text form="ticket" column="nickname"/>
</p>
@ -101,7 +101,6 @@
<htk-text id="subtotal" format="%.2d€"/>
</p>
</div>
<div class="clear"/>
</div>
</custom>
</htk-repeater>

View File

@ -54,9 +54,9 @@ Hedera.New = new Class({
this.editor.setContent(newHtml);
},
onStatusChange: function(form) {
onStatusChange: function() {
if (this.$('new-id').value == 0)
form.insertRow();
this.$('iter').insertRow();
},
onOperationsDone: function() {

View File

@ -1,24 +1,4 @@
.new
{
padding: 1em;
.new textarea {
min-height: 500px;
}
.new .box
{
max-width: 38em;
padding: 2em;
}
/* Form */
.new textarea
{
min-height: 20em;
}
.new .foot
{
text-align: center;
margin-top: 1em;
}

View File

@ -2,12 +2,12 @@
<vn-group>
<vn-param id="new-id"/>
<vn-hash-param key="new" param="new-id"/>
<db-form id="iter" on-status-changed="onStatusChange">
<db-form id="iter" on-status-changed="this.onStatusChange()">
<db-model
id="model"
property="model"
updatable="true"
on-operations-done="onOperationsDone">
on-operations-done="this.onOperationsDone()">
<custom>
SELECT id, title, text, tag, priority
FROM news WHERE id = #new
@ -19,47 +19,45 @@
</sql-batch>
</db-model>
</db-form>
<db-param form="iter" column="text" on-changed="onBodyChange"/>
<db-param form="iter" column="text" on-changed="this.onBodyChange()"/>
</vn-group>
<div id="title">
<h1><t>AddEditNew</t></h1>
</div>
<div id="actions">
<htk-bar-button
icon="ok"
tip="_Accept"
on-click="onAcceptClick"/>
<htk-bar-button
icon="close"
tip="_Return"
on-click="onReturnClick"/>
on-click="this.onReturnClick()"/>
<htk-bar-button
icon="check"
tip="_Accept"
on-click="this.onAcceptClick()"/>
</div>
<div id="form" class="new">
<div class="box">
<div class="form">
<div class="form-group">
<label><t>Title</t></label>
<htk-entry form="iter" column="title"/>
</div>
<div class="form-group">
<label><t>Tag</t></label>
<htk-combo form="iter" column="tag">
<db-model property="model">
<custom>
SELECT name, description FROM newsTag
ORDER BY description
</custom>
</db-model>
</htk-combo>
</div>
<div class="form-group">
<label><t>Priority</t></label>
<htk-entry form="iter" column="priority"/>
</div>
<div class="form-group">
<label><t>NewBody</t></label>
<textarea id="html-editor"/>
</div>
<div class="box form vn-w-sm vn-pa-lg">
<div class="form-group">
<label><t>Title</t></label>
<htk-entry form="iter" column="title"/>
</div>
<div class="form-group">
<label><t>Tag</t></label>
<htk-combo form="iter" column="tag">
<db-model property="model">
<custom>
SELECT name, description FROM newsTag
ORDER BY description
</custom>
</db-model>
</htk-combo>
</div>
<div class="form-group">
<label><t>Priority</t></label>
<htk-entry form="iter" column="priority"/>
</div>
<div class="form-group">
<label><t>NewBody</t></label>
<textarea id="html-editor"/>
</div>
</div>
</div>

View File

@ -1,30 +1,25 @@
Hedera.News = new Class
({
Hedera.News = new Class({
Extends: Hedera.Form
,editNew: function (newId)
{
this.hash.set ({
'form': 'news/new'
,'new': newId
,editNew: function(newId) {
this.hash.set({
form: 'news/new',
new: newId
});
}
,onEditClick: function (button, form)
{
this.editNew (button.value);
,onEditClick: function(newId) {
this.editNew(newId);
}
,onDeleteClick: function (button, form)
{
if (confirm (_('ReallyDelete')))
form.deleteRow ();
,onDeleteClick: function(form) {
if (confirm(_('ReallyDelete')))
form.deleteRow();
}
,onAddClick: function ()
{
this.editNew (0);
,onAddClick: function() {
this.editNew(0);
}
});

Some files were not shown because too many files have changed in this diff Show More