1、课程通知列表出现html代码

2、整理课程通知部分js
3、还原编辑器js代码
memcached_alan
sw 10 years ago
parent d192a564b4
commit 663c9aad60

@ -2,42 +2,23 @@
btn_tips = l(:label_news_notice) btn_tips = l(:label_news_notice)
label_tips = l(:label_course_news) label_tips = l(:label_course_news)
%> %>
<div class="project_r_h"> <div class="project_r_h">
<h2 class="project_h2"><%= label_tips %></h2> <h2 class="project_h2"><%= label_tips %></h2>
</div> </div>
<div class="talk_top"> <div class="talk_top">
<p class="fl"><%= l(:label_total_news) %><span><%= @news_count %></span><%= l(:label_course_news_count) %></p> <p class="fl">
<%= l(:label_total_news) %>
<span><%= @news_count %></span>
<%= l(:label_course_news_count) %>
</p>
<% if @course && User.current.allowed_to?(:manage_news, @course) %> <% if @course && User.current.allowed_to?(:manage_news, @course) %>
<%= link_to(btn_tips,new_course_news_path(@course), <%= link_to(btn_tips,new_course_news_path(@course),:class => 'problem_new_btn fl c_dorange')%>
:class => 'problem_new_btn fl c_dorange')%>
<div class="cl"></div> <div class="cl"></div>
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<!-- <%# if @course && User.current.allowed_to?(:manage_news, @course) %>
<%#= link_to(btn_tips, new_course_news_path(@course),
:class => 'icon icon-add',
:onclick => 'showAndScrollTo("add-news", "news_title"); return false;') %>
<div id="add-news" class="add_frame" style="display:none;">
<%#= labelled_form_for @news, :url => course_news_index_path(@course),
:html => {:id => 'news-form', :multipart => true} do |f| %>
<%#= render :partial => 'news/course_form', :locals => {:f => f, :is_new => true} %>
<%#= link_to l(:button_create), "#", :onclick => 'submitNews();', :onmouseover => 'submitFocus(this);', :class => 'ButtonColor m3p10' %>
<%#= preview_link preview_news_path, 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
<%#= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()', :class => 'ButtonColor m3p10' %>
<%# end if @course %>
<div id="preview" class="wiki"></div>
</div>
<%# end %>-->
<div> <div>
<% if @newss.empty? %> <% if @newss.empty? %>
<p class="nodata"> <p class="nodata">
@ -49,10 +30,20 @@
<%= link_to image_tag(url_to_avatar(news.author),:width => 42,:height => 42), user_path(news.author), :class => "problem_pic fl" %> <%= link_to image_tag(url_to_avatar(news.author),:width => 42,:height => 42), user_path(news.author), :class => "problem_pic fl" %>
<div class="problem_txt fl mt5"> <div class="problem_txt fl mt5">
<%= link_to_user_header(news.author,false,{:class=> 'problem_name c_orange fl'}) if news.respond_to?(:author) %> <%= link_to_user_header(news.author,false,{:class=> 'problem_name c_orange fl'}) if news.respond_to?(:author) %>
<span class="fl"> <%= l(:label_release_news) %></span><%= link_to h(news.title), news_path(news),:class => 'problem_tit fl fb c_dblue' %><br /> <span class="fl">
<%= l(:label_release_news) %>
</span>
<%= link_to h(news.title), news_path(news),:class => 'problem_tit fl fb c_dblue' %>
<br />
<div class="cl mb5"></div> <div class="cl mb5"></div>
<p id="news_description_<%= news.id %>" class="news_description mt5"><%= textAreailizable news.description %><br /> <%= l(:label_create_time) %> <%= format_time(news.created_on) %></p> <p id="news_description_<%= news.id %>" class="news_description mt5">
<div class="news_foot" style="display: none;" onclick="news_show_more_des(<%= news.id %>);" id="news_foot_<%= news.id %>"><%= l(:label_expend_information) %> <span class="g-arr-down"><img src="/images/jiantou.jpg" width="12" height="6" /></span></div> <%= news.description.html_safe %>
</p>
<div class="news_foot c_red" style="cursor:pointer;display: none;" onclick="news_show_more_des(<%= news.id %>);" id="news_foot_<%= news.id %>">
<%= l(:button_more)%>...
<span class="g-arr-down"></span>
</div>
<span class="fl"><%= l(:label_end_time)%><%= format_time(news.created_on)%></span>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div><!--problem_main end--> </div><!--problem_main end-->
@ -62,41 +53,11 @@
</div> </div>
<!--end--> <!--end-->
<ul class="wlist"> <ul class="wlist">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%> <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
</ul> </ul>
<% content_for :header_tags do %>
<%# other_formats_links do |f| %> <%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
<%#= f.link_to 'Atom', :url => {:course_id => @course, :key => User.current.rss_key} %> <%= stylesheet_link_tag 'scm' %>
<%# end %> <% end %>
<% html_title(l(:label_course_news)) -%>
<% content_for :header_tags do %>
<%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
<%= stylesheet_link_tag 'scm' %>
<% end %>
<% html_title(l(:label_course_news)) -%>
</div>
<script type='text/javascript'>
$(document).ready(function ($) {
$('.content-text-list').each(function () {
$(this).find('.delete_icon').hide();
$(this).mouseenter(function (event) {
$(this).find('.delete_icon').show();
});
$(this).mouseleave(function (event) {
$(this).find('.delete_icon').hide();
});
});
});
$(function(){
$('.news_description').each(function () {
if($(this).height() >= 38)
{
$('#news_foot_'+$(this).attr('id').replace('news_description_','')).css("display","block");
}
}
)
});
</script>

@ -4922,7 +4922,7 @@ KEditor.prototype = {
editDiv = K('.edit', container), editDiv = K('.edit', container),
statusbar = self.statusbar = K('.statusbar', container); statusbar = self.statusbar = K('.statusbar', container);
container.removeClass('container') container.removeClass('container')
.addClass('ke-container ml56 ke-container-' + self.themeType).css('width', width); .addClass('ke-container ke-container-' + self.themeType).css('width', width);
if (fullscreenMode) { if (fullscreenMode) {
container.css({ container.css({
position : 'absolute', position : 'absolute',

@ -4917,7 +4917,7 @@ KEditor.prototype = {
editDiv = K('.edit', container), editDiv = K('.edit', container),
statusbar = self.statusbar = K('.statusbar', container); statusbar = self.statusbar = K('.statusbar', container);
container.removeClass('container') container.removeClass('container')
.addClass('ke-container ml56 ke-container-' + self.themeType).css('width', width); .addClass('ke-container ke-container-' + self.themeType).css('width', width);
if (fullscreenMode) { if (fullscreenMode) {
container.css({ container.css({
position : 'absolute', position : 'absolute',

@ -411,8 +411,20 @@ function regexDeadLine()
('#ui-datepicker-div').hide; ('#ui-datepicker-div').hide;
} }
//新建、修改课程明码显示
$(function(){ $(function(){
$("#psw_btn").click(function() { $("#psw_btn").click(function() {
alert("密码: "+$("#course_course_password").val()); alert("密码: "+$("#course_course_password").val());
}); });
}); });
//课程通知更多按钮显示
$(function(){
$('.news_description').each(function () {
if($(this).height() >= 38)
{
$('#news_foot_'+$(this).attr('id').replace('news_description_','')).css("display","block");
}
}
)
});

Loading…
Cancel
Save