0
1
Fork 0

Estilos CSS depurados

This commit is contained in:
Juan Ferrer Toribio 2016-12-23 09:57:49 +01:00
parent 63d75a7ff6
commit 2c6c51865f
67 changed files with 826 additions and 1117 deletions

View File

@ -31,9 +31,9 @@ Hedera.AddressList = new Class
}
}
,onEditAddressClick: function (button, form)
,repeaterFunc: function (res, form)
{
this.hash.set ({
res.$('link').href = this.hash.make ({
'form': 'account/address',
'address': form.get ('id')
});

View File

@ -1,48 +1 @@
.address-list
{
padding: 1em;
}
.address-list .box
{
max-width: 30em;
}
.address-list .form
{
margin: 0 auto;
max-width: 25em;
padding: 2em;
}
.address
{
padding: 1em;
border-bottom: 1px solid #DDD;
}
.address p
{
margin: 0.2em 0;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.address p.important
{
font-size: 1.2em;
}
.address .actions
{
float: right;
}
.address .actions > .htk-button
{
margin: 0;
}
.address .actions > *
{
display: inline-block;
vertical-align: middle;
}
.address .actions > input
{
margin: .6em;
}

View File

@ -29,14 +29,14 @@
on-click="onAddAddressClick"/>
</div>
<div id="form" class="address-list">
<div class="box">
<div class="card list">
<htk-radio-group
id="default-address"
column="default_address"
form="user-form"/>
<htk-repeater model="addresses" form-id="iter">
<htk-repeater model="addresses" form-id="iter" renderer="repeaterFunc">
<custom>
<div class="address">
<a id="link" class="list-row" title="_EditAddress">
<div class="actions">
<htk-radio
form="iter"
@ -49,12 +49,6 @@
tip="_RemoveAddress"
icon="delete"
on-click="onRemoveAddressClick"/>
<htk-button
form="iter"
column="id"
tip="_EditAddress"
icon="edit"
on-click="onEditAddressClick"/>
</div>
<p class="important">
<htk-text form="iter" column="consignee"/>
@ -66,7 +60,7 @@
<htk-text form="iter" column="zip_code"/>,
<htk-text form="iter" column="city"/>
</p>
</div>
</a>
</custom>
</htk-repeater>
</div>

View File

@ -1,16 +1 @@
.address
{
padding: 1em;
}
.address .box
{
max-width: 30em;
padding: 2em;
}
.address .form
{
margin: 0 auto;
max-width: 25em;
}

View File

@ -38,25 +38,24 @@
on-click="onReturnClick"/>
</div>
<div id="form" class="address">
<div class="box">
<div class="form">
<div class="form-group">
<div class="card form">
<div>
<label><t>Name</t></label>
<htk-entry column="consignee" form="iter"/>
</div>
<div class="form-group">
<div>
<label><t>Address</t></label>
<htk-entry column="name" form="iter"/>
</div>
<div class="form-group">
<div>
<label><t>City</t></label>
<htk-entry column="city" form="iter"/>
</div>
<div class="form-group">
<div>
<label><t>ZipCode</t></label>
<htk-entry column="zip_code" form="iter"/>
</div>
<div class="form-group">
<div>
<label><t>Country</t></label>
<htk-combo>
<db-param
@ -73,7 +72,7 @@
</db-model>
</htk-combo>
</div>
<div class="form-group">
<div>
<label><t>Province</t></label>
<htk-combo column="province_id" form="iter">
<db-model property="model">
@ -91,6 +90,5 @@
</htk-combo>
</div>
</div>
</div>
</div>
</vn>

View File

@ -15,7 +15,7 @@ Hedera.Conf = new Class
this.$('new-password').value = '';
this.$('repeat-password').value = '';
var recoverPass = this.$('user-form').get ('recoverPass');
var recoverPass = this.$('user').get ('recoverPass');
this.$('old-password').style.display = recoverPass ? 'none' : 'block';
this.$('change-password').show ();
@ -56,7 +56,7 @@ Hedera.Conf = new Class
{
this.$('change-password').hide ();
Htk.Toast.showMessage (_('Password changed!'));
this.$('user-form').refresh ();
this.$('user').refresh ();
}
else
{

View File

@ -1,18 +1,4 @@
.conf
{
padding: 1em;
}
.conf .box
{
max-width: 30em;
padding: 2em;
}
.conf .form
{
margin: 0 auto;
max-width: 25em;
}
.conf .form-group input[type=password]
{
margin-bottom: 0.5em;

View File

@ -8,7 +8,7 @@
</custom>
</db-model>
</db-form>
<db-form id="user-form">
<db-form id="user">
<db-model property="model" id="user-model" updatable="true">
<custom>
SELECT u.id, u.name, u.recoverPass,
@ -44,20 +44,18 @@
on-click="onPassChangeClick"/>
</div>
<div id="form" class="conf">
<div class="box">
<div class="form">
<div class="form-group">
<div class="card form">
<div>
<label for="user-name"><t>Username</t></label>
<htk-text column="name" form="user-form"/>
<htk-text form="user" column="name"/>
</div>
<div class="form-group">
<div>
<label for="email"><t>Email</t></label>
<htk-entry column="email" form="user-form"></htk-entry>
<htk-entry form="user" column="email"></htk-entry>
</div>
<div class="form-group">
<div>
<label for="mail"><t>Receive invoices by email</t></label>
<htk-check column="mail" form="user-form"/>
</div>
<htk-check form="user" column="mail"/>
</div>
</div>
</div>

View File

@ -1,36 +1,12 @@
.access-log
.access-log .card
{
padding: 1em;
}
.access-log .box
{
max-width: 25em;
margin: 0 auto;
}
.access-log .form
{
padding: 2em;
max-width: 28em;
}
.access-log .form > p
{
font-size: 1.2em;
margin: .1em 0;
}
/* List */
.access-log .list
{
margin-top: 1em;
}
.access-log .item
{
display: block;
padding: 1em;
border-bottom: 1px solid #DDD;
}
.access-log .item > p
{
margin: .1em 0;
}

View File

@ -20,8 +20,7 @@
<h1><t>AccessLog</t></h1>
</div>
<div id="form" class="access-log">
<div class="box">
<div class="form">
<div class="card form">
<p>
<htk-text form="user-form" column="Id_Cliente"/>
</p>
@ -35,8 +34,7 @@
<htk-text form="user-form" column="movil"/>
</p>
</div>
</div>
<div class="list box">
<div class="card">
<div>
<htk-repeater form-id="iter">
<db-model property="model">
@ -56,7 +54,7 @@
</sql-batch>
</db-model>
<custom>
<div class="item">
<div class="list-row">
<p>
<htk-text form="iter" column="stamp" format="_%a, %e %b %Y at %T"/>
</p>

View File

@ -26,11 +26,11 @@ Hedera.Connections = new Class
this.$('sessions').refresh ();
}
,onAccessLogClick: function (button, form)
,repeaterFunc: function (res, form)
{
this.hash.set ({
'form': 'admin/access-log'
,'user': form.get ('userId')
res.$('link').href = this.hash.make ({
'form': 'admin/access-log',
'user': form.get ('userId')
});
}

View File

@ -1,12 +1,4 @@
.connections
{
padding: 1em;
}
.connections .box
{
max-width: 25em;
margin: 0 auto;
}
.action-bar .connections-sum
{
padding: .4em;
@ -16,29 +8,3 @@
border-radius: 0.1em;
box-shadow: 0 0 0.4em #666;
}
/* List */
.connections .item
{
display: block;
padding: 1em;
border-bottom: 1px solid #DDD;
}
.connections .item > button
{
float: right;
margin: 0;
}
.connections .item > p
{
margin: .1em 0;
}
.connections .item > p.important
{
font-size: 1.2em;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}

View File

@ -18,8 +18,8 @@
</div>
</div>
<div id="form" class="connections">
<div class="box">
<htk-repeater form-id="iter">
<div class="card list">
<htk-repeater form-id="iter" renderer="repeaterFunc">
<db-model property="model" id="sessions" on-status-changed="onModelStatusChange">
<custom>
SELECT vu.user userId, vu.stamp, c.Cliente, s.lastUpdate,
@ -35,19 +35,15 @@
</custom>
</db-model>
<custom>
<div class="item">
<a id="link" class="list-row" title="_Access log">
<div class="actions">
<htk-button
form="iter"
column="id"
tip="_Supplant user"
icon="incognito"
on-click="onChangeUserClick"/>
<htk-button
form="iter"
column="id"
tip="_Access log"
icon="gnome"
on-click="onAccessLogClick"/>
</div>
<p class="important">
<htk-text form="iter" column="Cliente"/>
</p>
@ -60,7 +56,7 @@
<htk-text form="iter" column="browser"/>
<htk-text form="iter" column="version"/>
</p>
</div>
</a>
</custom>
</htk-repeater>
</div>

View File

@ -1,43 +0,0 @@
.items
{
padding: 1em;
}
.items .box
{
max-width: 30em;
padding: 2em;
}
.items .form
{
max-width: 25em;
margin: auto;
}
.items .form-group
{
padding: 0.4em;
}
.items form label
{
display: block;
margin-bottom: 0.5em;
}
.items input[type=text],
.items select
{
margin: 0;
width: 100%;
}
/* Footer */
.items .footer
{
text-align: center;
margin-top: 1.5em;
}
.items .footer > button
{
margin: 0 .2em;
}

View File

@ -9,9 +9,8 @@
on-click="onPreviewClick"/>
</div>
<div id="form" class="items">
<div class="box">
<div class="form">
<div class="form-group">
<div class="card form">
<div>
<label><t>Store</t></label>
<htk-combo>
<vn-param property="param" id="warehouse"/>
@ -23,7 +22,7 @@
</db-model>
</htk-combo>
</div>
<div class="form-group">
<div>
<label><t>Realm</t></label>
<htk-combo not-null="false">
<vn-param property="param" id="realm"/>
@ -35,7 +34,7 @@
</db-model>
</htk-combo>
</div>
<div class="form-group">
<div>
<label><t>Rate</t></label>
<select id="rate">
<option>3</option>
@ -44,6 +43,5 @@
</select>
</div>
</div>
</div>
</div>
</vn>

View File

@ -1,38 +1,13 @@
.cpanel
{
padding: 1em;
}
.cpanel .box
{
max-width: 30em;
}
/* Items */
.cpanel .item
{
display: block;
padding: 1em;
border-bottom: 1px solid #DDD;
}
.cpanel .item:hover
.cpanel .list-row:hover
{
background-color: rgba(1, 1, 1, 0.05);
}
.cpanel .item > .htk-image
.cpanel .list-row > .htk-image
{
margin: 0;
margin-right: 1em;
float: left;
max-height: 2.8em;
max-width: 2.8em;
}
.cpanel .item > p
{
margin: .1em 0;
}
.cpanel .item > p.important
{
font-size: 1.2em;
height: 2.8em;
width: 2.8em;
}

View File

@ -3,7 +3,7 @@
<h1><t>ControlPanel</t></h1>
</div>
<div id="form" class="cpanel">
<div class="box">
<div class="card list">
<htk-repeater form-id="iter" renderer="repeaterFunc">
<db-model property="model">
<custom>
@ -12,7 +12,7 @@
</custom>
</db-model>
<custom>
<a id="link" class="item" target="_blank">
<a id="link" class="list-row" target="_blank">
<htk-image
form="iter"
column="image"

View File

@ -1,18 +1,4 @@
.photos
{
padding: 1em;
}
.photos .box
{
max-width: 30em;
padding: 2em;
}
.photos .form
{
margin: 0 auto;
max-width: 25em;
}
.photos iframe
{
display: none;
@ -23,9 +9,9 @@
.photos input[type=submit]
{
display: block;
margin: 0 auto;
padding: 0.6em;
margin-top: 1.5em;
margin-left: auto;
margin-right: auto;
font-size: 1.2em;
}

View File

@ -3,21 +3,20 @@
<h1><t>Photos</t></h1>
</div>
<div id="form" class="photos">
<div class="box">
<div class="form">
<form
id="html-form"
enctype="multipart/form-data">
<div class="card form">
<input type="hidden" name="srv" value="json:image/upload"/>
<div class="form-group">
<div>
<label><t>Id</t></label>
<input type="number" name="id" id="photo-id"/>
</div>
<div class="form-group">
<div>
<label><t>ImageName</t></label>
<input type="text" name="name"/>
</div>
<div class="form-group">
<div>
<label><t>Collection</t></label>
<htk-combo id="schema">
<db-model property="model">
@ -28,13 +27,12 @@
</htk-combo>
<input type="hidden" name="schema" id="schema-field"/>
</div>
<div class="form-group">
<div>
<label><t>ImageFile</t></label>
<input type="file" name="image"/>
</div>
<input id="submit" type="submit" class="thin"/>
</div>
</form>
</div>
</div>
</div>
</vn>

View File

@ -1,16 +1,7 @@
.queries
{
padding: 1em;
}
.queries .box
.queries .card
{
max-width: 40em;
margin: 0 auto;
}
.queries .form
{
box-sizing: border-box;
padding: 2em;
}
.queries textarea
{

View File

@ -13,8 +13,8 @@
on-click="_onCleanClick"/>
</div>
<div id="form" class="queries">
<div class="box form">
<div class="form-group">
<div class="card form">
<div>
<label><t>SQL query</t></label>
<textarea
id="sql"
@ -22,16 +22,16 @@
autocapitalize="off"
spellcheck="false"/>
</div>
<div class="form-group">
<div>
<label><t>Result index</t></label>
<htk-spin id="result-index"/>
</div>
<div class="form-group">
<div>
<label><t>Updatable</t></label>
<htk-check id="updatable"/>
</div>
</div>
<div class="box result">
<div class="card result">
<div id="grid-holder"/>
</div>
</div>

View File

@ -1,30 +0,0 @@
.shelves
{
padding: 1em;
}
.shelves .box
{
max-width: 30em;
padding: 2em;
}
.shelves .form
{
max-width: 25em;
margin: auto;
}
.shelves .form-group
{
padding: 0.4em;
}
.shelves form label
{
display: block;
margin-bottom: 0.5em;
}
.shelves input[type=text],
.shelves select
{
margin: 0;
width: 100%;
}

View File

@ -8,20 +8,20 @@
JOIN vn2008.Tipos t ON t.tipo_id = c.family
</custom>
</db-model>
<vn-basic-set id="set"/>
</vn-group>
<div id="title">
<h1><t>Shelves</t></h1>
</div>
<div id="actions" class="action-bar">
<div id="actions">
<htk-bar-button
icon="print"
tip="_Preview"
on-click="onPreviewClick"/>
</div>
<div id="form" class="shelves">
<div class="box">
<div class="form">
<div class="form-group">
<div class="card form">
<div>
<label><t>Configuration</t></label>
<htk-combo
id="config"
@ -30,11 +30,11 @@
on-changed="onConfigChange"
on-ready="onConfigChange"/>
</div>
<div class="form-group">
<div>
<label><t>Date</t></label>
<htk-date-chooser id="date"/>
</div>
<div class="form-group">
<div>
<label><t>Reign</t></label>
<htk-combo id="realm">
<db-model property="model" id="realms">
@ -45,7 +45,7 @@
</db-model>
</htk-combo>
</div>
<div class="form-group">
<div>
<label><t>Family</t></label>
<htk-combo id="family">
<db-model property="model">
@ -61,10 +61,10 @@
</db-model>
</htk-combo>
</div>
<div class="form-group">
<div>
<label><t>Store</t></label>
<htk-combo id="warehouse">
<db-model property="model" id="warehouses">
<db-model property="model">
<custom>
SELECT id, name FROM vn2008.warehouse
WHERE reserve ORDER BY name
@ -72,41 +72,40 @@
</db-model>
</htk-combo>
</div>
<div class="form-group">
<div>
<label><t>Shelf</t></label>
<htk-combo id="shelf">
<db-model property="model" id="shelves">
<db-model property="model">
<custom>
SELECT id, name FROM shelf
</custom>
</db-model>
</htk-combo>
</div>
<div class="form-group">
<div>
<label><t>Name prefix</t></label>
<htk-entry id="namePrefix"/>
</div>
<div class="form-group">
<div>
<label><t>Limit amount per item</t></label>
<htk-entry id="maxAmount"/>
</div>
<div class="form-group">
<div>
<label><t>Title</t></label>
<htk-entry id="reportTitle"/>
</div>
<div class="form-group">
<div>
<label><t>Show packing</t></label>
<htk-check id="showPacking"/>
</div>
<div class="form-group">
<div>
<label><t>Stack different items</t></label>
<htk-check id="stack"/>
</div>
<div class="form-group">
<div>
<label><t>Use ids instead of names</t></label>
<htk-check id="useIds"/>
</div>
</div>
</div>
</div>
</vn>

View File

@ -1,35 +1,6 @@
.users
{
padding: 1em;
}
.users .box
{
max-width: 30em;
margin: 0 auto;
}
.users-box
{
padding: 1em;
border-bottom: 1px solid #DDD;
}
.users-box > button
{
float: right;
margin: 0;
}
.users-box > p
{
margin: .2em 0;
}
.users-box > p.important
{
font-size: 1.2em;
}
/* Topbar */
.action-bar .htk-search-entry
{
margin: .8em .6em;
margin: .8em;
}

View File

@ -11,8 +11,8 @@
param="user-name"/>
</div>
<div id="form" class="users">
<div class="box">
<htk-repeater form-id="iter">
<div class="card list">
<htk-repeater form-id="iter" renderer="repeaterFunc">
<db-model property="model">
<custom>
SELECT u.id, u.name, c.Cliente
@ -30,19 +30,15 @@
</sql-batch>
</db-model>
<custom>
<div class="users-box">
<a id="link" class="list-row" title="_AccessLog">
<div class="actions">
<htk-button
form="iter"
column="id"
tip="_AccessAsUser"
icon="incognito"
on-click="onChangeUserClick"/>
<htk-button
form="iter"
column="id"
tip="_AccessLog"
icon="gnome"
on-click="onAccessLogClick"/>
</div>
<p class="important">
<htk-text form="iter" column="Cliente"/>
</p>
@ -50,8 +46,7 @@
<htk-text form="iter" column="id"/> -
<htk-text form="iter" column="name"/>
</p>
<div class="clear"/>
</div>
</a>
</custom>
</htk-repeater>
</div>

View File

@ -3,11 +3,11 @@ Hedera.Users = new Class
({
Extends: Hedera.Form
,onAccessLogClick: function (button, form)
,repeaterFunc: function (res, form)
{
this.hash.set ({
'form': 'admin/access-log'
,'user': form.get ('id')
res.$('link').href = this.hash.make ({
'form': 'admin/access-log',
'user': form.get ('id')
});
}

View File

@ -1,46 +1,13 @@
.visits
.visits .card
{
padding: 1em;
}
.visits .box
{
max-width: 25em;
margin: 0 auto;
}
.visits .form
{
padding: 1.5em;
max-width: 20em;
}
.visits .summary
{
margin-top: 1em;
max-width: 28em;
}
.visits .summary p
{
padding: 1.5em;
margin: 0;
font-size: 1.4em;
text-align: right;
}
/* List */
.visits .list
{
margin-top: 1em;
}
.visits .item
{
display: block;
padding: 1em;
border-bottom: 1px solid #DDD;
}
.visits .item > p
{
margin: .1em 0;
}
.visits .item > p.important
{
font-size: 1.2em;
}

View File

@ -13,23 +13,21 @@
on-click="onSessionsClick"/>
</div>
<div id="form" class="visits">
<div class="box">
<div class="form">
<div class="form-group">
<div class="card form">
<div>
<label><t>From</t></label>
<htk-date-chooser>
<vn-param property="param" id="from"/>
</htk-date-chooser>
</div>
<div class="form-group">
<div>
<label><t>To</t></label>
<htk-date-chooser>
<vn-param property="param" id="to"/>
</htk-date-chooser>
</div>
</div>
</div>
<div class="summary box">
<div class="summary card form">
<p>
<htk-text>
<db-calc-sum
@ -47,7 +45,7 @@
<t>news</t>
</p>
</div>
<div class="list box">
<div class="card list ">
<htk-repeater form-id="iter" empty-message="_Select date interval">
<db-model property="model" id="visits">
<custom>
@ -72,7 +70,7 @@
</sql-batch>
</db-model>
<custom>
<div class="item">
<div class="list-row">
<p class="important">
<htk-text form="iter" column="browser"/>
<htk-text form="iter" column="minVersion"/> -

View File

@ -1,9 +1,4 @@
.packages
.packages .card
{
padding: 1em;
}
.packages .box
{
max-width: 40em;
margin: 0 auto;
max-width: 35em;
}

View File

@ -3,7 +3,7 @@
<h1><t>ListByAgency</t></h1>
</div>
<div id="form" class="packages">
<div class="box">
<div class="card">
<htk-grid>
<db-model property="model">
<custom>

View File

@ -1,9 +1,4 @@
.provinces
.provinces .card
{
padding: 1em;
}
.provinces .box
{
max-width: 40em;
margin: 0 auto;
max-width: 35em;
}

View File

@ -7,7 +7,7 @@
<h1><t>ByProvince</t></h1>
</div>
<div id="form" class="provinces">
<div class="box">
<div class="card">
<htk-grid>
<db-model property="model">
<custom>

View File

@ -8,7 +8,7 @@
max-width: 85em;
margin: 0 auto;
}
@media screen and (min-width: 1000px) /* and (max-width: 1399px) */
@media screen and (min-width: 1000px)
{
.about .cols
{
@ -16,34 +16,31 @@
-moz-column-count: 2;
-webkit-column-count: 2;
}
}/*
@media screen and (min-width: 1400px)
{
.about .cols
{
column-count: 3;
-moz-column-count: 3;
-webkit-column-count: 3;
}
}
@media screen and (min-width: 2000px)
{
.about .cols
{
column-count: 4;
-moz-column-count: 4;
-webkit-column-count: 4;
}
}*/
.about .box
.about .card
{
margin: 0;
max-width: none;
margin-bottom: 1em;
padding: 2em;
}
.about h1
.about .card > :first-child
{
margin-top: 0;
}
.about .card > :last-child
{
margin-bottom: 0;
}
.about h1,
.about h2,
.about h3
{
padding: 0;
margin: 0;
}
.about h1
{
font-weight: normal;
font-size: 1.6em;
}
@ -59,7 +56,7 @@
text-align: center;
font-size: 1.2em;
font-weight: normal;
padding: 1em;
margin: 1em;
color: #00796B;
}
.about p
@ -83,26 +80,27 @@
{
max-width: 90%;
text-align: center;
padding: 1em;
display: block;
margin: 0 auto;
margin: 1em auto;
}
.about img[alt="producers"],
.about img[alt="4_control"],
.about img[alt="dealer"],
.about img[alt="goods_transport"]
{
margin: 1em;
float: right;
}
.about img[alt="2_control"]
{
margin: 1em;
float: left;
}
.about img[alt="glass"]
{
display: inline;
padding: 0;
padding-left: 0.9em;
margin: 0;
margin-left: .9em;
vertical-align: middle;
}

View File

@ -4,7 +4,7 @@
</div>
<div id="form" class="about">
<div class="cols">
<div class="box">
<div class="card">
<h1>
<t>QualityAndVariety</t>
</h1>
@ -20,7 +20,7 @@
</p>
<img src="forms/cms/about/image/palletizing.png" alt="palletizing"/>
</div>
<div class="box">
<div class="card">
<h1>
<t>WhatMakeUsDifferent</t>
</h1>
@ -29,14 +29,14 @@
<p><t>AdaptToYourNeeds</t></p>
<h3><t>TheBestQuality</t></h3>
</div>
<div class="box">
<div class="card">
<h1>
<t>AtYourService</t>
</h1>
<h2><t>BuyersAndTraders</t></h2>
<img src="forms/cms/about/image/commercial.png" alt="commercial"/>
</div>
<div class="box">
<div class="card">
<h1>
<t>Verdnatura training</t>
</h1>
@ -47,7 +47,7 @@
<h2><t>YoutubeChannel</t></h2>
<img src="forms/cms/about/image/youtube.png" alt="youtube"/>
</div>
<div class="box">
<div class="card">
<h1>
<t>HowWeWork</t>
</h1>

View File

@ -1,19 +1,8 @@
.contact
{
padding: 1em;
}
.contact .box
{
max-width: 30em;
padding: 2em;
}
.contact .form
{
position: relative;
text-align: left;
max-width: 25em;
margin: 0 auto;
}
.contact form
{

View File

@ -3,8 +3,7 @@
<h1><t>IWantCustomer</t></h1>
</div>
<div id="form" class="contact">
<div class="box">
<div class="form">
<div class="card form">
<p>
<t>FillFormData</t>
</p>
@ -51,6 +50,5 @@
</button>
</form>
</div>
</div>
</div>
</vn>

View File

@ -1,24 +1,19 @@
.why
.why .card
{
padding: 1em;
}
.why .box
{
max-width: 40em;
margin: 0 auto;
max-width: 35em;
}
.why ul
{
list-style-type: none;
padding: 0 1em;
padding-bottom: 1em;
padding: 0;
max-width: 36em;
margin: 0 auto;
}
.why li
{
padding: 0.5em 0;
padding: 0;
margin-bottom: 1em;
}
.why img
{

View File

@ -3,7 +3,7 @@
<h1><t>AboutCompany</t></h1>
</div>
<div id="form" class="why">
<div class="box">
<div class="card">
<div class="body">
<ul>
<li><t>BecauseOurBigCatalog</t></li>

View File

@ -1,11 +1,7 @@
.basket
{
padding: 1em;
}
.basket .box
.basket .card
{
max-width: 30em;
margin: 0 auto;
padding: 0 2em;
}
.basket .form > p

View File

@ -17,7 +17,7 @@
on-click="onConfigureClick"/>
</div>
<div id="form" class="basket">
<div class="box">
<div class="card">
<div class="head">
<p>
<t>Total</t>

View File

@ -147,7 +147,7 @@
form-id="item"
model="items-model">
<custom>
<div class="box item-box">
<div class="card item-box">
<htk-image
directory="catalog"
subdir="200x200"

View File

@ -1,44 +1,44 @@
.checkout
{
padding: 1em;
max-width: 40em;
margin: 0 auto;
}
.checkout .form
{
max-width: 40em;
padding: 3em;
max-width: 38em;
padding: 2.5em;
}
.checkout .htk-assistant-bar
{
margin-top: 1.8em;
}
/* Step */
.answers button,
.answers p,
.radio > div
.answers
{
font-size: 1.4em;
font-size: 1.3em;
}
.answers .htk-select
{
max-width: 8em;
max-width: 10em;
display: block;
margin: 0 auto;
font-size: 1.6em;
height: 1.8em;
}
.answers p
{
margin: 0.3em 0;
margin: .3em 0;
}
.target
{
max-width: 28em;
max-width: 18em;
margin: 0 auto;
}
.address
{
border-radius: 0.1em;
padding: 0.6em 1.4em;
border-radius: .1em;
padding: .8em;
}
.address p
{
margin: 0;
}
.address.selected
{
@ -52,10 +52,11 @@
.address p.consignee
{
font-weight: bold;
margin-bottom: .2em;
}
.radio
{
max-width: 20em;
max-width: 13em;
margin: 0 auto;
}
.radio > div
@ -73,6 +74,7 @@
max-width: 24em;
margin: 0 auto;
box-shadow: 0 0.1em 0.3em #ccc;
font-size: .7em;
}
.thin-calendar tr > th
{

View File

@ -70,8 +70,7 @@
on-click="onCancelClick"/>
</div>
<div id="form" class="checkout">
<div class="box">
<div class="form">
<div class="card form">
<htk-assistant
id="assistant"
step-count="5"
@ -220,6 +219,5 @@
</div>
<htk-assistant-bar assistant="assistant"/>
</div>
</div>
</div>
</vn>

View File

@ -1,11 +1,8 @@
.confirm
{
padding: 1em;
max-width: 30em;
margin: 0 auto;
color: #555;
}
.confirm .box
.confirm .card
{
padding: 2.2em 2.5em;
}

View File

@ -33,7 +33,7 @@
<h1><t>Order summary</t></h1>
</div>
<div id="form" class="confirm">
<div class="box summary">
<div class="summary form card">
<div>
<div class="delivery">
<p>
@ -59,7 +59,7 @@
</div>
</div>
</div>
<div class="box payment">
<div class="payment form card">
<div>
<table class="debt-info">
<tbody>

View File

@ -1,10 +1,7 @@
.invoices
.invoices .card
{
padding: 1em;
}
.invoices .box
{
max-width: 40em;
max-width: 32em;
}
.invoices .box > .header,
.invoices .htk-grid > thead > tr

View File

@ -3,7 +3,7 @@
<h1><t>Invoices</t></h1>
</div>
<div id="form" class="invoices">
<div class="box">
<div class="card">
<div>
<htk-grid show-header="false">
<db-model property="model" id="tickets">

View File

@ -1,11 +1,3 @@
.orders
{
padding: 1em;
}
.orders .box
{
max-width: 25em;
}
/* Balance */
@ -48,25 +40,7 @@
/* List */
.orders .item
{
display: block;
padding: 1em;
border-bottom: 1px solid #DDD;
}
.orders .item:hover
{
background-color: rgba(1, 1, 1, 0.05);
}
.orders .item > p
{
margin: .1em 0;
}
.orders .item > p.important
{
font-size: 1.2em;
}
.orders .item > p.total
.orders .list-row > p.total
{
float: right;
}

View File

@ -46,7 +46,7 @@
</div>
</div>
<div id="form" class="orders">
<div class="box confirmed">
<div class="card list">
<htk-repeater form-id="iter" renderer="repeaterFunc">
<db-model property="model" id="tickets">
<custom>
@ -54,7 +54,7 @@
</custom>
</db-model>
<custom>
<a id="link" class="item" title="_SeeOrder">
<a id="link" class="list-row" title="_SeeOrder">
<p class="important total">
<htk-text form="iter" column="total" format="%.2d€"/>
</p>
@ -67,7 +67,6 @@
<p>
<htk-text form="iter" column="type"/>
</p>
<div class="clear"/>
</a>
</custom>
</htk-repeater>

View File

@ -1,14 +1,3 @@
.ticket
{
padding: 1em;
}
.ticket .box
{
max-width: 30em;
margin: 0 auto;
padding: 2em;
color: #333;
}
/* Header */

View File

@ -31,7 +31,7 @@
on-click="onPrintClick"/>
</div>
<div id="form" class="ticket">
<div class="box">
<div class="card form">
<div class="head">
<div>
<p class="important ticket-id">

View File

@ -1,12 +1,7 @@
.new
{
padding: 1em;
}
.new .box
.new .card
{
max-width: 38em;
padding: 2em;
}
/* Form */

View File

@ -35,13 +35,12 @@
on-click="onReturnClick"/>
</div>
<div id="form" class="new">
<div class="box">
<div class="form">
<div class="form-group">
<div class="card form">
<div>
<label><t>Title</t></label>
<htk-entry form="iter" column="title"/>
</div>
<div class="form-group">
<div>
<label><t>Tag</t></label>
<htk-combo form="iter" column="tag">
<db-model property="model">
@ -52,11 +51,10 @@
</db-model>
</htk-combo>
</div>
<div class="form-group">
<div>
<label><t>NewBody</t></label>
<textarea id="html-editor"/>
</div>
</div>
</div>
</div>
</vn>

View File

@ -3,28 +3,26 @@ Hedera.News = new Class
({
Extends: Hedera.Form
,editNew: function (newId)
{
this.hash.set ({
'form': 'news/new'
,'new': newId
});
}
,onEditClick: function (button, form)
{
this.editNew (button.value);
}
,onDeleteClick: function (button, form)
,onDeleteClick: function (button, form, event)
{
if (confirm (_('ReallyDelete')))
form.deleteRow ();
}
,repeaterFunc: function (res, form)
{
res.$('link').href = this.hash.make ({
'form': 'news/new',
'new': form.get ('id')
});
}
,onAddClick: function ()
{
this.editNew (0);
this.hash.set ({
'form': 'news/new',
'new': 0
});
}
});

View File

@ -1,32 +1,12 @@
.news
.news .card
{
padding: 1em;
}
.news .box
{
max-width: 35em;
margin: 0 auto;
max-width: 30em;
}
/* Items */
.news .item
{
padding: 1em;
border-bottom: 1px solid #DDD;
}
.news .item > p
{
margin: .1em 0;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.news .item > p.important
{
font-size: 1.2em;
}
.news .item > .photo
.news .list-row > .photo
{
float: left;
margin-right: 1em;
@ -34,8 +14,3 @@
width: 4.2em;
border-radius: .3em;
}
.news .item > button
{
float: right;
margin: 0;
}

View File

@ -9,8 +9,8 @@
on-click="onAddClick"/>
</div>
<div id="form" class="news">
<div class="box">
<htk-repeater form-id="iter">
<div class="card">
<htk-repeater form-id="iter" renderer="repeaterFunc">
<db-model property="model" id="news-model" updatable="true">
<custom>
SELECT n.id, c.Cliente, priority, image, title
@ -20,19 +20,15 @@
</custom>
</db-model>
<custom>
<div class="item">
<htk-button
form="iter"
column="id"
tip="_EditNew"
icon="edit"
on-click="onEditClick"/>
<a id="link" class="list-row" title="_EditNew">
<div class="actions">
<htk-button
form="iter"
column="id"
tip="_Remove"
icon="delete"
on-click="onDeleteClick"/>
</div>
<htk-image
form="iter"
column="image"
@ -52,7 +48,7 @@
<t>Priority</t>
<htk-text form="iter" column="priority"/>
</p>
</div>
</a>
</custom>
</htk-repeater>
</div>

View File

@ -21,7 +21,7 @@ module.exports = new Class
/**
* Gets the query error.
*
* @return {Db.Err} the error or null if no errors hapened
* @return {Error} the error or null if no errors hapened
*/
,getError: function ()
{

View File

@ -331,23 +331,31 @@ img.editable
clear: both !important;
}
/* Box */
/* Margin */
.box
.padding
{
padding: 2em;
}
/* Card */
.card
{
margin: 1em auto;
background-color: white;
margin: 0 auto;
border-radius: 0.1em;
box-shadow: 0 0.2em 0.2em #CCC;
box-sizing: border-box;
}
.box .header
.card .header
{
padding: 0.6em 0.8em;
margin: 0;
background-color: #009688;
color: white;
}
.box .header > h1
.card .header > h1
{
color: white;
text-align: left;
@ -356,7 +364,7 @@ img.editable
font-weight: normal;
display: inline;
}
.box .body
.card .body
{
padding: 2em;
}
@ -365,34 +373,104 @@ img.editable
.form
{
margin: 0 auto;
max-width: 30em;
}
.form-group
.form-group,
.form > div
{
margin-bottom: 1.2em;
}
.form-group:last-child
.form-group:last-child,
.form > :last-child
{
margin-bottom: 0;
}
.form-group > label
.form-group > label,
.form > div > label
{
display: block;
margin: 0;
margin-bottom: .2em;
font-size: .9em;
color: #222;
color: #666;
}
.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
.form-group > textarea,
.form > div > input[type=text],
.form > div > input[type=password],
.form > div > input[type=file],
.form > div > input[type=number],
.form > div > select,
.form > div > textarea
{
margin: 0;
width: 100%;
}
.card.form
{
padding: 2em;
}
/* List */
.list
{
max-width: 28em;
}
.list-row
{
display: block;
padding: 1em;
border-bottom: 1px solid #DDD;
}
a.list-row:hover
{
background-color: rgba(1, 1, 1, 0.05);
}
.list-row > .actions
{
opacity: .3;
float: right;
}
.list-row:hover > .actions
{
opacity: 1;
}
.list-row > .actions > .htk-button
{
margin-left: .3em;
}
.list-row > .actions > *
{
display: inline-block;
vertical-align: middle;
}
.list-row > p:first-child,
.list-row > p.important
{
margin-top: 0;
}
.list-row > p.important
{
font-size: 1.2em;
}
.list-row > p
{
margin: .2em 0;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.list-row > p:last-child
{
margin-bottom: 0;
}
/* Form */

View File

@ -42,7 +42,7 @@ module.exports = new Class
var button = this.createElement ('button');
button.addEventListener ('click',
this.buttonClicked.bind (this, this.value, tr, button));
this._onClick.bind (this, this.value, tr, button));
td.appendChild (button);
var img = this.createElement ('img');
@ -58,8 +58,9 @@ module.exports = new Class
return td;
}
,buttonClicked: function (value, tr, button)
,_onClick: function (value, tr, button, event)
{
this.signalEmit ('clicked', value, tr.rowIndex - 1, button);
event.preventDefault ();
this.signalEmit ('clicked', value, tr.rowIndex - 1, button, event);
}
});

View File

@ -60,7 +60,7 @@ module.exports = new Class
{
var node = this.createRoot ('button');
node.className = 'htk-button';
node.addEventListener ('click', this.onClick.bind (this));
node.addEventListener ('click', this._onClick.bind (this));
this.img = this.createElement ('img');
node.appendChild (this.img);
@ -79,8 +79,9 @@ module.exports = new Class
}
}
,onClick: function ()
,_onClick: function (event)
{
this.signalEmit ('click', this._form);
event.preventDefault ();
this.signalEmit ('click', this._form, event);
}
});

View File

@ -170,17 +170,18 @@ module.exports = new Class
this._error = true;
}
,_onClick: function ()
,_onClick: function (event)
{
if (!this._fullDir || !this._value || this._error)
if (event.defaultPrevented || !this._fullDir || !this._value || this._error)
return;
(new Htk.FullImage ()).show (this._makeSrc (this._fullDir));
event.preventDefault ();
}
,_onEditClick: function (event)
{
event.stopPropagation ();
event.preventDefault ();
var editor = new Htk.ImageEditor ({conn: this.conn});
editor.setData (this.value, this._directory);

View File

@ -99,7 +99,7 @@ th.cell-radio
}
td.cell-button
{
max-width: 2em;
max-width: 1px;
text-align: center;
}
td.cell-button > button
@ -499,8 +499,6 @@ td.cell-image .htk-image
.htk-assistant > div
{
display: none;
margin-top: 1em;
margin-bottom: 4em;
}
.htk-assistant > div > h2
{
@ -508,7 +506,8 @@ td.cell-image .htk-image
font-style: italic;
font-weight: normal;
font-size: 1.5em;
margin: 0.5em;
padding: 0;
margin: 0;
margin-bottom: 1em;
}
.htk-assistant *
@ -520,8 +519,7 @@ td.cell-image .htk-image
.htk-assistant-bar
{
margin: 0.5em auto;
max-width: 30em;
margin: 0 auto;
position: relative;
}
.htk-assistant-bar img
@ -533,13 +531,19 @@ td.cell-image .htk-image
position: absolute;
width: 1.8em;
top: 0;
padding: 0.3em;
padding: .3em;
border-radius: 0.1em;
margin: -0.3 0;
}
.htk-assistant-bar > img:hover
{
background-color: rgba(1,1,1,0.1);
}
.htk-assistant-bar > img.previous,
.htk-assistant-bar > img.next
{
margin: -0.3em;
}
.htk-assistant-bar > img.previous
{
left: 0;
@ -551,12 +555,12 @@ td.cell-image .htk-image
.htk-assistant-bar > div
{
margin: 0 auto;
padding-top: 0.2em;
}
.htk-assistant-bar > div > img
{
padding: 0.3em 0.2em;
padding: .3em .2em;
width: 1.3em;
display: inline-block;
}
.htk-assistant-bar > div > img:hover
{

49
js/vn/basic-set.js Normal file
View File

@ -0,0 +1,49 @@
var Object = require ('./object');
var Set = require ('./set');
module.exports = new Class
({
Extends: Object
,Implements: Set
,Tag: 'vn-basic-set'
,initialize: function (props)
{
this._params = {};
this.parent (props);
}
/**
* Gets a value from the set.
*
* @param {String} paramName The parameter name
* @return {any} The value
*/
,get: function (paramName)
{
return this._params[paramName];
}
/**
* Sets a value on the set.
*
* @param {String} paramName The parameter name
* @param {any} value The new value
*/
,set: function (paramName, value)
{
this._params[paramName] = value;
this.changed ();
}
/**
* Resets all values.
*/
,reset: function ()
{
this._params = {};
this.changed ();
}
});

View File

@ -34,3 +34,9 @@ module.exports =
input.type = 'number';
}
};
if (!console.warn)
{
console.log (1);
console.warn = console.log;
}

28
js/vn/set.js Normal file
View File

@ -0,0 +1,28 @@
module.exports = new Class
({
/**
* Gets a value from the set.
*
* @param {String} field The field name
* @return {any} The field value
*/
get: function (field) {}
/**
* Sets a value on the set.
*
* @param {String} field The field name
* @param {any} value The new field value
*/
,set: function (field, value) {}
/**
* Emits the 'change' signal on the set.
*/
,changed: function ()
{
this.signalEmit ('change');
}
});

View File

@ -11,6 +11,8 @@ Vn = module.exports = {
,Value : require ('./value')
,Url : require ('./url')
,Mutators : require ('./mutators')
,Set : require ('./set')
,BasicSet : require ('./basic-set')
,Param : require ('./param')
,HashListener : require ('./hash-listener')
,Hash : require ('./hash')

View File

@ -61,8 +61,8 @@ class Query extends Vn\Web\JsonRequest
{
case 1644: // ER_SIGNAL_EXCEPTION
{
$sql = 'SELECT description, #code code '.
'FROM sql_message WHERE code = #code';
$sql = 'SELECT description, #code code
FROM sql_message WHERE code = #code';
$row = $db->getRow ($sql, ['code' => $message]);
break;
}
@ -71,8 +71,8 @@ class Query extends Vn\Web\JsonRequest
if (strpos ($message, 'EXCEPTION') === FALSE)
break;
$sql = 'SELECT description, @err code '.
'FROM sql_message WHERE code = @err';
$sql = 'SELECT description, @err code
FROM sql_message WHERE code = @err';
$row = $db->getRow ($sql);
break;
}