资源库:上传资源弹框使用新样式
This commit is contained in:
parent
574f491b56
commit
eb5f5f9ede
|
@ -3823,6 +3823,7 @@ class UsersController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
# 导入资源
|
||||
def import_resources
|
||||
@resource_id = params[:project_id].nil? ? (params[:course_id].nil? ? params[:subfield_file_id] : params[:course_id]) : params[:project_id]
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
<div class="resourcesUploadBox mt10" ><a href="javascript:void(0);" onclick="show_upload();" class="uploadBoxIcon">上传资源</a></div>
|
||||
<div class="resourcesUploadBox mt10" ><!--<a href="javascript:void(0);" onclick="show_upload();" class="uploadBoxIcon">上传资源</a>-->
|
||||
<%= link_to "上传资源", user_resource_user_path(:type => @type, :status => @type, :upload_resourse => true), :class => 'uploadBoxIcon', :remote => true %>
|
||||
</div>
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
<!--<div class="resourceUploadPopup">-->
|
||||
<span class="uploadDialogText">上传资源 </span>
|
||||
<!--<div class="resourcePopupClose"> <a href="javascript:void(0);" class="resourceClose" onclick="closeModal();"></a></div>-->
|
||||
<div class="uploadBoxContainer">
|
||||
<div style="width:450px;">
|
||||
<div class="sy_popup_top">
|
||||
<h3 class="fl">上传资源</h3>
|
||||
<a href="javascript:void(0);" class="sy_icons_close fr" onclick="hideModal()"></a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="sy_popup_con mt20" style="width:450px;">
|
||||
<ul class="sy_popup_add ml35" >
|
||||
<%= form_tag(user_resource_create_user_path(:type => type,:status => status), :multipart => true, :remote => !ie8?, :name => "upload_form",:id => 'upload_form') do %>
|
||||
<div>
|
||||
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
|
||||
<% if defined?(container) && container && container.saved_attachments %>
|
||||
<script>alert('<% container %>')</script>
|
||||
|
@ -26,29 +29,26 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
</div>
|
||||
<div class="uploadBox">
|
||||
|
||||
<input type="hidden" name="attachment_type" value="1">
|
||||
<%= render :partial => 'attachment_list' %>
|
||||
<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=>'submit_files();',: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="closeModal();">取消</a></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<!--</div>-->
|
||||
</ul>
|
||||
</div>
|
||||
<li class="mt10 ml35 mb10">
|
||||
<label class="mr27"> </label>
|
||||
<a href="javascript:void(0);" class="sy_btn_grey fl" id="upload_files_cancle_btn" onclick="hideModal()">取 消</a>
|
||||
<%= submit_tag '确定',:onclick => 'submit_files();',:onfocus=>'this.blur()',:id=>'upload_files_submit_btn',:class=>'sy_btn_blue fl ml20' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
</div>
|
|
@ -1,3 +1,8 @@
|
|||
<% if params[:upload_resourse] == 'true' %>
|
||||
var htmlvalue = "<%= escape_javascript(render :partial => 'upload_resource' ,:locals => {:user => User.current.id, :type => @type, :status => @status}) %>";
|
||||
pop_box_new(htmlvalue, 420, 316);
|
||||
<% end %>
|
||||
|
||||
$("#search_div").html('<%= escape_javascript( render :partial => 'resource_search_form', :locals => {:user => @user, :type => @type} ) %>');
|
||||
$("#resource_tip_list").html('<%= escape_javascript( render :partial => 'users/user_resource_tip_list', :locals => {:user => @user, :type => @type, :status => @status}) %>');
|
||||
$("#resources_list").html('<%= escape_javascript( render :partial => 'resources_list' , :locals => { :attachments => @attachments}) %>');
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
Loading…
Reference in New Issue