2016-01-20 16:24:14 +08:00
|
|
|
<% 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}) %>');
|
2016-01-25 14:19:39 +08:00
|
|
|
<% elsif params[:send_type] == 'file' %>
|
2016-01-20 16:24:14 +08:00
|
|
|
$("#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}) %>');
|
2016-01-25 14:19:39 +08:00
|
|
|
<% 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}) %>');
|
2016-01-20 16:24:14 +08:00
|
|
|
<% end %>
|
2016-02-03 23:30:07 +08:00
|
|
|
|
|
|
|
var screenWidth = $(window).width();
|
|
|
|
var screenHeight = $(window).height(); //当前浏览器窗口的 宽高
|
|
|
|
var boxWidth = 452;
|
|
|
|
|
|
|
|
var scrolltop = $(document).scrollTop();//获取当前窗口距离页面顶部高度
|
|
|
|
var objLeft = (screenWidth - boxWidth)/2 ; //2 可以根据需要修改
|
|
|
|
var objTop = (screenHeight - 100)/2 + scrolltop; //100可以根据需要修改
|
|
|
|
|
2015-08-28 09:34:02 +08:00
|
|
|
showModal('ajax-modal', '452px');
|
|
|
|
$('#ajax-modal').siblings().remove();
|
2015-12-29 17:13:01 +08:00
|
|
|
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 435px;' class='resourceClose'></a>");
|
2016-02-03 23:30:07 +08:00
|
|
|
$('#ajax-modal').parent().css("top",objTop+"px").css("left",objLeft+200+"px");
|
2015-08-28 10:47:50 +08:00
|
|
|
$('#ajax-modal').parent().addClass("resourceUploadPopup").addClass("popbox")
|
|
|
|
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
|
2015-12-07 16:21:00 +08:00
|
|
|
//$("#search_project_input").focus();
|
|
|
|
var val = $("#search_project_input").val();
|
|
|
|
$("#search_project_input").val("").focus().val(val);
|