[IMP] etherpad fullscreen
bzr revid: fp@openerp.com-20120717225636-bqudwmo6cve50fjn
This commit is contained in:
parent
4c82865bfd
commit
d17e291031
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue