From 1f03a4c9a84fd42371c8487aca121101cb3024e9 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Mon, 28 Sep 2015 13:37:31 +0200 Subject: [PATCH] Alpha 4 --- web/forms/cms/contact/style.css | 8 ++- web/forms/cms/contact/ui.xml | 4 +- web/forms/cms/home/ui.xml | 4 +- web/forms/ecomerce/catalog/style.css | 9 +++- web/forms/ecomerce/catalog/ui.xml | 8 +-- web/js/hedera/login.css | 5 +- web/js/htk/field/select.js | 46 +++++++++++++++-- web/js/htk/style.css | 74 ---------------------------- 8 files changed, 66 insertions(+), 92 deletions(-) diff --git a/web/forms/cms/contact/style.css b/web/forms/cms/contact/style.css index f954bd9a..fea49768 100755 --- a/web/forms/cms/contact/style.css +++ b/web/forms/cms/contact/style.css @@ -7,10 +7,10 @@ { max-width: 40em; } -.contact p +.contact .body { position: relative; - text-align: center; + text-align: left; max-width: 25em; margin: 1em auto; } @@ -36,6 +36,10 @@ margin-top: 1em; padding: 0.6em; } +.contact .mandatory-message +{ + font-size: .9em; +} /* Captcha */ diff --git a/web/forms/cms/contact/ui.xml b/web/forms/cms/contact/ui.xml index f14134ec..1f53409b 100755 --- a/web/forms/cms/contact/ui.xml +++ b/web/forms/cms/contact/ui.xml @@ -41,10 +41,10 @@ Captcha -

+

AllFieldsMandatory

- diff --git a/web/forms/cms/home/ui.xml b/web/forms/cms/home/ui.xml index 8f75c612..539e8e03 100755 --- a/web/forms/cms/home/ui.xml +++ b/web/forms/cms/home/ui.xml @@ -15,10 +15,10 @@

-

+

diff --git a/web/forms/ecomerce/catalog/style.css b/web/forms/ecomerce/catalog/style.css index 646f4747..2f109bf3 100755 --- a/web/forms/ecomerce/catalog/style.css +++ b/web/forms/ecomerce/catalog/style.css @@ -59,6 +59,11 @@ /* Right panel */ +option.placeholder +{ + color: #999; +} + .right-panel { position: absolute; @@ -77,11 +82,11 @@ .right-panel select, .right-panel button { - color: #333; margin: 1em auto; width: 12em; +/* color: #333; background-color: #EEE; - border: 0; + border: 0;*/ } button.basket diff --git a/web/forms/ecomerce/catalog/ui.xml b/web/forms/ecomerce/catalog/ui.xml index 01213c51..06b4d5b2 100755 --- a/web/forms/ecomerce/catalog/ui.xml +++ b/web/forms/ecomerce/catalog/ui.xml @@ -172,7 +172,7 @@
- - + + SELECT id, reino, color FROM vn2008.reinos WHERE display != FALSE ORDER BY reino - + CALL type_list (1) diff --git a/web/js/hedera/login.css b/web/js/hedera/login.css index 9b7c7da2..a0654d3b 100755 --- a/web/js/hedera/login.css +++ b/web/js/hedera/login.css @@ -108,11 +108,12 @@ .vn-login input[type=text], .vn-login input[type=password] { - margin: 0.5em 0; + margin: .5em 0; margin-bottom: 0.5em; - padding: 0.5em; + padding: 0 .5em; width: 100%; border: 1px solid #AAA; + height: 2.6em; } .vn-login td.entry { diff --git a/web/js/htk/field/select.js b/web/js/htk/field/select.js index 7d006899..5861cc87 100755 --- a/web/js/htk/field/select.js +++ b/web/js/htk/field/select.js @@ -66,6 +66,24 @@ Htk.Select = new Class { return this._ready; } + }, + /** + * Checks if the form data is ready. + **/ + placeholder: + { + type: String + ,set: function (x) + { + this._placeholder = x; + + if (this._placeholderNode) + Vn.Node.setText (this._placeholderNode, x); + } + ,get: function () + { + return this._placeholder; + } } } @@ -107,12 +125,30 @@ Htk.Select = new Class { var option = document.createElement ('option'); option.value = value; - option.appendChild (document.createTextNode (text)); + + if (text) + option.appendChild (document.createTextNode (text)); + this.node.appendChild (option); } + ,addPlaceholder: function (text) + { + var option = document.createElement ('option'); + option.disabled = true; + option.selected = true; + option.value = null; + + if (text) + option.appendChild (document.createTextNode (text)); + + this.node.appendChild (option); + this._placeholderNode = option; + } + ,onModelChange: function () { + var placeholder = ''; var model = this._model; this.signalEmit ('status-changed'); @@ -123,7 +159,7 @@ Htk.Select = new Class case Db.Model.Status.READY: { var data = model.data; - this.addOption (null, ''); + this.addPlaceholder (this._placeholder); for (var i = 0; i < data.length; i++) this.addOption (data[i][this.showColumnIndex], data[i][1]); @@ -132,10 +168,12 @@ Htk.Select = new Class break; } case Db.Model.Status.ERROR: - this.addOption (null, _('Error')); + placeholder = 'Error'; + break; case Db.Model.Status.LOADING: - this.addOption (null, _('Loading...')); + placeholder = 'Loading...'; default: + this.addPlaceholder (_(placeholder)); this.setRow (-1); } } diff --git a/web/js/htk/style.css b/web/js/htk/style.css index 979a8ac1..1d5ee087 100755 --- a/web/js/htk/style.css +++ b/web/js/htk/style.css @@ -436,77 +436,3 @@ opacity: .7; } -/* Loader */ -/* -.htk-loader -{ - margin: 0 auto; - width: 2em; - height: 2em; - text-indent: -9999em; - border-radius: 50%; - background: #FFF; - background: -moz-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%); - background: -webkit-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%); - background: -o-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%); - background: -ms-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%); - background: linear-gradient(to right, #ffffff 10%, rgba(255, 255, 255, 0) 42%); - position: relative; - -webkit-animation: load3 1.4s infinite linear; - animation: load3 1.4s infinite linear; - -webkit-transform: translateZ(0); - -ms-transform: translateZ(0); - transform: translateZ(0); -} -.htk-loader:before -{ - width: 50%; - height: 50%; - background: #FFF; - border-radius: 100% 0 0 0; - position: absolute; - top: 0; - left: 0; - content: ''; -} -.htk-loader:after -{ - background: #009688; - width: 75%; - height: 75%; - border-radius: 50%; - content: ''; - margin: auto; - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; -} -@-webkit-keyframes load3 -{ - 0% - { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% - { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -@keyframes load3 -{ - 0% - { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% - { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -*/