summaryrefslogtreecommitdiff
path: root/addons/pad/static/src
diff options
context:
space:
mode:
authorFabien Pinckaers <fp@openerp.com>2012-07-18 00:56:36 +0200
committerFabien Pinckaers <fp@openerp.com>2012-07-18 00:56:36 +0200
commitd17e291031e2b997b97be30a05df04bb027be92e (patch)
tree637b98f0ebb269a6ede49e7c935ae0d20db58b93 /addons/pad/static/src
parent4c82865bfdcaa3d0509f4f393121963fdf309577 (diff)
[IMP] etherpad fullscreen
bzr revid: fp@openerp.com-20120717225636-bqudwmo6cve50fjn
Diffstat (limited to 'addons/pad/static/src')
-rw-r--r--addons/pad/static/src/css/etherpad.css26
-rw-r--r--addons/pad/static/src/js/pad.js12
-rw-r--r--addons/pad/static/src/xml/pad.xml9
3 files changed, 24 insertions, 23 deletions
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;
+}
+.oe_etherpad_normal div.oe_etherpad_head .oe_fullscreen {
+ display: none;
}
-.etherpad_zoom{
+.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('<iframe width="100%" height="100%" frameborder="0" src="'+show_value.split('\n')[0]+'?showChat=false&showLineNumbers=false&userName='+pad_username+'"></iframe>');
+ this.$element.find('div.oe_etherpad_default').html('<iframe width="100%" height="100%" frameborder="0" src="'+show_value.split('\n')[0]+'?showChat=false&showLineNumbers=false&userName='+pad_username+'"></iframe>');
} 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 @@
<t t-name="FieldEtherpad">
<t t-if="!widget.get('effective_readonly')">
- <div class="oe_form_field_text">
- <span class="etherpad_head"></span>
- <div class="etherpad_default" ></div>
+ <div class="oe_form_field_text oe_etherpad_normal">
+ <div class="oe_etherpad_head">
+ <span class="oe_normal">Fullscreen</span>
+ <span class="oe_fullscreen">Return to Record</span>
+ </div>
+ <div class="oe_etherpad_default" ></div>
</div>
</t>
</t>