diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 7b81d12db..0f8330afe 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -176,12 +176,6 @@ class FilesController < ApplicationController def index @flag = params[:flag] || false - #sort_init 'filename', 'asc' - # sort_init 'created_on', 'desc' - # sort_update 'created_on' => "#{Attachment.table_name}.created_on", - # 'filename' => "#{Attachment.table_name}.filename", - # 'size' => "#{Attachment.table_name}.filesize", - # 'downloads' => "#{Attachment.table_name}.downloads" sort = "" @sort = "" @order = "" diff --git a/app/views/avatar/_new_avatar_form.html.erb b/app/views/avatar/_new_avatar_form.html.erb index 64abfbc30..de3bf2b65 100644 --- a/app/views/avatar/_new_avatar_form.html.erb +++ b/app/views/avatar/_new_avatar_form.html.erb @@ -1,11 +1,10 @@ <%= image_tag(url_to_avatar(source), id: "avatar_image", :width =>"60", :height =>"60",:alt=>"上传图片")%> -<%#= link_to l(:button_delete_file),{:controller => :avatar,:action => :delete_image,:remote=>true,:source_type=> source.class,:source_id=>source.id},:confirm => l(:text_are_you_sure), :method => :post, :class => "upbtn fl" %> -<%= l(:button_upload_photo) %> +<%= l(:button_upload_photo) %> <%= file_field_tag 'avatar[image]', - :id => nil, - :class => 'upload_file', + :id => "upload_img", + :class => 'undis', :size => "1", :multiple => true, :data => { diff --git a/app/views/courses/_course_activity.html.erb b/app/views/courses/_course_activity.html.erb index 1a033b372..e2e1dcfc2 100644 --- a/app/views/courses/_course_activity.html.erb +++ b/app/views/courses/_course_activity.html.erb @@ -73,6 +73,25 @@ $(function () { init_activity_KindEditor_data(<%= activity.id%>, null, "87%"); + var description_images=$("div#activity_description_<%= activity.id %>").find("img"); + if (description_images.length>0) { + for (var i=0; i").attr("href",image.attr('src')); + image.wrap(element); + } + } + $('#activity_description_<%= activity.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false}); + + var reply_images=$("div#reply_content_<%= activity.id %>").find("img"); + if (reply_images.length>0) { + for (var i=0; i").attr("href",image.attr('src')); + image.wrap(element); + } + } + $('#reply_content_<%= activity.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false}); }); <% if activity %> diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb index fbc545607..489820f0c 100644 --- a/app/views/layouts/base.html.erb +++ b/app/views/layouts/base.html.erb @@ -19,7 +19,7 @@ <%= yield :header_tags -%> <%= stylesheet_link_tag 'base','header', :media => 'all'%> - +