diff --git a/addons/survey/static/src/css/survey.css b/addons/survey/static/src/css/survey.css new file mode 100644 index 00000000000..72cd1d6e106 --- /dev/null +++ b/addons/survey/static/src/css/survey.css @@ -0,0 +1,14 @@ +.oe_survey_title { + font-weight: bold; + font-size: 22px; + margin: 8px 0px 8px 0px; + color: #5B5B5B; +} + +.oe_survey_title_height{ + height: 33px; +} + +.oe_survey_title_page { + font-size: 14px; +} diff --git a/addons/survey/static/src/js/survey.js b/addons/survey/static/src/js/survey.js new file mode 100644 index 00000000000..e4711013156 --- /dev/null +++ b/addons/survey/static/src/js/survey.js @@ -0,0 +1,28 @@ +openerp.survey = function (instance) { + var QWeb = instance.web.qweb, + _t = instance.web._t; + instance.web.ViewManagerAction = instance.web.ViewManagerAction.extend({ + init: function(parent, action) { + this._super.apply(this,arguments); + console.log('hello'); + }, + on_mode_switch: function (view_type, no_store, options) { + var self = this; + return $.when(this._super.apply(this, arguments)).then(function () { + var controller = self.views[self.active_view].controller, + fvg = controller.fields_view, + view_id = (fvg && fvg.view_id) || '--'; + self.$element.find('.oe_debug_view').html(QWeb.render('ViewManagerDebug', { + view: controller, + view_manager: self + })); + if (!self.action.name && fvg) { + var title = self.$element.find('.oe_view_title_text'); + if(!_.isEmpty(title)) + title = $('.ui-dialog-title'); + title.text(fvg.arch.attrs.string || fvg.name); + } + }); + }, + }); +};