author | Andrey Skvortsov <andrej.skvortzov@gmail.com> |
Wed, 23 May 2018 11:47:56 +0300 | |
changeset 2014 | e6ff712e20f8 |
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); |