Merge branch 'master' of https://github.com/HausdorffHimself/fetsite
This commit is contained in:
@@ -25,15 +25,11 @@
|
|||||||
function insertAttachment(url,name) {
|
function insertAttachment(url,name) {
|
||||||
var ext = url.split('.').pop();
|
var ext = url.split('.').pop();
|
||||||
var img_ext = [ "jpg", "png", "bmp" , "jpeg" ];
|
var img_ext = [ "jpg", "png", "bmp" , "jpeg" ];
|
||||||
var text_ext = [ "pdf" ];
|
|
||||||
|
|
||||||
if ( img_ext.indexOf(ext) > -1) {
|
if ( img_ext.indexOf(ext) > -1) {
|
||||||
tinymce.activeEditor.setContent(tinymce.activeEditor.getContent({format : 'raw'}) + "<img src=\"" + url + "\" title=\"" + name + "\">");
|
tinymce.activeEditor.setContent(tinymce.activeEditor.getContent({format : 'raw'}) + "<img src=\"" + url + "\" title=\"" + name + "\">");
|
||||||
}
|
}
|
||||||
else if (text_ext.indexOf(ext) > -1) {
|
else {
|
||||||
tinymce.activeEditor.setContent(tinymce.activeEditor.getContent({format : 'raw'}) + "<a href=\"" + url + "\">" + name +"</a>");
|
tinymce.activeEditor.setContent(tinymce.activeEditor.getContent({format : 'raw'}) + "<a href=\"" + url + "\">" + name +"</a>");
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
alert("<a href=\"" + url + "\">" + "Link</a>");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
<%= semantic_form_for @thema do |f| %>
|
<%= semantic_form_for @thema do |f| %>
|
||||||
<%= f.inputs do %>
|
<%= f.inputs do %>
|
||||||
<%= f.input :title %>
|
<%= f.input :title %>
|
||||||
<%= f.input :picture, :as => :file %>
|
|
||||||
<%= f.input :themengruppe %>
|
<%= f.input :themengruppe %>
|
||||||
<%= f.input :text, :as=>:tinymce_text%>
|
<%= f.input :text, :as=>:tinymce_text%>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
Reference in New Issue
Block a user