From 1c4e3545c7de6563757387d4d71b91413329b200 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 19 Feb 2016 14:16:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=BC=B9=E6=A1=86=E5=89=A7?= =?UTF-8?q?=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/search_user_course.js.erb | 52 +++++++++++------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/app/views/users/search_user_course.js.erb b/app/views/users/search_user_course.js.erb index eed7499d5..ff93e4443 100644 --- a/app/views/users/search_user_course.js.erb +++ b/app/views/users/search_user_course.js.erb @@ -1,26 +1,26 @@ -//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_popup" ,:locals => {:courses=>@course,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>'); -//$("#upload_box").css('display','block'); -<% if params[:send_type].present? && params[:send_type] == 'news' %> - $("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_news_to_course' ,:locals => {:courses=>@course,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>'); -<% elsif params[:send_type] == 'file' %> - $("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/resource_share_popup' ,:locals => {:courses=>@course,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>'); -<% elsif params[:send_type] == 'message' %> - $("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_message_to_course' ,:locals => {:courses=>@course,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>'); -<% end %> -showModal('ajax-modal', '452px'); -$('#ajax-modal').siblings().remove(); -$('#ajax-modal').before(""); -$('#ajax-modal').parent().css("top","415px").css("left","1045px"); -$('#ajax-modal').parent().addClass("popbox").addClass("resourceUploadPopup"); -$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px"); -var val = $("#search_course_input").val(); -$("#search_course_input").val("").focus().val(val); +//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_popup" ,:locals => {:courses=>@course,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>'); +//$("#upload_box").css('display','block'); +<% if params[:send_type].present? && params[:send_type] == 'news' %> + $("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_news_to_course' ,:locals => {:courses=>@course,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>'); +<% elsif params[:send_type] == 'file' %> + $("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/resource_share_popup' ,:locals => {:courses=>@course,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>'); +<% elsif params[:send_type] == 'message' %> + $("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_message_to_course' ,:locals => {:courses=>@course,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>'); +<% end %> +showModal('ajax-modal', '452px'); +$('#ajax-modal').siblings().remove(); +$('#ajax-modal').before(""); +$('#ajax-modal').parent().css("top","50%").css("left","50%"); +$('#ajax-modal').parent().addClass("popbox").addClass("resourceUploadPopup"); +$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px"); +var val = $("#search_course_input").val(); +$("#search_course_input").val("").focus().val(val);