Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop

This commit is contained in:
cxt 2016-02-20 17:43:24 +08:00
commit 7305b20ab0
24 changed files with 2238 additions and 2130 deletions

View File

@ -74,6 +74,45 @@ class AttachmentsController < ApplicationController
:disposition => 'attachment' #inline can open in browser
end
def direct_download_history
@attachment_history = AttachmentHistory.find(params[:id])
@attachment_history.increment_download
send_file @attachment_history.diskfile_history, :filename => filename_for_content_disposition(@attachment_history.filename),
:type => detect_content_type(@attachment_history),
:disposition => 'attachment' #inline can open in browser
end
def download_history
@attachment_history = AttachmentHistory.find(params[:id])
candown = attachment_history_candown @attachment_history
if candown || User.current.admin? || User.current.id == @attachment_history.author_id
if stale?(:etag => @attachment_history.digest)
if params[:preview] == 'true'
convered_file = @attachment_history.diskfile_history
#如果本身不是pdf文件则先寻找是不是已转换化如果没有则转化
unless pdf?(convered_file)
convered_file = File.join(Rails.root, "files", "convered_office", @attachment.disk_filename + ".pdf")
unless File.exist?(convered_file)
office = Trustie::Utils::Office.new(@attachment_history.diskfile)
office.conver(convered_file)
end
end
if File.exist?(convered_file) && pdf?(convered_file)
send_file convered_file, :type => 'application/pdf; charset=utf-8', :disposition => 'inline'
else
direct_download_history
end
else
direct_download_history
end
end
else
render_403 :message => :notice_not_authorized
end
rescue => e
redirect_to "http://" + (Setting.host_name.to_s) +"/file_not_found.html"
end
def download
# modify by nwb
# 下载添加权限设置
@ -212,7 +251,7 @@ class AttachmentsController < ApplicationController
@history.version = @old_history.nil? ? 1 : @old_history.version + 1
@history.save #历史记录保存完毕
#将最新保存的记录 数据替换到 需要修改的文件记录
@old_attachment.attributes = @attachment.attributes.dup.except("id","container_id","container_type","is_public")
@old_attachment.attributes = @attachment.attributes.dup.except("id","container_id","container_type","is_public","downloads")
@old_attachment.save
#删除当前记录
@attachment.delete

View File

@ -112,7 +112,6 @@ class ProjectsController < ApplicationController
@project_pages = Project.project_entities.visible.like(params[:name]).page(params[:page]).per(10)
else
@project_pages = Project.project_entities.visible.page(params[:page] ).per(10)
@project_pages = Project.project_entities.visible.page(params[:page] ).per(10)
end
@projects = @project_pages.order("created_on desc")
@limit = 10#per_page_option

View File

@ -2283,7 +2283,7 @@ class UsersController < ApplicationController
@orgs = @user.organizations.where("name like ?", search).select{|org| OrgSubfield.where("organization_id = #{org.id} and field_type='Resource'").count > 0}
end
else
if params[:send_type].present? and params[:send_type] == 'news'
if params[:send_type].present? and (params[:send_type] == 'news' or params[:send_type] == 'message')
@orgs = @user.organizations.select{|org| OrgSubfield.where("organization_id = #{org.id} and field_type='Post'").count > 0}
else
@orgs = @user.organizations.select{|org| OrgSubfield.where("organization_id = #{org.id} and field_type='Resource'").count > 0}

View File

@ -1997,6 +1997,18 @@ module ApplicationHelper
courses_doing
end
def attachment_history_candown attachment_history
if attachment_history.container_type == "Course"
course = Course.find(attachment_history.container_id)
candown = User.current.member_of?(course) || (course.is_public && attachment_history.is_public == 1)
elsif attachment_history.container_type == "Project"
project = Project.find(attachment_history.container_id)
candown = User.current.member_of?(project) || (project.is_public && attachment_history.is_public == 1)
elsif attachment_history.container_type == "OrgSubfield"
org = OrgSubfield.find(attachment_history.container_id)
candown = User.current.member_of_org?(org) || (org.organization.is_public && attachment_history.is_public == 1)
end
end
def attachment_candown attachment
candown = false

