diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index c641b92..67930f6 100755 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -25,15 +25,11 @@ function insertAttachment(url,name) { var ext = url.split('.').pop(); var img_ext = [ "jpg", "png", "bmp" , "jpeg" ]; - var text_ext = [ "pdf" ]; if ( img_ext.indexOf(ext) > -1) { tinymce.activeEditor.setContent(tinymce.activeEditor.getContent({format : 'raw'}) + ""); } - else if (text_ext.indexOf(ext) > -1) { + else { tinymce.activeEditor.setContent(tinymce.activeEditor.getContent({format : 'raw'}) + "" + name +""); } - else { - alert("" + "Link"); - } }