Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
6179e455d2
|
@ -246,7 +246,7 @@ class TagsController < ApplicationController
|
||||||
if @taggable_id.blank? #如果没有传tag_id,那么直接更新tag_name就好了。但是要防止 重命名后的tag存在。
|
if @taggable_id.blank? #如果没有传tag_id,那么直接更新tag_name就好了。但是要防止 重命名后的tag存在。
|
||||||
#看重命名后的tag是否存在。如果存在的话,只需要更改taggings里边的id即可
|
#看重命名后的tag是否存在。如果存在的话,只需要更改taggings里边的id即可
|
||||||
if @rename_tag
|
if @rename_tag
|
||||||
@taggings = ActsAsTaggableOn::Tagging.find_by_tag_id_and_taggable_type(@tag_id,@taggable_id,@taggable_type)
|
@taggings = ActsAsTaggableOn::Tagging.find_by_tag_id_and_taggable_type(@tag_id,@taggable_type)
|
||||||
@taggings.update_attributes({:tag_id=>@rename_tag.id})
|
@taggings.update_attributes({:tag_id=>@rename_tag.id})
|
||||||
else #如果不存在,那么就直接更新该tag名称为新的名称
|
else #如果不存在,那么就直接更新该tag名称为新的名称
|
||||||
(ActsAsTaggableOn::Tag.find_by_name(@tag_name)).update_attributes(:name=>@rename_tag_name)
|
(ActsAsTaggableOn::Tag.find_by_name(@tag_name)).update_attributes(:name=>@rename_tag_name)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<span > <a href="javascript:void(0);" class="files_tag_select" ondblclick="rename_tag($(this),'<%= k %>','',<%= 6 %>);"><%= k%>×<%= v%></a></span>
|
<span > <a href="javascript:void(0);" class="files_tag_select" ondblclick="rename_tag($(this),'<%= k %>','',<%= 6 %>);"><%= k%>×<%= v%></a></span>
|
||||||
<% else%>
|
<% else%>
|
||||||
<span class="files_tag_icon" >
|
<span class="files_tag_icon" >
|
||||||
<a title="单击为过滤含有该标签的文件,双击为修改该标签的名字"
|
<a title="单击为过滤,双击可编辑"
|
||||||
onclick="search_tag_attachment('<%= search_tag_attachment_course_files_path(course)%>','<%= k%>','<%= @q%>','<%= course.id%>');"
|
onclick="search_tag_attachment('<%= search_tag_attachment_course_files_path(course)%>','<%= k%>','<%= @q%>','<%= course.id%>');"
|
||||||
ondblclick="rename_tag($(this),'<%= k %>','',<%= 6 %>);"><%= k%>×<%= v%></a></span>
|
ondblclick="rename_tag($(this),'<%= k %>','',<%= 6 %>);"><%= k%>×<%= v%></a></span>
|
||||||
<% end%>
|
<% end%>
|
||||||
|
|
|
@ -255,6 +255,7 @@
|
||||||
isdb = false; //这是单击
|
isdb = false; //这是单击
|
||||||
node = document.elementFromPoint(e.clientX, e.clientY);
|
node = document.elementFromPoint(e.clientX, e.clientY);
|
||||||
if(node.tagName == "INPUT"){ //如果是输入框的聚焦,那么就不要进行下去了
|
if(node.tagName == "INPUT"){ //如果是输入框的聚焦,那么就不要进行下去了
|
||||||
|
isdb = true; //为了防止在编辑的时候又去单击其他tag去过滤。导致tag过滤不可用
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if($("#renameTagName")[0] != undefined ){//存在renameTagName,则处于编辑状态
|
if($("#renameTagName")[0] != undefined ){//存在renameTagName,则处于编辑状态
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<a href="javascript:void(0)" class="talk_edit fr"<%= render :partial => 'action_menu' %></a>
|
<a href="javascript:void(0)" class="talk_edit fr"<%= render :partial => 'action_menu' %></a>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% if @issue.description? || @issue.attachments.any? -%>
|
<% if @issue.description? || @issue.attachments.any? -%>
|
||||||
<div class="talk_info mb10" style="word-break:break-all;">
|
<div class="talk_info mb10 issue_desc" style="word-break:break-all;">
|
||||||
<% if @issue.description? %>
|
<% if @issue.description? %>
|
||||||
<%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
|
<%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
|
||||||
<%= textAreailizable @issue, :description, :attachments => @issue.attachments %>
|
<%= textAreailizable @issue, :description, :attachments => @issue.attachments %>
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
<% if @tags.size > 0 %>
|
<% if @tags.size > 0 %>
|
||||||
<% @tags.each do |tag| %>
|
<% @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" style="cursor: pointer" > <%#= 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>
|
<a title="双击可编辑" ondblclick="rename_tag($(this),'<%= tag %>',<%= obj.id%>,<%= object_flag%>);"><%= tag %></a>
|
||||||
<!-- 对用户主页 是本人 ,对项目,需求,问题是管理员 -->
|
<!-- 对用户主页 是本人 ,对项目,需求,问题是管理员 -->
|
||||||
<% case object_flag %>
|
<% case object_flag %>
|
||||||
<% when '10' %>
|
<% when '10' %>
|
||||||
|
|
16
db/schema.rb
16
db/schema.rb
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20150930011457) do
|
ActiveRecord::Schema.define(:version => 20150917022239) do
|
||||||
|
|
||||||
create_table "activities", :force => true do |t|
|
create_table "activities", :force => true do |t|
|
||||||
t.integer "act_id", :null => false
|
t.integer "act_id", :null => false
|
||||||
|
@ -575,8 +575,6 @@ ActiveRecord::Schema.define(:version => 20150930011457) do
|
||||||
t.integer "viewed"
|
t.integer "viewed"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.string "secret_key"
|
|
||||||
t.integer "status"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "forums", :force => true do |t|
|
create_table "forums", :force => true do |t|
|
||||||
|
@ -785,6 +783,16 @@ ActiveRecord::Schema.define(:version => 20150930011457) do
|
||||||
|
|
||||||
add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id"
|
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|
|
create_table "journal_replies", :id => false, :force => true do |t|
|
||||||
t.integer "journal_id"
|
t.integer "journal_id"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
|
@ -903,7 +911,6 @@ ActiveRecord::Schema.define(:version => 20150930011457) do
|
||||||
t.datetime "updated_on", :null => false
|
t.datetime "updated_on", :null => false
|
||||||
t.boolean "locked", :default => false
|
t.boolean "locked", :default => false
|
||||||
t.integer "sticky", :default => 0
|
t.integer "sticky", :default => 0
|
||||||
t.integer "reply_id"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "messages", ["author_id"], :name => "index_messages_on_author_id"
|
add_index "messages", ["author_id"], :name => "index_messages_on_author_id"
|
||||||
|
@ -1369,7 +1376,6 @@ ActiveRecord::Schema.define(:version => 20150930011457) do
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.text "description"
|
t.text "description"
|
||||||
t.string "subject"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "taggings", :force => true do |t|
|
create_table "taggings", :force => true do |t|
|
||||||
|
|
|
@ -752,7 +752,7 @@ function search_tag_attachment(url,tag_name,q,course_id,sort)
|
||||||
//clearTimeout(clickFunction);
|
//clearTimeout(clickFunction);
|
||||||
clickFunction = setTimeout(function() {
|
clickFunction = setTimeout(function() {
|
||||||
search_func()
|
search_func()
|
||||||
}, 200);
|
}, 500);
|
||||||
function search_func(){
|
function search_func(){
|
||||||
if(isdb!= false ) return;
|
if(isdb!= false ) return;
|
||||||
$.get(
|
$.get(
|
||||||
|
|
|
@ -722,7 +722,7 @@ a.wzan_visited{background:url(../images/new_project/public_icon.png) 0px -503px
|
||||||
.files_tag{ width:670px; min-height:22px;margin-bottom:10px;}/* overflow:hidden; */
|
.files_tag{ width:670px; min-height:22px;margin-bottom:10px;}/* overflow:hidden; */
|
||||||
/*padding:1px 10px 修改原因,padding会导致内部输入框和外边框有边距*/
|
/*padding:1px 10px 修改原因,padding会导致内部输入框和外边框有边距*/
|
||||||
a.files_tag_icon{ width:auto;background:#e2f3f9; color:#54aeca; border:1px solid #bbe2ef; padding:1px 5px; float:left; margin-right:10px;margin-bottom:10px; }
|
a.files_tag_icon{ width:auto;background:#e2f3f9; color:#54aeca; border:1px solid #bbe2ef; padding:1px 5px; float:left; margin-right:10px;margin-bottom:10px; }
|
||||||
span.files_tag_icon{ width:auto;background:#e2f3f9; color:#54aeca; border:1px solid #bbe2ef; padding:1px 5px; float:left; margin-right:10px;margin-bottom:10px; }
|
span.files_tag_icon{ width:auto;background:#e2f3f9; color:#54aeca; border:1px solid #bbe2ef; padding:1px 5px; float:left; margin-right:10px;margin-bottom:10px;cursor: pointer }
|
||||||
a.files_tag_select{ background:#64bdd9; color:#fff; border:1px solid #bbe2ef; padding:1px 1px; float:left; margin-right:10px;margin-bottom:10px;}/* padding:1px 10px;*/
|
a.files_tag_select{ background:#64bdd9; color:#fff; border:1px solid #bbe2ef; padding:1px 1px; float:left; margin-right:10px;margin-bottom:10px;}/* padding:1px 10px;*/
|
||||||
|
|
||||||
/* 20150423作业评分*/
|
/* 20150423作业评分*/
|
||||||
|
|
|
@ -48,6 +48,9 @@ ol.linenums { margin-top: 0; margin-bottom: 0;line-height: 15px;margin-left: 0px
|
||||||
list-style-type: decimal;
|
list-style-type: decimal;
|
||||||
margin-left: 10px !important;
|
margin-left: 10px !important;
|
||||||
}
|
}
|
||||||
|
.linenums li {
|
||||||
|
margin-left: 0px !important;
|
||||||
|
}
|
||||||
li.L0,
|
li.L0,
|
||||||
li.L1,
|
li.L1,
|
||||||
li.L2,
|
li.L2,
|
||||||
|
|
|
@ -221,6 +221,7 @@ a:hover.talk_btn{ background:#2a9dc1;}
|
||||||
/****讨论区内页***/
|
/****讨论区内页***/
|
||||||
.mt0{ margin-top:0px;}
|
.mt0{ margin-top:0px;}
|
||||||
.talk_info{ color:#7d7d7d; margin-left:60px; margin-top:10px;}
|
.talk_info{ color:#7d7d7d; margin-left:60px; margin-top:10px;}
|
||||||
|
.issue_desc li{list-style-type: decimal;margin-left: 20px;}
|
||||||
.talk_info img {max-width:100%;}
|
.talk_info img {max-width:100%;}
|
||||||
a.talk_edit{ color:#426e9a; margin-right:5px;}
|
a.talk_edit{ color:#426e9a; margin-right:5px;}
|
||||||
a:hover.talk_edit{ color:#ff5722;}
|
a:hover.talk_edit{ color:#ff5722;}
|
||||||
|
|
Loading…
Reference in New Issue