| | |
| | | |
| | | this.show_spell_img = false; // roundcube mod. |
| | | this.decoration = true; |
| | | this.use_close_btn = true; |
| | | this.use_close_btn = false; |
| | | this.edit_layer_dbl_click = true; |
| | | this.report_ta_not_found = true; |
| | | |
| | |
| | | |
| | | // Set document's onclick to hide the language and error menu |
| | | $(document).bind('click', function(e) { |
| | | if($(e.target).attr('googie_action_btn') != '1' && ref.isLangWindowShown()) |
| | | var target = $(e.target); |
| | | if(target.attr('googie_action_btn') != '1' && ref.isLangWindowShown()) |
| | | ref.hideLangWindow(); |
| | | if($(e.target).attr('googie_action_btn') != '1' && ref.isErrorWindowShown()) |
| | | if(target.attr('googie_action_btn') != '1' && ref.isErrorWindowShown()) |
| | | ref.hideErrorWindow(); |
| | | }); |
| | | |
| | | |
| | | this.decorateTextarea = function(id) { |
| | | this.text_area = typeof(id) == 'string' ? document.getElementById(id) : id; |
| | | this.text_area = typeof id === 'string' ? document.getElementById(id) : id; |
| | | |
| | | if (this.text_area) { |
| | | if (!this.spell_container && this.decoration) { |
| | |
| | | // API Functions (the ones that you can call) |
| | | ///// |
| | | this.setSpellContainer = function(id) { |
| | | this.spell_container = typeof(id) == 'string' ? document.getElementById(id) : id; |
| | | this.spell_container = typeof id === 'string' ? document.getElementById(id) : id; |
| | | }; |
| | | |
| | | this.setLanguages = function(lang_dict) { |
| | |
| | | } |
| | | |
| | | var ref = this; |
| | | |
| | | if (this.edit_layer_dbl_click) { |
| | | $(this.edit_layer).bind('click', function(e) { |
| | | $(this.edit_layer).dblclick(function(e) { |
| | | if (e.target.className != 'googie_link' && !ref.isErrorWindowShown()) { |
| | | ref.resumeEditing(); |
| | | var fn1 = function() { |
| | |
| | | }; |
| | | |
| | | this.isLangWindowShown = function() { |
| | | return $(this.language_window).is(':hidden'); |
| | | return $(this.language_window).is(':visible'); |
| | | }; |
| | | |
| | | this.hideLangWindow = function() { |
| | |
| | | // Misc. functions |
| | | ///// |
| | | this.isDefined = function(o) { |
| | | return (o != 'undefined' && o != null) |
| | | return (o !== undefined && o !== null) |
| | | }; |
| | | |
| | | this.errorFixed = function() { |
| | |
| | | //$(this.indicator).remove(); |
| | | // roundcube mod. |
| | | if (window.rcmail) |
| | | rcmail.set_busy(false); |
| | | rcmail.set_busy(false, null, this.rc_msg_id); |
| | | }; |
| | | |
| | | this.appendIndicator = function(elm) { |
| | | // modified by roundcube |
| | | if (window.rcmail) |
| | | rcmail.set_busy(true, 'checking'); |
| | | this.rc_msg_id = rcmail.set_busy(true, 'checking'); |
| | | /* |
| | | this.indicator = document.createElement('img'); |
| | | $(this.indicator).attr('src', this.img_dir + 'indicator.gif') |