Merge branch 'szzh' into dev_hjq
This commit is contained in:
commit
d1da996539
|
@ -121,7 +121,7 @@ class UsersController < ApplicationController
|
||||||
messages = MessageAll.where("user_id =?", @user).order("created_at desc")
|
messages = MessageAll.where("user_id =?", @user).order("created_at desc")
|
||||||
messages.each do |message_all|
|
messages.each do |message_all|
|
||||||
# 在点击或者刷新消息列表后未读的消息存放在数组
|
# 在点击或者刷新消息列表后未读的消息存放在数组
|
||||||
if message_all.message_type != "SystemMessage" && message_all.message.viewed == 0
|
if message_all.message_type != "SystemMessage"&& !message_all.message.nil? && message_all.message.viewed == 0
|
||||||
@message_alls << message_all.message
|
@message_alls << message_all.message
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -522,6 +522,7 @@ class UsersController < ApplicationController
|
||||||
@atta_count = @attachments.count
|
@atta_count = @attachments.count
|
||||||
@atta_pages = Paginator.new @atta_count, @limit, params['page'] || 1
|
@atta_pages = Paginator.new @atta_count, @limit, params['page'] || 1
|
||||||
@offset ||= @atta_pages.offset
|
@offset ||= @atta_pages.offset
|
||||||
|
@seleted_resources = session[:seleted_resource_ids].nil? ? [] : session[:seleted_resource_ids]
|
||||||
#@curse_attachments_all = @all_attachments[@offset, @limit]
|
#@curse_attachments_all = @all_attachments[@offset, @limit]
|
||||||
@attachments = paginateHelper @attachments,7
|
@attachments = paginateHelper @attachments,7
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
@ -555,6 +556,7 @@ class UsersController < ApplicationController
|
||||||
@atta_count = @attachments.count
|
@atta_count = @attachments.count
|
||||||
@atta_pages = Paginator.new @atta_count, @limit, params['page'] || 1
|
@atta_pages = Paginator.new @atta_count, @limit, params['page'] || 1
|
||||||
@offset ||= @atta_pages.offset
|
@offset ||= @atta_pages.offset
|
||||||
|
@seleted_resources = session[:seleted_resource_ids].nil? ? [] : session[:seleted_resource_ids]
|
||||||
#@curse_attachments_all = @all_attachments[@offset, @limit]
|
#@curse_attachments_all = @all_attachments[@offset, @limit]
|
||||||
@attachments = paginateHelper @attachments,7
|
@attachments = paginateHelper @attachments,7
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
@ -586,6 +588,7 @@ class UsersController < ApplicationController
|
||||||
@atta_count = @attachments.count
|
@atta_count = @attachments.count
|
||||||
@atta_pages = Paginator.new @atta_count, @limit, params['page'] || 1
|
@atta_pages = Paginator.new @atta_count, @limit, params['page'] || 1
|
||||||
@offset ||= @atta_pages.offset
|
@offset ||= @atta_pages.offset
|
||||||
|
@seleted_resources = session[:seleted_resource_ids].nil? ? [] : session[:seleted_resource_ids]
|
||||||
#@curse_attachments_all = @all_attachments[@offset, @limit]
|
#@curse_attachments_all = @all_attachments[@offset, @limit]
|
||||||
@attachments = paginateHelper @attachments,7
|
@attachments = paginateHelper @attachments,7
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
@ -596,8 +599,8 @@ class UsersController < ApplicationController
|
||||||
#将资源批量引入
|
#将资源批量引入
|
||||||
def import_resources_to_homework
|
def import_resources_to_homework
|
||||||
@attachments = []
|
@attachments = []
|
||||||
unless params[:checkbox1].nil? || params[:checkbox1].blank?
|
unless session[:seleted_resource_ids].nil? || session[:seleted_resource_ids].blank?
|
||||||
params[:checkbox1].each do |id|
|
session[:seleted_resource_ids].each do |id|
|
||||||
atta = Attachment.find(id)
|
atta = Attachment.find(id)
|
||||||
att_copy = atta.copy
|
att_copy = atta.copy
|
||||||
att_copy.container_id = nil
|
att_copy.container_id = nil
|
||||||
|
@ -608,11 +611,23 @@ class UsersController < ApplicationController
|
||||||
@attachments << att_copy
|
@attachments << att_copy
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
session[:seleted_resource_ids] = [] #保存后清空
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# ajax 用session保存选择的资源id
|
||||||
|
def store_selected_resource
|
||||||
|
session[:seleted_resource_ids] = [] if session[:seleted_resource_ids].nil?
|
||||||
|
if params[:save] == 'y'
|
||||||
|
session[:seleted_resource_ids] << params[:res_id]
|
||||||
|
else
|
||||||
|
session[:seleted_resource_ids].delete( params[:res_id])
|
||||||
|
end
|
||||||
|
render :nothing => true
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
include CoursesHelper
|
include CoursesHelper
|
||||||
def user_courses
|
def user_courses
|
||||||
|
|
|
@ -94,7 +94,7 @@
|
||||||
$('#reply_content_<%= activity.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});
|
$('#reply_content_<%= activity.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<% if activity %>
|
<% if activity && activity.course_act%>
|
||||||
<% act = activity.course_act %>
|
<% act = activity.course_act %>
|
||||||
<% case activity.course_act_type.to_s %>
|
<% case activity.course_act_type.to_s %>
|
||||||
<% when 'HomeworkCommon' %>
|
<% when 'HomeworkCommon' %>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<% if course %>
|
<% if course && tag_list.empty? == false%>
|
||||||
<span class="files_tag_icon" >
|
<span class="files_tag_icon" >
|
||||||
<a title="双击可编辑"
|
<a title=""
|
||||||
onclick="search_tag_attachment('<%= search_tag_attachment_course_files_path(course)%>','','<%= @q%>','<%= course.id%>');"
|
onclick="search_tag_attachment('<%= search_tag_attachment_course_files_path(course)%>','','<%= @q%>','<%= course.id%>');"
|
||||||
>全部</a></span>
|
>全部</a></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<% forum.tag_list.each do |tag|%>
|
<% forum.reload.tag_list.each do |tag|%>
|
||||||
<span class="postlabel mr10">
|
<span class="postlabel mr10">
|
||||||
<a href="javascript:void(0);" ondblclick="rename_tag($(this),<%= tag %>,<%= forum.id%>,5);" style="cursor: default" class="fontGrey2 mr5"><%= tag %></a>
|
<a title="双击可编辑" ondblclick="rename_tag($(this),'<%= tag %>',<%= forum.id%>,5);" style="cursor: pointer" class="fontGrey2 mr5"><%= tag %></a>
|
||||||
<%if forum.creator.id == User.current.id%>
|
<%if forum.creator.id == User.current.id%>
|
||||||
<a href="javascript:void(0);" class="fontGrey2" onclick="delete_forum_tag($(this));">×</a>
|
<a href="javascript:void(0);" class="fontGrey2" onclick="delete_forum_tag($(this));">×</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -98,12 +98,7 @@
|
||||||
domEle.parent().css("border","1px solid #ffffff");
|
domEle.parent().css("border","1px solid #ffffff");
|
||||||
$("#renameTagName").focus();
|
$("#renameTagName").focus();
|
||||||
}
|
}
|
||||||
//监听所有的单击事件
|
$("#renameTagName").live('blur',function(){
|
||||||
$(document).click(function(e){
|
|
||||||
node = document.elementFromPoint(e.clientX, e.clientY);
|
|
||||||
if(node.tagName == "INPUT"){ //如果是输入框的聚焦,那么就不要进行下去了
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if($("#renameTagName")[0] != undefined ){//存在renameTagName,则处于编辑状态
|
if($("#renameTagName")[0] != undefined ){//存在renameTagName,则处于编辑状态
|
||||||
if($("#renameTagName").val().trim() == tagName){ //如果值一样,则恢复原来的状态
|
if($("#renameTagName").val().trim() == tagName){ //如果值一样,则恢复原来的状态
|
||||||
ele.parent().css("border","");
|
ele.parent().css("border","");
|
||||||
|
@ -122,6 +117,30 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
//监听所有的单击事件
|
||||||
|
// $(document).click(function(e){
|
||||||
|
// node = document.elementFromPoint(e.clientX, e.clientY);
|
||||||
|
// if(node.tagName == "INPUT"){ //如果是输入框的聚焦,那么就不要进行下去了
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// if($("#renameTagName")[0] != undefined ){//存在renameTagName,则处于编辑状态
|
||||||
|
// if($("#renameTagName").val().trim() == tagName){ //如果值一样,则恢复原来的状态
|
||||||
|
// ele.parent().css("border","");
|
||||||
|
// ele.parent().html(tagNameHtml);
|
||||||
|
//
|
||||||
|
// }else{ //否则就要更新tag名称了
|
||||||
|
// if(confirm("是否将标签改为 "+ $("#renameTagName").val().trim())){
|
||||||
|
// $.post(
|
||||||
|
// '<%#= update_tag_name_path %>',
|
||||||
|
// {"taggableId": taggableId, "taggableType": taggableType, "tagName": tagName, "renameName": $("#renameTagName").val().trim()}
|
||||||
|
// )
|
||||||
|
// }else{
|
||||||
|
// ele.parent().css("border","");
|
||||||
|
// ele.parent().html(tagNameHtml);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
function del_forum_confirm(){
|
function del_forum_confirm(){
|
||||||
if(confirm('您确定要删除么?')){
|
if(confirm('您确定要删除么?')){
|
||||||
|
|
|
@ -21,6 +21,19 @@
|
||||||
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||||
$('#ajax-modal').parent().css("top","30%").css("left","20%").css("position","fixed");
|
$('#ajax-modal').parent().css("top","30%").css("left","20%").css("position","fixed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 点击 checkbox选中引用的资源的时候,保存该资源的id到session里去
|
||||||
|
function store_seleted_resource(dom){
|
||||||
|
if(dom.attr('checked') == 'checked' ){
|
||||||
|
$.get(
|
||||||
|
'<%= store_selected_resource_user_path(User.current) %>'+'?save=y&res_id='+dom.val()
|
||||||
|
)
|
||||||
|
}else {
|
||||||
|
$.get(
|
||||||
|
'<%= store_selected_resource_user_path(User.current) %>'+'?save=n&res_id='+dom.val()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="homepageRightBanner mb10">
|
<div class="homepageRightBanner mb10">
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
|
||||||
|
<% if attachments.nil? || attachments.empty? %>
|
||||||
|
<!--<p class="nodata">-->
|
||||||
|
<!--<%#= l(:label_no_data) %>-->
|
||||||
|
<!--</p>-->
|
||||||
|
<% else %>
|
||||||
|
<% attachments.each do |attach| %>
|
||||||
|
<ul class="resourcesList">
|
||||||
|
<li class="resourcesListCheckbox fl">
|
||||||
|
<input name="checkbox1[]" type="checkbox" onclick="store_seleted_resource($(this));" <%=seleted_resources.include?(attach.id.to_s) ? 'checked':'' %> value="<%= attach.id%>" class="resourcesCheckbox" />
|
||||||
|
</li>
|
||||||
|
<li class="resourcesListName fl">
|
||||||
|
<!--<a href="javascript:void(0);" class="resourcesBlack"><%#=truncate(attach.filename,:length=>18)%></a>-->
|
||||||
|
<%= link_to truncate(attach.filename,:length=>30), download_named_attachment_path(attach.id, attach.filename),
|
||||||
|
:title => attach.filename,:class=>'resourcesBlack'%>
|
||||||
|
</li>
|
||||||
|
<li class="resourcesListSize fl"><%= number_to_human_size(attach.filesize) %></li>
|
||||||
|
<li class="resourcesListType fl"><%= get_resource_type(attach.container_type)%></li>
|
||||||
|
<li class="resourcesListUploader fl"><%=User.find(attach.author_id).realname.blank? ? User.find(attach.author_id).nickname : User.find(attach.author_id).realname %></li>
|
||||||
|
<li style="display: none"><%= attach.author_id %></li>
|
||||||
|
<li class="resourcesListTime fl"><%= format_date(attach.created_on) %></li>
|
||||||
|
<li style="display: none"><%= attach.id %></li>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
|
@ -2,35 +2,39 @@
|
||||||
<div class="NewsBannerName"><%= title_for_message(params[:type]) %></div>
|
<div class="NewsBannerName"><%= title_for_message(params[:type]) %></div>
|
||||||
<ul class="resourcesSelect">
|
<ul class="resourcesSelect">
|
||||||
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
||||||
<ul class="homepagePostType" style="width:130px; left:-130px;">
|
<ul class="homepagePostType">
|
||||||
<li>
|
<li>
|
||||||
<ul class="homepagePostTypeHomework fl" style="width:70px;">
|
<ul class="homepagePostTypeHomework fl">
|
||||||
<li><%= link_to "全部",user_message_path(User.current), :class => "resourcesGrey" %></li>
|
<li class="f14"><strong>课程消息</strong></li>
|
||||||
<li><%= link_to "未读消息", user_message_path(User.current, :type => 'unviewed'), :class => "resourcesGrey" %></li>
|
<li><%= link_to "作业消息", user_message_path(User.current, :type => 'homework'), :class => "homepagePostTypeAssignment postTypeGrey" %></li>
|
||||||
<li><%= link_to "系统消息", user_system_messages_path(User.current), :class => "resourcesGrey" %></li>
|
<li><%= link_to "课程讨论",user_message_path(User.current, :type => 'course_message'), :class => "homepagePostTypeForum postTypeGrey" %></li>
|
||||||
|
<li><%= link_to "课程通知",user_message_path(User.current, :type => 'course_news'), :class => "homepagePostTypeNotice postTypeGrey" %></li>
|
||||||
<li class=""><strong>课程消息</strong></li>
|
<li><%= link_to "课程问卷", user_message_path(User.current, :type => 'poll'), :class => "homepagePostTypeQuiz postTypeGrey" %></a></li>
|
||||||
<li><%= link_to "作业消息", user_message_path(User.current, :type => 'homework'), :class => "resourcesGrey" %></li>
|
|
||||||
<li><%= link_to "课程讨论",user_message_path(User.current, :type => 'course_message'), :class => "resourcesGrey" %></li>
|
|
||||||
<li><%= link_to "课程通知",user_message_path(User.current, :type => 'course_news'), :class => "resourcesGrey" %></li>
|
|
||||||
<li><%= link_to "课程问卷", user_message_path(User.current, :type => 'poll'), :class => "resourcesGrey" %></a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<ul class="homepagePostTypeProject fl" style="width:60px;">
|
<ul class="homepagePostTypeProject fl">
|
||||||
<li class=""><strong>项目消息</strong></li>
|
<li class="f14"><strong>项目消息</strong></li>
|
||||||
<li><%= link_to "项目任务", user_message_path(User.current, :type => 'issue'), :class => "resourcesGrey" %></li>
|
<li><%= link_to "项目任务", user_message_path(User.current, :type => 'issue'), :class => "homepageTypePTask postTypeGrey" %></li>
|
||||||
<li><%= link_to "项目讨论", user_message_path(User.current, :type => 'forge_message'), :class => "resourcesGrey" %></li>
|
<li><%= link_to "项目讨论", user_message_path(User.current, :type => 'forge_message'), :class => "homepagePostTypeForum postTypeGrey" %></li>
|
||||||
<li><%= link_to "项目新闻", user_message_path(User.current, :type => 'forge_news'), :class => "resourcesGrey" %></li>
|
<li><%= link_to "项目新闻", user_message_path(User.current, :type => 'forge_news'), :class => "homepageTypePNews postTypeGrey" %></li>
|
||||||
<li><%= link_to "用户申请", user_message_path(User.current, :type => 'apply'), :class => "resourcesGrey" %></li>
|
<li><%= link_to "用户申请", user_message_path(User.current, :type => 'apply'), :class => "homepageTypeUApply postTypeGrey" %></li>
|
||||||
|
|
||||||
<li class=""><strong>其他</strong></li>
|
|
||||||
<li><%= link_to "贴吧帖子", user_message_path(User.current, :type => 'forum'), :class => "resourcesGrey" %></li>
|
|
||||||
<%# 系统贴吧 %>
|
|
||||||
<li><%= link_to "用户留言",user_message_path(User.current, :type => 'user_feedback'), :class => "resourcesGrey" %></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<div class="cl"></div>
|
||||||
|
<li>
|
||||||
|
<ul class="homepagePostTypeMore">
|
||||||
|
<li class="f14"><strong>更多</strong></li>
|
||||||
|
<li class="fl w100"><%= link_to "全部",user_message_path(User.current), :class => "resourcesTypeAll postTypeGrey" %></li>
|
||||||
|
<li class="fl"><%= link_to "未读消息", user_message_path(User.current, :type => 'unviewed'), :class => "homepageTypeUnread postTypeGrey" %></li>
|
||||||
|
<li class="fl w100"><%= link_to "系统消息", user_system_messages_path(User.current), :class => "homepageTypeSystem postTypeGrey" %></li>
|
||||||
|
<li class="fl"><%= link_to "贴吧帖子", user_message_path(User.current, :type => 'forum'), :class => "homepageTypePost postTypeGrey" %></li>
|
||||||
|
<li class="fl w100"><%= link_to "用户留言",user_message_path(User.current, :type => 'user_feedback'), :class => "homepageTypeUMessage postTypeGrey" %></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -51,10 +51,10 @@
|
||||||
<%= form_tag(import_resources_to_homework_user_path(user),:method => 'post',:remote=>'true') do %>
|
<%= form_tag(import_resources_to_homework_user_path(user),:method => 'post',:remote=>'true') do %>
|
||||||
<input type="hidden" name="homework_id" value="<%= homework_id%>"/>
|
<input type="hidden" name="homework_id" value="<%= homework_id%>"/>
|
||||||
<div style="height: 300px" id="user_ref_resources">
|
<div style="height: 300px" id="user_ref_resources">
|
||||||
<%= render :partial => 'resources_list' ,:locals=>{ :attachments => @attachments} %>
|
<%= render :partial => 'homework_ref_resources_list' ,:locals=>{ :attachments => @attachments,:seleted_resources=>seleted_resources} %>
|
||||||
</div>
|
</div>
|
||||||
<div >
|
<div >
|
||||||
<ul class="wlist" id="resource_ref_pages" style="margin-top: 5px;">
|
<ul class="wlist" id="resource_ref_pages" style="margin-top: 5px;margin-right: 20px">
|
||||||
<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true%>
|
<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true%>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -84,7 +84,9 @@
|
||||||
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 1 %>
|
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 1 %>
|
||||||
<ul class="homepageNewsList fl">
|
<ul class="homepageNewsList fl">
|
||||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
||||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布的作业:</span></li>
|
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + '老师',
|
||||||
|
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :title => "#{ma.course_message.user.lastname + ma.course_message.user.firstname}老师" %>
|
||||||
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布的作业:</span></li>
|
||||||
<li class="homepageHomeworkContent fl">
|
<li class="homepageHomeworkContent fl">
|
||||||
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
|
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
|
||||||
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
|
|
|
@ -7,6 +7,19 @@
|
||||||
homework_description_editor.html("");
|
homework_description_editor.html("");
|
||||||
$("#homework_editor").toggle();
|
$("#homework_editor").toggle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 点击 checkbox选中引用的资源的时候,保存该资源的id到session里去
|
||||||
|
function store_seleted_resource(dom){
|
||||||
|
if(dom.attr('checked') == 'checked' ){
|
||||||
|
$.get(
|
||||||
|
'<%= store_selected_resource_user_path %>'+'?save=y&res_id='+dom.val()
|
||||||
|
)
|
||||||
|
}else {
|
||||||
|
$.get(
|
||||||
|
'<%= store_selected_resource_user_path %>'+'?save=n&res_id='+dom.val()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<div class="homepageRightBanner mb10">
|
<div class="homepageRightBanner mb10">
|
||||||
<div class="NewsBannerName">作业</div>
|
<div class="NewsBannerName">作业</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'users/show_user_resource',:locals => {:user => @user,:homework_id=>@homework_id}) %>');
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'users/show_user_resource',:locals => {:user => @user,:homework_id=>@homework_id,:seleted_resources=>@seleted_resources}) %>');
|
||||||
showModal('ajax-modal', '730px');
|
showModal('ajax-modal', '730px');
|
||||||
$('#ajax-modal').css('height','500px').css("width","730px");
|
$('#ajax-modal').css('height','500px').css("width","730px");
|
||||||
$('#ajax-modal').siblings().remove();
|
$('#ajax-modal').siblings().remove();
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
$("#user_ref_resources").html('<%= escape_javascript(render :partial => 'resources_list',:locals=>{:attachments => @attachments})%>');
|
$("#user_ref_resources").html('<%= escape_javascript(render :partial => 'homework_ref_resources_list',:locals=>{:attachments => @attachments,:seleted_resources=>@seleted_resources})%>');
|
||||||
$("#resource_ref_pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
$("#resource_ref_pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
|
@ -1,2 +1,2 @@
|
||||||
$("#user_ref_resources").html('<%= escape_javascript(render :partial => 'resources_list',:locals=>{:attachments => @attachments})%>');
|
$("#user_ref_resources").html('<%= escape_javascript(render :partial => 'homework_ref_resources_list',:locals=>{:attachments => @attachments,:seleted_resources=>@seleted_resources})%>');
|
||||||
$("#resource_ref_pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
$("#resource_ref_pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
|
@ -386,6 +386,7 @@ RedmineApp::Application.routes.draw do
|
||||||
get 'user_resource_type'
|
get 'user_resource_type'
|
||||||
get 'user_ref_resource_search'
|
get 'user_ref_resource_search'
|
||||||
post 'import_resources_to_homework'
|
post 'import_resources_to_homework'
|
||||||
|
get 'store_selected_resource'
|
||||||
# end
|
# end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 16 KiB |
|
@ -624,6 +624,15 @@ a.homepagePostTypeQuiz {background:url(../images/homepage_icon.png) -90px -124px
|
||||||
a.homepagePostTypeQuestion {background:url(../images/homepage_icon.png) -10px -273px no-repeat; padding-left:23px;}
|
a.homepagePostTypeQuestion {background:url(../images/homepage_icon.png) -10px -273px no-repeat; padding-left:23px;}
|
||||||
a.homepagePostTypeMine {background:url(../images/homepage_icon.png) -187px -277px no-repeat; padding-left:23px;}
|
a.homepagePostTypeMine {background:url(../images/homepage_icon.png) -187px -277px no-repeat; padding-left:23px;}
|
||||||
a.homepagePostTypeAll {background:url(../images/homepage_icon.png) -185px -308px no-repeat; padding-left:23px;}
|
a.homepagePostTypeAll {background:url(../images/homepage_icon.png) -185px -308px no-repeat; padding-left:23px;}
|
||||||
|
.homepagePostTypeMore {width:180px; border-top:1px dashed #dddddd; margin-top:5px;}
|
||||||
|
.w100 {width:100px;}
|
||||||
|
a.homepageTypeUnread {background:url(../images/homepage_icon.png) -6px -579px no-repeat; padding-left:23px;}
|
||||||
|
a.homepageTypePTask {background:url(../images/homepage_icon.png) -176px -523px no-repeat; padding-left:23px;}
|
||||||
|
a.homepageTypeSystem {background:url(../images/homepage_icon.png) -88px -552px no-repeat; padding-left:23px;}
|
||||||
|
a.homepageTypePNews {background:url(../images/homepage_icon.png) -5px -553px no-repeat; padding-left:23px;}
|
||||||
|
a.homepageTypePost {background:url(../images/homepage_icon.png) -178px -553px no-repeat; padding-left:23px;}
|
||||||
|
a.homepageTypeUMessage {background:url(../images/homepage_icon.png) -4px -519px no-repeat; padding-left:23px;}
|
||||||
|
a.homepageTypeUApply {background:url(../images/homepage_icon.png) -91px -582px no-repeat; padding-left:23px;}
|
||||||
a.postTypeGrey {color:#888888;}
|
a.postTypeGrey {color:#888888;}
|
||||||
a.postTypeGrey:hover {color:#269ac9;}
|
a.postTypeGrey:hover {color:#269ac9;}
|
||||||
.homepagePostBrief {width:710px; margin:0px auto; position:relative;}
|
.homepagePostBrief {width:710px; margin:0px auto; position:relative;}
|
||||||
|
@ -738,8 +747,8 @@ ul.list_watch{
|
||||||
.w450{width: 450px;}
|
.w450{width: 450px;}
|
||||||
|
|
||||||
/*引用资源库弹窗*/
|
/*引用资源库弹窗*/
|
||||||
.referenceResourcesPopup {width:710px; height:500px !important; border:3px solid #269ac9 !important; padding-left:20px; padding-right:20px; padding-bottom:35px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-375px; z-index:1000;}
|
.referenceResourcesPopup {width:750px !important; height:500px !important; overflow: hidden !important; border:3px solid #269ac9 !important; padding-left:20px; padding-right:20px; padding-bottom:35px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-375px; z-index:1000;}
|
||||||
.referenceText {font-size:16px; color:#269ac9; line-height:16px; padding-top:20px; display:inline-block; font-weight:bold;}
|
.referenceText {font-size:16px; color:#269ac9; line-height:16px; display:inline-block; font-weight:bold;}
|
||||||
.referenceSearchBox {border:1px solid #e6e6e6; width:235px; height:32px; background-color:#ffffff; margin-top:12px; margin-bottom:15px;}
|
.referenceSearchBox {border:1px solid #e6e6e6; width:235px; height:32px; background-color:#ffffff; margin-top:12px; margin-bottom:15px;}
|
||||||
.searchReferencePopup {border:none; outline:none; background-color:#ffffff; width:190px; height:32px; padding-left:10px; display:inline-block; float:left;}
|
.searchReferencePopup {border:none; outline:none; background-color:#ffffff; width:190px; height:32px; padding-left:10px; display:inline-block; float:left;}
|
||||||
.referenceSearchIcon{width:31px; height:25px; background-color:#ffffff; background:url(../images/homepage_icon2.png) -180px -270px no-repeat; display:inline-block; float:left;}
|
.referenceSearchIcon{width:31px; height:25px; background-color:#ffffff; background:url(../images/homepage_icon2.png) -180px -270px no-repeat; display:inline-block; float:left;}
|
||||||
|
|
|
@ -624,8 +624,8 @@ a.loginChooseTab {color:#484848; height:30px; display:block;}
|
||||||
|
|
||||||
/*引用资源库弹窗*/
|
/*引用资源库弹窗*/
|
||||||
.popbox{position:fixed !important;left:50%;top:50%;margin:-100px 0 0 -150px; -moz-border-radius:5px;}
|
.popbox{position:fixed !important;left:50%;top:50%;margin:-100px 0 0 -150px; -moz-border-radius:5px;}
|
||||||
.referenceResourcesPopup {width:710px; height:500px !important; border:3px solid #269ac9 !important; padding-left:16px !important; padding-right:16px !important; padding-bottom:16px !important; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-375px; z-index:1000;}
|
.referenceResourcesPopup {width:750px !important; height:500px !important; border:3px solid #269ac9 !important; padding-left:16px !important; padding-right:16px !important; padding-bottom:16px !important; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-375px; z-index:1000;}
|
||||||
.referenceText {font-size:16px; color:#269ac9; line-height:16px; padding-top:20px; display:inline-block; font-weight:bold;}
|
.referenceText {font-size:16px; color:#269ac9; line-height:16px; display:inline-block; font-weight:bold;}
|
||||||
.referenceSearchBox {border:1px solid #e6e6e6; width:235px; height:32px; background-color:#ffffff; margin-top:12px; margin-bottom:15px;}
|
.referenceSearchBox {border:1px solid #e6e6e6; width:235px; height:32px; background-color:#ffffff; margin-top:12px; margin-bottom:15px;}
|
||||||
.searchReferencePopup {border:none; outline:none; background-color:#ffffff; width:190px; height:32px; padding-left:10px; display:inline-block; float:left;}
|
.searchReferencePopup {border:none; outline:none; background-color:#ffffff; width:190px; height:32px; padding-left:10px; display:inline-block; float:left;}
|
||||||
.referenceSearchIcon{width:31px; height:25px; background-color:#ffffff; background:url(../images/homepage_icon2.png) -180px -270px no-repeat; display:inline-block; float:left;}
|
.referenceSearchIcon{width:31px; height:25px; background-color:#ffffff; background:url(../images/homepage_icon2.png) -180px -270px no-repeat; display:inline-block; float:left;}
|
||||||
|
|
Loading…
Reference in New Issue