Merge branch 'hjq_beidou' of http://git.trustie.net/jacknudt/trustieforge into hjq_beidou
commit
218a6b9358
@ -0,0 +1,26 @@
|
|||||||
|
|
||||||
|
<div id="popbox_upload" class="mb10" style="margin-top: -30px;color:#15bccf; font-size:16px;">
|
||||||
|
<div class="upload_con">
|
||||||
|
<h2 style="text-align: center"><%= l(:label_upload_files)%></h2>
|
||||||
|
<div class="upload_box">
|
||||||
|
<%= error_messages_for 'attachment' %>
|
||||||
|
<div id="network_issue" style="color: red; display: none;"><%= l(:label_file_upload_error_messages)%></div>
|
||||||
|
<%= form_tag(organization_files_path(org, :in_org => params[:in_org]), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %>
|
||||||
|
<!--<input type="hidden" name="org_subfield_attachment_type" value="<%#= org_subfield_attachment_type%>">-->
|
||||||
|
<%= render :partial => 'files/org_subfield_upload_attachment_list', :locals => {:container => org}%>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<a href="javascript:void(0);" class=" fr grey_btn mr40" onclick="hideModal();"><%= l(:button_cancel)%></a>
|
||||||
|
<a id="submit_org_resource" href="javascript:void(0);" class="blue_btn fr" onclick="submit_resource();"><%= l(:button_confirm)%></a>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function submit_resource()
|
||||||
|
{
|
||||||
|
$('#submit_org_resource').parent().submit();
|
||||||
|
}
|
||||||
|
</script>
|
@ -1,71 +1,84 @@
|
|||||||
<% if @addTag%>
|
<% if @addTag%>
|
||||||
<% if @obj_flag == '3'%>
|
<% if @obj_flag == '3'%>
|
||||||
$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||||
//$('#put-tag-form-issue').hide();
|
//$('#put-tag-form-issue').hide();
|
||||||
$('#name-issue').val("");
|
$('#name-issue').val("");
|
||||||
<% elsif @obj_flag == '6'%>
|
<% elsif @obj_flag == '6'%>
|
||||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||||
$("#put-tag-form- <%=@obj.class%>- <%=@obj.id%>").hide();
|
$("#put-tag-form- <%=@obj.class%>- <%=@obj.id%>").hide();
|
||||||
$("#put-tag-form-<%=@obj.class%>-<%=@obj.id%> #name").val("");
|
$("#put-tag-form-<%=@obj.class%>-<%=@obj.id%> #name").val("");
|
||||||
<% else %>
|
<% else %>
|
||||||
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||||
$('#tags_show').html('<%=render_attachments_tag_save(@project, nil)%>');
|
$('#tags_show').html('<%=render_attachments_tag_save(@project, nil)%>');
|
||||||
$('#put-tag-form #name').val("");
|
$('#put-tag-form #name').val("");
|
||||||
//$('#put-tag-form').hide();
|
//$('#put-tag-form').hide();
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
$("#attachments_fields").children().remove();
|
$("#attachments_fields").children().remove();
|
||||||
$("#upload_file_count").text("未上传文件");
|
$("#upload_file_count").text("未上传文件");
|
||||||
$('#upload_file_div').slideToggle('slow');
|
$('#upload_file_div').slideToggle('slow');
|
||||||
<% if @project %>
|
<% if @project %>
|
||||||
hideModal();
|
hideModal();
|
||||||
<% if @in_project_toolbar %>
|
<% if @in_project_toolbar %>
|
||||||
window.location.href = '<%= project_files_path(@project) %>'
|
window.location.href = '<%= project_files_path(@project) %>'
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
||||||
$("#resource_list").html('<%= j(render partial:"project_file", locals: {project: @project}) %>');
|
$("#resource_list").html('<%= j(render partial:"project_file", locals: {project: @project}) %>');
|
||||||
$("#project_files_count_info").html("<%= @all_attachments.count %>");
|
$("#project_files_count_info").html("<%= @all_attachments.count %>");
|
||||||
$("#project_files_count_nav").html("(<%= @all_attachments.count %>)")
|
$("#project_files_count_nav").html("(<%= @all_attachments.count %>)")
|
||||||
// 添加文件上传成功提示
|
// 添加文件上传成功提示
|
||||||
<% unless params[:attachments].nil? %>
|
<% unless params[:attachments].nil? %>
|
||||||
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
|
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
|
||||||
$("#course_list").prepend(div);
|
$("#course_list").prepend(div);
|
||||||
setTimeout( function(){div.remove();},3000)
|
setTimeout( function(){div.remove();},3000)
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%elsif @course%>
|
<%elsif @course%>
|
||||||
hideModal();
|
hideModal();
|
||||||
<%if @in_course_toolbar %>
|
<%if @in_course_toolbar %>
|
||||||
window.location.href='<%= course_files_path(@course)%>'
|
window.location.href='<%= course_files_path(@course)%>'
|
||||||
<%else%>
|
<%else%>
|
||||||
$("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>');
|
$("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>');
|
||||||
$("#courses_files_count_info").html("<%= @all_attachments.count%>");
|
$("#courses_files_count_info").html("<%= @all_attachments.count%>");
|
||||||
$("#courses_files_count_nav").html("(<%= @all_attachments.count%>)")
|
$("#courses_files_count_nav").html("(<%= @all_attachments.count%>)")
|
||||||
// 添加文件上传成功提示,
|
// 添加文件上传成功提示,
|
||||||
<% unless params[:attachments].nil? %>
|
<% unless params[:attachments].nil? %>
|
||||||
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
|
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
|
||||||
$("#course_list").prepend(div);
|
$("#course_list").prepend(div);
|
||||||
setTimeout( function(){div.remove();},3000)
|
setTimeout( function(){div.remove();},3000)
|
||||||
<% end %>
|
<% end %>
|
||||||
<%end%>
|
<%end%>
|
||||||
<% elsif @org_subfield %>
|
<% elsif @org_subfield %>
|
||||||
<% if params[:in_org] %>
|
<% if params[:in_org] %>
|
||||||
window.location.href = '<%= org_subfield_files_path @org_subfield %>';
|
window.location.href = '<%= org_subfield_files_path @org_subfield %>';
|
||||||
<%else %>
|
<%else %>
|
||||||
hideModal();
|
hideModal();
|
||||||
$("#resource_list").html('<%= j(render partial: "subfield_files" ,locals: {org_subfield: @org_subfield}) %>');
|
$("#resource_list").html('<%= j(render partial: "subfield_files" ,locals: {org_subfield: @org_subfield}) %>');
|
||||||
// 添加文件上传成功提示,
|
// 添加文件上传成功提示,
|
||||||
<% unless params[:attachments].nil? %>
|
<% unless params[:attachments].nil? %>
|
||||||
|
// var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
|
||||||
|
// $("#org_subfield_list").prepend(div);
|
||||||
|
// setTimeout( function(){div.remove();},3000);
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% elsif @organization %> //组织单独处理
|
||||||
|
<% if params[:in_org] %>
|
||||||
|
window.location.href = '<%= organization_files_path @organization %>';
|
||||||
|
<%else %>
|
||||||
|
hideModal();
|
||||||
|
$("#resource_list").html('<%= j(render partial: "subfield_files" ,locals: {org_subfield: @org_subfield}) %>');
|
||||||
|
// 添加文件上传成功提示,
|
||||||
|
<% unless params[:attachments].nil? %>
|
||||||
// var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
|
// var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
|
||||||
// $("#org_subfield_list").prepend(div);
|
// $("#org_subfield_list").prepend(div);
|
||||||
// setTimeout( function(){div.remove();},3000);
|
// setTimeout( function(){div.remove();},3000);
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
$(document).ready(img_thumbnails);
|
$(document).ready(img_thumbnails);
|
||||||
|
|
||||||
|
Loading…
Reference in new issue