Htk.Repater beta, errores solucionados
This commit is contained in:
parent
92293086a1
commit
d64160d891
|
@ -2,7 +2,5 @@
|
||||||
Vn.Provinces = new Class
|
Vn.Provinces = new Class
|
||||||
({
|
({
|
||||||
Extends: Vn.Module
|
Extends: Vn.Module
|
||||||
|
|
||||||
,activate: function () {}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
<vn-param id="agency">
|
<vn-param id="agency">
|
||||||
<vn-hash-link key="agency"/>
|
<vn-hash-link key="agency"/>
|
||||||
</vn-param>
|
</vn-param>
|
||||||
<vn-param id="agency-id"/>
|
|
||||||
</vn-group>
|
</vn-group>
|
||||||
<div id="form" class="provinces">
|
<div id="form" class="provinces">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
|
|
|
@ -1,97 +1,97 @@
|
||||||
<vn>
|
<vn>
|
||||||
<div id="form" class="about">
|
<div id="form" class="about">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div>
|
<div>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<h1><t>QualityAndVariety</t></h1>
|
<h1><t>QualityAndVariety</t></h1>
|
||||||
|
</div>
|
||||||
|
<p><t>MaximumFreshness</t></p>
|
||||||
|
<h3><t>SquareMeters</t></h3>
|
||||||
|
<img src="forms/cms/about/image/store.png" alt="store"/>
|
||||||
|
<h3><t>AboutRealms</t></h3>
|
||||||
|
<p><t>AboutLocation</t></p>
|
||||||
|
<img src="forms/cms/about/image/trailer.png" alt="trailer"/>
|
||||||
|
<p>
|
||||||
|
<img src="forms/cms/about/image/dealer.png" alt="dealer"/>
|
||||||
|
<t>PurchaseThroughWeb</t>
|
||||||
|
</p>
|
||||||
|
<img src="forms/cms/about/image/palletizing.png" alt="palletizing"/>
|
||||||
</div>
|
</div>
|
||||||
<p><t>MaximumFreshness</t></p>
|
<div>
|
||||||
<h3><t>SquareMeters</t></h3>
|
<div class="header">
|
||||||
<img src="forms/cms/about/image/store.png" alt="store"/>
|
<h1><t>WhatMakeUsDifferent</t></h1>
|
||||||
<h3><t>AboutRealms</t></h3>
|
</div>
|
||||||
<p><t>AboutLocation</t></p>
|
<p><t>DesignVariety</t></p>
|
||||||
<img src="forms/cms/about/image/trailer.png" alt="trailer"/>
|
<img src="forms/cms/about/image/differentiates_us.png" alt="differentiates_us"/>
|
||||||
<p>
|
<p><t>AdaptToYourNeeds</t></p>
|
||||||
<img src="forms/cms/about/image/dealer.png" alt="dealer"/>
|
<h3><t>TheBestQuality</t></h3>
|
||||||
<t>PurchaseThroughWeb</t>
|
|
||||||
</p>
|
|
||||||
<img src="forms/cms/about/image/palletizing.png" alt="palletizing"/>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div class="header">
|
|
||||||
<h1><t>WhatMakeUsDifferent</t></h1>
|
|
||||||
</div>
|
</div>
|
||||||
<p><t>DesignVariety</t></p>
|
<div>
|
||||||
<img src="forms/cms/about/image/differentiates_us.png" alt="differentiates_us"/>
|
<div class="header">
|
||||||
<p><t>AdaptToYourNeeds</t></p>
|
<h1><t>AtYourService</t></h1>
|
||||||
<h3><t>TheBestQuality</t></h3>
|
</div>
|
||||||
</div>
|
<h2><t>BuyersAndTraders</t></h2>
|
||||||
<div>
|
<img src="forms/cms/about/image/commercial.png" alt="commercial"/>
|
||||||
<div class="header">
|
|
||||||
<h1><t>AtYourService</t></h1>
|
|
||||||
</div>
|
</div>
|
||||||
<h2><t>BuyersAndTraders</t></h2>
|
<div>
|
||||||
<img src="forms/cms/about/image/commercial.png" alt="commercial"/>
|
<div class="header">
|
||||||
</div>
|
<h1><t>Training</t></h1>
|
||||||
<div>
|
</div>
|
||||||
<div class="header">
|
<p><t>GoodTraining</t></p>
|
||||||
<h1><t>Training</t></h1>
|
<img src="forms/cms/about/image/training.png" alt="training"/>
|
||||||
|
<p><t>SpecialTrainingPrices</t></p>
|
||||||
|
<img src="forms/cms/about/image/courses.png" alt="courses"/>
|
||||||
|
<h2><t>YoutubeChannel</t></h2>
|
||||||
|
<img src="forms/cms/about/image/youtube.png" alt="youtube"/>
|
||||||
</div>
|
</div>
|
||||||
<p><t>GoodTraining</t></p>
|
<div>
|
||||||
<img src="forms/cms/about/image/training.png" alt="training"/>
|
<div class="header">
|
||||||
<p><t>SpecialTrainingPrices</t></p>
|
<h1><t>HowWeWork</t></h1>
|
||||||
<img src="forms/cms/about/image/courses.png" alt="courses"/>
|
</div>
|
||||||
<h2><t>YoutubeChannel</t></h2>
|
<p><t>AalsmeerAuction</t></p>
|
||||||
<img src="forms/cms/about/image/youtube.png" alt="youtube"/>
|
<img src="forms/cms/about/image/auction.png" alt="auction"/>
|
||||||
</div>
|
<p><t>BeforeAuction</t></p>
|
||||||
<div>
|
<img src="forms/cms/about/image/producers.png" alt="producers"/>
|
||||||
<div class="header">
|
<p><t>DirectlyFromProviders</t></p>
|
||||||
<h1><t>HowWeWork</t></h1>
|
<p><t>GoodsDischarge</t></p>
|
||||||
|
<img src="forms/cms/about/image/goods_transport.png" alt="goods_transport"/>
|
||||||
|
<h2>
|
||||||
|
<t>FirstQualityControl</t>
|
||||||
|
<img src="forms/cms/about/image/glass.png" alt="glass"/>
|
||||||
|
</h2>
|
||||||
|
<img src="forms/cms/about/image/goods_receive.png" alt="goods_receive"/>
|
||||||
|
<p><t>GoodsTravel</t></p>
|
||||||
|
<img src="forms/cms/about/image/2_control.png" alt="2_control"/>
|
||||||
|
<p><t>GoodsReception</t></p>
|
||||||
|
<h2>
|
||||||
|
<t>SecondQualityControl</t>
|
||||||
|
<img src="forms/cms/about/image/glass.png" alt="glass"/>
|
||||||
|
</h2>
|
||||||
|
<p><t>CustomerOrders</t></p>
|
||||||
|
<img src="forms/cms/about/image/web.png" alt="web"/>
|
||||||
|
<p><t>AfterOrder</t></p>
|
||||||
|
<img src="forms/cms/about/image/4_control.png" alt="4_control"/>
|
||||||
|
<h2>
|
||||||
|
<t>ThirdQualityControl</t>
|
||||||
|
<img src="forms/cms/about/image/glass.png" alt="glass"/>
|
||||||
|
</h2>
|
||||||
|
<p><t>BuyerControl</t></p>
|
||||||
|
<h2>
|
||||||
|
<t>FourthQualityControl</t>
|
||||||
|
<img src="forms/cms/about/image/glass.png" alt="glass"/>
|
||||||
|
</h2>
|
||||||
|
<p><t>EmbeddedSection</t></p>
|
||||||
|
<img src="forms/cms/about/image/fit.png" alt="fit"/>
|
||||||
|
<p><t>AfterEmbedAgency</t></p>
|
||||||
|
<img src="forms/cms/about/image/agencies.png" alt="agencies"/>
|
||||||
|
<p><t>FreshnessGuaranteed</t></p>
|
||||||
|
</div>
|
||||||
|
<div class="summary">
|
||||||
|
<p>
|
||||||
|
<t>AboutSummary</t>
|
||||||
|
<img src="image/logo.svg" alt="Verdnatura"/>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<p><t>AalsmeerAuction</t></p>
|
|
||||||
<img src="forms/cms/about/image/auction.png" alt="auction"/>
|
|
||||||
<p><t>BeforeAuction</t></p>
|
|
||||||
<img src="forms/cms/about/image/producers.png" alt="producers"/>
|
|
||||||
<p><t>DirectlyFromProviders</t></p>
|
|
||||||
<p><t>GoodsDischarge</t></p>
|
|
||||||
<img src="forms/cms/about/image/goods_transport.png" alt="goods_transport"/>
|
|
||||||
<h2>
|
|
||||||
<t>FirstQualityControl</t>
|
|
||||||
<img src="forms/cms/about/image/glass.png" alt="glass"/>
|
|
||||||
</h2>
|
|
||||||
<img src="forms/cms/about/image/goods_receive.png" alt="goods_receive"/>
|
|
||||||
<p><t>GoodsTravel</t></p>
|
|
||||||
<img src="forms/cms/about/image/2_control.png" alt="2_control"/>
|
|
||||||
<p><t>GoodsReception</t></p>
|
|
||||||
<h2>
|
|
||||||
<t>SecondQualityControl</t>
|
|
||||||
<img src="forms/cms/about/image/glass.png" alt="glass"/>
|
|
||||||
</h2>
|
|
||||||
<p><t>CustomerOrders</t></p>
|
|
||||||
<img src="forms/cms/about/image/web.png" alt="web"/>
|
|
||||||
<p><t>AfterOrder</t></p>
|
|
||||||
<img src="forms/cms/about/image/4_control.png" alt="4_control"/>
|
|
||||||
<h2>
|
|
||||||
<t>ThirdQualityControl</t>
|
|
||||||
<img src="forms/cms/about/image/glass.png" alt="glass"/>
|
|
||||||
</h2>
|
|
||||||
<p><t>BuyerControl</t></p>
|
|
||||||
<h2>
|
|
||||||
<t>FourthQualityControl</t>
|
|
||||||
<img src="forms/cms/about/image/glass.png" alt="glass"/>
|
|
||||||
</h2>
|
|
||||||
<p><t>EmbeddedSection</t></p>
|
|
||||||
<img src="forms/cms/about/image/fit.png" alt="fit"/>
|
|
||||||
<p><t>AfterEmbedAgency</t></p>
|
|
||||||
<img src="forms/cms/about/image/agencies.png" alt="agencies"/>
|
|
||||||
<p><t>FreshnessGuaranteed</t></p>
|
|
||||||
</div>
|
|
||||||
<div class="summary">
|
|
||||||
<p>
|
|
||||||
<t>AboutSummary</t>
|
|
||||||
<img src="image/logo.svg" alt="Verdnatura"/>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</vn>
|
</vn>
|
||||||
|
|
|
@ -33,10 +33,10 @@ Vn.Contact = new Class
|
||||||
if (response)
|
if (response)
|
||||||
{
|
{
|
||||||
form.reset ();
|
form.reset ();
|
||||||
alert (_('DataSentSuccess'));
|
(new Htk.Toast ()).showMessage (_('DataSentSuccess'));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
alert (_('ErrorSendingData'));
|
(new Htk.Toast ()).showError (_('ErrorSendingData'));
|
||||||
|
|
||||||
form['captcha'].value = '';
|
form['captcha'].value = '';
|
||||||
this.refreshCaptcha ();
|
this.refreshCaptcha ();
|
||||||
|
|
|
@ -2,7 +2,5 @@
|
||||||
Vn.Home = new Class
|
Vn.Home = new Class
|
||||||
({
|
({
|
||||||
Extends: Vn.Module
|
Extends: Vn.Module
|
||||||
|
|
||||||
,activate: function () {}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,4 @@
|
||||||
Vn.Training = new Class
|
Vn.Training = new Class
|
||||||
({
|
({
|
||||||
Extends: Vn.Module
|
Extends: Vn.Module
|
||||||
|
|
||||||
,activate: function () {}
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -12,14 +12,12 @@ Vn.Catalog = new Class
|
||||||
model.setFieldFlags ('id', Db.Conn.Flag.AI);
|
model.setFieldFlags ('id', Db.Conn.Flag.AI);
|
||||||
model.setFieldFlags ('Id_Article', Db.Conn.Flag.PRI_KEY);
|
model.setFieldFlags ('Id_Article', Db.Conn.Flag.PRI_KEY);
|
||||||
|
|
||||||
|
this.$('type-column').renderer = this.typeRenderer.bind (this);
|
||||||
|
this.$('cat').renderer = this.catRenderer;
|
||||||
this.$('basket-button').addEventListener ('click', this.basketClicked.bind (this));
|
this.$('basket-button').addEventListener ('click', this.basketClicked.bind (this));
|
||||||
this.$('menu-button').addEventListener ('click', this.showMenu.bind (this));
|
this.$('menu-button').addEventListener ('click', this.showMenu.bind (this));
|
||||||
this.$('menu').addEventListener ('click', this.onMenuClick.bind (this));
|
this.$('menu').addEventListener ('click', this.onMenuClick.bind (this));
|
||||||
this.$('search-entry').addEventListener ('change', this.onSearch.bind (this));
|
this.$('search-entry').addEventListener ('change', this.onSearch.bind (this));
|
||||||
|
|
||||||
this.$('type-column').renderer = this.typeRenderer.bind (this);
|
|
||||||
this.$('cat').renderer = this.catRenderer;
|
|
||||||
|
|
||||||
this.$('realms-model').on ('status-changed', this.onRealmsReload.bind (this));
|
this.$('realms-model').on ('status-changed', this.onRealmsReload.bind (this));
|
||||||
this.$('realms').on ('changed', this.onRealmChanged.bind (this));
|
this.$('realms').on ('changed', this.onRealmChanged.bind (this));
|
||||||
this.$('types-model').on ('status-changed', this.onTypesReload.bind (this));
|
this.$('types-model').on ('status-changed', this.onTypesReload.bind (this));
|
||||||
|
|
|
@ -184,21 +184,44 @@ table.types td.grid-message
|
||||||
padding-top: 1em;
|
padding-top: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Box view */
|
/* Grid view */
|
||||||
|
|
||||||
.item-box
|
.item-box
|
||||||
{
|
{
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
border-bottom: 1px solid #DDD;
|
border-bottom: 1px solid #DDD;
|
||||||
height: 14em;
|
min-height: 14em;
|
||||||
}
|
}
|
||||||
|
.item-box > .image
|
||||||
.item-box img
|
|
||||||
{
|
{
|
||||||
|
width: 8em;
|
||||||
|
height: 14em;
|
||||||
float: left;
|
float: left;
|
||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
max-width: 14em;
|
}
|
||||||
max-height: 14em;
|
.item-box img
|
||||||
|
{
|
||||||
|
max-width: 8em;
|
||||||
|
max-height: 8em;
|
||||||
|
display: block;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.item-box p
|
||||||
|
{
|
||||||
|
margin: 0;
|
||||||
|
padding: 0.6em;
|
||||||
|
}
|
||||||
|
.item-box h2
|
||||||
|
{
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
.item-box .amount
|
||||||
|
{
|
||||||
|
width: 3em;
|
||||||
|
}
|
||||||
|
.amount-p
|
||||||
|
{
|
||||||
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* List view */
|
/* List view */
|
||||||
|
|
|
@ -65,15 +65,33 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- <htk-repeater model="items-model" form-id="item">
|
<!-- <htk-repeater model="items-model" form-id="item">
|
||||||
<div class="item-box">
|
<div class="item-box">
|
||||||
<htk-image form="item" column="Foto" directory="catalog/200x200"/>
|
<div class="image">
|
||||||
<p>
|
<div>
|
||||||
|
<htk-image form="item" column="Foto" directory="catalog/200x200"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<h2>
|
||||||
<htk-text form="item" column="Article"/>
|
<htk-text form="item" column="Article"/>
|
||||||
|
</h2>
|
||||||
|
<p>
|
||||||
|
<htk-text form="item" column="Medida"/> /
|
||||||
|
<htk-text form="item" column="Categoria"/> /
|
||||||
|
<htk-text form="item" column="Color"/> /
|
||||||
|
<htk-text form="item" column="Tallos"/> /
|
||||||
|
<htk-text form="item" column="Abreviatura"/>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<htk-text form="item" column="Categoria"/> /
|
<t>Available:</t>
|
||||||
<htk-text form="item" column="Medida"/> /
|
<htk-text form="item" column="available"/>
|
||||||
<htk-text form="item" column="Color"/> /
|
</p>
|
||||||
<htk-text form="item" column="Tallos"/>
|
<p>
|
||||||
|
<t>Price:</t>
|
||||||
|
<htk-text form="item" column="price" format="%.2d€"/>
|
||||||
|
</p>
|
||||||
|
<p class="amount-p">
|
||||||
|
<htk-entry id="stems" class="amount"/>
|
||||||
|
<htk-text form="item" column="grouping" format="x%.0d"/>
|
||||||
|
<htk-entry form="item" column="amount" class="amount"/>
|
||||||
</p>
|
</p>
|
||||||
<div class="clear"/>
|
<div class="clear"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -77,11 +77,11 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<htk-grid model="ticket-data">
|
<htk-grid model="ticket-data">
|
||||||
<htk-column-spin title="PC" column="zip_code"/>
|
<htk-column-spin title="_PC" column="zip_code"/>
|
||||||
<htk-column-text title="City" column="city"/>
|
<htk-column-text title="_City" column="city"/>
|
||||||
<htk-column-text title="Province" column="province"/>
|
<htk-column-text title="_Province" column="province"/>
|
||||||
<htk-column-text title="Address" column="name"/>
|
<htk-column-text title="_Address" column="name"/>
|
||||||
<htk-column-text title="Consignee" column="consignee"/>
|
<htk-column-text title="_Consignee" column="consignee"/>
|
||||||
</htk-grid>
|
</htk-grid>
|
||||||
<htk-grid>
|
<htk-grid>
|
||||||
<db-model id="movements">
|
<db-model id="movements">
|
||||||
|
@ -97,17 +97,17 @@
|
||||||
<item name="ticket" param="ticket-id"/>
|
<item name="ticket" param="ticket-id"/>
|
||||||
</sql-batch>
|
</sql-batch>
|
||||||
</db-model>
|
</db-model>
|
||||||
<htk-column-spin title="ItemNumber" column="item_id"/>
|
<htk-column-spin title="_ItemNumber" column="item_id"/>
|
||||||
<htk-column-spin title="Amount" column="amount"/>
|
<htk-column-spin title="_Amount" column="amount"/>
|
||||||
<htk-column-text title="Item" column="concept"/>
|
<htk-column-text title="_Item" column="concept"/>
|
||||||
<htk-column-text title="Category" column="Categoria"/>
|
<htk-column-text title="_Category" column="Categoria"/>
|
||||||
<htk-column-text title="S1" column="Medida"/>
|
<htk-column-text title="_S1" column="Medida"/>
|
||||||
<htk-column-text title="Stems" column="Tallos"/>
|
<htk-column-text title="_Stems" column="Tallos"/>
|
||||||
<htk-column-text title="Color" column="Color"/>
|
<htk-column-text title="_Color" column="Color"/>
|
||||||
<htk-column-text title="Origin" column="Abreviatura"/>
|
<htk-column-text title="_Origin" column="Abreviatura"/>
|
||||||
<htk-column-spin title="Price" column="price" unit="€" digits="2"/>
|
<htk-column-spin title="_Price" column="price" unit="€" digits="2"/>
|
||||||
<htk-column-spin title="Desc" column="discount" unit="%"/>
|
<htk-column-spin title="_Desc" column="discount" unit="%"/>
|
||||||
<htk-column-spin title="Subtotal" unit="€" digits="2" id="subtotal"/>
|
<htk-column-spin title="_Subtotal" unit="€" digits="2" id="subtotal"/>
|
||||||
</htk-grid>
|
</htk-grid>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -16,7 +16,8 @@
|
||||||
|
|
||||||
/* Global */
|
/* Global */
|
||||||
|
|
||||||
@font-face {
|
@font-face
|
||||||
|
{
|
||||||
font-family: 'Open Sans';
|
font-family: 'Open Sans';
|
||||||
src: url(opensans.ttf) format('truetype');
|
src: url(opensans.ttf) format('truetype');
|
||||||
}
|
}
|
||||||
|
@ -174,7 +175,7 @@ img.editable
|
||||||
|
|
||||||
/* Date chooser */
|
/* Date chooser */
|
||||||
|
|
||||||
.date-chooser button
|
.htk-date-chooser button
|
||||||
{
|
{
|
||||||
border: 1px solid #CCD;
|
border: 1px solid #CCD;
|
||||||
margin: 0.2em;
|
margin: 0.2em;
|
||||||
|
@ -286,11 +287,8 @@ table.htk-grid
|
||||||
table.htk-grid thead tr,
|
table.htk-grid thead tr,
|
||||||
table.htk-grid tfoot tr
|
table.htk-grid tfoot tr
|
||||||
{
|
{
|
||||||
/* box-shadow: 0px 0.1em 0.1em #DDD;
|
background-color: #009688;
|
||||||
background-color: #AD4;
|
color: white;
|
||||||
border: 1px solid #CCD;
|
|
||||||
*/ background-color: #009688;
|
|
||||||
color: white /* #032 */;
|
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 3em;
|
height: 3em;
|
||||||
|
@ -303,7 +301,7 @@ table.htk-grid thead th
|
||||||
}
|
}
|
||||||
table.htk-grid thead th:hover
|
table.htk-grid thead th:hover
|
||||||
{
|
{
|
||||||
background-color: #076 /* #DDE */;
|
background-color: #076;
|
||||||
}
|
}
|
||||||
table.htk-grid tr
|
table.htk-grid tr
|
||||||
{
|
{
|
||||||
|
@ -368,6 +366,21 @@ button.cell-button img
|
||||||
height: 1.5em;
|
height: 1.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Repater */
|
||||||
|
|
||||||
|
.htk-repeater > .message
|
||||||
|
{
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 10em;
|
||||||
|
padding: 1em;
|
||||||
|
}
|
||||||
|
.htk-repeater > .message > img
|
||||||
|
{
|
||||||
|
vertical-align: middle;
|
||||||
|
padding: 0.8em;
|
||||||
|
height: 1.8em;
|
||||||
|
}
|
||||||
|
|
||||||
/* Calendar */
|
/* Calendar */
|
||||||
|
|
||||||
.htk-calendar
|
.htk-calendar
|
||||||
|
@ -451,7 +464,7 @@ button.cell-button img
|
||||||
|
|
||||||
.htk-toast
|
.htk-toast
|
||||||
{
|
{
|
||||||
z-index: 200;
|
z-index: 210;
|
||||||
display: block;
|
display: block;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
|
@ -460,7 +473,8 @@ button.cell-button img
|
||||||
padding: 0.5em;
|
padding: 0.5em;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
top: 4em;
|
top: 4em;
|
||||||
max-width: 20em;
|
width: 20em;
|
||||||
|
margin-left: -10.5em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ use Vn\Hedera\Web;
|
||||||
use Vn\Lib\Locale;
|
use Vn\Lib\Locale;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Web::init ();
|
|
||||||
Web::sysInit ();
|
Web::sysInit ();
|
||||||
}
|
}
|
||||||
catch (Exception $e)
|
catch (Exception $e)
|
||||||
|
@ -17,13 +16,14 @@ catch (Exception $e)
|
||||||
exit (0);
|
exit (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset ($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != 'on')
|
if (!Web::isHttps () && Web::$sysConn->getValue ('SELECT https FROM config'))
|
||||||
if (Web::$sysConn->getValue ('SELECT https FROM config'))
|
|
||||||
{
|
{
|
||||||
header ("Location: https://${_SERVER['SERVER_NAME']}${_SERVER['REQUEST_URI']}");
|
header ("Location: https://${_SERVER['SERVER_NAME']}${_SERVER['REQUEST_URI']}");
|
||||||
exit (0);
|
exit (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Web::init ();
|
||||||
|
|
||||||
// Getting the requested page
|
// Getting the requested page
|
||||||
|
|
||||||
if (isset ($_GET['page']) && Vn\Hedera\checkToken ($_GET['page']))
|
if (isset ($_GET['page']) && Vn\Hedera\checkToken ($_GET['page']))
|
||||||
|
|
|
@ -12,7 +12,7 @@ Htk.DateChooser = new Class
|
||||||
{
|
{
|
||||||
this.parent (props);
|
this.parent (props);
|
||||||
this.createElement ('div');
|
this.createElement ('div');
|
||||||
this.node.className = 'date-chooser';
|
this.node.className = 'htk-date-chooser';
|
||||||
|
|
||||||
this.label = document.createElement ('span');
|
this.label = document.createElement ('span');
|
||||||
this.node.appendChild (this.label);
|
this.node.appendChild (this.label);
|
||||||
|
|
|
@ -12,8 +12,8 @@ Htk.Spin = new Class
|
||||||
|
|
||||||
,changed: function ()
|
,changed: function ()
|
||||||
{
|
{
|
||||||
var value = (this.entry.value == '') ? null : parseFloat (this.entry.value);
|
var newValue = (this.node.value == '') ? null : parseFloat (this.node.value);
|
||||||
this.entry.value = value;
|
this.node.value = newValue;
|
||||||
this.realValue = value;
|
this.realValue = value;
|
||||||
this.signalEmit ('changed');
|
this.signalEmit ('changed');
|
||||||
}
|
}
|
||||||
|
@ -22,15 +22,11 @@ Htk.Spin = new Class
|
||||||
{
|
{
|
||||||
if (editable)
|
if (editable)
|
||||||
{
|
{
|
||||||
var input;
|
var input = document.createElement ('input');
|
||||||
var obj = this;
|
|
||||||
|
|
||||||
input = document.createElement ('input');
|
|
||||||
input.style.textAlign = 'right';
|
input.style.textAlign = 'right';
|
||||||
input.style.width = '100%';
|
input.style.width = '100%';
|
||||||
setInputTypeNumber (input);
|
setInputTypeNumber (input);
|
||||||
input.addEventListener ('change',
|
input.addEventListener ('change', this.changed.bind (this));
|
||||||
function () { obj.changed (); }, false);
|
|
||||||
this.node.appendChild (input);
|
this.node.appendChild (input);
|
||||||
this.entry = input;
|
this.entry = input;
|
||||||
}
|
}
|
||||||
|
@ -41,7 +37,7 @@ Htk.Spin = new Class
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
,setRealValue: function (value)
|
,putValue: function (value)
|
||||||
{
|
{
|
||||||
var text;
|
var text;
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@ Htk.Repeater = new Class
|
||||||
,'row-deleted': this.onRowDelete
|
,'row-deleted': this.onRowDelete
|
||||||
,'row-updated': this.onRowUpdate
|
,'row-updated': this.onRowUpdate
|
||||||
,'row-inserted': this.onRowInsert
|
,'row-inserted': this.onRowInsert
|
||||||
,'updatable-changed': this.onUpdatableChange
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this.onModelChange ();
|
this.onModelChange ();
|
||||||
|
@ -36,6 +35,11 @@ Htk.Repeater = new Class
|
||||||
{
|
{
|
||||||
this._alias;
|
this._alias;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
emptyMessage:
|
||||||
|
{
|
||||||
|
type: String
|
||||||
|
,value: _('NoData')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,6 +50,7 @@ Htk.Repeater = new Class
|
||||||
,initialize: function ()
|
,initialize: function ()
|
||||||
{
|
{
|
||||||
this.createElement ('div');
|
this.createElement ('div');
|
||||||
|
this.node.className = 'htk-repeater';
|
||||||
}
|
}
|
||||||
|
|
||||||
,loadXml: function (builder, node)
|
,loadXml: function (builder, node)
|
||||||
|
@ -54,6 +59,19 @@ Htk.Repeater = new Class
|
||||||
this.parentBuilder = builder;
|
this.parentBuilder = builder;
|
||||||
this.onModelChange ();
|
this.onModelChange ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
,buildBox: function (index)
|
||||||
|
{
|
||||||
|
var builder = new Vn.Builder ();
|
||||||
|
|
||||||
|
var form = new Db.Form ();
|
||||||
|
form.model = this._model;
|
||||||
|
form.row = index;
|
||||||
|
builder.add (this._alias, form);
|
||||||
|
|
||||||
|
var mainNode = builder.loadXmlFromNode (this.xml);
|
||||||
|
this.node.appendChild (mainNode);
|
||||||
|
}
|
||||||
|
|
||||||
,onModelChange: function ()
|
,onModelChange: function ()
|
||||||
{
|
{
|
||||||
|
@ -62,41 +80,61 @@ Htk.Repeater = new Class
|
||||||
|
|
||||||
Vn.Node.removeChilds (this.node);
|
Vn.Node.removeChilds (this.node);
|
||||||
|
|
||||||
if (!this._model.ready)
|
switch (this._model.status)
|
||||||
return;
|
|
||||||
|
|
||||||
for (var i = 0; i < this._model.numRows; i++)
|
|
||||||
{
|
{
|
||||||
var builder = new Vn.Builder ();
|
case Db.Model.Status.READY:
|
||||||
|
{
|
||||||
|
for (var i = 0; i < this._model.numRows; i++)
|
||||||
|
this.buildBox (i);
|
||||||
|
|
||||||
var form = new Db.Form ();
|
this.showNoRecordsFound ();
|
||||||
form.model = this._model;
|
break;
|
||||||
form.row = i;
|
}
|
||||||
builder.add (this._alias, form);
|
case Db.Model.Status.LOADING:
|
||||||
|
this.showMessage (_('Loading'), 'loader-black.gif');
|
||||||
var mainNode = builder.loadXmlFromNode (this.xml);
|
break;
|
||||||
this.node.appendChild (mainNode);
|
case Db.Model.Status.CLEAN:
|
||||||
|
this.showMessage (this.emptyMessage, 'refresh.svg');
|
||||||
|
break;
|
||||||
|
case Db.Model.Status.ERROR:
|
||||||
|
this.showMessage (_('ErrorLoadingData'), 'error.svg');
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
,showNoRecordsFound: function (count)
|
||||||
|
{
|
||||||
|
if (this._model.numRows == 0)
|
||||||
|
this.showMessage (_('EmptyList'), 'clean.svg');
|
||||||
|
}
|
||||||
|
|
||||||
|
,showMessage: function (message, src)
|
||||||
|
{
|
||||||
|
var div = document.createElement ('div');
|
||||||
|
div.className = 'message';
|
||||||
|
this.node.appendChild (div);
|
||||||
|
|
||||||
|
var img = document.createElement ('img');
|
||||||
|
img.alt = '';
|
||||||
|
img.src = 'image/'+ src;
|
||||||
|
div.appendChild (img);
|
||||||
|
|
||||||
|
div.appendChild (document.createTextNode (message));
|
||||||
|
}
|
||||||
|
|
||||||
,onRowDelete: function (model, row)
|
,onRowDelete: function (model, row)
|
||||||
{
|
{
|
||||||
var childs = this.node.childNodes;
|
Vn.Node.remove (this.node.childNodes[row]);
|
||||||
this.node.removeChild (childs[row]);
|
this.showNoRecordsFound ();
|
||||||
}
|
}
|
||||||
|
|
||||||
,onRowUpdate: function ()
|
,onRowUpdate: function (model, row, columns)
|
||||||
{
|
{
|
||||||
|
// this.form[row].signalEmit ('iter-changed');
|
||||||
}
|
}
|
||||||
|
|
||||||
,onRowInsert: function ()
|
,onRowInsert: function (model, row)
|
||||||
{
|
{
|
||||||
|
this.buildBox (row);
|
||||||
}
|
|
||||||
|
|
||||||
,onUpdatableChange: function ()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -17,6 +17,8 @@ Htk.Toast = new Class
|
||||||
|
|
||||||
,showText: function (message, className)
|
,showText: function (message, className)
|
||||||
{
|
{
|
||||||
|
this.hide ();
|
||||||
|
|
||||||
var textNode = document.createTextNode (message);
|
var textNode = document.createTextNode (message);
|
||||||
|
|
||||||
Vn.Node.removeChilds (this.node);
|
Vn.Node.removeChilds (this.node);
|
||||||
|
@ -27,8 +29,8 @@ Htk.Toast = new Class
|
||||||
this.hideHandler = this.hide.bind (this);
|
this.hideHandler = this.hide.bind (this);
|
||||||
document.addEventListener ('mousedown', this.hideHandler);
|
document.addEventListener ('mousedown', this.hideHandler);
|
||||||
|
|
||||||
var marginLeft = -parseInt (this.node.offsetWidth / 2);
|
// var marginLeft = -parseInt (this.node.offsetWidth / 2);
|
||||||
this.node.style.marginLeft = (marginLeft) +'px';
|
// this.node.style.marginLeft = (marginLeft) +'px';
|
||||||
|
|
||||||
this.timerId = setTimeout (this.hide.bind (this), 10000);
|
this.timerId = setTimeout (this.hide.bind (this), 10000);
|
||||||
}
|
}
|
||||||
|
@ -50,11 +52,14 @@ Htk.Toast = new Class
|
||||||
|
|
||||||
,hide: function ()
|
,hide: function ()
|
||||||
{
|
{
|
||||||
clearTimeout (this.timerId);
|
if (this.timerId)
|
||||||
this.timerId = null;
|
{
|
||||||
document.removeEventListener ('mousedown', this.hideHandler);
|
clearTimeout (this.timerId);
|
||||||
document.body.removeChild (this.node);
|
this.timerId = null;
|
||||||
this.signalEmit ('closed');
|
document.removeEventListener ('mousedown', this.hideHandler);
|
||||||
|
document.body.removeChild (this.node);
|
||||||
|
this.signalEmit ('closed');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
,stopEvent: function (event)
|
,stopEvent: function (event)
|
||||||
|
|
|
@ -46,4 +46,9 @@ Htk.Widget = new Class
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
,remove: function ()
|
||||||
|
{
|
||||||
|
Vn.Node.remove (this.node);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 24 KiB |
|
@ -13,9 +13,9 @@
|
||||||
div
|
div
|
||||||
{
|
{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 35em;
|
width: 36em;
|
||||||
margin-top: -7em;
|
margin-top: -7em;
|
||||||
margin-left: -26em;
|
margin-left: -18em;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
|
@ -21,7 +21,10 @@ class Web
|
||||||
* Initializes the Hedera web library.
|
* Initializes the Hedera web library.
|
||||||
**/
|
**/
|
||||||
static function init ()
|
static function init ()
|
||||||
{
|
{
|
||||||
|
if (self::isHttps ())
|
||||||
|
ini_set ('session.cookie_secure', TRUE);
|
||||||
|
|
||||||
session_start ();
|
session_start ();
|
||||||
|
|
||||||
// Setting the locale
|
// Setting the locale
|
||||||
|
@ -92,6 +95,11 @@ class Web
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static function isHttps ()
|
||||||
|
{
|
||||||
|
return isset ($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Obtains the version of the library.
|
* Obtains the version of the library.
|
||||||
**/
|
**/
|
||||||
|
|
Loading…
Reference in New Issue