From d87695fd99be0593c1d23e875bd4c16a17ff5dc1 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Sat, 7 Mar 2015 00:33:54 +0100 Subject: [PATCH] =?UTF-8?q?A=C3=B1adida=20funcionalidad=20a=20Vn.Builder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package/DEBIAN/control | 2 +- package/etc/apache2/conf.d/hedera-web | 2 +- package/usr/share/hedera-web/form.php | 24 --- .../share/hedera-web/forms/account/account.js | 92 +++++------ .../share/hedera-web/forms/account/html.php | 39 ----- .../share/hedera-web/forms/account/style.css | 16 +- .../usr/share/hedera-web/forms/account/ui.xml | 42 +++++ .../forms/admin/access-log/access-log.js | 2 +- .../forms/admin/access-log/html.php | 79 ---------- .../forms/admin/access-log/style.css | 6 +- .../hedera-web/forms/admin/access-log/ui.xml | 81 ++++++++++ .../hedera-web/forms/admin/links/html.php | 16 -- .../hedera-web/forms/admin/links/links.js | 2 +- .../hedera-web/forms/admin/links/style.css | 8 +- .../share/hedera-web/forms/admin/links/ui.xml | 18 +++ .../hedera-web/forms/admin/photos/html.php | 37 ----- .../hedera-web/forms/admin/photos/photos.js | 22 +-- .../hedera-web/forms/admin/photos/style.css | 16 +- .../hedera-web/forms/admin/photos/ui.xml | 39 +++++ .../hedera-web/forms/admin/users/html.php | 42 ----- .../hedera-web/forms/admin/users/style.css | 6 +- .../share/hedera-web/forms/admin/users/ui.xml | 44 ++++++ .../hedera-web/forms/admin/users/users.js | 4 +- .../hedera-web/forms/admin/visits/html.php | 145 ----------------- .../hedera-web/forms/admin/visits/style.css | 4 +- .../hedera-web/forms/admin/visits/ui.xml | 147 ++++++++++++++++++ .../hedera-web/forms/admin/visits/visits.js | 18 +-- .../forms/agencies/packages/html.php | 17 -- .../forms/agencies/packages/packages.js | 2 +- .../forms/agencies/packages/style.css | 4 +- .../hedera-web/forms/agencies/packages/ui.xml | 19 +++ .../forms/agencies/provinces/html.php | 25 --- .../forms/agencies/provinces/style.css | 4 +- .../forms/agencies/provinces/ui.xml | 27 ++++ .../hedera-web/forms/cms/about/style.css | 28 ++-- .../forms/cms/about/{html.php => ui.xml} | 74 ++++----- .../hedera-web/forms/cms/contact/contact.js | 8 +- .../hedera-web/forms/cms/contact/html.php | 52 ------- .../hedera-web/forms/cms/contact/style.css | 24 +-- .../share/hedera-web/forms/cms/contact/ui.xml | 54 +++++++ .../share/hedera-web/forms/cms/home/home.js | 13 +- .../share/hedera-web/forms/cms/home/html.php | 15 -- .../share/hedera-web/forms/cms/home/style.css | 12 +- .../share/hedera-web/forms/cms/home/ui.xml | 17 ++ .../hedera-web/forms/cms/location/html.php | 1 - .../hedera-web/forms/cms/location/location.js | 4 +- .../hedera-web/forms/cms/location/style.css | 2 +- .../hedera-web/forms/cms/location/ui.xml | 3 + .../hedera-web/forms/cms/training/style.css | 5 +- .../hedera-web/forms/cms/training/training.js | 2 +- .../forms/cms/training/{html.php => ui.xml} | 4 +- .../share/hedera-web/forms/cms/why/html.php | 11 -- .../share/hedera-web/forms/cms/why/style.css | 10 +- .../usr/share/hedera-web/forms/cms/why/ui.xml | 22 +++ .../forms/ecomerce/basket/basket.js | 16 +- .../forms/ecomerce/basket/style.css | 8 +- .../ecomerce/basket/{html.php => ui.xml} | 78 +++++----- .../forms/ecomerce/catalog/catalog.js | 84 +++++----- .../forms/ecomerce/catalog/html.php | 118 -------------- .../forms/ecomerce/catalog/style.css | 66 ++++---- .../hedera-web/forms/ecomerce/catalog/ui.xml | 120 ++++++++++++++ .../forms/ecomerce/checkout/checkout.js | 19 +-- .../forms/ecomerce/checkout/html.php | 81 ---------- .../forms/ecomerce/checkout/style.css | 6 +- .../hedera-web/forms/ecomerce/checkout/ui.xml | 85 ++++++++++ .../hedera-web/forms/ecomerce/orders/html.php | 77 --------- .../forms/ecomerce/orders/orders.js | 61 ++------ .../forms/ecomerce/orders/style.css | 64 ++------ .../hedera-web/forms/ecomerce/orders/ui.xml | 79 ++++++++++ .../hedera-web/forms/ecomerce/ticket/html.php | 113 -------------- .../forms/ecomerce/ticket/style.css | 6 +- .../forms/ecomerce/ticket/ticket.js | 6 +- .../hedera-web/forms/ecomerce/ticket/ui.xml | 115 ++++++++++++++ .../share/hedera-web/forms/news/new/html.php | 45 ------ .../share/hedera-web/forms/news/new/new.js | 19 +-- .../share/hedera-web/forms/news/new/style.css | 20 +-- .../share/hedera-web/forms/news/new/ui.xml | 47 ++++++ .../share/hedera-web/forms/news/news/html.php | 27 ---- .../share/hedera-web/forms/news/news/news.js | 4 +- .../hedera-web/forms/news/news/style.css | 4 +- .../share/hedera-web/forms/news/news/ui.xml | 29 ++++ package/usr/share/hedera-web/global/style.css | 140 +++++++++++------ package/usr/share/hedera-web/index.php | 3 +- package/usr/share/hedera-web/js/db/conn.js | 6 +- .../share/hedera-web/js/db/http-request.js | 2 +- package/usr/share/hedera-web/js/db/main.php | 1 - .../share/hedera-web/js/htk/column/image.js | 8 +- .../share/hedera-web/js/htk/field/calendar.js | 3 +- .../hedera-web/js/htk/field/date-chooser.js | 14 +- .../hedera-web/js/htk/field/image-editor.js | 123 --------------- .../js/htk/{field => }/full-image.js | 12 +- package/usr/share/hedera-web/js/htk/grid.js | 8 +- .../share/hedera-web/js/htk/image-editor.js | 56 +++++++ .../share/hedera-web/js/htk/image-editor.xml | 22 +++ package/usr/share/hedera-web/js/htk/main.php | 5 +- package/usr/share/hedera-web/js/htk/popup.js | 60 +++++-- .../share/hedera-web/js/htk/radio-group.js | 2 +- package/usr/share/hedera-web/js/htk/toast.js | 64 ++++++++ package/usr/share/hedera-web/js/htk/widget.js | 49 ++++++ .../usr/share/hedera-web/js/misc/browser.js | 34 ---- package/usr/share/hedera-web/js/misc/main.php | 5 - package/usr/share/hedera-web/js/vn/browser.js | 36 +++++ package/usr/share/hedera-web/js/vn/builder.js | 147 +++++++++++------- .../share/hedera-web/js/vn/http-request.js | 30 ++++ .../share/hedera-web/js/{misc => vn}/ie.js | 99 ++++++------ package/usr/share/hedera-web/js/vn/main.js | 34 ++++ package/usr/share/hedera-web/js/vn/main.php | 6 + .../usr/share/hedera-web/js/vn/mutators.js | 9 ++ .../hedera-web/locale/ca/forms/account.json | 12 +- .../hedera-web/locale/ca/forms/cms/why.json | 11 +- .../usr/share/hedera-web/locale/ca/js/htk.js | 1 + .../usr/share/hedera-web/locale/ca/js/vn.js | 2 +- .../hedera-web/locale/es/forms/account.json | 12 +- .../hedera-web/locale/es/forms/cms/why.json | 11 +- .../usr/share/hedera-web/locale/es/js/htk.js | 1 + .../usr/share/hedera-web/locale/es/js/vn.js | 2 +- .../hedera-web/locale/fr/forms/account.json | 12 +- .../hedera-web/locale/fr/forms/cms/why.json | 11 +- .../usr/share/hedera-web/locale/fr/js/htk.js | 1 + .../usr/share/hedera-web/locale/fr/js/vn.js | 2 +- .../share/hedera-web/pages/login/login.php | 5 + .../usr/share/hedera-web/pages/web/html.php | 4 +- .../usr/share/hedera-web/pages/web/mobile.css | 2 +- .../usr/share/hedera-web/pages/web/module.js | 9 +- .../usr/share/hedera-web/pages/web/style.css | 4 +- package/usr/share/hedera-web/pages/web/web.js | 33 ++-- package/usr/share/hedera-web/rest.php | 6 +- .../usr/share/hedera-web/tpv/soap-test.php | 41 +++-- package/usr/share/hedera-web/unavailable.html | 2 +- package/usr/share/php/vn/hedera/js.php | 6 +- package/usr/share/php/vn/hedera/web.php | 97 +++++++----- 131 files changed, 2180 insertions(+), 1894 deletions(-) delete mode 100755 package/usr/share/hedera-web/form.php delete mode 100755 package/usr/share/hedera-web/forms/account/html.php create mode 100755 package/usr/share/hedera-web/forms/account/ui.xml delete mode 100755 package/usr/share/hedera-web/forms/admin/access-log/html.php create mode 100755 package/usr/share/hedera-web/forms/admin/access-log/ui.xml delete mode 100755 package/usr/share/hedera-web/forms/admin/links/html.php create mode 100755 package/usr/share/hedera-web/forms/admin/links/ui.xml delete mode 100755 package/usr/share/hedera-web/forms/admin/photos/html.php create mode 100755 package/usr/share/hedera-web/forms/admin/photos/ui.xml delete mode 100755 package/usr/share/hedera-web/forms/admin/users/html.php create mode 100755 package/usr/share/hedera-web/forms/admin/users/ui.xml delete mode 100755 package/usr/share/hedera-web/forms/admin/visits/html.php create mode 100755 package/usr/share/hedera-web/forms/admin/visits/ui.xml delete mode 100755 package/usr/share/hedera-web/forms/agencies/packages/html.php create mode 100755 package/usr/share/hedera-web/forms/agencies/packages/ui.xml delete mode 100755 package/usr/share/hedera-web/forms/agencies/provinces/html.php create mode 100755 package/usr/share/hedera-web/forms/agencies/provinces/ui.xml rename package/usr/share/hedera-web/forms/cms/about/{html.php => ui.xml} (60%) delete mode 100755 package/usr/share/hedera-web/forms/cms/contact/html.php create mode 100755 package/usr/share/hedera-web/forms/cms/contact/ui.xml delete mode 100755 package/usr/share/hedera-web/forms/cms/home/html.php create mode 100755 package/usr/share/hedera-web/forms/cms/home/ui.xml delete mode 100755 package/usr/share/hedera-web/forms/cms/location/html.php create mode 100755 package/usr/share/hedera-web/forms/cms/location/ui.xml rename package/usr/share/hedera-web/forms/cms/training/{html.php => ui.xml} (53%) delete mode 100755 package/usr/share/hedera-web/forms/cms/why/html.php create mode 100755 package/usr/share/hedera-web/forms/cms/why/ui.xml rename package/usr/share/hedera-web/forms/ecomerce/basket/{html.php => ui.xml} (53%) delete mode 100755 package/usr/share/hedera-web/forms/ecomerce/catalog/html.php create mode 100755 package/usr/share/hedera-web/forms/ecomerce/catalog/ui.xml delete mode 100755 package/usr/share/hedera-web/forms/ecomerce/checkout/html.php create mode 100755 package/usr/share/hedera-web/forms/ecomerce/checkout/ui.xml delete mode 100755 package/usr/share/hedera-web/forms/ecomerce/orders/html.php create mode 100755 package/usr/share/hedera-web/forms/ecomerce/orders/ui.xml delete mode 100755 package/usr/share/hedera-web/forms/ecomerce/ticket/html.php create mode 100755 package/usr/share/hedera-web/forms/ecomerce/ticket/ui.xml delete mode 100755 package/usr/share/hedera-web/forms/news/new/html.php create mode 100755 package/usr/share/hedera-web/forms/news/new/ui.xml delete mode 100755 package/usr/share/hedera-web/forms/news/news/html.php create mode 100755 package/usr/share/hedera-web/forms/news/news/ui.xml delete mode 100755 package/usr/share/hedera-web/js/htk/field/image-editor.js rename package/usr/share/hedera-web/js/htk/{field => }/full-image.js (89%) create mode 100755 package/usr/share/hedera-web/js/htk/image-editor.js create mode 100644 package/usr/share/hedera-web/js/htk/image-editor.xml create mode 100755 package/usr/share/hedera-web/js/htk/toast.js delete mode 100755 package/usr/share/hedera-web/js/misc/browser.js create mode 100755 package/usr/share/hedera-web/js/vn/browser.js create mode 100755 package/usr/share/hedera-web/js/vn/http-request.js rename package/usr/share/hedera-web/js/{misc => vn}/ie.js (63%) diff --git a/package/DEBIAN/control b/package/DEBIAN/control index c5d06709..6c9a7389 100644 --- a/package/DEBIAN/control +++ b/package/DEBIAN/control @@ -1,5 +1,5 @@ Package: hedera-web -Version: 1.0-35 +Version: 1.0-36 Architecture: all Maintainer: Juan Ferrer Toribio Depends: apache2, php5-mysql, php-vn-web diff --git a/package/etc/apache2/conf.d/hedera-web b/package/etc/apache2/conf.d/hedera-web index f7bf5c91..b20018c3 100644 --- a/package/etc/apache2/conf.d/hedera-web +++ b/package/etc/apache2/conf.d/hedera-web @@ -8,7 +8,7 @@ Alias /hedera-web /usr/share/hedera-web/ Order Allow,Deny Allow From All - + SetOutputFilter DEFLATE diff --git a/package/usr/share/hedera-web/form.php b/package/usr/share/hedera-web/form.php deleted file mode 100755 index 43358735..00000000 --- a/package/usr/share/hedera-web/form.php +++ /dev/null @@ -1,24 +0,0 @@ - diff --git a/package/usr/share/hedera-web/forms/account/account.js b/package/usr/share/hedera-web/forms/account/account.js index 34d8a5fd..41f9b067 100755 --- a/package/usr/share/hedera-web/forms/account/account.js +++ b/package/usr/share/hedera-web/forms/account/account.js @@ -5,58 +5,51 @@ Vn.Account = new Class ,activate: function () { - var model = this.get ('user-model'); + var model = this.$('user-model'); model.setTableInfo ('u', 'user_view'); model.setTableInfo ('c', 'customer_view'); - this.get ('password').conn = this.conn; + this.$('user-form').on ('iter-changed', this.onUserDataReady, this); + this.$('new-password').addEventListener ('change', this.onPasswordChange.bind (this)); + this.$('repeat-password').addEventListener ('change', this.onPasswordChange.bind (this)); + this.$('user-name').addEventListener ('change', this.onUserChange.bind (this)); } -}); - -Htk.Password = new Class -({ - Extends: Htk.Widget - ,Tag: 'htk-password' - - ,initialize: function () + + ,onUserDataReady: function (form) { - this.createElement ('div'); - this.node.className = 'htk-password'; - - var passwordEntry = document.createElement ('input'); - passwordEntry.type = 'password'; - passwordEntry.value = '123456'; - passwordEntry.addEventListener ('change', this.passCheckAndChange.bind (this)); - this.node.appendChild (passwordEntry); + this.$('user-name').value = form.get ('name'); + } + + ,onUserChange: function () + { + if (!confirm (_('MustReloginIfChange'))) + return; + + var batch = new Sql.Batch (); + batch.addValue ('name', this.$('user-name').value); + + var query = 'UPDATE user_view SET name = #name ' + +'WHERE id = account.user_get_id () LIMIT 1'; - var repeatEntry = document.createElement ('input'); - repeatEntry.type = 'password'; - repeatEntry.addEventListener ('change', this.passCheckAndChange.bind (this)); - this.node.appendChild (repeatEntry); - - var logNode = document.createElement ('span'); - this.node.appendChild (logNode); - - this.logNode = logNode; - this.passwordEntry = passwordEntry; - this.repeatEntry = repeatEntry; + this.conn.execQuery (query, this.onUserUpdate.bind (this), batch); + } + + ,onUserUpdate: function (resultSet) + { + if (!resultSet.fetchResult ()) + return; + + location.reload (); } - ,passCheckAndChange: function () + ,onPasswordChange: function () { - var newPassword = this.passwordEntry.value; - var repeatedPassword = this.repeatEntry.value; - - Vn.Node.removeChilds (this.logNode); + var newPassword = this.$('new-password').value; + var repeatedPassword = this.$('repeat-password').value; if (newPassword != '' && repeatedPassword != '') { - if (newPassword !== repeatedPassword) - { - this.logNode.style.color = 'red'; - Vn.Node.setText (this.logNode, _('PasswordsDoesntMatch')); - } - else + if (newPassword === repeatedPassword) { var batch = new Sql.Batch (); batch.addValue ('password', newPassword); @@ -64,18 +57,29 @@ Htk.Password = new Class var query = 'UPDATE user_view SET password = MD5(#password) ' +'WHERE id = account.user_get_id () LIMIT 1'; - this.conn.execQuery (query, this.passUpdated.bind (this), batch); + this.conn.execQuery (query, this.onPasswordUpdate.bind (this), batch); } + else + (new Htk.Toast ()).showError (_('PasswordsDoesntMatch')); } } - ,passUpdated: function (resultSet) + ,onPasswordUpdate: function (resultSet) { if (!resultSet.fetchResult ()) return; + + this.relogin (); + (new Htk.Toast ()).showMessage (_('PasswordsChanged')); + } - this.logNode.style.color = 'green'; - Vn.Node.setText (this.logNode, _('PasswordsChanged')); + ,relogin: function () + { + this.conn.open ( + this.$('user-form').get ('name') + ,this.$('new-password').value + ,Vn.Cookie.check ('vn_pass') + ); } }); diff --git a/package/usr/share/hedera-web/forms/account/html.php b/package/usr/share/hedera-web/forms/account/html.php deleted file mode 100755 index 170a3ddf..00000000 --- a/package/usr/share/hedera-web/forms/account/html.php +++ /dev/null @@ -1,39 +0,0 @@ -
- - - - SELECT id, u.name, password, email, mail, c.user_id - FROM user_view u - LEFT JOIN customer_view c - ON u.id = c.user_id - - - -
-
-

-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
-
diff --git a/package/usr/share/hedera-web/forms/account/style.css b/package/usr/share/hedera-web/forms/account/style.css index b8b1139c..44bdd429 100755 --- a/package/usr/share/hedera-web/forms/account/style.css +++ b/package/usr/share/hedera-web/forms/account/style.css @@ -1,34 +1,34 @@ -#account +.account { padding: 1em; } -#account .box +.account .box { max-width: 40em; } -#account div.form +.account .form { margin: 0 auto; max-width: 25em; padding: 2em; } -div.form-group +.account .form-group { padding: 0.4em; } -div.form-group label +.account .form-group label { display: block; margin-bottom: 0.5em; } -div.form-group input[type=text], -div.form-group input[type=password] +.account .form-group input[type=text], +.account .form-group input[type=password] { margin: 0; width: 100%; } -div.form-group input[type=password] +.account .form-group input[type=password] { margin-bottom: 0.5em; } diff --git a/package/usr/share/hedera-web/forms/account/ui.xml b/package/usr/share/hedera-web/forms/account/ui.xml new file mode 100755 index 00000000..ede9c083 --- /dev/null +++ b/package/usr/share/hedera-web/forms/account/ui.xml @@ -0,0 +1,42 @@ + + + + + SELECT id, u.name, email, mail, c.user_id + FROM user_view u + LEFT JOIN customer_view c + ON u.id = c.user_id + + + + + diff --git a/package/usr/share/hedera-web/forms/admin/access-log/access-log.js b/package/usr/share/hedera-web/forms/admin/access-log/access-log.js index 137b0e14..9f79b24c 100755 --- a/package/usr/share/hedera-web/forms/admin/access-log/access-log.js +++ b/package/usr/share/hedera-web/forms/admin/access-log/access-log.js @@ -5,7 +5,7 @@ Vn.AccessLog = new Class ,activate: function () { -// this.get ('return').on ('clicked', this.returnClicked.bind (this)); +// this.$('return').on ('clicked', this.returnClicked.bind (this)); } ,returnClicked: function (column, value) diff --git a/package/usr/share/hedera-web/forms/admin/access-log/html.php b/package/usr/share/hedera-web/forms/admin/access-log/html.php deleted file mode 100755 index 870b5ecf..00000000 --- a/package/usr/share/hedera-web/forms/admin/access-log/html.php +++ /dev/null @@ -1,79 +0,0 @@ -
- - - - - - - SELECT Id_Cliente, Cliente, Telefono, movil - FROM vn2008.Clientes WHERE Id_Cliente = #user - - - - - - -
-
-

