This commit is contained in:
Juan Ferrer Toribio 2018-01-02 16:54:40 +01:00
commit a341f17ee5
272 changed files with 725 additions and 325 deletions

View File

@ -1,4 +1,8 @@
extends: eslint:recommended extends: eslint:recommended
env:
es6: true
parserOptions:
sourceType: module
rules: rules:
no-undef: 0 no-undef: 0
no-redeclare: 0 no-redeclare: 0

0
LICENSE Executable file → Normal file
View File

View File

@ -2,33 +2,24 @@
# Alias /image-db /var/lib/hedera-web/image-db/ # Alias /image-db /var/lib/hedera-web/image-db/
<Directory /usr/share/hedera-web/> <Directory /usr/share/hedera-web/>
Options -Indexes -FollowSymLinks Options -Indexes -FollowSymLinks
AllowOverride None AllowOverride None
Require all granted
Order Allow,Deny
Allow From All
<FilesMatch "\.(css|js|json|php|xml|html|svg)$"> <FilesMatch "\.(css|js|json|php|xml|html|svg)$">
SetOutputFilter DEFLATE SetOutputFilter DEFLATE
</FilesMatch> </FilesMatch>
<FilesMatch "\.(ttf|otf|eot|woff)$"> <FilesMatch "\.(ttf|otf|eot|woff)$">
<IfModule mod_headers.c> <IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*" Header set Access-Control-Allow-Origin "*"
</IfModule> </IfModule>
</FilesMatch> </FilesMatch>
</Directory> </Directory>
<Directory /var/lib/hedera-web/image-db/> <Directory /var/lib/hedera-web/image-db/>
Options Indexes FollowSymLinks MultiViews Options Indexes FollowSymLinks MultiViews
AllowOverride FileInfo Options AllowOverride FileInfo Options
Order Allow,Deny
Allow From All
Require all granted Require all granted
</Directory> </Directory>

0
conf/config.php Executable file → Normal file
View File

7
debian/control vendored
View File

@ -5,13 +5,14 @@ Build-Depends: build-essential, debhelper, nodejs
Standards-Version: 3.9.3 Standards-Version: 3.9.3
Section: misc Section: misc
Homepage: http://www.verdnatura.es Homepage: http://www.verdnatura.es
Vcs-Git: git://www.verdnatura.es/var/git/hedera-web Vcs-Git: https://git.verdnatura.es/hedera-web
Package: hedera-web Package: hedera-web
Architecture: all Architecture: all
Depends: apache2, php5-mysql, php5-mcrypt, php5-ldap, php5-ssh2, php5-apcu, php-vn-lib, nodejs Depends: apache2 | httpd, nodejs, php5-cli, php5-mysql, php5-mcrypt, php5-ldap, php5-ssh2, php5-apcu, php-vn-lib
Suggests: php-text-captcha, php5-imap Suggests: php-text-captcha, php5-imap
Section: misc Section: misc
Priority: optional Priority: optional
Description: Verdnatura's web page Description: Verdnatura's web page
Verdnatura's web page. Web page used by Verdnatura, it includes user authetication, a simple CMS and
a webpshop.

0
debian/cron.d vendored Normal file → Executable file
View File

3
debian/install vendored
View File

@ -10,8 +10,7 @@ reports usr/share/hedera-web
rest usr/share/hedera-web rest usr/share/hedera-web
index.php usr/share/hedera-web index.php usr/share/hedera-web
package.json usr/share/hedera-web package.json usr/share/hedera-web
manifest.json usr/share/hedera-web build usr/share/hedera-web
LICENSE usr/share/hedera-web
README.md usr/share/hedera-web README.md usr/share/hedera-web
webpack.config.json usr/share/hedera-web webpack.config.json usr/share/hedera-web
build usr/share/hedera-web build usr/share/hedera-web

13
debian/postinst vendored
View File

@ -1,8 +1,15 @@
#!/bin/bash #!/bin/bash
cd /usr/share/hedera-web && npm install --production set -e
a2enconf hedera-web
service apache2 reload (cd /usr/share/hedera-web && npm install --production)
if [ -e /usr/share/apache2/apache2-maintscript-helper ]
then
. /usr/share/apache2/apache2-maintscript-helper
apache2_invoke enconf hedera-web.conf
fi
service php5-fpm restart service php5-fpm restart
service cron restart service cron restart

9
debian/postrm vendored
View File

@ -1,5 +1,12 @@
#!/bin/bash #!/bin/bash
set -e
if [ -e /usr/share/apache2/apache2-maintscript-helper ]
then
. /usr/share/apache2/apache2-maintscript-helper
apache2_invoke disconf hedera-web.conf
fi
rm -rf /usr/share/hedera-web/node_modules rm -rf /usr/share/hedera-web/node_modules
service apache2 reload
service cron restart service cron restart

