From b428a11ac0fccf900b4de0fb087f55e29def7c62 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 5 May 2022 15:54:32 +0200 Subject: [PATCH 01/47] =?UTF-8?q?#3971=20Modernizaci=C3=B3n=20de=20estilo,?= =?UTF-8?q?=20pre-alfa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- image/logo-margin.svg | 77 ++++++++++++++++++++++++++++++++++++++++++ image/social/mail.svg | 1 + image/social/phone.svg | 43 +++++++++++++++++++++++ 3 files changed, 121 insertions(+) create mode 100644 image/logo-margin.svg create mode 100644 image/social/mail.svg create mode 100644 image/social/phone.svg diff --git a/image/logo-margin.svg b/image/logo-margin.svg new file mode 100644 index 00000000..57e0a756 --- /dev/null +++ b/image/logo-margin.svg @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/image/social/mail.svg b/image/social/mail.svg new file mode 100644 index 00000000..d94d03c3 --- /dev/null +++ b/image/social/mail.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/image/social/phone.svg b/image/social/phone.svg new file mode 100644 index 00000000..34fb46ff --- /dev/null +++ b/image/social/phone.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From f3bdb5f3c51f99ed37247e1aaf0149f222555159 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 5 May 2022 15:54:53 +0200 Subject: [PATCH 02/47] #3971 pre-alfa --- forms/cms/home/style.css | 10 +- forms/ecomerce/catalog/catalog.js | 22 +-- forms/ecomerce/catalog/style.css | 12 +- forms/ecomerce/catalog/ui.xml | 3 +- forms/ecomerce/checkout/style.css | 5 - image/logo-dark.svg | 255 +++++++++++++++++------------- image/logo.svg | 170 ++++++++++---------- js/hedera/gui.css | 221 ++++++++++++-------------- js/hedera/gui.js | 2 - js/hedera/gui.xml | 32 ++-- js/hedera/locale/ca.yml | 6 +- js/hedera/locale/en.yml | 6 +- js/hedera/locale/es.yml | 6 +- js/hedera/locale/fr.yml | 4 +- js/hedera/locale/mn.yml | 6 +- js/hedera/locale/pt.yml | 6 +- js/hedera/login.css | 75 +++++---- js/hedera/login.js | 98 +++++------- js/hedera/login.xml | 60 ++++--- js/hedera/style.css | 9 +- js/htk/style.css | 9 +- 21 files changed, 485 insertions(+), 532 deletions(-) diff --git a/forms/cms/home/style.css b/forms/cms/home/style.css index 2294ceea..a9b73028 100644 --- a/forms/cms/home/style.css +++ b/forms/cms/home/style.css @@ -8,14 +8,14 @@ } .action-bar button.start-order { - background-color: #EF5350; - margin: .7em; - padding: .5em; - box-shadow: 0 0 0.4em rgba(1, 1, 1, 0.4); + margin: 1em; + padding: .5em 1em; + border: 1px solid white; } .action-bar button.start-order:hover { - background-color: #F44336; + background-color: white; + color: black; } /* New */ diff --git a/forms/ecomerce/catalog/catalog.js b/forms/ecomerce/catalog/catalog.js index 373983d1..7b1ed376 100644 --- a/forms/ecomerce/catalog/catalog.js +++ b/forms/ecomerce/catalog/catalog.js @@ -118,8 +118,7 @@ Hedera.Catalog = new Class({ this.$('filters').style.display = 'none'; this.$('realm-msg').style.display = 'block'; } - - this.refreshTitleColor(); + this.refreshFilter(newValue, undefined); } @@ -143,25 +142,6 @@ Hedera.Catalog = new Class({ batch.changed(); } - ,refreshTitleColor: function() { - var realms = this.$('realms-model'); - - if (!realms.ready) - return; - - var color = null; - var realm = this.$('realm').value; - - if (realm) { - var row = realms.search('id', realm); - - if (row != -1) - color = '#'+ realms.get(row, 'color'); - } - - this.gui.$('top-bar').style.backgroundColor = color; - } - ,refreshTitle: function() { var types = this.$('types-model'); diff --git a/forms/ecomerce/catalog/style.css b/forms/ecomerce/catalog/style.css index 7d8a8b6d..848b833f 100644 --- a/forms/ecomerce/catalog/style.css +++ b/forms/ecomerce/catalog/style.css @@ -16,20 +16,21 @@ .right-panel { position: fixed; - top: 3.9em; + top: 4.4em; bottom: 0; right: 0; width: 17em; - background-color: white; - box-shadow: 0 0 .2em rgba(1, 1, 1, .2); overflow: auto; + background-color: #fafafa; } .right-panel .basket-info { - background-color: #00ACC1; + background-color: #8cc63f; color: white; - box-shadow: 0 .1em .1em rgba(1, 1, 1, .3); padding: 1.2em 2em; + border-radius: .5em; + margin: 1em; + text-align: center; } .right-panel .basket-info > button { @@ -43,7 +44,6 @@ margin: 0; padding: .4em 0; font-size: 1.1em; - text-align: left; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; diff --git a/forms/ecomerce/catalog/ui.xml b/forms/ecomerce/catalog/ui.xml index f6780139..53b51723 100644 --- a/forms/ecomerce/catalog/ui.xml +++ b/forms/ecomerce/catalog/ui.xml @@ -189,8 +189,7 @@ class="realms-box"> + property="model"> SELECT c.id, l.name, c.color, c.code FROM vn.itemCategory c JOIN vn.itemCategoryL10n l ON l.id = c.id diff --git a/forms/ecomerce/checkout/style.css b/forms/ecomerce/checkout/style.css index d1dc875f..9fd2a7fe 100644 --- a/forms/ecomerce/checkout/style.css +++ b/forms/ecomerce/checkout/style.css @@ -65,11 +65,6 @@ .radio > div { padding: 0.5em; - border-top: 1px solid #AAA; -} -.radio > div:first-child -{ - border-top: none; } .thin-calendar { diff --git a/image/logo-dark.svg b/image/logo-dark.svg index 6cf594a7..4d53b7b3 100644 --- a/image/logo-dark.svg +++ b/image/logo-dark.svg @@ -1,6 +1,4 @@ - - image/svg+xml \ No newline at end of file + inkscape:version="1.0.2 (e86c870879, 2021-01-15)" + sodipodi:docname="logo-dark.svg">image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/image/logo.svg b/image/logo.svg index bba010e3..23b6df49 100644 --- a/image/logo.svg +++ b/image/logo.svg @@ -1,6 +1,4 @@ - - image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + inkscape:current-layer="svg2" + inkscape:document-rotation="0" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - + fill="#ffffff" + d="m 32.673,16.742 8.351,-0.021 c 0.375,-1.436 0.308,-2.558 -0.201,-3.365 -0.509,-0.807 -1.402,-1.211 -2.68,-1.211 -1.209,0 -2.285,0.397 -3.229,1.19 -0.944,0.793 -1.69,1.93 -2.241,3.407 z m 6.144,6.536 h 7.043 c -1.347,2.456 -3.172,4.356 -5.477,5.7 -2.305,1.345 -4.885,2.017 -7.74,2.017 -3.473,0 -5.923,-1.054 -7.351,-3.161 -1.427,-2.107 -1.632,-4.98 -0.613,-8.618 1.038,-3.707 2.875,-6.641 5.512,-8.803 2.637,-2.163 5.678,-3.244 9.123,-3.244 3.555,0 6.04,1.099 7.456,3.298 1.417,2.198 1.582,5.234 0.498,9.109 l -0.239,0.814 -0.167,0.484 H 31.721 c -0.441,1.575 -0.438,2.777 0.01,3.606 0.448,0.829 1.332,1.244 2.65,1.244 0.975,0 1.836,-0.206 2.583,-0.617 0.747,-0.411 1.366,-1.021 1.853,-1.829 z" + id="path47" /> - - - - + - - - - \ No newline at end of file + style="fill:#97d700;fill-opacity:1" /> + diff --git a/js/hedera/gui.css b/js/hedera/gui.css index e747901e..791f5e2e 100644 --- a/js/hedera/gui.css +++ b/js/hedera/gui.css @@ -1,39 +1,34 @@ -.vn-gui -{ +.vn-gui { height: inherit; } /* Font */ -.vn-gui .user-info, +.vn-gui .user-name, .vn-gui .menu-title, -.vn-gui .main-menu -{ +.vn-gui .main-menu { font-size: 1.1em; } /* Navigation bar */ -.vn-gui .navbar -{ +.vn-gui .navbar { position: fixed; - background-color: #009688; - left: 15em; + background-color: #1A1A1A; + left: 250px; top: 0; right: 0; z-index: 1; overflow: hidden; - box-shadow: 0 0 .2em rgba(1, 1, 1, .3); - height: 3.9em; + height: 64px; color: white; transition-property: left, background-color, transform; transition-duration: 200ms; transition-timing-function: ease-in-out; } -.vn-gui .menu-button -{ +.vn-gui .menu-button { position: absolute; left: 0; display: none; @@ -43,71 +38,61 @@ margin: 0; height: 100%; } -.vn-gui .menu-button:hover -{ +.vn-gui .menu-button:hover { background-color: rgba(0, 0, 0, .2); } -.vn-gui .menu-button img -{ +.vn-gui .menu-button img { vertical-align: middle; height: 1.8em; } -.vn-gui .title -{ +.vn-gui .title { float: left; } -.vn-gui .title h1 -{ +.vn-gui .title h1 { font-weight: normal; font-size: 1.4em; padding: .8em .6em; padding-right: .3em; margin: 0; } -.vn-gui .navbar > .htk-spinner -{ +.vn-gui .navbar > .htk-spinner { float: left; margin: 1.05em .8em; } /* Action bar */ -.vn-gui .action-bar -{ +.vn-gui .action-bar { float: right; padding: 0; margin: 0; height: 100%; } -.vn-gui .action-bar > div -{ +.vn-gui .action-bar > div { padding: 0; margin: 0; height: 100%; } -.vn-gui .action-bar > div > * -{ +.vn-gui .action-bar > div > * { float: right; } -.vn-gui .action-bar button -{ +.vn-gui .action-bar button { margin: 0; padding: 1.25em .5em; + border-radius: 2em; + font-weight: bold; } -.vn-gui .action-bar button:hover -{ +.vn-gui .action-bar button:hover { background-color: rgba(1, 1, 1, .2); } -.vn-gui .action-bar button > img -{ +.vn-gui .action-bar button > img { vertical-align: middle; height: 1.4em; } /* Background */ -.vn-gui > .background -{ +.vn-gui > .background { z-index: 10; position: fixed; top: 0; @@ -118,8 +103,7 @@ background-color: rgba(1, 1, 1, .7); opacity: 0; } -.vn-gui > .background.show -{ +.vn-gui > .background.show { visibility: visible; transition: opacity 200ms ease-out; opacity: 1; @@ -127,8 +111,7 @@ /* Left panel */ -.vn-gui .left-panel -{ +.vn-gui .left-panel { z-index: 20; position: fixed; left: 0; @@ -136,11 +119,9 @@ top: 0; background-color: white; z-index: 20; - box-shadow: 0 .2em .2em rgba(1, 1, 1, .4); - width: 15em; + width: 250px; } -.vn-gui .menu-overflow -{ +.vn-gui .menu-overflow { position: absolute; top: 0; left: 0; @@ -148,53 +129,71 @@ bottom: 4em; overflow: auto; } -.vn-gui .menu-header -{ - background-color: #333; +.vn-gui .menu-header { + background-color: #1A1A1A; color: white; - padding: 1em; + height: 64px; + display: flex; } -.vn-gui .logo -{ +.vn-gui .logo { display: block; - width: 12em; - margin-bottom: .8em; + width: 160px; + margin-left: 37px; } -.vn-gui .user-info -{ - width: 100%; +.vn-gui .user-info { overflow: hidden; + padding: 20px 37px; + font-weight: bold; } -.vn-gui .user-info > p -{ +.vn-gui .user-info > img { + margin-right: 10px; + height: 20px; + vertical-align: middle; +} +.vn-gui .user-info > p { margin: 0; margin-top: .2em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } -.vn-gui button.logout -{ +.vn-gui .logout { + display: block; + width: 100%; + margin: 0; + text-align: left; + padding: 14px 37px; +} +.vn-gui .supplant { + display: none; + padding: 8px; + margin: 0; + margin-top: .2em; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.vn-gui .supplant > p { + margin: 0; + margin-top: .2em; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.vn-gui .supplant-logout { float: right; margin: 0; padding: .2em; display: block; } -.vn-gui button.logout > img -{ +.vn-gui .supplant-logout > img { height: 1.2em; display: block; } -.vn-gui .supplant -{ - margin-top: .2em; - display: none; -} /* Test link */ -.vn-gui .test-link -{ +.vn-gui .test-link { display: none; margin: .5em; background-color: #3f51b5; @@ -204,12 +203,10 @@ border-radius: .1em; text-align: center; } -.vn-gui .test-link:hover -{ +.vn-gui .test-link:hover { background-color: #4f61c5; } -.vn-gui .dev-info -{ +.vn-gui .dev-info { display: none; padding: .3em .5em; color: white; @@ -218,49 +215,41 @@ margin: .5em; border-radius: .1em; } -.vn-gui .dev-info > p -{ +.vn-gui .dev-info > p { margin: .2em 0; } -.vn-gui .dev-info > .mode -{ +.vn-gui .dev-info > .mode { color: #BBF; } /* Menu */ .vn-gui .main-menu, -.vn-gui ul.submenu -{ +.vn-gui ul.submenu { list-style-type: none; padding: 0; margin: 0; } -.vn-gui .main-menu > li -{ +.vn-gui .main-menu > li { display: block; padding: 0; margin: 0; width: 100%; } -.vn-gui .main-menu a -{ +.vn-gui .main-menu a { width: 70%; padding: 0 15%; display: block; line-height: 2.8em; } .vn-gui .main-menu a:hover, -.vn-gui .main-menu a.selected -{ +.vn-gui .main-menu a.selected { background-color: rgba(1, 1, 1, .1); } -.vn-gui ul.submenu -{ +.vn-gui ul.submenu { display: none; } -.vn-gui ul.submenu.popup -{ +.vn-gui ul.submenu.popup { display: inline; position: fixed; border: none; @@ -274,20 +263,18 @@ /* Social */ -.vn-gui .social -{ +.vn-gui .menu-footer { position: absolute; bottom: 0; right: 0; - padding: .8em; + left: 0; } /* Body */ -.vn-gui > .body -{ - margin-left: 15em; - padding-top: 3.9em; +.vn-gui > .body { + margin-left: 250px; + padding-top: 4.4em; height: inherit; box-sizing: border-box; height: inherit; @@ -295,8 +282,7 @@ transition-property: margin-left, margin-right; transition-duration: 200ms; } -.vn-gui .form-holder -{ +.vn-gui .form-holder { position: relative; height: inherit; @@ -308,8 +294,7 @@ transition-duration: 200ms; transition-timing-function: ease-out; } -.vn-gui .form-holder.show -{ +.vn-gui .form-holder.show { opacity: 1; transform: translateZ(0) translateX(0em); -webkit-transform: translateZ(0) translateX(0em); @@ -317,46 +302,37 @@ /* Mobile */ -@media (max-width: 960px) -{ +@media (max-width: 960px) { .vn-gui .action-bar span.label, - .vn-gui .htk-button > span - { + .vn-gui .htk-button > span { display: none; } - .vn-gui > .navbar - { + .vn-gui > .navbar { padding-left: 2.8em; left: 0; } - .vn-gui > .body - { + .vn-gui > .body { margin-left: 0; } - .vn-gui .menu-button - { + .vn-gui .menu-button { display: block; } - .vn-gui .left-panel - { + .vn-gui .left-panel { top: 0; - left: -15em; + left: -250px; box-shadow: 0 0 .2em rgba(1, 1, 1, .3); transition: transform 200ms ease-out; -webkit-transition: transform 200ms ease-out; } - .vn-gui .left-panel.show - { - transform: translateZ(0) translateX(15em); - -webkit-transform: translateZ(0) translateX(15em); + .vn-gui .left-panel.show { + transform: translateZ(0) translateX(250px); + -webkit-transform: translateZ(0) translateX(250px); } - .vn-gui .form-holder - { + .vn-gui .form-holder { left: 0; } - .vn-gui ul.submenu - { + .vn-gui ul.submenu { display: block; background-color: #888; color: white; @@ -367,8 +343,7 @@ transition: max-height 300ms ease-out; webkit-transition: max-height 300ms ease-out; } - .vn-gui .main-menu li:hover > ul.submenu - { + .vn-gui .main-menu li:hover > ul.submenu { max-height: 20em; } } diff --git a/js/hedera/gui.js b/js/hedera/gui.js index 04177602..9f790281 100644 --- a/js/hedera/gui.js +++ b/js/hedera/gui.js @@ -46,8 +46,6 @@ module.exports = new Class({ this.parent(props); - this.$('social-bar').conn = this._conn; - var sql = 'SELECT nickname FROM account.myUser;' +'SELECT defaultForm FROM config;' +'SELECT url FROM imageConfig;' diff --git a/js/hedera/gui.xml b/js/hedera/gui.xml index 261c6b64..ec5c53fc 100644 --- a/js/hedera/gui.xml +++ b/js/hedera/gui.xml @@ -12,28 +12,28 @@ + -
diff --git a/js/hedera/locale/ca.yml b/js/hedera/locale/ca.yml index e26b24f7..e398549a 100644 --- a/js/hedera/locale/ca.yml +++ b/js/hedera/locale/ca.yml @@ -1,10 +1,10 @@ User: Usuari Password: Contrasenya Beta: Beta -Do not sign out: No tancar sessió +Remind me: No tancar sessió Log in as guest: Accedir com a convidat -Enter: Entrar -Login mail: clientes@verdnatura.es +Login: Iniciar sesió +Login mail: info@verdnatura.es Login phone: +34 607 562 391 Password forgotten? Push here: ¿Has oblidat la teva contrasenya? Yet you are not a customer?: Encara no ets client? diff --git a/js/hedera/locale/en.yml b/js/hedera/locale/en.yml index ff22a8f9..eabb42ae 100644 --- a/js/hedera/locale/en.yml +++ b/js/hedera/locale/en.yml @@ -1,10 +1,10 @@ User: User Password: Password Beta: Beta -Do not sign out: Do not sign out +Remind me: Remind me Log in as guest: Log in as guest -Enter: Enter -Login mail: clientes@verdnatura.es +Login: Login +Login mail: info@verdnatura.es Login phone: +34 607 562 391 Password forgotten? Push here: Password forgotten? Push here Yet you are not a customer?: Yet you are not a customer? diff --git a/js/hedera/locale/es.yml b/js/hedera/locale/es.yml index 1c994999..619b47da 100644 --- a/js/hedera/locale/es.yml +++ b/js/hedera/locale/es.yml @@ -1,10 +1,10 @@ User: Usuario Password: Contraseña Beta: Beta -Do not sign out: No cerrar sesión +Remind me: Recuérdame Log in as guest: Entrar como invitado -Enter: Entrar -Login mail: clientes@verdnatura.es +Login: Iniciar sesión +Login mail: info@verdnatura.es Login phone: +34 963 242 100 Password forgotten? Push here: ¿Has olvidado tu contraseña? Yet you are not a customer?: ¿Todavía no eres cliente? diff --git a/js/hedera/locale/fr.yml b/js/hedera/locale/fr.yml index 45d4fa56..cc5b9599 100644 --- a/js/hedera/locale/fr.yml +++ b/js/hedera/locale/fr.yml @@ -1,9 +1,9 @@ User: Utilisateur Password: Mot de passe Beta: Beta -Do not sign out: Garder ma session active +Remind me: Garder ma session active Log in as guest: Entrez en tant qu'invité -Enter: Entrer +Login: Entrer Login mail: ruben@verdnatura.es Login phone: +33 781 533 900 Password forgotten? Push here: as tu oublié ton mot de passe? diff --git a/js/hedera/locale/mn.yml b/js/hedera/locale/mn.yml index 06ee6aac..6ed3bd69 100644 --- a/js/hedera/locale/mn.yml +++ b/js/hedera/locale/mn.yml @@ -1,10 +1,10 @@ User: Хэрэглэгчийн Password: нууц үг Beta: Бета -Do not sign out: Гаргаж гарын үсэг зураагүй байна +Remind me: Гаргаж гарын үсэг зураагүй байна Log in as guest: Зочин байдлаар оруулна уу -Enter: энд бичнэ үү -Login mail: clientes@verdnatura.es +Login: энд бичнэ үү +Login mail: info@verdnatura.es Login phone: +34 607 562 391 Password forgotten? Push here: Нууц үг мартсан? энд түлхэх Yet you are not a customer?: Гэсэн хэдий ч та хэрэглэгчийн биш гэж үү? diff --git a/js/hedera/locale/pt.yml b/js/hedera/locale/pt.yml index 326d88be..d8f23e9a 100644 --- a/js/hedera/locale/pt.yml +++ b/js/hedera/locale/pt.yml @@ -1,10 +1,10 @@ User: Usuario Password: Palavra-Passe Beta: Beta -Do not sign out: Não finalizar Sessão +Remind me: Não finalizar Sessão Log in as guest: Entrar como convidado -Enter: Entrar -Login mail: clientes@verdnatura.es +Login: Entrar +Login mail: info@verdnatura.es Login phone: +34 963 242 100 Password forgotten? Push here: Não lembro minha palavra-passe Yet you are not a customer?: Ainda não és cliente? diff --git a/js/hedera/login.css b/js/hedera/login.css index 940435b9..02dc3763 100644 --- a/js/hedera/login.css +++ b/js/hedera/login.css @@ -5,25 +5,7 @@ font-size: 1.1em; font-weight: normal; height: inherit; -} - -/* Navigation bar */ - -.vn-login .navbar -{ - z-index: 10; - position: fixed; - background-color: #333; - width: 100%; - height: 3.5em; - top: 0; - color: white; - -} -.vn-login .navbar div -{ - margin-top: 1em; - text-align: center; + background-color: white; } /* Body */ @@ -39,7 +21,6 @@ max-width: 40em; height: inherit; background-color: white; - box-shadow: 0 0 .3em 0 rgba(1, 1, 1, 0.4); min-height: } @@ -49,14 +30,14 @@ { position: relative; height: inherit; - max-width: 15em; + max-width: 18em; margin: 0 auto; } .vn-login form { position: absolute; top: 50%; - margin-top: -20em; + margin-top: -380px; width: 100%; padding: 2em 0; } @@ -73,13 +54,12 @@ .vn-login .header { - margin-bottom: 2em; + margin-bottom: 80px; } .vn-login .header img { display: block; width: 100%; -/* box-shadow: 0 0 .3em 0 rgba(1, 1, 1, 0.4);*/ } .vn-login .version-code { @@ -107,6 +87,12 @@ display: block; font-size: inherit; } +.vn-login .remind-block { + margin: 20px 0; +} +.vn-login .remind-forgot { + margin: 40px 0; +} .vn-login input { margin: 0.3em; @@ -115,10 +101,9 @@ .vn-login input[type=password] { margin: 0; - margin-top: .5em; padding: 0 .5em; width: 100%; - border: 1px solid #AAA; + border-bottom: 1px solid #AAA; height: 2.6em; } .vn-login input[type=text], @@ -130,7 +115,6 @@ .vn-login .button { border-radius: .1em; - box-shadow: 0 .1em .1em rgba(1, 1, 1, 0.4); } .vn-login input[type=checkbox] { @@ -147,12 +131,13 @@ .vn-login .button { margin: 0 auto; - background-color: #9CBC28; - border: 1px solid #8A1; - height: 2.4em; + background-color: #0d1115; + border-radius: 25px; + height: 50px; width: 100%; - color: #240; - text-transform: uppercase; + color: white; + transition: transform 200ms ease-out; + transition-property: background-color; } .vn-login input[type=submit]:hover, .vn-login input[type=button]:hover, @@ -160,7 +145,20 @@ .vn-login button:hover, .vn-login .button:hover { - background-color: #8A1; + background-color: #7d8185; +} +.vn-login .button.guest +{ + margin-top: 15px; + border: 1px solid #0d1115; + background-color: white; + color: #0d1115; +} +.vn-login .button.guest:hover +{ + border-color: #7d8185; + background-color: #7d8185; + color: white; } hr { @@ -191,11 +189,18 @@ hr .vn-login .footer { - margin-top: 2em; + margin-top: 80px; + font-size: 14px; + text-align: center; } .vn-login .contact { - text-align: center; + margin-top: 15px; + color: grey; +} +.vn-login .footer a +{ + font-weight: bold; } @media (max-height: 50em) diff --git a/js/hedera/login.js b/js/hedera/login.js index 3bfc4368..e3da0621 100644 --- a/js/hedera/login.js +++ b/js/hedera/login.js @@ -1,6 +1,6 @@ -var Css = require ('./login.css'); -var Tpl = require ('./login.xml'); +var Css = require('./login.css'); +var Tpl = require('./login.xml'); module.exports = new Class ({ @@ -10,120 +10,104 @@ module.exports = new Class conn: { type: Db.Connection - ,set: function (x) - { - this.link ({_conn: x}, {'loading-changed': this._onConnLoadChange}); + ,set: function(x) { + this.link({_conn: x}, {'loading-changed': this._onConnLoadChange}); } - ,get: function () - { + ,get: function() { return this._conn; } } } - ,initialize: function (props) - { - this.parent (props); - this.builderInitString (Tpl); + ,initialize: function(props) { + this.parent(props); + this.builderInitString(Tpl); - this.$('social-bar').conn = this._conn; + //this.$('social-bar').conn = this._conn; var self = this; - this.$('form').onsubmit = function () - { - self._onSubmit (); + this.$('form').onsubmit = function() { + self._onSubmit(); return false; }; } - ,_onConnLoadChange: function (conn, isLoading) - { + ,_onConnLoadChange: function(conn, isLoading) { if (isLoading) - this.$('spinner').start (); + this.$('spinner').start(); else - this.$('spinner').stop (); + this.$('spinner').stop(); } - ,show: function () - { - document.body.appendChild (this.node); + ,show: function() { + document.body.appendChild(this.node); - var lastUser = localStorage.getItem ('hederaLastUser'); + var lastUser = localStorage.getItem('hederaLastUser'); if (lastUser) this.$('user').value = lastUser; - this._focusUserInput (); + this._focusUserInput(); } - ,_onSubmit: function () - { - this._conn.open ( + ,_onSubmit: function() { + this._conn.open( this.$('user').value, this.$('pass').value, this.$('remember').checked, - this._onConnOpen.bind (this) + this._onConnOpen.bind(this) ); - this._disableUi (true); + this._disableUi(true); } - ,_onConnOpen: function (conn, success, error) - { + ,_onConnOpen: function(conn, success, error) { this.$('pass').value = ''; - this._disableUi (false); + this._disableUi(false); - if (success) - { + if (success) { var user = this.$('user').value; if (user) - localStorage.setItem ('hederaLastUser', user); + localStorage.setItem('hederaLastUser', user); - this.signalEmit ('login'); - } - else - { - this._focusUserInput (); + this.signalEmit('login'); + } else { + this._focusUserInput(); throw error; } } - ,hide: function () - { - Vn.Node.remove (this.node); + ,hide: function() { + Vn.Node.remove(this.node); } - ,_focusUserInput: function () - { + ,_focusUserInput: function() { var userEntry = this.$('user'); - userEntry.focus (); - userEntry.select (); + userEntry.focus(); + userEntry.select(); } - ,_disableUi: function (disabled) - { + ,_disableUi: function(disabled) { this.$('user').disabled = disabled; this.$('pass').disabled = disabled; this.$('submit').disabled = disabled; } - ,onPasswordLost: function () - { + ,onPasswordLost: function() { var user = this.$('user').value; if (!user) - Htk.Toast.showError (_('Please write your user name')); + Htk.Toast.showError(_('Please write your user name')); else - this._conn.send ('core/recover-password', {recoverUser: user}, - this._onPasswordRecovered.bind (this)); + this._conn.send('core/recover-password', {recoverUser: user}, + this._onPasswordRecovered.bind(this)); } - ,_onPasswordRecovered: function (json, error) - { + ,_onPasswordRecovered: function(json, error) { if (error) throw error; - Htk.Toast.showMessage (_('A mail has been sent wich you can recover your password')); + Htk.Toast.showMessage(_('A mail has been sent wich you can recover your password')); } }); diff --git a/js/hedera/login.xml b/js/hedera/login.xml index edfc286a..291b60d3 100644 --- a/js/hedera/login.xml +++ b/js/hedera/login.xml @@ -1,18 +1,11 @@