Fix compose body area size, so scrollbars aren't truncated, unify padding

pull/242/head
Aleksander Machniak 11 years ago
parent 9aa55d5a50
commit 421ed1e545

@ -40,7 +40,7 @@ function rcube_text_editor(config, id)
selector: '#' + ($('#' + id).is('.mce_editor') ? id : 'fake-editor-id'),
theme: 'modern',
language: config.lang,
content_css: 'program/js/tinymce/roundcube/content.css?v1',
content_css: 'program/js/tinymce/roundcube/content.css?v2',
menubar: false,
statusbar: false,
toolbar_items_size: 'small',

@ -312,7 +312,9 @@ this.prepare = function(ignore, no_indicator)
this.ignore = ignore;
this.hideLangWindow();
if ($(this.text_area).val() == '' || ignore) {
var area = $(this.text_area);
if (area.val() == '' || ignore) {
if (!this.custom_no_spelling_error)
this.flashNoSpellingErrorState();
else
@ -321,7 +323,7 @@ this.prepare = function(ignore, no_indicator)
return;
}
this.createEditLayer(this.text_area.offsetWidth, this.text_area.offsetHeight);
this.createEditLayer(area.width(), area.height());
this.createErrorWindow();
$('body').append(this.error_window);
@ -331,7 +333,7 @@ this.prepare = function(ignore, no_indicator)
if (this.main_controller)
$(this.spell_span).unbind('click');
this.orginal_text = $(this.text_area).val();
this.orginal_text = area.val();
};
this.parseResult = function(r_text)
@ -674,10 +676,10 @@ this.createEditLayer = function(width, height)
{
this.edit_layer = document.createElement('div');
$(this.edit_layer).addClass('googie_edit_layer').attr('id', 'googie_edit_layer')
.width('auto').height(height);
.width(width).height(height);
if (this.text_area.nodeName.toLowerCase() != 'input' || $(this.text_area).val() == '') {
$(this.edit_layer).css('overflow', 'auto').height(height-4);
$(this.edit_layer).css('overflow', 'auto');
} else {
$(this.edit_layer).css('overflow', 'hidden');
}

@ -7,9 +7,7 @@ body, td, pre {
body {
background-color: #FFFFFF;
margin-left: 4px;
margin-right: 4px;
margin-top: 2px;
margin: 4px;
}
div.pre {

@ -547,12 +547,13 @@ init_compose_form: function()
resize_compose_body: function()
{
var div = $('#compose-div .boxlistcontent'),
w = div.width() - 2, h = div.height(),
w = div.width() - 6,
h = div.height() - 2,
x = bw.ie || bw.opera ? 4 : 0;
$('#compose-body_ifr').width(w+3).height(h-2 - $('div.mce-toolbar').height());
$('#compose-body_ifr').width(w + 6).height(h - 1 - $('div.mce-toolbar').height());
$('#compose-body').width(w-x).height(h);
$('#googie_edit_layer').height(h);
$('#googie_edit_layer').width(w).height(h);
},
resize_compose_body_ev: function()

@ -9,7 +9,7 @@
.googie_edit_layer {
background-color: #ffffff;
padding: 0 4px;
padding: 1px 3px;
font-size: 9pt;
font-family: monospace;
}

@ -8,10 +8,7 @@
}
.googie_edit_layer {
position: relative;
top: 1px;
left: 1px;
padding: 8px;
padding: 4px;
font-size: 9pt;
font-family: monospace;
background-color: #fff;
@ -26,7 +23,7 @@
width: 100%;
margin: 0;
padding: 0;
border-spacing: 0;
border-spacing: 0;
}
.googie_list td {

@ -1305,13 +1305,13 @@ div.message-partheaders .headers-table td.header {
width: 99%;
border: 0;
border-radius: 0 0 0 4px;
padding: 8px 0 8px 8px;
padding: 4px;
resize: none;
font-family: monospace;
font-size: 9pt;
outline: none;
box-shadow: inset 0 0 2px 1px rgba(0,0,0, 0.2);
-webkit-box-shadow: inset 0 0 2px 1px rgba(0,0,0, 0.2);
box-shadow: inset 0 0 2px 1px rgba(0,0,0, 0.1);
-webkit-box-shadow: inset 0 0 2px 1px rgba(0,0,0, 0.1);
}
#composebody:active,

@ -502,7 +502,7 @@ function rcube_mail_ui()
$('#composebodycontainer > div').width(w+8);
$('#composebody_ifr').height(h + 4 - $('div.mce-toolbar').height());
$('#googie_edit_layer').height(h - 8);
$('#googie_edit_layer').width(w).height(h);
// $('#composebodycontainer')[(btns ? 'addClass' : 'removeClass')]('buttons');
// $('#composeformbuttons')[(btns ? 'show' : 'hide')]();

Loading…
Cancel
Save