-
- - - - - - - - - - - - - - - - - - - -
- - - -
- - - -
- - - -
- - - -
-
- - - SELECT u.date_time, a.platform, a.browser, a.version, a.javascript, a.cookies - FROM visit_user u - JOIN visit_access c ON u.access_id = c.id - JOIN visit_agent a ON c.agent_id = a.id - WHERE u.user_id = #user - ORDER BY u.date_time DESC - LIMIT 30 - - - - - - - - - - - -
-
-
diff --git a/package/usr/share/hedera-web/forms/admin/access-log/style.css b/package/usr/share/hedera-web/forms/admin/access-log/style.css index 6dd2df0c..c1e09338 100755 --- a/package/usr/share/hedera-web/forms/admin/access-log/style.css +++ b/package/usr/share/hedera-web/forms/admin/access-log/style.css @@ -1,14 +1,14 @@ -#access-log +.access-log { padding: 1em; min-width: 35em; } -#access-log .box +.access-log .box { max-width: 50em; margin: 0 auto; } -#access-log grid tbody tr +.access-log grid tbody tr { height: 3.4em; } diff --git a/package/usr/share/hedera-web/forms/admin/access-log/ui.xml b/package/usr/share/hedera-web/forms/admin/access-log/ui.xml new file mode 100755 index 00000000..2c193e14 --- /dev/null +++ b/package/usr/share/hedera-web/forms/admin/access-log/ui.xml @@ -0,0 +1,81 @@ + + + + + + + + SELECT Id_Cliente, Cliente, Telefono, movil + FROM vn2008.Clientes WHERE Id_Cliente = #user + + + + + + +
+
+
+