View File

@ -63,7 +63,7 @@ module AvatarHelper
if source.class && source.id && File.exist?(disk_filename(source.class,source.id))
avatar_image(source, false)
elsif copy_course?(source.class, source.id)
avatar_image(source, true)
get_avatar(Course.find(source.is_copy)) rescue nil
else
File.join(relative_path,avatar_directory(source.class),'0')
end

View File

@ -1,3 +1,14 @@
class AttachmentHistory < ActiveRecord::Base
belongs_to :attachment,foreign_key: 'attachment_id'
cattr_accessor :storage_history_path
@@storage_history_path = Redmine::Configuration['attachments_storage_path'] || File.join(Rails.root, "files")
# Returns file's location on disk
def diskfile_history
File.join(self.class.storage_history_path, disk_directory.to_s, disk_filename.to_s)
end
def increment_download
increment!(:downloads)
end
end

View File

@ -1,54 +1,57 @@
<!--<div class="resourceUploadPopup">-->
<span class="uploadDialogText">更新资源版本</span>
<!--<div class="resourcePopupClose"> <a href="javascript:void(0);" class="resourceClose" onclick="closeModal();"></a></div>-->
<div class="uploadBoxContainer mt0">
<div>
<div>当前版本
<span class="attachment" >
<input readonly="readonly" name="attachments[1][filename]" value="<%=@attachment.filename%>" class="upload_filename readonly" type="text">
</span>
</div>
<% unless @attachment_histories.empty? %>
<div >历史版本</div>
<div style="max-height: 95px;overflow-y:auto; background-color: #e3e3e3;" class="mb10 p10">
<% @attachment_histories.each do |history| %>
<span class="attachment">
<input readonly="readonly" name="attachments_versions_<%= history.id%>" value="<%=history.filename%>" class="upload_filename readonly" type="text">
<span>版本号:<%= history.version %></span>
</span>
<% end %>
</div>
<% end %>
</div>
<%= form_tag(upload_attachment_version_path, :multipart => true,:remote => !ie8?,:name=>"upload_form",:id=>'upload_form') do %>
<%= hidden_field_tag :old_attachment_id,@attachment.id %>
<div>
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
</span>
</div>
<div class="uploadBox">
<input type="hidden" name="attachment_type" value="1">
<%= render :partial => 'attachments/upload_attachment_new_version' %>
<div class="cl"></div>
<!--<a href="javascript:void(0);" class=" fr grey_btn mr40" onclick="closeModal();"><%#= l(:button_cancel)%></a>-->
<!--<a id="submit_resource" href="javascript:void(0);" class="blue_btn fr" onclick="submit_resource();"><%#= l(:button_confirm)%></a>-->
</div>
<div class="uploadResourceIntr">
<div class="uploadResourceName fl"><span id="upload_file_count">(未选择文件)</span></div>
<div class="uploadResourceIntr2 fl">您可以上传小于<span class="c_red">50MB</span>的文件</div>
</div>
</div>
<div class="cl"></div>
<div style="margin-top: 10px" >
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText" onclick="">确定</a>-->
<%= submit_tag '确定',:onclick=>'upload_attachment_version(event);',:onfocus=>'this.blur()',:id=>'upload_files_submit_btn',:class=>'sendSourceText' %>
</div>
<div class="courseSendCancel"><a href="javascript:void(0);" id="upload_files_cancle_btn" class="sendSourceText" onclick="hideModal();">取消</a></div>
</div>
<% end %>
<div class="cl"></div>
<!--<div class="resourceUploadPopup">-->
<span class="uploadDialogText">更新资源版本</span>
<!--<div class="resourcePopupClose"> <a href="javascript:void(0);" class="resourceClose" onclick="closeModal();"></a></div>-->
<div class="uploadBoxContainer mt0">
<div>
<div>当前版本
<span class="attachment" >
<input readonly="readonly" name="attachments[1][filename]" value="<%=@attachment.filename%>" class="upload_filename readonly" type="text">
</span>
</div>
<% unless @attachment_histories.empty? %>
<div >历史版本</div>
<div style="max-height: 95px;overflow-y:auto; background-color: #e3e3e3;" class="mb10 p10">
<% @attachment_histories.each do |history| %>
<span class="attachment">
<%= link_to truncate(history.filename,length: 35, omission: '...'),
download_history_attachment_path(history.id, history.filename),
:title => history.filename+"\n"+history.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis; max-width:300px;",:class => "linkBlue f_14 f_b link_file_a2 fl" %>
<span class="fr">版本号:<%= history.version %></span>
<div class="cl"></div>
</span>
<% end %>
</div>
<% end %>
</div>
<%= form_tag(upload_attachment_version_path, :multipart => true,:remote => !ie8?,:name=>"upload_form",:id=>'upload_form') do %>
<%= hidden_field_tag :old_attachment_id,@attachment.id %>
<div>
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
</span>
</div>
<div class="uploadBox">
<input type="hidden" name="attachment_type" value="1">
<%= render :partial => 'attachments/upload_attachment_new_version' %>
<div class="cl"></div>
<!--<a href="javascript:void(0);" class=" fr grey_btn mr40" onclick="closeModal();"><%#= l(:button_cancel)%></a>-->
<!--<a id="submit_resource" href="javascript:void(0);" class="blue_btn fr" onclick="submit_resource();"><%#= l(:button_confirm)%></a>-->
</div>
<div class="uploadResourceIntr">
<div class="uploadResourceName fl"><span id="upload_file_count">(未选择文件)</span></div>
<div class="uploadResourceIntr2 fl">您可以上传小于<span class="c_red">50MB</span>的文件</div>
</div>
</div>
<div class="cl"></div>
<div style="margin-top: 10px" >
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText" onclick="">确定</a>-->
<%= submit_tag '确定',:onclick=>'upload_attachment_version(event);',:onfocus=>'this.blur()',:id=>'upload_files_submit_btn',:class=>'sendSourceText' %>
</div>
<div class="courseSendCancel"><a href="javascript:void(0);" id="upload_files_cancle_btn" class="sendSourceText" onclick="hideModal();">取消</a></div>
</div>
<% end %>
<div class="cl"></div>
<!--</div>-->

