34 lines
1.3 KiB
Plaintext
34 lines
1.3 KiB
Plaintext
|
<script type="text/javascript">
|
||
|
$(function(){
|
||
|
$("#RSide").removeAttr("id");
|
||
|
$("#Container").css("width","1000px");
|
||
|
});
|
||
|
function reset_news(){
|
||
|
$("#news_title").val("");
|
||
|
$("#title_notice_span").text("");
|
||
|
$("#description_notice_span").text("");
|
||
|
document.getElementById("news_sticky").checked=false;
|
||
|
$("#news_attachments").html("<%= escape_javascript(render :partial => 'attachments/new_form', :locals => {:container => News.new})%>");
|
||
|
news_description_editor.html("");
|
||
|
$("#news_editor").toggle();
|
||
|
}
|
||
|
<% if @is_new%>
|
||
|
$(function(){
|
||
|
$("#news_title").focus();
|
||
|
});
|
||
|
<%end%>
|
||
|
</script>
|
||
|
<div class="homepageRight mt0 ml10">
|
||
|
<div class="homepageRightBanner">
|
||
|
<div class="NewsBannerName">
|
||
|
班级通知
|
||
|
</div>
|
||
|
</div>
|
||
|
<% if @course && User.current.allowed_to?(:manage_news, @course) %>
|
||
|
<%= labelled_form_for @news, :url =>{:controller=>'news',:action => 'new', :course_id => @course.id},
|
||
|
:html => {:nhname=>'form',:multipart => true, :id => 'news-form'} do |f| %>
|
||
|
<%= render :partial => 'course_news_new', :locals => {:f => f, :news => @news, :edit_mode => false, :course => @course} %>
|
||
|
<% end %>
|
||
|
<% end %>
|
||
|
<%= render :partial=> 'course_news_detail',:locals =>{:newss => @newss, :page => 0} %>
|
||
|
</div>
|