- googiespell layer resizing + small css improvements

- better googiespell suggestions popup positioning
release-0.6
alecpl 15 years ago
parent 9ed374bbe1
commit b8d4febf6c

@ -111,8 +111,7 @@ this.decorateTextarea = function(id) {
this.checkSpellingState(); this.checkSpellingState();
} }
else else if (this.report_ta_not_found)
if (this.report_ta_not_found)
alert('Text area not found'); alert('Text area not found');
}; };
@ -393,11 +392,7 @@ this.showErrorWindow = function(elm, id) {
table = document.createElement('table'), table = document.createElement('table'),
list = document.createElement('tbody'); list = document.createElement('tbody');
pos.top -= this.edit_layer.scrollTop; $(this.error_window).html('');
$(this.error_window).css({'visibility': 'visible',
'top': (pos.top+20)+'px', 'left': (pos.left)+'px'}).html('');
$(table).addClass('googie_list').attr('googie_action_btn', '1'); $(table).addClass('googie_list').attr('googie_action_btn', '1');
// Check if we should use custom menu builder, if not we use the default // Check if we should use custom menu builder, if not we use the default
@ -541,6 +536,16 @@ this.showErrorWindow = function(elm, id) {
table.appendChild(list); table.appendChild(list);
this.error_window.appendChild(table); this.error_window.appendChild(table);
// calculate and set position
var height = $(this.error_window).height(),
width = $(this.error_window).width(),
pageheight = $(document).height(),
pagewidth = $(document).width(),
top = pos.top + height + 20 < pageheight ? pos.top + 20 : pos.top - height,
left = pos.left + width < pagewidth ? pos.left : pos.left - width;
$(this.error_window).css({'visibility': 'visible', 'top': top+'px', 'left': left+'px'});
// Dummy for IE - dropdown bug fix // Dummy for IE - dropdown bug fix
if ($.browser.msie) { if ($.browser.msie) {
if (!this.error_window_iframe) { if (!this.error_window_iframe) {
@ -561,7 +566,8 @@ this.showErrorWindow = function(elm, id) {
////// //////
this.createEditLayer = function(width, height) { this.createEditLayer = function(width, height) {
this.edit_layer = document.createElement('div'); this.edit_layer = document.createElement('div');
$(this.edit_layer).addClass('googie_edit_layer').width(width-10).height(height); $(this.edit_layer).addClass('googie_edit_layer').attr('id', 'googie_edit_layer')
.width(width).height(height);
if (this.text_area.nodeName.toLowerCase() != 'input' || $(this.text_area).val() == '') { 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').height(height-4);

@ -344,6 +344,9 @@ resize_compose_body: function()
$('#compose-body_tbl').width((w+4)+'px').height(''); $('#compose-body_tbl').width((w+4)+'px').height('');
$('#compose-body_ifr').width((w+2)+'px').height((h-54)+'px'); $('#compose-body_ifr').width((w+2)+'px').height((h-54)+'px');
} }
else {
$('#googie_edit_layer').width(w-(bw.ie || bw.opera || bw.safari ? 2 : 0)+'px').height(h+'px');
}
}, },
show_header_form: function(id) show_header_form: function(id)

@ -13,10 +13,8 @@
} }
.googie_edit_layer { .googie_edit_layer {
border: 1px solid #666666;
background-color: #ffffff; background-color: #ffffff;
padding: 1px 4px; padding: 0 4px;
margin: 1px 0px;
font-size: 9pt; font-size: 9pt;
font-family: monospace; font-family: monospace;
} }
@ -75,6 +73,8 @@
color: #b91414; color: #b91414;
text-decoration: underline; text-decoration: underline;
cursor: pointer; cursor: pointer;
font-size: 9pt;
font-family: monospace;
} }
.googie_check_spelling_link { .googie_check_spelling_link {

@ -137,8 +137,7 @@
background-position: -416px -32px; background-position: -416px -32px;
} }
#messagetoolbar select, #messagetoolbar select
#compose-container select
{ {
font-size: 11px; font-size: 11px;
} }

Loading…
Cancel
Save