equal
deleted
inserted
replaced
|
1 // import Nevow.Athena |
|
2 |
|
3 function init() { |
|
4 Nevow.Athena.Widget.fromAthenaID(1).callRemote('HMIexec', 'HMIinitialisation'); |
|
5 } |
|
6 |
|
7 WebInterface.PLC = Nevow.Athena.Widget.subclass('WebInterface.PLC'); |
|
8 WebInterface.PLC.method( |
|
9 'updateHMI', |
|
10 function (self, data) { |
|
11 d = self.callRemote('getPLCElement'); |
|
12 d.addCallback( |
|
13 function liveElementReceived(le) { |
|
14 d2 = self.addChildWidgetFromWidgetInfo(le); |
|
15 d2.addCallback( |
|
16 function childAdded(widget) { |
|
17 var node = self.nodeById('content'); |
|
18 node.replaceChild(widget.node, node.getElementsByTagName('div')[0]); |
|
19 init(); |
|
20 }); |
|
21 }); |
|
22 }); |
|
23 |
|
24 Divmod.Base.addLoadEvent(init); |