From 1ee00fcae433bbcf487c4dd8b5953129e9921dc2 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 25 Sep 2015 15:17:14 +0800 Subject: [PATCH 01/15] =?UTF-8?q?=E8=AE=BA=E5=9D=9B=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/_forum_list.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/forums/_forum_list.html.erb b/app/views/forums/_forum_list.html.erb index fbbe023a0..286219356 100644 --- a/app/views/forums/_forum_list.html.erb +++ b/app/views/forums/_forum_list.html.erb @@ -10,7 +10,7 @@ <%= link_to forum.name, forum_path(forum),:class=>"f16 linkBlue" %> -
<%= textAreailizable forum.description%>
+
<%= textAreailizable forum.description%>
创建者:<%= forum.creator.name %>
创建时间:<%= format_date(forum.created_at) %>
From 66ea9e3052f3a313b2ed7a44bfeda23c2644d4fd Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 25 Sep 2015 15:23:12 +0800 Subject: [PATCH 02/15] =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=B4=B4=E5=90=A7=20?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E4=B9=9F=E4=BC=9A=E8=A2=AB=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/_forum_tag_list.html.erb | 2 +- app/views/layouts/base_forums.html.erb | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/views/forums/_forum_tag_list.html.erb b/app/views/forums/_forum_tag_list.html.erb index 2a0257d63..b074cbca3 100644 --- a/app/views/forums/_forum_tag_list.html.erb +++ b/app/views/forums/_forum_tag_list.html.erb @@ -1,6 +1,6 @@ <% forum.tag_list.each do |tag|%> - <%= tag %> + <%= tag %> <%if forum.creator.id == User.current.id%> × <% end %> diff --git a/app/views/layouts/base_forums.html.erb b/app/views/layouts/base_forums.html.erb index 7ddfc85ea..6a980cc87 100644 --- a/app/views/layouts/base_forums.html.erb +++ b/app/views/layouts/base_forums.html.erb @@ -122,6 +122,12 @@ } } }); + + function del_confirm(){ + if(confirm('您确定要删除么?')){ + $("#del_link").click(); + } + } @@ -172,7 +178,8 @@ 编辑贴吧 - 删除贴吧 + 删除贴吧 + <% end %> From 0b932267c72fbb6e85761635d87f9081938db9ab Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Fri, 25 Sep 2015 15:26:40 +0800 Subject: [PATCH 03/15] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=88=AA=E6=AD=A2?= =?UTF-8?q?=E6=97=A5=E6=9C=9F=E5=BF=AB=E5=88=B0=E4=BA=86=E7=9A=84=E5=AE=BD?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/new_user.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 57541e149..8817dd325 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -555,7 +555,7 @@ a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;} .homepageNewsContent {width:355px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; } .homepageSystenMessageContent {width:291px; max-width:291px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden;text-overflow:ellipsis;max-height: 49px; } .homepageHomeworkContentWarn {width:110px; max-width:365px; margin-right:10px; font-size:12px; color:red; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; } -.homepageHomeworkContent {width:245px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; } +.homepageHomeworkContent {width:235px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; } .homepageNewsTime {width:75px; font-size:12px; color:#888888; display:block; text-align:right;} a.homepageWhite {color:#ffffff;} From 93542448e2d8c17ebe79b34e773e4e2cf224a219 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 25 Sep 2015 15:26:48 +0800 Subject: [PATCH 04/15] =?UTF-8?q?=E5=A6=82=E6=9E=9C=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E5=A4=9F=E4=BA=86=E5=88=A0=E9=99=A4=E9=94=AE=20=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E8=A2=AB=E5=B1=8F=E8=94=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/edit.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/forums/edit.html.erb b/app/views/forums/edit.html.erb index ef1fbc12b..c212e7b9d 100644 --- a/app/views/forums/edit.html.erb +++ b/app/views/forums/edit.html.erb @@ -14,7 +14,7 @@ n += 1; } } - if(n >= 160) + if(n >= 160 && event.keyCode != 8) event.returnValue = false; } }) From a61e60d1b9d876dc9de5c067361f7bfa5de60a23 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 25 Sep 2015 15:46:40 +0800 Subject: [PATCH 05/15] =?UTF-8?q?=E5=B8=96=E5=AD=90=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E4=BC=9A=E8=B6=85=E5=87=BA=E8=BE=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/memos/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index 4cafce30d..c15bd9bb8 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -56,7 +56,7 @@ <%= render :partial => "memos/praise_tread",:locals => {:obj => @memo,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%>
-
+
<%= @memo.content.html_safe%>
From 926bdd81e8916056d01491a20dbe86b2902445ea Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 25 Sep 2015 15:52:28 +0800 Subject: [PATCH 06/15] =?UTF-8?q?=E8=AE=BA=E5=9D=9B=E5=90=8D=E6=8D=A2?= =?UTF-8?q?=E8=A1=8C=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_forums.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/base_forums.html.erb b/app/views/layouts/base_forums.html.erb index 6a980cc87..366291691 100644 --- a/app/views/layouts/base_forums.html.erb +++ b/app/views/layouts/base_forums.html.erb @@ -149,7 +149,7 @@
-
" style="word-break: break-all; word-wrap:break-word;"><%= @forum.name%>
+
<%= @forum.name%>
吧主:<%= @forum.creator.name%>
回答:<%= @forum.memo_count %> 帖子:<%=@forum.topic_count%>
From c8cbab2d505e7cdd0bd22bc29321c0c7fa48bb2d Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 25 Sep 2015 15:55:29 +0800 Subject: [PATCH 07/15] =?UTF-8?q?=E7=81=AB=E7=8B=90=E6=B5=8F=E8=A7=88?= =?UTF-8?q?=E5=99=A8=20=E5=92=8C=20ie=E6=B5=8F=E8=A7=88=E5=99=A8=E7=9A=84e?= =?UTF-8?q?vent=E8=8E=B7=E5=BE=97=20=E5=92=8C=20=E9=98=BB=E6=AD=A2=20?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E4=B8=8D=E5=90=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/edit.html.erb | 43 ++++++++++++++++++++------------- app/views/forums/index.html.erb | 15 +++++++++--- public/javascripts/new_user.js | 15 +++++++++--- 3 files changed, 48 insertions(+), 25 deletions(-) diff --git a/app/views/forums/edit.html.erb b/app/views/forums/edit.html.erb index c212e7b9d..1fcbc6cab 100644 --- a/app/views/forums/edit.html.erb +++ b/app/views/forums/edit.html.erb @@ -1,23 +1,7 @@ <%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' ,'new_user' %> \ No newline at end of file diff --git a/app/views/forums/index.html.erb b/app/views/forums/index.html.erb index 8f5cb15cc..bb531b85c 100644 --- a/app/views/forums/index.html.erb +++ b/app/views/forums/index.html.erb @@ -49,7 +49,7 @@ $("#reorder_popu").removeClass("sortArrowActiveD"); add_class("reorder_time"); }); - document.getElementById('forum_name').onkeydown = function() + $('#forum_name').keypress( function(e) { var n = 0; var str = this.value; @@ -61,9 +61,16 @@ n += 1;//英文,不多说了 } } - if(n >= 160 && event.keyCode != 8) - event.returnValue = false; - } + if(n >= 160 && e.keyCode != 8) + if(document.all) + { + e.returnValue = false; + } + else + { + e.preventDefault(); + } + }) }); function check_and_submit(doc){ $("#error").html('').hide(); diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js index d2b67be5e..22c049ecc 100644 --- a/public/javascripts/new_user.js +++ b/public/javascripts/new_user.js @@ -337,7 +337,7 @@ var autoTextarea = function (elem, extra, maxHeight) { }; function limitStrsize(id,length){ - document.getElementById(id).onkeydown = function() + $('#'+id).keypress(function(e) { var n = 0; var str = this.value; @@ -350,9 +350,16 @@ function limitStrsize(id,length){ } } - if(n >= length && event.keyCode !== 8) - event.returnValue = false; - } + if(n >= length && e.keyCode !== 8) + if(document.all) + { + e.returnValue = false; + } + else + { + e.preventDefault(); + } + }) } /////////////////////////////////////////////////////////////////////////////////////创建项目 From 272bd2730a032b0160cb7b348e2ede5594256e63 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Fri, 25 Sep 2015 16:05:19 +0800 Subject: [PATCH 08/15] =?UTF-8?q?=E6=B6=88=E6=81=AF=E4=B8=AD=EF=BC=8C?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BA=86=E9=97=AE=E9=A2=98=E4=B8=BA=E7=95=99?= =?UTF-8?q?=E8=A8=80=E6=97=B6=EF=BC=8C=E5=8E=BB=E6=8E=89=E2=80=9C=E7=95=99?= =?UTF-8?q?=E8=A8=80=E5=86=85=E5=AE=B9=E2=80=9D=E5=87=A0=E4=B8=AA=E5=AD=97?= =?UTF-8?q?=EF=BC=9B=20=E5=86=85=E5=AE=B9=E6=98=BE=E7=A4=BA=E4=B8=BB?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/users_helper.rb | 2 +- app/views/users/user_messages.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 4923c629e..f6b083b4d 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -464,7 +464,7 @@ module UsersHelper no_html = "message" arr = details_to_strings(journal.details, no_html) unless journal.notes.blank? - arr << "留言内容:" + journal.notes + arr << journal.notes end str = '' arr.each { |item| str = str+item } diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index 550089627..af533fe97 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -542,7 +542,7 @@ 更新了问题状态:
  • - <%= link_to get_issue_des_update(ma.forge_message).html_safe, + <%= link_to ma.forge_message.journalized.subject, issue_path(:id => ma.forge_message.journalized_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :onmouseover =>"message_titile_show($(this),event)", :onmouseout => "message_titile_hide($(this))" %> From 959d3f1a93bfce658be746e9e422abffb28b4c11 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 25 Sep 2015 16:11:12 +0800 Subject: [PATCH 09/15] =?UTF-8?q?=E4=B8=87=E4=B8=80=E9=95=BF=E5=BA=A6?= =?UTF-8?q?=E8=BF=87=E5=A4=A7=EF=BC=8C=E9=98=BB=E6=AD=A2=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/memos/edit.html.erb | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/app/views/memos/edit.html.erb b/app/views/memos/edit.html.erb index 0efa57ccc..4a515ee1f 100644 --- a/app/views/memos/edit.html.erb +++ b/app/views/memos/edit.html.erb @@ -1,11 +1,16 @@ <%= javascript_include_tag 'new_user'%> \ No newline at end of file From e0c338b497649e67b47c4a7024dd2032838a911f Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 25 Sep 2015 16:20:51 +0800 Subject: [PATCH 10/15] =?UTF-8?q?=E9=99=90=E5=88=B6=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/_form_edit_mode.html.erb | 4 ++-- app/views/forums/edit.html.erb | 2 +- app/views/forums/index.html.erb | 8 +++++--- app/views/forums/show.html.erb | 4 ++-- public/javascripts/new_user.js | 2 +- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/app/views/forums/_form_edit_mode.html.erb b/app/views/forums/_form_edit_mode.html.erb index 9c0ec27bd..ade5a24c4 100644 --- a/app/views/forums/_form_edit_mode.html.erb +++ b/app/views/forums/_form_edit_mode.html.erb @@ -9,10 +9,10 @@
    - +
    - +
    diff --git a/app/views/forums/edit.html.erb b/app/views/forums/edit.html.erb index 1fcbc6cab..07570b687 100644 --- a/app/views/forums/edit.html.erb +++ b/app/views/forums/edit.html.erb @@ -54,7 +54,7 @@ $('#forum_name').keypress(function(e) { var n = 0; - var str = this.value; + var str = this.val().trim(); for (i = 0; i < str.length; i++) { var leg = str.charCodeAt(i);//ASCII码 if (leg > 255) { diff --git a/app/views/forums/index.html.erb b/app/views/forums/index.html.erb index bb531b85c..055b83f50 100644 --- a/app/views/forums/index.html.erb +++ b/app/views/forums/index.html.erb @@ -51,8 +51,9 @@ }); $('#forum_name').keypress( function(e) { + alert(1) var n = 0; - var str = this.value; + var str = this.val().trim(); for (i = 0; i < str.length; i++) { var leg = str.charCodeAt(i);//ASCII码 if (leg > 255) {//大于255的都是中文 @@ -61,6 +62,7 @@ n += 1;//英文,不多说了 } } + console.log(n) if(n >= 160 && e.keyCode != 8) if(document.all) { @@ -136,14 +138,14 @@ <%= form_tag({:controller => 'forums',:action=>'create',:format=>'js'},:method => 'post',:remote=>'true') do |f| %>
    - +
    - +
    - +