diff options
| author | qsm-odoo <qsm@odoo.com> | 2016-02-24 13:13:12 +0100 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2016-02-24 13:47:36 +0100 |
| commit | 6610d05549e347fbb548e606fa66cfb113df9e67 (patch) | |
| tree | fc750ca544b5caa135791c0eaeb10dfee17eefa3 /addons/website/static/src/js/web_planner_website.js | |
| parent | 58c5ff1d4f64f16d43106e6b00f0b94fe63506c2 (diff) | |
[REF] web_editor,website,mass_mailing: JS/XML update
* Adapt DOM selectors
* Refactore dialog XMLs to have odoo styling
* New editor options (background-position, ...)
* Various improvements
Diffstat (limited to 'addons/website/static/src/js/web_planner_website.js')
| -rw-r--r-- | addons/website/static/src/js/web_planner_website.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/addons/website/static/src/js/web_planner_website.js b/addons/website/static/src/js/web_planner_website.js index 835e26594f7..58da5432a66 100644 --- a/addons/website/static/src/js/web_planner_website.js +++ b/addons/website/static/src/js/web_planner_website.js @@ -10,13 +10,13 @@ require('web_editor.base'); // wait for implicit dependencies to load var qweb = core.qweb; -if(!$('#oe_systray').length) { - return $.Deferred().reject("DOM doesn't contain '#oe_systray'"); +if(!$('#oe_main_menu_navbar').length) { + return $.Deferred().reject("DOM doesn't contain #oe_main_menu_navbar"); } var WebsitePlannerLauncher = Widget.extend({ template: "PlannerLauncher", - start: function() { + start: function () { var self = this; var res = this._super.apply(this, arguments); this.$('.progress').show(); @@ -29,22 +29,22 @@ var WebsitePlannerLauncher = Widget.extend({ } }); }, - get_website_planner: function() { + get_website_planner: function () { return (new Model('web.planner')).call('search_read', [[['planner_application', '=', 'planner_website']]]); }, - setup: function() { + setup: function () { var self = this; this.dialog = new planner.PlannerDialog(this, this.planner); this.dialog.appendTo($('<div>')); this.$(".progress").tooltip({html: true, title: this.planner.tooltip_planner, placement: 'bottom', container: 'body', delay: {'show': 700}}); - this.dialog.on("planner_progress_changed", this, function(percent) { + this.dialog.on("planner_progress_changed", this, function (percent) { self.update_parent_progress_bar(percent); }); }, - update_parent_progress_bar: function(percent) { + update_parent_progress_bar: function (percent) { this.$(".progress-bar").css('width', percent+"%"); }, - show_dialog: function() { + show_dialog: function () { this.dialog.$el.appendTo(document.body); this.dialog.$el.modal('show'); }, @@ -52,7 +52,7 @@ var WebsitePlannerLauncher = Widget.extend({ return ajax.loadXML('/web_planner/static/src/xml/web_planner.xml', qweb).then(function() { var websitePlannerLauncher = new WebsitePlannerLauncher(); - websitePlannerLauncher.prependTo($('#oe_systray')); + websitePlannerLauncher.prependTo($('#oe_main_menu_navbar .o_menu_systray')); }); }); |
