0
1
Fork 0

New mark for translatable TextNode, bugs in builder solved, 4 spaces replaced by tabs

This commit is contained in:
Juan Ferrer Toribio 2017-10-20 16:24:49 +02:00
parent 2e9ea7ac33
commit 63158d335e
41 changed files with 234 additions and 230 deletions

View File

@ -82,19 +82,19 @@
</h3>
<ul>
<li>
<htk-text lot="password-form" name="length"/> <t>characters long</t>
<htk-text lot="password-form" name="length"/> _characters long
</li>
<li>
<htk-text lot="password-form" name="nAlpha"/> <t>alphabetic characters</t>
<htk-text lot="password-form" name="nAlpha"/> _alphabetic characters
</li>
<li>
<htk-text lot="password-form" name="nUpper"/> <t>capital letters</t>
<htk-text lot="password-form" name="nUpper"/> _capital letters
</li>
<li>
<htk-text lot="password-form" name="nDigits"/> <t>digits</t>
<htk-text lot="password-form" name="nDigits"/> _digits
</li>
<li>
<htk-text lot="password-form" name="nPunct"/> <t>symbols</t>
<htk-text lot="password-form" name="nPunct"/> _symbols
</li>
</ul>
</div>

View File

@ -8,7 +8,7 @@
</db-form>
</vn-group>
<h1 id="title">
<t>AccessLog</t>
_AccessLog
</h1>
<div id="main" class="access-log">
<div class="card form">

View File

@ -1,6 +1,6 @@
<vn>
<h1 id="title">
<t>Connections</t>
_Connections
</h1>
<div id="actions">
<htk-bar-button
@ -14,7 +14,7 @@
model="sessions"
func="sessionsFunc"/>
</htk-text>
<t>connections</t>
_connections
</div>
</div>
<div id="main" class="connections">

View File

@ -1,6 +1,6 @@
<vn>
<h1 id="title">
<t>Items</t>
_Items
</h1>
<div id="actions">
<htk-search-entry

View File

@ -1,6 +1,6 @@
<vn>
<h1 id="title">
<t>ControlPanel</t>
_ControlPanel
</h1>
<div id="main" class="cpanel">
<div class="card list">

View File

@ -1,11 +1,11 @@
<vn>
<h1 id="title">
<t>Images</t>
_Images
</h1>
<div id="main" class="photos">
<div class="card form">
<div class="form-group">
<label><t>Collection</t></label>
<label>_Collection</label>
<htk-combo id="schema">
<db-model property="model">
SELECT name, `desc` FROM image_schema ORDER BY `desc`
@ -20,7 +20,7 @@
on-drop="onDrop"
on-dragend="onDragEnd"
on-click="onDropzoneClick">
<t>Click or drop files here</t>
_Click or drop files here
</div>
<input
id="file"
@ -31,10 +31,10 @@
<div id="file-list" class="file-list"/>
<div class="footer">
<button class="thin" on-click="onClearClick">
<t>Clear all</t>
_Clear all
</button>
<button class="thin" on-click="onUploadClick">
<t>Upload files</t>
_Upload files
</button>
</div>
</div>

View File

@ -1,6 +1,6 @@
<vn>
<h1 id="title">
<t>Queries</t>
_Queries
</h1>
<div id="actions">
<htk-bar-button
@ -15,7 +15,7 @@
<div id="main" class="queries">
<div class="card form">
<div>
<label><t>SQL query</t></label>
<label>_SQL query</label>
<textarea
id="sql"
autocorrect="off"
@ -23,11 +23,11 @@
spellcheck="false"/>
</div>
<div>
<label><t>Result index</t></label>
<label>_Result index</label>
<htk-spin id="result-index"/>
</div>
<div>
<label><t>Updatable</t></label>
<label>_Updatable</label>
<htk-check id="updatable"/>
</div>
</div>

View File

@ -1,6 +1,6 @@
<vn>
<h1 id="title">
<t>UserManagement</t>
_UserManagement
</h1>
<div id="actions">
<htk-search-entry lot="hash" name="user"/>

View File

