资源每页显示的个数

This commit is contained in:
lizanle 2015-08-28 10:47:50 +08:00
parent d3f441d4da
commit f9651d853c
5 changed files with 18 additions and 28 deletions

View File

@ -962,13 +962,13 @@ class UsersController < ApplicationController
end
end
@type = params[:type] || 1
@limit = 15
@limit = 25
@is_remote = true
@atta_count = @attachments.count
@atta_pages = Paginator.new @atta_count, @limit, params['page'] || 1
@offset ||= @atta_pages.offset
#@curse_attachments_all = @all_attachments[@offset, @limit]
@attachments = paginateHelper @attachments,15
@attachments = paginateHelper @attachments,25
respond_to do |format|
format.js
end
@ -1018,13 +1018,13 @@ class UsersController < ApplicationController
end
end
@type = params[:type]
@limit = 15
@limit = 25
@is_remote = true
@atta_count = @attachments.count
@atta_pages = Paginator.new @atta_count, @limit, params['page'] || 1
@offset ||= @atta_pages.offset
#@curse_attachments_all = @all_attachments[@offset, @limit]
@attachments = paginateHelper @attachments,15
@attachments = paginateHelper @attachments,25
respond_to do |format|
format.js
end
@ -1422,13 +1422,13 @@ class UsersController < ApplicationController
end
end
@type = params[:type]
@limit = 15
@limit = 25
@is_remote = true
@atta_count = @attachments.count
@atta_pages = Paginator.new @atta_count, @limit, params['page'] || 1
@offset ||= @atta_pages.offset
#@curse_attachments_all = @all_attachments[@offset, @limit]
@attachments = paginateHelper @attachments,15
@attachments = paginateHelper @attachments,25
respond_to do |format|
format.js
format.html {render :layout => 'new_base_user'}
@ -1474,13 +1474,13 @@ class UsersController < ApplicationController
end
end
@type = params[:type]
@limit = 15
@limit = 25
@is_remote = true
@atta_count = @attachments.count
@atta_pages = Paginator.new @atta_count, @limit, params['page'] || 1
@offset ||= @atta_pages.offset
#@curse_attachments_all = @all_attachments[@offset, @limit]
@attachments = paginateHelper @attachments,15
@attachments = paginateHelper @attachments,25
respond_to do |format|
format.js
end

View File

@ -13,6 +13,6 @@ $("#ajax-modal").html('<%= escape_javascript( render :partial => 'resource_share
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().addClass("resourceUploadPopup");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().addClass("popbox").addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");

View File

@ -1,8 +1,4 @@
//var screenWidth = $(window).width();
//var screenHeight = $(window).height(); //当前浏览器窗口的 宽高
//var scrolltop = $(document).scrollTop();//获取当前窗口距离页面顶部高度
//var objLeft = (screenWidth - 2)/2.5 ; //2 可以根据需要修改
//var objTop = (screenHeight - 100)/2 + scrolltop; //100可以根据需要修改
//var popupHeight = $(".resourceSharePopup").outerHeight(true);
//$(".resourceSharePopup").css("marginTop",-popupHeight/2);
//
@ -13,6 +9,6 @@ $("#ajax-modal").html('<%= escape_javascript( render :partial => 'resource_share
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().addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().addClass("resourceUploadPopup").addClass("popbox")
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");

View File

@ -31,15 +31,9 @@
hideModal($(".uploadBoxContainer"));
}
// function closeModalShareResouceToCourse(){
// hideModal($(".uploadBoxContainer"));
// }
// function closeModalShareResouceToProject(){
// hideModal($(".uploadBoxContainer"));
// }
// function check_files(){
// return $("#attachments_fields").children().length == 0;
// }
function check_files(){
return $("#attachments_fields").children().length == 0;
}
function submit_files(){
$("#upload_form").submit();

View File

@ -432,7 +432,7 @@ input.sendSourceText {font-size:14px;color:#ffffff;background-color:#64bdd9;curs
.resourcesSendTo {float:left; height:20px; margin-top:15px;}
.resourcesSendType {border:1px solid #e6e6e6; width:60px; height:24px; outline:none; font-size:14px; color:#888888;}
.courseReferContainer {float:left; max-height:120px;margin-right:16px;margin-bottom:10px; overflow:scroll; overflow-x:hidden;}
.popbox{/* width:300px; *//* height:100px; */position:fixed !important;/* z-index:100; */left:50%;top:50%;margin:-100px 0 0 -150px; /* background:#fff; */ -moz-border-radius:5px; /* -webkit-border-radius:5px; */ /* border-radius:5px; */ /* box-shadow:0px 0px 8px #194a81; */ /* overflow:auto; */}
/*上传资源弹窗*/
.resourceUploadPopup {width:400px; height:auto; border:3px solid #15bccf; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-200px; z-index:1000;}
.uploadText {font-size:16px; color:#15bccf; line-height:16px; padding-top:20px; width:140px; display:inline-block;}