Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
462b0a82a0
|
@ -995,13 +995,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
|
||||
|
@ -1051,13 +1051,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
|
||||
|
@ -1455,13 +1455,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'}
|
||||
|
@ -1507,13 +1507,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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
|
||||
<div class="resourceSharePopup">
|
||||
<div class="uploadBoxContainer">
|
||||
<div>
|
||||
<div class="sendText fl">将资源发送至</div>
|
||||
<div class="resourcesSendTo">
|
||||
|
@ -9,8 +9,9 @@
|
|||
<option value="2" selected>项目</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="resourcePopupClose"> <a href="javascript:void(0);" class="resourceClose" onclick="closeModal();"></a></div>
|
||||
<!--<div class="resourcePopupClose"> <a href="javascript:void(0);" class="resourceClose" onclick="closeModal();"></a></div>-->
|
||||
<div class="fl">
|
||||
<%= form_tag search_user_project_user_path(user),:method => 'get',
|
||||
:remote=>true,:id=>'search_user_project_form',:class=>'resourcesSearchBox' do %>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
|
||||
<div class="resourceSharePopup">
|
||||
<div class="uploadBoxContainer">
|
||||
<div>
|
||||
<div class="sendText fl">将资源发送至</div>
|
||||
<div class="resourcesSendTo">
|
||||
|
@ -9,8 +9,9 @@
|
|||
<option value="2">项目</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="resourcePopupClose"> <a href="javascript:void(0);" class="resourceClose" onclick="closeModal();"></a></div>
|
||||
<!--<div class="resourcePopupClose"> <a href="javascript:void(0);" class="resourceClose" onclick="closeModal();"></a></div>-->
|
||||
<div class="fl">
|
||||
<%= form_tag search_user_course_user_path(user),:method => 'get',
|
||||
:remote=>true,:id=>'search_user_course_form',:class=>'resourcesSearchBox' do %>
|
||||
|
@ -22,30 +23,30 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<%= form_tag add_exist_file_to_course_user_path(user),:remote=>true,:id=>'course_list_form' %>
|
||||
<div>
|
||||
<div>
|
||||
|
||||
<%= hidden_field_tag(:send_id, send_id) %>
|
||||
<%= hidden_field_tag(:send_ids, send_ids) %>
|
||||
<div class="courseReferContainer">
|
||||
<% if !courses.empty? %>
|
||||
<% courses.each do |course| %>
|
||||
<ul class="courseSend fl">
|
||||
<li class="fl">
|
||||
<input name="course_ids[]" type="checkbox" value="<%= course.id %>" class="courseSendCheckbox"/>
|
||||
</li>
|
||||
<li class="sendCourseName fl"><%= truncate(course.name,:length=>18)%></li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<%= hidden_field_tag(:send_id, send_id) %>
|
||||
<%= hidden_field_tag(:send_ids, send_ids) %>
|
||||
<div class="courseReferContainer">
|
||||
<% if !courses.empty? %>
|
||||
<% courses.each do |course| %>
|
||||
<ul class="courseSend fl">
|
||||
<li class="fl">
|
||||
<input name="course_ids[]" type="checkbox" value="<%= course.id %>" class="courseSendCheckbox"/>
|
||||
</li>
|
||||
<li class="sendCourseName fl"><%= truncate(course.name,:length=>18)%></li>
|
||||
</ul>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="courseSendSubmit">
|
||||
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->
|
||||
<%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();' %>
|
||||
</div>
|
||||
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText mt10" onclick="closeModal();">取消</a></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
<div>
|
||||
<div class="courseSendSubmit">
|
||||
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->
|
||||
<%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();' %>
|
||||
</div>
|
||||
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText mt10" onclick="closeModal();">取消</a></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<div class="resourceUploadPopup"><span class="uploadDialogText">上传资源 </span>
|
||||
<div class="resourcePopupClose"> <a href="javascript:void(0);" class="resourceClose" onclick="closeModal();"></a></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">
|
||||
<%= form_tag(user_resource_create_user_path, :multipart => true,:remote => !ie8?,:name=>"upload_form",:id=>'upload_form') do %>
|
||||
<div>
|
||||
|
@ -50,4 +51,4 @@
|
|||
</div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<!--</div>-->
|
|
@ -3,9 +3,16 @@
|
|||
//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);
|
||||
|
||||
$("#upload_box").css('left','').css('top','');
|
||||
$("#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');
|
||||
//var popupHeight = $(".resourceSharePopup").outerHeight(true);
|
||||
//$(".resourceSharePopup").css("marginTop",-popupHeight/2);
|
||||
//
|
||||
//$("#upload_box").css('left','').css('top','');
|
||||
//$("#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');
|
||||
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'resource_share_popup' ,:locals => {:courses=>@course,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>');
|
||||
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","").css("left","");
|
||||
$('#ajax-modal').parent().addClass("popbox").addClass("resourceUploadPopup");
|
||||
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
|
|
@ -1,11 +1,14 @@
|
|||
//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);
|
||||
|
||||
$("#upload_box").css('left','').css('top','');
|
||||
$("#upload_box").html('<%= escape_javascript( render :partial => "resource_share_for_project_popup" ,:locals => {:projects=>@projects,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>');
|
||||
$("#upload_box").css('display','block');
|
||||
//var popupHeight = $(".resourceSharePopup").outerHeight(true);
|
||||
//$(".resourceSharePopup").css("marginTop",-popupHeight/2);
|
||||
//
|
||||
//$("#upload_box").css('left','').css('top','');
|
||||
//$("#upload_box").html('<%#= escape_javascript( render :partial => "resource_share_for_project_popup" ,:locals => {:projects=>@projects,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>');
|
||||
//$("#upload_box").css('display','block');
|
||||
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'resource_share_for_project_popup' ,:locals => {:projects=>@projects,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>');
|
||||
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","").css("left","");
|
||||
$('#ajax-modal').parent().addClass("resourceUploadPopup").addClass("popbox")
|
||||
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
|
||||
|
|
|
@ -17,22 +17,18 @@
|
|||
}
|
||||
|
||||
function show_upload(){
|
||||
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 = $(".resourceUploadPopup").outerHeight(true);
|
||||
$(".resourceUploadPopup").css("marginTop",-popupHeight/2);
|
||||
|
||||
$("#upload_box").css('left',objLeft).css('top',objTop);
|
||||
$("#upload_box").html('<%= escape_javascript( render :partial => 'upload_resource' ,:locals => {:user=>@user})%>');
|
||||
$("#upload_box").css('display','block');
|
||||
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'upload_resource' ,:locals => {:user=>@user})%>');
|
||||
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");
|
||||
}
|
||||
|
||||
function closeModal()
|
||||
{
|
||||
$("#upload_box").css("display","none");
|
||||
hideModal($(".uploadBoxContainer"));
|
||||
}
|
||||
|
||||
function check_files(){
|
||||
|
@ -97,7 +93,7 @@
|
|||
<div class="resourcesSelectSend">
|
||||
<div class="fl">选择 <span class="c_red" id="res_count">0</span> 个资源</div>
|
||||
<div class="resourcesSelectSendButton" onclick="batch_send();">
|
||||
<a href="javascript:void(0);" class="sendButtonBlue db" >发送</a>
|
||||
<a href="javascript:void(0);" class="sendButtonBlue db" data-remote="true" >发送</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -111,13 +107,14 @@
|
|||
</div>
|
||||
|
||||
<div class="cl"></div>
|
||||
<div id="upload_box" style="display: none">
|
||||
<%= render :partial => 'upload_resource' ,:locals => {:user=>@user}%>
|
||||
</div>
|
||||
<!--<div id="upload_box" style="display: none">-->
|
||||
<!--<%#= render :partial => 'upload_resource' ,:locals => {:user=>@user}%>-->
|
||||
<!--</div>-->
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu" id="contextMenu">
|
||||
<li><a tabindex="-1" href="#" onclick="if(<%= User.current.logged?%>)preview();" onfocus="this.blur()">预览</a></li>
|
||||
<li><a tabindex="-1" href="#" onclick="if(<%= User.current.logged?%>)rename();" onfocus="this.blur()">重命名</a></li>
|
||||
<li><a tabindex="-1" href="#" onclick="if(<%= User.current.logged?%>)show_send();" onfocus="this.blur()" >发送</a></li>
|
||||
<!-- data-remote="true" 这个属性会让ajax请求状态标志就在当前按钮的上方显示,就不会滚动浏览器,因而弹出框也会在当前窗口中央展示-->
|
||||
<li><a tabindex="-1" href="#" onclick="if(<%= User.current.logged?%>)show_send();" data-remote="true" onfocus="this.blur()" >发送</a></li>
|
||||
<li><a tabindex="-1" href="#" onclick="if(<%= User.current.logged?%>)delete_file();" onfocus="this.blur()">删除</a></li>
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -410,8 +410,8 @@ a.replyGrey {color:#888888; display:inline-block;}
|
|||
a.replyGrey:hover {color:#4b4b4b;}
|
||||
|
||||
/*上传资源弹窗*/
|
||||
.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;}
|
||||
.uploadDialogText {font-size:16px; color:#15bccf; line-height:16px; padding-top:20px; width:140px; display:inline-block;}
|
||||
.resourceUploadPopup {width:400px; height:auto; border:3px solid #15bccf !important; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-200px; z-index:1000;}
|
||||
.uploadDialogText {font-size:16px; color:#15bccf; line-height:16px; width:140px; display:inline-block;}/*padding-top:20px;*/
|
||||
.uploadBoxContainer {height:33px; line-height:33px; margin-top:10px; position:relative}
|
||||
.uploadBox {width:100px; height:33px; line-height:33px; text-align:center; vertical-align:middle; background-color:#64bdd9; border-radius:3px; float:left; margin-right:12px;}
|
||||
a.uploadBoxIcon {background:url(images/resource_icon_list.png) -35px 10px no-repeat; float:left; display:block; width:81px; height:30px; padding-left:22px; font-size:14px; color:#ffffff;}
|
||||
|
@ -442,12 +442,12 @@ a.uploadIcon {background:url(images/resource_icon_list.png) 8px -60px no-repeat;
|
|||
/*.courseSendSubmit:hover {background-color:#0182bb;}*/
|
||||
.courseSendCancel {width:50px; height:25px; line-height:25px; text-align:center; vertical-align:middle; background-color:#c1c1c1; float:left}
|
||||
a.sendSourceText {font-size:14px; color:#ffffff;}
|
||||
input.sendSourceText {font-size:14px;color:#ffffff;background-color:#64bdd9;cursor: pointer;}
|
||||
input.sendSourceText {font-size:14px;color:#ffffff;background-color:#64bdd9;cursor: pointer; outline: none;}
|
||||
/*input.sendSourceText:hover {font-size:14px; color:#ffffff;}*/
|
||||
.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;}
|
||||
|
|
Loading…
Reference in New Issue