View File

@ -5,8 +5,8 @@ Hedera.AddressList = new Class
,activate: function () ,activate: function ()
{ {
this.$.userModel.setInfo ('c', 'customer_view', 'hedera'); this.$.userModel.setInfo ('c', 'myClient', 'hedera');
this.$.addresses.setInfo ('a', 'address_view', 'hedera'); this.$.addresses.setInfo ('a', 'myAddress', 'hedera');
} }
,onAddAddressClick: function () ,onAddAddressClick: function ()

0
forms/account/address-list/locale/ca.json Executable file → Normal file
View File

0
forms/account/address-list/locale/en.json Executable file → Normal file
View File

0
forms/account/address-list/locale/es.json Executable file → Normal file
View File

0
forms/account/address-list/locale/fr.json Executable file → Normal file
View File

0
forms/account/address-list/locale/mn.json Executable file → Normal file
View File

24
forms/account/address-list/ui.xml Executable file → Normal file
View File

@ -2,17 +2,17 @@
<vn-group> <vn-group>
<db-form id="user-form"> <db-form id="user-form">
<db-model property="model" id="user-model" updatable="true"> <db-model property="model" id="user-model" updatable="true">
SELECT user_id, default_address SELECT id, defaultAddressFk
FROM customer_view c FROM myClient
</db-model> </db-model>
</db-form> </db-form>
<db-model id="addresses" updatable="true"> <db-model id="addresses" updatable="true">
SELECT a.id, a.consignee, p.name province, a.zip_code, SELECT a.id, a.nickname, p.name province, a.postalCode,
a.city, a.name, a.active, c.Pais country a.city, a.street, a.active, c.country
FROM address_view a FROM myAddress a
LEFT JOIN vn2008.province p ON a.province_id = p.province_id LEFT JOIN vn.province p ON p.id = a.provinceFk
JOIN vn2008.Paises c ON c.Id = p.Paises_Id JOIN vn.country c ON c.id = p.countryFk
WHERE active != FALSE WHERE a.active
</db-model> </db-model>
</vn-group> </vn-group>
<h1 id="title"> <h1 id="title">
@ -29,7 +29,7 @@
<htk-radio-group <htk-radio-group
id="default-address" id="default-address"
lot="user-form" lot="user-form"
name="default_address"/> name="defaultAddressFk"/>
<htk-repeater model="addresses"> <htk-repeater model="addresses">
<custom> <custom>
<a <a
@ -50,13 +50,13 @@
on-click="onRemoveAddressClick"/> on-click="onRemoveAddressClick"/>
</div> </div>
<p class="important"> <p class="important">
{{consignee}} {{nickname}}
</p> </p>
<p> <p>
{{name}} {{street}}
</p> </p>
<p> <p>
{{zip_code}}, {{city}} {{postalCode}}, {{city}}
</p> </p>
</a> </a>
</custom> </custom>

View File

@ -5,8 +5,8 @@ Hedera.Address = new Class
,activate: function () ,activate: function ()
{ {
this.$.model.setInfo ('a', 'address_view', 'hedera', ['id'], 'id'); this.$.model.setInfo ('a', 'myAddress', 'hedera', ['id'], 'id');
this.$.model.setDefault ('customer_id', 'a', this.$.model.setDefault ('clientFk', 'a',
new Sql.Function ({schema: 'account', name: 'userGetId'})); new Sql.Function ({schema: 'account', name: 'userGetId'}));
} }

0
forms/account/address/locale/ca.json Executable file → Normal file
View File

0
forms/account/address/locale/en.json Executable file → Normal file
View File

0
forms/account/address/locale/es.json Executable file → Normal file
View File

0
forms/account/address/locale/fr.json Executable file → Normal file
View File

0
forms/account/address/locale/mn.json Executable file → Normal file
View File

25
forms/account/address/ui.xml Executable file → Normal file
View File

