diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-11-04 15:12:31 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-11-04 15:12:31 +0000 |
| commit | 7a9c52ae56da365213ff7a10b1bd384d3d5a42e5 (patch) | |
| tree | d32096a63b626fd9a77d8fc196d6a5b5c8a8c9c8 /roundcubemail/program/js/editor.js | |
| parent | 1e4c231c0eabecf8723186dcea9a18692e7413e0 (diff) | |
- Don't use external js file for images listing in HTML editor
git-svn-id: https://svn.roundcube.net/trunk@5391 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js/editor.js')
| -rw-r--r-- | roundcubemail/program/js/editor.js | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/roundcubemail/program/js/editor.js b/roundcubemail/program/js/editor.js index 63186fb02..9ad50cea5 100644 --- a/roundcubemail/program/js/editor.js +++ b/roundcubemail/program/js/editor.js @@ -31,7 +31,7 @@ function rcmail_editor_init(config) remove_script_host: false, gecko_spellcheck: true, convert_urls: false, // #1486944 - external_image_list_url: 'program/js/editor_images.js', + external_image_list: window.rcmail_editor_images, rc_client: rcmail }; @@ -129,3 +129,18 @@ function rcmail_toggle_editor(select, textAreaId, flagElement) select.checked = true; } } + +// editor callbeck for images listing +function rcmail_editor_images() +{ + var i, files = rcmail.env.attachments, list = []; + + for (i in files) { + att = files[i]; + if (att.complete && att.mimetype.indexOf('image/') == 0) { + list.push([att.name, rcmail.env.comm_path+'&_action=display-attachment&_file='+i+'&_id='+rcmail.env.compose_id]); + } + } + + return list; +}; |