@ -1,6 +1,6 @@
<vn>
<h1 id="title">
<t>Visits</t>
_Visits
</h1>
<div id="actions">
<htk-bar-button
@ -15,11 +15,11 @@
<div id="main" class="visits">
<div class="card form">
<div>
<label><t>From</t></label>
<label>_From</label>
<htk-date-chooser lot="hash" name="from"/>
</div>
<div>
<label><t>To</t></label>
<label>_To</label>
<htk-date-chooser lot="hash" name="to"/>
</div>
</div>
@ -31,14 +31,14 @@
model="visits"
column-name="visits"/>
</htk-text>
<t>visits</t>,
_visits,
<htk-text>
<db-calc-sum
property="param"
model="visits"
column-name="newVisits"/>
</htk-text>
<t>news</t>
_news
</p>
</div>
<div class="card list ">
@ -67,9 +67,9 @@
</p>
<p>
<htk-text lot="iter" name="visits"/>
<t>visits</t>,
_visits,
<htk-text lot="iter" name="newVisits"/>
<t>news</t>
_news
</p>
<p>
<htk-text lot="iter" name="lastVisit" format="_%a, %e %b %Y at %T"/>

View File

@ -1,6 +1,6 @@
<vn>
<h1 id="title">
<t>ListByAgency</t>
_ListByAgency
</h1>
<div id="main" class="packages">
<div class="card">

View File

@ -1,6 +1,6 @@
<vn>
<h1 id="title">
<t>ByProvince</t>
_ByProvince
</h1>
<div id="main" class="provinces">
<div class="card">

View File

@ -61,7 +61,7 @@
}
.about p
{
margin: 1em 0;
margin: 1em 0;
}
.about p.summary
{
@ -71,7 +71,7 @@
padding: 1em;
border-radius: 0.1em;
box-shadow: 0 0.2em 0.2em #AAA;
margin: 1.5em auto;
margin: 1.5em auto;
}
/* Images */
@ -80,20 +80,20 @@
{
max-width: 90%;
text-align: center;
display: block;
margin: 1em auto;
display: block;
margin: 1em auto;
}
.about img[alt="producers"],
.about img[alt="4_control"],
.about img[alt="dealer"],
.about img[alt="goods_transport"]
{
margin: 1em;
margin: 1em;
float: right;
}
.about img[alt="2_control"]
{
margin: 1em;
margin: 1em;
float: left;
}
.about img[alt="glass"]

View File

@ -1,6 +1,6 @@
<vn>
<h1 id="title">
<t>Home</t>
_Home
</h1>
<div id="actions" class="catalog-actions">
<htk-bar-button

View File

@ -1,6 +1,6 @@
<vn>
<h1 id="title">
<t>Location</t>
_Location
</h1>
<div id="main" class="location"/>
</vn>

View File

@ -1,6 +1,6 @@
<vn>
<h1 id="title">
<t>Training</t>
_Training
</h1>
<div id="main" class="training">
<div class="column mansonry" id="news-column">

View File

@ -1,19 +1,19 @@
<vn>
<h1 id="title">
<t>AboutCompany</t>
_AboutCompany
</h1>
<div id="main" class="why">
<div class="card">
<div class="body">
<ul>
<li><t>BecauseOurBigCatalog</t></li>
<li><t>BecauseThisWeb</t></li>
<li><t>BecauseOurShoppingDep</t></li>
<li><t>BecauseOrderIsEasy</t></li>
<li><t>BecauseOurPlant</t></li>
<li><t>BecauseOurSalesDep</t></li>
<li><t>BecauseOurWorkShop</t></li>
<li><t>BecauseWeHaveWhatYouNeed</t></li>
<li>_BecauseOurBigCatalog</li>
<li>_BecauseThisWeb</li>
<li>_BecauseOurShoppingDep</li>
<li>_BecauseOrderIsEasy</li>
<li>_BecauseOurPlant</li>
<li>_BecauseOurSalesDep</li>
<li>_BecauseOurWorkShop</li>
<li>_BecauseWeHaveWhatYouNeed</li>
</ul>
<img src="forms/cms/why/store.png" alt="Store photo"/>
</div>

View File

