Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
4a959523c1
|
@ -230,6 +230,53 @@ class TagsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
#更新某个tag名称
|
||||
def update_tag_name
|
||||
@tag_name = params[:tagName]
|
||||
@rename_tag_name = params[:renameName]
|
||||
@taggable_id = params[:taggableId]
|
||||
@taggable_type = numbers_to_object_type(params[:taggableType])
|
||||
|
||||
|
||||
@rename_tag = (ActsAsTaggableOn::Tag.find_by_name(@rename_tag_name)) #查找重命名后的tag
|
||||
@tag_id = (ActsAsTaggableOn::Tag.find_by_name(@tag_name)).id #重命名前的tag_id
|
||||
@taggings = ActsAsTaggableOn::Tagging.find_by_tag_id_and_taggable_id_and_taggable_type(@tag_id,@taggable_id,@taggable_type)
|
||||
@obj = get_object(@taggable_id,params[:taggableType])
|
||||
if(@rename_tag.nil?) #这次命名的是新的tag
|
||||
|
||||
# 是否还有其他记录 引用了 tag_id
|
||||
@tagging = ActsAsTaggableOn::Tagging.where("tag_id = #{@tag_id}")
|
||||
# 如果taggings表中记录为 1 ,那么改变@tag_id对应的tag的名字
|
||||
if @tagging.count == 1
|
||||
@tag = ActsAsTaggableOn::Tag.find_by_id(@tag_id)
|
||||
@tag.update_attributes({:name=>@rename_tag_name})
|
||||
else #如果tagging表中的记录大于1,那么就要新增tag记录
|
||||
|
||||
unless @obj.nil?
|
||||
@obj.tag_list.add(@rename_tag_name.split(","))
|
||||
@obj.save
|
||||
end
|
||||
#删除原来的对应的taggings的记录
|
||||
unless @taggings.nil?
|
||||
@taggings.delete
|
||||
end
|
||||
end
|
||||
else #这是已有的tag
|
||||
# 更改taggings记录里的tag_id
|
||||
unless @taggings.nil?
|
||||
@taggings.update_attributes({:tag_id=>@rename_tag.id})
|
||||
end
|
||||
end
|
||||
@obj_flag = params[:taggableType]
|
||||
if @obj && @obj_flag == '6' && @obj.container.kind_of?(Course)
|
||||
@course = @obj.container
|
||||
@tag_list = @tag_list = get_course_tag_list @course
|
||||
end
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
def tag_save
|
||||
@select_tag_name = params[:tag_for_save][:tag_name]
|
||||
@tags = params[:tag_for_save][:name]
|
||||
|
|
|
@ -223,6 +223,54 @@
|
|||
});
|
||||
|
||||
}
|
||||
var tagNameHtml; //当前双击的链接的父节点的html
|
||||
var tagName; //标签的值
|
||||
var parentCssBorder; //当前双击的链接的父节点
|
||||
var ele; //当前双击的链接
|
||||
var tagId; //标签的id
|
||||
var taggableType; //被标签的类型
|
||||
function rename_tag(domEle,name,id,type){
|
||||
if(domEle.children().get(0) != undefined ){ //已经是编辑框的情况下不要动
|
||||
return;
|
||||
}
|
||||
tagNameHtml = domEle.parent().html()
|
||||
tagName = name;
|
||||
parentCssBorder = domEle.parent().css("border");
|
||||
ele = domEle;
|
||||
tagId = id;
|
||||
taggableType = type;
|
||||
domEle.html('<input name="" id="renameTagName" style="width: 100px;" value="'+name+'"/>');
|
||||
domEle.parent().css("border","1px solid #ffffff");
|
||||
$("#renameTagName").focus();
|
||||
}
|
||||
//监听所有的单击事件
|
||||
$(document.body).click(function(e){
|
||||
node = document.elementFromPoint(e.clientX, e.clientY);
|
||||
if(node.tagName == "INPUT"){ //如果是输入框的聚焦,那么就不要进行下去了
|
||||
return;
|
||||
}
|
||||
if($("#renameTagName")[0] != undefined ){//存在renameTagName,则处于编辑状态
|
||||
if($("#renameTagName").val().trim() == tagName){ //如果值一样,则恢复原来的状态
|
||||
ele.parent().css("border","");
|
||||
ele.parent().html(tagNameHtml);
|
||||
|
||||
}else{ //否则就要更新tag名称了
|
||||
if(confirm("是否将标签改为 "+ $("#renameTagName").val().trim())){
|
||||
$.post(
|
||||
'<%= update_tag_name_path %>',
|
||||
{"taggableId":tagId,"taggableType":taggableType,"tagName":tagName,"renameName":$("#renameTagName").val().trim()}
|
||||
// function(data){
|
||||
// ele.parent().css("border","");
|
||||
// ele.parent().html(tagNameHtml);
|
||||
// }
|
||||
)
|
||||
}else{
|
||||
ele.parent().css("border","");
|
||||
ele.parent().html(tagNameHtml);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
|
|
@ -32,7 +32,8 @@
|
|||
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
|
||||
<%= kindeditor_tag :comment, '',:height=>'100',:editor_id =>'comment_editor', :placeholder=>"最多250个字"%>
|
||||
</div>
|
||||
<p class="mt10">
|
||||
<p id="add_reply_news"></p>
|
||||
<p class="mt10">
|
||||
<a href="javascript:void(0)" class="grey_btn fr ml10" onclick="KindEditor.instances[0].html('');">
|
||||
<%= l(:label_cancel_with_space) %>
|
||||
</a>
|
||||
|
@ -48,7 +49,7 @@
|
|||
<% comments.each do |comment| %>
|
||||
<% next if comment.new_record? %>
|
||||
<div class="ping_C mb10">
|
||||
<div class="ping_dispic"><%= link_to image_tag(url_to_avatar(comment.author),:width => 42,:height => 42), user_path(comment.author)%></div>
|
||||
<div><%= link_to image_tag(url_to_avatar(comment.author),:width => 42,:height => 42), user_path(comment.author), :class => "problem_pic fl"%></div>
|
||||
<div class="ping_discon">
|
||||
<div class="ping_distop upload_img break_word">
|
||||
<%= link_to_user_header(comment.author,false,:class => 'c_blue fb fl mb10 ') if comment.respond_to?(:author) %>
|
||||
|
@ -76,4 +77,4 @@
|
|||
<% end %>
|
||||
|
||||
|
||||
<% html_title @news.title -%>
|
||||
<% html_title @news.title -%>
|
|
@ -2,7 +2,8 @@
|
|||
|
||||
<% if @tags.size > 0 %>
|
||||
<% @tags.each do |tag| %>
|
||||
<span class="re_tag f_l"> <%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
|
||||
<span class="re_tag f_l"> <%#= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
|
||||
<a ondblclick="rename_tag($(this),'<%= tag %>',<%= obj.id%>,<%= object_flag%>);"><%= tag %></a>
|
||||
<!-- 对用户主页 是本人 ,对项目,需求,问题是管理员 -->
|
||||
<% case object_flag %>
|
||||
<% when '10' %>
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
//本js使用的新的tag显示方法
|
||||
<% if @obj_flag == '3'%>
|
||||
$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||
//$('#put-tag-form-issue').hide();
|
||||
$('#name-issue').val("");
|
||||
<% elsif @obj_flag == '1'%>
|
||||
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_user_new_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||
$('#tags_name3').val("");
|
||||
<% elsif @obj_flag == '2'%>
|
||||
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_project_new_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||
$('#tags_name2').val("");
|
||||
<% elsif @obj_flag == '6'%>
|
||||
<%if @course%>
|
||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_list',
|
||||
:locals => {:obj => @obj,:object_flag => @obj_flag,:select_tag_name => @select_tag_name}) %>');
|
||||
$("#files_tag").html("<%= escape_javascript(render :partial => "files/tag_yun", :locals => {:tag_list => @tag_list,:course => @course,:tag_name => @select_tag_name}) %>");
|
||||
<%else%>
|
||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/course_attachment_tag_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||
<%end%>
|
||||
|
||||
$("#tags_name_<%=@obj.id%>").val("");
|
||||
$("#add_tag_<%=@obj.id%>").hide();
|
||||
<% elsif @obj_flag == '9'%>
|
||||
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/new_tag_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||
$('#tags_name').val("");
|
||||
<% elsif @obj_flag == '10'%>
|
||||
//$("#put-tag-form-<%#=@obj.class%>-<%#=@obj.id%>").hide();
|
||||
<% else%>
|
||||
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||
$('#tags_name').val("");
|
||||
//$('#put-tag-form').hide();
|
||||
<% end %>
|
|
@ -1,177 +0,0 @@
|
|||
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
|
||||
<% if @news.commentable? %>
|
||||
<div class="msg_box fl">
|
||||
<h4><%= l(:label_comment_add) %></h4>
|
||||
<%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form") do %>
|
||||
<div class="box" id="news_comment">
|
||||
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
|
||||
<%= kindeditor_tag :comment, '',:height=>'100',:editor_id =>'comment_editor', :placeholder=>"最多250个字"%>
|
||||
</div>
|
||||
<p class="mt10">
|
||||
<a href="javascript:void(0)" class="grey_btn fr ml10" onclick="KindEditor.instances[0].html('');">
|
||||
<%= l(:label_cancel_with_space) %>
|
||||
</a>
|
||||
<a href="javascript:void(0)" class="blue_btn fr" onclick="submitComment();">
|
||||
<%= l(:label_comment_with_space) %>
|
||||
</a>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="homepagePostReplyInputContainer" id='leave-message' nhname="new_message">
|
||||
|
||||
<%= form_for('new_form', :method => :post,
|
||||
:url => {:controller => 'words', :action => 'leave_course_message'},:html => {:id=>'leave_message_form'}) do |f|%>
|
||||
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
|
||||
<textarea class="homepagePostReplyInput" nhname="new_message_textarea" name="new_form[course_message]" placeholder="请输入回复"></textarea>
|
||||
<p nhname="contentmsg"></p>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<div class="fl" style="padding-top:5px;" nhname="toolbar_container"></div>
|
||||
<a href="javascript:void(0)" class="grey_btn fr ml10 mt10" nhname="cancel_btn">取 消</a>
|
||||
<a href="javascript:void(0)" onclick='$("#leave_message_form").submit();' class="blue_btn fr mt10">
|
||||
发送
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cl"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
||||
function init_editor(params){
|
||||
var editor = params.kindutil.create(params.textarea, {
|
||||
resizeType : 1,minWidth:"1px",width:"100%",height:"45px",
|
||||
items:['emoticons'],
|
||||
afterChange:function(){//按键事件
|
||||
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
||||
},
|
||||
afterCreate:function(){
|
||||
var toolbar = $("div[class='ke-toolbar']",params.div_form);
|
||||
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
|
||||
params.toolbar_container.append(toolbar);
|
||||
}
|
||||
}).loadPlugin('paste');
|
||||
return editor;
|
||||
}
|
||||
|
||||
function nh_check_field(params){
|
||||
var result=true;
|
||||
if(params.content!=undefined){
|
||||
if(params.content.isEmpty()){
|
||||
result=false;
|
||||
}
|
||||
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
|
||||
params.textarea.html(params.content.html());
|
||||
params.content.sync();
|
||||
if(params.content.isEmpty()){
|
||||
params.contentmsg.html('内容不能为空');
|
||||
params.contentmsg.css({color:'#ff0000'});
|
||||
}else{
|
||||
params.contentmsg.html('填写正确');
|
||||
params.contentmsg.css({color:'#008000'});
|
||||
}
|
||||
params.contentmsg.show();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function init_form(params){
|
||||
params.form.submit(function(){
|
||||
var flag = false;
|
||||
if(params.form.attr('data-remote') != undefined ){
|
||||
flag = true
|
||||
}
|
||||
var is_checked = nh_check_field({
|
||||
issubmit:true,
|
||||
content:params.editor,
|
||||
contentmsg:params.contentmsg,
|
||||
textarea:params.textarea
|
||||
});
|
||||
if(is_checked){
|
||||
if(flag){
|
||||
return true;
|
||||
}else{
|
||||
$(this)[0].submit();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
function nh_reset_form(params){
|
||||
params.form[0].reset();
|
||||
params.textarea.empty();
|
||||
if(params.editor != undefined){
|
||||
params.editor.html(params.textarea.html());
|
||||
}
|
||||
params.contentmsg.hide();
|
||||
}
|
||||
|
||||
KindEditor.ready(function(K){
|
||||
$("a[nhname='reply_btn']").live('click',function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.container = $(this).parent('div').parent('div');
|
||||
params.div_form = $(">.respond-form",params.container);
|
||||
params.form = $("form",params.div_form);
|
||||
params.textarea = $("textarea[name='user_notes']",params.div_form);
|
||||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||
params.cancel_btn = $("input[nhname='cancel_btn']",params.div_form);
|
||||
if(params.textarea.data('init') == undefined){
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
params.cancel_btn.click(function(){
|
||||
nh_reset_form(params);
|
||||
});
|
||||
}
|
||||
params.cancel_btn.click();
|
||||
toggleAndSettingWordsVal(params.div_form, params.textarea);
|
||||
setTimeout(function(){
|
||||
if(!params.div_form.is(':hidden')){
|
||||
params.textarea.show();
|
||||
params.textarea.focus();
|
||||
params.textarea.hide();
|
||||
}
|
||||
},300);
|
||||
params.textarea.data('init',1);
|
||||
});
|
||||
|
||||
$("div[nhname='new_message']").each(function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.div_form = $(this);
|
||||
params.form = $("form",params.div_form);
|
||||
if(params.form==undefined || params.form.length==0){
|
||||
return;
|
||||
}
|
||||
params.textarea = $("textarea[nhname='new_message_textarea']",params.div_form);
|
||||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||
if(params.textarea.data('init') == undefined){
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
$("a[nhname='cancel_btn']",params.div_form).click(function(){
|
||||
nh_reset_form(params);
|
||||
});
|
||||
params.textarea.data('init',1);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<!--
|
||||
<textarea class="homepagePostReplyInput" placeholder="请输入回复"></textarea>
|
||||
<div class="homepagePostReplyEmotion"><a href="javascript:void(0);" class="replyGrey">表情</a></div>
|
||||
<div class="homepagePostReplyCancel"><a href="javascript:void(0);" class="postReplyCancel">取消</a>
|
||||
</div>
|
||||
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a>
|
||||
</div>-->
|
|
@ -111,17 +111,14 @@
|
|||
<% end %>
|
||||
<%= format_time(reply.created_on) %>
|
||||
</div>
|
||||
<% if reply.details.any? %>
|
||||
<% details_to_strings(reply.details).each do |string| %>
|
||||
<div class="homepagePostReplyContent break_word">
|
||||
<%= string %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="homepagePostReplyContent break_word">
|
||||
<%= reply.notes.html_safe %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="homepagePostReplyContent break_word">
|
||||
<% if reply.details.any? %>
|
||||
<% details_to_strings(reply.details).each do |string| %>
|
||||
<p><%= string %></p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<P><%= reply.notes.html_safe %></P>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
|
|
@ -59,8 +59,8 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<div class="courseSendSubmit"><a href="javascript:void(0);" onclick="$(this).parent().parent().parent().submit();" class="sendSourceText">确定</a></div>
|
||||
<div class="courseSendCancel"><a href="javascript:void(0);" onclick="hideModal();" class="sendSourceText">取消</a></div>
|
||||
<a href="javascript:void(0);" onclick="$(this).parent().parent().submit();" class="db courseSendSubmit sendSourceText">确定</a>
|
||||
<a href="javascript:void(0);" onclick="hideModal();" class="db courseSendCancel sendSourceText">取消</a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
|
|
|
@ -1,279 +0,0 @@
|
|||
<div class="resources">
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">最新动态</div>
|
||||
<ul class="resourcesSelect">
|
||||
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
||||
<ul class="homepagePostType">
|
||||
<li>
|
||||
<ul class="homepagePostTypeHomework fl">
|
||||
<li class="f14">课程动态</li>
|
||||
<li><a href="javascript:void(0);" class="homepagePostTypeAssignment postTypeGrey">作业动态</a></li>
|
||||
<li><a href="javascript:void(0);" class="homepagePostTypeNotice postTypeGrey">通知动态</a></li>
|
||||
<li><a href="javascript:void(0);" class="homepagePostTypeForum postTypeGrey">论坛动态</a></li>
|
||||
<!--<li><a href="javascript:void(0);" class="homepagePostTypeQuiz postTypeGrey">问卷动态</a></li>-->
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<ul class="homepagePostTypeProject fl">
|
||||
<li class="f14">项目动态</li>
|
||||
<li><a href="javascript:void(0);" class="homepagePostTypeQuestion postTypeGrey">问题动态</a></li>
|
||||
<li><a href="javascript:void(0);" class="homepagePostTypeForum postTypeGrey">论坛动态</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="homepagePostBrief" onmouseover="$('.homepagePostSetting').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
|
||||
<div class="homepagePostPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="50" height="50" alt="用户头像"/></a></div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
|
||||
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
|
||||
<div class="homepagePostTitle">
|
||||
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理(作业名称)</a></div>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交(10)</a></div>
|
||||
<div class="homepagePostDeadline">截止时间:2015-08-20</div>
|
||||
</div>
|
||||
<div class="homepagePostIntro">(作业描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;</div>
|
||||
<div class="homepagePostSetting" style="visibility: hidden">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="resources mt15">
|
||||
<div class="homepagePostBrief" onmouseover="$('.homepagePostSetting').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
|
||||
<div class="homepagePostPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="50" height="50" alt="用户头像"/></a></div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
|
||||
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
|
||||
<div class="homepagePostTitle">
|
||||
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理(作业名称)</a></div>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交(10)</a></div>
|
||||
<div class="homepagePostDeadline">截止时间:2015-08-20</div>
|
||||
</div>
|
||||
<div class="homepagePostIntro">(作业描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;</div>
|
||||
<div class="homepagePostSetting" style="visibility: hidden">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="homepagePostReply">
|
||||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复(5)</div>
|
||||
<div class="homepagePostReplyBannerTime">2015-07-28</div>
|
||||
<div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" class="replyGrey">点击展开更多回复</a></div>
|
||||
</div>
|
||||
<div class="homepagePostReplyInputContainer">
|
||||
<textarea class="homepagePostReplyInput" placeholder="请输入回复"></textarea>
|
||||
</div>
|
||||
<div class="homepagePostReplyInputContainer">
|
||||
<div class="homepagePostReplyEmotion"><a href="javascript:void(0);" class="replyGrey">表情</a></div>
|
||||
<div class="homepagePostReplyCancel"><a href="javascript:void(0);" class="postReplyCancel">取消</a></div>
|
||||
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="homepagePostReplyContainer">
|
||||
<div class="homepagePostReplyPortrait"><a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像" /></a></div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher"><a href="javascript:void(0);" class="newsBlue mr10 f14">尹教授</a> 2015-08-01<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><a href="javascript:void(0);" class="newsBlue fr">回复</a></div>
|
||||
<div class="homepagePostReplyContent">请大家说下软件工程是什么!</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="homepagePostReplyContainer">
|
||||
<div class="homepagePostReplyPortrait"><a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像" /></a></div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher"><a href="javascript:void(0);" class="newsBlue mr10 f14">Tang 学生</a> 2015-08-02<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><a href="javascript:void(0);" class="newsBlue fr">回复</a></div>
|
||||
<div class="homepagePostReplyContent">软件工程是一门研究用工程化方法构建和维护有效的、实用的和高质量的软件的学科。它涉及程序设计语言、数据库、软件开发工具、系统平台、标准、设计模式等方面。</div>
|
||||
<div class="homepagePostReplyInputContainer2">
|
||||
<textarea class="homepagePostReplyInput2" placeholder="请输入回复"></textarea>
|
||||
</div>
|
||||
<div class="homepagePostReplyInputContainer2 mb10">
|
||||
<div class="homepagePostReplyEmotion"><a href="javascript:void(0);" class="replyGrey">表情</a></div>
|
||||
<div class="homepagePostReplyCancel"><a href="javascript:void(0);" class="postReplyCancel">取消</a></div>
|
||||
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="homepagePostReplyContainer borderBottomNone">
|
||||
<div class="homepagePostReplyPortrait"><a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像" /></a></div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher"><a href="javascript:void(0);" class="newsBlue mr15 f14">尹教授</a><span class="f14">回复</span><a href="javascript:void(0);" class="newsBlue mr10 ml15 f14">Tang学生</a>刚刚<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><a href="javascript:void(0);" class="newsBlue fr">回复</a></div>
|
||||
<div class="homepagePostReplyContent">回答非常好!</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<div class="resources mt15">
|
||||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="50" height="50" alt="用户头像"/></a></div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
|
||||
<a href="javascript:void(0);" class="newsBlue ml15 mr5">黄井泉</a><span class="c_blue">,</span><a href="javascript:void(0);" class="newsBlue ml5">陈正东</a>
|
||||
</div>
|
||||
<div class="homepagePostTitle"><a href="javascript:void(0);" class="postGrey">假期开心吗?(讨论区内容)</a></div>
|
||||
<div class="homepagePostDate">
|
||||
时间:2015-07-31
|
||||
</div>
|
||||
<div class="homepagePostSetting">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="homepagePostReply">
|
||||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复(5)</div>
|
||||
<div class="homepagePostReplyBannerTime">2015-07-31</div>
|
||||
<div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" class="replyGrey">点击展开更多回复</a></div>
|
||||
</div>
|
||||
<div class="homepagePostReplyInputContainer">
|
||||
<textarea class="homepagePostReplyInput" placeholder="请输入回复"></textarea>
|
||||
</div>
|
||||
<div class="homepagePostReplyInputContainer">
|
||||
<div class="homepagePostReplyEmotion"><a href="javascript:void(0);" class="replyGrey">表情</a></div>
|
||||
<div class="homepagePostReplyCancel"><a href="javascript:void(0);" class="postReplyCancel">取消</a></div>
|
||||
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="homepagePostReplyContainer">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像"/></a>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher"><a href="javascript:void(0);" class="newsBlue mr10 f14">黄井泉 学生</a>
|
||||
2015-08-01<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><!--<a href="javascript:void(0);" class="newsBlue fr">回复</a>-->
|
||||
</div>
|
||||
<div class="homepagePostReplyContent">很开心!</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="homepagePostReplyContainer borderBottomNone">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像"/></a>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher"><a href="javascript:void(0);" class="newsBlue mr10 f14">陈正东 学生</a>
|
||||
2015-08-02<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><!--<a href="javascript:void(0);" class="newsBlue fr">回复</a>-->
|
||||
</div>
|
||||
<div class="homepagePostReplyContent">假期好热,没出去。</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="resources mt15">
|
||||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="50" height="50" alt="用户头像"/></a></div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
|
||||
<a href="javascript:void(0);" class="newsBlue ml15">Trustie Forge(项目名称)</a></div>
|
||||
<div class="homepagePostTitle">
|
||||
<a href="javascript:void(0);" class="postGrey">上传资源未显示在项目动态中(缺陷标题)</a><span class="homepagePostProjectState">正常</span>
|
||||
</div>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
<div class="homepagePostAssignTo">指派给 <a href="javascript:void(0);" class="newsBlue mr15">苏稳</a>
|
||||
</div>
|
||||
<div class="homepagePostDeadline">时间:2015-08-20</div>
|
||||
</div>
|
||||
<div class="homepagePostIntro">(缺陷描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;</div>
|
||||
<div class="mt10">
|
||||
<a href="javascript:void(0);" class="homepagePostFileAtt newsBlue">文件附件.zip</a><span class="postAttSize">(123KB)</span>
|
||||
</div>
|
||||
<div>
|
||||
<a href="javascript:void(0);" class="homepagePostImageAtt newsBlue">图片附件.png</a><span class="postAttSize">(123KB)</span>
|
||||
</div>
|
||||
<div class="homepagePostSetting">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="homepagePostReply">
|
||||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复(5)</div>
|
||||
<div class="homepagePostReplyBannerTime">2015-07-26</div>
|
||||
<div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" class="replyGrey">点击展开更多回复</a></div>
|
||||
</div>
|
||||
<div class="homepagePostReplyInputContainer">
|
||||
<textarea class="homepagePostReplyInput" placeholder="请输入回复"></textarea>
|
||||
</div>
|
||||
<div class="homepagePostReplyInputContainer">
|
||||
<div class="homepagePostReplyEmotion"><a href="javascript:void(0);" class="replyGrey">表情</a></div>
|
||||
<div class="homepagePostReplyCancel"><a href="javascript:void(0);" class="postReplyCancel">取消</a></div>
|
||||
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="homepagePostReplyContainer">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像"/></a>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher"><a href="javascript:void(0);" class="newsBlue mr10 f14">尹教授</a>
|
||||
2015-08-01<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><!--<a href="javascript:void(0);" class="newsBlue fr">回复</a>-->
|
||||
</div>
|
||||
<div class="homepagePostReplyContent">请大家说下软件工程是什么!</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="homepagePostReplyContainer">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像"/></a>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher"><a href="javascript:void(0);" class="newsBlue mr10 f14">Tang 学生</a>
|
||||
2015-08-01<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><!--<a href="javascript:void(0);" class="newsBlue fr">回复</a>-->
|
||||
</div>
|
||||
<div class="homepagePostReplyContent">软件工程是一门研究用工程化方法构建和维护有效的、实用的和高质量的软件的学科。它涉及程序设计语言、数据库、软件开发工具、系统平台、标准、设计模式等方面。</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -884,6 +884,7 @@ RedmineApp::Application.routes.draw do
|
|||
match 'tags/remove_tag', :as=>"remove_tag"
|
||||
match 'tags/remove_tag_new', :as=>"remove_tag_new"
|
||||
match 'tags/tag_save', :as => "save_tag"
|
||||
match 'tags/update_tag_name',:as => "update_tag_name"
|
||||
|
||||
match 'words/add_brief_introdution'
|
||||
|
||||
|
|
45
db/schema.rb
45
db/schema.rb
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20150911064528) do
|
||||
ActiveRecord::Schema.define(:version => 20150911031029) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -497,26 +497,23 @@ ActiveRecord::Schema.define(:version => 20150911064528) do
|
|||
add_index "documents", ["created_on"], :name => "index_documents_on_created_on"
|
||||
add_index "documents", ["project_id"], :name => "documents_project_id"
|
||||
|
||||
create_table "dts", :primary_key => "Num", :force => true do |t|
|
||||
t.string "Defect", :limit => 50
|
||||
t.string "Category", :limit => 50
|
||||
t.string "File"
|
||||
t.string "Method"
|
||||
t.string "Module", :limit => 20
|
||||
t.string "Variable", :limit => 50
|
||||
t.integer "StartLine"
|
||||
t.integer "IPLine"
|
||||
t.string "IPLineCode", :limit => 200
|
||||
t.string "Judge", :limit => 15
|
||||
t.integer "Review", :limit => 1
|
||||
create_table "dts", :force => true do |t|
|
||||
t.string "IPLineCode"
|
||||
t.string "Description"
|
||||
t.text "PreConditions", :limit => 2147483647
|
||||
t.text "TraceInfo", :limit => 2147483647
|
||||
t.text "Code", :limit => 2147483647
|
||||
t.string "Num"
|
||||
t.string "Variable"
|
||||
t.string "TraceInfo"
|
||||
t.string "Method"
|
||||
t.string "File"
|
||||
t.string "IPLine"
|
||||
t.string "Review"
|
||||
t.string "Category"
|
||||
t.string "Defect"
|
||||
t.string "PreConditions"
|
||||
t.string "StartLine"
|
||||
t.integer "project_id"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "id", :null => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "enabled_modules", :force => true do |t|
|
||||
|
@ -781,6 +778,16 @@ ActiveRecord::Schema.define(:version => 20150911064528) do
|
|||
|
||||
add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id"
|
||||
|
||||
create_table "journal_details_copy", :force => true do |t|
|
||||
t.integer "journal_id", :default => 0, :null => false
|
||||
t.string "property", :limit => 30, :default => "", :null => false
|
||||
t.string "prop_key", :limit => 30, :default => "", :null => false
|
||||
t.text "old_value"
|
||||
t.text "value"
|
||||
end
|
||||
|
||||
add_index "journal_details_copy", ["journal_id"], :name => "journal_details_journal_id"
|
||||
|
||||
create_table "journal_replies", :id => false, :force => true do |t|
|
||||
t.integer "journal_id"
|
||||
t.integer "user_id"
|
||||
|
|
|
@ -260,8 +260,23 @@ function submitFocus(obj)
|
|||
|
||||
function submitComment()
|
||||
{
|
||||
comment_editor.sync();
|
||||
$("#add_comment_form").submit();
|
||||
if (newsReplyVerify()) {
|
||||
comment_editor.sync();
|
||||
$("#add_comment_form").submit();
|
||||
}
|
||||
}
|
||||
|
||||
function newsReplyVerify() {
|
||||
var content = comment_editor.html();
|
||||
if(content.length == 0) {
|
||||
$("#add_reply_news").text("评论不能为空");
|
||||
$("#add_reply_news").css('color', '#ff0000');
|
||||
return false;
|
||||
} else {
|
||||
$("#add_reply_news").text("填写正确");
|
||||
$("#add_reply_news").css('color', '#008000');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////课程讨论区
|
||||
|
|
Loading…
Reference in New Issue