View File

@ -2,6 +2,6 @@ $("#ajax-modal").html('<%= escape_javascript( render :partial => 'attachments/sh
showModal('ajax-modal', '452px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 435px;' class='resourceClose'></a>");
$('#ajax-modal').parent().css("top","40%").css("left","46%");
$('#ajax-modal').parent().css("top","40%").css("left","50%");
$('#ajax-modal').parent().addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");

View File

@ -72,7 +72,7 @@
<%=link_to "点击展开更多", search_files_in_subfield_org_subfield_files_path(:org_subfield_id => org_subfield.id,:page => @page.to_i + 1, :name => params[:name],:insite => params[:insite]),:id => "show_more_attachments",:remote => "true",:class => "loadMore mt10 f_grey" %>
<% else %>
<!-- 全站搜索的时候 返回的页码对象是obj_pages,而站内搜索返回的页码对象是feedback_pages -->
<%=link_to "点击展开更多", org_subfield_files_path(:org_subfield_id => org_subfield.id, :page => @page.nil? ? 2 :(@page + 1)), :id => "show_more_attachments",:remote => "true",:class => "loadMore mt10 f_grey" %>
<%=link_to "点击展开更多", org_subfield_files_path(:org_subfield_id => org_subfield.id, :page => @page.nil? ? 2 :(@page.to_i + 1)), :id => "show_more_attachments",:remote => "true",:class => "loadMore mt10 f_grey" %>
<%end%>
<% end%>

View File

@ -43,16 +43,11 @@
<%#= link_to '首页', organization_path(@organization, :show_homepage => 1),:class=>"linkGrey8 f14" %>
</li>
<% if User.current.logged? %>
<li class="navOrgMenu fr" id="orgSwitch" style="cursor:pointer;">
<span class="orgMenuArrow" id="orgArrow">
<ul class="org_login_list" style="display:none;">
<li> <%= link_to "个人主页",user_path(User.current), :class => "menuGrey", :target => "_blank" %></li>
<li><%= link_to "退出",logout_organization_path(@organization), :class =>"menuGrey", :method => 'post', :rel => "nofollow" %></li>
<!--<li><%#= link_to "退出",signout_path, :class =>"linkGrey8", :method => 'post', :rel => "nofollow" %></li>-->
</ul>
</span>
<li class="navOrgMenu fr" id="orgUser" style="cursor:pointer;">
<%= link_to image_tag(url_to_avatar(User.current),:width => '23',:height => '23'), user_path(User.current),:alt => '用户头像', :target => '_blank',:style=>'border-radius:3px; vertical-align:top; margin-top:3px; display:inline-block; margin-right:3px;' %>
<%= link_to User.current, user_path(User.current),:id => "orgUserName",:class => 'fontGrey2 f14 mr5',:target => '_blank' %>
<%= link_to "退出",logout_organization_path(@organization), :class =>"menuGrey", :method => 'post', :rel => "nofollow" %>
</li>
<li class="navOrgMenu fr" id="orgUser" style="cursor:pointer;"><a href="javascript:void(0);" class="fontGrey2 f14" id="orgUserName"><%= User.current %></a></li>
<!--<li class="navOrgMenu fr"><%#=link_to User.current, user_path(User.current), :class => "linkGrey8 f14" %></li>-->
<% else %>
<li class="navOrgMenu fr"><a href="<%= signin_path(:login=>true) %>" class="linkGrey8 f14">登录</a></li>

View File

@ -34,7 +34,11 @@
<div class="postRightContainer ml10" onmouseover="$('#message_setting_<%= @topic.id%>').show();" onmouseout="$('#message_setting_<%= @topic.id%>').hide();">
<div class="postThemeContainer">
<div class="postDetailPortrait">
<%= link_to image_tag(url_to_avatar(@topic.author),:width=>50,:height => 50,:alt=>'图像' ),user_path(@topic.author) %>
<% if @topic.status == 1 %>
<%= image_tag("/images/trustie_logo1.png", width: "50px", height: "50px") %>
<% else %>
<%= link_to image_tag(url_to_avatar(@topic.author), :width => 50, :height => 50,:alt=>'图像' ), user_path(@topic.author) %>
<% end %>
</div>
<div class="postThemeWrap">
<% if User.current.logged? %>
@ -72,10 +76,14 @@
<div class="cl"></div>
<div class="postDetailCreater">
<% if @topic.try(:author).try(:realname) == ' ' %>
<%= link_to @topic.try(:author), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
<% if @topic.status == 1 %>
<span class="fontBlue2">确实团队</span>
<% else %>
<%= link_to @topic.try(:author).try(:realname), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
<% if @topic.try(:author).try(:realname) == ' ' %>
<%= link_to @topic.try(:author), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
<% else %>
<%= link_to @topic.try(:author).try(:realname), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
<% end %>
<% end %>
</div>
<div class="postDetailDate mb5"><%= format_time( @topic.created_on)%></div>

View File

@ -60,6 +60,31 @@
<% end %>
<<<<<<< HEAD
<%= labelled_form_for :repository, @repository, :url =>project_repositories_path(@project),:html => {:id => 'repository-form',:method=>"post"} do |f| %>
<div id="pro_st_edit_ku" class="pro_st_edit_ku">
<ul>
<li >
<label class="label02"><%=l(:label_scm)%></label>
<%= label_tag('repository_scm',
options_for_select(["Git"],@repository.class.name.demodulize),
:data => {:remote => true, :method => 'get'})%>
<% if @repository && ! @repository.class.scm_available %>
<span class="c_grey"><%= l(:text_scm_command_not_available) %></span>
<% end %>
</li>
<% unless judge_main_repository(@project) %>
<li>
<label class="label02"><%=l(:field_repository_is_default)%></label>
<%= f.check_box :is_default, :label => "", :no_label => true %></p>
</li>
<% end %>
<li >
<label class="label02"><span class="c_red">*</span><%=l(:label_repository_name)%></label>
<%= f.text_field :identifier, :disabled =>@repository.nil? || @repository.identifier_frozen? ? true:false,:label=>"", :no_label => true %>
<% unless @repository.identifier_frozen? %>
<span class="c_grey"><%=l(:text_length_between,:min=>1,:max=>254)<<l(:text_project_identifier_info) %></span>
=======
<% if @project.repositories.any? %>
<%= render :partial => 'projects/settings/rep_gitlab', :locals => {:project => @project, :ip => "ip", :project_path_cut => "project_path_cut" } %>
<%#= render :partial => 'projects/settings/rep_forge', :locals => {:project => @project, :ip => "ip", :project_path_cut => "project_path_cut" } %>
@ -84,6 +109,7 @@
<td class="w360" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" ><%=h truncate(repository.url,:length=>10) %></td>
<% end %>
</tr>
>>>>>>> develop
<% end %>
</tbody>
</table>

View File

@ -1,15 +1,23 @@
<div class="resources mt10" id="user_activity_<%= user_activity_id%>" onmouseover="$('#message_setting_<%= user_activity_id%>').show();" onmouseout="$('#message_setting_<%= user_activity_id%>').hide();">
<div class="homepagePostBrief">
<div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id,:host=>Setting.host_user), :alt => "用户头像" %>
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
<% if activity.status == 1 %>
<%= image_tag("/images/trustie_logo1.png", width: "50px", height: "50px") %>
<% else %>
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id,:host=>Setting.host_user), :alt => "用户头像" %>
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
<% end %>
</div>
<div class="homepagePostDes">
<div class="homepagePostTo break_word mt-4">
<% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
<% if activity.status == 1 %>
<span class="fontBlue2">确实团队</span>
<% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
<% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
<% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
<% end %>
<% end %>
TO
<%= link_to activity.course.name.to_s+" | 课程讨论区", course_boards_path(activity.course,:host=> Setting.host_course), :class => "newsBlue ml15 mr5"%>

