diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2010-12-29 07:24:43 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2010-12-29 07:24:43 +0000 |
commit | fc4d80fd2083d48e6923faac1b6a038247079e50 (patch) | |
tree | 1a07dce7ceb7d4cc5198406ad06a0f7ff1bc8e95 /sca-cpp/trunk/modules/js/htdocs/ui.js | |
parent | 2fedb4a4b67f7856bbfc5d1508524ef9c3d85942 (diff) |
Skeleton of a composite app editor module.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1053560 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/js/htdocs/ui.js')
-rw-r--r-- | sca-cpp/trunk/modules/js/htdocs/ui.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sca-cpp/trunk/modules/js/htdocs/ui.js b/sca-cpp/trunk/modules/js/htdocs/ui.js index fcd61571d1..2f5c6d3ae9 100644 --- a/sca-cpp/trunk/modules/js/htdocs/ui.js +++ b/sca-cpp/trunk/modules/js/htdocs/ui.js @@ -197,16 +197,26 @@ ui.elementByID = function(node, id) { function $(id) { if (id == document) { if (!isNil(document.widget)) - return widget; + return document.widget; return document; } return ui.elementByID($(document), id); }; /** - * Initialize a widget. + * Bind a widget iframe to an element. */ -ui.onloadwidget = function() { +ui.widgets = new Array(); + +ui.bindwidget = function(f, el) { + window.ui.widgets[f] = el; + return f; +}; + +/** + * Install a widget into the element bound to its iframe. + */ +ui.installwidget = function() { if (isNil(window.parent) || isNil(window.parent.ui) || isNil(window.parent.ui.widgets)) return true; var pdoc = ui.content(window.parent); @@ -221,13 +231,3 @@ ui.onloadwidget = function() { return true; }; -/** - * Load a widget into an element. - */ -ui.widgets = new Array(); - -ui.bindwidget = function(f, el) { - window.ui.widgets[f] = el; - return f; -}; - |