Commit bf2f828e authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Include a DummyGadget to build link-less Listboxes

The connection parameters should contains no link, so this change introduce a gadget field to avoid the listbox include links.

Next it will be possible include style (or links in case of URL), for the inputs.
parent 15efecc5
......@@ -44,6 +44,32 @@
value: 2713
};
}
if (1 || (result.data.rows[i].value.hasOwnProperty("connection_key"))) {
value = result.data.rows[i].value.connection_key;
result.data.rows[i].value.connection_key = {
css_class: "",
"default": value,
key: "status",
editable: 1,
url: "gadget_slapos_label_listbox_field.html",
title: "Status",
type: "GadgetField"
};
value = result.data.rows[i].value.connection_value;
result.data.rows[i].value.connection_value = {
css_class: "",
"default": value,
key: "status",
editable: 1,
url: "gadget_slapos_label_listbox_field.html",
title: "Status",
type: "GadgetField"
};
result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list",
value: 2713
};
}
}
return result;
});
......
......@@ -216,7 +216,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <string>ERP5TypeTestCase</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>965.32477.29628.37649</string> </value>
<value> <string>965.40909.53540.32853</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1518720201.31</float>
<float>1519139506.49</float>
<string>UTC</string>
</tuple>
</state>
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Background</title>
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="gadget_slapos_label_listbox_field.js"></script>
</head>
<body></body>
</html>
\ No newline at end of file
/*globals console, window, rJS, RSVP, loopEventListener, i18n, Handlebars $*/
/*jslint indent: 2, nomen: true, maxlen: 80*/
(function (window, rJS, RSVP, Handlebars) {
"use strict";
var gadget_klass = rJS(window);
gadget_klass
.declareAcquiredMethod("jio_get", "jio_get")
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
.declareAcquiredMethod("translateHtml", "translateHtml")
.declareMethod("getContent", function () {
return {};
})
.declareMethod("render", function (options) {
var gadget = this;
return gadget.getElement()
.push(function (element) {
element.innerHTML = options.value;
return element;
});
});
}(window, rJS, RSVP, Handlebars));
\ No newline at end of file
......@@ -5,6 +5,8 @@ web_page_module/rjs_gadget_erp5_page_slap_transfer_computer_html
web_page_module/rjs_gadget_erp5_page_map_html
web_page_module/rjs_gadget_slapos_appcache
web_page_module/rjs_gadget_erp5_page_map_js
web_page_module/rjs_gadget_slapos_label_listbox_field_js
web_page_module/rjs_gadget_slapos_label_listbox_field_html
web_page_module/rjs_gadget_erp5_page_slap_intent_js
web_page_module/rjs_gadget_erp5_page_slap_intent_html
web_page_module/rjs_gadget_slapos_software_release_info_js
......
......@@ -125,6 +125,8 @@ web_page_module/rjs_gadget_slapos_invoice_printout_html
web_page_module/rjs_gadget_slapos_invoice_printout_js
web_page_module/rjs_gadget_slapos_invoice_state_html
web_page_module/rjs_gadget_slapos_invoice_state_js
web_page_module/rjs_gadget_slapos_label_listbox_field_html
web_page_module/rjs_gadget_slapos_label_listbox_field_js
web_page_module/rjs_gadget_slapos_network_status_html
web_page_module/rjs_gadget_slapos_network_status_js
web_page_module/rjs_gadget_slapos_panel_html
......
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