班级资源的延期发布精确到小时、班级、项目资源上传弹框改版
This commit is contained in:
parent
f0a94302a0
commit
0b510df8b1
|
@ -119,7 +119,7 @@ class FilesController < ApplicationController
|
|||
@file.publish_time = params[:publish_time]
|
||||
end
|
||||
end
|
||||
if @file.publish_time > Date.today
|
||||
if @file.publish_time > Time.now
|
||||
@file.is_publish = 0
|
||||
else
|
||||
@file.is_publish = 1
|
||||
|
@ -588,15 +588,13 @@ class FilesController < ApplicationController
|
|||
attachments[:files].each do |attachment|
|
||||
if params[:publish_time]
|
||||
if params[:publish_time] == ""
|
||||
attachment.publish_time = Date.today
|
||||
attachment.publish_time = Time.now
|
||||
else
|
||||
attachment.publish_time = params[:publish_time]
|
||||
attachment.is_publish = 0
|
||||
end
|
||||
else
|
||||
attachment.publish_time = Date.today
|
||||
end
|
||||
if attachment.publish_time > Date.today
|
||||
attachment.is_publish = 0
|
||||
attachment.publish_time = Time.now
|
||||
end
|
||||
attachment.description = params[:description]
|
||||
attachment.save
|
||||
|
|
|
@ -1,38 +1,41 @@
|
|||
<script src="/javascripts/i18n/jquery.ui.datepicker-zh-CN.js" type="text/javascript"></script>
|
||||
<span class="uploadText mb10" style="margin-top: -20px;">发布设置</span>
|
||||
<!--<div class="resourcePopupClose"> <a href="javascript:void(0);" class="resourceClose"></a></div>-->
|
||||
<%= form_tag(republish_file_course_file_path(@course,@file), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %>
|
||||
<div class="mb10">
|
||||
<script src="/javascripts/jquery.datetimepicker.js" type="text/javascript"></script>
|
||||
<div id="muban_popup_box" style="width:300px;">
|
||||
<div class="muban_popup_top">
|
||||
<h3 class="fl">发布设置</h3>
|
||||
<a href="javascript:void(0);" class="muban_icons_close fr" onclick="$('#datetimepicker_mask').datetimepicker('destroy');"></a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<div class="muban_popup_con clear mt15" style="margin-left: 47px;">
|
||||
<%= form_tag(republish_file_course_file_path(@course,@file), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %>
|
||||
<div class="mb10">
|
||||
<label class="fl c_dark f14" style="margin-top: 4px;">延期发布:</label>
|
||||
<div class="calendar_div fl">
|
||||
<input type="text" name="publish_time" id="attachment_publish_time" placeholder="发布日期" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%=@file.publish_time %>">
|
||||
<input type="text" name="publish_time" id="datetimepicker_mask" placeholder="发布时间" style="width: 130px;" class="InputBox fl calendar_input" value="<%=format_time(@file.publish_time) %>">
|
||||
<%#= calendar_for('attachment_publish_time')%>
|
||||
</div>
|
||||
<span class="fl c_red" style="margin-top: 4px;" id="publish_time_notice"></span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<!--<div class="mt15"> <span class="f14 fontGrey3 mr10">延期发布:</span>
|
||||
<input type="text" name="" placeholder="请输入0-50数值" class="markInput" />
|
||||
</div>-->
|
||||
<div>
|
||||
<div class="courseSendSubmit"><a href="javascript:void(0);" onclick="submit_republish_file()" class="sendSourceText" id="submit_file">确定</a></div>
|
||||
<div class="courseSendCancel"><a href="javascript:void(0);" onclick="hideModal()" class="sendSourceText linkGrey6">取消</a></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<a href="javascript:void(0);" class="fr sy_btn_blue" style="margin-right: 95px;" id="submit_file" onclick="submit_republish_file();">确定</a>
|
||||
<a href="javascript:void(0);" class="fr sy_btn_grey mr5" onclick="$('#datetimepicker_mask').datetimepicker('destroy');hideModal();">取消</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<script>
|
||||
function regex_publish_time()
|
||||
{
|
||||
var myDate = new Date();
|
||||
if($.trim($("#attachment_publish_time").val()) == "")
|
||||
if($.trim($("#datetimepicker_mask").val()) == "")
|
||||
{
|
||||
$("#publish_time_notice").text("发布日期不能为空");
|
||||
$("#publish_time_notice").text("发布时间不能为空");
|
||||
return false;
|
||||
} else{
|
||||
var publish_time = Date.parse($("#attachment_publish_time").val());
|
||||
if(Date.parse(formate_date(myDate)) > publish_time)
|
||||
var publish_time = Date.parse($("#datetimepicker_mask").val());
|
||||
if(Date.parse(formate_time(myDate)) > publish_time)
|
||||
{
|
||||
$("#publish_time_notice").text("发布日期不能小于当前日期");
|
||||
$("#publish_time_notice").text("发布时间不能小于当前时间");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
@ -45,11 +48,17 @@
|
|||
function submit_republish_file()
|
||||
{
|
||||
if(regex_publish_time()) {
|
||||
$('#submit_file').parent().parent().submit();
|
||||
$('#submit_file').parent().submit();
|
||||
}
|
||||
}
|
||||
$(function(){
|
||||
var datepickerOptions={dateFormat: 'yy-mm-dd', firstDay: 0, showOn: 'button', buttonImageOnly: true, buttonImage: '/images/public_icon.png', showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true};
|
||||
$('#attachment_publish_time').datepicker(datepickerOptions);
|
||||
$('#datetimepicker_mask').datetimepicker({
|
||||
allowBlank:true,
|
||||
lang:'ch',
|
||||
format:'Y-m-d H:i',
|
||||
formatTime:'H:i',
|
||||
formatDate:'Y-m-d',
|
||||
validateOnBlur:false
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -1,6 +1,6 @@
|
|||
<span class="add_attachment" data-containerid="<%= container.id %>">
|
||||
<% checkBox = (@course.present? && @course.is_public?) ? 'public' : 'private'%>
|
||||
<button name="button" class="sub_btn" onclick="_file<%=container.id %>.click()" onmouseover="this.focus()" style="<%= ie8? ? 'display:none' : ''%>" type="button" ><%= l(:label_browse) %></button>
|
||||
<button name="button" class="sub_btn" onclick="_file<%=container.id %>.click()" onmouseover="this.focus()" style="<%= ie8? ? 'display:none' : ''%>" type="button" >文件浏览</button>
|
||||
<%= file_field_tag 'attachments[dummy][file]',
|
||||
:id => "_file#{container.id}",
|
||||
:class => ie8? ? '':'file_selector',
|
||||
|
@ -26,8 +26,7 @@
|
|||
<span id="upload_file_count<%=container.id %>">
|
||||
<%= l(:label_no_file_uploaded)%>
|
||||
</span>
|
||||
(<%= l(:label_max_size) %>:
|
||||
<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
|
||||
<span class="fr c_blue" style="margin-right: <%= container.class.to_s == 'Course' ? 58 : 45 %>px;">单个文件最大限制:<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %></span>
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<span id="attachments_fields<%= container.id %>" data-containerid="<%= container.id %>" xmlns="http://www.w3.org/1999/html">
|
||||
|
|
|
@ -41,12 +41,8 @@
|
|||
|
||||
function project_files_upload()
|
||||
{
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/upload_project_files',:locals => {:project => @project, :project_attachment_type => 1}) %>');
|
||||
showModal('ajax-modal', '513px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal()' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
|
||||
$('#ajax-modal').parent().css("top","40%").css("left","36%").css("border","3px solid #269ac9");
|
||||
$('#ajax-modal').parent().addClass("popbox_polls");
|
||||
var htmlvalue = '<%= escape_javascript(render :partial => 'files/upload_project_files',:locals => {:project => @project,:project_attachment_type => 1}) %>';
|
||||
pop_box_new(htmlvalue, 450, 275);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<%end %>
|
||||
</span>
|
||||
<% if file.is_publish == 0 %>
|
||||
<span class="grey_homework_btn_cir ml5"><%=file.publish_time %> 0点发布</span>
|
||||
<span class="grey_homework_btn_cir ml5"><%= format_time file.publish_time %>点发布</span>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="mt5">
|
||||
|
|
|
@ -1,49 +1,74 @@
|
|||
<script src="/javascripts/i18n/jquery.ui.datepicker-zh-CN.js" type="text/javascript"></script>
|
||||
<div id="popbox_upload" class="mb10" style="margin-top: -30px;color:#15bccf; font-size:16px;">
|
||||
<div class="upload_con">
|
||||
<h2 style="text-align: center"><%= l(:label_upload_files)%></h2>
|
||||
<div class="upload_box">
|
||||
<script src="/javascripts/jquery.datetimepicker.js" type="text/javascript"></script>
|
||||
<div id="muban_popup_box" style="width:450px;">
|
||||
<div class="muban_popup_top">
|
||||
<h3 class="fl">上传资源</h3>
|
||||
<a href="javascript:void(0);" class="muban_icons_close fr" onclick="$('#datetimepicker_mask').datetimepicker('destroy');"></a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<div class="muban_popup_con clear mt15 ml55">
|
||||
<div class="">
|
||||
<%= error_messages_for 'attachment' %>
|
||||
<div id="network_issue" style="color: red; display: none;"><%= l(:label_file_upload_error_messages)%></div>
|
||||
|
||||
<%= form_tag(course_files_path(course), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %>
|
||||
<input type="hidden" name="in_course_toolbar" value="Y">
|
||||
<!--<p class="c_grey fr mt10 mr5">-->
|
||||
<div class="c_dark">
|
||||
<input name="course_attachment_type[]" type="checkbox" value="1" checked class="c_dark" >课件</input> <span class="c_grey">|</span>
|
||||
<input name="course_attachment_type[]" type="checkbox" value="2" class="c_dblue">软件</input> <span class="c_grey">|</span>
|
||||
<input name="course_attachment_type[]" type="checkbox" value="3" class="c_dblue">媒体</input> <span class="c_grey">|</span>
|
||||
<input name="course_attachment_type[]" type="checkbox" value="4" class="c_dblue">代码</input> <span class="c_grey">|</span>
|
||||
<input name="course_attachment_type[]" type="checkbox" value="6" class="c_dblue">论文</input> <span class="c_grey">|</span>
|
||||
<input name="course_attachment_type[]" type="checkbox" value="5" class="c_dblue">其他</input></a>
|
||||
</div>
|
||||
<ul class="c_dark mt10 mb10 f14 attachment_type_ul">
|
||||
<li class="fl">
|
||||
<input id="atta_type_1" name="course_attachment_type[]" type="checkbox" value="1" checked class="fl" />
|
||||
<label for="atta_type_1" class="c_grey fl ml5">课件 | </label>
|
||||
</li>
|
||||
<li class="fl">
|
||||
<input id="atta_type_2" name="course_attachment_type[]" type="checkbox" value="2" class="fl"/>
|
||||
<label for="atta_type_2" class="c_grey fl ml5">软件 | </label>
|
||||
</li>
|
||||
<li class="fl">
|
||||
<input id="atta_type_3" name="course_attachment_type[]" type="checkbox" value="3" class="fl"/>
|
||||
<label for="atta_type_3" class="c_grey fl ml5">媒体 | </label>
|
||||
</li>
|
||||
<li class="fl">
|
||||
<input id="atta_type_4" name="course_attachment_type[]" type="checkbox" value="4" class="fl"/>
|
||||
<label for="atta_type_4" class="c_grey fl ml5">代码 | </label>
|
||||
</li>
|
||||
<li class="fl">
|
||||
<input id="atta_type_5" name="course_attachment_type[]" type="checkbox" value="5" class="fl"/>
|
||||
<label for="atta_type_5" class="c_grey fl ml5">论文 | </label>
|
||||
</li>
|
||||
<li class="fl">
|
||||
<input id="atta_type_6" name="course_attachment_type[]" type="checkbox" value="6" class="fl"/>
|
||||
<label for="atta_type_6" class="c_grey fl ml5">其他</label>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<div class="mb10">
|
||||
<%= render :partial => 'files/new_style_attachment_list',:locals => {:container => course} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="mb5">
|
||||
|
||||
<% if User.current.allowed_to?(:as_teacher,course) %>
|
||||
<div class="mb10">
|
||||
<label class="fl c_dark f14" style="margin-top: 4px;">延期发布:</label>
|
||||
<div class="calendar_div fl ml10">
|
||||
<input type="text" name="publish_time" id="datetimepicker_mask" placeholder="发布时间(可选)" style="width: 130px;" class="InputBox fl calendar_input" readonly="readonly">
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<span class="c_red f12" style="margin-top: 4px;" id="publish_time_notice"></span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="mb10">
|
||||
<label class="fl c_dark f14" style="margin-top: 4px;">附件描述:</label>
|
||||
<div class="fl">
|
||||
<input type="text" name="description" placeholder="文件描述" class="InputBox fl W160">
|
||||
<div class="fl ml10">
|
||||
<textarea name="description" placeholder="介绍一下您的资源,让它得到更多人的青睐吧~" style="width: 249px; height: 60px; font-size: 12px;" class="InputBox fl"></textarea>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<% if User.current.allowed_to?(:as_teacher,course) %>
|
||||
<div class="mb5">
|
||||
<label class="fl c_dark f14" style="margin-top: 4px;">延期发布:</label>
|
||||
<div class="calendar_div fl">
|
||||
<input type="text" name="publish_time" id="attachment_publish_time" placeholder="发布日期(可选)" class="InputBox fl W120 calendar_input" readonly="readonly">
|
||||
<%#= calendar_for('attachment_publish_time')%>
|
||||
</div>
|
||||
<span class="fl c_red f12" style="margin-top: 4px;" id="publish_time_notice"></span>
|
||||
<a href="javascript:void(0);" class="fr sy_btn_blue" style="margin-right: 59px;" id="submit_resource" onclick="submit_course_resource();">确定</a>
|
||||
<a href="javascript:void(0);" class="fr sy_btn_grey mr5" onclick="$('#datetimepicker_mask').datetimepicker('destroy');hideModal();">取消</a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<a href="javascript:void(0);" class=" fr courseSendCancel mr40" onclick="hideModal();"><%= l(:button_cancel)%></a>
|
||||
<a id="submit_resource" href="javascript:void(0);" class="c_white courseSendSubmit fr" onclick="submit_course_resource();"><%= l(:button_confirm)%></a>
|
||||
<%#= submit_tag '确定',:onclick=>'submit_course_resource();',:onfocus=>'this.blur()',:id=>'submit_resource',:class=>'sendSourceText fr' %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
@ -57,16 +82,15 @@
|
|||
function regex_publish_time()
|
||||
{
|
||||
var myDate = new Date();
|
||||
if($.trim($("#attachment_publish_time").val()) == "")
|
||||
if($.trim($("#datetimepicker_mask").val()) == "")
|
||||
{
|
||||
return true;
|
||||
} else{
|
||||
var publish_time = Date.parse($("#attachment_publish_time").val());
|
||||
if(Date.parse(formate_date(myDate)) > publish_time)
|
||||
var publish_time = Date.parse($("#datetimepicker_mask").val());
|
||||
if(Date.parse(formate_time(myDate)) > publish_time)
|
||||
{
|
||||
$("#publish_time_notice").text("发布日期不能小于当前日期");
|
||||
$("#publish_time_notice").text("发布时间不能小于当前时间");
|
||||
return false;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -86,7 +110,13 @@
|
|||
<% end %>
|
||||
}
|
||||
$(function(){
|
||||
var datepickerOptions={dateFormat: 'yy-mm-dd', firstDay: 0, showOn: 'button', buttonImageOnly: true, buttonImage: '/images/public_icon.png', showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true};
|
||||
$('#attachment_publish_time').datepicker(datepickerOptions);
|
||||
$('#datetimepicker_mask').datetimepicker({
|
||||
allowBlank:true,
|
||||
lang:'ch',
|
||||
format:'Y-m-d H:i',
|
||||
formatTime:'H:i',
|
||||
formatDate:'Y-m-d',
|
||||
validateOnBlur:false
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -1,38 +1,61 @@
|
|||
<div id="muban_popup_box" style="width:450px;">
|
||||
<div class="muban_popup_top">
|
||||
<h3 class="fl">上传资源</h3>
|
||||
<a href="javascript:void(0);" class="muban_icons_close fr"></a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<div id="popbox_upload" class="mb10" style="margin-top: -30px;color:#15bccf; font-size:16px;">
|
||||
<div class="upload_con">
|
||||
<h2 style="text-align: center"><%= l(:label_upload_files)%></h2>
|
||||
<div class="upload_box">
|
||||
<div class="muban_popup_con clear mt15 ml40">
|
||||
<div class="">
|
||||
<%= error_messages_for 'attachment' %>
|
||||
<div id="network_issue" style="color: red; display: none;"><%= l(:label_file_upload_error_messages)%></div>
|
||||
|
||||
<%= form_tag(project_files_path(project), :multipart => true, :remote => !ie8?, :name=>"upload_form") do %>
|
||||
<input type="hidden" name="in_project_toolbar" value="Y">
|
||||
<!--<p class="c_grey fr mt10 mr5">-->
|
||||
<div class="c_dark">
|
||||
<input name="project_attachment_type[]" type="checkbox" value="1" checked class="c_dblue">软件版本</input> <span class="c_grey">|</span>
|
||||
<input name="project_attachment_type[]" type="checkbox" value="2" class="c_dblue">文档</input> <span class="c_grey">|</span>
|
||||
<input name="project_attachment_type[]" type="checkbox" value="3" class="c_dblue">代码</input> <span class="c_grey">|</span>
|
||||
<input name="project_attachment_type[]" type="checkbox" value="4" class="c_dblue">媒体</input> <span class="c_grey">|</span>
|
||||
<input name="project_attachment_type[]" type="checkbox" value="5" class="c_dblue">论文</input> <span class="c_grey">|</span>
|
||||
<input name="project_attachment_type[]" type="checkbox" value="6" class="c_dblue">其他</input></a>
|
||||
</div>
|
||||
<ul class="c_dark mt10 mb10 f14 attachment_type_ul">
|
||||
<li class="fl">
|
||||
<input id="atta_type_1" name="project_attachment_type[]" type="checkbox" value="1" checked class="fl" />
|
||||
<label for="atta_type_1" class="c_grey fl ml5">软件版本 | </label>
|
||||
</li>
|
||||
<li class="fl">
|
||||
<input id="atta_type_2" name="project_attachment_type[]" type="checkbox" value="2" class="fl"/>
|
||||
<label for="atta_type_2" class="c_grey fl ml5">文档 | </label>
|
||||
</li>
|
||||
<li class="fl">
|
||||
<input id="atta_type_3" name="project_attachment_type[]" type="checkbox" value="3" class="fl"/>
|
||||
<label for="atta_type_3" class="c_grey fl ml5">代码 | </label>
|
||||
</li>
|
||||
<li class="fl">
|
||||
<input id="atta_type_4" name="project_attachment_type[]" type="checkbox" value="4" class="fl"/>
|
||||
<label for="atta_type_4" class="c_grey fl ml5">媒体 | </label>
|
||||
</li>
|
||||
<li class="fl">
|
||||
<input id="atta_type_5" name="project_attachment_type[]" type="checkbox" value="5" class="fl"/>
|
||||
<label for="atta_type_5" class="c_grey fl ml5">论文 | </label>
|
||||
</li>
|
||||
<li class="fl">
|
||||
<input id="atta_type_6" name="project_attachment_type[]" type="checkbox" value="6" class="fl"/>
|
||||
<label for="atta_type_6" class="c_grey fl ml5">其他</label>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<div class="mb10">
|
||||
<%= render :partial => 'files/new_style_attachment_list',:locals => {:container => project} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="mb5">
|
||||
<label class="fl c_dark f14" style="margin-top: 4px;">文件描述:</label>
|
||||
<div class="fl">
|
||||
<input type="text" name="description" placeholder="文件描述" class="InputBox fl W160">
|
||||
|
||||
<div class="mb10">
|
||||
<label class="fl c_dark f14" style="margin-top: 4px;">附件描述:</label>
|
||||
<div class="fl ml10">
|
||||
<textarea name="description" placeholder="介绍一下您的资源,让它得到更多人的青睐吧~" style="width: 276px; height: 60px; font-size: 12px;" class="InputBox fl"></textarea>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<a href="javascript:void(0);" class="fr grey_btn mr40 f14 ml10" onclick="hideModal();"><%= l(:button_cancel)%></a>
|
||||
<!--<a id="submit_resource" href="javascript:void(0);" class="blue_btn fr" onclick="submit_resource();"><%#= l(:button_confirm)%></a>-->
|
||||
<%= submit_tag '确定',:onclick=>'submit_resource();', :onfocus=>'this.blur()', :id=>'submit_resource', :class=>'sendSourceText fr' %>
|
||||
<a href="javascript:void(0);" class="fr sy_btn_blue" style="margin-right: 47px;" id="submit_resource" onclick="submit_resource();" onfocus="this.blur()">确定</a>
|
||||
<a href="javascript:void(0);" class="fr sy_btn_grey mr5" onclick="hideModal();">取消</a>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,9 +1,2 @@
|
|||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/hidden_file',:locals => {:course => @course,:course_attachment_type => 1}) %>');
|
||||
showModal('ajax-modal', '311px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal()' style='margin-left: 290px;' class='resourceClose'></a>");
|
||||
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
|
||||
$('#ajax-modal').parent().addClass("popbox_polls").removeClass("resourceUploadPopup popbox");
|
||||
//与更新版本弹窗js冲突新增样式代码
|
||||
$('#ajax-modal').parent().css({"border":"3px solid #269ac9", "padding":"4px"});
|
||||
$('#ajax-modal').css({"padding":"","min-height":""});
|
||||
var htmlvalue = '<%= escape_javascript(render :partial => 'files/hidden_file',:locals => {:course => @course,:course_attachment_type => 1}) %>';
|
||||
pop_box_new(htmlvalue, 300, 140);
|
|
@ -243,15 +243,8 @@
|
|||
});
|
||||
//资源库上传附件
|
||||
function course_files_upload(){
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/upload_course_files',:locals => {:course => @course,:course_attachment_type => 1}) %>');
|
||||
showModal('ajax-modal', '513px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal()' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
|
||||
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
|
||||
$('#ajax-modal').parent().addClass("popbox_polls");
|
||||
//与更新版本弹窗js冲突新增样式代码
|
||||
$('#ajax-modal').parent().css({"border":"3px solid #269ac9", "padding":"4px"});
|
||||
$('#ajax-modal').css("padding","");
|
||||
var htmlvalue = '<%= escape_javascript(render :partial => 'files/upload_course_files',:locals => {:course => @course,:course_attachment_type => 1}) %>';
|
||||
pop_box_new(htmlvalue, 450, 275);
|
||||
}
|
||||
// 鼠标经过的时候显示内容
|
||||
function message_titile_show(obj,e)
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
class ChangeAttachmentColumn < ActiveRecord::Migration
|
||||
def up
|
||||
change_column :attachments, :publish_time, :datetime
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
94
db/schema.rb
94
db/schema.rb
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20170120021457) do
|
||||
ActiveRecord::Schema.define(:version => 20170207060207) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -196,7 +196,7 @@ ActiveRecord::Schema.define(:version => 20170120021457) do
|
|||
t.integer "copy_from"
|
||||
t.integer "quotes"
|
||||
t.integer "is_publish", :default => 1
|
||||
t.date "publish_time"
|
||||
t.datetime "publish_time"
|
||||
end
|
||||
|
||||
add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id"
|
||||
|
@ -358,6 +358,8 @@ ActiveRecord::Schema.define(:version => 20170120021457) do
|
|||
t.date "commit_date"
|
||||
t.string "scmid"
|
||||
t.integer "user_id"
|
||||
t.integer "project_id"
|
||||
t.integer "type", :default => 0
|
||||
end
|
||||
|
||||
add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on"
|
||||
|
@ -519,6 +521,13 @@ ActiveRecord::Schema.define(:version => 20170120021457) do
|
|||
add_index "contest_messages", ["contest_id"], :name => "index_contest_messages_on_contest_id"
|
||||
add_index "contest_messages", ["user_id"], :name => "index_contest_messages_on_user_id"
|
||||
|
||||
create_table "contest_notifications", :force => true do |t|
|
||||
t.text "title"
|
||||
t.text "content"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "contestant_for_contests", :force => true do |t|
|
||||
t.integer "student_id"
|
||||
t.integer "contest_id"
|
||||
|
@ -586,6 +595,37 @@ ActiveRecord::Schema.define(:version => 20170120021457) do
|
|||
add_index "contestant_works", ["user_id"], :name => "index_contestant_works_on_user_id"
|
||||
add_index "contestant_works", ["work_id"], :name => "index_contestant_works_on_work_id"
|
||||
|
||||
create_table "contesting_projects", :force => true do |t|
|
||||
t.integer "project_id"
|
||||
t.string "contest_id"
|
||||
t.integer "user_id"
|
||||
t.string "description"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.string "reward"
|
||||
end
|
||||
|
||||
create_table "contesting_softapplications", :force => true do |t|
|
||||
t.integer "softapplication_id"
|
||||
t.integer "contest_id"
|
||||
t.integer "user_id"
|
||||
t.string "description"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.string "reward"
|
||||
end
|
||||
|
||||
create_table "contestnotifications", :force => true do |t|
|
||||
t.integer "contest_id"
|
||||
t.string "title"
|
||||
t.string "summary"
|
||||
t.text "description"
|
||||
t.integer "author_id"
|
||||
t.integer "notificationcomments_count"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "contests", :force => true do |t|
|
||||
t.integer "user_id"
|
||||
t.string "name"
|
||||
|
@ -628,20 +668,6 @@ ActiveRecord::Schema.define(:version => 20170120021457) do
|
|||
t.integer "container_id", :default => 0
|
||||
end
|
||||
|
||||
create_table "course_class_post", :id => false, :force => true do |t|
|
||||
t.integer "班级id", :default => 0, :null => false
|
||||
t.string "班级名"
|
||||
t.integer "帖子id", :default => 0, :null => false
|
||||
t.integer "主贴id"
|
||||
t.string "帖子标题", :default => "", :null => false
|
||||
t.text "帖子内容"
|
||||
t.integer "帖子用户id"
|
||||
t.integer "帖子回复数", :default => 0, :null => false
|
||||
t.integer "最后回帖id"
|
||||
t.datetime "发帖时间", :null => false
|
||||
t.datetime "帖子更新时间", :null => false
|
||||
end
|
||||
|
||||
create_table "course_contributor_scores", :force => true do |t|
|
||||
t.integer "course_id"
|
||||
t.integer "user_id"
|
||||
|
@ -669,21 +695,6 @@ ActiveRecord::Schema.define(:version => 20170120021457) do
|
|||
|
||||
add_index "course_groups", ["course_id"], :name => "index_course_groups_on_course_id"
|
||||
|
||||
create_table "course_homework_statistics", :force => true do |t|
|
||||
t.integer "user_id"
|
||||
t.integer "course_id"
|
||||
t.integer "committed_work_num", :default => 0
|
||||
t.integer "un_commit_work_num", :default => 0
|
||||
t.integer "late_commit_work_num", :default => 0
|
||||
t.integer "absence_evaluation_work_num", :default => 0
|
||||
t.integer "un_evaluation_work_num", :default => 0
|
||||
t.integer "appeal_num", :default => 0
|
||||
t.float "average_score", :default => 0.0
|
||||
t.float "total_score", :default => 0.0
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "course_infos", :force => true do |t|
|
||||
t.integer "course_id"
|
||||
t.integer "user_id"
|
||||
|
@ -832,6 +843,21 @@ ActiveRecord::Schema.define(:version => 20170120021457) do
|
|||
|
||||
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
|
||||
|
||||
create_table "delayed_jobs_20161218", :id => false, :force => true do |t|
|
||||
t.integer "id", :default => 0, :null => false
|
||||
t.integer "priority", :default => 0, :null => false
|
||||
t.integer "attempts", :default => 0, :null => false
|
||||
t.text "handler", :null => false
|
||||
t.text "last_error"
|
||||
t.datetime "run_at"
|
||||
t.datetime "locked_at"
|
||||
t.datetime "failed_at"
|
||||
t.string "locked_by"
|
||||
t.string "queue"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "discuss_demos", :force => true do |t|
|
||||
t.string "title"
|
||||
t.text "body"
|
||||
|
@ -962,8 +988,6 @@ ActiveRecord::Schema.define(:version => 20170120021457) do
|
|||
t.datetime "publish_time"
|
||||
t.datetime "end_time"
|
||||
t.integer "show_result"
|
||||
t.integer "question_random", :default => 0
|
||||
t.integer "choice_random", :default => 0
|
||||
end
|
||||
|
||||
create_table "first_pages", :force => true do |t|
|
||||
|
@ -1153,6 +1177,10 @@ ActiveRecord::Schema.define(:version => 20170120021457) do
|
|||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "innodb_monitor", :id => false, :force => true do |t|
|
||||
t.integer "a"
|
||||
end
|
||||
|
||||
create_table "invite_lists", :force => true do |t|
|
||||
t.integer "project_id"
|
||||
t.integer "user_id"
|
||||
|
|
|
@ -842,6 +842,23 @@ function formate_date(date){
|
|||
return str;
|
||||
}
|
||||
|
||||
function formate_time(time){
|
||||
var str = "";
|
||||
var year = time.getFullYear();
|
||||
var month = time.getMonth() + 1;
|
||||
var day = time.getDate();
|
||||
var hour = time.getHours();
|
||||
var min = time.getMinutes();
|
||||
if(month < 10) {
|
||||
month = '0' + month;
|
||||
}
|
||||
if(day < 10) {
|
||||
day = '0' + day;
|
||||
}
|
||||
str = year + '-' + month + '-' + day + ' ' + hour + ':' + min;
|
||||
return str;
|
||||
}
|
||||
|
||||
//验证发送到课程
|
||||
function regex_course_id(){
|
||||
var course_id = $("#course_id").val();
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -179,6 +179,23 @@ function formate_date(date){
|
|||
return str;
|
||||
}
|
||||
|
||||
function formate_time(time){
|
||||
var str = "";
|
||||
var year = time.getFullYear();
|
||||
var month = time.getMonth() + 1;
|
||||
var day = time.getDate();
|
||||
var hour = time.getHours();
|
||||
var min = time.getMinutes();
|
||||
if(month < 10) {
|
||||
month = '0' + month;
|
||||
}
|
||||
if(day < 10) {
|
||||
day = '0' + day;
|
||||
}
|
||||
str = year + '-' + month + '-' + day + ' ' + hour + ':' + min;
|
||||
return str;
|
||||
}
|
||||
|
||||
//验证发送到课程
|
||||
function regex_course_id(){
|
||||
var course_id = $("#course_id").val();
|
||||
|
|
|
@ -7,7 +7,6 @@ a:hover.muban_icons_close{background: url(/images/sy/sy_icons_close.png) -40px 0
|
|||
#muban_popup_box input,#muban_popup_box select{ border:1px solid #c8c8c8; height: 28px; color: #888;}
|
||||
#muban_popup_box label.pop_box_label{width: 100px; text-align: right; display: inline-block;}
|
||||
input.radio-width90{ width: 90px; }
|
||||
#muban_popup_box input,#muban_popup_box select{ border:1px solid #c8c8c8; height: 28px; color: #888;}
|
||||
#muban_popup_box label.pop_box_label_l {width: 100px; text-align: left; display: inline-block;}
|
||||
/*模板表格 20161013byLB*/
|
||||
.muban_table{ width:100%; background:#fff; border:1px solid #e5e5e5; border-bottom: none; }
|
||||
|
|
|
@ -938,3 +938,5 @@ a.syllabusbox_a_blue{ color:#3b94d6;}
|
|||
._notice_box{border:solid 1px #f6d0b1; background:#fff9e9; padding:4px; color:#ee4a20;}
|
||||
/*针对名字过长的用户定义公共样式*/
|
||||
.user_hiddent{width: 55px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;display: inline-block;}
|
||||
|
||||
.attachment_type_ul li label{line-height: 28px;}
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue