Merge branch 'develop' into dev_newproject

Conflicts:
	app/views/issues/index.html.erb
	app/views/layouts/base_projects.html.erb
	public/stylesheets/css/project.css
This commit is contained in:
huang 2016-10-15 10:53:01 +08:00
commit 5532ec3b86
82 changed files with 776 additions and 274 deletions

View File

@ -43,7 +43,12 @@ class AdminController < ApplicationController
# 搜索功能
@name = params[:name] || ""
condition = "#{@name.strip}".gsub(" ","")
@projects = Project.like(condition).order('created_on desc')
@status = params[:status] || ""
unless @status.empty?
@projects = Project.where(:status=>@status).like(condition).order('created_on desc')
else
@projects = Project.like(condition).order('created_on desc')
end
# 分页
@projects = paginateHelper @projects,30
@page = (params['page'] || 1).to_i - 1

View File

@ -329,20 +329,45 @@ class AttachmentsController < ApplicationController
end
end
# prams[:type] => history 历史版本
def destroy
if @attachment.container.respond_to?(:init_journal)
@attachment.container.init_journal(User.current)
end
if @attachment.container
if @attachment.container_type == "Issue"
@attachment.destroy
else
@attachment.container.attachments.delete(@attachment)
if params[:type] == "history"
begin
AttachmentHistory.find(params[:history_id]).destroy
@attachment = Attachment.find(params[:id])
@is_history = true
@is_history_destroy = false
@attachment_histories = @attachment.attachment_histories
rescue Exception => e
puts e
end
elsif params[:type] == "history_delete"
begin
AttachmentHistory.find(params[:history_id]).destroy
@attachment = Attachment.find(params[:id])
@is_history_delete = true
@is_history_destroy = false
@attachment_histories = @attachment.attachment_histories
rescue Exception => e
puts e
end
else
@attachment.destroy
@history = params[:history]
if @attachment.container.respond_to?(:init_journal)
@attachment.container.init_journal(User.current)
end
if @attachment.container
if @attachment.container_type == "Issue"
@attachment.destroy
else
@attachment.container.attachments.delete(@attachment)
end
else
@attachment.destroy
end
end
respond_to do |format|
if !@attachment.container.nil? &&
(@attachment.container.is_a?(Course) || ((@attachment.container.has_attribute?(:course) || @attachment.container.has_attribute?(:course_id) ) &&
@ -631,6 +656,7 @@ class AttachmentsController < ApplicationController
#找到文件的所有的历史版本
def attachment_versions
@history = params[:history]
@attachment = Attachment.find(params[:id])
@attachment_histories = @attachment.attachment_histories
respond_to do |format|
@ -638,6 +664,14 @@ class AttachmentsController < ApplicationController
end
end
def attachment_versions_delete
@attachment = Attachment.find(params[:id])
@attachment_histories = @attachment.attachment_histories
respond_to do |format|
format.js
end
end
#找到文件的所有的历史版本及当前版本
def attachment_history_download
@attachment = Attachment.find(params[:id])

View File

@ -19,7 +19,7 @@ class BoardsController < ApplicationController
layout 'base_projects'#by young
default_search_scope :messages
before_filter :find_project_by_project_id, :find_board_if_available, :except => [:join_to_org_subfields]
before_filter :authorize, :except => [:new, :show, :create, :index, :join_to_org_subfields]
before_filter :authorize, :except => [:new, :show, :create, :index, :join_to_org_subfields, :update_position, :update_name]
accept_rss_auth :index, :show
@ -56,8 +56,12 @@ class BoardsController < ApplicationController
@boards = @course.boards.includes(:last_message => :author).all
end
end
unless @course.boards.empty?
@board = @course.boards.first
if params[:board_id]
@board = Board.find params[:board_id].to_i
else
unless @course.boards.where("parent_id is NULL").empty?
@board = @course.boards.where("parent_id is NULL").first
end
end
show and return
else
@ -194,18 +198,31 @@ class BoardsController < ApplicationController
end
end
def create
@board = @project.boards.build
@board.safe_attributes = params[:board]
if @board.save
flash[:notice] = l(:notice_successful_create)
#Modified by young
#redirect_to_settings_in_projects
redirect_to project_board_url(@project, @board)
#Ended by young
else
render :action => 'new'
def create
if @project
@board = @project.boards.build
@board.safe_attributes = params[:board]
if @board.save
flash[:notice] = l(:notice_successful_create)
#Modified by young
#redirect_to_settings_in_projects
redirect_to project_board_url(@project, @board)
#Ended by young
else
render :action => 'new'
end
elsif @course
parent = Board.find params[:board_id].to_i
board = @course.boards.build
board.name = params[:name]
board.description = board.name
board.project_id = -1
board.position = parent.children.count + 1
parent.children << board
respond_to do |format|
format.js
end
end
end
@ -226,8 +243,46 @@ class BoardsController < ApplicationController
end
def destroy
after_boards = @board.parent.children.where("position > #{@board.position}")
after_boards.update_all("position = position - 1")
@board.destroy
redirect_to_settings_in_projects
if @course
respond_to do |format|
format.js
end
elsif @project
redirect_to_settings_in_projects
end
end
def update_position
if @course
boards = @board.parent.children
if params[:opr] == 'up' && @board.position > 1
before_board = boards.where("position = #{@board.position - 1}").first
if before_board && @board.update_attribute('position', @board.position - 1)
before_board.update_attribute('position', before_board.position + 1)
end
elsif params[:opr] == 'down' && @board.position < boards.count
after_board = boards.where("position = #{@board.position + 1}").first
if after_board && @board.update_attribute('position', @board.position + 1)
after_board.update_attribute('position', after_board.position - 1)
end
end
respond_to do |format|
format.js
end
end
end
def update_name
if @course
@board.update_attribute("name", params[:name])
@board.update_attribute("description", params[:name])
respond_to do |format|
format.js
end
end
end
def join_to_org_subfields

View File

@ -122,7 +122,7 @@ class MessagesController < ApplicationController
if @project
redirect_to project_boards_path(@project)
elsif @course
redirect_to course_boards_path(@course)
redirect_to course_boards_path(@course, :board_id => @board.id)
end
else
redirect_to board_message_url(@board, @message)
@ -132,7 +132,7 @@ class MessagesController < ApplicationController
if @project
redirect_to project_boards_path(@project, :flag => true)
elsif @course
redirect_to course_boards_path(@course, :flag => true)
redirect_to course_boards_path(@course, :board_id => @board.id, :flag => true)
end
else
layout_file = @project ? 'base_projects' : 'base_courses'

View File

@ -460,6 +460,16 @@ class OrganizationsController < ApplicationController
@members = paginateHelper @members, 20
end
def more_org_submains
@org_subfield = OrgSubfield.find params[:org_subfield_id].to_i
@page = params[:page]
@submains = @org_subfield.sub_domains.reorder('priority').uniq.page((params[:page].to_i || 1) +1).per(5)
respond_to do |format|
format.js
end
end
def more_org_projects
@organization = Organization.find params[:id]
@page = params[:page]

View File

@ -3056,7 +3056,7 @@ class UsersController < ApplicationController
user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id}
user_project_ids = User.current.projects.map {|p| p.status != 9 && p.id }
# user_org_ids = User.current.organizations.map {|o| o.id}
if( params[:type] == "1") # 我的资源
if(params[:type].blank? || params[:type] == "1") # 我的资源
# 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源
if params[:status] == "2"
@attachments = get_course_resources(params[:id], user_course_ids, @order, @score)
@ -3070,7 +3070,7 @@ class UsersController < ApplicationController
# 公共资源库:所有公开资源或者我上传的私有资源
@attachments = get_my_resources(params[:id], user_course_ids, user_project_ids, @order, @score)
end
elsif (params[:type].blank? || params[:type] == "6") # 公共资源
elsif (params[:type] == "6") # 公共资源
if params[:status] == "2"
@attachments = get_course_resources_public( user_course_ids, @order, @score)
elsif params[:status] == "3"
@ -3562,7 +3562,7 @@ class UsersController < ApplicationController
@type = 'Issue'
@user_activity_id = params[:div_id].to_i if params[:div_id]
when 'BlogComment'
#obj = BlogComment.where('id = ?', params[:id].to_i).first
obj = BlogComment.where('id = ?', params[:id].to_i).first
@user_activity_id = params[:div_id].to_i if params[:div_id]
@homepage = params[:homepage].to_i
@type = 'BlogComment'

View File

@ -332,7 +332,7 @@ class WordsController < ApplicationController
@homework_common = HomeworkCommon.find reply.jour_id
if params[:reply_message].size>0 && User.current.logged? && @user
options = {:notes => params[:reply_message], :reply_id => reply.user_id,:user_id => @user.id,:m_parent_id => params[:id].to_i,:m_reply_id => params[:id].to_i, :root_id => reply.root_id}
feedback = HomeworkCommon.add_homework_jour(@user, params[:reply_message], reply.jour_id, options)
feedback = HomeworkCommon.add_homework_jour(@user, params[:reply_message], reply.jour_id, reply.root_id, options)
if (feedback.errors.empty?)
if params[:asset_id]
ids = params[:asset_id].split(',')
@ -366,7 +366,7 @@ class WordsController < ApplicationController
@syllabus = Syllabus.find reply.jour_id
if params[:reply_message].size>0 && User.current.logged? && @user
options = {:notes => params[:reply_message], :reply_id => reply.user_id,:user_id => @user.id,:m_parent_id => params[:id].to_i,:m_reply_id => params[:id].to_i, :root_id => reply.root_id}
feedback = Syllabus.add_syllabus_jour(@user, params[:reply_message], reply.jour_id, options)
feedback = Syllabus.add_syllabus_jour(@user, params[:reply_message], reply.jour_id, reply.root_id, options)
if (feedback.errors.empty?)
if params[:asset_id]
ids = params[:asset_id].split(',')

View File

@ -1383,6 +1383,21 @@ module ApplicationHelper
end
end
# 判断课程、项目、组织是否有权限删除历史资源
# 项目管理员或者附件的作者可以删除
# (is_project_manager?(User.current.id, @project.id) || User.current.id == history.author_id)
def allow_to_delete_attachment history
attachment = history.attachment
case attachment.try(:container_type)
when "Project"
result = is_project_manager?(User.current.id, attachment.container_id) || User.current.id == history.author_id || User.current.admin?
when "Course"
result = User.current.allowed_to?(:as_teacher, attachment.container) || User.current.id == history.author_id || User.current.admin?
when "OrgSubfield"
result = User.current.id == history.author_id || User.current.admin_of_org?(attachment.container) || User.current.admin?
end
end
# Wiki links
#
# Examples:

View File

@ -367,8 +367,9 @@ class Attachment < ActiveRecord::Base
end
end
#有了历史记录的数据记录是不能被删除的。
#true 能被删除 false 不能被删除
# 有了历史记录的数据记录是不能被删除的。
# true 能被删除 false 不能被删除
# 2016.10.14 修改成可以删除,删除时候添加提示全部删除
def destroyable
self.attachment_histories.count == 0
end

View File

@ -35,7 +35,7 @@ class Board < ActiveRecord::Base
includes(:project).where(Project.allowed_to_condition(args.shift || User.current, :view_messages, *args))
}
safe_attributes 'name', 'description', 'parent_id', 'move_to'
safe_attributes 'name', 'description', 'parent_id', 'move_to', 'position'
def visible?(user=User.current)
!user.nil? && user.allowed_to?(:view_messages, project)
@ -51,7 +51,11 @@ class Board < ActiveRecord::Base
end
def valid_parents
@valid_parents ||= project.boards - self_and_descendants
if project
@valid_parents ||= project.boards - self_and_descendants
elsif course
@valid_parents ||= course.boards - self_and_descendants
end
end
def reset_counters!

View File

@ -1,66 +1,11 @@
<!--<div class="resourceUploadPopup">-->
<span class="uploadDialogText">更新资源版本</span>
<!--<div class="resourcePopupClose"> <a href="javascript:void(0);" class="resourceClose" onclick="closeModal();"></a></div>-->
<div>
<div>
<div>当前版本
<span class="attachment" >
<input readonly="readonly" name="attachments[1][filename]" value="<%=@attachment.filename%>" class="upload_filename readonly" type="text">
</span>
</div>
<% unless @attachment_histories.empty? %>
<div >历史版本</div>
<div style="max-height: 95px;overflow-y:auto; background-color: #e3e3e3;" class="mb10 p10">
<% @attachment_histories.each do |history| %>
<span class="attachment">
<%= link_to truncate(history.filename,length: 35, omission: '...'),
download_history_attachment_path(history.id, history.filename),
:title => history.filename+"\n"+history.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis; max-width:300px;",:class => "linkBlue f_14 f_b upload_filename fl" %>
<span class="fr">版本号:<%= history.version %></span>
<div class="cl"></div>
</span>
<% end %>
</div>
<% end %>
</div>
<%= form_tag(upload_attachment_version_path, :multipart => true,:remote => !ie8?,:name=>"upload_form",:id=>'upload_form') do %>
<%= hidden_field_tag :old_attachment_id,@attachment.id %>
<div>
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
</span>
</div>
<div class="uploadBox">
<input type="hidden" name="attachment_type" value="1">
<%= render :partial => 'attachments/upload_attachment_new_version' %>
<div class="cl"></div>
<!--<a href="javascript:void(0);" class=" fr grey_btn mr40" onclick="closeModal();"><%#= l(:button_cancel)%></a>-->
<!--<a id="submit_resource" href="javascript:void(0);" class="blue_btn fr" onclick="submit_resource();"><%#= l(:button_confirm)%></a>-->
</div>
<div class="W300 uploadResourceIntr fontGrey2">
<span id="upload_file_count" class="mr15">(未选择文件)</span>
<span>您可以上传小于<span class="c_red">50MB</span>的文件</span>
</div>
<div class="cl"></div>
<div class="mb5 mt5">
<p class="c_dark f14" style="line-height:30px;">描述:</p>
<div class="fl">
<textarea style="resize:none" type="text" placeholder="请编辑资源描述" name="description" class="InputBox fl H60 W420" ><%= @attachment.description %></textarea>
</div>
<div class="cl"></div>
</div>
<div class="cl"></div>
</div>
<div class="cl"></div>
<div style="margin-top: 10px" >
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText" onclick="">确定</a>-->
<%= submit_tag '确定',:onclick=>'upload_attachment_version(event);',:onfocus=>'this.blur()',:id=>'upload_files_submit_btn',:class=>'sendSourceText' %>
</div>
<div class="courseSendCancel"><a href="javascript:void(0);" id="upload_files_cancle_btn" class="sendSourceText" onclick="hideModal();">取消</a></div>
</div>
<% end %>
<div class="muban_popup_top">
<h3 class="fl">更新资源版本</h3>
<a href="javascript:void(0);" class="muban_icons_close fr" onclick="hideModal();"></a>
<div class="cl"></div>
<!--</div>-->
</div>
<div class="muban_popup_con" >
<div class=" clear ml15 mr15 mt15" id="attachment_history_popub">
<%= render :partial => "files/attachment_history_popub" %>
</div>
</div>

View File

@ -0,0 +1,11 @@
<div class="muban_popup_top">
<h3 class="fl">删除资源</h3>
<a href="javascript:void(0);" class="muban_icons_close fr" onclick="hideModal();"></a>
<div class="cl"></div>
</div>
<div class="muban_popup_con" >
<div class=" clear ml15 mr15 mt15" id="attachment_history_popub">
<%= render :partial => "files/attachment_history_popub_delete" %>
</div>
</div>

View File

@ -1,8 +1,9 @@
<div class="clear mb10">
<a class="sub_btn fl" name="button" onclick="_file.click()" onmouseover="" style="<%= ie8? ? 'display:none' : ''%>">文件浏览</a>
<p class="fl ml5 mt3 sy_cgrey" ><span id="upload_file_count" class="c_red">(未选择文件)</span> 您可以上传小于<span class="c_red">50MB</span>的文件</p>
</div>
<!--<button name="button" class="sub_btn" onclick="_file.click()" onmouseover="this.focus()" style="<%#= ie8? ? 'display:none' : ''%>" type="button" ><%#= l(:label_browse) %></button>-->
<a href="javascript:void(0);" class="uploadIcon f14" name="button" onclick="_file.click()" onmouseover="" style="<%= ie8? ? 'display:none' : ''%>">
<span class="chooseFile">选择文件</span></a>
<%= file_field_tag 'attachments[dummy][file]',
:id => '_file',
:class => ie8? ? '':'file_selector',

View File

@ -1,7 +1,2 @@
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'attachments/show_attachment_history' )%>');
showModal('ajax-modal', '452px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 435px;' class='resourceClose'></a>");
$('#ajax-modal').parent().css("top","40%").css("left","50%").css("position","fixed");
$('#ajax-modal').parent().addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
var htmlvalue = "<%= escape_javascript(render :partial => 'attachments/show_attachment_history') %>";
pop_box_new(htmlvalue,820,360);

View File

@ -0,0 +1,2 @@
var htmlvalue = "<%= escape_javascript(render :partial => 'attachments/show_attachment_history_delete') %>";
pop_box_new(htmlvalue,820,360);

View File

@ -1,3 +1,17 @@
//历史版本删除局部刷新
<% if @is_history %>
$("#attachment_history_popub").html('<%= escape_javascript( render :partial => 'files/attachment_history_popub') %>');
<% end %>
<% if @is_history_delete %>
$("#attachment_history_popub").html('<%= escape_javascript( render :partial => 'files/attachment_history_popub_delete') %>');
<% end %>
//历史版本删除局部刷新
<% if @is_history_destroy %>
$("#attachment_history_popub").html('<%= escape_javascript( render :partial => 'files/attachment_history_popub') %>');
<% end %>
<% if @is_destroy%>
$("#attachment_<%= @attachment.id%>").remove();
if(document.getElementById("revise_attachment_div_<%= @attachment.id%>")) {

View File

@ -1,7 +1,7 @@
<% if @flag %>
hideModal();
alert('更新成功')
$(".re_search").submit();
$(".re_search").submit(); // 为了刷新
<%else%>
$("#upload_file_count").html('(更新失败)')
<%end %>

View File

@ -22,7 +22,7 @@
<div class="homepageRight mt0 ml10">
<div class="homepageRightBanner">
<div class="NewsBannerName">
班级讨论区
<%= @board.parent_id.nil? ? "班级讨论区" : "#{@board.name}" %>
</div>
</div>
<div nhname="topic_form">

View File

@ -0,0 +1,5 @@
<% if @course %>
$("#tbc_04").html("<%=escape_javascript(render :partial => 'courses/settings/boards_setting') %>");
<% course_board = @course.boards.where("parent_id is NULL").first %>
$("#board_children_list").html("<%= escape_javascript(render :partial => 'layouts/board_children_list', :locals => {:course_board => course_board})%>");
<% end %>

View File

@ -0,0 +1,5 @@
<% if @course %>
$("#tbc_04").html("<%=escape_javascript(render :partial => 'courses/settings/boards_setting') %>");
<% course_board = @course.boards.where("parent_id is NULL").first %>
$("#board_children_list").html("<%= escape_javascript(render :partial => 'layouts/board_children_list', :locals => {:course_board => course_board})%>");
<% end %>

View File

@ -0,0 +1,5 @@
<% if @course %>
$("#tbc_04").html("<%=escape_javascript(render :partial => 'courses/settings/boards_setting') %>");
<% course_board = @course.boards.where("parent_id is NULL").first %>
$("#board_children_list").html("<%= escape_javascript(render :partial => 'layouts/board_children_list', :locals => {:course_board => course_board})%>");
<% end %>

View File

@ -0,0 +1,5 @@
<% if @course %>
$("#tbc_04").html("<%=escape_javascript(render :partial => 'courses/settings/boards_setting') %>");
<% course_board = @course.boards.where("parent_id is NULL").first %>
$("#board_children_list").html("<%= escape_javascript(render :partial => 'layouts/board_children_list', :locals => {:course_board => course_board})%>");
<% end %>

View File

@ -1,10 +1,22 @@
<% course_file_num = visable_attachemnts_incourse(@course).count%>
<% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %>
<% if show_nav?(@course.boards.first ? @course.boards.first.topics.count : 0) %>
<% course_board = @course.boards.where("parent_id is NULL").first %>
<% if show_nav?(course_board ? course_board.topics.count : 0) %>
<li>
<a href="<%=course_boards_path(@course) %>">讨论区</a>
<%= link_to( "",course_boards_path(@course, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") %>
</li>
<% unless course_board.children.empty? %>
<ul class="sub-menu">
<% course_board.children.each do |board| %>
<li>
<% count = board ? (board.topics.count + Message.where("board_id =? and parent_id is not ?", board.id, nil).count) : 0 %>
<a href="<%=course_boards_path(@course, :board_id =>board.id) %>"><%=board.name %><span><%=count %></span></a>
<%= link_to( "",course_boards_path(@course, :board_id =>board.id, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") %>
</li>
<% end %>
</ul>
<% end %>
<% end %>
<% if show_nav?(@course.homework_commons.count) %>
<li>
@ -29,7 +41,9 @@
<% if show_nav?(course_feedback_count) %>
<li>
<a href="<%=course_feedback_path(@course) %>">留言</a>
<% if is_teacher || (@course.publish_resource == 1 && User.current.member_of_course?(@course)) %>
<%= link_to "", course_feedback_path(@course), :class => 'sy_class_add', :title =>"#{l(:label_course_feedback)}"%>
<% end %>
</li>
<% end %>
<% if show_nav?(course_poll_count) %>

View File

@ -22,6 +22,9 @@
<li id="tb_3" class="hwork_normaltab" onclick="course_setting(3);">
组织
</li>
<li id="tb_4" class="hwork_normaltab" onclick="course_setting(4);">
讨论区设置
</li>
</ul>
</div>
<div class="hwork_dis" id="tbc_01" style="padding-top: 10px;">
@ -131,6 +134,10 @@
<div class="hwork_undis" id="tbc_03">
<%= render :partial => 'courses/settings/join_org' %>
</div>
<div class="hwork_undis" id="tbc_04">
<%= render :partial => 'courses/settings/boards_setting' %>
</div>
</div><!--talknew end-->
<div class="cl"></div>
<script type="text/javascript">

View File

@ -0,0 +1,115 @@
<% board = @course.boards.where("parent_id is NULL").first %>
<div class="w730 mt10" id="org_subfield_list">
<ul class="orgListRow borderBottomNone orgListBg">
<li class="w270 fb fl"><span class="ml15">名称</span></li>
<li class="w140 fb fl">状态</li>
<li class="w170 fb fl">类型</li>
<li class="w150 fb fl"><span class="mr15 fr">操作</span></li>
<div class="cl"></div>
</ul>
<ul class="orgListRow">
<li class="w270 fl"> <span class="ml15">班级讨论区</span> </li>
<li class="w140 fl">默认</li>
<li class="w170 fl">帖子</li>
<li class="w150 fl"> <a href="javascript:void(0)" class="link-blue fr mr15" id="addSubMenu">添加子栏目</a> </li>
<div class="cl"></div>
<% count = board.children.count %>
<% board.children.reorder("position asc").each_with_index do |board, i|%>
<ul class="orgSubList" style="border-top: 1px solid rgb(228, 228, 228);">
<li class="<%= i == count - 1 ? 'orgSubTree2' : 'orgSubTree' %>"></li>
<li class="w210 mr10 fl">
<div id="board_sub_show_<%= board.id %>" class="w210 hidden" title="<%=board.name %>"><%=board.name %></div>
<div id="board_sub_edit_<%= board.id %>" style="display:none;">
<input type="text" name="name" onblur="update_sub_board_name('#board_sub_show_<%= board.id %>','#board_sub_edit_<%= board.id %>','<%= board.id %>','<%= @course.id %>',$(this).val());" value="<%= board.name %>" style="width:140px;"/>
</div>
</li>
<li class="w140 fl">新增</li>
<li class="w170 fl">帖子</li>
<li class="w150 fl">
<a href="javascript:void(0);" class="linkGrey fr ml5 mr15" onclick="edit('#board_sub_show_<%= board.id %>','#board_sub_edit_<%= board.id %>');">编辑</a>
<%= link_to('删除', {:controller => 'boards', :action => 'destroy', :id => board.id, :course_id => @course.id},:remote => true, :method => 'delete', :confirm => l(:text_are_you_sure), :class => "linkGrey fr ml5 mr5", :title => l(:button_delete)) %>
<% if i < count - 1 %>
<%= link_to('下移', {:controller => 'boards', :action => 'update_position', :id => board.id, :course_id => @course.id, :opr => 'down'},:remote => true, :method => 'post', :class => "linkGrey fr ml5 mr5", :title => '下移') %>
<% end %>
<% unless i == 0 %>
<%= link_to('上移', {:controller => 'boards', :action => 'update_position', :id => board.id, :course_id => @course.id, :opr => 'up'},:remote => true, :method => 'post', :class => "linkGrey fr ml5 mr5", :title => '上移') %>
<% end %>
</li>
<div class="cl"></div>
</ul>
<% end %>
</ul>
</div>
<!--新增二级栏目-->
<div class="mt10 fl orgListBg w730 undis" id="subMenuContent">
<%= form_tag url_for(:controller => 'boards', :action => 'create', :course_id => @course.id, :board_id => board.id), :id=> 'add_board_form_subboard',:remote => true do %>
<div class="ml15 mt10">
<span class="fontGrey3 mb5 mr10">新增子栏目名称 :</span>
<input id="subfield_name" name="name" placeholder="请输入子栏目名称" maxlength="30" class="orgAddSearch mb10" type="text">
<span id="new_notice" class="undis ml10">名称不能为空</span>
</div>
<div class="mb10">
<span class="fontGrey3 ml50 mr15 fl">栏目类型 :</span>
<input class="mr5" id="orgMng" value="Post" name="field_type" checked="checked" type="radio">
<label for="orgMng">帖子</label>
</div>
<div class="mb10">
<a href="javascript:void(0);" class="grey_btn_cir fr c_white mr15 ml15" id="subMenuCancel">取消</a>
<a href="javascript:void(0);" class="blue_btn_cir fr c_white" id="subMenuSubmit">确定</a>
<div class="cl"></div>
</div>
</form>
<% end %>
</div>
<!--over-->
<script>
$(function(){
$("#subMenuSubmit").one('click', function(){
sub_board_submit();
});
});
function sub_board_submit(){
if ($("#subfield_name").val().trim() != ""){
$("#new_notice").hide();
$("#add_board_form_subboard").submit();
} else {
$("#new_notice").show();
$("#subMenuSubmit").one('click', function(){
sub_board_submit();
});
}
}
$("#addSubMenu").click(function(){
$("#subMenuContent").toggle();
});
$("#subMenuCancel").click(function(){
$("#subMenuContent").hide();
});
function update_sub_board_name(show_id, edit_id, field_id, domain_id, input_value) {
if (input_value.trim() != "" && $(show_id).html().trim() != input_value.trim()) {
if (confirm('确定修改为' + input_value + "?"))
$.ajax({
url: "/boards/" + field_id + "/update_name?course_id=" + domain_id + "&name=" + input_value,
type: 'put'
});
else{
$(edit_id).children("input").val($(show_id).html().trim());
}
}
$(show_id).show();
$(edit_id).hide();
}
function edit(show_id, edit_id) {
$(show_id).toggle();
$(edit_id).toggle();
$(edit_id).find('input').focus();
$(edit_id).find('input').on('keypress', function (e) {
if (e.keyCode == 13) {
this.blur();
}
})
}
</script>

View File

@ -0,0 +1,59 @@
<table class="muban_table mb15" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th>资源名称</th>
<th >下载数</th>
<th>引用数</th>
<th>版本号</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<th ><p class="popup_ziyuan_title"><%= @attachment.filename %><span class="muban_icons_blue ml5">当前版本</span></p></th>
<th><%= @attachment.downloads %></th>
<th><%= @attachment.try(:quotes).to_i %></th>
<th><%= format_time(@attachment.created_on) %></th>
<th></th>
</tr>
<% @attachment_histories.each do |history| %>
<tr>
<th ><p class="popup_ziyuan_title">
<%= link_to history.filename, download_history_attachment_path(history.id, history.filename), :title => history.filename+"\n"+history.description.to_s %></p>
</th>
<th><%= history.downloads %></th>
<th><%= history.try(:quotes).to_i %></th>
<th><%= format_time(history.created_on) %></th>
<th>
<%= link_to( '删除资源', attachment_path(history.attachment, :history_id => history, :type => "history"),
:remote => true,
:data => {:confirm => l(:text_are_you_sure)},
:method => :delete,
:class => "postOptionLink",
:class => "btn") if allow_to_delete_attachment(history) %>
</th>
</tr>
<% end %>
</tbody>
</table>
<%= form_tag(upload_attachment_version_path, :multipart => true,:remote => !ie8?,:name=>"upload_form",:id=>'upload_form') do %>
<%= hidden_field_tag :old_attachment_id,@attachment.id %>
<div>
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
</span>
</div>
<div class="clear mb10">
<input type="hidden" name="attachment_type" value="1">
<%= render :partial => 'attachments/upload_attachment_new_version' %>
<div class="cl"></div>
<!--<a href="javascript:void(0);" class=" fr grey_btn mr40" onclick="closeModal();"><%#= l(:button_cancel)%></a>-->
<!--<a id="submit_resource" href="javascript:void(0);" class="blue_btn fr" onclick="submit_resource();"><%#= l(:button_confirm)%></a>-->
</div>
<div class="cl"></div>
<textarea style="resize:none" type="text" placeholder="请在此编辑资源描述" name="description" class="mr15 mb10 muban_textarea" ><%= @attachment.description %></textarea>
<div class="clear mb15">
<a href="javascript:void(0);" id="upload_files_cancle_btn" class="btn fr" onclick="hideModal();">取消</a>
<%#= submit_tag '确定', :onclick => 'upload_attachment_version(event);', :onfocus => 'this.blur()', :id => 'upload_files_submit_btn', :class => 'btn btn-blue fr mr5' %>
<a onclick = "upload_attachment_version(event);" onfocus = 'this.blur()' id = 'upload_files_submit_btn' class = 'btn btn-blue fr mr5' >确定</a>
</div>
<% end %>

View File

@ -0,0 +1,54 @@
<table class="muban_table mb10" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th>资源名称</th>
<th >下载数</th>
<th>引用数</th>
<th>版本号</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<th ><p class="popup_ziyuan_title"><%= @attachment.filename %><span class="muban_icons_blue ml5">当前版本</span></p></th>
<th><%= @attachment.downloads %></th>
<th><%= @attachment.try(:quotes).to_i %></th>
<th><%= format_time(@attachment.created_on) %></th>
<th></th>
</tr>
<% @attachment_histories.each do |history| %>
<tr>
<th ><p class="popup_ziyuan_title">
<%= link_to history.filename, download_history_attachment_path(history.id, history.filename), :title => history.filename+"\n"+history.description.to_s %></p>
</th>
<th><%= history.downloads %></th>
<th><%= history.try(:quotes).to_i %></th>
<th><%= format_time(history.created_on) %></th>
<th>
<%= link_to( '删除资源', attachment_path(history.attachment, :history_id => history, :type => "history_delete"),
:remote => true,
:data => {:confirm => l(:text_are_you_sure)},
:method => :delete,
:class => "postOptionLink",
:class => "btn") if allow_to_delete_attachment(history) %>
</th>
</tr>
<% end %>
</tbody>
</table>
<div>
<% if @attachment.container_type == "Project" %>
<%= link_to( '删除所有资源', attachment_path(@attachment, :history_delete => true), :data => {:confirm => l(:text_history_are_you_sure)}, :method => :delete,:class => "fr fontGrey2 mb5", :onclick =>"hideModal();") if (is_project_manager?(User.current.id, @attachment.container_id) || User.current.id == @attachment.author_id || User.current.admin?) %>
<% elsif @attachment.container_type == "Course" %>
<%= link_to( '删除所有资源', attachment_path(@attachment, :history_delete => true), :data => {:confirm => l(:text_history_are_you_sure)}, :method => :delete,:class => "fr fontGrey2 mb5", :onclick =>"hideModal();") if (User.current.allowed_to?(:as_teacher, @attachment.container) || User.current.id == @attachment.author_id || User.current.admin?) %>
<% elsif @attachment.container_type == "OrgSubfield" %>
<%= link_to( '删除所有资源', attachment_path(@attachment, :history => true), :data => {:confirm => l(:text_history_are_you_sure)}, :method => :delete,:class => "fr fontGrey2 mb5", :onclick =>"hideModal();") if (User.current.id == @attachment.author_id || User.current.admin_of_org?(@attachment) || User.current.admin?) %>
<% end %>
</div>

View File

@ -79,8 +79,14 @@
</li>
<% end %>
<li>
<%= link_to( '删除资源', attachment_path(file),
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete,:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == org_subfield.id && file.container_type == "OrgSubfield" && file.destroyable %>
<% if file.destroyable %>
<%= link_to( '删除资源', attachment_path(file),
:data => {:confirm => file.destroyable ? l(:text_are_you_sure) : l(:text_history_are_you_sure)},
:method => :delete,
:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == org_subfield.id && file.container_type == "OrgSubfield" %>
<% else %>
<%= link_to '删除资源', attachment_versions_delete_path(file), :class => "postOptionLink", :remote => true %>
<% end %>
</li>
</ul>
<%else%>

View File

@ -39,7 +39,7 @@
<div class="cl"></div>
<% if User.current.admin? || ( User.current.logged? && ((is_course_teacher(User.current,@course) || file.author_id == User.current.id) && course_contains_attachment?(@course,file)) && ((delete_allowed || User.current.id == file.author_id) && file.container_id == @course.id && file.container_type == "Course")) %>
<div>
<div id="file_description_show_<%= file.id %>" class="fontGrey2 mb4">
<div id="file_description_show_<%= file.id %>" class="fontGrey2 mb4 break_word">
<%= render :partial => 'files/file_description', :locals => {:file => file} %>
</div>
<%= form_tag(edit_file_description_course_file_path(file, :course_id => @course.id),:remote=>'true', :method => :post, :id=>"files_query_form_#{file.id}") do %>
@ -81,9 +81,11 @@
</li>
<%end%>
<li>
<%= link_to( '删除资源', attachment_path(file),
:data => {:confirm => l(:text_are_you_sure)},
:method => :delete,:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == @course.id && file.container_type == "Course" && file.destroyable %>
<% if file.destroyable %>
<%= link_to( '删除资源', attachment_path(file),:data => {:confirm => l(:text_are_you_sure)}, :method => :delete,:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == @course.id && file.container_type == "Course" %>
<% else %>
<%= link_to '删除资源',attachment_versions_delete_path(file), :class => "postOptionLink", :remote => true %>
<% end %>
</li>
</ul>
<% end %>

View File

@ -27,7 +27,11 @@
</li>
<% end %>
<li>
<%= link_to( '删除资源', attachment_path(file),:data => {:confirm => l(:text_are_you_sure)}, :method => :delete,:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == project.id && file.container_type == "Project" && file.destroyable %>
<% if file.destroyable %>
<%= link_to( '删除资源', attachment_path(file),:data => {:confirm => l(:text_are_you_sure)}, :method => :delete,:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == project.id && file.container_type == "Project" %>
<% else %>
<%= link_to '删除资源',attachment_versions_delete_path(file), :class => "postOptionLink", :remote => true %>
<% end %>
</li>
</ul>
<% end %>

View File

@ -1,17 +1,16 @@
<% if @container_type == 0 %>
<div id="resource_list">
<%= render :partial => 'project_file', locals: {project: @project} %>
</div>
<% elsif @container_type == 1 %>
<div id="resource_list">
<%= render :partial => 'course_file', locals: {course: @course} %>
</div>
<% elsif @container_type == 2 %>
<div id="resource_list">
<%= render :partial => 'files/subfield_files', locals: {org_subfield: @org_subfield} %>
</div>
<% end %>
<% if @container_type == 0 %>
<div id="resource_list">
<%= render :partial => 'project_file', locals: {project: @project} %>
</div>
<% elsif @container_type == 1 %>
<div id="resource_list">
<%= render :partial => 'course_file', locals: {course: @course} %>
</div>
<% elsif @container_type == 2 %>
<div id="resource_list">
<%= render :partial => 'files/subfield_files', locals: {org_subfield: @org_subfield} %>
</div>
<% end %>
<script type='text/javascript'>
var slideHeight = 29;
@ -442,12 +441,10 @@
if($("#upload_form").find('.upload_filename').length > 1){
$("#upload_file_count").html('(只能上传一个更新文件)')
event.preventDefault();
return false;
}else if($("#upload_form").find('.upload_filename').length == 0){
$("#upload_file_count").html('(请上传一个更新文件)')
event.preventDefault();
return false;
}else{
$("#upload_form").submit();

View File

@ -24,15 +24,15 @@
<% end %>
</li>
<div class="cl"></div>
<li>
<label class="label">来源:</label>
<select class="w150">
<option>客户</option>
<option>用户</option>
<option>其他</option>
</select>
</li>
<div class="cl"></div>
<!--<li>-->
<!--<label class="label">来源:</label>-->
<!--<select class="w150">-->
<!--<option>客户</option>-->
<!--<option>用户</option>-->
<!--<option>其他</option>-->
<!--</select>-->
<!--</li>-->
<!--<div class="cl"></div>-->
<li>
<label class="label"><%= l(:field_assigned_to) %></label>
<% if @issue.safe_attribute? 'assigned_to_id' %>
@ -85,13 +85,6 @@
<% end %>
</li>
<div class="cl"></div>
<li>
<label class="label02">实际工时 (H)</label>
<% if @issue.safe_attribute? 'estimated_hours' %>
<%= f.text_field :estimated_hours, :size => 22, :disabled => !@issue.leaf?, :no_label => true %>
<% end %>
</li>
<div class="cl"></div>
<li><label class="label02">&nbsp;% 完成&nbsp;&nbsp;:&nbsp;</label>
<% if @issue.safe_attribute?('done_ratio') && @issue.leaf? && Issue.use_field_for_done_ratio? %>
<%= f.select :done_ratio, ((0..10).to_a.collect { |r| ["#{r*10} %", r*10] }),

View File

@ -517,4 +517,4 @@
</div><!--issues_con_list end-->
</div>
</div>
</div>

View File

@ -0,0 +1,11 @@
<% unless course_board.children.empty? %>
<ul class="sub-menu">
<% course_board.children.reorder("position asc").each do |board| %>
<li>
<% count = board ? (board.topics.count + Message.where("board_id =? and parent_id is not ?", board.id, nil).count) : 0 %>
<a href="<%=course_boards_path(@course, :board_id =>board.id) %>"><font class="hidden dis" style="max-width: 120px;"><%=board.name %></font><span style="vertical-align: top;"><%=count %></span></a>
<%= link_to( "",course_boards_path(@course, :board_id =>board.id, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") %>
</li>
<% end %>
</ul>
<% end %>

View File

@ -8,7 +8,7 @@
<%= link_to "首页",user_activities_path(User.current), :class => "c_white f16 db p10", :title => "回到个人首页"%>
</li>
<li class="navHomepageMenu fl">
<%= link_to "资源库", user_resource_user_path(User.current, :type => 6), :class => "c_white f16 db p10" %>
<%= link_to "资源库", user_resource_user_path(User.current, :type => 1), :class => "c_white f16 db p10" %>
</li>
<% if hidden_unproject_infos %>
<li class="navHomepageMenu fl">

View File

@ -19,7 +19,7 @@
<%= javascript_heads %>
<%= heads_for_theme %>
<%= call_hook :view_layouts_base_html_head %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/public', 'css/structure','prettify', 'css/courses','css/popup','sy_public','syllabus'%>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/public', 'css/structure','prettify', 'css/courses','css/popup','sy_public','syllabus', 'css/moduel'%>
<%= javascript_include_tag "course","avatars","header","attachments",'prettify' %>
<!-- page specific tags -->
<%= yield :header_tags -%>
@ -64,12 +64,16 @@
<a href="<%=course_path(@course) %>" >动态<span><%=@course.course_activities.count %></span></a>
</li>
<% end %>
<% unless show_nav?(@course.boards.first ? @course.boards.first.topics.count : 0) %>
<% course_board = @course.boards.where("parent_id is NULL").first %>
<% unless show_nav?(course_board ? course_board.topics.count : 0) %>
<li id="sy_02" class="sy_icons_boards">
<% count = @course.boards.first ? (@course.boards.first.topics.count + Message.where("board_id =? and parent_id is not ?", @course.boards.first.id, nil).count) : 0 %>
<% count = course_board ? (course_board.topics.count + Message.where("board_id =? and parent_id is not ?", course_board.id, nil).count) : 0 %>
<a href="<%=course_boards_path(@course) %>">讨论区<span><%=count %></span></a>
<%= link_to( "",course_boards_path(@course, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") if is_teacher %>
</li>
<div id="board_children_list">
<%= render :partial => 'layouts/board_children_list', :locals => {:course_board => course_board} %>
</div>
<% end %>
<% unless show_nav?(@course.homework_commons.count) %>
<li id="sy_03" class="sy_icons_hwork">

View File

@ -12,7 +12,7 @@
<%= favicon %>
<%= javascript_heads %>
<%= heads_for_theme %>
<%= stylesheet_link_tag 'prettify','jquery/jquery-ui-1.9.2','css/common','css/structure','css/public','repository','css/courses','css/org','css/project', 'css/popup' %>
<%= stylesheet_link_tag 'prettify','jquery/jquery-ui-1.9.2','css/common','css/structure','css/public','repository','css/courses','css/org','css/project', 'css/popup', 'css/moduel' %>
<%= javascript_include_tag 'cookie','project',"avatars", 'organization','header','prettify','select_list_move','org'%>
<%= javascript_include_tag 'attachments' %>
<%= call_hook :view_layouts_base_html_head %>

View File

@ -4,11 +4,11 @@
<div class="talk_new ml15">
<p class="talk_top"><%= l(:label_message_new) %></p>
<ul>
<%= form_for @message, :url => {:action => 'new'}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
<%= form_for @message, :url => {:action => 'new', :board_id => @board.id}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
<%= render :partial => 'form_course', :locals => {:f => f,:is_new => true} %>
<a href="javascript:void(0)" onclick="submitCoursesBoard();"class="blue_btn fl c_white"><%= l(:button_submit)%></a>
<%#= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form' ,target='preview',{:class => 'blue_btn grey_btn fl c_white'} )%>
<%= link_to l(:button_cancel), course_boards_path(@course), :class => "grey_btn fl c_white ml10"%>
<%= link_to l(:button_cancel), course_boards_path(@course, :board_id => @board.id), :class => "grey_btn fl c_white ml10"%>
<% end %>
</ul>
</div>

View File

@ -43,12 +43,11 @@
$(this).prev().css("color","#808080");
$(this).css("z-index", "1");
});
//二级菜单滑动时箭头方向控制
$(".homepageLeftMenuMoreIcon").toggle(function(){
$(this).css("background","url(/images/homepage_icon.png) 100px -624px no-repeat");
},function(){
$(this).css("background","url(/images/homepage_icon.png) -74px -240px no-repeat");
},function(){
$(this).css("background","url(/images/homepage_icon.png) 100px -624px no-repeat");
});
})
</script>
@ -103,17 +102,15 @@
<%= link_to "#{field.name}", show_org_subfield_organization_path(:id => organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
<% end %>
<% else %>
<!-- link_to "#{field.name}", organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" -->
<a href = "javascript:void(0);" class = "homepageMenuText" onclick = "$('#PostDomain_<%= field.id %>').slideToggle();"><%= field.name %></a>
<%= link_to "#{field.name}", organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
<% end %>
<% if User.current.logged? and User.current.admin_of_org?(organization) %>
<%=link_to "", new_organization_org_document_comment_path(organization, :field_id => field.id), :method => "get", :class => "homepageMenuSetting fr", :title => "发布帖子" %>
<% end %>
</div>
<div class="homepageLeftMenuCourses" id="PostDomain_<%= field.id %>" style="display:<%= field.sub_domains.count == 0 ? 'none' : '' %>">
<div class="<%= (field.sub_domains.count == 0) ? 'homepageLeftMenuCourses':'homepageLeftMenuCourses borderBottomNone' %>" id="PostDomain_<%= field.id %>" style="display:block;">
<ul>
<%= render :partial => 'organizations/org_subdomain',:locals => {:subdomains => field.sub_domains.reorder('priority').uniq, :org_subfield_id => field.id} %>
<%= render :partial => 'organizations/org_subdomain',:locals => {:subdomains => field.sub_domains.reorder('priority').uniq.limit(5), :org_subfield_id => field.id, :page=>1, :org_id => organization.id } %>
</ul>
</div>
@ -139,20 +136,20 @@
</div>
<% elsif field.field_type == "Resource" %>
<div class="homepageLeftMenuBlock">
<% if !field.subfield_subdomain_dir.nil? %>
<% if !request.local? and Secdomain.where("sub_type=2 and pid=?", organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", organization.id).map(&:subname).include?(request.subdomain) %>
<%= link_to "#{field.name}", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText homepageMenuControl hidden" %>
<% else %>
<%= link_to "#{field.name}", show_org_subfield_organization_path(:id => organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText homepageMenuControl hidden" %>
<% end %>
<% else %>
<%= link_to "#{field.name}", org_subfield_files_path(field), :class => "homepageMenuText homepageMenuControl hidden" %>
<% end %>
<% if User.current.member_of_org?organization %>
<%= link_to "", subfield_upload_file_org_subfield_files_path(field.id, :in_org => 1),:method => "post", :remote => true, :class => "homepageMenuSetting fr", :title => "上传资源" %>
<!--<a class="homepageMenuSetting fr" title="上传资源" href="javascript:void(0);" onclick="org_subfield_files_upload(<%#= field.id %>);"> </a>-->
<% end %>
<!--<a href="javascript:void(0);" class="homepageMenuText"><%#= field.name %></a>-->
<% if !field.subfield_subdomain_dir.nil? %>
<% if !request.local? and Secdomain.where("sub_type=2 and pid=?", organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", organization.id).map(&:subname).include?(request.subdomain) %>
<%= link_to "#{field.name}", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText homepageMenuControl hidden" %>
<% else %>
<%= link_to "#{field.name}", show_org_subfield_organization_path(:id => organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText homepageMenuControl hidden" %>
<% end %>
<% else %>
<%= link_to "#{field.name}", org_subfield_files_path(field), :class => "homepageMenuText homepageMenuControl hidden" %>
<% end %>
<% if User.current.member_of_org?organization %>
<%= link_to "", subfield_upload_file_org_subfield_files_path(field.id, :in_org => 1),:method => "post", :remote => true, :class => "homepageMenuSetting fr", :title => "上传资源" %>
<!--<a class="homepageMenuSetting fr" title="上传资源" href="javascript:void(0);" onclick="org_subfield_files_upload(<%#= field.id %>);"> </a>-->
<% end %>
<!--<a href="javascript:void(0);" class="homepageMenuText"><%#= field.name %></a>-->
</div>
<% end %>
</div>

View File

@ -3,9 +3,10 @@
<%= link_to subdomain.name, org_subfield_sub_domain_sub_document_comments_path(subdomain, :org_subfield_id => org_subfield_id), :class => "coursesLineGrey hidden", :title => subdomain.name %>
</li>
<% end %>
<%# if subdomains.size == 5 %>
<!--<li class="homepageLeftMenuMore" id="show_more_org_project">-->
<!--<input type="hidden" value="<%#= page %>" id="org_project_page_num">-->
<!--<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="show_more_org_project('<%#= more_org_projects_organization_path(org_id) %>');"></a>-->
<!--</li>-->
<%# end%>
<% if subdomains.size == 5 %>
<li class="homepageLeftMenuMore" id="show_more_org_submains">
<input type="hidden" value="<%= page %>" id="org_submains_page_num">
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="show_more_org_submain('<%= more_org_submains_organization_path(org_id, :org_subfield_id => org_subfield_id) %>');"></a>
</li>
<% end%>

View File

@ -0,0 +1 @@
$("#show_more_org_submains").replaceWith("<%= escape_javascript( render :partial => 'organizations/org_subdomain',:locals => {:subdomains => @submains, :org_subfield_id => @org_subfield.id, :page=> @page, :org_id => @organization } )%>");

View File

@ -3,7 +3,7 @@
<script type="text/javascript">
function resetQuestion<%=poll_question.id%>()
{
$("#poll_questions_title_<%=poll_question.id%>").val("<%= poll_question.question_title%>")
// $("#poll_questions_title_<%#=poll_question.id%>").val("<%#= poll_question.question_title%>")
$("#is_necessary_<%=poll_question.id%>").replaceWith("<input type='checkbox' name='is_necessary' id='is_necessary_<%=poll_question.id%>' value='true' <%= poll_question.is_necessary == 1 ? 'checked' : ''%>/>");
$("#poll_answers_<%=poll_question.id%>").html("<% poll_question.poll_answers.reorder('answer_position').each do |poll_answer| %> " +
"<% if poll_answer.answer_text != '' %>" +
@ -27,9 +27,9 @@
<div class="questionEditContainer">
<div class="ur_editor_title">
<label>问题:&nbsp;&nbsp;</label>
<label class="questionLabel mt8">问题:&nbsp;&nbsp;</label>
<input type="hidden" name="question_type" value="<%= poll_question.question_type%>"/>
<input maxlength="250" class="questionTitle w570" type="text" name="poll_questions_title" id="poll_questions_title_<%=poll_question.id%>" placeholder="请输入单选题题目" value="<%= poll_question.question_title%>"/>
<textarea maxlength="250" class="questionTitle w570" type="text" name="poll_questions_title" id="poll_questions_title_<%=poll_question.id%>" placeholder="请输入单选题题目" onfocus="autoHeight('#poll_questions_title_<%=poll_question.id%>',30)"><%= poll_question.question_title%></textarea>
<input type="checkbox" name="is_necessary" id="is_necessary_<%=poll_question.id%>" value="true" <%= poll_question.is_necessary == 1 ? "checked" : ""%>/>
<label>必答</label>
</div>

View File

@ -2,7 +2,7 @@
<script type="text/javascript">
function resetQuestion<%=poll_question.id%>()
{
$("#poll_questions_title_<%=poll_question.id%>").val("<%= poll_question.question_title%>")
// $("#poll_questions_title_<%#=poll_question.id%>").val("<%#= poll_question.question_title%>")
$("#is_necessary_<%=poll_question.id%>").replaceWith("<input type='checkbox' name='is_necessary' id='is_necessary_<%=poll_question.id%>' value='true' <%= poll_question.is_necessary == 1 ? 'checked' : ''%>/>");
$("#poll_answers_<%=poll_question.id%>").html("<% poll_question.poll_answers.reorder('answer_position').each do |poll_answer| %>" +
"<% if poll_answer.answer_text != '' %>" +
@ -25,9 +25,9 @@
</script>
<div class="questionEditContainer">
<div class="ur_editor_title">
<label>问题:&nbsp;&nbsp;</label>
<label class="questionLabel mt8">问题:&nbsp;&nbsp;</label>
<input type="hidden" name="question_type" value="<%= poll_question.question_type%>"/>
<input maxlength="250" class="questionTitle w570" type="text" name="poll_questions_title" id="poll_questions_title_<%=poll_question.id%>" placeholder="请输入多选题题目" value="<%= poll_question.question_title%>"/>
<textarea maxlength="250" class="questionTitle w570" type="text" name="poll_questions_title" id="poll_questions_title_<%=poll_question.id%>" placeholder="请输入多选题题目" onfocus="autoHeight('#poll_questions_title_<%=poll_question.id%>',30)"><%= poll_question.question_title%></textarea>
<input type="checkbox" name="is_necessary" id="is_necessary_<%=poll_question.id%>" value="true" <%= poll_question.is_necessary == 1 ? "checked" : ""%>/>
<label>必答</label>
</div>

View File

@ -3,9 +3,7 @@
<div>
<input type="text" maxlength="100" name="polls_name" id="polls_title" value="<%= @poll.polls_name %>" class="testTitle mb10" placeholder="新建问卷,请先输入问卷标题"/>
</div>
<textarea name="polls_description" maxlength="300" id="polls_description" class="testDes" placeholder="请在此输入问卷描述">
<%= @poll.polls_description.html_safe if !@poll.polls_description.blank? %>
</textarea>
<textarea name="polls_description" id="polls_description" class="testDes" placeholder="请在此输入问卷描述"><%= @poll.polls_description.html_safe if !@poll.polls_description.blank? %></textarea>
<a data-button="cancel" onclick="pollsCancel();" class="grey_btn fr borderRadius">取消</a>
<a data-button="ok" onclick="pollsSubmit($(this));" class="blue_btn fr borderRadius mr5">保存</a>
<div class="cl"></div>

View File

@ -2,7 +2,7 @@
<script type="text/javascript">
function resetQuestion<%=poll_question.id%>()
{
$("#poll_questions_title_<%=poll_question.id%>").val("<%= poll_question.question_title%>");
// $("#poll_questions_title_<%#=poll_question.id%>").val("<%#= poll_question.question_title%>");
$("#is_necessary_<%=poll_question.id%>").replaceWith("<input type='checkbox' name='is_necessary' id='is_necessary_<%=poll_question.id%>' value='true' <%= poll_question.is_necessary == 1 ? 'checked' : ''%>/>");
$("#poll_answers_<%=poll_question.id%>").html("<% poll_question.poll_answers.reorder('answer_position').each do |poll_answer| %>" +
"<li class='ur_item new_answer'>" +
@ -16,9 +16,9 @@
</script>
<div class="questionEditContainer"> <!--编辑多行文字start-->
<div class="ur_editor_title">
<label for="ur_question_title">问题:&nbsp;&nbsp;</label>
<label for="ur_question_title" class="questionLabel mt8">问题:&nbsp;&nbsp;</label>
<input type="hidden" name="question_type" value="<%= poll_question.question_type%>"/>
<input maxlength="250" class="questionTitle w570" type="text" name="poll_questions_title" id="poll_questions_title_<%=poll_question.id%>" placeholder="请输入多行主观题的问题描述" value="<%= poll_question.question_title%>"/>
<textarea maxlength="250" class="questionTitle w570" type="text" name="poll_questions_title" id="poll_questions_title_<%=poll_question.id%>" placeholder="请输入多行主观题的问题描述" onfocus="autoHeight('#poll_questions_title_<%=poll_question.id%>',30)"><%= poll_question.question_title%></textarea>
<label>
<input id="is_necessary_<%=poll_question.id%>" name="is_necessary" value="true" type="checkbox" <%= poll_question.is_necessary == 1 ? "checked" : ""%>/>
必答

View File

@ -2,16 +2,16 @@
<script type="text/javascript">
function resetQuestion<%=poll_question.id%>()
{
$("#poll_questions_title_<%=poll_question.id%>").val("<%= poll_question.question_title%>")
// $("#poll_questions_title_<%#=poll_question.id%>").val("<%#= poll_question.question_title%>")
$("#is_necessary_<%=poll_question.id%>").replaceWith("<input type='checkbox' name='is_necessary' id='is_necessary_<%=poll_question.id%>' value='true' <%= poll_question.is_necessary == 1 ? 'checked' : ''%>/>");
}
</script>
<div class="questionEditContainer"> <!--编辑单行文字start-->
<div class="ur_editor_title">
<label for="ur_question_title">问题:&nbsp;&nbsp;</label>
<label for="ur_question_title" class="questionLabel mt8">问题:&nbsp;&nbsp;</label>
<input type="hidden" name="question_type" value="<%= poll_question.question_type%>"/>
<input maxlength="250" id="poll_questions_title_<%=poll_question.id%>" class="questionTitle w570" contenteditable="true" type="text"
name="poll_questions_title" placeholder="请输入单行主观题" value="<%= poll_question.question_title%>"/>
<textarea maxlength="250" id="poll_questions_title_<%=poll_question.id%>" class="questionTitle w570" contenteditable="true" type="text"
name="poll_questions_title" placeholder="请输入单行主观题" onfocus="autoHeight('#poll_questions_title_<%=poll_question.id%>',30)"><%= poll_question.question_title%></textarea>
<label>
<input name="is_necessary" id="is_necessary_<%=poll_question.id%>" value="true" <%= poll_question.is_necessary == 1 ? "checked" : ""%> type="checkbox">
必答</label>

View File

@ -3,9 +3,9 @@
<% insert_begin = insert_begin %>
<div class="questionContainer">
<div class="ur_editor_title">
<label>问题:&nbsp;&nbsp;</label>
<label class="questionLabel mt8">问题:&nbsp;&nbsp;</label>
<input type="hidden" name="question_type" value="1"/>
<input maxlength="250" class="questionTitle W600" type="text" name="poll_questions_title" id="poll_questions_title_new" placeholder="请输入单选题题目"/>
<textarea maxlength="250" class="questionTitle w590" type="text" name="poll_questions_title" id="poll_questions_title_new" placeholder="请输入单选题题目" oninput="autoHeight('#poll_questions_title_new',30)"></textarea>
<input type="checkbox" name="is_necessary" value="true" checked/>
<label>必答</label>
</div>

View File

@ -1,9 +1,9 @@
<%= form_for PollQuestion.new,:url =>create_poll_question_poll_path(@poll.id),:remote => true do |f|%><!--新建多选start-->
<div class="questionContainer">
<div class="ur_editor_title">
<label>问题:&nbsp;&nbsp;</label>
<label class="questionLabel mt8">问题:&nbsp;&nbsp;</label>
<input type="hidden" name="question_type" value="2"/>
<input maxlength="250" class="questionTitle W600" type="text" name="poll_questions_title" id="poll_questions_title_new" placeholder="请输入多选题题目"/>
<textarea maxlength="250" class="questionTitle w590" type="text" name="poll_questions_title" id="poll_questions_title_new" placeholder="请输入多选题题目" oninput="autoHeight('#poll_questions_title_new',30)"></textarea>
<input type="checkbox" name="is_necessary" value="true" checked/>
<label>必答</label>
</div>

View File

@ -1,9 +1,9 @@
<%= form_for PollQuestion.new,:url =>create_poll_question_poll_path(@poll.id),:remote => true do |f|%>
<div class="questionContainer"> <!--编辑多行文字start-->
<div class="ur_editor_title">
<label for="ur_question_title">问题:&nbsp;&nbsp;</label>
<label for="ur_question_title" class="questionLabel mt8">问题:&nbsp;&nbsp;</label>
<input type="hidden" name="question_type" value="4"/>
<input maxlength="250" id="poll_questions_title_new" class="questionTitle W600" contenteditable="true" type="text" name="poll_questions_title" placeholder="请输入多行主观题的问题描述"/>
<textarea maxlength="250" id="poll_questions_title_new" class="questionTitle w590" contenteditable="true" type="text" name="poll_questions_title" placeholder="请输入多行主观题的问题描述" oninput="autoHeight('#poll_questions_title_new',30)"></textarea>
<label>
<input name="is_necessary" value="true" checked type="checkbox">
必答

View File

@ -1,9 +1,9 @@
<%= form_for PollQuestion.new,:url =>create_poll_question_poll_path(@poll.id),:remote => true do |f|%>
<div class="questionContainer"> <!--编辑单行文字start-->
<div class="ur_editor_title">
<label for="ur_question_title">问题:&nbsp;&nbsp;</label>
<label for="ur_question_title" class="questionLabel mt8">问题:&nbsp;&nbsp;</label>
<input type="hidden" name="question_type" value="3"/>
<input maxlength="250" id="poll_questions_title_new" class="questionTitle W600" contenteditable="true" type="text" name="poll_questions_title" placeholder="请输入单行主观题"/>
<textarea maxlength="250" id="poll_questions_title_new" class="questionTitle w590" contenteditable="true" type="text" name="poll_questions_title" placeholder="请输入单行主观题" oninput="autoHeight('#poll_questions_title_new',30)"></textarea>
<label>
<input name="is_necessary" value="true" checked type="checkbox">
必答

View File

@ -72,11 +72,11 @@ function add_MC(){
'<%= form_for PollQuestion.new,:url =>create_poll_question_poll_path(@poll.id),:remote => true do |f|%>'+
' <div class="questionEditContainer"> '+
'<div class="ur_editor_title"> '+
'<label>问题:&nbsp;&nbsp;</label>'+
'<label class="questionLabel mt8">问题:&nbsp;&nbsp;</label>'+
'<input type="hidden" name="quest_id" value="'+quest_id+'"/>'+
'<input type="hidden" name="quest_num" value="'+quest_num+'"/>'+
'<input type="hidden" name="question_type" value="1"/>'+
'<input maxlength="250" class="questionTitle w570" type="text" name="poll_questions_title" id="poll_questions_title" placeholder="请输入单选题题目"/>'+
'<textarea maxlength="250" class="questionTitle w570" type="text" name="poll_questions_title" id="poll_questions_title" placeholder="请输入单选题题目"></textarea>'+
'<input type="checkbox" name="is_necessary" value="true" checked/>'+
'<label>必答</label>'+
'</div>'+
@ -128,6 +128,11 @@ function add_MC(){
$("#add_new_question").one('click', function(){
add_poll_question($(this));
});
$(".questionTitle").on("input",function(){
$(this).height(30);
var scrollVal = $(this)[0].scrollHeight;
$(this).height(scrollVal);
});
}
}
else {
@ -157,11 +162,11 @@ function insert_MCQ(quest_type,quest_num,quest_id){
'<%= form_for PollQuestion.new,:url =>create_poll_question_poll_path(@poll.id),:remote => true do |f|%>'+
'<div class="questionEditContainer">'+
'<div class="ur_editor_title">'+
'<label>问题:&nbsp;&nbsp;</label>'+
'<label class="questionLabel mt8">问题:&nbsp;&nbsp;</label>'+
'<input type="hidden" name="quest_id" value="'+quest_id+'"/>'+
'<input type="hidden" name="quest_num" value="'+quest_num+'"/>'+
'<input type="hidden" name="question_type" value="2"/>'+
'<input maxlength="250" class="questionTitle w570" type="text" name="poll_questions_title" id="poll_questions_title" placeholder="请输入多选题题目"/>'+
'<textarea maxlength="250" class="questionTitle w570" type="text" name="poll_questions_title" id="poll_questions_title" placeholder="请输入多选题题目"></textarea>'+
'<input type="checkbox" name="is_necessary" value="true" checked/>'+
'<label>必答</label>'+
'</div>'+
@ -213,6 +218,11 @@ function insert_MCQ(quest_type,quest_num,quest_id){
$("#add_new_question").one('click', function(){
add_poll_question($(this));
});
$(".questionTitle").on("input",function(){
$(this).height(30);
var scrollVal = $(this)[0].scrollHeight;
$(this).height(scrollVal);
});
}
}
else {
@ -242,11 +252,11 @@ function insert_MCQ(quest_type,quest_num,quest_id){
'<%= form_for PollQuestion.new,:url =>create_poll_question_poll_path(@poll.id),:remote => true do |f|%>'+
'<div class="questionEditContainer">'+
'<div class="ur_editor_title">'+
'<label for="ur_question_title">问题:&nbsp;&nbsp;</label>'+
'<label for="ur_question_title" class="questionLabel mt8">问题:&nbsp;&nbsp;</label>'+
'<input type="hidden" name="quest_id" value="'+quest_id+'"/>'+
'<input type="hidden" name="quest_num" value="'+quest_num+'"/>'+
'<input type="hidden" name="question_type" value="3"/>'+
'<input maxlength="250" id="poll_questions_title" class="questionTitle w570" contenteditable="true" type="text" name="poll_questions_title" placeholder="请输入单行主观题"/>'+
'<textarea maxlength="250" id="poll_questions_title" class="questionTitle w570" contenteditable="true" type="text" name="poll_questions_title" placeholder="请输入单行主观题"></textarea>'+
'<input type="checkbox" name="is_necessary" value="true" checked/>'+
'<label for="ur_question_require">必答</label>'+
'</div>'+
@ -266,6 +276,11 @@ function insert_MCQ(quest_type,quest_num,quest_id){
$("#add_new_question").one('click', function(){
add_poll_question($(this));
});
$(".questionTitle").on("input",function(){
$(this).height(30);
var scrollVal = $(this)[0].scrollHeight;
$(this).height(scrollVal);
});
}
}
else {
@ -294,11 +309,11 @@ function insert_MCQ(quest_type,quest_num,quest_id){
'<%= form_for PollQuestion.new,:url =>create_poll_question_poll_path(@poll.id),:remote => true do |f|%>'+
'<div class="questionEditContainer">'+
'<div class="ur_editor_title">'+
'<label for="ur_question_title">问题:&nbsp;&nbsp;</label>'+
'<label for="ur_question_title" class="questionLabel mt8">问题:&nbsp;&nbsp;</label>'+
'<input type="hidden" name="quest_id" value="'+quest_id+'"/>'+
'<input type="hidden" name="quest_num" value="'+quest_num+'"/>'+
'<input type="hidden" name="question_type" value="4"/>'+
'<input maxlength="250" id="poll_questions_title" class="questionTitle w570" contenteditable="true" type="text" name="poll_questions_title" placeholder="请输入多行主观题的问题描述"/>'+
'<textarea maxlength="250" id="poll_questions_title" class="questionTitle w570" contenteditable="true" type="text" name="poll_questions_title" placeholder="请输入多行主观题的问题描述"></textarea>'+
'<label><input type="checkbox" name="is_necessary" value="true" checked/>'+
'必答</label>'+
'</div>'+
@ -339,6 +354,11 @@ function insert_MCQ(quest_type,quest_num,quest_id){
$("#add_new_question").one('click', function(){
add_poll_question($(this));
});
$(".questionTitle").on("input",function(){
$(this).height(30);
var scrollVal = $(this)[0].scrollHeight;
$(this).height(scrollVal);
});
}
}
else {
@ -557,7 +577,7 @@ function insert_MCQ(quest_type,quest_num,quest_id){
<label for="">允许学生查看调查结果</label>
</div>
<div>
<a href="javascript:void(0);" onclick="poll_cancel();" class="grey_btn fr borderRadius">取消</a>
<!--<a href="javascript:void(0);" onclick="poll_cancel();" class="grey_btn fr borderRadius">取消</a>-->
<a href="javascript:void(0);" onclick="poll_save();" class="blue_btn fr borderRadius mr5">保存</a>
<a href="javascript:void(0);" onclick="poll_submit();" class="blue_btn fr borderRadius mr5" >发布</a>
</div>

View File

@ -1,9 +1,9 @@
<div>
<div class="testEditTitle">
第<%= poll_question.question_number%>题:
<%= poll_question.question_title %>
<span class="questionLabel">第<%= poll_question.question_number%>题:</span>
<span class="formatContainer m_w500"><%= poll_question.question_title %></span>
<%if poll_question.is_necessary == 1%>
<span class="c_red ml5" title="必答">*</span>
<span class="c_red questionLabel ml5" title="必答">*</span>
<%end%>
</div>

View File

@ -1,9 +1,9 @@
<div>
<div class="testEditTitle">
第<%= poll_question.question_number%>题:
<%= poll_question.question_title %>
<span class="questionLabel">第<%= poll_question.question_number%>题:</span>
<span class="formatContainer m_w500"><%= poll_question.question_title %></span>
<%if poll_question.is_necessary == 1%>
<span class="ur_required" title="必答">*</span>
<span class="ur_required questionLabel ml5" title="必答">*</span>
<%end%>
</div>
<%= link_to("", delete_poll_question_poll_index_path(:poll_question => poll_question.id),

View File

@ -13,7 +13,7 @@
<% poll_question.poll_votes.where("user_id = #{User.current.id}").each do |answer|%>
<tr>
<td>
<p class="ml20">
<p class="ml20 break_word">
<%= answer.poll_answer.answer_text == "" ? (answer.vote_text.nil? ? "其他" : answer.vote_text) : answer.poll_answer.answer_text %>
</p>
</td>

View File

@ -13,7 +13,7 @@
<% poll_question.poll_votes.where("user_id = #{User.current.id}").each do |answer|%>
<tr>
<td>
<p class="ml20">
<p class="ml20 break_word">
<%= answer.poll_answer.answer_text == "" ? (answer.vote_text.nil? ? "其他" : answer.vote_text) : answer.poll_answer.answer_text %>
</p>
</td>

View File

@ -1,7 +1,7 @@
<div class="testStatus" ><!--头部显示 start-->
<a href="javascript:" class="testEdit" title="编辑" onclick="pollsEdit();"></a>
<div class="testStatus" onmouseover="$('#poll_head_edit_pen').show();" onmouseout="$('#poll_head_edit_pen').hide();"><!--头部显示 start-->
<a href="javascript:" class="testEdit undis" id="poll_head_edit_pen" title="编辑" onclick="pollsEdit();" style="top:0;"></a>
<!-- <a class='ur_icon_add' title='导入' id="import_btn" onclick="importPoll();"></a> -->
<h1 class="ur_page_title" id="polls_name_h"><%= poll.polls_name%></h1>
<h1 class="ur_page_title" id="polls_name_h" style="width:668px; margin:0 auto;"><%= poll.polls_name%></h1>
<div class="testDesEdit mt5"><%= @poll.polls_description.nil? ? "" : @poll.polls_description.html_safe%></div>
<div class="cl"></div>
</div><!--头部显示 end-->

View File

@ -1,9 +1,9 @@
<div>
<div class="testEditTitle">
第<%= poll_question.question_number%>题:
<%= poll_question.question_title %>
<span class="questionLabel">第<%= poll_question.question_number%>题:</span>
<span class="formatContainer m_w500"><%= poll_question.question_title %></span>
<%if poll_question.is_necessary == 1%>
<span class="ur_required" title="必答">*</span>
<span class="ur_required questionLabel ml5" title="必答">*</span>
<%end%>
</div>
<%= link_to("", delete_poll_question_poll_index_path(:poll_question => poll_question.id),

View File

@ -10,7 +10,7 @@
<% poll_question.poll_answers.reorder("answer_position").each_with_index do |poll_answer, i| %>
<div class="ml40 mb10">
<p class="mb10"><%= i + 1 %>.<%= poll_answer.answer_text%></p>
<p class="ml20">
<p class="ml20 break_word">
<%= get_anwser_vote_text(poll_question.id,User.current.id,poll_answer.id).html_safe%>
</p>
</div>

View File

@ -1,9 +1,9 @@
<div>
<div class="testEditTitle">
第<%= poll_question.question_number%>题:
<%= poll_question.question_title %>
<span class="questionLabel">第<%= poll_question.question_number%>题:</span>
<span class="formatContainer m_w500"><%= poll_question.question_title %></span>
<%if poll_question.is_necessary == 1%>
<span class="ur_required" title="必答">*</span>
<span class="ur_required questionLabel ml5" title="必答">*</span>
<%end%>
</div>
<%= link_to("", delete_poll_question_poll_index_path(:poll_question => poll_question.id),

View File

@ -8,7 +8,7 @@
</div>
<div class="cl"></div>
<div class="ur_inputs">
<p class="ml20">
<p class="ml20 break_word">
<%= get_anwser_vote_text poll_question.id,User.current.id%>
</p>
</div>

View File

@ -233,7 +233,7 @@
</div>
<% end %>
</div>
<div class="testStatus" id="single_question_list" style="display: <%=single_question_list.count > 0 ? "" : "none" %>">
<div class="testStatus" id="multi_question_list" style="display: <%=multi_question_list.count > 0 ? "" : "none" %>">
<h3 class="fontGrey3">多行主观题</h3>
<% multi_question_list.each do |pq| %>
<div id="poll_questions_<%= pq.id%>">

View File

@ -2,12 +2,12 @@
<a href='<%= praise_tread_praise_plus_path({:obj_id=>activity.id,:obj_type=>activity.class,:user_activity_id=>user_activity_id,:type=>type }) %>' data-remote="true" class="<%=type == 'reply'? 'fr' : 'ml15' %> likeButton" title="点赞" >
<span class="likeText">赞</span>
<% num = activity.praise_tread_cache ? activity.praise_tread_cache.praise_num : 0 %>
<span class="likeNum"><%= num > 0 ? "#{num}" : "" %></span>
<span class="likeNum"><%= (num.nil? ? 0 : num) > 0 ? "#{(num.nil? ? 0 : num)}" : "" %></span>
</a>
<% else %>
<a href='<%= praise_tread_praise_minus_path({:obj_id=>activity.id,:obj_type=>activity.class,:user_activity_id=>user_activity_id,:type=>type }) %>' data-remote="true" class="<%=type == 'reply'? 'fr' : 'ml15' %> likeButton" title="取消点赞" >
<span class="likeText">已赞</span>
<% num = activity.praise_tread_cache ? activity.praise_tread_cache.praise_num : 0 %>
<span class="likeNum"><%= num > 0 ? "#{num}" : "" %></span>
<span class="likeNum"><%= (num.nil? ? 0 : num) > 0 ? "#{(num.nil? ? 0 : num)}" : "" %></span>
</a>
<% end %>

View File

@ -67,7 +67,7 @@
<% end%>
<% if @homework.anonymous_comment == 0%>
<td class="hworkList70 <%= score_color student_work.student_score%> student_score_info">
<td class="hworkList70 <%= score_color student_work.student_score%> student_score_info pr">
<% if student_work.student_score.nil? %>
<span title="该作品未被匿评">未参与</span>
<% else %>
@ -94,7 +94,7 @@
<% else %>
<% score = student_work.respond_to?("score") ? student_work.score : (student_work.final_score || 0) - student_work.absence_penalty - student_work.late_penalty%>
<% end %>
<td class="hworkList70 <%= score_color score%> student_final_scor_info">
<td class="hworkList70 <%= score_color score%> student_final_scor_info pr">
<%= score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%>
<% unless score.nil?%>
<div class="score-tip none tl" style="line-height: 18px;">

View File

@ -4,13 +4,13 @@
<h2 class="list-h2">讨论区列表</h2>
<div class="category">
<span class="grayTxt ">排序:</span>
<%= link_to "时间", {:controller => 'boards', :action => 'index', :type => @type, :sort => @b_sort, :order => 1 }, :class => "sortTxt", :remote => true %>
<%= link_to "时间", {:controller => 'boards', :action => 'index', :board_id =>@board.id, :type => @type, :sort => @b_sort, :order => 1 }, :class => "sortTxt", :remote => true %>
<% if @type.to_i == 1 %>
<%= link_to "", {:controller => 'boards', :action => 'index', :type => @type, :sort => @b_sort, :order => 1 }, :class => "#{@b_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} ", :remote => true %>
<%= link_to "", {:controller => 'boards', :action => 'index', :board_id =>@board.id, :type => @type, :sort => @b_sort, :order => 1 }, :class => "#{@b_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} ", :remote => true %>
<% end %>
<%= link_to "人气", {:controller => 'boards', :action => 'index', :type => @type, :sort => @b_sort, :order => 2 }, :class => "sortTxt", :remote => true %>
<%= link_to "人气", {:controller => 'boards', :action => 'index', :board_id =>@board.id, :type => @type, :sort => @b_sort, :order => 2 }, :class => "sortTxt", :remote => true %>
<% if @type.to_i == 2 %>
<%= link_to "", {:controller => 'boards', :action => 'index', :type => @type, :sort => @b_sort, :order => 2 }, :class => "#{@b_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} ", :remote => true %>
<%= link_to "", {:controller => 'boards', :action => 'index', :board_id =>@board.id, :type => @type, :sort => @b_sort, :order => 2 }, :class => "#{@b_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} ", :remote => true %>
<% end %>
<div class="cl"></div>
</div>

View File

@ -10,7 +10,7 @@
TO
<%=link_to activity.course.syllabus.title, syllabus_path(activity.course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %>
<span class="fb" style="color: #269ac9"> • </span>
<%= link_to activity.course.name.to_s+" | 班级讨论区", course_boards_path(activity.course,:host=> Setting.host_course), :class => "newsBlue mr5"%>
<%= link_to activity.course.name.to_s+" | #{activity.board.parent.nil? ? '班级讨论区' : activity.board.name}", course_boards_path(activity.course,:host=> Setting.host_course), :class => "newsBlue mr5"%>
</div>
<div class="homepagePostTitle hidden m_w530 fl">
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->

View File

@ -45,10 +45,10 @@
<div>
<ul class="resource-banner">
<li class="fl resource-switch">
<a href="<%= user_resource_user_path(@user, :type => '6', :status => 6) %>" class="resource-tab resource-tab-active" id="public_resource_list" data-remote="true">公共资源</a>
<a href="<%= user_resource_user_path(@user, :type => '1', :status => 6) %>" class="resource-tab resource-tab-active" id="my_resource_list" data-remote="true">我的资源</a>
</li>
<li class="fl resource-switch">
<a href="<%= user_resource_user_path(@user, :type => '1', :status => 6) %>" class="resource-tab" id="my_resource_list" data-remote="true">我的资源</a>
<a href="<%= user_resource_user_path(@user, :type => '6', :status => 6) %>" class="resource-tab" id="public_resource_list" data-remote="true">公共资源</a>
</li>
<!--<li class="fl resource-switch">-->
<!--<a href="<%#= user_resource_user_path(@user, :type => '2', :status => 6) %>" class="resource-tab" id="private_resource_list" data-remote="true">申请资源</a>-->

View File

@ -1,7 +1,11 @@
<h3><%=l(:label_version)%></h3>
<%= labelled_form_for @version,:html=>{:id=>"new_project_version_form"} do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<a href="#" onclick="$('#new_project_version_form').submit();" class="blue_btn ml110"><%=l(:button_save)%></a>
<% end %>
<h3><%=l(:label_version)%></h3>
<%= labelled_form_for @version,:html=>{:id=>"new_project_version_form"} do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<a href="#" onclick="$('#new_project_version_form').submit();" class="blue_btn ml110"><%=l(:button_save)%></a>
<% end %>
<script>
$("#new_project_version_form").parent().css({"width":"730px","background-color":"#fff","padding":"10px","margin-left":"10px","margin-bottom":"10px"});
</script>

View File

@ -188,6 +188,7 @@ zh:
text_are_you_sure: 您确定要删除吗? #js 提示
text_history_are_you_sure: 本资源有多个版本,你确定要全部删除吗?
text_are_you_sure_out: 你确定要退出该班级吗?
text_are_you_sure_out_group: 你确定要退出该分班吗?
text_are_you_sure_all: 您确定要删除所有文件吗

View File

@ -73,6 +73,7 @@ RedmineApp::Application.routes.draw do
put 'set_homepage'
put 'cancel_homepage'
get 'members'
get 'more_org_submains'
get 'more_org_projects'
get 'more_org_courses'
get 'search_courses'
@ -512,6 +513,8 @@ RedmineApp::Application.routes.draw do
# boards
match 'boards/:board_id/topics/new', :to => 'messages#new', :via => [:get, :post], :as => 'new_board_message'
match 'boards/:id/join_to_org_subfields', :to => 'boards#join_to_org_subfields'
match 'boards/:id/update_position', :to => 'boards#update_position', :via => :post
match 'boards/:id/update_name', :to => 'boards#update_name', :via => :put
get 'boards/:board_id/topics/:id', :to => 'messages#show', :as => 'board_message'
match 'boards/:board_id/topics/quote/:id', :to => 'messages#quote', :via => [:get, :post]
get 'boards/:board_id/topics/:id/edit', :to => 'messages#edit',:as=>'edit_board_message'
@ -1014,6 +1017,7 @@ RedmineApp::Application.routes.draw do
# additional routes for having the file name at the end of url
get 'attachments/:id/:filename', :to => 'attachments#show', :id => /\d+/, :filename => /.*/, :as => 'named_attachment'
get 'attachments/attachment_versions/:id',:to=>'attachments#attachment_versions',:as=>'attachments_versions'
get 'attachments/attachment_versions_delete/:id',:to=>'attachments#attachment_versions_delete',:as=>'attachment_versions_delete'
get 'attachments/attachment_history_download/:id',:to=>'attachments#attachment_history_download',:as=>'attachment_history_download'
post 'attachments/upload_attachment_version',:to=>'attachments#upload_attachment_version',:as=>'upload_attachment_version'
get 'attachments/download/:id/:filename', :to => 'attachments#download', :id => /\d+/, :filename => /.*/, :as => 'download_named_attachment'

View File

@ -0,0 +1,9 @@
class ChangeDescriptionForAttachmentHistory < ActiveRecord::Migration
def up
change_column :attachment_histories, :description, :text
end
def down
change_column :attachment_histories, :description, :string
end
end

View File

@ -18,7 +18,7 @@ namespace :homework_publishtime do
if str != ""
str += ","
end
str += "('#{name_str}',#{homework.id},#{student.student_id}, '#{format_time(Time.now)}', '#{format_time(Time.now)}')"
str += "('#{name_str}',#{homework.id},#{student.student_id}, '#{Time.now}', '#{Time.now}')"
end
sql = "insert into student_works (name, homework_common_id,user_id, created_at, updated_at) values" + str
ActiveRecord::Base.connection.execute sql

View File

@ -2161,3 +2161,16 @@ function edit_img(){
$(document).ready(edit_img);
//自适应高度
function autoHeight(id, baseheight) {
var obj = $(id);
obj.height(baseheight);
var scrollVal = obj[0].scrollHeight;
obj.height(scrollVal);
obj.on('input',function(){
obj.height(baseheight);
var scrollVal = obj[0].scrollHeight;
obj.height(scrollVal);
});
};

View File

@ -6,7 +6,7 @@ function course_setting(id)
//$('#tbc_0'+id).removeClass().addClass("dis");
//$('#tb_'+(3-id)).removeClass().addClass("hwork_normaltab");
//$('#tbc_0'+(3-id)).removeClass().addClass("undis");
for (var i = 1; i < 4; i++) {
for (var i = 1; i < 5; i++) {
if (i == id) {
$("#tb_" + i).removeClass().addClass("hwork_hovertab");
$("#tbc_0" + i).removeClass().addClass("dis");

View File

@ -48,14 +48,14 @@ $(function(){
//弹框
var root_path = getRootPath();
var forums_1_path = root_path + "/forums/1"
var htmlvalue = "</br><div style='width:430px;text-align:center;margin:0 auto' >您的程序引发了不知名异常,请在公共贴吧提交您的代码进行意见反馈,我们处理后会立即联系您,谢谢!</div><div style='width:550px;text-align:center'><a target='_Blank' href="+forums_1_path+">点我进入反馈页面</a></div>";
var htmlvalue = "</br><div style='width:550px;text-align:center'>由于目前大量用户正在测试,系统繁忙,请稍后再试。我们将尽快提升平台的处理能力,谢谢您的支持!</div></br><div style='width:67px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn' onclick='hideModal()'>确定</a></div>";
pop_up_box(htmlvalue,580,30,50);
$('#test-program-btn').show();
return;
}
else if (data.status==-3){
var htmlvalue = "</br><div style='width:550px;text-align:center'>对不起,服务器繁忙请稍后再试!</div></br><div style='width:67px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn' onclick='hideModal()'>确定</a></div>";
var htmlvalue = "</br><div style='width:550px;text-align:center'>由于目前大量用户正在测试,系统繁忙,请稍后再试。我们将尽快提升平台的处理能力,谢谢您的支持!</div></br><div style='width:67px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn' onclick='hideModal()'>确定</a></div>";
pop_up_box(htmlvalue,580,30,50);
$('#test-program-btn').show();
return;

View File

@ -34,6 +34,17 @@ function observeSearchfield(fieldId, targetId, url) {
});
}
//显示更多子栏目
function show_more_org_submain(url){
$.get(
url,
{ page: $("#org_submains_page_num").val() },
function (data) {
}
);
}
//显示更多的项目
function show_more_org_project(url){
$.get(

View File

@ -34,6 +34,7 @@ a:hover.news_foot{ color:#787b7e; border:1px solid #d4d4d4;}
.hworkListBanner {width:720px; height:40px; background:#eaeaea; margin-bottom:10px;}
.hworkListContainer {float:left; clear:both; width:720px;}
.showHwork{ border:1px solid #eaeaea; width:696px; padding:10px; color:#666666; padding-bottom:0px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); }
.showHworkP pre {white-space:normal;}
.showHworkP{ width:630px; float:left;}
.showHwork ul li {margin-bottom: 5px;}
.hworkPingText{ float:left; border:1px solid #e4e4e4; padding:5px; width:618px; height:35px;}

View File

@ -265,6 +265,7 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/
.w557{ width:557px;}
.w570 {width:570px !important;}
.w576{ width:576px;}
.w590{ width:590px; !important;}
.w607 {width:607px;}
.w664{ width:664px;}
.w683{ width:683px;}
@ -282,6 +283,7 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/
.w712{width:712px; max-width:712px; min-width:712px;}
.w713{width: 713px;}
.w720{width:721px;}
.w730{width:730px;}
.w770{ width:770px;}
.h20{height: 20px;}
.h22{ height:22px;}
@ -470,7 +472,6 @@ a.green_btn{background:#28be6c;color:#fff; font-weight:normal; padding:2px 10px;
a:hover.green_btn{ background:#14ad5a;}
.blue_btn{ background:#64bdd9; color:#fff; font-weight:normal;padding:2px 10px; text-align:center;}
a.blue_btn{background:#3b94d6;color:#fff; font-weight:normal; padding:2px 10px; text-align:center;}
a:hover.blue_btn{ background:#329cbd;}
.red_btn{ background:red; color:#fff; font-size:14px; font-weight:normal;padding:2px 8px; text-align:center;}
a.red_btn{background:red; color:#fff;font-size:14px; font-weight:normal; padding:2px 8px; text-align:center;cursor: pointer;}
a.orange_btn_homework{background:#d63502;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center;}
@ -659,4 +660,4 @@ a:hover.hw_btn_blue,a:active.hw_btn_blue{ background: #3b94d6; color:#fff;}
.error-icon {background:url("/images/icons_ziliao.png") 0 -56px no-repeat; padding-left:25px;}
/*禁用*/
.disabled {background-color:#f5f5f5;}
.disabled {background-color:#f5f5f5;}

View File

@ -250,7 +250,7 @@ a.hworkSearchIcon:hover {background:url(../images/nav_icon.png) -49px -1px no-re
.score-tip em {display:block; border-width:8px; position:absolute; bottom:32px; left:-16px; border-style:dashed solid dashed dashed; border-color:transparent #eaeaea transparent transparent; font-size:0; line-height:0;}
.score-tip font {display:block; border-width:8px; position:absolute; bottom:31px; left:-15px; border-style:dashed solid dashed dashed; border-color:transparent #FFF transparent transparent; font-size:0; line-height:0;}
.anonymous-tip {width:100px;color:#666; position:absolute; padding:3px 5px; border:1px solid #eaeaea; right:-143px; top:-1px; background-color:#ffffff; line-height:20px; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5); white-space:nowrap;}
.anonymous-tip {width:100px;color:#666; position:absolute; padding:3px 5px; border:1px solid #eaeaea; right:-213px; top:-1px; background-color:#ffffff; line-height:20px; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5);}
.anonymous-tip em {display:block; border-width:8px; position:absolute; bottom:25px; left:-16px; border-style:dashed solid dashed dashed; border-color:transparent #eaeaea transparent transparent; font-size:0; line-height:0;}
.anonymous-tip font {display:block; border-width:8px; position:absolute; bottom:26px; left:-15px; border-style:dashed solid dashed dashed; border-color:transparent #FFF transparent transparent; font-size:0; line-height:0;}
@ -481,12 +481,14 @@ a:hover.btn_submit{background:#297fb8;}
a:hover.btn_cancel{ color:#666;}
.testQuestion{ width:708px; height: auto; border:1px solid #cbcbcb; padding:10px 0 0 10px; margin-bottom:10px;}
.questionContainer {width:698px; border:1px solid #cbcbcb;background:#eeeeee; padding:10px; margin-bottom:10px;}
.questionTitle{ width:644px; height:30px; border:1px solid #cbcbcb; padding-left:5px; background:#fff;}
.questionLabel {vertical-align:top; display:inline-block;}
.questionTitle{ width:644px; height:30px; line-height:30px; border:1px solid #cbcbcb; padding-left:5px; background:#fff;}
.formatContainer {white-space:pre-wrap; display:inline-block;}
.examTime {width:90px; border:1px solid #cbcbcb; outline:none; height:28px; text-align:center; padding-left:0px; }
.testStatus{width:698px; border:1px solid #cbcbcb; padding:10px; margin-bottom:10px; background:#ffffff; position:relative; color:#767676;}
.testEdit{ background:url(../images/icons.png) 0px -272px no-repeat; width:16px; height:27px; display:block;float:right; bottom:10px; right:10px; position:absolute;}
a:hover.testEdit{ background:url(../images/icons.png) -21px -272px no-repeat;}
.testDesEdit {width:670px; overflow:hidden;}
.testDesEdit {width:670px; overflow:hidden; white-space:pre-wrap;}
.testEditTitle{ padding:10px 0px ; float:left; width:564px; }
.questionEditContainer {border:1px solid #cbcbcb;background:#eeeeee; padding:10px; margin-bottom:10px; margin-top:10px;}
.fillInput {border:1px solid #cbcbcb; padding-left:5px; background-color:#ffffff; width:693px; height:30px; color:#888888;}
@ -556,4 +558,4 @@ a:hover.blueCir{ background:#3598db; color:#fff;}
/*20160912问卷调查*/
.new-question {width:324px; height:30px; color:#888; background-color:#fff; padding-left:5px; margin-left:46px; cursor:pointer;}
.new-subjective {width:550px; height:30px; color:#888; background-color:#fff; padding-left:5px; margin-left:96px; cursor:pointer;}
.questionnaire-input {height:30px; border:1px solid #cbcbcb; padding-left:5px;}
.questionnaire-input {height:30px; border:1px solid #cbcbcb; padding-left:5px;}

View File

@ -0,0 +1,59 @@
/* 模板弹框 20161013byLB */
#muban_popup_box{ background:#fff;padding-bottom:15px;-webkit-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px;box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);}
.muban_popup_top{background:#3b94d6;height:40px;-webkit-border-radius: 5px 5px 0px 0px;-moz-border-radius: 5px 5px 0px 0px;-o-border-radius: 5px 5px 0px 0px;border-radius: 5px 5px 0px 0px;}
.muban_popup_top h3{ font-size:16px; color:#fff; font-weight:normal; line-height:40px; padding-left:10px; }
a.muban_icons_close{width:20px; height:20px;display:block;background: url(/images/sy/sy_icons_close.png) 0 0px no-repeat; margin:8px 10px 0 0;}
a:hover.muban_icons_close{background: url(/images/sy/sy_icons_close.png) -40px 0px no-repeat;}
/*模板表格 20161013byLB*/
.muban_table{ width:100%; background:#fff; border:1px solid #e5e5e5; border-bottom: none; }
.muban_table thead tr{ height:40px; line-height:40px;}
.muban_table thead tr th{ border-bottom:1px solid #e5e5e5;}
.muban_table tbody tr:hover{ background:#f5f5f5;}
.muban_table tbody tr th{ height:40px; line-height:40px; border-bottom:1px solid #e5e5e5; font-weight:normal; color:#888;}
/*模板icons 20161013byLB*/
.muban_icons_orange{font-size: 12px;padding: 0 5px;border-radius: 3px;line-height: 14px;color: #ff4a1b;border: 1px solid #ff4a1b;}
.muban_icons_blue{font-size: 12px;padding: 0 5px;border-radius: 3px;line-height: 14px;color: #3b94d6;border: 1px solid #3b94d6;}
/*模板buttons 20161013byLB*/
.btn{display: inline-block;border:none; padding:0 10px;color: #333;background: #e1e1e1; text-align:center;font-size: 12px; height: 30px;line-height: 30px;-webkit-border-radius: 3px;-moz-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; }
.btn:hover{background: #c3c3c3; color: #333;}
.btn-green{background: #60b25e; color: #fff;}
.btn-green:hover{background: #51a74f; color: #fff;}
.btn-blue{background: #3b94d6; color: #fff;}
.btn-blue:hover{background: #2788d0; color: #fff;}
.btn-orange{background:#ff7b33; color: #fff;}
.btn-orange:hover{background:#ee4a1f; color: #fff;}
.btn-line{display: inline-block;border:none; padding:0 10px;color: #333;background:#fff; border: 1px solid #d5d5d5; text-align:center;font-size: 12px; height: 30px;line-height: 30px;-webkit-border-radius: 3px;-moz-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; }
.btn-line:hover{background:#eee; }
.btn-line-green{border: 1px solid #51a74f; color: #51a74f;}
.btn-line-green:hover{ background: #51a74f; color: #fff;}
.btn-line-blue{border: 1px solid #2788d0; color: #2788d0;}
.btn-line-blue:hover{ background: #2788d0; color: #fff;}
.btn-line-orange{border: 1px solid #ee4a1f; color: #ee4a1f;}
.btn-line-orange:hover{ background: #ee4a1f; color: #fff;}
.btn-small{ padding: 0px 10px; font-size: 12px;line-height: 20px; background-image: linear-gradient(#fcfcfc, #eee); border: 1px solid #d5d5d5;-webkit-border-radius: 3px;-moz-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; color: #333;}
.btn-small:hover{background-image:linear-gradient(#ededed, #dddddd);}
.sub_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #707070; color:#000; border-radius:3px; padding:1px 10px; background:#dbdbdb;}
.sub_btn:hover{ background:#b5e2fa; color:#000; border:1px solid #3c7fb1;}
/*模板a标签按钮 20161013byLB*/
a.btn{display: inline-block;border:none; padding:0 10px;color: #333;background: #e1e1e1; text-align:center;font-size: 12px; height: 30px;line-height: 30px;-webkit-border-radius: 3px;-moz-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; }
a:hover.btn{background: #c3c3c3; color: #333;}
a.btn-green{background: #60b25e; color: #fff;}
a:hover.btn-green{background: #51a74f; color: #fff;}
a.btn-blue{background: #3b94d6; color: #fff;}
a:hover.btn-blue{background: #2788d0; color: #fff;}
a.btn-orange{background:#ff7b33; color: #fff;}
a:hover.btn-orange:hover{background:#ee4a1f; color: #fff;}
a.btn-line{display: inline-block;border:none; padding:0 10px;color: #333;background:#fff; border: 1px solid #d5d5d5; text-align:center;font-size: 12px; height: 30px;line-height: 30px;-webkit-border-radius: 3px;-moz-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; }
a:hover.btn-line{background:#eee; }
a.btn-line-green{border: 1px solid #51a74f; color: #51a74f;}
a:hover.btn-line-green{ background: #51a74f; color: #fff;}
a.btn-line-blue{border: 1px solid #2788d0; color: #2788d0;}
a:hover.btn-line-blue{ background: #2788d0; color: #fff;}
a.btn-line-orange{border: 1px solid #ee4a1f; color: #ee4a1f;}
a:hover.btn-line-orange{ background: #ee4a1f; color: #fff;}
a.btn-small{ padding: 0px 10px; font-size: 12px;line-height: 20px; background-image: linear-gradient(#fcfcfc, #eee); border: 1px solid #d5d5d5;-webkit-border-radius: 3px;-moz-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; color: #333;}
a:hover.btn-small{background-image:linear-gradient(#ededed, #dddddd);}
a.sub_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #707070; color:#000; border-radius:3px; padding:1px 10px; background:#dbdbdb;}
a:hover.sub_btn{ background:#b5e2fa; color:#000; border:1px solid #3c7fb1;}
/*模板form 20161013byLB*/
textarea.muban_textarea{ width: 98.5%;border:1px solid #ddd; background:#fff; color:#666; padding:5px;}

View File

@ -231,7 +231,7 @@ a.exit { height:24px; display:block; width:80px; color:#000000; background:#c3c3
.lh22{ line-height: 22px;}
/*上传资源弹出框样式*/
.popbox_polls{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;}
.popbox_polls{width:300px;height:100px;position:fixed !important;z-index:100;left:40%;top:40%;/*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;}
.upload_con h2{ display:block; background:#eaeaea; font-size:14px; color:#343333; height:31px; width: auto; margin-top:25px; padding-left:20px; padding-top:5px;}
.upload_box{ width:430px; margin:15px auto;}

View File

@ -726,6 +726,10 @@ a.hw_btn_blue{
}
a:hover.hw_btn_blue,a:active.hw_btn_blue{ background: #3b94d6; color:#fff;}
.sy_class_titbox{margin-bottom:5px; padding-top:10px; }
/*项目历史版本删除功能*/
.popup_ziyuan_title{ display: block; margin-left: 10px; text-align: left;width:360px; overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
/* 缺陷列表 */
.issues_greycirbg_btn{ background-color:#dedede; padding:1px 5px;-webkit-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px; }
.issues_greycirbg_btn:hover{background-color:#cbcbcb;}

View File

@ -565,8 +565,6 @@ a:hover.sy_class_ltitle{ color:#333;}
.hw_tab_hover a{ color:#60b25e !important; }
.hw_tab_nomal {border-bottom:none; }
.hw_tab_nomal a{ color:#333;}
.undis {display:none;}
.dis {display:block;}
.hw_more_box {position:absolute; width:24px; height:15px; right:15px; top:15px;}
.hw_more_box ul li:hover ul {display:block; }
.hw_more_icons {background:url(../images/hw/icons_hw.png) 0px -30px no-repeat; width:24px; height:15px; }