Franck Pommereau

show net within dialog

...@@ -58,7 +58,12 @@ class Simulator (BaseHTTPSimulator) : ...@@ -58,7 +58,12 @@ class Simulator (BaseHTTPSimulator) :
58 def init_model (self) : 58 def init_model (self) :
59 return self.res["model.html"] % self.info 59 return self.res["model.html"] % self.info
60 def init_ui (self) : 60 def init_ui (self) :
61 - return BaseHTTPSimulator.init_ui(self)[:-1] 61 + return BaseHTTPSimulator.init_ui(self)[:-1] + [{
62 + "label" : "Show net",
63 + "id" : "ui-shownet",
64 + "href" : "#",
65 + "script" : "dialog($('#model .petrinet').html())"
66 + }]
62 def init_help (self) : 67 def init_help (self) :
63 help = BaseHTTPSimulator.init_help(self) 68 help = BaseHTTPSimulator.init_help(self)
64 help.update({"#model .abcd" : "ABCD source code", 69 help.update({"#model .abcd" : "ABCD source code",
......
...@@ -93,7 +93,8 @@ body { ...@@ -93,7 +93,8 @@ body {
93 } 93 }
94 94
95 #dialog-close { 95 #dialog-close {
96 - display: inline; 96 + /* TODO: fix position when dialog has a horizontal scrollbar */
97 + display: block;
97 float: right; 98 float: right;
98 border: solid 1px #AAA; 99 border: solid 1px #AAA;
99 padding: 5px 10px; 100 padding: 5px 10px;
......