summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/embed.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@openerp.com>2011-12-14 13:56:58 +0100
committerChristophe Simonis <chs@openerp.com>2011-12-14 13:56:58 +0100
commit6da5e9245e5f680866e4bf64c92e653127dfbb55 (patch)
tree781240582c02e030e1481638f23eea8bb3a2f351 /addons/web/static/src/js/embed.js
parent5cd5755495df46fbddf271d3664e38586c9b674c (diff)
[IMP] Rename EmbedClient to EmbeddedClient and move it to chrome.js.
[IMP] move the currentScript function to root namespace bzr revid: chs@openerp.com-20111214125658-huw4955d7zo2y37g
Diffstat (limited to 'addons/web/static/src/js/embed.js')
-rw-r--r--addons/web/static/src/js/embed.js50
1 files changed, 0 insertions, 50 deletions
diff --git a/addons/web/static/src/js/embed.js b/addons/web/static/src/js/embed.js
deleted file mode 100644
index 1c261060da8..00000000000
--- a/addons/web/static/src/js/embed.js
+++ /dev/null
@@ -1,50 +0,0 @@
-openerp.web.embed = function(session) {
-
- session.util = session.util || {}
- session.util.currentScript = function() {
- var currentScript = document.currentScript;
- if (!currentScript) {
- var sc = document.getElementsByTagName('script');
- currentScript = sc[sc.length-1];
- }
- return currentScript;
- };
-
-
- /*
- session.connection.on_session_invalid.add_last(function() {
- console.error("invalid session", arguments);
- });
- // */
-
-
- session.web.EmbedClient = session.web.Widget.extend({
- template: 'EmptyComponent',
- init: function(action_id, options) {
- this._super();
- this.action_id = action_id;
- this.options = options || {};
- this.am = new session.web.ActionManager();
- },
-
- start: function() {
- var self = this;
-
- this.am.appendTo(this.$element.addClass('openerp'));
-
- return this.rpc("/web/action/load", { action_id: this.action_id }, function(result) {
- var action = result.result;
- action.flags = _.extend({
- //views_switcher : false,
- search_view : false,
- action_buttons : false,
- sidebar : false
- //pager : false
- }, self.options, action.flags || {});
-
- self.am.do_action(action);
- });
- },
-
- });
-};