View File

@ -10,11 +10,11 @@
//$("#upload_box").html('<%#= escape_javascript( render :partial => "resource_share_popup" ,:locals => {:courses=>@course,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>');
//$("#upload_box").css('display','block');
<% if params[:send_type].present? && params[:send_type] == 'news' %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_news_to_course' , :locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_news_to_course' , :locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
<% elsif params[:send_type] == 'file' %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/resource_share_popup' , :locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/resource_share_popup' , :locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
<% elsif params[:send_type] == 'message' %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_message_to_course' ,:locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_message_to_course' ,:locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
<% end %>
showModal('ajax-modal', '452px');
$('#ajax-modal').siblings().remove();

View File

@ -1,9 +1,9 @@
<% if params[:send_type].present? && params[:send_type] == 'news' %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_news_to_org' ,:locals => {:orgs=>@orgs,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>');
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_news_to_org' ,:locals => {:orgs=>@orgs,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>');
<% elsif params[:send_type] == 'file' %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/resource_share_for_orgs' ,:locals => {:orgs=>@orgs,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>');
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/resource_share_for_orgs' ,:locals => {:orgs=>@orgs,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>');
<% elsif params[:send_type] == 'message' %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_message_to_org' ,:locals => {:orgs=>@orgs,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>');
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_message_to_org' ,:locals => {:orgs=>@orgs,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>');
<% end %>
showModal('ajax-modal', '452px');
$('#ajax-modal').siblings().remove();

