diff --git a/addons/pad/static/src/css/etherpad.css b/addons/pad/static/src/css/etherpad.css index 8a867f42402..a0240afcab7 100644 --- a/addons/pad/static/src/css/etherpad.css +++ b/addons/pad/static/src/css/etherpad.css @@ -1,29 +1,32 @@ -.etherpad_head{ +.oe_etherpad_head{ width: 100%; display: block; padding-left:3px; cursor:pointer; } -.etherpad_zoom_head{ - position: fixed; - left: 0px; - top: 0px; - width: 100%; - height: 15px; +.oe_etherpad_fullscreen div.oe_etherpad_head .oe_normal { + display: none; } -.etherpad_zoom{ +.oe_etherpad_normal div.oe_etherpad_head .oe_fullscreen { + display: none; +} +.oe_etherpad_fullscreen { position: fixed; + top: 0px; left: 0px; - top: 15px; width: 100%; - height: 100% !important; + height: 100%; + background-color: white; z-index:10001 !important; - background-color:white; } .etherpad_default{ width: 100%; height: 450px; } +.oe_etherpad_fullscreen .etherpad_default{ + height: 100% +} + .etherpad_body{ overflow:hidden; } @@ -50,7 +53,6 @@ list-style-type: none !important; } - .etherpad_readonly{ font-family: arial, sans-serif; font-size: 13px; diff --git a/addons/pad/static/src/js/pad.js b/addons/pad/static/src/js/pad.js index 5749f4d7523..5736d42bbab 100644 --- a/addons/pad/static/src/js/pad.js +++ b/addons/pad/static/src/js/pad.js @@ -4,13 +4,9 @@ instance.web.form.FieldEtherpad = instance.web.form.AbstractField.extend(_.exten template: 'FieldEtherpad', initialize_content: function() { this.$textarea = undefined; - this.$element.find('span').text('Fullscreen'); - this.$element.find('span').click(_.bind(function(ev){ - this.$element.find('span').toggleClass('etherpad_zoom_head'); - var iszoom = this.$element.find('span').hasClass('etherpad_zoom_head'); - this.$element.find('span').text((iszoom?'Back to Task':this.field.string)); - this.$element.find('div').toggleClass('etherpad_zoom'); - $("body").toggleClass('etherpad_body'); + this.$element.find('div.oe_etherpad_head').click(_.bind(function(ev){ + this.$element.toggleClass('oe_etherpad_fullscreen').toggleClass('oe_etherpad_normal'); + },this)); }, set_value: function(value_) { @@ -21,7 +17,7 @@ instance.web.form.FieldEtherpad = instance.web.form.AbstractField.extend(_.exten var show_value = instance.web.format_value(this.get('value'), this, ''); if (!this.get("effective_readonly")) { var pad_username = this.session.username; - this.$element.find('div').html(''); + this.$element.find('div.oe_etherpad_default').html(''); } else { if(this.get('value') != false) { diff --git a/addons/pad/static/src/xml/pad.xml b/addons/pad/static/src/xml/pad.xml index 334064e88a1..27b210b3cf2 100644 --- a/addons/pad/static/src/xml/pad.xml +++ b/addons/pad/static/src/xml/pad.xml @@ -5,9 +5,12 @@ -
- -
+
+
+ Fullscreen + Return to Record +
+