diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-07-31 08:04:20 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-07-31 08:04:20 +0000 |
commit | 34f92700da268b74b52aa3f2b6c9e1e2da6ad591 (patch) | |
tree | f1521730f8d1713a46aa84f206d25e8506769412 /java/sca/modules/domain-manager/src/main/resources/utils.js | |
parent | f47f6707497e8645da513d6abbe9fe280e0b7fe2 (diff) |
Improved the Domain Manager widgets to use HTML divs for presentation and iframes for script isolation. This provides better control and performance of the layout while preserving isolation between the scripts of the individual widgets.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@681295 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/domain-manager/src/main/resources/utils.js')
-rw-r--r-- | java/sca/modules/domain-manager/src/main/resources/utils.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/java/sca/modules/domain-manager/src/main/resources/utils.js b/java/sca/modules/domain-manager/src/main/resources/utils.js index c382ab9e5a..611aaceadc 100644 --- a/java/sca/modules/domain-manager/src/main/resources/utils.js +++ b/java/sca/modules/domain-manager/src/main/resources/utils.js @@ -184,3 +184,33 @@ function array(obj) { return a; } } + +/** + * Utility function thats dumps a Javascript object to the console + */ +function dump(o) { + for (f in o) { + try { + console.log(f + '=' + o[f]); + } catch (e) {} + } +} + +function content(win) { + if (win.document != 'undefined' && win.document != null) { + return win.document; + } else if (win.contentDocument != 'undefined' && win.contentDocument != null) { + return win.contentDocument; + } else { + return null; + } +} + +function gadget(win, doc) { + if (win.parent.ongadget != null && win.parent.ongadget != 'undefined') { + return win.parent.ongadget(win, doc); + } else { + return doc; + } +} +
\ No newline at end of file |