View File

@ -1,9 +1,9 @@
<% if params[:send_type].present? && params[:send_type] == 'news' %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_news_to_project', :locals => {:projects => @projects, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_news_to_project', :locals => {:projects => @projects, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
<% elsif params[:send_type] == 'file' %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/resource_share_for_project_popup', :locals => {:projects => @projects, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/resource_share_for_project_popup', :locals => {:projects => @projects, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
<% elsif params[:send_type] == 'message' %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_message_to_project', :locals => {:projects => @projects, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_message_to_project', :locals => {:projects => @projects, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
<% end %>
showModal('ajax-modal', '452px');
$('#ajax-modal').siblings().remove();

View File

@ -21,7 +21,7 @@
showModal('ajax-modal', '452px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='closeModal();' style='margin-left: 435px;' class='resourceClose'></a>");
$('#ajax-modal').parent().css("top","40%").css("left","46%");
$('#ajax-modal').parent().css("top","50%").css("left","50%");
$('#ajax-modal').parent().addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
}

View File

@ -869,6 +869,7 @@ RedmineApp::Application.routes.draw do
get 'attachments/attachment_versions/:id',:to=>'attachments#attachment_versions',:as=>'attachments_versions'
post 'attachments/upload_attachment_version',:to=>'attachments#upload_attachment_version',:as=>'upload_attachment_version'
get 'attachments/download/:id/:filename', :to => 'attachments#download', :id => /\d+/, :filename => /.*/, :as => 'download_named_attachment'
get 'attachments/download_history/:id/:filename', :to => 'attachments#download_history', :id => /\d+/, :filename => /.*/, :as => 'download_history_attachment'
get 'attachments/download/:id', :to => 'attachments#download', :id => /\d+/
get 'attachments/thumbnail/:id(/:size)', :to => 'attachments#thumbnail', :id => /\d+/, :size => /\d+/, :as => 'thumbnail'
get 'attachments/autocomplete'

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@ function sd_create_editor(params){
var edit = this.edit;
var body = edit.doc.body;
edit.iframe.height(paramsHeight);
//this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : (params.kindutil.GECKO ? body.offsetHeight+26:body.offsetHeight)) , paramsHeight));
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : (params.kindutil.GECKO ? body.offsetHeight+26:body.offsetHeight)) , paramsHeight));
},
afterBlur:function(){
//params.toolbar_container.hide();

View File

@ -126,7 +126,8 @@ function init_des_data(){
nh_reset_form(params);
});
params.submit_btn.click(function () {
params.form.submit();
params.editor.sync();
params.form[0].submit();
});
params.textarea.data('init', 1);
$(this).show();

