This commit is contained in:
Juan Ferrer Toribio 2015-09-28 11:46:24 +02:00
parent f3cc7db96d
commit 8aa306d2ee
16 changed files with 265 additions and 139 deletions

View File

@ -17,15 +17,4 @@ div.form-group
{
padding: 0.4em;
}
.address label
{
display: block;
margin-bottom: 0.5em;
}
.address input,
.address select
{
margin: 0;
width: 100%;
}

View File

@ -17,17 +17,6 @@
{
padding: 0.4em;
}
.conf .form-group label
{
display: block;
margin-bottom: 0.5em;
}
.conf .form-group input[type=text],
.conf .form-group input[type=password]
{
margin: 0;
width: 100%;
}
.conf .form-group input[type=password]
{
margin-bottom: 0.5em;

View File

@ -9,7 +9,7 @@ Vn.Photos = new Class
this.$('photo-size').value = 10 /* MB */ * 1048576;
this.$('photo-id').focus ();
this.$('html-form').action =
'//'+ Vn.Config['image_host'] +'/hedera-web/rest.php?action=image';
'//'+ Vn.Config['image_host'] +'/rest.php?action=image';
}
,onFormSubmit: function ()

View File

@ -12,21 +12,6 @@
margin: 0 auto;
max-width: 25em;
}
div.form-group
{
padding: 0.4em;
}
.photos form label
{
display: block;
margin-bottom: 0.5em;
}
.photos input,
.photos select
{
margin: 0;
width: 100%;
}
.photos iframe
{
display: none;

View File

@ -25,21 +25,6 @@
display: block;
margin-top: 2em;
}
div.form-group
{
padding: 0.4em;
}
.contact form label
{
display: block;
margin-bottom: 0.5em;
}
.contact input,
.contact textarea
{
margin: 0;
width: 100%;
}
.contact textarea
{
height: 5em;

View File

@ -38,8 +38,8 @@
</div>
<div class="form-group captcha">
<label><t>Anti-Spam</t></label>
<img alt="Captcha" id="captcha-img"/>
<input type="text" name="captcha"/>
<img alt="Captcha" id="captcha-img"/>
</div>
<p>
<t>AllFieldsMandatory</t>

View File

@ -1,4 +1,7 @@
Vn.resource ('forms/ecomerce/catalog/filter-button.xml');
Vn.define (function () {
Vn.Catalog = new Class
({
Extends: Vn.Module
@ -343,7 +346,83 @@ Vn.Catalog = new Class
}
});
Htk.ColumnCheck = new Class
Vn.FilterButton = new Class
({
Extends: Htk.Widget
,Tag: 'vn-filter-button'
,Child: 'model'
,Properties:
{
model:
{
type: Db.Model
,set: function (x)
{
this._grid.model = x;
this._model = x;
}
,get: function ()
{
return this._model;
}
},
text:
{
type: String
,set: function (x)
{
Vn.Node.setText (this._button, x);;
this._text = x;
}
,get: function ()
{
return this._text;
}
},
column:
{
type: String
,set: function (x)
{
this._col.column = x;
}
,get: function ()
{
return this._col.column;
}
},
}
,initialize: function (props)
{
this.parent (props);
this.builderInit ('forms/ecomerce/catalog/filter-button.xml');
this._button = this.createElement ('button');
this._button.className = 'vn-filter-button thin';
this._button.addEventListener ('click', this._onButtonClick.bind (this));
this._grid = new Htk.Grid ();
this._grid.showHeader = false;
this._col = new Htk.ColumnText ();
this._grid.appendColumn (this._col);
}
,_onButtonClick: function ()
{
if (!this._model)
return;
this._model.refresh ();
var popup = new Htk.Popup ();
popup.setChild (this._grid);
popup.show (this._button);
}
});
Vn.ColumnItem = new Class
({
Extends: Htk.Column
,Tag: 'vn-column-item'
@ -370,3 +449,4 @@ Htk.ColumnCheck = new Class
}
});
});

View File

@ -0,0 +1,11 @@
<vn>
<button
id="button"
class="vn-filter-button thin"
on-click="_onButtonClick"/>
<htk-repeater id="popup" form-id="form">
<div>
<htk-text form="form" id="cell"/>
</div>
</htk-repeater>
</vn>

View File