AccessLog

+
+ + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ + + +
+ + + +
+
+ + + SELECT u.date_time, a.platform, a.browser, a.version, a.javascript, a.cookies + FROM visit_user u + JOIN visit_access c ON u.access_id = c.id + JOIN visit_agent a ON c.agent_id = a.id + WHERE u.user_id = #user + ORDER BY u.date_time DESC + LIMIT 30 + + + + + + + + + + + +
+
+
+
diff --git a/package/usr/share/hedera-web/forms/admin/links/html.php b/package/usr/share/hedera-web/forms/admin/links/html.php deleted file mode 100755 index b4450f10..00000000 --- a/package/usr/share/hedera-web/forms/admin/links/html.php +++ /dev/null @@ -1,16 +0,0 @@ -
-
-
-

-
- - - SELECT image, name, description, link FROM link - ORDER BY name - - - - - -
-
diff --git a/package/usr/share/hedera-web/forms/admin/links/links.js b/package/usr/share/hedera-web/forms/admin/links/links.js index 74c30f7a..c5a3ea5a 100755 --- a/package/usr/share/hedera-web/forms/admin/links/links.js +++ b/package/usr/share/hedera-web/forms/admin/links/links.js @@ -5,7 +5,7 @@ Vn.Links = new Class ,activate: function () { - this.get ('column-link').renderer = this.linkRenderer; + this.$('column-link').renderer = this.linkRenderer; } ,linkRenderer: function (column, form) diff --git a/package/usr/share/hedera-web/forms/admin/links/style.css b/package/usr/share/hedera-web/forms/admin/links/style.css index c506dc1c..962e8734 100755 --- a/package/usr/share/hedera-web/forms/admin/links/style.css +++ b/package/usr/share/hedera-web/forms/admin/links/style.css @@ -1,18 +1,18 @@ -#cpanel +.cpanel { padding: 1em; } -#cpanel .box +.cpanel .box { max-width: 60em; min-width: 25em; } -#cpanel tbody tr +.cpanel tbody tr { height: 3.5em; } -#cpanel tbody td img +.cpanel tbody td img { min-height: 1.6em; } diff --git a/package/usr/share/hedera-web/forms/admin/links/ui.xml b/package/usr/share/hedera-web/forms/admin/links/ui.xml new file mode 100755 index 00000000..de36cf5b --- /dev/null +++ b/package/usr/share/hedera-web/forms/admin/links/ui.xml @@ -0,0 +1,18 @@ + +
+
+
+