@ -1,6 +1,6 @@
<vn>
<h1 id="title">
<t>ShoppingBasket</t>
_ShoppingBasket
</h1>
<div id="actions">
<htk-bar-button
@ -20,7 +20,7 @@
<div class="card form">
<div class="head">
<p>
<t>Total</t>
_Total
<htk-text format="%.2d€">
<db-calc-sum property="param" func="subtotal" model="items"/>
</htk-text>

View File

@ -103,7 +103,7 @@
<vn-param lot="params" name="type" on-changed="refreshTitle"/>
</vn-group>
<h1 id="title">
<t>Catalog</t>
_Catalog
</h1>
<div id="actions" class="catalog-actions">
<button class="menu" on-click="onShowMenuClick">
@ -153,17 +153,17 @@
<htk-text lot="item" name="item_id"/>
</p>
<p>
<t>Size</t> <htk-text lot="item" name="Medida"/>,
<t>Category</t> <htk-text lot="item" name="Categoria"/>
_Size <htk-text lot="item" name="Medida"/>,
_Category <htk-text lot="item" name="Categoria"/>
</p>
<p class="color">
<t>Color</t> <htk-text lot="item" name="color"/>
_Color <htk-text lot="item" name="color"/>
<htk-text lot="item" name="Tallos" format="_, %.0d Units"/>
</p>
<div class="aval-price">
<htk-text lot="item" name="available"/>
<span class="from">
<t>from</t>
_from
</span>
<span class="price">
<htk-text lot="item" name="price" format="%.2d€"/>
@ -184,7 +184,7 @@
<htk-text lot="basket" name="agency"/>
</p>
<button class="thin" on-click="onConfigureClick">
<t>Change</t>
_Change
</button>
</div>
<div class="filter">
@ -213,10 +213,10 @@
</div>
</div>
<div id="realm-msg" class="realm-msg">
<h1><t>Choose a realm</t></h1>
<h1>_Choose a realm</h1>
</div>
<div id="filters" class="filters">
<h2><t>Filter by</t></h2>
<h2>_Filter by</h2>
<vn-filter
name="type"
lot="params"
@ -305,40 +305,40 @@
</vn-filter>
</div>
<div id="order" class="order">
<h2><t>Order by</t></h2>
<h2>_Order by</h2>
<select on-change="onOrderChange">
<option value="D|relevancy" selected="true">
<t>Relevancy</t>
_Relevancy
</option>
<option value="A|Article">
<t>Name</t>
_Name
</option>
<option value="A|price">
<t>Lower price</t>
_Lower price
</option>
<option value="D|price">
<t>Higher price</t>
_Higher price
</option>
<option value="A|available">
<t>Available</t>
_Available
</option>
<option value="A|Medida">
<t>Lower size</t>
_Lower size
</option>
<option value="D|Medida">
<t>Higher size</t>
_Higher size
</option>
<option value="A|color">
<t>Color</t>
_Color
</option>
<option value="A|producer">
<t>Producer</t>
_Producer
</option>
<option value="A|Abreviatura">
<t>Origin</t>
_Origin
</option>
<option value="A|Categoria">
<t>Category</t>
_Category
</option>
</select>
</div>
@ -373,15 +373,15 @@
<htk-text lot="card" name="producer"/>
</p>
<p>
<t>Size</t> <htk-text lot="card" name="Medida"/>,
<t>Category</t> <htk-text lot="card" name="Categoria"/>
_Size <htk-text lot="card" name="Medida"/>,
_Category <htk-text lot="card" name="Categoria"/>
</p>
<p class="color">
<t>Color</t> <htk-text lot="card" name="color"/>
_Color <htk-text lot="card" name="color"/>
<htk-text lot="card" name="Tallos" format="_, %.0d Units"/>
</p>
<p>
<t>Origin</t> <htk-text lot="card-extend" name="origin"/>
_Origin <htk-text lot="card-extend" name="origin"/>
</p>
</div>
<p class="desc">

View File

@ -73,7 +73,7 @@
width: inherit;
max-width: 24em;
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

View File

