diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..9bc0ab50 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules +hedera-web.js diff --git a/app.js b/app.js index 5009b804..0e456ebc 100644 --- a/app.js +++ b/app.js @@ -1,9 +1,10 @@ -//Vn.includeCss ('pages/main/style.css'); +var Hedera = require ('hedera/hedera'); +Vn.includeCss ('pages/main/style.css'); -var Hedera = require ('./js/hedera/main'); -var App = require ('./js/hedera/app'); +window.onload = function main () +{ + hederaWeb = new Hedera.App (); + hederaWeb.run (); +} -hederaWeb = new App (); -hederaWeb.run (); -window.hederaWeb = hederaWeb; diff --git a/conf/apache.conf b/conf/apache.conf index 0206bd5f..cf8b07c4 100644 --- a/conf/apache.conf +++ b/conf/apache.conf @@ -1,5 +1,5 @@ # Alias /hedera-web /usr/share/hedera-web/ -# Alias /vn-image-data /var/lib/hedera-web/image-db/ +# Alias /image-db /var/lib/hedera-web/image-db/ diff --git a/forms/account/address-list/address-list.js b/forms/account/address-list/address-list.js index 57141a56..86aeb89c 100644 --- a/forms/account/address-list/address-list.js +++ b/forms/account/address-list/address-list.js @@ -1,7 +1,7 @@ -Vn.AddressList = new Class +Hedera.AddressList = new Class ({ - Extends: Vn.Form + Extends: Hedera.Form ,activate: function () { diff --git a/forms/account/address-list/ui.xml b/forms/account/address-list/ui.xml index 4bba3fdc..b1203d3f 100755 --- a/forms/account/address-list/ui.xml +++ b/forms/account/address-list/ui.xml @@ -47,13 +47,13 @@ form="iter" column="id" tip="_RemoveAddress" - image="image/delete.svg" + icon="delete" on-click="onRemoveAddressClick"/>

