Los formularios ahora son responsive

This commit is contained in:
Juan Ferrer Toribio 2015-12-02 18:26:58 +01:00
parent c21a0dae60
commit 63342ba25b
38 changed files with 610 additions and 317 deletions

View File

@ -5,7 +5,7 @@
}
.address-list .box
{
max-width: 40em;
max-width: 30em;
}
.address-list .form
{
@ -15,19 +15,30 @@
}
.address
{
color: #555;
padding: .5em;
}
.address p.consignee
{
font-weight: bold;
padding: 1em;
border-bottom: 1px solid #DDD;
}
.address p
{
font-size: 1.4em;
margin: 0.2em 0;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.address p.important
{
font-size: 1.2em;
}
.address .actions
{
text-align: right;
float: right;
}
.address .actions > *
{
display: inline-block;
vertical-align: middle;
}
.address .actions > input
{
margin: .6em;
}

View File

@ -31,47 +31,45 @@
</div>
<div id="form" class="address-list">
<div class="box">
<div class="form">
<htk-radio-group
id="default-address"
column="default_address"
form="user-form"/>
<htk-repeater model="addresses" form-id="iter">
<custom>
<div class="address">
<p class="consignee">
<htk-text form="iter" column="consignee"/>
</p>
<p>
<htk-text form="iter" column="name"/>
</p>
<p>
<htk-text form="iter" column="zip_code"/>,
<htk-text form="iter" column="city"/>
</p>
<div class="actions">
<htk-radio
form="iter"
column="id"
radio-group="default-address"
tip="_SetAsDefault"/>
<htk-button
form="iter"
column="id"
tip="_RemoveAddress"
image="image/delete.svg"
on-click="onRemoveAddressClick"/>
<htk-button
form="iter"
column="id"
tip="_EditAddress"
image="image/edit.svg"
on-click="onEditAddressClick"/>
</div>
<htk-radio-group
id="default-address"
column="default_address"
form="user-form"/>
<htk-repeater model="addresses" form-id="iter">
<custom>
<div class="address">
<div class="actions">
<htk-radio
form="iter"
column="id"
radio-group="default-address"
tip="_SetAsDefault"/>
<htk-button
form="iter"
column="id"
tip="_RemoveAddress"
image="image/delete.svg"
on-click="onRemoveAddressClick"/>
<htk-button
form="iter"
column="id"
tip="_EditAddress"
image="image/edit.svg"
on-click="onEditAddressClick"/>
</div>
</custom>
</htk-repeater>
</div>
<p class="important">
<htk-text form="iter" column="consignee"/>
</p>
<p>
<htk-text form="iter" column="name"/>
</p>
<p>
<htk-text form="iter" column="zip_code"/>,
<htk-text form="iter" column="city"/>
</p>
</div>
</custom>
</htk-repeater>
</div>
</div>
</vn>

View File

@ -5,15 +5,15 @@
}
.address .box
{
max-width: 40em;
max-width: 30em;
padding: 2em;
}
.address .box .body
.address .form
{
margin: 0 auto;
max-width: 25em;
padding: 3em;
}
div.form-group
.address .form-group
{
padding: 0.4em;
}

View File

@ -36,7 +36,7 @@
</div>
<div id="form" class="address">
<div class="box">
<div class="body">
<div class="form">
<div class="form-group">
<label><t>Name</t></label>
<htk-entry column="consignee" form="iter"/>

View File