View File

@ -1083,6 +1083,7 @@ a.c_grey{ color:#999999;}
a:hover.c_grey{ color:#333;}
a.link_file_a{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-left:20px; }
a:hover.link_file_a{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;}
a.link_file_a2{ background:url(../images/pic_file.png) 0 -15px no-repeat; padding-left: 20px;}
.link_file_a{ display:block; max-width:450px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.last_time{width:auto; text-align:right; margin-right:70px;}
.link_file_box{ width:360px;}

View File

@ -69,7 +69,7 @@ a.linkGrey8:hover {color:#585858;}
.orgMenuArrow2 {background:url(../images/nav_icon.png) -10px -132px no-repeat; position:relative; display:inline-block; width:20px; height:30px;}
.org_login_list{ border:1px solid #eaeaea; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-53px;
position:absolute; z-index:9999; line-height:2; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); margin-top: 30px;}
#orgUserName {max-width:50px; overflow:hidden; white-space: nowrap; text-overflow: ellipsis; display:inline-block;}
#orgUserName {display:inline-block;}
.org_login_list a {color:#269ac9;}
.orgListStatus {width:55px; float:left;}
@ -113,4 +113,6 @@ div.flash {margin-top :0px !important}
.blueBtn:hover {background-color:#298fbd;}
/*文本描述展开高度*/
.maxh360 {max-height: 810px;}
.lh18 { line-height: 18px;}
.lh18 { line-height: 18px;}
a.link_file_a2{ background:url(../images/pic_file.png) 0 -15px no-repeat; padding-left: 20px;}

View File

@ -255,6 +255,7 @@ a.bBlue {background-color:#3498db;}
a.bBlue:hover {background-color:#297fb8;}
a.submit_btn {border:1px solid #3498db; padding:3px 10px; border-radius:3px; color:#3498db;}
a.submit_btn:hover {background-color:#3498db; color:#ffffff;}
a.link_file_a2{ background:url(../images/pic_file.png) 0 -15px no-repeat; padding-left: 20px;}
/* commonBtn */
.grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center;padding:2px 10px;}