@ -128,13 +128,13 @@
<h2>_ConfirmToAccessCatalog</h2>
<div class="answers target">
<p>
<t>Arrival</t> <htk-text format="%D" lot="lot" name="date"/>
_Arrival <htk-text format="%D" lot="lot" name="date"/>
</p>
<p>
<htk-text lot="address-form" name="name"/>
</p>
<p>
<t>Agency</t> <htk-text lot="agency-combo" name="description"/>
_Agency <htk-text lot="agency-combo" name="description"/>
</p>
<button id="confirm-agency" class="thin" on-click="onConfirmClick">
_Confirm
@ -146,7 +146,7 @@
<h2>_ConfirmToAccessCatalog</h2>
<div class="answers target">
<p>
<t>Arrival</t> <htk-text format="%D" lot="lot" name="date"/>
_Arrival <htk-text format="%D" lot="lot" name="date"/>
</p>
<p>
<htk-text lot="address-form" name="name"/>
@ -164,10 +164,10 @@
<h2>_ConfirmToAccessCatalog</h2>
<div class="answers target">
<p>
<t>Pickup</t> <htk-text format="%D" lot="lot" name="date"/>
_Pickup <htk-text format="%D" lot="lot" name="date"/>
</p>
<p>
<t>Warehouse</t> <htk-text lot="warehouse-combo" name="description"/>
_Warehouse <htk-text lot="warehouse-combo" name="description"/>
</p>
<button id="confirm-pickup" class="thin" on-click="onConfirmClick">
_Confirm

View File

@ -27,18 +27,18 @@
</db-query>
</vn-group>
<h1 id="title">
<t>Order summary</t>
_Order summary
</h1>
<div id="main" class="confirm">
<div class="summary form card">
<div>
<div class="delivery">
<p>
<t>Delivery at</t>
_Delivery at
<htk-text format="%D" lot="order" name="sendDate"/>
</p>
<p>
<span id="method"><t>Agency</t></span>
<span id="method">_Agency</span>
<htk-text lot="order" name="agency"/>
</p>
</div>
@ -62,7 +62,7 @@
<tbody>
<tr>
<td>
<t>Previous balance</t>
_Previous balance
</td>
<td class="currency">
<htk-text format="%.2d€" lot="order" name="debt"/>
@ -70,7 +70,7 @@
</tr>
<tr>
<td>
<t>Order total</t>
_Order total
</td>
<td class="currency">
<htk-text format="%.2d€" lot="order" name="taxBase"/>
@ -78,7 +78,7 @@
</tr>
<tr>
<td>
<t>Order VAT</t>
_Order VAT
</td>
<td class="currency">
<htk-text format="%.2d€" lot="order" name="vat"/>
@ -86,7 +86,7 @@
</tr>
<tr class="total-debt sum-total">
<td>
<t>Total debt</t>
_Total debt
</td>
<td class="currency">
<htk-text format="%.2d€" lot="lot" name="totalDebt"/>
@ -94,7 +94,7 @@
</tr>
<tr id="credit-info" class="credit-info">
<td>
<t>Credit</t>
_Credit
</td>
<td class="currency">
<htk-text format="%.2d€" lot="order" name="credit"/>
@ -102,7 +102,7 @@
</tr>
<tr id="exceeded-info" class="exceeded-info sum-total">
<td>
<t>Exceeded credit</t>
_Exceeded credit
</td>
<td class="currency">
<htk-text format="%.2d€" lot="lot" name="exceededCredit"/>
@ -113,7 +113,7 @@
</div>
<div id="amount-selector" class="amount-selector">
<h2>
<t>Amount to pay</t>
_Amount to pay
</h2>
<div class="radio">
<htk-radio-group
@ -123,14 +123,14 @@
<div>
<htk-radio radio-group="pay-amount" value="ALL"/>
<label>
<t>Total debt</t>,
_Total debt,
<htk-text format="%.2d€" lot="lot" name="totalDebt"/>
</label>
</div>
<div>
<htk-radio radio-group="pay-amount" value="EXCEEDED"/>
<label>
<t>Exceeded credit</t>,
_Exceeded credit,
<htk-text format="%.2d€" lot="lot" name="exceededCredit"/>
</label>
</div>
@ -138,7 +138,7 @@
</div>
<div>
<h2>
<t>Pay method</t>
_Pay method
</h2>
<div class="pay-methods radio">
<htk-radio-group
@ -148,30 +148,30 @@
on-changed="onPayMethodChange"/>
<div id="balance-method">
<htk-radio radio-group="pay-method" value="BALANCE"/>
<label><t>Use my balance</t></label>
<label>_Use my balance</label>
<div class="pay-info">
<t>You have a favorable balance.</t>
_You have a favorable balance.
</div>
</div>
<div id="credit-method">
<htk-radio radio-group="pay-method" value="CREDIT"/>
<label><t>Use my credit</t></label>
<label>_Use my credit</label>
<div class="pay-info">
<t>You have a favorable credit.</t>
_You have a favorable credit.
</div>
</div>
<div id="card-method">
<htk-radio radio-group="pay-method" value="CARD"/>
<label><t>Credit card</t></label>
<label>_Credit card</label>
<div class="pay-info">
<t>You will be redirected to the payment.</t>
_You will be redirected to the payment.
</div>
</div>
<div id="transfer-method">
<htk-radio radio-group="pay-method" value="TRANSFER"/>
<label><t>Bank Transfer</t></label>
<label>_Bank Transfer</label>
<div class="pay-info">
<t>Make a transfer to one account.</t>
_Make a transfer to one account.
<htk-repeater form-id="iter">
<db-model property="model">
SELECT description, iban, entity_id, office, dc, number
@ -196,16 +196,16 @@
</div>
<div id="later-method">
<htk-radio radio-group="pay-method" value="LATER"/>
<label><t>Pay later</t></label>
<label>_Pay later</label>
</div>
</div>
</div>
<div class="button-bar">
<button on-click="onModifyClick" id="modify" class="thin modify-order">
<t>Modify</t>
_Modify
</button>
<button on-click="onConfirmClick" id="confirm" class="thin confirm-order">
<t>Confirm</t>
_Confirm
</button>
<div class="clear"/>
</div>

