|
32 | 32 | function draw_item_options(file, itemname, divid, options, factor) { |
33 | 33 | var arr = options.split(";"); |
34 | 34 |
|
| 35 | + var fname = (file.fURL.indexOf("http://")==0) ? fname : "demo/"+ file.fURL; |
| 36 | + |
35 | 37 | var has_equal = false; |
36 | | - var html = "Supported options: "; |
| 38 | + |
| 39 | + var html = 'File: <a href="../index.htm?file=' + fname + '" target="_blank">' + fname.slice(fname.lastIndexOf('/')+1) + '</a>'; |
37 | 40 | for (var i in arr) { |
38 | | - if (i>0) html += ", "; |
39 | | - html += '<a href="../index.htm?nobrowser&file='; |
40 | | - if (file.fURL.indexOf("http://")==0) html += file.fURL; |
41 | | - else html += "demo/"+ file.fURL; |
| 41 | + if (i==0) html += " Item: "; else |
| 42 | + if (i==1) html += " Options: "; else html += ", "; |
| 43 | + html += '<a href="../index.htm?nobrowser&file=' + fname; |
42 | 44 | html += '&item=' + itemname + '&'; |
43 | 45 |
|
44 | 46 | if (arr[i].indexOf("=")<0) html += 'opt=' + arr[i]; |
45 | 47 | else { html += arr[i]; has_equal = true; } |
46 | 48 |
|
47 | 49 | html += '" target="_blank">'; |
| 50 | + if (i==0) html += itemname; else |
48 | 51 | if (arr[i] == "") html += '<default>'; else html += arr[i]; |
49 | 52 | html += '</a>'; |
50 | 53 | } |
|
63 | 66 | if (factor!=null) h = w * factor; |
64 | 67 |
|
65 | 68 | for (var i in arr) { |
66 | | - var subid = divid + "_" + arr[i]; |
| 69 | + var subid = divid + "_" + i; |
67 | 70 |
|
68 | 71 | var html = '<div id="' + subid + '" style="width:'+w+'px; height:'+h+'px"></div>'; |
69 | 72 | $("#" + divid).append(html); |
|
159 | 162 | LoadFile("can4.root", function(file) { |
160 | 163 | draw_item_options(file, "c1;1", "can8_draw", "", 0.); |
161 | 164 | }); |
| 165 | + LoadFile("higgs_c.root", function(file) { |
| 166 | + draw_item_options(file, "c;1", "can9_draw", "col=1;col=2;col=3", 0.); |
| 167 | + }); |
162 | 168 | } |
163 | 169 |
|
164 | | - LoadFile("higgs_c.root", function(file) { |
165 | | - draw_item_options(file, "c;1", "can9_draw", "col=1;col=2;col=3", 0.); |
166 | | - }); |
167 | | - |
168 | | - |
169 | 170 |
|
170 | 171 | // JSROOT.RegisterForResize(function() { if (objpainter) objpainter.CheckResize(); }); |
171 | 172 | } |
|
0 commit comments