commit | author | age
|
5f660c
|
1 |
/** |
e019f2
|
2 |
* Roundcube functions for default skin interface |
5f660c
|
3 |
*/ |
A |
4 |
|
|
5 |
/** |
|
6 |
* Settings |
|
7 |
*/ |
|
8 |
|
|
9 |
function rcube_init_settings_tabs() |
|
10 |
{ |
cc97ea
|
11 |
var tab = '#settingstabdefault'; |
5f660c
|
12 |
if (window.rcmail && rcmail.env.action) |
cc97ea
|
13 |
tab = '#settingstab' + (rcmail.env.action=='preferences' ? 'default' : (rcmail.env.action.indexOf('identity')>0 ? 'identities' : rcmail.env.action.replace(/\./g, ''))); |
T |
14 |
|
|
15 |
$(tab).addClass('tablink-selected'); |
a4865a
|
16 |
$(tab + '> a').removeAttr('onclick').unbind('click').bind('click', function(){return false;}); |
5f660c
|
17 |
} |
A |
18 |
|
|
19 |
function rcube_show_advanced(visible) |
|
20 |
{ |
cc97ea
|
21 |
$('tr.advanced').css('display', (visible ? (bw.ie ? 'block' : 'table-row') : 'none')); |
5f660c
|
22 |
} |
A |
23 |
|
6769ba
|
24 |
// Fieldsets-to-tabs converter |
A |
25 |
// Warning: don't place "caller" <script> inside page element (id) |
|
26 |
function rcube_init_tabs(id, current) |
|
27 |
{ |
|
28 |
var content = document.getElementById(id), |
|
29 |
fs = $('fieldset', content); |
|
30 |
|
|
31 |
current = current ? current : 0; |
|
32 |
|
|
33 |
// first hide not selected tabs |
|
34 |
fs.each(function(idx) { if (idx != current) $(this).hide(); }); |
|
35 |
|
|
36 |
// create tabs container |
|
37 |
var tabs = $('<div>').addClass('tabsbar').appendTo($(content)); |
|
38 |
|
|
39 |
// convert fildsets into tabs |
|
40 |
fs.each(function(idx) { |
|
41 |
var tab, a, elm = $(this), legend = $('legend', elm); |
|
42 |
|
|
43 |
// create a tab |
|
44 |
a = $('<a>').text(legend.text()).attr('href', '#'); |
|
45 |
tab = $('<span>').attr({'id': 'tab'+idx, 'class': 'tablink'}) |
|
46 |
.click(function() { return rcube_show_tab(id, idx); }) |
|
47 |
|
|
48 |
// remove legend |
|
49 |
legend.remove(); |
|
50 |
// style fieldset |
|
51 |
elm.addClass('tabbed'); |
|
52 |
// style selected tab |
|
53 |
if (idx == current) |
|
54 |
tab.addClass('tablink-selected'); |
|
55 |
|
|
56 |
// add the tab to container |
|
57 |
tab.append(a).appendTo(tabs); |
|
58 |
}); |
|
59 |
} |
|
60 |
|
|
61 |
function rcube_show_tab(id, index) |
|
62 |
{ |
|
63 |
var content = document.getElementById(id), |
|
64 |
fs = $('fieldset', content); |
|
65 |
|
|
66 |
fs.each(function(idx) { |
|
67 |
// Show/hide fieldset (tab content) |
|
68 |
$(this)[index==idx ? 'show' : 'hide'](); |
|
69 |
// Select/unselect tab |
|
70 |
$('#tab'+idx).toggleClass('tablink-selected', idx==index); |
|
71 |
}); |
|
72 |
} |
|
73 |
|
5f660c
|
74 |
/** |
3940ba
|
75 |
* Mail UI |
5f660c
|
76 |
*/ |
A |
77 |
|
|
78 |
function rcube_mail_ui() |
|
79 |
{ |
9e5550
|
80 |
this.popups = { |
A |
81 |
markmenu: {id:'markmessagemenu'}, |
e25a35
|
82 |
replyallmenu: {id:'replyallmenu'}, |
9e5550
|
83 |
searchmenu: {id:'searchmenu', editable:1}, |
A |
84 |
messagemenu: {id:'messagemenu'}, |
|
85 |
listmenu: {id:'listmenu', editable:1}, |
|
86 |
dragmessagemenu:{id:'dragmessagemenu', sticky:1}, |
|
87 |
groupmenu: {id:'groupoptionsmenu', above:1}, |
|
88 |
mailboxmenu: {id:'mailboxoptionsmenu', above:1}, |
|
89 |
composemenu: {id:'composeoptionsmenu', editable:1}, |
71f60c
|
90 |
// toggle: #1486823, #1486930 |
A |
91 |
uploadmenu: {id:'attachment-form', editable:1, above:1, toggle:!bw.ie&&!bw.linux } |
a61bbb
|
92 |
}; |
3940ba
|
93 |
|
a61bbb
|
94 |
var obj; |
9e5550
|
95 |
for (var k in this.popups) { |
A |
96 |
obj = $('#'+this.popups[k].id) |
a61bbb
|
97 |
if (obj.length) |
9e5550
|
98 |
this.popups[k].obj = obj; |
A |
99 |
else { |
|
100 |
delete this.popups[k]; |
|
101 |
} |
a61bbb
|
102 |
} |
5f660c
|
103 |
} |
A |
104 |
|
|
105 |
rcube_mail_ui.prototype = { |
|
106 |
|
9e5550
|
107 |
show_popup: function(popup, show) |
5f660c
|
108 |
{ |
9e5550
|
109 |
if (typeof this[popup] == 'function') |
A |
110 |
return this[popup](show); |
|
111 |
else |
|
112 |
return this.show_popupmenu(popup, show); |
|
113 |
}, |
|
114 |
|
|
115 |
show_popupmenu: function(popup, show) |
|
116 |
{ |
|
117 |
var obj = this.popups[popup].obj, |
|
118 |
above = this.popups[popup].above, |
|
119 |
ref = rcube_find_object(popup+'link'); |
|
120 |
|
5f660c
|
121 |
if (typeof show == 'undefined') |
a61bbb
|
122 |
show = obj.is(':visible') ? false : true; |
0e2ccb
|
123 |
else if (this.popups[popup].toggle && show && this.popups[popup].obj.is(':visible') ) |
T |
124 |
show = false; |
6c9d49
|
125 |
|
a61bbb
|
126 |
if (show && ref) { |
8431a7
|
127 |
var parent = $(ref).parent(), |
A |
128 |
pos = parent.hasClass('dropbutton') ? parent.offset() : $(ref).offset(); |
|
129 |
|
b218aa
|
130 |
if (!above && pos.top + ref.offsetHeight + obj.height() > window.innerHeight) |
T |
131 |
above = true; |
8431a7
|
132 |
|
a61bbb
|
133 |
obj.css({ left:pos.left, top:(pos.top + (above ? -obj.height() : ref.offsetHeight)) }); |
T |
134 |
} |
3940ba
|
135 |
|
a61bbb
|
136 |
obj[show?'show':'hide'](); |
T |
137 |
}, |
|
138 |
|
9e5550
|
139 |
dragmessagemenu: function(show) |
a61bbb
|
140 |
{ |
9e5550
|
141 |
this.popups.dragmessagemenu.obj[show?'show':'hide'](); |
511420
|
142 |
}, |
A |
143 |
|
9e5550
|
144 |
uploadmenu: function(show) |
087c7d
|
145 |
{ |
A |
146 |
if (typeof show == 'object') // called as event handler |
|
147 |
show = false; |
64fa95
|
148 |
|
T |
149 |
// clear upload form |
|
150 |
if (!show) { |
|
151 |
try { $('#attachment-form form')[0].reset(); } |
|
152 |
catch(e){} // ignore errors |
|
153 |
} |
b218aa
|
154 |
|
9e5550
|
155 |
this.show_popupmenu('uploadmenu', show); |
b218aa
|
156 |
|
9a4fd7
|
157 |
if (!document.all && this.popups.uploadmenu.obj.is(':visible')) |
b218aa
|
158 |
$('#attachment-form input[type=file]').click(); |
5f660c
|
159 |
}, |
A |
160 |
|
9e5550
|
161 |
searchmenu: function(show) |
30b152
|
162 |
{ |
9e5550
|
163 |
var obj = this.popups.searchmenu.obj, |
A |
164 |
ref = rcube_find_object('searchmenulink'); |
30b152
|
165 |
|
9e5550
|
166 |
if (typeof show == 'undefined') |
A |
167 |
show = obj.is(':visible') ? false : true; |
|
168 |
|
30b152
|
169 |
if (show && ref) { |
A |
170 |
var pos = $(ref).offset(); |
9e5550
|
171 |
obj.css({ left:pos.left, top:(pos.top + ref.offsetHeight + 2)}) |
A |
172 |
.find(':checked').attr('checked', false); |
30b152
|
173 |
|
A |
174 |
if (rcmail.env.search_mods) { |
7910c0
|
175 |
var search_mods = rcmail.env.search_mods[rcmail.env.mailbox] ? rcmail.env.search_mods[rcmail.env.mailbox] : rcmail.env.search_mods['*']; |
T |
176 |
for (var n in search_mods) |
|
177 |
$('#s_mod_' + n).attr('checked', true); |
30b152
|
178 |
} |
A |
179 |
} |
9e5550
|
180 |
obj[show?'show':'hide'](); |
30b152
|
181 |
}, |
3940ba
|
182 |
|
30b152
|
183 |
set_searchmod: function(elem) |
A |
184 |
{ |
|
185 |
if (!rcmail.env.search_mods) |
a4865a
|
186 |
rcmail.env.search_mods = {}; |
3940ba
|
187 |
|
7910c0
|
188 |
if (!rcmail.env.search_mods[rcmail.env.mailbox]) |
T |
189 |
rcmail.env.search_mods[rcmail.env.mailbox] = rcube_clone_object(rcmail.env.search_mods['*']); |
3940ba
|
190 |
|
30b152
|
191 |
if (!elem.checked) |
7910c0
|
192 |
delete(rcmail.env.search_mods[rcmail.env.mailbox][elem.value]); |
30b152
|
193 |
else |
7910c0
|
194 |
rcmail.env.search_mods[rcmail.env.mailbox][elem.value] = elem.value; |
30b152
|
195 |
}, |
A |
196 |
|
9e5550
|
197 |
listmenu: function(show) |
f52c93
|
198 |
{ |
9e5550
|
199 |
var obj = this.popups.listmenu.obj, |
A |
200 |
ref = rcube_find_object('listmenulink'); |
f52c93
|
201 |
|
9e5550
|
202 |
if (typeof show == 'undefined') |
A |
203 |
show = obj.is(':visible') ? false : true; |
|
204 |
|
f52c93
|
205 |
if (show && ref) { |
6c9d49
|
206 |
var pos = $(ref).offset(), |
9e5550
|
207 |
menuwidth = obj.width(), |
6c9d49
|
208 |
pagewidth = $(document).width(); |
A |
209 |
|
|
210 |
if (pagewidth - pos.left < menuwidth && pos.left > menuwidth) |
|
211 |
pos.left = pos.left - menuwidth; |
|
212 |
|
9e5550
|
213 |
obj.css({ left:pos.left, top:(pos.top + ref.offsetHeight + 2)}); |
f52c93
|
214 |
// set form values |
T |
215 |
$('input[name="sort_col"][value="'+rcmail.env.sort_col+'"]').attr('checked', 1); |
|
216 |
$('input[name="sort_ord"][value="DESC"]').attr('checked', rcmail.env.sort_order=='DESC' ? 1 : 0); |
|
217 |
$('input[name="sort_ord"][value="ASC"]').attr('checked', rcmail.env.sort_order=='DESC' ? 0 : 1); |
|
218 |
$('input[name="view"][value="thread"]').attr('checked', rcmail.env.threading ? 1 : 0); |
|
219 |
$('input[name="view"][value="list"]').attr('checked', rcmail.env.threading ? 0 : 1); |
|
220 |
// list columns |
|
221 |
var cols = $('input[name="list_col[]"]'); |
|
222 |
for (var i=0; i<cols.length; i++) { |
|
223 |
var found = 0; |
|
224 |
if (cols[i].value != 'from') |
|
225 |
found = jQuery.inArray(cols[i].value, rcmail.env.coltypes) != -1; |
|
226 |
else |
|
227 |
found = (jQuery.inArray('from', rcmail.env.coltypes) != -1 |
|
228 |
|| jQuery.inArray('to', rcmail.env.coltypes) != -1); |
|
229 |
$(cols[i]).attr('checked',found ? 1 : 0); |
|
230 |
} |
|
231 |
} |
|
232 |
|
9e5550
|
233 |
obj[show?'show':'hide'](); |
f52c93
|
234 |
|
T |
235 |
if (show) { |
|
236 |
var maxheight=0; |
|
237 |
$('#listmenu fieldset').each(function() { |
|
238 |
var height = $(this).height(); |
|
239 |
if (height > maxheight) { |
|
240 |
maxheight = height; |
|
241 |
} |
|
242 |
}); |
|
243 |
$('#listmenu fieldset').css("min-height", maxheight+"px") |
|
244 |
// IE6 complains if you set this attribute using either method: |
|
245 |
//$('#listmenu fieldset').css({'height':'auto !important'}); |
|
246 |
//$('#listmenu fieldset').css("height","auto !important"); |
|
247 |
.height(maxheight); |
|
248 |
}; |
|
249 |
}, |
|
250 |
|
|
251 |
open_listmenu: function(e) |
|
252 |
{ |
9e5550
|
253 |
this.listmenu(); |
f52c93
|
254 |
}, |
T |
255 |
|
|
256 |
save_listmenu: function() |
|
257 |
{ |
9e5550
|
258 |
this.listmenu(); |
f52c93
|
259 |
|
a80405
|
260 |
var sort = $('input[name="sort_col"]:checked').val(), |
A |
261 |
ord = $('input[name="sort_ord"]:checked').val(), |
|
262 |
thread = $('input[name="view"]:checked').val(), |
|
263 |
cols = $('input[name="list_col[]"]:checked') |
|
264 |
.map(function(){ return this.value; }).get(); |
f52c93
|
265 |
|
T |
266 |
rcmail.set_list_options(cols, sort, ord, thread == 'thread' ? 1 : 0); |
|
267 |
}, |
|
268 |
|
ec581c
|
269 |
body_mouseup: function(evt, p) |
5f660c
|
270 |
{ |
9e5550
|
271 |
var i, target = rcube_event.get_target(evt); |
f52c93
|
272 |
|
9e5550
|
273 |
for (i in this.popups) { |
A |
274 |
if (this.popups[i].obj.is(':visible') && target != rcube_find_object(i+'link') |
0e2ccb
|
275 |
&& !this.popups[i].toggle |
9e5550
|
276 |
&& (!this.popups[i].editable || !this.target_overlaps(target, this.popups[i].id)) |
A |
277 |
&& (!this.popups[i].sticky || !rcube_mouse_is_over(evt, rcube_find_object(this.popups[i].id))) |
|
278 |
) { |
c7f7ce
|
279 |
window.setTimeout('$("#'+this.popups[i].id+'").hide()', 50); |
9e5550
|
280 |
} |
30b152
|
281 |
} |
087c7d
|
282 |
}, |
A |
283 |
|
|
284 |
target_overlaps: function (target, elementid) |
|
285 |
{ |
|
286 |
var element = rcube_find_object(elementid); |
|
287 |
while (target.parentNode) { |
|
288 |
if (target.parentNode == element) |
|
289 |
return true; |
|
290 |
target = target.parentNode; |
|
291 |
} |
|
292 |
return false; |
5f660c
|
293 |
}, |
A |
294 |
|
0a36c3
|
295 |
body_keydown: function(evt, p) |
5f660c
|
296 |
{ |
30b152
|
297 |
if (rcube_event.get_keycode(evt) == 27) { |
9e5550
|
298 |
for (var k in this.popups) { |
A |
299 |
if (this.popups[k].obj.is(':visible')) |
|
300 |
this.show_popup(k, false); |
a61bbb
|
301 |
} |
30b152
|
302 |
} |
ce06d3
|
303 |
}, |
A |
304 |
|
|
305 |
switch_preview_pane: function(elem) |
|
306 |
{ |
|
307 |
var uid, prev_frm = $('#mailpreviewframe'); |
|
308 |
|
|
309 |
if (elem.checked) { |
|
310 |
rcmail.env.contentframe = 'messagecontframe'; |
|
311 |
if (mailviewsplit.layer) { |
|
312 |
mailviewsplit.resize(); |
|
313 |
mailviewsplit.layer.elm.style.display = ''; |
129997
|
314 |
} |
A |
315 |
else |
ce06d3
|
316 |
mailviewsplit.init(); |
129997
|
317 |
|
A |
318 |
if (bw.opera) { |
|
319 |
$('#messagelistcontainer').css({height: ''}); |
|
320 |
} |
ce06d3
|
321 |
prev_frm.show(); |
129997
|
322 |
|
ce06d3
|
323 |
if (uid = rcmail.message_list.get_single_selection()) |
A |
324 |
rcmail.show_message(uid, false, true); |
129997
|
325 |
} |
A |
326 |
else { |
ce06d3
|
327 |
prev_frm.hide(); |
A |
328 |
if (bw.ie6 || bw.ie7) { |
|
329 |
var fr = document.getElementById('mailcontframe'); |
|
330 |
fr.style.bottom = 0; |
129997
|
331 |
fr.style.height = parseInt(fr.parentNode.offsetHeight)+'px'; |
ce06d3
|
332 |
} |
129997
|
333 |
else { |
ce06d3
|
334 |
$('#mailcontframe').css({height: 'auto', bottom: 0}); |
129997
|
335 |
if (bw.opera) |
A |
336 |
$('#messagelistcontainer').css({height: 'auto'}); |
|
337 |
} |
ce06d3
|
338 |
if (mailviewsplit.layer) |
A |
339 |
mailviewsplit.layer.elm.style.display = 'none'; |
129997
|
340 |
|
ce06d3
|
341 |
rcmail.env.contentframe = null; |
A |
342 |
rcmail.show_contentframe(false); |
|
343 |
} |
249db1
|
344 |
rcmail.http_post('save-pref', '_name=preview_pane&_value='+(elem.checked?1:0)); |
3940ba
|
345 |
}, |
A |
346 |
|
|
347 |
/* Message composing */ |
|
348 |
init_compose_form: function() |
|
349 |
{ |
e25a35
|
350 |
var f, field, fields = ['cc', 'bcc', 'replyto', 'mailreplyto', 'mailfollowupto'], |
3940ba
|
351 |
div = document.getElementById('compose-div'), |
A |
352 |
headers_div = document.getElementById('compose-headers-div'); |
|
353 |
|
e25a35
|
354 |
// Show input elements with non-empty value |
A |
355 |
for (f=0; f<fields.length; f++) { |
|
356 |
if ((field = $('#_'+fields[f])) && field.length && field.val() != '') |
|
357 |
rcmail_ui.show_header_form(fields[f]); |
|
358 |
} |
3940ba
|
359 |
|
A |
360 |
// prevent from form data loss when pressing ESC key in IE |
|
361 |
if (bw.ie) { |
|
362 |
var form = rcube_find_object('form'); |
|
363 |
form.onkeydown = function (e) { |
|
364 |
if (rcube_event.get_keycode(e) == 27) |
|
365 |
rcube_event.cancel(e); |
|
366 |
}; |
|
367 |
} |
|
368 |
|
|
369 |
$(window).resize(function() { |
|
370 |
rcmail_ui.resize_compose_body(); |
|
371 |
}); |
|
372 |
|
|
373 |
$('#compose-container').resize(function() { |
|
374 |
rcmail_ui.resize_compose_body(); |
|
375 |
}); |
|
376 |
|
b218aa
|
377 |
div.style.top = (parseInt(headers_div.offsetHeight, 10) + 3) + 'px'; |
3940ba
|
378 |
$(window).resize(); |
A |
379 |
}, |
|
380 |
|
|
381 |
resize_compose_body: function() |
|
382 |
{ |
b218aa
|
383 |
var div = $('#compose-div .boxlistcontent'), w = div.width(), h = div.height(); |
T |
384 |
w -= 8; // 2 x 3px padding + 2 x 1px border |
|
385 |
h -= 4; |
3940ba
|
386 |
|
b218aa
|
387 |
$('#compose-body').width(w+'px').height(h+'px'); |
3940ba
|
388 |
|
A |
389 |
if (window.tinyMCE && tinyMCE.get('compose-body')) { |
b218aa
|
390 |
$('#compose-body_tbl').width((w+6)+'px').height(''); |
T |
391 |
$('#compose-body_ifr').width((w+6)+'px').height((h-54)+'px'); |
3940ba
|
392 |
} |
b8d4fe
|
393 |
else { |
9bfcb3
|
394 |
$('#googie_edit_layer').height(h+'px'); |
b8d4fe
|
395 |
} |
7534f6
|
396 |
}, |
A |
397 |
|
|
398 |
resize_compose_body_ev: function() |
|
399 |
{ |
|
400 |
window.setTimeout(function(){rcmail_ui.resize_compose_body();}, 100); |
3940ba
|
401 |
}, |
A |
402 |
|
|
403 |
show_header_form: function(id) |
|
404 |
{ |
|
405 |
var row, s, |
|
406 |
link = document.getElementById(id + '-link'); |
|
407 |
|
|
408 |
if ((s = this.next_sibling(link))) |
|
409 |
s.style.display = 'none'; |
|
410 |
else if ((s = this.prev_sibling(link))) |
|
411 |
s.style.display = 'none'; |
|
412 |
|
|
413 |
link.style.display = 'none'; |
|
414 |
|
|
415 |
if ((row = document.getElementById('compose-' + id))) { |
|
416 |
var div = document.getElementById('compose-div'), |
|
417 |
headers_div = document.getElementById('compose-headers-div'); |
|
418 |
row.style.display = (document.all && !window.opera) ? 'block' : 'table-row'; |
b218aa
|
419 |
div.style.top = (parseInt(headers_div.offsetHeight, 10) + 3) + 'px'; |
3940ba
|
420 |
this.resize_compose_body(); |
A |
421 |
} |
|
422 |
|
|
423 |
return false; |
|
424 |
}, |
|
425 |
|
|
426 |
hide_header_form: function(id) |
|
427 |
{ |
|
428 |
var row, ns, |
|
429 |
link = document.getElementById(id + '-link'), |
|
430 |
parent = link.parentNode, |
|
431 |
links = parent.getElementsByTagName('a'); |
|
432 |
|
|
433 |
link.style.display = ''; |
|
434 |
|
|
435 |
for (var i=0; i<links.length; i++) |
|
436 |
if (links[i].style.display != 'none') |
|
437 |
for (var j=i+1; j<links.length; j++) |
|
438 |
if (links[j].style.display != 'none') |
|
439 |
if ((ns = this.next_sibling(links[i]))) { |
|
440 |
ns.style.display = ''; |
|
441 |
break; |
|
442 |
} |
|
443 |
|
|
444 |
document.getElementById('_' + id).value = ''; |
|
445 |
|
|
446 |
if ((row = document.getElementById('compose-' + id))) { |
|
447 |
var div = document.getElementById('compose-div'), |
|
448 |
headers_div = document.getElementById('compose-headers-div'); |
|
449 |
row.style.display = 'none'; |
|
450 |
div.style.top = (parseInt(headers_div.offsetHeight, 10) + 1) + 'px'; |
|
451 |
this.resize_compose_body(); |
|
452 |
} |
|
453 |
|
|
454 |
return false; |
|
455 |
}, |
|
456 |
|
|
457 |
next_sibling: function(elm) |
|
458 |
{ |
|
459 |
var ns = elm.nextSibling; |
|
460 |
while (ns && ns.nodeType == 3) |
|
461 |
ns = ns.nextSibling; |
|
462 |
return ns; |
|
463 |
}, |
|
464 |
|
|
465 |
prev_sibling: function(elm) |
|
466 |
{ |
|
467 |
var ps = elm.previousSibling; |
|
468 |
while (ps && ps.nodeType == 3) |
|
469 |
ps = ps.previousSibling; |
|
470 |
return ps; |
5f660c
|
471 |
} |
A |
472 |
|
|
473 |
}; |
3940ba
|
474 |
|
5f660c
|
475 |
|
59ed6f
|
476 |
var rcmail_ui; |
5f660c
|
477 |
|
A |
478 |
function rcube_init_mail_ui() |
|
479 |
{ |
|
480 |
rcmail_ui = new rcube_mail_ui(); |
ec581c
|
481 |
rcube_event.add_listener({ object:rcmail_ui, method:'body_mouseup', event:'mouseup' }); |
0a36c3
|
482 |
rcube_event.add_listener({ object:rcmail_ui, method:'body_keydown', event:'keydown' }); |
e2b0a0
|
483 |
|
A |
484 |
$('iframe').load(iframe_events) |
ec581c
|
485 |
.contents().mouseup(function(e){rcmail_ui.body_mouseup(e)}); |
e2b0a0
|
486 |
|
a61bbb
|
487 |
if (rcmail.env.task == 'mail') { |
T |
488 |
rcmail.addEventListener('menu-open', 'open_listmenu', rcmail_ui); |
|
489 |
rcmail.addEventListener('menu-save', 'save_listmenu', rcmail_ui); |
9e5550
|
490 |
rcmail.addEventListener('aftersend-attachment', 'uploadmenu', rcmail_ui); |
7534f6
|
491 |
rcmail.addEventListener('aftertoggle-editor', 'resize_compose_body_ev', rcmail_ui); |
a61bbb
|
492 |
rcmail.gui_object('message_dragmenu', 'dragmessagemenu'); |
3940ba
|
493 |
|
A |
494 |
if (rcmail.env.action == 'compose') |
|
495 |
rcmail_ui.init_compose_form(); |
a61bbb
|
496 |
} |
5f660c
|
497 |
} |
e2b0a0
|
498 |
|
A |
499 |
// Events handling in iframes (eg. preview pane) |
|
500 |
function iframe_events() |
|
501 |
{ |
|
502 |
// this==iframe |
|
503 |
var doc = this.contentDocument ? this.contentDocument : this.contentWindow ? this.contentWindow.document : null; |
ec581c
|
504 |
rcube_event.add_listener({ element: doc, object:rcmail_ui, method:'body_mouseup', event:'mouseup' }); |
e2b0a0
|
505 |
} |
A |
506 |
|