View File

@ -3,12 +3,12 @@
<vn-spec name="from" type="Date"/>
</vn-lot-query>
<h1 id="title">
<t>Invoices</t>
_Invoices
</h1>
<div id="main" class="invoices">
<div class="card form">
<div>
<label><t>Show invoices from</t></label>
<label>_Show invoices from</label>
<htk-date-chooser lot="params" name="from"/>
</div>
</div>

View File

@ -8,7 +8,7 @@
</db-model>
</db-form>
<h1 id="title">
<t>LastOrders</t>
_LastOrders
</h1>
<div id="actions">
<htk-bar-button
@ -24,7 +24,7 @@
on-click="onPayButtonClick"/>
<div class="balance">
<span class="label">
<t>Balance:</t>
_Balance:
</span>
<span class="amount" id="balance">
<htk-text
@ -43,7 +43,7 @@
<div id="main" class="orders">
<div class="card form">
<div>
<label><t>Show orders from</t></label>
<label>_Show orders from</label>
<htk-date-chooser lot="params" name="from"/>
</div>
</div>

View File

@ -8,7 +8,7 @@
</db-model>
</db-form>
<h1 id="title">
<t>OrderDetail</t>
_OrderDetail
</h1>
<div id="actions" class="action-bar">
<htk-bar-button
@ -29,7 +29,7 @@
</div>
<div>
<p>
<t>Delivery</t> <htk-text lot="ticket" name="Agencia"/>
_Delivery <htk-text lot="ticket" name="Agencia"/>
</p>
<p>
<htk-text lot="ticket" name="consignee"/>
@ -45,11 +45,11 @@
</div>
<div>
<p class="important total">
<t>Total</t>
_Total
<htk-text lot="ticket" name="total" format="%.2d€"/>
</p>
<p class="important total">
<t>Total + VAT</t>
_Total + VAT
<htk-text lot="ticket" name="totalPlusVat" format="%.2d€"/>
</p>
</div>

View File

