diff --git a/debian/changelog b/debian/changelog
index 9eb9e1f9..66f78051 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-hedera-web (1.407.81) stable; urgency=low
+hedera-web (1.407.82) stable; urgency=low
* Initial Release.
diff --git a/forms/ecomerce/checkout/checkout.js b/forms/ecomerce/checkout/checkout.js
index 386d0eb1..b20e6ad9 100644
--- a/forms/ecomerce/checkout/checkout.js
+++ b/forms/ecomerce/checkout/checkout.js
@@ -11,20 +11,20 @@ Hedera.Checkout = new Class({
},
onValuesReady: function() {
- var orderForm = this.$.orderForm;
- var defaultsForm = this.$.defaults;
+ const orderForm = this.$.orderForm;
+ const defaultsForm = this.$.defaults;
if (!(orderForm.ready && defaultsForm.ready))
return;
- var date;
- const row = orderForm.$ || defaultsForm.$;
+ let date;
+ const row = orderForm.$ || defaultsForm.$ || {};
if (!date || date.getTime() < (new Date()).getTime()) {
date = new Date();
date.setHours(0, 0, 0, 0);
- var addDays = 0;
+ let addDays = 0;
switch(date.getDay()) {
case 6: // Saturday
@@ -57,7 +57,7 @@ Hedera.Checkout = new Class({
onConfirmClick: function() {
this.disableButtons(true);
- var query = 'CALL myBasket_configure(#date, #method, #agency, #address)';
+ const query = 'CALL myBasket_configure(#date, #method, #agency, #address)';
this.conn.execQuery(query,
this.onBasketConfigured.bind(this), this.$.lot.$);
},
@@ -160,10 +160,10 @@ Hedera.Checkout = new Class({
if (this.selectedNode)
Vn.Node.removeClass(this.selectedNode, 'selected');
- var row = this.$.addresses.search('id', this.$.lot.$.address);
+ const row = this.$.addresses.search('id', this.$.lot.$.address);
if (row != -1) {
- var builder = this.$.repeater.getBuilder(row);
+ const builder = this.$.repeater.getBuilder(row);
this.selectedNode = builder.$.address;
Vn.Node.addClass(this.selectedNode, 'selected');
@@ -176,15 +176,21 @@ Hedera.Checkout = new Class({
if (!model.ready) return;
if (model.numRows > 0) {
- var agency;
- var defaults = [
- this.$.orderForm.$.agencyModeFk,
- this.$.defaults.$.agencyModeFk,
- this.$.defaults.$.defaultAgencyFk
- ];
+ let agency;
+ const agencies = [];
- for (var i = 0; i < defaults.length; i++) {
- agency = defaults[i];
+ if (this.$.orderForm.$)
+ agencies.push(this.$.orderForm.$);
+
+ const defaults = this.$.defaults.$;
+ if (defaults)
+ agencies.push(
+ defaults.agencyModeFk,
+ defaults.defaultAgencyFk
+ );
+
+ for (let i = 0; i < agencies.length; i++) {
+ agency = agencies[i];
if (model.search('id', agency) !== -1)
break;
}
diff --git a/forms/news/new/new.js b/forms/news/new/new.js
index d3b68aec..9581a1a1 100644
--- a/forms/news/new/new.js
+++ b/forms/news/new/new.js
@@ -12,8 +12,7 @@ Hedera.New = new Class({
new Sql.Function({schema: 'account', name: 'myUser_getId'}));
tinymce.init({
- mode : 'exact'
- ,target: this.$.htmlEditor
+ target: this.$.htmlEditor
,plugins: [
"advlist autolink lists link image charmap print preview hr"
,"anchor pagebreak searchreplace wordcount visualblocks"
@@ -29,7 +28,7 @@ Hedera.New = new Class({
+" | forecolor backcolor"
,image_advtab: true
,init_instance_callback: this._onEditorInit.bind(this)
- });
+ });
},
deactivate: function() {
@@ -46,16 +45,12 @@ Hedera.New = new Class({
if (!this.editor)
return;
- var newHtml = this.$.iter.$.text;
-
- if (!newHtml)
- newHtml = '';
-
- this.editor.setContent(newHtml);
+ const row = this.$.iter.$;
+ this.editor.setContent(row ? row.text : '');
},
onStatusChange: function() {
- if (this.hash.$.new == 0)
+ if (!this.hash.$.new)
this.$.iter.insertRow();
},
@@ -71,6 +66,10 @@ Hedera.New = new Class({
onAcceptClick: function() {
this.$.iter.set('text', this.editor.getContent());
this.$.iter.performOperations();
+ },
+
+ onReturnClick: function() {
+ this.hash.setAll({form: 'news/news'});
}
});
});
diff --git a/forms/news/new/ui.xml b/forms/news/new/ui.xml
index b9b54964..54014e7f 100644
--- a/forms/news/new/ui.xml
+++ b/forms/news/new/ui.xml
@@ -20,7 +20,7 @@