diff --git a/forms/account/address/address.js b/forms/account/address/address.js index aca0a781..d977a2c3 100644 --- a/forms/account/address/address.js +++ b/forms/account/address/address.js @@ -1,7 +1,7 @@ -Vn.Address = new Class +Hedera.Address = new Class ({ - Extends: Vn.Form + Extends: Hedera.Form ,activate: function () { diff --git a/forms/account/conf/conf.js b/forms/account/conf/conf.js index 866563e3..06d387d3 100644 --- a/forms/account/conf/conf.js +++ b/forms/account/conf/conf.js @@ -1,7 +1,7 @@ -Vn.Conf = new Class +Hedera.Conf = new Class ({ - Extends: Vn.Form + Extends: Hedera.Form ,activate: function () { diff --git a/forms/admin/access-log/access-log.js b/forms/admin/access-log/access-log.js index f226a950..8efbd52a 100644 --- a/forms/admin/access-log/access-log.js +++ b/forms/admin/access-log/access-log.js @@ -1,6 +1,6 @@ -Vn.AccessLog = new Class +Hedera.AccessLog = new Class ({ - Extends: Vn.Form + Extends: Hedera.Form }); diff --git a/forms/admin/connections/connections.js b/forms/admin/connections/connections.js index ba3fd12f..ff66f4d3 100644 --- a/forms/admin/connections/connections.js +++ b/forms/admin/connections/connections.js @@ -1,7 +1,7 @@ -Vn.Connections = new Class +Hedera.Connections = new Class ({ - Extends: Vn.Form + Extends: Hedera.Form ,_timeoutId: null diff --git a/forms/admin/items/items.js b/forms/admin/items/items.js index bb42361d..b029e140 100644 --- a/forms/admin/items/items.js +++ b/forms/admin/items/items.js @@ -1,7 +1,7 @@ -Vn.Items = new Class +Hedera.Items = new Class ({ - Extends: Vn.Form + Extends: Hedera.Form ,activate: function () { diff --git a/forms/admin/links/links.js b/forms/admin/links/links.js index 41c14fa7..f19f14a1 100644 --- a/forms/admin/links/links.js +++ b/forms/admin/links/links.js @@ -1,7 +1,7 @@ -Vn.Links = new Class +Hedera.Links = new Class ({ - Extends: Vn.Form + Extends: Hedera.Form ,repeaterFunc: function (res, form) { diff --git a/forms/admin/photos/photos.js b/forms/admin/photos/photos.js index e158aad2..833273de 100644 --- a/forms/admin/photos/photos.js +++ b/forms/admin/photos/photos.js @@ -1,7 +1,7 @@ -Vn.Photos = new Class +Hedera.Photos = new Class ({ - Extends: Vn.Form + Extends: Hedera.Form ,activate: function () { diff --git a/forms/admin/queries/queries.js b/forms/admin/queries/queries.js index 4e273761..38b9e581 100644 --- a/forms/admin/queries/queries.js +++ b/forms/admin/queries/queries.js @@ -1,7 +1,7 @@ -Vn.Queries = new Class +Hedera.Queries = new Class ({ - Extends: Vn.Form + Extends: Hedera.Form ,activate: function () { diff --git a/forms/admin/shelves/shelves.js b/forms/admin/shelves/shelves.js index d2c0d050..d1753511 100644 --- a/forms/admin/shelves/shelves.js +++ b/forms/admin/shelves/shelves.js @@ -1,7 +1,7 @@ -Vn.Shelves = new Class +Hedera.Shelves = new Class ({ - Extends: Vn.Form + Extends: Hedera.Form ,activate: function () { diff --git a/forms/admin/users/users.js b/forms/admin/users/users.js index e04f0b3f..471b4d4b 100644 --- a/forms/admin/users/users.js +++ b/forms/admin/users/users.js @@ -1,7 +1,7 @@ -Vn.Users = new Class +Hedera.Users = new Class ({ - Extends: Vn.Form + Extends: Hedera.Form ,onAccessLogClick: function (button, form) { diff --git a/forms/admin/visits/visits.js b/forms/admin/visits/visits.js index a8454491..fd4c40b0 100644 --- a/forms/admin/visits/visits.js +++ b/forms/admin/visits/visits.js @@ -1,7 +1,7 @@ -Vn.Visits = new Class +Hedera.Visits = new Class ({ - Extends: Vn.Form + Extends: Hedera.Form ,activate: function () { diff --git a/forms/agencies/packages/packages.js b/forms/agencies/packages/packages.js index d3f0db86..b71a13b6 100644 --- a/forms/agencies/packages/packages.js +++ b/forms/agencies/packages/packages.js @@ -1,7 +1,7 @@ -Vn.Packages = new Class +Hedera.Packages = new Class ({ - Extends: Vn.Form + Extends: Hedera.Form ,onShowClick: function (column, agencyId) { diff --git a/forms/agencies/provinces/provinces.js b/forms/agencies/provinces/provinces.js index fe50c3d1..723fc15c 100644 --- a/forms/agencies/provinces/provinces.js +++ b/forms/agencies/provinces/provinces.js @@ -1,6 +1,6 @@ -Vn.Provinces = new Class +Hedera.Provinces = new Class ({ - Extends: Vn.Form + Extends: Hedera.Form }); diff --git a/forms/cms/about/about.js b/forms/cms/about/about.js index fa65a1cc..1244f041 100644 --- a/forms/cms/about/about.js +++ b/forms/cms/about/about.js @@ -1,6 +1,6 @@ -Vn.About = new Class +Hedera.About = new Class ({ - Extends: Vn.Form + Extends: Hedera.Form }); diff --git a/forms/cms/contact/contact.js b/forms/cms/contact/contact.js index c95892a8..509863ae 100644 --- a/forms/cms/contact/contact.js +++ b/forms/cms/contact/contact.js @@ -1,7 +1,7 @@ -Vn.Contact = new Class +Hedera.Contact = new Class ({ - Extends: Vn.Form + Extends: Hedera.Form ,activate: function () { diff --git a/forms/cms/home/home.js b/forms/cms/home/home.js index 2306c4c6..d8a544d8 100644 --- a/forms/cms/home/home.js +++ b/forms/cms/home/home.js @@ -1,7 +1,7 @@ -Vn.Home = new Class +Hedera.Home = new Class ({ - Extends: Vn.Form + Extends: Hedera.Form ,onStartOrderClick: function () { diff --git a/forms/cms/location/location.js b/forms/cms/location/location.js index a1f051bf..dc823f5f 100644 --- a/forms/cms/location/location.js +++ b/forms/cms/location/location.js @@ -1,9 +1,9 @@ var gmapsIsLoaded = false; -Vn.Location = new Class +Hedera.Location = new Class ({ - Extends: Vn.Form + Extends: Hedera.Form ,locations: null diff --git a/forms/cms/training/training.js b/forms/cms/training/training.js index 2e7b514b..adb059b7 100644 --- a/forms/cms/training/training.js +++ b/forms/cms/training/training.js @@ -1,5 +1,5 @@ -Vn.Training = new Class +Hedera.Training = new Class ({ - Extends: Vn.Form + Extends: Hedera.Form }); diff --git a/forms/cms/why/why.js b/forms/cms/why/why.js index a29a3c04..ab2f919a 100644 --- a/forms/cms/why/why.js +++ b/forms/cms/why/why.js @@ -1,6 +1,6 @@ -Vn.Why = new Class +Hedera.Why = new Class ({ - Extends: Vn.Form + Extends: Hedera.Form }); diff --git a/forms/ecomerce/basket/basket.js b/forms/ecomerce/basket/basket.js index e267c7f0..66f9fe08 100644 --- a/forms/ecomerce/basket/basket.js +++ b/forms/ecomerce/basket/basket.js @@ -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)); } diff --git a/forms/ecomerce/catalog/catalog.js b/forms/ecomerce/catalog/catalog.js index 95f4f064..2fb2895a 100644 --- a/forms/ecomerce/catalog/catalog.js +++ b/forms/ecomerce/catalog/catalog.js @@ -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 @@ -35,9 +35,9 @@ Vn.Catalog = new Class this.$('items-model').setInfo ('a', 'Articles', 'vn2008', ['item_id']); if (localStorage.getItem ('hederaView')) - this.setView (parsetInt (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,22 +49,22 @@ 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', + image: 'view-grid', tip: _('Grid view') }); - this.view = Vn.Catalog.View.LIST; + this.view = Hedera.Catalog.View.LIST; var className = 'list-view'; } @@ -75,8 +75,8 @@ Vn.Catalog = new Class ,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) @@ -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); var text = this._label = document.createTextNode (''); li.appendChild (text); diff --git a/forms/ecomerce/catalog/ui.xml b/forms/ecomerce/catalog/ui.xml index 4722fd6b..f9b61315 100755 --- a/forms/ecomerce/catalog/ui.xml +++ b/forms/ecomerce/catalog/ui.xml @@ -450,20 +450,22 @@