@ -57,7 +57,7 @@
vertical-align: middle;
}
/* Menu */
/* Right panel */
.right-panel
{
@ -66,10 +66,24 @@
top: 3.9em;
bottom: 0;
right: 0;
width: 17em;
width: 15em;
background-color: white;
box-shadow: 0 0.2em 0.2em #AAA;
text-align: center;
padding: 1em;
overflow: auto;
}
.right-panel select,
.right-panel button
{
color: #333;
margin: 1em auto;
width: 12em;
background-color: #EEE;
border: 0;
}
button.basket
{
width: 100%;
@ -241,6 +255,7 @@ td.third-category
max-height: 9em;
display: block;
margin: 0 auto;
border-radius: .3em;
}
.item-box > p
{

View File

@ -161,7 +161,74 @@
</div>
</template>
</htk-repeater>
<div id="realm-popup">
<htk-grid show-header="false">
<db-model property="model" id="filter-model">
SELECT id, reino, color FROM vn2008.reinos
WHERE display != FALSE ORDER BY reino
</db-model>
<htk-column-text column="reino"/>
</htk-grid>
</div>
<div id="right-panel" class="right-panel" on-click="onRightPanelClick">
<select>
<option value="">
<t>Order by</t>
</option>
<option value="Article">
<t>Item</t>
</option>
<option value="price">
<t>Price</t>
</option>
<option value="available">
<t>Available</t>
</option>
<option value="Color">
<t>Color</t>
</option>
<option value="producer">
<t>Producer</t>
</option>
<option value="Medida">
<t>Size</t>
</option>
<option value="Categoria">
<t>Category</t>
</option>
<option value="Abreviatura">
<t>Origin</t>
</option>
</select>
<vn-filter-button text="_Realm" column="reino">
<db-model>
SELECT id, reino, color FROM vn2008.reinos
WHERE display != FALSE ORDER BY reino
</db-model>
</vn-filter-button>
<vn-filter-button text="_Subtype" column="Tipo">
<db-model>
CALL type_list (1)
</db-model>
</vn-filter-button>
<vn-filter-button text="_Color" column="Color">
<db-model>
SELECT Id_Color, Color
FROM vn2008.Colores ORDER BY Color
</db-model>
</vn-filter-button>
<vn-filter-button text="_Origin" column="Origen">
<db-model>
SELECT id, Abreviatura, Origen
FROM vn2008.Origen ORDER BY Origen
</db-model>
</vn-filter-button>
<vn-filter-button text="_Category" column="category">
<db-model>
SELECT 'A1' category UNION SELECT 'A2' UNION SELECT 'B1'
</db-model>
</vn-filter-button>
<div style="display: none">
<htk-repeater
model="realms-model"
form-id="realm-form"
@ -196,6 +263,7 @@
</template>
</htk-repeater>
</div>
</div>
<div id="lots-popup" class="lots-popup">
<htk-grid class="lots-grid" model="item-lots" show-header="false">
<htk-column-spin title="_Price" column="price" unit="€" digits="2"/>

View File

@ -15,22 +15,6 @@
{
padding: 2em;
}
.new div.form-group
{
padding: 0.4em;
}
.new div.form-group label
{
display: block;
margin-bottom: 0.5em;
}
.new div.form-group input,
.new div.form-group textarea,
.new div.form-group select
{
margin: 0;
width: 100%;
}
.new textarea
{
min-height: 20em;

View File

@ -18,6 +18,11 @@
<h1><t>AddEditNew</t></h1>
</div>
<div id="actions">
<htk-button
image="image/dark/close.svg"
tip="_Return"
on-click="onReturnClick"
showText="true"/>
<htk-button
image="image/dark/ok.svg"
tip="_Accept"

View File

@ -18,13 +18,16 @@
body
{
color: #333;
margin: 0;
}
body,
label,
button,
input,
textarea
textarea,
select,
option
{
font-size: 1em;
font-family: 'Open Sans', 'Verdana', 'Sans';
@ -90,42 +93,29 @@ input[type=number],
textarea,
select
{
border: 1px solid #CCD;
margin: 0.2em;
border-radius: 0.1em;
box-shadow: 0 0.1em 0.1em #CCC;
border: none;
border-bottom: 1px solid #999;
margin: .2em;
box-sizing: border-box;
color: #333;
/* border-radius: 0.1em;
border: .1em solid #CCD;
box-shadow: 0 0.1em 0.1em #CCC;*/
}
input[type=text],
input[type=password],
input[type=number],
textarea
{
padding: 0 .2em;
}
input[type=text],
input[type=password],
input[type=file],
input[type=number],
textarea
{
padding: 0.3em;
}
select
{
background-color: white;
font-size: 1.1em;
height: 1.8em;
}
option
{
padding: 0.3em;
border-width: 0;
font-weight: normal;
font-size: 1em;
}
select,
option
{
cursor: pointer;
}
input[type=text],
input[type=password]
{
height: 1.6em;
height: 2.2em;
}
textarea
{
@ -134,10 +124,11 @@ textarea
}
input[type=text]:focus,
input[type=password]:focus,
input[type=file]:focus,
input[type=number]:focus,
textarea:focus
{
background-color: #EEF;
border-color: #BBC;
border-color: #333;
}
input[type=checkbox],
input[type=radio]
@ -148,6 +139,24 @@ input[type=radio]
width: 0.8em;
height: 0.8em;
}
select
{
background-color: white;
-moz-appearance: none;
appearance: none;
}
option
{
padding: .4em;
border-width: 0;
font-weight: normal;
font-size: 1em;
}
select,
option
{
cursor: pointer;
}
/* Buttons */
@ -275,10 +284,16 @@ img.editable
.form-group > label
{
display: block;
margin-bottom: 0.5em;
margin: 0;
margin-top: .5em;
margin-bottom: .2em;
font-size: .9em;
color: #222;
}
.form-group > input[type=text],
.form-group > input[type=password],
.form-group > input[type=file],
.form-group > input[type=number],
.form-group > select,
.form-group > textarea
{

View File

@ -27,7 +27,7 @@ Htk.Grid = new Class
}
,get: function ()
{
this._model;
return this._model;
}
},
emptyMessage:

View File

@ -16,7 +16,7 @@ Htk.ImageEditor = new Class
this.$('max-size').value = 10 /* MB */ * 1048576;
this.$('form').action =
'//'+ Vn.Config['image_host'] +'/hedera-web/rest.php?action=image'
'//'+ Vn.Config['image_host'] +'/rest.php?action=image'
}
,onNameChange: function ()

View File

@ -301,7 +301,7 @@ var Vn =
if (loaded)
{
if (this.currentCallback)
includeData.callbacks.push (this.currentCallback);
includeData.callbacks.unshift (this.currentCallback);
var includes = this.currentDeps;