@ -5,13 +5,13 @@
}
.conf .box
{
max-width: 40em;
max-width: 30em;
padding: 2em;
}
.conf .form
{
margin: 0 auto;
max-width: 25em;
padding: 2em;
}
.conf .form-group
{

View File

@ -1,15 +1,36 @@
.access-log
{
padding: 1em;
min-width: 35em;
}
.access-log .box
{
max-width: 50em;
max-width: 25em;
margin: 0 auto;
}
.access-log .htk-grid tbody tr
.access-log .form
{
height: 3.4em;
padding: 2em;
}
.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

@ -1,14 +1,17 @@
<vn>
<vn-group>
<vn-hash-param key="user">
<vn-param id="user"/>
</vn-hash-param>
<vn-param id="user"/>
<vn-hash-param key="user" param="user"/>
<db-form id="user-form">
<db-model>
SELECT Id_Cliente, Cliente, Telefono, movil
FROM vn2008.Clientes WHERE Id_Cliente = #user
<db-model property="model">
<custom>
SELECT Id_Cliente, Cliente, Telefono, movil
FROM vn2008.Clientes WHERE Id_Cliente = #user
</custom>
<sql-batch property="batch">
<item name="user" param="user"/>
<custom>
<item name="user" param="user"/>
</custom>
</sql-batch>
</db-model>
</db-form>
@ -18,63 +21,57 @@
</div>
<div id="form" class="access-log">
<div class="box">
<table class="form">
<tbody>
<tr>
<td class="label">
<label><t>UserNumber:</t></label>
</td>
<td>
<htk-text column="Id_Cliente" form="user-form"/>
</td>
</tr>
<tr>
<td class="label">
<label><t>User:</t></label>
</td>
<td>
<htk-text column="Cliente" form="user-form"/>
</td>
</tr>
<tr>
<td class="label">
<label><t>Phone:</t></label>
</td>
<td>
<htk-text column="Telefono" form="user-form"/>
</td>
</tr>
<tr>
<td class="label">
<label><t>Mobile:</t></label>
</td>
<td>
<htk-text column="movil" form="user-form"/>
</td>
</tr>
</tbody>
</table>
<div class="form">
<p>
<htk-text form="user-form" column="Id_Cliente"/>
</p>
<p>
<htk-text form="user-form" column="Cliente"/>
</p>
<p>
<htk-text form="user-form" column="Telefono"/>
</p>
<p>
<htk-text form="user-form" column="movil"/>
</p>
</div>
</div>
<div class="list box">
<div>
<htk-grid>
<db-model>
SELECT u.date_time, a.platform, a.browser, a.version, a.javascript, a.cookies
FROM visit_user u
JOIN visit_access c ON u.access_id = c.id
JOIN visit_agent a ON c.agent_id = a.id
WHERE u.user_id = #user
ORDER BY u.date_time DESC
LIMIT 30
<htk-repeater form-id="iter">
<db-model property="model">
<custom>
SELECT u.date_time, a.platform, a.browser, a.version, a.javascript, a.cookies
FROM visit_user u
JOIN visit_access c ON u.access_id = c.id
JOIN visit_agent a ON c.agent_id = a.id
WHERE u.user_id = #user
ORDER BY u.date_time DESC
LIMIT 8
</custom>
<sql-batch property="batch">
<item name="user" param="user"/>
<custom>
<item name="user" param="user"/>
</custom>
</sql-batch>
</db-model>
<htk-column-date title="_Access" column="date_time" format="_%a, %e %b %Y at %T"/>
<htk-column-text title="_SO" column="platform"/>
<htk-column-text title="_Browser" column="browser"/>
<htk-column-text title="_Version" column="version"/>
<htk-column-check title="_Javascript" column="javascript"/>
<htk-column-check title="_Cookies" column="cookies"/>
</htk-grid>
<custom>
<div class="item">
<p>
<htk-text form="iter" column="date_time" format="_%a, %e %b %Y at %T"/>
</p>
<p>
<htk-text form="iter" column="platform"/>,
<htk-text form="iter" column="browser"/>
<htk-text form="iter" column="version"/>
</p>
<!-- <p>
<htk-text form="iter" column="javascript"/>,
<htk-text form="iter" column="cookies"/>
</p>
--> </div>
</custom>
</htk-repeater>
</div>
</div>
</div>

View File

@ -5,14 +5,13 @@
}
.items .box
{
max-width: 40em;
max-width: 30em;
padding: 2em;
}
.items .body
.items .form
{
max-width: 20em;
max-width: 25em;
margin: auto;
padding: 0;
}
.items .form-group
{

View File

@ -4,7 +4,7 @@
</div>
<div id="form" class="items">
<div class="box">
<div class="body">
<div class="form">
<div class="form-group">
<label><t>Store</t></label>
<htk-combo>

View File

@ -3,14 +3,9 @@ Vn.Links = new Class
({
Extends: Vn.Form
,activate: function ()
,repeaterFunc: function (res, form)
{
this.$('column-link').renderer = this.linkRenderer;
}
,linkRenderer: function (column, form)
{
column.href = form.get ('link');
res.$('link').href = form.get ('link');
}
});

View File

@ -5,14 +5,34 @@
}
.cpanel .box
{
max-width: 60em;
min-width: 25em;
max-width: 30em;
}
.cpanel tbody tr
/* Items */
.cpanel .item
{
height: 3.5em;
display: block;
padding: 1em;
border-bottom: 1px solid #DDD;
}
.cpanel tbody td img
.cpanel .item:hover
{
min-height: 1.6em;
background-color: rgba(1, 1, 1, 0.05);
}
.cpanel .item > img
{
margin: .2em 0;
margin-right: 1em;
float: left;
max-height: 3em;
max-width: 3em;
}
.cpanel .item > p
{
margin: .1em 0;
}
.cpanel .item > p.important
{
font-size: 1.2em;
}

