summaryrefslogtreecommitdiff
path: root/program/js/googiespell.js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-06-29 19:27:26 +0000
committeralecpl <alec@alec.pl>2010-06-29 19:27:26 +0000
commit087c7dc5d2e58e4aa99f1ffdb9b8f01c6121ce1d (patch)
tree566cbf7451768406f431d597a6c20f87a317e6e5 /program/js/googiespell.js
parent02cc63c515488aede560facf0d4ae59792776c84 (diff)
- Improved compose screen: resizable body and attachments list, vertical splitter, options menu
- Removed productname/version element, changed footer size to 20px
Diffstat (limited to 'program/js/googiespell.js')
-rw-r--r--program/js/googiespell.js42
1 files changed, 23 insertions, 19 deletions
diff --git a/program/js/googiespell.js b/program/js/googiespell.js
index 51acb732f..a9879f361 100644
--- a/program/js/googiespell.js
+++ b/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'}),