Master merged with rest branch
|
@ -0,0 +1 @@
|
|||
node_modules
|
|
@ -0,0 +1,51 @@
|
|||
|
||||
var Hedera = require ('hedera/hedera');
|
||||
|
||||
window.onload = function ()
|
||||
{
|
||||
Vn.Locale.init ();
|
||||
var lang = Vn.Locale.language;
|
||||
loadLocale (lang, main);
|
||||
}
|
||||
|
||||
function main (req)
|
||||
{
|
||||
var keys = req.keys ();
|
||||
|
||||
for (var i = 0; i < keys.length; i++)
|
||||
Vn.Locale.add (req (keys[i]));
|
||||
|
||||
hederaWeb = new Hedera.App ();
|
||||
hederaWeb.run ();
|
||||
}
|
||||
|
||||
function loadLocale (lang, cb)
|
||||
{
|
||||
switch (lang)
|
||||
{
|
||||
case 'ca':
|
||||
require ([], function () {
|
||||
cb (require.context ('locale/ca/js')); });
|
||||
break;
|
||||
case 'es':
|
||||
require ([], function () {
|
||||
cb (require.context ('locale/es/js')); });
|
||||
break;
|
||||
case 'fr':
|
||||
require ([], function () {
|
||||
cb (require.context ('locale/fr/js')); });
|
||||
break;
|
||||
case 'mn':
|
||||
require ([], function () {
|
||||
cb (require.context ('locale/mn/js')); });
|
||||
break;
|
||||
case 'pt':
|
||||
require ([], function () {
|
||||
cb (require.context ('locale/pt/js')); });
|
||||
break;
|
||||
default:
|
||||
require ([], function () {
|
||||
cb (require.context ('locale/en/js')); });
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/php -q
|
||||
<?php
|
||||
|
||||
@include_once __DIR__.'/environ.php';
|
||||
require_once 'vn-autoload.php';
|
||||
|
||||
$cliApp = new Vn\Lib\CliApp ('hedera-web', __DIR__.'/rest');
|
||||
$cliApp->run ();
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
# Alias /hedera-web /usr/share/hedera-web/
|
||||
# Alias /image-db /var/lib/hedera-web/image-db/
|
||||
|
||||
<Directory /usr/share/hedera-web/>
|
||||
|
||||
|
@ -20,3 +21,14 @@
|
|||
|
||||
</Directory>
|
||||
|
||||
<Directory /var/lib/hedera-web/image-db/>
|
||||
|
||||
Options Indexes FollowSymLinks MultiViews
|
||||
AllowOverride FileInfo Options
|
||||
|
||||
Order Allow,Deny
|
||||
Allow From All
|
||||
Require all granted
|
||||
|
||||
</Directory>
|
||||
|
|
@ -19,11 +19,11 @@ return [
|
|||
* Database parameters.
|
||||
**/
|
||||
'db' => [
|
||||
'host' => 'db.verdnatura.es'
|
||||
'host' => 'localhost'
|
||||
,'port' => 3306
|
||||
,'schema' => 'hedera-web'
|
||||
,'user' => 'hedera-web'
|
||||
,'pass' => 'base64pass'
|
||||
,'pass' => ''
|
||||
]
|
||||
|
||||
];
|
|
@ -1,18 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Vn\Hedera;
|
||||
|
||||
require_once (__DIR__.'/../php-vn-web/configure.php');
|
||||
require_once (__DIR__.'/../vn-image/configure.php');
|
||||
|
||||
set_include_path
|
||||
(
|
||||
get_include_path ()
|
||||
.PATH_SEPARATOR.__DIR__
|
||||
);
|
||||
|
||||
const _DEVELOPER_MODE = TRUE;
|
||||
const _CONFIG_DIR = '/home/juan/.config';
|
||||
const _LOG_DIR = '/tmp';
|
||||
|
||||
?>
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (C) 2015 - Juan Ferrer Toribio
|
||||
Copyright (C) 2016 - Juan Ferrer Toribio
|
||||
|
||||
This package is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
hedera-web (1.342-deb8) stable; urgency=low
|
||||
hedera-web (1.353-deb8) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Source: hedera-web
|
||||
Priority: optional
|
||||
Maintainer: Juan Ferrer Toribio <juan@verdnatura.es>
|
||||
Build-Depends: build-essential, debhelper
|
||||
Build-Depends: build-essential, debhelper, nodejs, npm
|
||||
Standards-Version: 3.9.3
|
||||
Section: misc
|
||||
Homepage: http://www.verdnatura.es
|
||||
|
@ -9,7 +9,7 @@ Vcs-Git: git://www.verdnatura.es/var/git/hedera-web
|
|||
|
||||
Package: hedera-web
|
||||
Architecture: all
|
||||
Depends: apache2, php5-mysql, php5-mcrypt, php-vn-web
|
||||
Depends: apache2, php5-mysql, php5-mcrypt, php5-ssh2, php-vn-lib, nodejs, npm
|
||||
Suggests: php-text-captcha, php5-imap, vn-image, tinymce
|
||||
Section: misc
|
||||
Priority: optional
|
||||
|
|
|
@ -1,2 +1,8 @@
|
|||
MAILTO=webmaster
|
||||
*/4 * * * * www-data php5 /usr/share/hedera-web/tpv/imap.php
|
||||
*/4 * * * * root php /usr/share/hedera-web/cli.php -m tpv/confirm-mail
|
||||
*/2 * * * * root php /usr/share/hedera-web/cli.php -m edi/load
|
||||
0 23 * * * root php /usr/share/hedera-web/cli.php -m edi/clean
|
||||
0 5 * * * root php /usr/share/hedera-web/cli.php -m edi/update
|
||||
*/1 * * * * root php /usr/share/hedera-web/cli.php -m misc/mail
|
||||
0 5 * * * root php /usr/share/hedera-web/cli.php -m misc/exchange-rate
|
||||
45 14 20 11 * root php /usr/share/hedera-web/cli.php -m misc/exchange-rate
|
||||
|
|
|
@ -1,4 +1,14 @@
|
|||
debian/conf/* etc/hedera-web
|
||||
vn usr/share/php
|
||||
conf/* etc/hedera-web
|
||||
web usr/share/php/vn
|
||||
doc/* usr/share/doc/hedera-web
|
||||
web/* usr/share/hedera-web
|
||||
forms usr/share/hedera-web
|
||||
image usr/share/hedera-web
|
||||
js usr/share/hedera-web
|
||||
locale usr/share/hedera-web
|
||||
pages usr/share/hedera-web
|
||||
reports usr/share/hedera-web
|
||||
rest usr/share/hedera-web
|
||||
index.php usr/share/hedera-web
|
||||
cli.php usr/share/hedera-web
|
||||
package.json usr/share/hedera-web
|
||||
build usr/share/hedera-web
|
||||
|
|
|
@ -4,3 +4,5 @@ a2enconf hedera-web
|
|||
service apache2 reload
|
||||
service cron restart
|
||||
|
||||
cd /usr/share/hedera-web && npm install --production
|
||||
|
||||
|
|
|
@ -5,3 +5,10 @@
|
|||
%:
|
||||
dh $@
|
||||
|
||||
clean:
|
||||
npm --production run clean
|
||||
dh_clean $@
|
||||
|
||||
build:
|
||||
npm --production run build
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
|
||||
require_once (__DIR__.'/../php-vn-lib/environ.php');
|
||||
|
||||
set_include_path (__DIR__.PATH_SEPARATOR.get_include_path ());
|
||||
|
||||
$vnAutoloadMap['vn/web'] = __DIR__.'/web';
|
||||
|
||||
const _DEV_MODE = TRUE;
|
||||
const _CONFIG_DIR = __DIR__.'/../../.config';
|
||||
const _LOG_DIR = '/tmp';
|
||||
const _DATA_DIR = '/tmp';
|
||||
|
||||
?>
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
Vn.AddressList = new Class
|
||||
Hedera.AddressList = new Class
|
||||
({
|
||||
Extends: Vn.Form
|
||||
Extends: Hedera.Form
|
||||
|
||||
,activate: function ()
|
||||
{
|
|
@ -23,11 +23,10 @@
|
|||
<h1><t>Addresses</t></h1>
|
||||
</div>
|
||||
<div id="actions">
|
||||
<htk-button
|
||||
image="image/dark/add.svg"
|
||||
<htk-bar-button
|
||||
icon="add"
|
||||
tip="_AddAddress"
|
||||
on-click="onAddAddressClick"
|
||||
showText="true"/>
|
||||
on-click="onAddAddressClick"/>
|
||||
</div>
|
||||
<div id="form" class="address-list">
|
||||
<div class="box">
|
||||
|
@ -48,13 +47,13 @@
|
|||
form="iter"
|
||||
column="id"
|
||||
tip="_RemoveAddress"
|
||||
image="image/delete.svg"
|
||||
icon="delete"
|
||||
on-click="onRemoveAddressClick"/>
|
||||
<htk-button
|
||||
form="iter"
|
||||
column="id"
|
||||
tip="_EditAddress"
|
||||
image="image/edit.svg"
|
||||
icon="edit"
|
||||
on-click="onEditAddressClick"/>
|
||||
</div>
|
||||
<p class="important">
|
|
@ -1,13 +1,13 @@
|
|||
|
||||
Vn.Address = new Class
|
||||
Hedera.Address = new Class
|
||||
({
|
||||
Extends: Vn.Form
|
||||
Extends: Hedera.Form
|
||||
|
||||
,activate: function ()
|
||||
{
|
||||
this.$('model').setInfo ('a', 'address_view', 'hedera', ['id'], 'id');
|
||||
this.$('model').setDefault ('customer_id', 'a',
|
||||
new Sql.Func ({schema: 'account', name: 'user_get_id'}));
|
||||
new Sql.Function ({schema: 'account', name: 'user_get_id'}));
|
||||
}
|
||||
|
||||
,onStatusChange: function (form)
|
|
@ -28,16 +28,14 @@
|
|||
<h1><t>AddEditAddress</t></h1>
|
||||
</div>
|
||||
<div id="actions">
|
||||
<htk-button
|
||||
image="image/dark/ok.svg"
|
||||
<htk-bar-button
|
||||
icon="ok"
|
||||
tip="_Accept"
|
||||
on-click="onAcceptClick"
|
||||
showText="true"/>
|
||||
<htk-button
|
||||
image="image/dark/close.svg"
|
||||
on-click="onAcceptClick"/>
|
||||
<htk-bar-button
|
||||
icon="close"
|
||||
tip="_Return"
|
||||
on-click="onReturnClick"
|
||||
showText="true"/>
|
||||
on-click="onReturnClick"/>
|
||||
</div>
|
||||
<div id="form" class="address">
|
||||
<div class="box">
|
|
@ -0,0 +1,80 @@
|
|||
|
||||
Hedera.Conf = new Class
|
||||
({
|
||||
Extends: Hedera.Form
|
||||
|
||||
,activate: function ()
|
||||
{
|
||||
this.$('user-model').setInfo ('c', 'customer_view', 'hedera');
|
||||
this.$('addresses').setInfo ('a', 'address_view', 'hedera');
|
||||
}
|
||||
|
||||
,onPassChangeClick: function ()
|
||||
{
|
||||
this.$('old-password').value = '';
|
||||
this.$('new-password').value = '';
|
||||
this.$('repeat-password').value = '';
|
||||
|
||||
var recoverPass = this.$('user-form').get ('recoverPass');
|
||||
this.$('old-password').style.display = recoverPass ? 'none' : 'block';
|
||||
this.$('change-password').show ();
|
||||
|
||||
if (recoverPass)
|
||||
this.$('new-password').focus ();
|
||||
else
|
||||
this.$('old-password').focus ();
|
||||
}
|
||||
|
||||
,onPassModifyClick: function ()
|
||||
{
|
||||
try {
|
||||
var oldPassword = this.$('old-password').value;
|
||||
var newPassword = this.$('new-password').value;
|
||||
var repeatedPassword = this.$('repeat-password').value;
|
||||
|
||||
if (newPassword == '' && repeatedPassword == '')
|
||||
throw new Error (_('Passwords empty'));
|
||||
if (newPassword !== repeatedPassword)
|
||||
throw new Error (_('Passwords doesn\'t match'));
|
||||
|
||||
var batch = new Sql.Batch ();
|
||||
batch.addValues ({
|
||||
'oldPassword': oldPassword,
|
||||
'newPassword': newPassword
|
||||
});
|
||||
|
||||
var query = 'CALL account.userChangePassword (#oldPassword, #newPassword)';
|
||||
this.conn.execQuery (query, this.onPasswordUpdate.bind (this), batch);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
Htk.Toast.showError (e.message);
|
||||
}
|
||||
}
|
||||
|
||||
,onPasswordUpdate: function (resultSet)
|
||||
{
|
||||
try {
|
||||
resultSet.fetchResult ();
|
||||
this.$('change-password').hide ();
|
||||
Htk.Toast.showMessage (_('Password changed!'));
|
||||
this.$('user-form').refresh ();
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
Htk.Toast.showError (_('Password doesn\'t meet the requirements'));
|
||||
this.$('old-password').select ();
|
||||
}
|
||||
}
|
||||
|
||||
,onPassInfoClick: function ()
|
||||
{
|
||||
this.$('password-info').show ();
|
||||
}
|
||||
|
||||
,onAddressesClick: function ()
|
||||
{
|
||||
this.hash.set ({'form': 'account/address-list'});
|
||||
}
|
||||
});
|
||||
|
|
@ -17,3 +17,17 @@
|
|||
{
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
.pass-change
|
||||
{
|
||||
max-width: 15em;
|
||||
}
|
||||
|
||||
.pass-info
|
||||
{
|
||||
width: 15em;
|
||||
}
|
||||
.pass-info ul
|
||||
{
|
||||
list-style-type: none;
|
||||
}
|
|
@ -0,0 +1,122 @@
|
|||
<vn>
|
||||
<vn-group>
|
||||
<db-form id="password-form">
|
||||
<db-model property="model">
|
||||
<custom>
|
||||
SELECT length, nAlpha, nUpper, nDigits, nPunct
|
||||
FROM account.userPassword
|
||||
</custom>
|
||||
</db-model>
|
||||
</db-form>
|
||||
<db-form id="user-form">
|
||||
<db-model property="model" id="user-model" updatable="true">
|
||||
<custom>
|
||||
SELECT u.id, u.name, u.recoverPass,
|
||||
c.email, c.mail, c.user_id
|
||||
FROM account.userView u
|
||||
LEFT JOIN customer_view c
|
||||
ON u.id = c.user_id
|
||||
</custom>
|
||||
</db-model>
|
||||
</db-form>
|
||||
<db-model id="addresses" updatable="true">
|
||||
<custom>
|
||||
SELECT a.id, a.consignee, p.name province,
|
||||
a.zip_code, a.city, a.name, a.active, c.Pais country
|
||||
FROM address_view a
|
||||
LEFT JOIN vn2008.province p ON a.province_id = p.province_id
|
||||
JOIN vn2008.Paises c ON c.Id = p.Paises_Id
|
||||
WHERE active
|
||||
</custom>
|
||||
</db-model>
|
||||
</vn-group>
|
||||
<div id="title">
|
||||
<h1><t>Configuration</t></h1>
|
||||
</div>
|
||||
<div id="actions">
|
||||
<htk-bar-button
|
||||
icon="place"
|
||||
tip="_Addresses"
|
||||
on-click="onAddressesClick"/>
|
||||
<htk-bar-button
|
||||
icon="preferences"
|
||||
tip="_Change password"
|
||||
on-click="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 column="name" form="user-form"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email"><t>Email</t></label>
|
||||
<htk-entry column="email" form="user-form"></htk-entry>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mail"><t>ReceiveInvoicesByEmail</t></label>
|
||||
<htk-check column="mail" form="user-form"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<htk-popup
|
||||
id="change-password"
|
||||
modal="true">
|
||||
<div property="child-node" class="dialog pass-change">
|
||||
<div>
|
||||
<input
|
||||
id="old-password"
|
||||
type="password"
|
||||
placeholder="_Old password"/>
|
||||
<input
|
||||
id="new-password"
|
||||
type="password"
|
||||
placeholder="_New password"/>
|
||||
<input
|
||||
id="repeat-password"
|
||||
type="password"
|
||||
placeholder="_Repeat password"/>
|
||||
</div>
|
||||
<button class="thin" on-click="onPassModifyClick">
|
||||
<t>Modify</t>
|
||||
</button>
|
||||
<button class="thin" on-click="onPassInfoClick">
|
||||
<t>Info</t>
|
||||
</button>
|
||||
<div class="clear"/>
|
||||
</div>
|
||||
</htk-popup>
|
||||
<htk-popup
|
||||
id="password-info"
|
||||
modal="true">
|
||||
<div property="child-node" class="dialog pass-info">
|
||||
<h3>
|
||||
<t>Password requirements</t>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<htk-text form="password-form" column="length"/>
|
||||
<t>characters long</t>
|
||||
</li>
|
||||
<li>
|
||||
<htk-text form="password-form" column="nAlpha"/>
|
||||
<t>alphabetic characters</t>
|
||||
</li>
|
||||
<li>
|
||||
<htk-text form="password-form" column="nUpper"/>
|
||||
<t>capital letters</t>
|
||||
</li>
|
||||
<li>
|
||||
<htk-text form="password-form" column="nDigits"/>
|
||||
<t>digits</t>
|
||||
</li>
|
||||
<li>
|
||||
<htk-text form="password-form" column="nPunct"/>
|
||||
<t>symbols</t>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</htk-popup>
|
||||
</vn>
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
Hedera.AccessLog = new Class
|
||||
({
|
||||
Extends: Hedera.Form
|
||||
});
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
Vn.Connections = new Class
|
||||
Hedera.Connections = new Class
|
||||
({
|
||||
Extends: Vn.Form
|
||||
Extends: Hedera.Form
|
||||
|
||||
,_timeoutId: null
|
||||
|
||||
|
@ -36,11 +36,11 @@ Vn.Connections = new Class
|
|||
|
||||
,onChangeUserClick: function (button, form)
|
||||
{
|
||||
this.gui.supplantUser (form.get ('user_id'),
|
||||
this.onUserSupplant.bind (this));
|
||||
this.gui.supplantUser (form.get ('user'),
|
||||
this._onUserSupplant.bind (this));
|
||||
}
|
||||
|
||||
,onUserSupplant: function (userName)
|
||||
,_onUserSupplant: function (userName)
|
||||
{
|
||||
this.hash.set ({'form': 'ecomerce/orders'});
|
||||
}
|
|
@ -3,11 +3,10 @@
|
|||
<h1><t>Connections</t></h1>
|
||||
</div>
|
||||
<div id="actions">
|
||||
<htk-button
|
||||
image="image/dark/refresh.svg"
|
||||
<htk-bar-button
|
||||
icon="refresh"
|
||||
tip="_Refresh"
|
||||
on-click="onRefreshClick"
|
||||
showText="true"/>
|
||||
on-click="onRefreshClick"/>
|
||||
<div class="connections-sum">
|
||||
<htk-text>
|
||||
<db-calc-sum
|
||||
|
@ -24,9 +23,9 @@
|
|||
<db-model property="model" id="sessions" on-status-changed="onModelStatusChange">
|
||||
<custom>
|
||||
SELECT s.id, e.user_id, c.Cliente, e.date_time login, is_new,
|
||||
s.date_time last_activity, a.platform, a.browser, a.version
|
||||
FROM user_session s
|
||||
JOIN visit_user e ON s.visit_user_id = e.id
|
||||
s.lastUpdate last_activity, a.platform, a.browser, a.version, u.name user
|
||||
FROM userSession s
|
||||
JOIN visit_user e ON s.userVisit = e.id
|
||||
JOIN visit_access c ON e.access_id = c.id
|
||||
JOIN visit_agent a ON c.agent_id = a.id
|
||||
JOIN visit v ON a.visit_id = v.id
|
||||
|
@ -41,13 +40,13 @@
|
|||
form="iter"
|
||||
column="id"
|
||||
tip="_Supplant user"
|
||||
image="image/incognito.svg"
|
||||
icon="incognito"
|
||||
on-click="onChangeUserClick"/>
|
||||
<htk-button
|
||||
form="iter"
|
||||
column="id"
|
||||
tip="_Access log"
|
||||
image="image/gnome.svg"
|
||||
icon="gnome"
|
||||
on-click="onAccessLogClick"/>
|
||||
<p class="important">
|
||||
<htk-text form="iter" column="Cliente"/>
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
Vn.Items = new Class
|
||||
Hedera.Items = new Class
|
||||
({
|
||||
Extends: Vn.Form
|
||||
Extends: Hedera.Form
|
||||
|
||||
,activate: function ()
|
||||
{
|
|
@ -2,6 +2,12 @@
|
|||
<div id="title">
|
||||
<h1><t>Item list</t></h1>
|
||||
</div>
|
||||
<div id="actions" class="action-bar">
|
||||
<htk-bar-button
|
||||
icon="print"
|
||||
tip="_Preview"
|
||||
on-click="onPreviewClick"/>
|
||||
</div>
|
||||
<div id="form" class="items">
|
||||
<div class="box">
|
||||
<div class="form">
|
||||
|
@ -38,11 +44,6 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<button class="thin" on-click="onPreviewClick">
|
||||
<t>Preview</t>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</vn>
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
Vn.Links = new Class
|
||||
Hedera.Links = new Class
|
||||
({
|
||||
Extends: Vn.Form
|
||||
Extends: Hedera.Form
|
||||
|
||||
,repeaterFunc: function (res, form)
|
||||
{
|
|
@ -0,0 +1,37 @@
|
|||
|
||||
Hedera.Photos = new Class
|
||||
({
|
||||
Extends: Hedera.Form
|
||||
|
||||
,activate: function ()
|
||||
{
|
||||
this.$('schema').value = 'catalog';
|
||||
this.$('photo-id').focus ();
|
||||
|
||||
var self = this;
|
||||
this.$('html-form').onsubmit = function ()
|
||||
{ self._onSubmit (); return false; };
|
||||
}
|
||||
|
||||
,_onSubmit: function ()
|
||||
{
|
||||
this.$('schema-field').value = this.$('schema').value;
|
||||
this.$('submit').disabled = true;
|
||||
|
||||
this.conn.sendFormMultipart (this.$('html-form'),
|
||||
this._onResponse.bind (this));
|
||||
}
|
||||
|
||||
,_onResponse: function (json, error)
|
||||
{
|
||||
this.$('submit').disabled = false;
|
||||
|
||||
if (error)
|
||||
throw error;
|
||||
|
||||
this.$('photo-id').value = '';
|
||||
this.$('photo-id').focus ();
|
||||
Htk.Toast.showMessage (_('ImageAdded'));
|
||||
}
|
||||
});
|
||||
|
|
@ -20,11 +20,12 @@
|
|||
|
||||
/* Footer */
|
||||
|
||||
.photos button
|
||||
.photos input[type=submit]
|
||||
{
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
padding: 0.6em;
|
||||
margin-top: 1.5em;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
|
@ -7,10 +7,8 @@
|
|||
<div class="form">
|
||||
<form
|
||||
id="html-form"
|
||||
method="post"
|
||||
enctype="multipart/form-data"
|
||||
target="photos-iframe"
|
||||
on-submit="onFormSubmit">
|
||||
enctype="multipart/form-data">
|
||||
<input type="hidden" name="srv" value="json:image/upload"/>
|
||||
<div class="form-group">
|
||||
<label><t>Id</t></label>
|
||||
<input type="number" name="id" id="photo-id"/>
|
||||
|
@ -20,27 +18,22 @@
|
|||
<input type="text" name="name"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label><t>Schema</t></label>
|
||||
<input type="hidden" name="schema" id="schema-field"/>
|
||||
<label><t>Collection</t></label>
|
||||
<htk-combo id="schema">
|
||||
<db-model property="model">
|
||||
<custom>
|
||||
SELECT name, `desc` FROM image_schema ORDER BY `desc`
|
||||
</custom>
|
||||
</db-model>
|
||||
</htk-combo>
|
||||
<input type="hidden" name="schema" id="schema-field"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label><t>ImageFile</t></label>
|
||||
<input type="file" name="image"/>
|
||||
<input type="hidden" name="MAX_FILE_SIZE" id="photo-size"/>
|
||||
</div>
|
||||
<button class="thin" id="submit">
|
||||
<t>Upload</t>
|
||||
</button>
|
||||
<input id="submit" type="submit" class="thin"/>
|
||||
</form>
|
||||
<iframe
|
||||
id="iframe"
|
||||
name="photos-iframe"
|
||||
on-load="onImageUpload"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
Vn.Queries = new Class
|
||||
Hedera.Queries = new Class
|
||||
({
|
||||
Extends: Vn.Form
|
||||
Extends: Hedera.Form
|
||||
|
||||
,activate: function ()
|
||||
{
|
|
@ -3,16 +3,14 @@
|
|||
<h1><t>Queries</t></h1>
|
||||
</div>
|
||||
<div id="actions">
|
||||
<htk-button
|
||||
image="image/dark/ok.svg"
|
||||
<htk-bar-button
|
||||
icon="ok"
|
||||
tip="_Execute"
|
||||
on-click="_onExecuteClick"
|
||||
showText="true"/>
|
||||
<htk-button
|
||||
image="image/dark/delete.svg"
|
||||
on-click="_onExecuteClick"/>
|
||||
<htk-bar-button
|
||||
icon="delete"
|
||||
tip="_Clean"
|
||||
on-click="_onCleanClick"
|
||||
showText="true"/>
|
||||
on-click="_onCleanClick"/>
|
||||
</div>
|
||||
<div id="form" class="queries">
|
||||
<div class="box form">
|
|
@ -0,0 +1,52 @@
|
|||
|
||||
Hedera.Shelves = new Class
|
||||
({
|
||||
Extends: Hedera.Form
|
||||
|
||||
,activate: function ()
|
||||
{
|
||||
this.$('date').value = new Date ();
|
||||
}
|
||||
|
||||
,onConfigChange: function ()
|
||||
{
|
||||
var fields = [
|
||||
'realm'
|
||||
,'family'
|
||||
,'warehouse'
|
||||
,'shelf'
|
||||
,'namePrefix'
|
||||
,'maxAmount'
|
||||
,'reportTitle'
|
||||
,'showPacking'
|
||||
,'stack'
|
||||
];
|
||||
|
||||
for (var i = 0; i < fields.length; i++)
|
||||
this.$(fields[i]).value = this.$('config').get (fields[i]);
|
||||
}
|
||||
|
||||
,onPreviewClick: function ()
|
||||
{
|
||||
var fields = [
|
||||
'family'
|
||||
,'warehouse'
|
||||
,'shelf'
|
||||
,'namePrefix'
|
||||
,'maxAmount'
|
||||
,'reportTitle'
|
||||
,'showPacking'
|
||||
,'stack'
|
||||
,'useIds'
|
||||
,'date'
|
||||
];
|
||||
|
||||
var batch = new Sql.Batch ();
|
||||
|
||||
for (var i = 0; i < fields.length; i++)
|
||||
batch.addValue (fields[i], this.$(fields[i]).value);
|
||||
|
||||
this.gui.openReport ('shelves-report', batch);
|
||||
}
|
||||
});
|
||||
|
|
@ -28,16 +28,3 @@
|
|||
margin: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
|
||||
.shelves .footer
|
||||
{
|
||||
text-align: center;
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
.shelves .footer > button
|
||||
{
|
||||
margin: 0 .2em;
|
||||
}
|
||||
|
|
@ -2,16 +2,22 @@
|
|||
<vn-group>
|
||||
<db-model property="model" id="configs-model">
|
||||
<custom>
|
||||
SELECT c.id, c.name, c.name_prefix, c.warehouse_id, c.family_id,
|
||||
c.shelf_id, c.max_amount, c.show_packing, c.stack, t.reino_id
|
||||
FROM shelf_config c
|
||||
JOIN vn2008.Tipos t ON t.tipo_id = c.family_id
|
||||
SELECT c.id, c.name reportTitle, c.namePrefix, c.warehouse, c.family,
|
||||
c.shelf, c.maxAmount, c.showPacking, c.stack, t.reino_id realm
|
||||
FROM shelfConfig c
|
||||
JOIN vn2008.Tipos t ON t.tipo_id = c.family
|
||||
</custom>
|
||||
</db-model>
|
||||
</vn-group>
|
||||
<div id="title">
|
||||
<h1><t>Shelves</t></h1>
|
||||
</div>
|
||||
<div id="actions" class="action-bar">
|
||||
<htk-bar-button
|
||||
icon="print"
|
||||
tip="_Preview"
|
||||
on-click="onPreviewClick"/>
|
||||
</div>
|
||||
<div id="form" class="shelves">
|
||||
<div class="box">
|
||||
<div class="form">
|
||||
|
@ -30,8 +36,8 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<label><t>Reign</t></label>
|
||||
<htk-combo id="reign">
|
||||
<db-model property="model" id="reigns">
|
||||
<htk-combo id="realm">
|
||||
<db-model property="model" id="realms">
|
||||
<custom>
|
||||
SELECT id, reino FROM vn2008.reinos
|
||||
WHERE display != FALSE ORDER BY reino
|
||||
|
@ -45,11 +51,11 @@
|
|||
<db-model property="model">
|
||||
<custom>
|
||||
SELECT tipo_id, Tipo FROM vn2008.Tipos
|
||||
WHERE reino_id = #reign ORDER BY Tipo
|
||||
WHERE reino_id = #realm ORDER BY Tipo
|
||||
</custom>
|
||||
<sql-batch property="batch">
|
||||
<custom>
|
||||
<item name="reign" param="reign"/>
|
||||
<item name="realm" param="realm"/>
|
||||
</custom>
|
||||
</sql-batch>
|
||||
</db-model>
|
||||
|
@ -78,29 +84,28 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<label><t>Name prefix</t></label>
|
||||
<htk-entry id="filter"/>
|
||||
<htk-entry id="namePrefix"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label><t>Limit amount per item</t></label>
|
||||
<htk-entry id="max-amount"/>
|
||||
<htk-entry id="maxAmount"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label><t>Title</t></label>
|
||||
<htk-entry id="report-title"/>
|
||||
<htk-entry id="reportTitle"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label><t>Show packing</t></label>
|
||||
<htk-check id="show-packing"/>
|
||||
<htk-check id="showPacking"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label><t>Stack different items</t></label>
|
||||
<htk-check id="stack"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label><t>Use ids instead of names</t></label>
|
||||
<htk-check id="useIds"/>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<button class="thin" on-click="onPreviewClick">
|
||||
<t>Preview</t>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -35,13 +35,13 @@
|
|||
form="iter"
|
||||
column="id"
|
||||
tip="_AccessAsUser"
|
||||
image="image/incognito.svg"
|
||||
icon="incognito"
|
||||
on-click="onChangeUserClick"/>
|
||||
<htk-button
|
||||
form="iter"
|
||||
column="id"
|
||||
tip="_AccessLog"
|
||||
image="image/gnome.svg"
|
||||
icon="gnome"
|
||||
on-click="onAccessLogClick"/>
|
||||
<p class="important">
|
||||
<htk-text form="iter" column="Cliente"/>
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
Vn.Users = new Class
|
||||
Hedera.Users = new Class
|
||||
({
|
||||
Extends: Vn.Form
|
||||
Extends: Hedera.Form
|
||||
|
||||
,onAccessLogClick: function (button, form)
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ Vn.Users = new Class
|
|||
|
||||
,onChangeUserClick: function (button, form)
|
||||
{
|
||||
this.gui.supplantUser (form.get ('id'),
|
||||
this.gui.supplantUser (form.get ('name'),
|
||||
this.onUserSupplant.bind (this));
|
||||
}
|
||||
|
|
@ -3,16 +3,14 @@
|
|||
<h1><t>Visits</t></h1>
|
||||
</div>
|
||||
<div id="actions">
|
||||
<htk-button
|
||||
image="image/dark/refresh.svg"
|
||||
<htk-bar-button
|
||||
icon="refresh"
|
||||
tip="_Refresh"
|
||||
on-click="onRefreshClick"
|
||||
showText="true"/>
|
||||
<htk-button
|
||||
image="image/dark/user-info.svg"
|
||||
on-click="onRefreshClick"/>
|
||||
<htk-bar-button
|
||||
icon="user-info"
|
||||
tip="_Connections"
|
||||
on-click="onSessionsClick"
|
||||
showText="true"/>
|
||||
on-click="onSessionsClick"/>
|
||||
</div>
|
||||
<div id="form" class="visits">
|
||||
<div class="box">
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
Vn.Visits = new Class
|
||||
Hedera.Visits = new Class
|
||||
({
|
||||
Extends: Vn.Form
|
||||
Extends: Hedera.Form
|
||||
|
||||
,activate: function ()
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
Vn.Packages = new Class
|
||||
Hedera.Packages = new Class
|
||||
({
|
||||
Extends: Vn.Form
|
||||
Extends: Hedera.Form
|
||||
|
||||
,onShowClick: function (column, agencyId)
|
||||
{
|
|
@ -12,7 +12,7 @@
|
|||
</db-model>
|
||||
<htk-column-button
|
||||
column="agency_id"
|
||||
image="image/show.svg"
|
||||
icon="show"
|
||||
tip="_ShowByProvince"
|
||||
on-clicked="onShowClick"/>
|
||||
<htk-column-text title="_Agency" column="Agencia"/>
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
Hedera.Provinces = new Class
|
||||
({
|
||||
Extends: Hedera.Form
|
||||
});
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
Hedera.About = new Class
|
||||
({
|
||||
Extends: Hedera.Form
|
||||
});
|
||||
|
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 182 KiB After Width: | Height: | Size: 182 KiB |
Before Width: | Height: | Size: 298 KiB After Width: | Height: | Size: 298 KiB |
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 285 KiB After Width: | Height: | Size: 285 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 426 KiB After Width: | Height: | Size: 426 KiB |
Before Width: | Height: | Size: 192 KiB After Width: | Height: | Size: 192 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 132 KiB |
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 129 KiB |
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 297 KiB After Width: | Height: | Size: 297 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 102 KiB |
Before Width: | Height: | Size: 153 KiB After Width: | Height: | Size: 153 KiB |
Before Width: | Height: | Size: 133 KiB After Width: | Height: | Size: 133 KiB |
|
@ -0,0 +1,46 @@
|
|||
|
||||
Hedera.Contact = new Class
|
||||
({
|
||||
Extends: Hedera.Form
|
||||
|
||||
,activate: function ()
|
||||
{
|
||||
var self = this;
|
||||
this.$('contact-form').onsubmit = function ()
|
||||
{ self._onSubmit (); return false; };
|
||||
|
||||
this.refreshCaptcha ();
|
||||
}
|
||||
|
||||
,refreshCaptcha: function ()
|
||||
{
|
||||
params = {
|
||||
'srv': 'rest:core/captcha',
|
||||
'stamp': new Date ().getTime ()
|
||||
};
|
||||
this.$('captcha-img').src = '?'+ Vn.Url.makeUri (params);
|
||||
}
|
||||
|
||||
,_onSubmit: function ()
|
||||
{
|
||||
this.conn.sendForm (this.$('contact-form'),
|
||||
this._onResponse.bind (this));
|
||||
}
|
||||
|
||||
,_onResponse: function (json, error)
|
||||
{
|
||||
var form = this.$('contact-form');
|
||||
|
||||
if (json)
|
||||
{
|
||||
form.reset ();
|
||||
Htk.Toast.showMessage (_('DataSentSuccess'));
|
||||
}
|
||||
else
|
||||
Htk.Toast.showError (_('ErrorSendingData'));
|
||||
|
||||
form['captcha'].value = '';
|
||||
this.refreshCaptcha ();
|
||||
}
|
||||
});
|
||||
|
|
@ -46,10 +46,10 @@
|
|||
.captcha img
|
||||
{
|
||||
vertical-align: middle;
|
||||
margin-left: 1em;
|
||||
}
|
||||
.captcha input
|
||||
{
|
||||
margin-left: 1em;
|
||||
max-width: 8em;
|
||||
}
|
||||
|
|
@ -11,7 +11,9 @@
|
|||
<p>
|
||||
<t>OrCallUs</t>
|
||||
</p>
|
||||
<form action="forms/cms/contact/send-data.php" method="post" id="contact-form">
|
||||
<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"/>
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
Vn.Home = new Class
|
||||
Hedera.Home = new Class
|
||||
({
|
||||
Extends: Vn.Form
|
||||
Extends: Hedera.Form
|
||||
|
||||
,onStartOrderClick: function ()
|
||||
{
|
|
@ -3,12 +3,11 @@
|
|||
<h1><t>Home</t></h1>
|
||||
</div>
|
||||
<div id="actions" class="catalog-actions">
|
||||
<htk-button
|
||||
<htk-bar-button
|
||||
class="start-order"
|
||||
image="image/dark/new-order.svg"
|
||||
icon="new-order"
|
||||
tip="_Start order"
|
||||
on-click="onStartOrderClick"
|
||||
showText="true"/>
|
||||
on-click="onStartOrderClick"/>
|
||||
</div>
|
||||
<div id="form" class="home">
|
||||
<div class="column mansonry" id="news-column">
|
||||
|
@ -16,7 +15,6 @@
|
|||
<db-model property="model">
|
||||
<custom>
|
||||
SELECT title, date_time, text, image, id FROM news
|
||||
WHERE tag != 'course'
|
||||
ORDER BY priority, date_time DESC
|
||||
</custom>
|
||||
</db-model>
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
var gmapsIsLoaded = false;
|
||||
|
||||
Vn.Location = new Class
|
||||
Hedera.Location = new Class
|
||||
({
|
||||
Extends: Vn.Form
|
||||
Extends: Hedera.Form
|
||||
|
||||
,locations: null
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
Hedera.Training = new Class
|
||||
({
|
||||
Extends: Hedera.Form
|
||||
});
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
@ -15,7 +15,7 @@
|
|||
<li><t>BecauseOurWorkShop</t></li>
|
||||
<li><t>BecauseWeHaveWhatYouNeed</t></li>
|
||||
</ul>
|
||||
<img src="image/store.png" alt="Store photo"/>
|
||||
<img src="forms/cms/why/store.png" alt="Store photo"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
Hedera.Why = new Class
|
||||
({
|
||||
Extends: Hedera.Form
|
||||
});
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
|
||||
Vn.Basket = new Class
|
||||
Hedera.Basket = new Class
|
||||
({
|
||||
Extends: Vn.Form
|
||||
Extends: Hedera.Form
|
||||
|
||||
,open: function ()
|
||||
{
|
||||
this.close ();
|
||||
this.isOpen = true;
|
||||
|
||||
Vn.BasketChecker.check (this.conn,
|
||||
Hedera.BasketChecker.check (this.conn,
|
||||
this.onBasketCheck.bind (this));
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,11 @@ Vn.Basket = new Class
|
|||
this.loadUi ();
|
||||
}
|
||||
|
||||
,activate: function ()
|
||||
{
|
||||
this.$('items').setInfo ('i', 'basket_item', 'hedera');
|
||||
}
|
||||
|
||||
,onConfigureClick: function ()
|
||||
{
|
||||
Htk.Toast.showWarning (_('RememberReconfiguringImpact'));
|
|
@ -3,21 +3,18 @@
|
|||
<h1><t>ShoppingBasket</t></h1>
|
||||
</div>
|
||||
<div id="actions">
|
||||
<htk-button
|
||||
image="image/dark/ok.svg"
|
||||
<htk-bar-button
|
||||
icon="ok"
|
||||
tip="_Checkout"
|
||||
on-click="onCheckoutClick"
|
||||
show-text="true"/>
|
||||
<htk-button
|
||||
image="image/dark/view-dual.svg"
|
||||
on-click="onCheckoutClick"/>
|
||||
<htk-bar-button
|
||||
icon="view-dual"
|
||||
tip="_Catalog"
|
||||
on-click="onCatalogClick"
|
||||
show-text="true"/>
|
||||
<htk-button
|
||||
image="image/dark/preferences.svg"
|
||||
on-click="onCatalogClick"/>
|
||||
<htk-bar-button
|
||||
icon="preferences"
|
||||
tip="_ConfigureOrder"
|
||||
on-click="onConfigureClick"
|
||||
show-text="true"/>
|
||||
on-click="onConfigureClick"/>
|
||||
</div>
|
||||
<div id="form" class="basket">
|
||||
<div class="box">
|
||||
|
@ -47,7 +44,7 @@
|
|||
column="ticket_id"
|
||||
class="delete"
|
||||
tip="_Remove"
|
||||
image="image/delete.svg"
|
||||
icon="delete"
|
||||
on-click="onDeleteClick"/>
|
||||
<htk-image
|
||||
form="iter"
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
Vn.Catalog = new Class
|
||||
Hedera.Catalog = new Class
|
||||
({
|
||||
Extends: Vn.Form
|
||||
Extends: Hedera.Form
|
||||
|
||||
,_menuShown: false
|
||||
|
||||
|
@ -10,9 +10,9 @@ Vn.Catalog = new Class
|
|||
this.close ();
|
||||
this.isOpen = true;
|
||||
|
||||
if (!Vn.Cookie.check ('hedera_guest'))
|
||||
if (!localStorage.getItem ('hederaGuest'))
|
||||
{
|
||||
Vn.BasketChecker.check (this.conn,
|
||||
Hedera.BasketChecker.check (this.conn,
|
||||
this.onBasketCheck.bind (this));
|
||||
}
|
||||
else
|
||||
|
@ -34,10 +34,10 @@ Vn.Catalog = new Class
|
|||
|
||||
this.$('items-model').setInfo ('a', 'Articles', 'vn2008', ['item_id']);
|
||||
|
||||
if (Vn.Cookie.check ('hedera_view'))
|
||||
this.setView (Vn.Cookie.getInt ('hedera_view'));
|
||||
if (localStorage.getItem ('hederaView'))
|
||||
this.setView (parseInt (localStorage.getItem ('hederaView')));
|
||||
else
|
||||
this.setView (Vn.Catalog.View.GRID);
|
||||
this.setView (Hedera.Catalog.View.GRID);
|
||||
}
|
||||
|
||||
,deactivate: function ()
|
||||
|
@ -49,34 +49,34 @@ Vn.Catalog = new Class
|
|||
|
||||
,setView: function (view)
|
||||
{
|
||||
if (view === Vn.Catalog.View.GRID)
|
||||
if (view === Hedera.Catalog.View.GRID)
|
||||
{
|
||||
this.$('view-button').setProperties ({
|
||||
image: 'image/dark/view-list.svg',
|
||||
icon: 'view-list',
|
||||
tip: _('List view')
|
||||
});
|
||||
this.view = Vn.Catalog.View.GRID;
|
||||
this.view = Hedera.Catalog.View.GRID;
|
||||
var className = 'grid-view';
|
||||
}
|
||||
else
|
||||
{
|
||||
this.$('view-button').setProperties ({
|
||||
image: 'image/dark/view-grid.svg',
|
||||
icon: 'view-grid',
|
||||
tip: _('Grid view')
|
||||
});
|
||||
this.view = Vn.Catalog.View.LIST;
|
||||
this.view = Hedera.Catalog.View.LIST;
|
||||
var className = 'list-view';
|
||||
}
|
||||
|
||||
var node = this.$('grid-view').getNode ();
|
||||
node.className = className;
|
||||
Vn.Cookie.set ('hedera_view', this.view);
|
||||
localStorage.setItem ('hederaView', this.view);
|
||||
}
|
||||
|
||||
,onSwitchViewClick: function ()
|
||||
{
|
||||
this.setView (this.view === Vn.Catalog.View.LIST ?
|
||||
Vn.Catalog.View.GRID : Vn.Catalog.View.LIST);
|
||||
this.setView (this.view === Hedera.Catalog.View.LIST ?
|
||||
Hedera.Catalog.View.GRID : Hedera.Catalog.View.LIST);
|
||||
}
|
||||
|
||||
,onBasketReady: function (form)
|
||||
|
@ -123,7 +123,7 @@ Vn.Catalog = new Class
|
|||
});
|
||||
|
||||
var img = builder.$('image');
|
||||
img.src = 'image/family_dark/'+ form.get ('id') +'.svg';
|
||||
img.src = 'image/family/light/'+ form.get ('id') +'.svg';
|
||||
img.title = form.get ('name');
|
||||
img.alt = img.title;
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ Vn.Catalog = new Class
|
|||
|
||||
,isGuest: function ()
|
||||
{
|
||||
if (Vn.Cookie.check ('hedera_guest'))
|
||||
if (localStorage.getItem ('hederaGuest'))
|
||||
{
|
||||
Htk.Toast.showError (_('YouMustBeLoggedIn'));
|
||||
return true;
|
||||
|
@ -348,7 +348,7 @@ Vn.Catalog = new Class
|
|||
}
|
||||
});
|
||||
|
||||
Vn.Catalog.extend
|
||||
Hedera.Catalog.extend
|
||||
({
|
||||
View: {
|
||||
LIST: 0,
|
||||
|
@ -496,9 +496,11 @@ Vn.Filter = new Class
|
|||
this._onCloseClick.bind (this, li));
|
||||
li.appendChild (button);
|
||||
|
||||
var img = document.createElement ('img');
|
||||
img.src = 'image/close.svg';
|
||||
button.appendChild (img);
|
||||
var icon = new Htk.Icon ({
|
||||
icon: 'close',
|
||||
alt: _('Close')
|
||||
});
|
||||
button.appendChild (icon.node);
|
||||
|
||||
var text = this._label = document.createTextNode ('');
|
||||
li.appendChild (text);
|