@ -43,7 +43,7 @@
</div>
<div>
<label>_Priority</label>
<htk-entry form="iter" column="priority"/>
<htk-entry lot="iter" name="priority"/>
</div>
<div>
<label>_NewBody</label>

View File

@ -43,7 +43,7 @@
<htk-text lot="iter" name="Cliente"/>
</p>
<p>
<t>Priority</t>
_Priority
<htk-text lot="iter" name="priority"/>
</p>
</a>

View File

@ -99,7 +99,7 @@ module.exports = new Class
var error = new Error (message);
error.fileName = file;
error.lineNumber = line;
//this._notifyError (error);
this._notifyError (error);
}
,_onConnError: function (conn, error)

View File

@ -3,7 +3,7 @@
<div class="navbar">
<div>
<a href="#!form=cms/about&amp;guest=true">
<t>Log in as guest</t>
_Log in as guest
</a>
</div>
</div>
@ -16,16 +16,16 @@
<div class="version-code"/>
</div>
<div class="form-group">
<label for="user"><t>User</t></label>
<label for="user">_User</label>
<input type="text" id="user" name="user"/>
</div>
<div class="form-group">
<label for="pass"><t>Password</t></label>
<label for="pass">_Password</label>
<input type="password" id="pass" name="password"/>
</div>
<div>
<input type="checkbox" id="remember" name="remember"/>
<label for="remember"><t>Do not sign out</t></label>
<label for="remember">_Do not sign out</label>
</div>
<div class="enter">
<input id="submit" type="submit" value="_Enter"/>
@ -34,7 +34,7 @@
</div>
<p>
<a href="#" on-click="onPasswordLost">
<t>Password forgotten? Push here</t>
_Password forgotten? Push here
</a>
</p>
</div>
@ -42,10 +42,10 @@
<hr/>
</div>
<div>
<p><t>Yet you are not a customer?</t></p>
<p>_Yet you are not a customer?</p>
<a target="_blank" href="https://goo.gl/forms/acgmJcAPhQL6MOMO2">
<button type="button">
<t>Sign up</t>
_Sign up
</button>
</a>
</div>
@ -53,8 +53,8 @@
<htk-social-bar id="social-bar" priority="1"/>
<div id="social" class="social"/>
<div class="contact">
<p><t>Login mail</t></p>
<p><t>Login phone</t></p>
<p>_Login mail</p>
<p>_Login phone</p>
</div>
</div>
</form>

View File

@ -5,11 +5,11 @@
enctype="multipart/form-data">
<input type="hidden" name="srv" value="json:image/upload"/>
<div class="form-group">
<label for="name"><t>FileName</t></label>
<label for="name">_FileName</label>
<input id="name" type="text" name="name" on-change="onNameChange"/>
</div>
<div class="form-group">
<label for="file"><t>File</t></label>
<label for="file">_File</label>
<input id="file" type="file" name="image"/>
</div>
<div class="footer">

View File

