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', 'form': 'account/address',
'address': form.get ('id') '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"/> on-click="onAddAddressClick"/>
</div> </div>
<div id="form" class="address-list"> <div id="form" class="address-list">
<div class="box"> <div class="card list">
<htk-radio-group <htk-radio-group
id="default-address" id="default-address"
column="default_address" column="default_address"
form="user-form"/> form="user-form"/>
<htk-repeater model="addresses" form-id="iter"> <htk-repeater model="addresses" form-id="iter" renderer="repeaterFunc">
<custom> <custom>
<div class="address"> <a id="link" class="list-row" title="_EditAddress">
<div class="actions"> <div class="actions">
<htk-radio <htk-radio
form="iter" form="iter"
@ -49,12 +49,6 @@
tip="_RemoveAddress" tip="_RemoveAddress"
icon="delete" icon="delete"
on-click="onRemoveAddressClick"/> on-click="onRemoveAddressClick"/>
<htk-button
form="iter"
column="id"
tip="_EditAddress"
icon="edit"
on-click="onEditAddressClick"/>
</div> </div>
<p class="important"> <p class="important">
<htk-text form="iter" column="consignee"/> <htk-text form="iter" column="consignee"/>
@ -66,7 +60,7 @@
<htk-text form="iter" column="zip_code"/>, <htk-text form="iter" column="zip_code"/>,
<htk-text form="iter" column="city"/> <htk-text form="iter" column="city"/>
</p> </p>
</div> </a>
</custom> </custom>
</htk-repeater> </htk-repeater>
</div> </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"/> on-click="onReturnClick"/>
</div> </div>
<div id="form" class="address"> <div id="form" class="address">
<div class="box"> <div class="card form">
<div class="form"> <div>
<div class="form-group">
<label><t>Name</t></label> <label><t>Name</t></label>
<htk-entry column="consignee" form="iter"/> <htk-entry column="consignee" form="iter"/>
</div> </div>
<div class="form-group"> <div>
<label><t>Address</t></label> <label><t>Address</t></label>
<htk-entry column="name" form="iter"/> <htk-entry column="name" form="iter"/>
</div> </div>
<div class="form-group"> <div>
<label><t>City</t></label> <label><t>City</t></label>
<htk-entry column="city" form="iter"/> <htk-entry column="city" form="iter"/>
</div> </div>
<div class="form-group"> <div>
<label><t>ZipCode</t></label> <label><t>ZipCode</t></label>
<htk-entry column="zip_code" form="iter"/> <htk-entry column="zip_code" form="iter"/>
</div> </div>
<div class="form-group"> <div>
<label><t>Country</t></label> <label><t>Country</t></label>
<htk-combo> <htk-combo>
<db-param <db-param
@ -73,7 +72,7 @@
</db-model> </db-model>
</htk-combo> </htk-combo>
</div> </div>
<div class="form-group"> <div>
<label><t>Province</t></label> <label><t>Province</t></label>
<htk-combo column="province_id" form="iter"> <htk-combo column="province_id" form="iter">
<db-model property="model"> <db-model property="model">
@ -92,5 +91,4 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</vn> </vn>

View File

