author | Edouard Tisserant <edouard.tisserant@gmail.com> |
Thu, 19 Mar 2020 09:31:07 +0100 | |
branch | svghmi |
changeset 2886 | 6c82fad8be65 |
parent 719 | db54ccc96309 |
permissions | -rw-r--r-- |
369 | 1 |
// import Nevow.Athena |
2 |
||
381
5c0f34a9ab00
Improving support for svgui, separating setting end getting attributes functions from creating function.
laurent
parents:
369
diff
changeset
|
3 |
function init() { |
5c0f34a9ab00
Improving support for svgui, separating setting end getting attributes functions from creating function.
laurent
parents:
369
diff
changeset
|
4 |
Nevow.Athena.Widget.fromAthenaID(1).callRemote('HMIexec', 'HMIinitialisation'); |
5c0f34a9ab00
Improving support for svgui, separating setting end getting attributes functions from creating function.
laurent
parents:
369
diff
changeset
|
5 |
} |
5c0f34a9ab00
Improving support for svgui, separating setting end getting attributes functions from creating function.
laurent
parents:
369
diff
changeset
|
6 |
|
369 | 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]); |
|
381
5c0f34a9ab00
Improving support for svgui, separating setting end getting attributes functions from creating function.
laurent
parents:
369
diff
changeset
|
19 |
init(); |
369 | 20 |
}); |
21 |
}); |
|
381
5c0f34a9ab00
Improving support for svgui, separating setting end getting attributes functions from creating function.
laurent
parents:
369
diff
changeset
|
22 |
}); |
5c0f34a9ab00
Improving support for svgui, separating setting end getting attributes functions from creating function.
laurent
parents:
369
diff
changeset
|
23 |
|
5c0f34a9ab00
Improving support for svgui, separating setting end getting attributes functions from creating function.
laurent
parents:
369
diff
changeset
|
24 |
Divmod.Base.addLoadEvent(init); |