| | |
| | | |
| | | this.checkSpellingState(); |
| | | } |
| | | else |
| | | if (this.report_ta_not_found) |
| | | alert('Text area not found'); |
| | | else if (this.report_ta_not_found) |
| | | alert('Text area not found'); |
| | | }; |
| | | |
| | | ////// |
| | |
| | | table = document.createElement('table'), |
| | | list = document.createElement('tbody'); |
| | | |
| | | pos.top -= this.edit_layer.scrollTop; |
| | | |
| | | $(this.error_window).css({'visibility': 'visible', |
| | | 'top': (pos.top+20)+'px', 'left': (pos.left)+'px'}).html(''); |
| | | |
| | | $(this.error_window).html(''); |
| | | $(table).addClass('googie_list').attr('googie_action_btn', '1'); |
| | | |
| | | // Check if we should use custom menu builder, if not we use the default |
| | |
| | | table.appendChild(list); |
| | | 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 |
| | | if ($.browser.msie) { |
| | | if (!this.error_window_iframe) { |
| | |
| | | ////// |
| | | this.createEditLayer = function(width, height) { |
| | | 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('auto').height(height); |
| | | |
| | | if (this.text_area.nodeName.toLowerCase() != 'input' || $(this.text_area).val() == '') { |
| | | $(this.edit_layer).css('overflow', 'auto').height(height-4); |
| | |
| | | }; |
| | | |
| | | $(elm).html(text).addClass('googie_link').bind('click', d) |
| | | .attr({'googie_action_btn' : '1', 'g_id' : id, 'is_corrected' : false}); |
| | | .attr({'googie_action_btn' : '1', 'g_id' : id, 'is_corrected' : false}); |
| | | |
| | | return elm; |
| | | }; |
| | |
| | | this.createLangWindow = function() { |
| | | this.language_window = document.createElement('div'); |
| | | $(this.language_window).addClass('googie_window') |
| | | .width(100).attr('googie_action_btn', '1'); |
| | | .width(100).attr('googie_action_btn', '1'); |
| | | |
| | | // Build up the result list |
| | | var table = document.createElement('table'), |
| | |
| | | $(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'); |
| | | }; |
| | |
| | | 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() { |