View File

@ -4,17 +4,29 @@
</div>
<div id="form" class="cpanel">
<div class="box">
<htk-grid show-header="false">
<htk-repeater form-id="iter" renderer="repeaterFunc">
<db-model property="model">
<custom>
SELECT image, name, description, link FROM link
ORDER BY name
</custom>
</db-model>
<htk-column-image directory="link" subdir="full" column="image"/>
<htk-column-link column="name" target="\_blank" id="column-link"/>
<htk-column-text column="description"/>
</htk-grid>
<custom>
<a id="link" class="item" target="_blank">
<htk-image
form="iter"
column="image"
directory="link"
subdir="full"/>
<p class="important">
<htk-text form="iter" column="name"/>
</p>
<p>
<htk-text form="iter" column="description"/>
</p>
</a>
</custom>
</htk-repeater>
</div>
</div>
</vn>

View File

@ -5,9 +5,10 @@
}
.photos .box
{
max-width: 40em;
max-width: 30em;
padding: 2em;
}
.photos form
.photos .form
{
margin: 0 auto;
max-width: 25em;

View File

@ -4,7 +4,7 @@
</div>
<div id="form" class="photos">
<div class="box">
<div class="body">
<div class="form">
<form
id="html-form"
method="post"
@ -33,7 +33,7 @@
<input type="file" name="image"/>
<input type="hidden" name="MAX_FILE_SIZE" id="photo-size"/>
</div>
<button class="flat" id="submit">
<button class="thin" id="submit">
<t>Upload</t>
</button>
</form>

View File

@ -5,14 +5,13 @@
}
.shelves .box
{
max-width: 40em;
max-width: 30em;
padding: 2em;
}
.shelves .body
.shelves .form
{
max-width: 20em;
max-width: 25em;
margin: auto;
padding: 0;
}
.shelves .form-group
{

View File

@ -14,7 +14,7 @@
</div>
<div id="form" class="shelves">
<div class="box">
<div class="body">
<div class="form">
<div class="form-group">
<label><t>Configuration</t></label>
<htk-combo

View File

@ -35,13 +35,13 @@
form="iter"
column="id"
tip="_AccessAsUser"
image="image/gnome.svg"
image="image/incognito.svg"
on-click="onChangeUserClick"/>
<htk-button
form="iter"
column="id"
tip="_AccessLog"
image="image/access-log.svg"
image="image/gnome.svg"
on-click="onAccessLogClick"/>
<p class="important">
<htk-text form="iter" column="Cliente"/>

View File

@ -3,11 +3,11 @@ Vn.Users = new Class
({
Extends: Vn.Form
,onAccessLogClick: function (column, value)
,onAccessLogClick: function (button, form)
{
this.hash.set ({
'form': 'admin/access-log'
,'user': value
,'user': form.get ('id')
});
}

View File

@ -5,13 +5,25 @@
}
.visits .box
{
max-width: 80em;
max-width: 60em;
margin: 0 auto;
}
.visits .conns-form
{
padding: 1.5em;
font-size: 1.4em;
text-align: right;
}
.visits .form
{
padding: 2em;
max-width: 25em;
}
/* Steps */
div.step
.visits .step
{
display: none;
}

View File

@ -22,118 +22,95 @@
<div id="form" class="visits">
<div class="box">
<div class="step" id="sessions-step">
<table class="form">
<tbody>
<tr>
<td class="label">
<label><t>ActiveSessions:</t></label>
</td>
<td>
<htk-label>
<db-calc-sum model="sessions" id="num-sessions"/>
</htk-label>
</td>
</tr>
<tr>
<td class="label">
<label><t>NewVisitsTotal:</t></label>
</td>
<td>
<htk-label>
<db-calc-sum model="sessions" column-name="is_new"/>
</htk-label>
</td>
</tr>
</tbody>
</table>
<div class="conns-form">
<htk-text>
<db-calc-sum
property="param"
model="sessions"
id="num-sessions"/>
</htk-text>
<t>active sessions</t>
</div>
<div>
<htk-grid>
<db-model id="sessions">
SELECT s.id, c.Cliente, e.date_time login, is_new,
s.date_time last_activity, a.platform, a.browser, a.version
FROM user_session s
JOIN visit_user e ON s.visit_user_id = e.id
JOIN visit_access c ON e.access_id = c.id
JOIN visit_agent a ON c.agent_id = a.id
JOIN visit v ON a.visit_id = v.id
JOIN account.user u ON e.user_id = u.id
JOIN vn2008.Clientes c ON e.user_id = c.Id_cliente
ORDER BY last_activity DESC
<db-model property="model" id="sessions">
<custom>
SELECT s.id, c.Cliente, e.date_time login, is_new,
s.date_time last_activity, a.platform, a.browser, a.version
FROM user_session s
JOIN visit_user e ON s.visit_user_id = e.id
JOIN visit_access c ON e.access_id = c.id
JOIN visit_agent a ON c.agent_id = a.id
JOIN visit v ON a.visit_id = v.id
JOIN account.user u ON e.user_id = u.id
JOIN vn2008.Clientes c ON e.user_id = c.Id_cliente
ORDER BY last_activity DESC
</custom>
</db-model>
<htk-column-spin title="_SessionNumber" column="id"/>
<htk-column-text title="_User" column="Cliente"/>
<htk-column-date title="_Login" column="login" format="%a, %T"/>
<htk-column-date title="_LastActivity" column="last_activity" format="%a, %T"/>
<htk-column-date title="_LastActivity" column="last_activity" format="%T"/>
<htk-column-text title="_SO" column="platform"/>
<htk-column-text title="_Browser" column="browser"/>
<htk-column-text title="_Version" column="version"/>
<htk-column-check title="_NewVisit" column="is_new"/>
</htk-grid>
</div>
</div>
<div class="step" id="visits-step">
<table class="form">
<tbody>
<tr>
<td class="label">
<label><t>FromDate:</t></label>
</td>
<td>
<htk-date-chooser>
<vn-param id="date-from"/>
</htk-date-chooser>
</td>
</tr>
<tr>
<td class="label">
<label><t>ToDate:</t></label>
</td>
<td>
<htk-date-chooser>
<vn-param id="date-to"/>
</htk-date-chooser>
</td>
</tr>
<tr>
<td class="label">
<label><t>VisitsTotal:</t></label>
</td>
<td>
<htk-label>
<db-calc-sum model="visits" column-name="visits"/>
</htk-label>
</td>
</tr>
<tr>
<td class="label">
<label><t>NewVisitsTotal:</t></label>
</td>
<td>
<htk-label>
<db-calc-sum model="visits" column-name="new_visits"/>
</htk-label>
</td>
</tr>
</tbody>
</table>
<div class="form">
<div class="form-group">
<label><t>FromDate:</t></label>
<htk-date-chooser>
<vn-param property="param" id="date-from"/>
</htk-date-chooser>
</div>
<div class="form-group">
<label><t>ToDate:</t></label>
<htk-date-chooser>
<vn-param property="param" id="date-to"/>
</htk-date-chooser>
</div>
<div class="form-group">
<t>VisitsTotal:</t>
<htk-text>
<db-calc-sum
property="param"
model="visits"
column-name="visits"/>
</htk-text>
</div>
<div class="form-group">
<t>NewVisitsTotal:</t>
<htk-text>
<db-calc-sum
property="param"
model="visits"
column-name="new_visits"/>
</htk-text>
</div>
</div>
<div>
<htk-grid empty-message="SelectDateInterval">
<db-model id="visits">
SELECT browser
,MIN(CAST(version AS DECIMAL(4,1))) min_version
,MAX(CAST(version AS DECIMAL(4,1))) max_version
,MAX(e.date_time) last_visit
,COUNT(DISTINCT c.id) visits
,SUM(is_new) new_visits
FROM visit_user e
JOIN visit_access c ON e.access_id = c.id
JOIN visit_agent a ON c.agent_id = a.id
JOIN visit v ON a.visit_id = v.id
WHERE e.date_time BETWEEN TIMESTAMP(#from,'00:00:00') AND TIMESTAMP(#to,'23:59:59')
GROUP BY browser ORDER BY visits DESC
<db-model property="model" id="visits">
<custom>
SELECT browser
,MIN(CAST(version AS DECIMAL(4,1))) min_version
,MAX(CAST(version AS DECIMAL(4,1))) max_version
,MAX(e.date_time) last_visit
,COUNT(DISTINCT c.id) visits
,SUM(is_new) new_visits
FROM visit_user e
JOIN visit_access c ON e.access_id = c.id
JOIN visit_agent a ON c.agent_id = a.id
JOIN visit v ON a.visit_id = v.id
WHERE e.date_time BETWEEN TIMESTAMP(#from,'00:00:00') AND TIMESTAMP(#to,'23:59:59')
GROUP BY browser ORDER BY visits DESC
</custom>
<sql-batch property="batch">
<item name="from" param="date-from"/>
<item name="to" param="date-to"/>
<custom>
<item name="from" param="date-from"/>
<item name="to" param="date-to"/>
</custom>
</sql-batch>
</db-model>
<htk-column-text title="_Browser" column="browser"/>

View File

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

View File

@ -4,7 +4,7 @@
</div>
<div id="form" class="contact">
<div class="box">
<div class="body">
<div class="form">
<p>
<t>FillFormData</t>
</p>

View File

@ -54,6 +54,7 @@
margin-right: 1em;
float: left;
border-radius: 50%;
height: 3.2em;
}
.basket-line > p
{

View File

@ -28,8 +28,8 @@
SELECT i.id, i.amount, i.price, a.Article, a.Categoria,
a.Medida, a.Tallos, a.Color, o.Abreviatura, a.Foto
FROM basket_item i
JOIN vn2008.Articles a ON a.Id_Article = i.item_id
LEFT JOIN vn2008.Origen o ON a.id_origen = o.id
JOIN vn2008.Articles a ON a.Id_Article = i.item_id
LEFT JOIN vn2008.Origen o ON a.id_origen = o.id
</custom>
</db-model>
<custom>
@ -38,7 +38,7 @@
form="iter"
column="ticket_id"
class="delete"
tip="_SeeOrder"
tip="_Remove"
image="image/delete.svg"
on-click="onDeleteClick"/>
<htk-image
@ -46,7 +46,7 @@
column="Foto"
class="photo"
directory="catalog"
subdir="50x50"
subdir="200x200"
show-full="true"
full-dir="900x900"/>
<p class="concept">

View File

@ -12,10 +12,10 @@ Vn.Orders = new Class
{
this.hash.set ({'form': 'ecomerce/basket'});
}
,onShowClick: function (button, form)
,repeaterFunc: function (res, form)
{
this.hash.set ({
res.$('link').href = this.hash.make ({
'form': 'ecomerce/ticket',
'ticket': form.get ('ticket_id')
});
@ -34,7 +34,7 @@ Vn.Orders = new Class
,onPayButtonClick: function ()
{
var company = 442;
var amount = this.$('debt').value;
var amount = -this.$('debt').value;
amount = amount <= 0 ? null : amount;

View File

@ -4,7 +4,7 @@
}
.orders .box
{
max-width: 30em;
max-width: 25em;
}
/* Balance */
@ -48,22 +48,22 @@
/* List */
.order-box
.orders .item
{
display: block;
padding: 1em;
border-bottom: 1px solid #DDD;
}
.order-box > p
.orders .item:hover
{
background-color: rgba(1, 1, 1, 0.05);
}
.orders .item > p
{
margin: .1em 0;
}
.order-box > p.important
.orders .item > p.important
{
font-size: 1.2em;
}
.order-box > .show-order
{
margin: 1.6em .5em;
float: right;
}

View File

@ -3,7 +3,7 @@
<db-model id="debt-model" result-index="1">
<custom>
CALL customer_get_debt_by_company ();
SELECT * FROM t_customer_debt;
SELECT -amount amount FROM t_customer_debt;
DROP TEMPORARY TABLE t_customer_debt;
</custom>
</db-model>
@ -45,21 +45,14 @@
</div>
<div id="form" class="orders">
<div class="box confirmed">
<htk-repeater form-id="iter">
<htk-repeater form-id="iter" renderer="repeaterFunc">
<db-model property="model" id="tickets">
<custom>
CALL ticket_list ();
</custom>
</db-model>
<custom>
<div class="order-box">
<htk-button
class="show-order"
form="iter"
column="ticket_id"
tip="_SeeOrder"
image="image/show.svg"
on-click="onShowClick"/>
<a id="link" class="item" title="_SeeOrder">
<p class="important">
<htk-text form="iter" column="date" format="%A, %e of %B"/>
</p>
@ -73,7 +66,7 @@
<htk-text form="iter" column="total" format="%.2d€"/>
</p>
<div class="clear"/>
</div>
</a>
</custom>
</htk-repeater>
</div>

View File

@ -5,15 +5,14 @@
}
.new .box
{
max-width: 50em;
margin: 0 auto;
max-width: 35em;
padding: 2em;
}
/* Form */
.new .form
{
padding: 2em;
}
.new textarea
{

View File

@ -11,9 +11,15 @@ Vn.News = new Class
});
}
,onEditClick: function (column, newId)
,onEditClick: function (button, form)
{
this.editNew (newId);
this.editNew (button.value);
}
,onDeleteClick: function (button, form)
{
if (confirm (_('ReallyDelete')))
form.deleteRow ();
}
,onAddClick: function ()

View File

@ -1,10 +1,47 @@
.news
{
padding: 1em;
min-width: 35em;
}
.news .box
{
max-width: 60em;
max-width: 35em;
margin: 0 auto;
}
/* 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
{
float: left;
margin-right: 1em;
height: 5em;
width: 5em;
}
.news .item > .photo > img
{
display: block;
margin: 0 auto;
max-height: 100%;
max-width: 100%;
border-radius: .3em;
}
.news .item > button
{
float: right;
}

View File

@ -12,15 +12,6 @@
<div id="form" class="news">
<div class="box">
<htk-grid show-header="false">
<db-model property="model" id="news-model" updatable="true">
<custom>
SELECT n.id, c.Cliente, priority, image,
CONCAT(LEFT(n.title, 25), '...') title
FROM news n
JOIN vn2008.Clientes c ON n.user_id = c.Id_Cliente
ORDER BY priority, n.date_time DESC
</custom>
</db-model>
<htk-column-button
column="id"
tip="_EditNew"
@ -36,6 +27,51 @@
<htk-column-text title="_Author" column="Cliente"/>
<htk-column-spin title="_Priority" column="priority"/>
</htk-grid>
<htk-repeater form-id="iter">
<db-model property="model" id="news-model" updatable="true">
<custom>
SELECT n.id, c.Cliente, priority, image, title
FROM news n
JOIN vn2008.Clientes c ON n.user_id = c.Id_Cliente
ORDER BY priority, n.date_time DESC
</custom>
</db-model>
<custom>
<div class="item">
<htk-button
form="iter"
column="id"
tip="_EditNew"
image="image/edit.svg"
on-click="onEditClick"/>
<htk-button
form="iter"
column="id"
tip="_Remove"
image="image/delete.svg"
on-click="onDeleteClick"/>
<div class="photo">
<htk-image
form="iter"
column="image"
class="photo"
directory="news"
subdir="200x200"
editable="true"/>
</div>
<p class="important">
<htk-text form="iter" column="title"/>
</p>
<p>
<htk-text form="iter" column="Cliente"/>
</p>
<p>
<t>Priority</t>
<htk-text form="iter" column="priority"/>
</p>
</div>
</custom>
</htk-repeater>
</div>
</div>
</vn>

56
web/image/incognito.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

81
web/image/supplant.svg Normal file
View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Capa_1"
x="0px"
y="0px"
width="16"
height="16"
viewBox="0 0 16.000001 16"
xml:space="preserve"
inkscape:version="0.91 r13725"
sodipodi:docname="35140.svg"><metadata
id="metadata41"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs39" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1016"
id="namedview37"
showgrid="false"
inkscape:zoom="51.6875"
inkscape:cx="8"
inkscape:cy="8"
inkscape:window-x="1920"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="Capa_1" /><g
id="g3"
transform="matrix(0.02428826,0,0,0.02428826,1.0000122,1.0000189)"
style="fill:#666666;fill-opacity:1"><path
d="m 575.391,177.483 c -8.801,10.27 -18.997,9.354 -29.011,5.667 -13.919,-5.126 -27.604,-10.93 -41.223,-16.826 -33.546,-14.523 -68.137,-23.306 -105.074,-20.64 -28.259,2.054 -55.848,7.495 -82.41,17.187 -9.892,3.603 -19.688,5.646 -29.47,6.094 -9.78,-0.447 -19.578,-2.491 -29.468,-6.094 -26.561,-9.687 -54.151,-15.132 -82.413,-17.187 -36.935,-2.671 -71.528,6.116 -105.073,20.64 -13.617,5.9 -27.305,11.699 -41.223,16.826 -10.011,3.687 -20.208,4.603 -29.01,-5.667 -3.37,53.865 1.028,105.223 22.478,154.106 12.553,28.609 30.311,53.35 56.17,71.285 41.837,29.006 87.425,36.068 135.737,19.651 10.669,-3.625 20.249,-10.892 29.81,-17.244 15.117,-10.055 30.311,-17.001 43.44,-17.001 13.128,0 27.408,6.946 42.531,17.001 9.566,6.362 19.144,13.619 29.812,17.244 48.312,16.407 93.907,9.354 135.734,-19.651 25.862,-17.936 43.614,-42.676 56.167,-71.285 21.465,-48.883 25.873,-100.241 22.496,-154.106 z M 110.009,337.49 C 62.675,312.791 52.082,239.538 52.082,239.538 c 0,0 60.829,-23.016 108.158,1.674 47.334,24.699 63.246,87.757 63.246,87.757 0,0 -66.142,33.21 -113.477,8.521 z m 356.399,0 c -47.332,24.688 -113.478,-8.521 -113.478,-8.521 0,0 15.919,-63.058 63.246,-87.757 47.337,-24.689 108.161,-1.674 108.161,-1.674 0,0 -10.598,73.253 -57.929,97.952 z"
id="path5"
inkscape:connector-curvature="0"
style="fill:#666666;fill-opacity:1" /></g><g
id="g7"
transform="translate(0,-560.40906)" /><g
id="g9"
transform="translate(0,-560.40906)" /><g
id="g11"
transform="translate(0,-560.40906)" /><g
id="g13"
transform="translate(0,-560.40906)" /><g
id="g15"
transform="translate(0,-560.40906)" /><g
id="g17"
transform="translate(0,-560.40906)" /><g
id="g19"
transform="translate(0,-560.40906)" /><g
id="g21"
transform="translate(0,-560.40906)" /><g
id="g23"
transform="translate(0,-560.40906)" /><g
id="g25"
transform="translate(0,-560.40906)" /><g
id="g27"
transform="translate(0,-560.40906)" /><g
id="g29"
transform="translate(0,-560.40906)" /><g
id="g31"
transform="translate(0,-560.40906)" /><g
id="g33"
transform="translate(0,-560.40906)" /><g
id="g35"
transform="translate(0,-560.40906)" /></svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -161,6 +161,9 @@
.vn-gui .welcome
{
display: block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.vn-gui .supplant
{
@ -170,6 +173,12 @@
.vn-gui .supplant > span
{
font-size: 1.1em;
max-width: 10em;
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.vn-gui .supplant > button
{

View File

@ -20,7 +20,7 @@ Vn.Gui = new Class
var sql = 'SELECT default_form, image_dir, image_host FROM config;'
+'SELECT production_domain, test_domain FROM config;'
+'SELECT name FROM customer_account;'
+'SELECT name FROM customer_user;'
+'CALL form_list ();';
this.conn.execQuery (sql, this.onMainQueryDone.bind (this));
},
@ -69,6 +69,9 @@ Vn.Gui = new Class
Vn.Cookie.set ('hedera_cookies', true);
Htk.Toast.showWarning (_('By using this site you accept cookies'));
}
if (Vn.Cookie.check ('hedera_supplant'))
this.supplantUser (Vn.Cookie.get ('hedera_supplant'));
}
,show: function ()
@ -293,6 +296,8 @@ Vn.Gui = new Class
this.newVersionBlock = false;
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++ Menu
,createMenu: function (res, sectionMap, parent, ul)
{
@ -322,16 +327,16 @@ Vn.Gui = new Class
li.appendChild (submenu);
li.addEventListener ('mouseover',
this.onLiMouseHover.bind (this, submenu, a));
this._onLiMouseHover.bind (this, submenu, a));
li.addEventListener ('mouseout',
this.onLiMouseOut.bind (this));
this._onLiMouseOut.bind (this));
this.createMenu (res, sectionMap, formId, submenu);
}
}
}
,onLiMouseHover: function (submenu, parent)
,_onLiMouseHover: function (submenu, parent)
{
if (this.menuShown)
return;
@ -345,7 +350,7 @@ Vn.Gui = new Class
submenu.style.top = rect.top +'px';
}
,onLiMouseOut: function ()
,_onLiMouseOut: function ()
{
this.timeout = setTimeout (this.hideSubmenu.bind (this), 160);
}
@ -365,6 +370,8 @@ Vn.Gui = new Class
}
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++ Forms
,_onFormChange: function ()
{
var formPath = this.hashParam.value;
@ -460,6 +467,8 @@ Vn.Gui = new Class
}
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++ Reports
,openReport: function (reportName, batch)
{
this.loaderPush ();
@ -482,6 +491,8 @@ Vn.Gui = new Class
report.open (batch);
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++ Supplant
,supplantUser: function (userId, callback)
{
var batch = new Sql.Batch ();
@ -496,7 +507,7 @@ Vn.Gui = new Class
,_onUserSupplant: function (userId, callback, resultSet)
{
this._supplantClear ();
this._supplanted = userId;
Vn.Cookie.set ('hedera_supplant', userId);
resultSet.fetchResult ();
var userName = resultSet.fetchValue ();
@ -510,10 +521,10 @@ Vn.Gui = new Class
,_supplantClear: function ()
{
if (this._supplanted)
if (Vn.Cookie.check ('hedera_supplant'))
{
Vn.Node.hide (this.$('supplant'));
this._supplanted = null;
Vn.Cookie.unset ('hedera_supplant');
}
}
@ -528,6 +539,8 @@ Vn.Gui = new Class
this._supplantClear ();
this._onFormChange ();
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++ Destroy
,_destroy: function ()
{

View File

@ -84,6 +84,23 @@ p
margin: 0.8em 0;
}
/* Focus outline */
*:focus
{
outline: 1px solid rgba(1, 1, 1, 0.15);
-moz-outline-radius: .1em;
}
button::-moz-focus-inner
{
border: none;
}
select:focus
{
color: transparent;
text-shadow: 0 0 0 #333;
}
/* Inputs */
input[type=text],

View File

@ -346,6 +346,7 @@ Vn.Builder = new Class
,propCompile: function (context, klass, props, node, attribute, value)
{
var isLink = false;
var newValue = null;
var propName = attribute.replace (/-./g, this._replaceFunc);
var propInfo = klass.Properties[propName];
@ -375,18 +376,20 @@ Vn.Builder = new Class
newValue = this._translateValue (value);
break;
case Function:
newValue = this._getMethod (value).bind (this.signalData);
var method = this._getMethod (value);
newValue = method ? method.bind (this.signalData) : null;
break;
default:
if (propInfo.enumType)
newValue = propInfo.enumType[value];
break;
else if (propInfo.type instanceof Function)
isLink = true;
}
if (newValue !== null && newValue !== undefined)
props[propName] = newValue;
else if (propInfo.type instanceof Function)
if (isLink)
this._addLink (context, propName, value);
else if (newValue !== null && newValue !== undefined)
props[propName] = newValue;
else
this._showError ('Attribute \'%s\' invalid for tag \'%s\'',
attribute, node.tagName);