diff options
author | r3m0 <r3m0@38b22f21-9aea-0310-abfc-843a9883df58> | 2007-09-11 03:28:03 (GMT) |
---|---|---|
committer | r3m0 <r3m0@38b22f21-9aea-0310-abfc-843a9883df58> | 2007-09-11 03:28:03 (GMT) |
commit | 676959defe9cdbfff7371f452e27df74c779c895 (patch) | |
tree | dbde18b71e5b055daf73cfd95c883a96483db1c2 /exe/webui | |
parent | 2b611297ef5084133d8eaf251e819cb047c3f795 (diff) |
Attachments may now be embedded by merely typing the filename into the URL field
without using the file-browser button.
git-svn-id: https://exe.svn.sourceforge.net/svnroot/exe/trunk@3278 38b22f21-9aea-0310-abfc-843a9883df58
Diffstat (limited to 'exe/webui')
-rw-r--r-- | exe/webui/scripts/tinymce/jscripts/tiny_mce/plugins/advlink/jscripts/functions.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/exe/webui/scripts/tinymce/jscripts/tiny_mce/plugins/advlink/jscripts/functions.js b/exe/webui/scripts/tinymce/jscripts/tiny_mce/plugins/advlink/jscripts/functions.js index b8a6c75..eb61204 100644 --- a/exe/webui/scripts/tinymce/jscripts/tiny_mce/plugins/advlink/jscripts/functions.js +++ b/exe/webui/scripts/tinymce/jscripts/tiny_mce/plugins/advlink/jscripts/functions.js @@ -423,6 +423,17 @@ function insertAction() { checkPrefix(document.forms[0].href);
+ var src = document.forms[0].href.value;
+ // Apply the same file-browser button magic to any filenames which were
+ // typed into the URL field by hand, rather than selected via the browser button,
+ // as will apply to any !mailto: and !http: and !file: which isn't in the resource or previews dirs:
+ if (src.search('resources/')!=0 && src.search('/previews/')!=0 && src.search('../previews/')!=0 && src.search('http:')!=0 && src.search('file:')!=0 && src.search('mailto:')!= 0) {
+ // looks like a hand-typed filename,
+ // so use type file2insert to indicate that no browser or preview is necessary:
+ doBrowserHTML('hrefbrowser','href','file2insert','advlink');
+ src = document.forms[0].href.value;
+ }
+
elm = tinyMCE.getParentElement(elm, "a");
tinyMCEPopup.execCommand("mceBeginUndoLevel");
|