@ -166,8 +166,8 @@ td.cell-image .htk-image
{
max-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Button */

View File

@ -199,6 +199,10 @@ module.exports = new Class
{
var contexts = this._contexts;
var objects = scope.objects;
var compilers = this._compilers;
for (var i = 0; i < compilers.length; i++)
compilers[i].preLink (scope);
for (var i = 0; i < contexts.length; i++)
{
@ -212,21 +216,20 @@ module.exports = new Class
context.compiler.connect (context, objects[i], objects, scope);
}
var compilers = this._compilers;
for (var i = 0; i < compilers.length; i++)
compilers[i].postLink (scope);
}
/**
* Logs an error parsing the node.
/**
* Logs an error parsing the node.
*
* @param {String} error The error message template
* @param {...} varArgs The message template arguments
*/
*/
,showError: function (error)
{
var path = this._path ? this._path : 'Node';
var logArgs = ['Vn.Builder: %s: '+ error, path];
var path = this._path ? this._path : '<unknown template>';
var logArgs = ['%s: '+ error, path];
for (var i = 1; i < arguments.length; i++)
logArgs.push (arguments[i]);

View File

@ -15,12 +15,12 @@ var objectAttrs = {
*/
module.exports = new Class
({
Extends: Compiler
Extends: Compiler
,compile: function (builder, node, tagName)
{
if (!tagName)
return null;
if (!tagName)
return null;
var props = {};
var objectProps = {};

View File

@ -14,16 +14,16 @@ var specialAttrs = {
*/
module.exports = new Class
({
Extends: Compiler
Extends: Compiler
,_links: []
,_links: []
,compile: function (builder, node, tagName)
{
var klass = vnCustomTags[tagName];
if (!klass)
return null;
return null;
var props = {};
var objectProps = {};
@ -97,7 +97,7 @@ module.exports = new Class
,propCompile: function (context, klass, node, attribute, value)
{
var isLink = false;
var propError = false;
var propError = false;
var newValue = null;
var propName = kebabToCamel (attribute);
var propInfo = klass.Properties[propName];
@ -149,9 +149,9 @@ module.exports = new Class
else if (newValue != null)
context.props[propName] = newValue;
else if (propError)
this.showError ('Attribute \'%s\' invalid for tag \'%s\'',
this.showError ('Attribute \'%s\' invalid for tag \'%s\'',
attribute, node.tagName);
}
}
,postCompile: function (contextMap)
{
@ -174,16 +174,16 @@ module.exports = new Class
links.splice (i, 1);
}
}
,addLink: function (context, prop, objectId)
{
this._links.push ({
context: context
context: context
,prop: prop
,objectId: objectId
});
}
,instantiate: function (doc, context, scope)
{
var object = new context.klass ();
@ -193,13 +193,13 @@ module.exports = new Class
object.htmlId = scope.getHtmlId (context.nodeId);
return object;
}
}
,preLink: function (scope)
{
var objects = scope.objects;
var links = this._links;
for (var i = links.length - 1; i >= 0; i--)
{
var link = links[i];
@ -217,9 +217,9 @@ module.exports = new Class
object[link.prop] = objectRef;
else
object.appendChild (objectRef);
}
}
}
}
,link: function (context, object, objects, scope)
{
var objectProps = context.objectProps;
@ -233,7 +233,7 @@ module.exports = new Class
if (context.custom)
object.loadXml (scope, context.custom);
}
,connect: function (context, object, objects, scope)
{
var funcProps = context.funcProps;
@ -254,7 +254,7 @@ module.exports = new Class
object.on (event, method, scope.signalData);
}
}
,_replaceFunc: function (token)
{
return token.charAt(1).toUpperCase ();

View File

@ -6,66 +6,67 @@ var VnObject = require ('./object');
*/
module.exports = new Class
({
Extends: VnObject
Extends: VnObject
,compile: function () {}
,postCompile: function () {}
,instantiate: function () {}
,link: function () {}
,connect: function () {}
,postLink: function () {}
,compile: function () {}
,postCompile: function () {}
,instantiate: function () {}
,preLink: function () {}
,link: function () {}
,connect: function () {}
,postLink: function () {}
,initialize: function (builder)
{
this._builder = builder;
this.parent ();
}
,initialize: function (builder)
{
this._builder = builder;
this.parent ();
}
/**
* Translates a string if it's a translatable string.
*
* @param {String} value The string to check and translate
* @return {String} The translated string or the same string if it is not translatable
*/
,translateValue: function (value)
{
switch (value.charAt (0))
{
case '_':
return _(value.substr (1));
case '\\':
switch (value.charAt(1))
{
case '_':
case '\\':
return value.substr (1);
default:
return value;
}
default:
return value;
}
}
/**
* Checks if the passed attribute name it's an event.
*
* @param {String} attribute The attribute name
* @return {Boolean} %true if it's an event, otherwise %false
*/
,isEvent: function (attribute)
{
return /^on-\w+/.test (attribute);
}
/**
* Translates a string if it's a translatable string.
*
* @param {String} value The string to check and translate
* @return {String} The translated string or the same string if it is not translatable
*/
,translateValue: function (value)
{
switch (value.charAt (0))
{
case '_':
return _(value.substr (1));
case '\\':
switch (value.charAt(1))
{
case '_':
case '\\':
return value.substr (1);
default:
return value;
}
default:
return value;
}
}
/**
* Logs an error parsing the node.
/**
* Checks if the passed attribute name it's an event.
*
* @param {String} attribute The attribute name
* @return {Boolean} %true if it's an event, otherwise %false
*/
,isEvent: function (attribute)
{
return /^on-\w+/.test (attribute);
}
/**
* Logs an error parsing the node.
*
* @param {String} error The error message template
* @param {...} varArgs The message template arguments
*/
*/
,showError: function ()
{
this._builder.showError.apply (this._builder, arguments);
}
this._builder.showError.apply (this._builder, arguments);
}
});

View File

@ -31,7 +31,7 @@ module.exports = new Class
* Fetchs an element by it's identifier.
*
* @param {String} id The node identifier
* @return {Object} The object or %null if it doesn't exists
* @return {Object} The object or %null if it doesn't exists
*/
,$: function (id)
{
@ -55,7 +55,7 @@ module.exports = new Class
* Fetchs an element by it's identifier.
*
* @param {String} id The node identifier
* @return {Object} The object or %null if it doesn't exists
* @return {Object} The object or %null if it doesn't exists
*/
,getById: function (id)
{
@ -66,7 +66,7 @@ module.exports = new Class
* Fetchs a set of elements by it's tag name.
*
* @param {String} tagName The object tag name
* @return {Array[Object]} The list of objects or an empty array
* @return {Array[Object]} The list of objects or an empty array
*/
,getByTagName: function (tagName)
{

View File

@ -1,7 +1,7 @@
module.exports = {
kebabToCamel: kebabToCamel,
kebabToPascal: kebabToPascal
kebabToCamel: kebabToCamel,
kebabToPascal: kebabToPascal
};
/**
@ -12,12 +12,12 @@ module.exports = {
*/
function kebabToCamel (string)
{
function replaceFunc (token)
{
return token.charAt(1).toUpperCase ();
}
function replaceFunc (token)
{
return token.charAt(1).toUpperCase ();
}
return string.replace (/-./g, replaceFunc);
return string.replace (/-./g, replaceFunc);
}
/**
@ -28,6 +28,6 @@ function kebabToCamel (string)
*/
function kebabToPascal (string)
{
string = string.charAt (0).toUpperCase () + string.substr (1);
return kebabToCamel (string);
string = string.charAt (0).toUpperCase () + string.substr (1);
return kebabToCamel (string);
}

View File

@ -1,4 +1,4 @@
{
"Import": "Importe"
"Import": "Importe"
,"Total + VAT": "Total + IVA"
}

View File

@ -26,7 +26,7 @@
(<htk-text lot="ticket" name="province"/>)
</p>
<p>
<t>Delivery</t> <htk-text lot="ticket" name="Agencia"/>
_Delivery <htk-text lot="ticket" name="Agencia"/>
</p>
</div>
<htk-grid>
@ -44,11 +44,11 @@
</htk-grid>
<div class="footer">
<p>
<t>Total</t>
_Total
<htk-text lot="ticket" name="total" format="%.2d€"/>
</p>
<p>
<t>Total + VAT</t>
_Total + VAT
<htk-text lot="ticket" name="totalPlusVat" format="%.2d€"/>
</p>
</div>

View File

@ -1,7 +1,7 @@
<vn>
<div id="report" class="items sheet">
<h1>
<t>Item list</t>
_Item list
</h1>
<htk-grid>
<db-model

View File

@ -3,11 +3,11 @@
function getUrl ($fileName)
{
if (file_exists ($fileName))
$mTime = '?'. strftime ('%G%m%d%H%M%S', filemtime ($fileName));
else
$mTime = '?'. $this->getVersion ();
return $fileName.$mTime;
$mTime = '?'. strftime ('%G%m%d%H%M%S', filemtime ($fileName));
else
$mTime = '?'. $this->getVersion ();
return $fileName.$mTime;
}
function js ($fileName)

View File

@ -1,6 +1,6 @@
{
"buildDir": "build",
"devServerPort": 9000,
"buildDir": "build",
"devServerPort": 9000,
"entry": {
"main": "./app.js",
"vendor": "mootools"