训路径的简介、学习须知,请改为 ke 编辑器
This commit is contained in:
parent
01b8a72e38
commit
833be4dbaa
|
|
@ -36,7 +36,7 @@ class CoursesController < ApplicationController
|
|||
before_filter :require_login, :only => [:join, :unjoin]
|
||||
#before_filter :allow_join, :only => [:join]
|
||||
require 'bundler/setup'
|
||||
require 'simple_xlsx_reader'
|
||||
#require 'simple_xlsx_reader'
|
||||
|
||||
# params[:search] 搜索课程的名称
|
||||
# params[:select] "join" "create" "all" 参与的 创建的 所有的课程
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||
<% end %>
|
||||
<div class="active-class ">
|
||||
<p style="line-height: 42px;">
|
||||
<i class="fa fa-map-marker mr5 color-grey"></i>
|
||||
|
|
@ -23,14 +26,41 @@
|
|||
<!--<span class="color-orange ml20 fl none" style="margin-left: 12%;" id="new_subject_intro_notice"><i class="fa fa-exclamation-circle mr5" ></i>请输入描述</span>-->
|
||||
<!--</li>-->
|
||||
<li class="clearfix pt20">
|
||||
<label class="panel-form-label label fl"><span class="color-orange">*</span>简介</label>
|
||||
<textarea name="subject[description]" id="new_subject_description" class="task task-height-220 panel-box-sizing task-form-80 fl color-grey ml20"></textarea>
|
||||
<label class="panel-form-label label fl mr20"><span class="color-orange">*</span>简介</label>
|
||||
<%#= hidden_field_tag :asset_id, params[:asset_id], :required => false, :style => 'display:none' %>
|
||||
<textarea class="panel-form-width-690 panel-form-height-150 fl panel-box-sizing" style="display: none"></textarea>
|
||||
<%= f.kindeditor :description,
|
||||
:editor_id => 'new_subject_description',
|
||||
:owner_id => 0,
|
||||
:owner_type => OwnerTypeHelper::MESSAGE,
|
||||
:width => '80%',
|
||||
:height => 300,
|
||||
:minHeight=>300,
|
||||
:class => 'talk_text fl',
|
||||
:input_html => { :id => 'new_subject_description',
|
||||
:class => 'task task-height-220 panel-box-sizing task-form-80 fl color-grey ml20',
|
||||
:maxlength => 5000 }
|
||||
%>
|
||||
<!-- <textarea name="subject[description]" id="new_subject_description" class="task task-height-220 panel-box-sizing task-form-80 fl color-grey ml20"></textarea>-->
|
||||
<div class="cl"></div>
|
||||
<span class="color-orange ml20 fl none" style="margin-left: 12%;" id="new_subject_description_notice"><i class="fa fa-exclamation-circle mr5" ></i>请输入简介</span>
|
||||
</li>
|
||||
<li class="clearfix pt20">
|
||||
<label class="panel-form-label label fl"><span class="color-orange">*</span> 学习须知</label>
|
||||
<textarea type="text" name="subject[learning_notes]" id="new_learning_notes" class="task task-height-220 panel-box-sizing task-form-70 fl color-grey ml20" placeholder=""></textarea>
|
||||
<label class="panel-form-label label fl mr20"><span class="color-orange">*</span> 学习须知</label>
|
||||
<textarea class="panel-form-width-690 panel-form-height-150 fl panel-box-sizing" style="display: none"></textarea>
|
||||
<%= f.kindeditor :learning_notes,
|
||||
:editor_id => 'new_learning_notes',
|
||||
:owner_id => 0,
|
||||
:owner_type => OwnerTypeHelper::MESSAGE,
|
||||
:width => '80%',
|
||||
:height => 300,
|
||||
:minHeight=>300,
|
||||
:class => 'talk_text fl',
|
||||
:input_html => { :id => 'new_learning_notes',
|
||||
:class => 'task task-height-220 panel-box-sizing task-form-80 fl color-grey ml20',
|
||||
:maxlength => 5000 }
|
||||
%>
|
||||
<<!--textarea type="text" name="subject[learning_notes]" id="new_learning_notes" class="task task-height-220 panel-box-sizing task-form-70 fl color-grey ml20" placeholder=""></textarea>-->
|
||||
<div class="cl"></div>
|
||||
<span class="color-orange ml20 fl none" style="margin-left: 12%;" id="new_learning_notes_notice"><i class="fa fa-exclamation-circle mr5" ></i>请输入学习须知</span>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<% end %>
|
||||
</p>
|
||||
<div class="color-dark-grey <%= @subject.description.blank? ? 'color-light-grey' : '' %> justify">
|
||||
<pre class="pre_word font-15" style="color: #666;font-family: '微软雅黑','宋体';"><%= @subject.description.blank? ? "暂未填写" : (@subject.description) %></pre>
|
||||
<pre class="pre_word font-15" style="color: #666;font-family: '微软雅黑','宋体';"><%= @subject.description.blank? ? "暂未填写" : (@subject.description.html_safe) %></pre>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
@ -142,7 +142,7 @@
|
|||
<a href="<%= edit_subject_path(@subject) %>"><i class="fa fa-pencil mt10 mr5 color-grey-c edit-produce font-12"data-tip-down="编辑" style="position: relative;top:-3px"></i></a>
|
||||
<% end %>
|
||||
</p>
|
||||
<div class="mt10 mb10 color-dark-grey justify"><pre class="pre_word font-15" style="color: #666;font-family: '微软雅黑','宋体';"><%= @subject.learning_notes.blank? ? "暂未填写" : @subject.learning_notes %></pre></div>
|
||||
<div class="mt10 mb10 color-dark-grey justify"><pre class="pre_word font-15" style="color: #666;font-family: '微软雅黑','宋体';"><%= @subject.learning_notes.blank? ? "暂未填写" : @subject.learning_notes.html_safe %></pre></div>
|
||||
</div>
|
||||
<div class="edu-class-right-box ml15 bor-radius4 bor-grey01 pt20 mb40">
|
||||
<p class="font-18 mb20" style="text-align: center">教学团队
|
||||
|
|
|
|||
|
|
@ -1094,19 +1094,21 @@ function submit_new_subject(){
|
|||
} else{
|
||||
$("#new_subject_name_notice").hide();
|
||||
}
|
||||
if($("#new_subject_description").val().trim() == ""){
|
||||
if(new_subject_description.isEmpty()){
|
||||
check = false;
|
||||
$("#new_subject_description_notice").show();
|
||||
} else{
|
||||
$("#new_subject_description_notice").hide();
|
||||
}
|
||||
if($("#new_learning_notes").val().trim() == ""){
|
||||
if(new_learning_notes.isEmpty()){
|
||||
check = false;
|
||||
$("#new_learning_notes_notice").show();
|
||||
} else {
|
||||
$("#new_learning_notes_notice").hide();
|
||||
}
|
||||
if(check){
|
||||
new_subject_description.sync();
|
||||
new_learning_notes.sync();
|
||||
$("#new_subject").submit();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue