Commit 5836dae4 authored by Łukasz Nowak's avatar Łukasz Nowak

slapos_jio: De hard-code page for attention point

The page name shall come from Web Site configuration.
parent 8b4bc795
...@@ -21,10 +21,12 @@ ...@@ -21,10 +21,12 @@
}); });
function createAttentionPointTemplate(gadget, attention_point) { function createAttentionPointTemplate(gadget, attention_point) {
return gadget.getSetting("jio_document_page_gadget")
.push(function (result) {
if (attention_point.link) { if (attention_point.link) {
return gadget.getUrlFor({command: 'change', return gadget.getUrlFor({command: 'change',
options: {jio_key: attention_point.link, options: {jio_key: attention_point.link,
"page": "slap_controller"}}) "page": result}})
.push(function (link) { .push(function (link) {
return gadget.translateHtml(attention_point_item_template({ return gadget.translateHtml(attention_point_item_template({
option: [{ option: [{
...@@ -41,11 +43,13 @@ ...@@ -41,11 +43,13 @@
}] }]
})); }));
} }
});
} }
gadget_klass gadget_klass
////////////////////////////////////////////// //////////////////////////////////////////////
// acquired method // acquired method
////////////////////////////////////////////// //////////////////////////////////////////////
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("translateHtml", "translateHtml") .declareAcquiredMethod("translateHtml", "translateHtml")
.declareAcquiredMethod("redirect", "redirect") .declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("trigger", "trigger") .declareAcquiredMethod("trigger", "trigger")
......
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