From 663c9aad600ba9b3b73b20ff9df7f442ed71c075 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Wed, 8 Apr 2015 15:01:41 +0800
Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E8=AF=BE=E7=A8=8B=E9=80=9A=E7=9F=A5?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E5=87=BA=E7=8E=B0html=E4=BB=A3=E7=A0=81=202?=
=?UTF-8?q?=E3=80=81=E6=95=B4=E7=90=86=E8=AF=BE=E7=A8=8B=E9=80=9A=E7=9F=A5?=
=?UTF-8?q?=E9=83=A8=E5=88=86js=203=E3=80=81=E8=BF=98=E5=8E=9F=E7=BC=96?=
=?UTF-8?q?=E8=BE=91=E5=99=A8js=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/news/_course_news.html.erb | 93 ++++++-------------
.../javascripts/kindeditor/kindeditor.js | 2 +-
public/assets/kindeditor/kindeditor.js | 2 +-
public/javascripts/course.js | 12 +++
4 files changed, 41 insertions(+), 68 deletions(-)
diff --git a/app/views/news/_course_news.html.erb b/app/views/news/_course_news.html.erb
index c6940ce10..750f7e465 100644
--- a/app/views/news/_course_news.html.erb
+++ b/app/views/news/_course_news.html.erb
@@ -2,42 +2,23 @@
btn_tips = l(:label_news_notice)
label_tips = l(:label_course_news)
%>
-
-
-
<%= label_tips %>
-
<%= l(:label_total_news) %><%= @news_count %><%= l(:label_course_news_count) %>
+
+ <%= l(:label_total_news) %>
+ <%= @news_count %>
+ <%= l(:label_course_news_count) %>
+
<% if @course && User.current.allowed_to?(:manage_news, @course) %>
- <%= link_to(btn_tips,new_course_news_path(@course),
- :class => 'problem_new_btn fl c_dorange')%>
+ <%= link_to(btn_tips,new_course_news_path(@course),:class => 'problem_new_btn fl c_dorange')%>
<% end %>
-
-
-
<% if @newss.empty? %>
@@ -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_user_header(news.author,false,{:class=> 'problem_name c_orange fl'}) if news.respond_to?(:author) %>
-
<%= l(:label_release_news) %>:<%= link_to h(news.title), news_path(news),:class => 'problem_tit fl fb c_dblue' %>
+
+ <%= l(:label_release_news) %>:
+
+ <%= link_to h(news.title), news_path(news),:class => 'problem_tit fl fb c_dblue' %>
+
-
<%= textAreailizable news.description %>
<%= l(:label_create_time) %> :<%= format_time(news.created_on) %>
-
+
+ <%= news.description.html_safe %>
+
+
+
<%= l(:label_end_time)%>:<%= format_time(news.created_on)%>
@@ -62,41 +53,11 @@
-
- <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
-
-
- <%# other_formats_links do |f| %>
- <%#= f.link_to 'Atom', :url => {:course_id => @course, :key => User.current.rss_key} %>
- <%# end %>
-
- <% 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)) -%>
-
-
-
+
+ <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
+
+<% 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)) -%>
diff --git a/lib/rails_kindeditor/vendor/assets/javascripts/kindeditor/kindeditor.js b/lib/rails_kindeditor/vendor/assets/javascripts/kindeditor/kindeditor.js
index d5dd1e443..e58e4b2be 100644
--- a/lib/rails_kindeditor/vendor/assets/javascripts/kindeditor/kindeditor.js
+++ b/lib/rails_kindeditor/vendor/assets/javascripts/kindeditor/kindeditor.js
@@ -4922,7 +4922,7 @@ KEditor.prototype = {
editDiv = K('.edit', container),
statusbar = self.statusbar = K('.statusbar', 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) {
container.css({
position : 'absolute',
diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js
index 9bdcff891..8ecbfef06 100644
--- a/public/assets/kindeditor/kindeditor.js
+++ b/public/assets/kindeditor/kindeditor.js
@@ -4917,7 +4917,7 @@ KEditor.prototype = {
editDiv = K('.edit', container),
statusbar = self.statusbar = K('.statusbar', 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) {
container.css({
position : 'absolute',
diff --git a/public/javascripts/course.js b/public/javascripts/course.js
index 286905017..64b8898f4 100644
--- a/public/javascripts/course.js
+++ b/public/javascripts/course.js
@@ -411,8 +411,20 @@ function regexDeadLine()
('#ui-datepicker-div').hide;
}
+//新建、修改课程明码显示
$(function(){
$("#psw_btn").click(function() {
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");
+ }
+ }
+ )
+});