@ -15,7 +15,7 @@ Hedera.Conf = new Class
this.$('new-password').value = ''; this.$('new-password').value = '';
this.$('repeat-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.$('old-password').style.display = recoverPass ? 'none' : 'block';
this.$('change-password').show (); this.$('change-password').show ();
@ -56,7 +56,7 @@ Hedera.Conf = new Class
{ {
this.$('change-password').hide (); this.$('change-password').hide ();
Htk.Toast.showMessage (_('Password changed!')); Htk.Toast.showMessage (_('Password changed!'));
this.$('user-form').refresh (); this.$('user').refresh ();
} }
else 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] .conf .form-group input[type=password]
{ {
margin-bottom: 0.5em; margin-bottom: 0.5em;

View File

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

View File

@ -1,36 +1,12 @@
.access-log
.access-log .card
{ {
padding: 1em; max-width: 28em;
}
.access-log .box
{
max-width: 25em;
margin: 0 auto;
}
.access-log .form
{
padding: 2em;
} }
.access-log .form > p .access-log .form > p
{ {
font-size: 1.2em; font-size: 1.2em;
margin: .1em 0; 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> <h1><t>AccessLog</t></h1>
</div> </div>
<div id="form" class="access-log"> <div id="form" class="access-log">
<div class="box"> <div class="card form">
<div class="form">
<p> <p>
<htk-text form="user-form" column="Id_Cliente"/> <htk-text form="user-form" column="Id_Cliente"/>
</p> </p>
@ -35,8 +34,7 @@
<htk-text form="user-form" column="movil"/> <htk-text form="user-form" column="movil"/>
</p> </p>
</div> </div>
</div> <div class="card">
<div class="list box">
<div> <div>
<htk-repeater form-id="iter"> <htk-repeater form-id="iter">
<db-model property="model"> <db-model property="model">
@ -56,7 +54,7 @@
</sql-batch> </sql-batch>
</db-model> </db-model>
<custom> <custom>
<div class="item"> <div class="list-row">
<p> <p>
<htk-text form="iter" column="stamp" format="_%a, %e %b %Y at %T"/> <htk-text form="iter" column="stamp" format="_%a, %e %b %Y at %T"/>
</p> </p>

View File

@ -26,11 +26,11 @@ Hedera.Connections = new Class
this.$('sessions').refresh (); this.$('sessions').refresh ();
} }
,onAccessLogClick: function (button, form) ,repeaterFunc: function (res, form)
{ {
this.hash.set ({ res.$('link').href = this.hash.make ({
'form': 'admin/access-log' 'form': 'admin/access-log',
,'user': form.get ('userId') '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 .action-bar .connections-sum
{ {
padding: .4em; padding: .4em;
@ -16,29 +8,3 @@
border-radius: 0.1em; border-radius: 0.1em;
box-shadow: 0 0 0.4em #666; 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> </div>
<div id="form" class="connections"> <div id="form" class="connections">
<div class="box"> <div class="card list">
<htk-repeater form-id="iter"> <htk-repeater form-id="iter" renderer="repeaterFunc">
<db-model property="model" id="sessions" on-status-changed="onModelStatusChange"> <db-model property="model" id="sessions" on-status-changed="onModelStatusChange">
<custom> <custom>
SELECT vu.user userId, vu.stamp, c.Cliente, s.lastUpdate, SELECT vu.user userId, vu.stamp, c.Cliente, s.lastUpdate,
@ -35,19 +35,15 @@
</custom> </custom>
</db-model> </db-model>
<custom> <custom>
<div class="item"> <a id="link" class="list-row" title="_Access log">
<div class="actions">
<htk-button <htk-button
form="iter" form="iter"
column="id" column="id"
tip="_Supplant user" tip="_Supplant user"
icon="incognito" icon="incognito"
on-click="onChangeUserClick"/> on-click="onChangeUserClick"/>
<htk-button </div>
form="iter"
column="id"
tip="_Access log"
icon="gnome"
on-click="onAccessLogClick"/>
<p class="important"> <p class="important">
<htk-text form="iter" column="Cliente"/> <htk-text form="iter" column="Cliente"/>
</p> </p>
@ -60,7 +56,7 @@
<htk-text form="iter" column="browser"/> <htk-text form="iter" column="browser"/>
<htk-text form="iter" column="version"/> <htk-text form="iter" column="version"/>
</p> </p>
</div> </a>
</custom> </custom>
</htk-repeater> </htk-repeater>
</div> </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"/> on-click="onPreviewClick"/>
</div> </div>
<div id="form" class="items"> <div id="form" class="items">
<div class="box"> <div class="card form">
<div class="form"> <div>
<div class="form-group">
<label><t>Store</t></label> <label><t>Store</t></label>
<htk-combo> <htk-combo>
<vn-param property="param" id="warehouse"/> <vn-param property="param" id="warehouse"/>
@ -23,7 +22,7 @@
</db-model> </db-model>
</htk-combo> </htk-combo>
</div> </div>
<div class="form-group"> <div>
<label><t>Realm</t></label> <label><t>Realm</t></label>
<htk-combo not-null="false"> <htk-combo not-null="false">
<vn-param property="param" id="realm"/> <vn-param property="param" id="realm"/>
@ -35,7 +34,7 @@
</db-model> </db-model>
</htk-combo> </htk-combo>
</div> </div>
<div class="form-group"> <div>
<label><t>Rate</t></label> <label><t>Rate</t></label>
<select id="rate"> <select id="rate">
<option>3</option> <option>3</option>
@ -45,5 +44,4 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</vn> </vn>

View File

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

View File

@ -3,7 +3,7 @@
<h1><t>ControlPanel</t></h1> <h1><t>ControlPanel</t></h1>
</div> </div>
<div id="form" class="cpanel"> <div id="form" class="cpanel">
<div class="box"> <div class="card list">
<htk-repeater form-id="iter" renderer="repeaterFunc"> <htk-repeater form-id="iter" renderer="repeaterFunc">
<db-model property="model"> <db-model property="model">
<custom> <custom>
@ -12,7 +12,7 @@
</custom> </custom>
</db-model> </db-model>
<custom> <custom>
<a id="link" class="item" target="_blank"> <a id="link" class="list-row" target="_blank">
<htk-image <htk-image
form="iter" form="iter"
column="image" 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 .photos iframe
{ {
display: none; display: none;
@ -23,9 +9,9 @@
.photos input[type=submit] .photos input[type=submit]
{ {
display: block; display: block;
margin: 0 auto;
padding: 0.6em;
margin-top: 1.5em; margin-top: 1.5em;
margin-left: auto;
margin-right: auto;
font-size: 1.2em; font-size: 1.2em;
} }

View File

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

View File

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

View File

@ -13,8 +13,8 @@
on-click="_onCleanClick"/> on-click="_onCleanClick"/>
</div> </div>
<div id="form" class="queries"> <div id="form" class="queries">
<div class="box form"> <div class="card form">
<div class="form-group"> <div>
<label><t>SQL query</t></label> <label><t>SQL query</t></label>
<textarea <textarea
id="sql" id="sql"
@ -22,16 +22,16 @@
autocapitalize="off" autocapitalize="off"
spellcheck="false"/> spellcheck="false"/>
</div> </div>
<div class="form-group"> <div>
<label><t>Result index</t></label> <label><t>Result index</t></label>
<htk-spin id="result-index"/> <htk-spin id="result-index"/>
</div> </div>
<div class="form-group"> <div>
<label><t>Updatable</t></label> <label><t>Updatable</t></label>
<htk-check id="updatable"/> <htk-check id="updatable"/>
</div> </div>
</div> </div>
<div class="box result"> <div class="card result">
<div id="grid-holder"/> <div id="grid-holder"/>
</div> </div>
</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 JOIN vn2008.Tipos t ON t.tipo_id = c.family
</custom> </custom>
</db-model> </db-model>
<vn-basic-set id="set"/>
</vn-group> </vn-group>
<div id="title"> <div id="title">
<h1><t>Shelves</t></h1> <h1><t>Shelves</t></h1>
</div> </div>
<div id="actions" class="action-bar"> <div id="actions">
<htk-bar-button <htk-bar-button
icon="print" icon="print"
tip="_Preview" tip="_Preview"
on-click="onPreviewClick"/> on-click="onPreviewClick"/>
</div> </div>
<div id="form" class="shelves"> <div id="form" class="shelves">
<div class="box"> <div class="card form">
<div class="form"> <div>
<div class="form-group">
<label><t>Configuration</t></label> <label><t>Configuration</t></label>
<htk-combo <htk-combo
id="config" id="config"
@ -30,11 +30,11 @@
on-changed="onConfigChange" on-changed="onConfigChange"
on-ready="onConfigChange"/> on-ready="onConfigChange"/>
</div> </div>
<div class="form-group"> <div>
<label><t>Date</t></label> <label><t>Date</t></label>
<htk-date-chooser id="date"/> <htk-date-chooser id="date"/>
</div> </div>
<div class="form-group"> <div>
<label><t>Reign</t></label> <label><t>Reign</t></label>
<htk-combo id="realm"> <htk-combo id="realm">
<db-model property="model" id="realms"> <db-model property="model" id="realms">
@ -45,7 +45,7 @@
</db-model> </db-model>
</htk-combo> </htk-combo>
</div> </div>
<div class="form-group"> <div>
<label><t>Family</t></label> <label><t>Family</t></label>
<htk-combo id="family"> <htk-combo id="family">
<db-model property="model"> <db-model property="model">
@ -61,10 +61,10 @@
</db-model> </db-model>
</htk-combo> </htk-combo>
</div> </div>
<div class="form-group"> <div>
<label><t>Store</t></label> <label><t>Store</t></label>
<htk-combo id="warehouse"> <htk-combo id="warehouse">
<db-model property="model" id="warehouses"> <db-model property="model">
<custom> <custom>
SELECT id, name FROM vn2008.warehouse SELECT id, name FROM vn2008.warehouse
WHERE reserve ORDER BY name WHERE reserve ORDER BY name
@ -72,41 +72,40 @@
</db-model> </db-model>
</htk-combo> </htk-combo>
</div> </div>
<div class="form-group"> <div>
<label><t>Shelf</t></label> <label><t>Shelf</t></label>
<htk-combo id="shelf"> <htk-combo id="shelf">
<db-model property="model" id="shelves"> <db-model property="model">
<custom> <custom>
SELECT id, name FROM shelf SELECT id, name FROM shelf
</custom> </custom>
</db-model> </db-model>
</htk-combo> </htk-combo>
</div> </div>
<div class="form-group"> <div>
<label><t>Name prefix</t></label> <label><t>Name prefix</t></label>
<htk-entry id="namePrefix"/> <htk-entry id="namePrefix"/>
</div> </div>
<div class="form-group"> <div>
<label><t>Limit amount per item</t></label> <label><t>Limit amount per item</t></label>
<htk-entry id="maxAmount"/> <htk-entry id="maxAmount"/>
</div> </div>
<div class="form-group"> <div>
<label><t>Title</t></label> <label><t>Title</t></label>
<htk-entry id="reportTitle"/> <htk-entry id="reportTitle"/>
</div> </div>
<div class="form-group"> <div>
<label><t>Show packing</t></label> <label><t>Show packing</t></label>
<htk-check id="showPacking"/> <htk-check id="showPacking"/>
</div> </div>
<div class="form-group"> <div>
<label><t>Stack different items</t></label> <label><t>Stack different items</t></label>
<htk-check id="stack"/> <htk-check id="stack"/>
</div> </div>
<div class="form-group"> <div>
<label><t>Use ids instead of names</t></label> <label><t>Use ids instead of names</t></label>
<htk-check id="useIds"/> <htk-check id="useIds"/>
</div> </div>
</div> </div>
</div> </div>
</div>
</vn> </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 .action-bar .htk-search-entry
{ {
margin: .8em .6em; margin: .8em;
} }

View File

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

View File

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

View File

@ -1,46 +1,13 @@
.visits
.visits .card
{ {
padding: 1em; max-width: 28em;
}
.visits .box
{
max-width: 25em;
margin: 0 auto;
}
.visits .form
{
padding: 1.5em;
max-width: 20em;
}
.visits .summary
{
margin-top: 1em;
} }
.visits .summary p .visits .summary p
{ {
padding: 1.5em; margin: 0;
font-size: 1.4em; font-size: 1.4em;
text-align: right; 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"/> on-click="onSessionsClick"/>
</div> </div>
<div id="form" class="visits"> <div id="form" class="visits">
<div class="box"> <div class="card form">
<div class="form"> <div>
<div class="form-group">
<label><t>From</t></label> <label><t>From</t></label>
<htk-date-chooser> <htk-date-chooser>
<vn-param property="param" id="from"/> <vn-param property="param" id="from"/>
</htk-date-chooser> </htk-date-chooser>
</div> </div>
<div class="form-group"> <div>
<label><t>To</t></label> <label><t>To</t></label>
<htk-date-chooser> <htk-date-chooser>
<vn-param property="param" id="to"/> <vn-param property="param" id="to"/>
</htk-date-chooser> </htk-date-chooser>
</div> </div>
</div> </div>
</div> <div class="summary card form">
<div class="summary box">
<p> <p>
<htk-text> <htk-text>
<db-calc-sum <db-calc-sum
@ -47,7 +45,7 @@
<t>news</t> <t>news</t>
</p> </p>
</div> </div>
<div class="list box"> <div class="card list ">
<htk-repeater form-id="iter" empty-message="_Select date interval"> <htk-repeater form-id="iter" empty-message="_Select date interval">
<db-model property="model" id="visits"> <db-model property="model" id="visits">
<custom> <custom>
@ -72,7 +70,7 @@
</sql-batch> </sql-batch>
</db-model> </db-model>
<custom> <custom>
<div class="item"> <div class="list-row">
<p class="important"> <p class="important">
<htk-text form="iter" column="browser"/> <htk-text form="iter" column="browser"/>
<htk-text form="iter" column="minVersion"/> - <htk-text form="iter" column="minVersion"/> -

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,11 +1,3 @@
.orders
{
padding: 1em;
}
.orders .box
{
max-width: 25em;
}
/* Balance */ /* Balance */
@ -48,25 +40,7 @@
/* List */ /* List */
.orders .item .orders .list-row > p.total
{
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
{ {
float: right; float: right;
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,32 +1,12 @@
.news
.news .card
{ {
padding: 1em; max-width: 30em;
}
.news .box
{
max-width: 35em;
margin: 0 auto;
} }
/* Items */ /* Items */
.news .item .news .list-row > .photo
{
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
{ {
float: left; float: left;
margin-right: 1em; margin-right: 1em;
@ -34,8 +14,3 @@
width: 4.2em; width: 4.2em;
border-radius: .3em; border-radius: .3em;
} }
.news .item > button
{
float: right;
margin: 0;
}

View File

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

View File

@ -21,7 +21,7 @@ module.exports = new Class
/** /**
* Gets the query error. * 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 () ,getError: function ()
{ {

View File

@ -331,23 +331,31 @@ img.editable
clear: both !important; clear: both !important;
} }
/* Box */ /* Margin */
.box .padding
{ {
padding: 2em;
}
/* Card */
.card
{
margin: 1em auto;
background-color: white; background-color: white;
margin: 0 auto;
border-radius: 0.1em; border-radius: 0.1em;
box-shadow: 0 0.2em 0.2em #CCC; box-shadow: 0 0.2em 0.2em #CCC;
box-sizing: border-box;
} }
.box .header .card .header
{ {
padding: 0.6em 0.8em; padding: 0.6em 0.8em;
margin: 0; margin: 0;
background-color: #009688; background-color: #009688;
color: white; color: white;
} }
.box .header > h1 .card .header > h1
{ {
color: white; color: white;
text-align: left; text-align: left;
@ -356,7 +364,7 @@ img.editable
font-weight: normal; font-weight: normal;
display: inline; display: inline;
} }
.box .body .card .body
{ {
padding: 2em; padding: 2em;
} }
@ -365,34 +373,104 @@ img.editable
.form .form
{ {
margin: 0 auto; max-width: 30em;
} }
.form-group .form-group,
.form > div
{ {
margin-bottom: 1.2em; margin-bottom: 1.2em;
} }
.form-group:last-child .form-group:last-child,
.form > :last-child
{ {
margin-bottom: 0; margin-bottom: 0;
} }
.form-group > label .form-group > label,
.form > div > label
{ {
display: block; display: block;
margin: 0; margin: 0;
margin-bottom: .2em; margin-bottom: .2em;
font-size: .9em; font-size: .9em;
color: #222; color: #666;
} }
.form-group > input[type=text], .form-group > input[type=text],
.form-group > input[type=password], .form-group > input[type=password],
.form-group > input[type=file], .form-group > input[type=file],
.form-group > input[type=number], .form-group > input[type=number],
.form-group > select, .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; margin: 0;
width: 100%; 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 */ /* Form */

View File

@ -42,7 +42,7 @@ module.exports = new Class
var button = this.createElement ('button'); var button = this.createElement ('button');
button.addEventListener ('click', button.addEventListener ('click',
this.buttonClicked.bind (this, this.value, tr, button)); this._onClick.bind (this, this.value, tr, button));
td.appendChild (button); td.appendChild (button);
var img = this.createElement ('img'); var img = this.createElement ('img');
@ -58,8 +58,9 @@ module.exports = new Class
return td; 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'); var node = this.createRoot ('button');
node.className = 'htk-button'; node.className = 'htk-button';
node.addEventListener ('click', this.onClick.bind (this)); node.addEventListener ('click', this._onClick.bind (this));
this.img = this.createElement ('img'); this.img = this.createElement ('img');
node.appendChild (this.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; 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; return;
(new Htk.FullImage ()).show (this._makeSrc (this._fullDir)); (new Htk.FullImage ()).show (this._makeSrc (this._fullDir));
event.preventDefault ();
} }
,_onEditClick: function (event) ,_onEditClick: function (event)
{ {
event.stopPropagation (); event.preventDefault ();
var editor = new Htk.ImageEditor ({conn: this.conn}); var editor = new Htk.ImageEditor ({conn: this.conn});
editor.setData (this.value, this._directory); editor.setData (this.value, this._directory);

View File

@ -99,7 +99,7 @@ th.cell-radio
} }
td.cell-button td.cell-button
{ {
max-width: 2em; max-width: 1px;
text-align: center; text-align: center;
} }
td.cell-button > button td.cell-button > button
@ -499,8 +499,6 @@ td.cell-image .htk-image
.htk-assistant > div .htk-assistant > div
{ {
display: none; display: none;
margin-top: 1em;
margin-bottom: 4em;
} }
.htk-assistant > div > h2 .htk-assistant > div > h2
{ {
@ -508,7 +506,8 @@ td.cell-image .htk-image
font-style: italic; font-style: italic;
font-weight: normal; font-weight: normal;
font-size: 1.5em; font-size: 1.5em;
margin: 0.5em; padding: 0;
margin: 0;
margin-bottom: 1em; margin-bottom: 1em;
} }
.htk-assistant * .htk-assistant *
@ -520,8 +519,7 @@ td.cell-image .htk-image
.htk-assistant-bar .htk-assistant-bar
{ {
margin: 0.5em auto; margin: 0 auto;
max-width: 30em;
position: relative; position: relative;
} }
.htk-assistant-bar img .htk-assistant-bar img
@ -533,13 +531,19 @@ td.cell-image .htk-image
position: absolute; position: absolute;
width: 1.8em; width: 1.8em;
top: 0; top: 0;
padding: 0.3em; padding: .3em;
border-radius: 0.1em; border-radius: 0.1em;
margin: -0.3 0;
} }
.htk-assistant-bar > img:hover .htk-assistant-bar > img:hover
{ {
background-color: rgba(1,1,1,0.1); 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 .htk-assistant-bar > img.previous
{ {
left: 0; left: 0;
@ -551,12 +555,12 @@ td.cell-image .htk-image
.htk-assistant-bar > div .htk-assistant-bar > div
{ {
margin: 0 auto; margin: 0 auto;
padding-top: 0.2em;
} }
.htk-assistant-bar > div > img .htk-assistant-bar > div > img
{ {
padding: 0.3em 0.2em; padding: .3em .2em;
width: 1.3em; width: 1.3em;
display: inline-block;
} }
.htk-assistant-bar > div > img:hover .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'; 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') ,Value : require ('./value')
,Url : require ('./url') ,Url : require ('./url')
,Mutators : require ('./mutators') ,Mutators : require ('./mutators')
,Set : require ('./set')
,BasicSet : require ('./basic-set')
,Param : require ('./param') ,Param : require ('./param')
,HashListener : require ('./hash-listener') ,HashListener : require ('./hash-listener')
,Hash : require ('./hash') ,Hash : require ('./hash')

View File

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