ControlPanel

+
+ + + SELECT image, name, description, link FROM link + ORDER BY name + + + + + +
+
+
diff --git a/package/usr/share/hedera-web/forms/admin/photos/html.php b/package/usr/share/hedera-web/forms/admin/photos/html.php deleted file mode 100755 index 4d0588ce..00000000 --- a/package/usr/share/hedera-web/forms/admin/photos/html.php +++ /dev/null @@ -1,37 +0,0 @@ -
-
-
-

-
-
-
-
- - -
-
- - -
-
- - - - - SELECT name, `desc` FROM image_schema ORDER BY `desc` - - -
-
- - - -
- -
- -
-
-
diff --git a/package/usr/share/hedera-web/forms/admin/photos/photos.js b/package/usr/share/hedera-web/forms/admin/photos/photos.js index 95e790c8..8b0c7e45 100755 --- a/package/usr/share/hedera-web/forms/admin/photos/photos.js +++ b/package/usr/share/hedera-web/forms/admin/photos/photos.js @@ -5,33 +5,33 @@ Vn.Photos = new Class ,activate: function () { - this.get ('schema').value = 'catalog'; - $('photo-size').value = 10 /* MB */ * 1048576; - $('photos-form').addEventListener ('submit', this.onFormSubmit.bind (this)); - $('photos-iframe').addEventListener ('load', this.onImageUpload.bind (this)); - $('photo-id').focus (); + this.$('schema').value = 'catalog'; + this.$('photo-size').value = 10 /* MB */ * 1048576; + this.$('photo-form').addEventListener ('submit', this.onFormSubmit.bind (this)); + this.$('iframe').addEventListener ('load', this.onImageUpload.bind (this)); + this.$('photo-id').focus (); } ,onFormSubmit: function () { - $('schema-field').value = this.get ('schema').value; - $('photo-submit').disabled = true; + this.$('schema-field').value = this.$('schema').value; + this.$('submit').disabled = true; this.gui.loaderPush (); } ,onImageUpload: function (iframe) { this.gui.loaderPop (); - $('photo-submit').disabled = false; + this.$('submit').disabled = false; try { - var responseText = $('photos-iframe').contentDocument.body.textContent; + var responseText = this.$('iframe').contentDocument.body.textContent; var response = eval ('('+ responseText +')'); if (response.data) { - $('photo-id').value = ''; - $('photo-id').focus (); + this.$('photo-id').value = ''; + this.$('photo-id').focus (); alert (_('ImageUploaded')); } else diff --git a/package/usr/share/hedera-web/forms/admin/photos/style.css b/package/usr/share/hedera-web/forms/admin/photos/style.css index 43bde871..1d43878d 100755 --- a/package/usr/share/hedera-web/forms/admin/photos/style.css +++ b/package/usr/share/hedera-web/forms/admin/photos/style.css @@ -1,13 +1,13 @@ -#photos +.photos { padding: 1em; } -#photos .box +.photos .box { max-width: 40em; } -#photos form +.photos form { margin: 0 auto; max-width: 25em; @@ -16,25 +16,25 @@ div.form-group { padding: 0.4em; } -#photos form label +.photos form label { display: block; margin-bottom: 0.5em; } -#photos input, -#photos select +.photos input, +.photos select { margin: 0; width: 100%; } -#photos-iframe +.photos iframe { display: none; } /* Footer */ -#photos button +.photos button { display: block; margin: 0 auto; diff --git a/package/usr/share/hedera-web/forms/admin/photos/ui.xml b/package/usr/share/hedera-web/forms/admin/photos/ui.xml new file mode 100755 index 00000000..844b897f --- /dev/null +++ b/package/usr/share/hedera-web/forms/admin/photos/ui.xml @@ -0,0 +1,39 @@ + +
+
+
+

Photos

+
+
+
+
+ + +
+
+ + +
+
+ + + + + SELECT name, `desc` FROM image_schema ORDER BY `desc` + + +
+
+ + + +
+ +
+ +
+
+
+
diff --git a/package/usr/share/hedera-web/forms/admin/users/html.php b/package/usr/share/hedera-web/forms/admin/users/html.php deleted file mode 100755 index d452d801..00000000 --- a/package/usr/share/hedera-web/forms/admin/users/html.php +++ /dev/null @@ -1,42 +0,0 @@ -
-
-
-

-
- - - - - - - -
- - - - - -
-
- - - SELECT u.id, u.name, c.Cliente - FROM account.user u - INNER JOIN vn2008.Clientes c ON u.id = c.Id_Cliente - WHERE u.name LIKE CONCAT('%', #user, '%') - OR c.Cliente LIKE CONCAT('%', #user, '%') - OR u.id = #user - ORDER BY u.name LIMIT 200 - - - - - - - - - - -
-
-
diff --git a/package/usr/share/hedera-web/forms/admin/users/style.css b/package/usr/share/hedera-web/forms/admin/users/style.css index 4299bb8b..d4dd41d4 100755 --- a/package/usr/share/hedera-web/forms/admin/users/style.css +++ b/package/usr/share/hedera-web/forms/admin/users/style.css @@ -1,14 +1,14 @@ -#users +.users { padding: 1em; min-width: 35em; } -#users .box +.users .box { max-width: 50em; margin: 0 auto; } -#users tbody tr +.users tbody tr { height: 3.4em; } diff --git a/package/usr/share/hedera-web/forms/admin/users/ui.xml b/package/usr/share/hedera-web/forms/admin/users/ui.xml new file mode 100755 index 00000000..09a4443e --- /dev/null +++ b/package/usr/share/hedera-web/forms/admin/users/ui.xml @@ -0,0 +1,44 @@ + +
+
+
+

UserManagement

+
+ + + + + + + +
+ + + + + +
+
+ + + SELECT u.id, u.name, c.Cliente + FROM account.user u + INNER JOIN vn2008.Clientes c ON u.id = c.Id_Cliente + WHERE u.name LIKE CONCAT('%', #user, '%') + OR c.Cliente LIKE CONCAT('%', #user, '%') + OR u.id = #user + ORDER BY u.name LIMIT 200 + + + + + + + + + + +
+
+
+
diff --git a/package/usr/share/hedera-web/forms/admin/users/users.js b/package/usr/share/hedera-web/forms/admin/users/users.js index 328c103c..2f4e6ab0 100755 --- a/package/usr/share/hedera-web/forms/admin/users/users.js +++ b/package/usr/share/hedera-web/forms/admin/users/users.js @@ -5,8 +5,8 @@ Vn.Users = new Class ,activate: function () { - this.get ('change-user').on ('clicked', this.changeUserClicked.bind (this)); - this.get ('access-log').on ('clicked', this.accessLogClicked.bind (this)); + this.$('change-user').on ('clicked', this.changeUserClicked.bind (this)); + this.$('access-log').on ('clicked', this.accessLogClicked.bind (this)); } ,changeUserClicked: function (column, value) diff --git a/package/usr/share/hedera-web/forms/admin/visits/html.php b/package/usr/share/hedera-web/forms/admin/visits/html.php deleted file mode 100755 index 77617593..00000000 --- a/package/usr/share/hedera-web/forms/admin/visits/html.php +++ /dev/null @@ -1,145 +0,0 @@ -
-
-
-

-
- - - -
-
-
- - - - - - - - - - - -
- - - - - -
- - - - - -
-
- - - SELECT s.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 - 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 - JOIN account.user u ON e.user_id = u.id - JOIN vn2008.Clientes c ON e.user_id = c.Id_cliente - ORDER BY last_activity DESC - - - - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
-
- - - SELECT browser - ,MIN(CAST(version AS DECIMAL(4,1))) min_version - ,MAX(CAST(version AS DECIMAL(4,1))) max_version - ,MAX(e.date_time) last_visit - ,COUNT(DISTINCT c.id) visits - ,SUM(is_new) new_visits - FROM visit_user e - 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 - WHERE e.date_time BETWEEN TIMESTAMP(#from,'00:00:00') AND TIMESTAMP(#to,'23:59:59') - GROUP BY browser ORDER BY visits DESC - - - - - - - - - - - - -
-
-
-
diff --git a/package/usr/share/hedera-web/forms/admin/visits/style.css b/package/usr/share/hedera-web/forms/admin/visits/style.css index 79338e41..a93e51ba 100755 --- a/package/usr/share/hedera-web/forms/admin/visits/style.css +++ b/package/usr/share/hedera-web/forms/admin/visits/style.css @@ -1,9 +1,9 @@ -#visits +.visits { padding: 1em; min-width: 50em; } -#visits .box +.visits .box { max-width: 80em; margin: 0 auto; diff --git a/package/usr/share/hedera-web/forms/admin/visits/ui.xml b/package/usr/share/hedera-web/forms/admin/visits/ui.xml new file mode 100755 index 00000000..a4928a12 --- /dev/null +++ b/package/usr/share/hedera-web/forms/admin/visits/ui.xml @@ -0,0 +1,147 @@ + +
+
+
+

VisitsManagement

+
+ + + +
+
+
+ + + + + + + + + + + +
+ + + + + +
+ + + + + +
+
+ + + SELECT s.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 + 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 + JOIN account.user u ON e.user_id = u.id + JOIN vn2008.Clientes c ON e.user_id = c.Id_cliente + ORDER BY last_activity DESC + + + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+
+ + + SELECT browser + ,MIN(CAST(version AS DECIMAL(4,1))) min_version + ,MAX(CAST(version AS DECIMAL(4,1))) max_version + ,MAX(e.date_time) last_visit + ,COUNT(DISTINCT c.id) visits + ,SUM(is_new) new_visits + FROM visit_user e + 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 + WHERE e.date_time BETWEEN TIMESTAMP(#from,'00:00:00') AND TIMESTAMP(#to,'23:59:59') + GROUP BY browser ORDER BY visits DESC + + + + + + + + + + + + +
+
+
+
+
diff --git a/package/usr/share/hedera-web/forms/admin/visits/visits.js b/package/usr/share/hedera-web/forms/admin/visits/visits.js index 7a812494..9410dace 100755 --- a/package/usr/share/hedera-web/forms/admin/visits/visits.js +++ b/package/usr/share/hedera-web/forms/admin/visits/visits.js @@ -5,13 +5,11 @@ Vn.Visits = new Class ,activate: function () { - Vn.get ('refresh').addEventListener ('click', this.refreshClicked.bind (this)); - Vn.get ('sessions-button').addEventListener ('click', this.sessionsClicked.bind (this)); - Vn.get ('visits-button').addEventListener ('click', this.visitsClicked.bind (this)); - - this.get ('date-to').value = new Date (); - this.get ('num-sessions').func = this.sessionsFunc; - + this.$('refresh').addEventListener ('click', this.refreshClicked.bind (this)); + this.$('sessions-button').addEventListener ('click', this.sessionsClicked.bind (this)); + this.$('visits-button').addEventListener ('click', this.visitsClicked.bind (this)); + this.$('date-to').value = new Date (); + this.$('num-sessions').func = this.sessionsFunc; this.sessionsClicked (); } @@ -20,20 +18,20 @@ Vn.Visits = new Class if (this.currentStep) this.currentStep.style.display = 'none'; - this.currentStep = Vn.get (stepId); + this.currentStep = this.$(stepId); this.currentStep.style.display = 'inline'; } ,sessionsClicked: function () { this.showStep ('sessions-step'); - this.model = this.get ('sessions'); + this.model = this.$('sessions'); } ,visitsClicked: function () { this.showStep ('visits-step'); - this.model = this.get ('visits'); + this.model = this.$('visits'); } ,refreshClicked: function () diff --git a/package/usr/share/hedera-web/forms/agencies/packages/html.php b/package/usr/share/hedera-web/forms/agencies/packages/html.php deleted file mode 100755 index f28e8ec4..00000000 --- a/package/usr/share/hedera-web/forms/agencies/packages/html.php +++ /dev/null @@ -1,17 +0,0 @@ -
-
-
-

-
- - - CALL vn2008.agencia_volume () - - - - - - - -
-
diff --git a/package/usr/share/hedera-web/forms/agencies/packages/packages.js b/package/usr/share/hedera-web/forms/agencies/packages/packages.js index 76bba154..ad378525 100755 --- a/package/usr/share/hedera-web/forms/agencies/packages/packages.js +++ b/package/usr/share/hedera-web/forms/agencies/packages/packages.js @@ -5,7 +5,7 @@ Vn.Packages = new Class ,activate: function () { - this.get ('column-show').on ('clicked', this.onShowClick, this); + this.$('column-show').on ('clicked', this.onShowClick, this); } ,onShowClick: function (column, agencyId) diff --git a/package/usr/share/hedera-web/forms/agencies/packages/style.css b/package/usr/share/hedera-web/forms/agencies/packages/style.css index 4f209fea..7dd6f067 100755 --- a/package/usr/share/hedera-web/forms/agencies/packages/style.css +++ b/package/usr/share/hedera-web/forms/agencies/packages/style.css @@ -1,8 +1,8 @@ -#packages +.packages { padding: 1em; } -#packages .box +.packages .box { max-width: 50em; margin: 0 auto; diff --git a/package/usr/share/hedera-web/forms/agencies/packages/ui.xml b/package/usr/share/hedera-web/forms/agencies/packages/ui.xml new file mode 100755 index 00000000..edf98511 --- /dev/null +++ b/package/usr/share/hedera-web/forms/agencies/packages/ui.xml @@ -0,0 +1,19 @@ + +
+
+
+

ListByAgency

+
+ + + CALL vn2008.agencia_volume () + + + + + + + +
+
+
diff --git a/package/usr/share/hedera-web/forms/agencies/provinces/html.php b/package/usr/share/hedera-web/forms/agencies/provinces/html.php deleted file mode 100755 index bf8f5793..00000000 --- a/package/usr/share/hedera-web/forms/agencies/provinces/html.php +++ /dev/null @@ -1,25 +0,0 @@ -
- - - - - - -
-
-

-
- - - CALL vn2008.desglose_volume (#agency) - - - - - - - - - -
-
diff --git a/package/usr/share/hedera-web/forms/agencies/provinces/style.css b/package/usr/share/hedera-web/forms/agencies/provinces/style.css index 214fcc29..ef880af2 100755 --- a/package/usr/share/hedera-web/forms/agencies/provinces/style.css +++ b/package/usr/share/hedera-web/forms/agencies/provinces/style.css @@ -1,8 +1,8 @@ -#provinces +.provinces { padding: 1em; } -#provinces .box +.provinces .box { max-width: 50em; margin: 0 auto; diff --git a/package/usr/share/hedera-web/forms/agencies/provinces/ui.xml b/package/usr/share/hedera-web/forms/agencies/provinces/ui.xml new file mode 100755 index 00000000..42edc8b5 --- /dev/null +++ b/package/usr/share/hedera-web/forms/agencies/provinces/ui.xml @@ -0,0 +1,27 @@ + + + + + + + +
+
+
+

ByProvince

+
+ + + CALL vn2008.desglose_volume (#agency) + + + + + + + + + +
+
+
diff --git a/package/usr/share/hedera-web/forms/cms/about/style.css b/package/usr/share/hedera-web/forms/cms/about/style.css index f38fb3bb..3f4e5f7a 100755 --- a/package/usr/share/hedera-web/forms/cms/about/style.css +++ b/package/usr/share/hedera-web/forms/cms/about/style.css @@ -1,21 +1,21 @@ -#about +.about { padding: 1em; } -#about .box +.about .box { max-width: 50em; margin: 0 auto; } -#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; @@ -23,17 +23,17 @@ margin: 1em; color: #4A1; } -#about p +.about p { width: 90%; display: block; margin: 1em auto; } -#summary +.summary { padding-bottom: 1em; } -#summary p +.summary p { max-width: 30em; text-align: center; @@ -46,7 +46,7 @@ /* Images */ -#about img +.about img { max-width: 90%; text-align: center; @@ -54,18 +54,18 @@ display: block; margin: 0 auto; } -#about img[alt="producers"], -#about img[alt="4_control"], -#about img[alt="dealer"], -#about img[alt="goods_transport"] +.about img[alt="producers"], +.about img[alt="4_control"], +.about img[alt="dealer"], +.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; diff --git a/package/usr/share/hedera-web/forms/cms/about/html.php b/package/usr/share/hedera-web/forms/cms/about/ui.xml similarity index 60% rename from package/usr/share/hedera-web/forms/cms/about/html.php rename to package/usr/share/hedera-web/forms/cms/about/ui.xml index 1b52593f..77667e3f 100755 --- a/package/usr/share/hedera-web/forms/cms/about/html.php +++ b/package/usr/share/hedera-web/forms/cms/about/ui.xml @@ -1,95 +1,97 @@ -
+ +
-

+

QualityAndVariety

-

-

+

MaximumFreshness

+

SquareMeters

store -

-

+

AboutRealms

+

AboutLocation

trailer

dealer - + PurchaseThroughWeb

palletizing
-

+

WhatMakeUsDifferent

-

+

DesignVariety

differentiates_us -

-

+

AdaptToYourNeeds

+

TheBestQuality

-

+

AtYourService

-

+

BuyersAndTraders

commercial
-

+

Training

-

+

GoodTraining

training -

+

SpecialTrainingPrices

courses -

+

YoutubeChannel

youtube
-

+

HowWeWork

-

+

AalsmeerAuction

auction -

+

BeforeAuction

producers -

-

+

DirectlyFromProviders

+

GoodsDischarge

goods_transport

- + FirstQualityControl glass

goods_receive -

+

GoodsTravel

2_control -

+

GoodsReception

- + SecondQualityControl glass

-

+

CustomerOrders

web -

+

AfterOrder

4_control

- + ThirdQualityControl glass

-

+

BuyerControl

- + FourthQualityControl glass

-

+

EmbeddedSection

fit -

+

AfterEmbedAgency

agencies -

+

FreshnessGuaranteed

-
+

- + AboutSummary Verdnatura

+ diff --git a/package/usr/share/hedera-web/forms/cms/contact/contact.js b/package/usr/share/hedera-web/forms/cms/contact/contact.js index 0afb52ec..98fddfc9 100755 --- a/package/usr/share/hedera-web/forms/cms/contact/contact.js +++ b/package/usr/share/hedera-web/forms/cms/contact/contact.js @@ -6,7 +6,7 @@ Vn.Contact = new Class ,activate: function () { var self = this; - var form = Vn.get ('contact-form').onsubmit = function () + var form = this.$('contact-form').onsubmit = function () { self.onSubmit (); return false; }; this.refreshCaptcha (); @@ -15,12 +15,12 @@ Vn.Contact = new Class ,refreshCaptcha: function () { var url = 'forms/cms/contact/captcha.php'; - Vn.get ('captcha-img').src = url +'?'+ new Date ().getTime (); + this.$('captcha-img').src = url +'?'+ new Date ().getTime (); } ,onSubmit: function () { - var form = Vn.get ('contact-form'); + var form = this.$('contact-form'); var request = new Vn.FormRequest (); request.send (form, this.onResponse.bind (this)); @@ -28,7 +28,7 @@ Vn.Contact = new Class ,onResponse: function (response) { - var form = Vn.get ('contact-form'); + var form = this.$('contact-form'); if (response) { diff --git a/package/usr/share/hedera-web/forms/cms/contact/html.php b/package/usr/share/hedera-web/forms/cms/contact/html.php deleted file mode 100755 index dec38396..00000000 --- a/package/usr/share/hedera-web/forms/cms/contact/html.php +++ /dev/null @@ -1,52 +0,0 @@ -
-
-
-

-
-
-

- -

-

- -

-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -