X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=testing%2FMCTXWeb%2Fpublic_html%2Fstatic%2Fmctx.graph.js;h=851fff2503ac0c9f8f4c6b55171d25d9fe5ad1e8;hb=e5463d461c4316cb5c47c8e265d3b900470ba970;hp=de5ecb3fb3a291abf252dabb3c5b4839eb0a5223;hpb=dd5ae3e50b2d77cf0cc1a2805c91d518270c8537;p=matches%2FMCTX3420.git
diff --git a/testing/MCTXWeb/public_html/static/mctx.graph.js b/testing/MCTXWeb/public_html/static/mctx.graph.js
index de5ecb3..851fff2 100644
--- a/testing/MCTXWeb/public_html/static/mctx.graph.js
+++ b/testing/MCTXWeb/public_html/static/mctx.graph.js
@@ -66,14 +66,17 @@ $.fn.deployDevices = function(input_type, check_first, group) {
var container = this;
var apply = function(dict, prefix) {
$.each(dict, function(key, val) {
+ //Unique id (name mangling)
+ var id = container.attr('id') + "_" + prefix + "_" + val.name;
+
var attributes = {
- 'type' : input_type, 'value' : key, 'alt' : val,
+ 'type' : input_type, 'value' : key, 'alt' : val.name,
'class' : prefix, 'name' : group,
- 'id' : prefix + '_' + val //Unique id (name mangling)
+ 'id' : id
};
var entry = $("", attributes);
- var label = $("", {'for' : prefix + '_' + val, 'text' : val});
+ var label = $("", {'for' : id, 'text' : val.name});
entry.prop("checked", check_first);
check_first = false;
container.append(entry).append(label);