Commit 4a80355d authored by Łukasz Nowak's avatar Łukasz Nowak

slapos_jio: Implement annotated help with gadget_pagehelp

parent f3b88846
......@@ -18,9 +18,15 @@
<!-- custom script -->
<script src="gadget_slapos_utils.js" type="text/javascript"></script>
<script src="gadget_erp5_page_slap_ticket_list.js" type="text/javascript"></script>
</head>
<body>
<p style="display: none;" id="pagehelp">
This is list of tickets related to your subscriptions.<br>
Open ticket means, it is handled by Rapid.Space team.<br>
Suspended ticket requires your reply.<br>
Closed tickets are finished ones.<br>
</p>
<div data-gadget-url="gadget_pagehelp.html" data-gadget-scope="pagehelp"></div>
<div data-gadget-url="gadget_erp5_pt_form_list.html" data-gadget-scope="form_list"></div>
</body>
</html>
......
/*global window, rJS, RSVP */
/*global window, rJS, RSVP, document */
/*jslint nomen: true, indent: 2, maxerr: 3*/
(function (window, rJS, RSVP) {
"use strict";
......@@ -26,6 +26,15 @@
return gadget.triggerSubmit.apply(gadget, argument_list);
});
})
.declareService(function () {
var helptext = document.getElementById("pagehelp").innerText;
return this.getDeclaredGadget("pagehelp")
.push(function (gadget) {
return gadget.changeState({
helptext: helptext
});
});
})
.declareMethod("render", function () {
var gadget = this,
lines_limit,
......@@ -119,4 +128,4 @@
});
});
});
}(window, rJS, RSVP));
\ No newline at end of file
}(window, rJS, RSVP, document));
\ No newline at end of file
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