@ -11,11 +11,12 @@
mode="ON_DEMAND" mode="ON_DEMAND"
lot="params" lot="params"
on-operations-done="onOperationsDone"> on-operations-done="onOperationsDone">
SELECT a.id, a.name, a.consignee, a.city, a.zip_code, a.province_id, c.Id country SELECT a.id, a.street, a.nickname, a.city,
FROM address_view a a.postalCode, a.provinceFk, c.id countryFk
LEFT JOIN vn2008.province p ON p.province_id = a.province_id FROM myAddress a
JOIN vn2008.Paises c ON c.Id = p.Paises_Id LEFT JOIN vn.province p ON p.id = a.provinceFk
WHERE active != FALSE AND a.id = #address JOIN vn.country c ON c.id = p.countryFk
WHERE a.active AND a.id = #address
</db-model> </db-model>
</db-form> </db-form>
</vn-group> </vn-group>
@ -36,11 +37,11 @@
<div class="card form"> <div class="card form">
<div> <div>
<label>_Name</label> <label>_Name</label>
<htk-entry lot="iter" name="consignee"/> <htk-entry lot="iter" name="nickname"/>
</div> </div>
<div> <div>
<label>_Address</label> <label>_Address</label>
<htk-entry lot="iter" name="name"/> <htk-entry lot="iter" name="street"/>
</div> </div>
<div> <div>
<label>_City</label> <label>_City</label>
@ -48,7 +49,7 @@
</div> </div>
<div> <div>
<label>_ZipCode</label> <label>_ZipCode</label>
<htk-entry lot="iter" name="zip_code"/> <htk-entry lot="iter" name="postalCode"/>
</div> </div>
<div> <div>
<label>_Country</label> <label>_Country</label>
@ -60,8 +61,8 @@
name="country" name="country"
one-way="true"/> one-way="true"/>
<db-model property="model"> <db-model property="model">
SELECT Id, Pais FROM vn2008.Paises SELECT id, country FROM vn.country
ORDER BY Pais ORDER BY country
</db-model> </db-model>
</htk-combo> </htk-combo>
</div> </div>
@ -69,8 +70,8 @@
<label>_Province</label> <label>_Province</label>
<htk-combo lot="iter" name="province_id"> <htk-combo lot="iter" name="province_id">
<db-model property="model" lot="iter"> <db-model property="model" lot="iter">
SELECT province_id, name FROM vn2008.province SELECT id, name FROM vn.province
WHERE Paises_Id = #country WHERE countryFk = #country
ORDER BY name ORDER BY name
</db-model> </db-model>
</htk-combo> </htk-combo>

View File

@ -5,7 +5,7 @@ Hedera.Conf = new Class
,activate: function () ,activate: function ()
{ {
this.$.userModel.setInfo ('c', 'customer_view', 'hedera'); this.$.userModel.setInfo ('c', 'myClient', 'hedera');
if (this.hash.$.changePass) if (this.hash.$.changePass)
this.onPassChangeClick (); this.onPassChangeClick ();

0
forms/account/conf/locale/ca.json Executable file → Normal file
View File

0
forms/account/conf/locale/en.json Executable file → Normal file
View File

0
forms/account/conf/locale/es.json Executable file → Normal file
View File

0
forms/account/conf/locale/fr.json Executable file → Normal file
View File

0
forms/account/conf/locale/mn.json Executable file → Normal file
View File

8
forms/account/conf/ui.xml Executable file → Normal file
View File

@ -7,10 +7,10 @@
<db-form id="user"> <db-form id="user">
<db-model property="model" id="user-model" updatable="true"> <db-model property="model" id="user-model" updatable="true">
SELECT u.id, u.name, u.email, u.recoverPass, SELECT u.id, u.name, u.email, u.recoverPass,
u.nickname, u.lang, c.mail, c.user_id u.nickname, u.lang, c.isToBeMailed, c.id clientFk
FROM account.userView u FROM account.userView u
LEFT JOIN customer_view c LEFT JOIN myClient c
ON u.id = c.user_id ON u.id = c.id
</db-model> </db-model>
</db-form> </db-form>
</vn-group> </vn-group>
@ -52,7 +52,7 @@
</div> </div>
<div> <div>
<span> <span>
<htk-check id="mail" lot="user" name="mail"/> <htk-check id="mail" lot="user" name="isToBeMailed"/>
<label for="mail">_Receive invoices by email</label> <label for="mail">_Receive invoices by email</label>
</span> </span>
</div> </div>

0
forms/admin/access-log/ui.xml Executable file → Normal file
View File

0
forms/admin/connections/locale/ca.json Executable file → Normal file
View File

0
forms/admin/connections/locale/en.json Executable file → Normal file
View File

0
forms/admin/connections/locale/es.json Executable file → Normal file
View File

0
forms/admin/connections/locale/fr.json Executable file → Normal file
View File

0
forms/admin/connections/locale/mn.json Executable file → Normal file
View File

0
forms/admin/connections/locale/pt.json Executable file → Normal file
View File

0
forms/admin/connections/ui.xml Executable file → Normal file
View File

0
forms/admin/items/locale/ca.json Executable file → Normal file
View File

0
forms/admin/items/locale/en.json Executable file → Normal file
View File

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

0
forms/admin/items/locale/fr.json Executable file → Normal file
View File

0
forms/admin/items/locale/mn.json Executable file → Normal file
View File

0
forms/admin/items/ui.xml Executable file → Normal file
View File

0
forms/admin/links/locale/ca.json Executable file → Normal file
View File

0
forms/admin/links/locale/en.json Executable file → Normal file
View File

0
forms/admin/links/locale/es.json Executable file → Normal file
View File

0
forms/admin/links/locale/fr.json Executable file → Normal file
View File

0
forms/admin/links/locale/mn.json Executable file → Normal file
View File

0
forms/admin/links/ui.xml Executable file → Normal file
View File

0
forms/admin/photos/locale/ca.json Executable file → Normal file
View File

0
forms/admin/photos/locale/en.json Executable file → Normal file
View File

0
forms/admin/photos/locale/es.json Executable file → Normal file
View File

0
forms/admin/photos/locale/fr.json Executable file → Normal file
View File

0
forms/admin/photos/locale/mn.json Executable file → Normal file
View File

2
forms/admin/photos/ui.xml Executable file → Normal file
View File

@ -8,7 +8,7 @@
<label>_Collection</label> <label>_Collection</label>
<htk-combo id="schema"> <htk-combo id="schema">
<db-model property="model"> <db-model property="model">
SELECT name, `desc` FROM image_schema ORDER BY `desc` SELECT name, `desc` FROM imageCollection ORDER BY `desc`
</db-model> </db-model>
</htk-combo> </htk-combo>
</div> </div>

0
forms/admin/queries/locale/ca.json Executable file → Normal file
View File

0
forms/admin/queries/locale/en.json Executable file → Normal file
View File

0
forms/admin/queries/locale/es.json Executable file → Normal file
View File

0
forms/admin/queries/locale/fr.json Executable file → Normal file
View File

0
forms/admin/queries/locale/mn.json Executable file → Normal file
View File

0
forms/admin/queries/locale/pt.json Executable file → Normal file
View File

0
forms/admin/queries/ui.xml Executable file → Normal file
View File

0
forms/admin/users/locale/ca.json Executable file → Normal file
View File

0
forms/admin/users/locale/en.json Executable file → Normal file
View File

0
forms/admin/users/locale/es.json Executable file → Normal file
View File

0
forms/admin/users/locale/fr.json Executable file → Normal file
View File

0
forms/admin/users/locale/mn.json Executable file → Normal file
View File

0
forms/admin/users/ui.xml Executable file → Normal file
View File

0
forms/admin/visits/locale/ca.json Executable file → Normal file
View File

0
forms/admin/visits/locale/en.json Executable file → Normal file
View File

0
forms/admin/visits/locale/es.json Executable file → Normal file
View File

0
forms/admin/visits/locale/fr.json Executable file → Normal file
View File

0
forms/admin/visits/locale/mn.json Executable file → Normal file
View File

0
forms/admin/visits/locale/pt.json Executable file → Normal file
View File

0
forms/admin/visits/ui.xml Executable file → Normal file
View File

0
forms/agencies/packages/locale/ca.json Executable file → Normal file
View File

0
forms/agencies/packages/locale/en.json Executable file → Normal file
View File

0
forms/agencies/packages/locale/es.json Executable file → Normal file
View File

0
forms/agencies/packages/locale/fr.json Executable file → Normal file
View File

0
forms/agencies/packages/locale/mn.json Executable file → Normal file
View File

0
forms/agencies/packages/ui.xml Executable file → Normal file
View File

0
forms/agencies/provinces/locale/ca.json Executable file → Normal file
View File

0
forms/agencies/provinces/locale/en.json Executable file → Normal file
View File

0
forms/agencies/provinces/locale/es.json Executable file → Normal file
View File

0
forms/agencies/provinces/locale/fr.json Executable file → Normal file
View File

0
forms/agencies/provinces/locale/mn.json Executable file → Normal file
View File

0
forms/agencies/provinces/ui.xml Executable file → Normal file
View File

0
forms/cms/about/locale/ca.json Executable file → Normal file
View File

0
forms/cms/about/locale/en.json Executable file → Normal file
View File

0
forms/cms/about/locale/es.json Executable file → Normal file
View File

0
forms/cms/about/locale/fr.json Executable file → Normal file
View File

0
forms/cms/about/locale/mn.json Executable file → Normal file
View File

0
forms/cms/about/ui.xml Executable file → Normal file
View File

0
forms/cms/contact/locale/ca.json Executable file → Normal file
View File

0
forms/cms/contact/locale/en.json Executable file → Normal file
View File

0
forms/cms/contact/locale/es.json Executable file → Normal file
View File

0
forms/cms/contact/locale/fr.json Executable file → Normal file
View File

0
forms/cms/contact/locale/mn.json Executable file → Normal file
View File

0
forms/cms/contact/ui.xml Executable file → Normal file
View File

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