Commit 1546ec91 authored by Sven Franck's avatar Sven Franck

debug: updates for Thierry

parent e41d3987
......@@ -826,10 +826,12 @@ html head + body .ui-body-slapos-black.ui-focus{
html .ui-header .ui-first-wrap .ui-controlgroup-controls .ui-btn {
border-right: 1px solid rgb(232, 232, 232);
border-right: 1px solid rgba(232, 232, 232, 0.5);
max-height: 41px;
}
html .ui-header .ui-last-wrap .ui-controlgroup-controls .ui-btn {
border-left: 1px solid rgb(47, 79, 79);
border-left: 1px solid rgba(0, 0, 0, 0.25);
max-height: 41px;
}
html .ui-header .ui-subheader {
border-top-color: rgb(47, 79, 79);
......
......@@ -4,7 +4,7 @@
"initial_query": {"include_docs": true, "limit":[0,1]},
"property_dict": {
"wrap_gadget": 1,
"submit_to": "#subscription/validate_order",
"submit_to": "#home",
"allow_new": true
},
"scheme": [
......@@ -127,7 +127,7 @@
}, {
"type": "input",
"direct": {"className": "action translate"},
"attributes": {"type": "submit", "data-action":"update_bip", "data-icon":"carat-r", "data-theme": "active", "data-i18n":"[value]portal_type_dict.sales_order_dict.text_dict.proceed"},
"attributes": {"type": "submit", "data-action":"done_bip", "data-icon":"edit", "data-theme": "active", "data-i18n":"[value]portal_type_dict.sales_order_dict.text_dict.save"},
"logic": {"wrapper_class_list": " ui-last-child "}
}]
}
......
......@@ -3110,6 +3110,74 @@
}
},
/**
* PUT an object
* @method update
* @param {object} obj Action Object
**/
"done_bip": function (obj) {
var element_list, i, len, value;
if (obj.form) {
element_list = obj.form.getElementsByTagName("input");
for (i = 0, len = element_list.length; i < len; i += 1) {
if (element_list[i].name === "identifier") {
value = element_list[i].value;
}
}
}
if (value) {
storage.fetch({
"query": {"_id": value},
"pass": obj.pass || {}
})
.then(function (reply) {
obj.backpack = reply.response.data.rows[0].doc;
})
.then(function () {
return storage.write(obj)
.then(function (response) {
alert(i18n.t("global_dict.thanks"));
app.navigate(obj, response);
})
.fail(function (error) {
switch (error.status) {
case 408:
app.util.loader("", "status_dict.timeout", "clock-o");
break;
case 400:
app.util.loader("", "validation_dict.general", "ban");
break;
default:
app.util.loader("", "status_dict.error", "ban");
break;
}
});
})
.fail(app.util.error);
} else {
storage.write(obj)
.then(function (response) {
alert(i18n.t("global_dict.thanks"));
app.navigate(obj, response);
})
.fail(function (error) {
switch (error.status) {
case 408:
app.util.loader("", "status_dict.timeout", "clock-o");
break;
case 400:
app.util.loader("", "validation_dict.general", "ban");
break;
default:
app.util.loader("", "status_dict.error", "ban");
break;
}
});
}
},
/**
* PUT an object
* @method update
......
{
"global_dict": {
"thanks": "Thank you for your subscription!",
"load_more": "Load more",
"external":"Additional Content",
"subscription": "Subscription",
......@@ -79,6 +80,7 @@
"portal_type_dict": {
"sales_order_dict": {
"text_dict": {
"save": "Subscribe",
"proceed": "Continue",
"electronic": "Electronic invoice",
"paper": "Paper Invoice (€0.85 per month)",
......
{
"global_dict": {
"thanks": "Merci pour votre souscription",
"load_more": "Encore plus",
"external": "A plus",
"subscription": "Abonnement",
......@@ -95,6 +96,7 @@
"portal_type_dict": {
"sales_order_dict": {
"text_dict": {
"save": "Abonné",
"electronic": "Facture électronique",
"paper": "Facture papier (0,85€ par mois)",
"choose_offer": "Choisissez votre offre",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment