summaryrefslogtreecommitdiff
path: root/roundcubemail/program/js/googiespell.js
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-06-29 19:27:26 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-06-29 19:27:26 +0000
commit825b67562553bd2bc96cbaf69ec5322b7da721a8 (patch)
tree5e86df615b2cc1bbb3041edac8b64eeb093a9d40 /roundcubemail/program/js/googiespell.js
parent942c342e6debd8114ab9ff8c704b771feb44a7fd (diff)
- Improved compose screen: resizable body and attachments list, vertical splitter, options menu
- Removed productname/version element, changed footer size to 20px git-svn-id: https://svn.roundcube.net/trunk@3789 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js/googiespell.js')
-rw-r--r--roundcubemail/program/js/googiespell.js42
1 files changed, 23 insertions, 19 deletions
diff --git a/roundcubemail/program/js/googiespell.js b/roundcubemail/program/js/googiespell.js
index 51acb732f..a9879f361 100644
--- a/roundcubemail/program/js/googiespell.js
+++ b/roundcubemail/program/js/googiespell.js
@@ -767,6 +767,27 @@ this.hideLangWindow = function() {
$(this.switch_lan_pic).removeClass().addClass('googie_lang_3d_on');
};
+this.showLangWindow = function(elm) {
+ if (this.show_menu_observer)
+ this.show_menu_observer(this);
+
+ this.createLangWindow();
+ $('body').append(this.language_window);
+
+ var pos = $(elm).offset(),
+ height = $(elm).height(),
+ width = $(elm).width(),
+ h = $(this.language_window).height(),
+ pageheight = $(document).height(),
+ left = this.change_lang_pic_placement == 'right' ?
+ pos.left - 100 + width : pos.left + width,
+ top = pos.top + h < pageheight ? pos.top + height : pos.top - h - 4;
+
+ $(this.language_window).css({'visibility': 'visible', 'top' : top+'px','left' : left+'px'});
+
+ this.highlightCurSel();
+};
+
this.deHighlightCurSel = function() {
$(this.lang_cur_elm).removeClass().addClass('googie_list_onout');
};
@@ -776,32 +797,15 @@ this.highlightCurSel = function() {
GOOGIE_CUR_LANG = GOOGIE_DEFAULT_LANG;
for (var i=0; i < this.lang_elms.length; i++) {
if ($(this.lang_elms[i]).attr('googieId') == GOOGIE_CUR_LANG) {
- this.lang_elms[i].className = "googie_list_selected";
+ this.lang_elms[i].className = 'googie_list_selected';
this.lang_cur_elm = this.lang_elms[i];
}
else {
- this.lang_elms[i].className = "googie_list_onout";
+ this.lang_elms[i].className = 'googie_list_onout';
}
}
};
-this.showLangWindow = function(elm) {
- if (this.show_menu_observer)
- this.show_menu_observer(this);
-
- this.createLangWindow();
- $('body').append(this.language_window);
-
- var pos = $(elm).offset(),
- top = pos.top + $(elm).height(),
- left = this.change_lang_pic_placement == 'right' ?
- pos.left - 100 + $(elm).width() : pos.left + $(elm).width();
-
- $(this.language_window).css({'visibility': 'visible', 'top' : top+'px','left' : left+'px'});
-
- this.highlightCurSel();
-};
-
this.createChangeLangPic = function() {
var img = $('<img>')
.attr({src: this.img_dir + 'change_lang.gif', 'alt': 'Change language', 'googie_action_btn': '1'}),