<%= link_to image_tag(url_to_avatar(reply.user),:width => '32',:height => '32'), user_path(reply.user),:class => "users_pic_sub fl mr5" %>
- <%= link_to "#{reply.user.login} : ".html_safe, user_path(reply.user),:class => 'course_name fl c_blue02 ', :target => "_blank"%>
-
回复:
+ <%= link_to "#{reply.user.login} ".html_safe, user_path(reply.user),:class => 'course_name fl c_blue02 ', :target => "_blank"%>
+
回复
<%= link_to "#{parent_jour.user.login} : ".html_safe, user_path(parent_jour.user),:class => 'course_name fl c_blue02 mr5 ', :target => "_blank"%>
<%= reply.notes.html_safe %>
From a52c9062170586f16c4825778fc505853ee7f419 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 31 Jul 2015 14:18:32 +0800
Subject: [PATCH 3/8] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=95=99=E8=A8=80?=
=?UTF-8?q?=E7=95=8C=E9=9D=A2=E6=8F=92=E4=BB=B6=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/users/_user_jour_reply.html.erb | 14 +++++-----
public/javascripts/user.js | 34 +++++++++++++++++++++++
2 files changed, 41 insertions(+), 7 deletions(-)
diff --git a/app/views/users/_user_jour_reply.html.erb b/app/views/users/_user_jour_reply.html.erb
index 8f775c0fa..eb44852bb 100644
--- a/app/views/users/_user_jour_reply.html.erb
+++ b/app/views/users/_user_jour_reply.html.erb
@@ -13,24 +13,24 @@
<%= time_tag(reply.created_on).html_safe%>
- <%= link_to l(:button_reply),'javascript:void(0);',:nhname=>"reply_btn", :class => "ml5 c_purple" %>
+ <%= link_to l(:button_reply),'javascript:void(0);',:nhname=>"sub_reply_btn", :class => "ml5 c_purple" %>
<% if User.current.admin? || reply.user == User.current%>
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user},
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "c_purple ml5", :title => l(:button_delete)) %>
<% end %>
-
+
diff --git a/public/javascripts/user.js b/public/javascripts/user.js
index 5cf18590a..30bc44120 100644
--- a/public/javascripts/user.js
+++ b/public/javascripts/user.js
@@ -104,6 +104,40 @@ $(function(){
},300);
});
+ $("a[nhname='sub_reply_btn']").live('click',function(){
+ var params = {};
+ params.kindutil = K;
+ params.container = $(this).parent().parent('div');
+ params.div_form = $("div[nhname='sub_div_form']",params.container);
+ params.form = $("form",params.div_form);
+ params.textarea = $("textarea[name='sub_user_notes']",params.div_form);
+ params.textarea.prev('div').css("height","60px");
+ params.contentmsg = $("p[nhname='sub_contentmsg']",params.div_form);
+ params.toolbar_container = $("div[nhname='sub_toolbar_container']",params.div_form);
+ params.cancel_btn = $("a[nhname='sub_cancel_btn']",params.div_form);
+ params.submit_btn = $("a[nhname='sub_submit_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);
+ toggleAndSettingWordsVal(params.div_form, params.textarea);
+ });
+ params.submit_btn.click(function(){
+ params.form.submit();
+ });
+ params.textarea.data('init',1);
+ }
+ params.cancel_btn.click();
+ setTimeout(function(){
+ if(!params.div_form.is(':hidden')){
+ params.textarea.show();
+ params.textarea.focus();
+ params.textarea.hide();
+ }
+ },300);
+ });
+
$("div[nhname='new_message']").each(function(){
var params = {};
params.kindutil = K;
From f0552ad36753f03fdc60081cb2589a882e241cec Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 31 Jul 2015 14:19:28 +0800
Subject: [PATCH 4/8] =?UTF-8?q?=E4=BB=96=E4=BA=BA=E7=95=99=E8=A8=80?=
=?UTF-8?q?=E7=95=8C=E9=9D=A2=E8=BF=9B=E5=85=A5=E5=8D=B4=E6=98=AF=E6=88=91?=
=?UTF-8?q?=E7=9A=84=E7=95=99=E8=A8=80=E5=88=97=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/layouts/base_users_new.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/layouts/base_users_new.html.erb b/app/views/layouts/base_users_new.html.erb
index 4f0552bb5..a8d00bbac 100644
--- a/app/views/layouts/base_users_new.html.erb
+++ b/app/views/layouts/base_users_new.html.erb
@@ -164,7 +164,7 @@
<% end %>
- <%= link_to "留言",feedback_path(User.current),:class => "f14 c_blue02"%>
+ <%= link_to "留言",feedback_path(@user),:class => "f14 c_blue02"%>
From e2ec37026cfd09c6169b4a7d96b26bb4fb592fe9 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 31 Jul 2015 14:46:05 +0800
Subject: [PATCH 5/8] =?UTF-8?q?=E4=B8=8D=E6=98=AF=E8=87=AA=E5=B7=B1?=
=?UTF-8?q?=E7=9A=84=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5=E4=B9=9F=E6=98=BE?=
=?UTF-8?q?=E7=A4=BAtop=5Fview?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/users/show.html.erb | 2 --
1 file changed, 2 deletions(-)
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 2a9e96432..e53d734c6 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -1,6 +1,5 @@
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"user" %>
<% @center_flag = (User.current == @user) %>
-<% if @center_flag %>
<% if @user.allowed_to?(:add_project, nil, :global => true) %>
@@ -17,7 +16,6 @@
<% end %>
-<% end %>
From a74409fa048e7a3a58d9a74c868e4037e9fa785e Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 31 Jul 2015 15:18:57 +0800
Subject: [PATCH 6/8] =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E5=AD=90=E7=95=99?=
=?UTF-8?q?=E8=A8=80=E4=B8=8D=E6=88=90=E5=8A=9F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/users/_user_jour_reply.html.erb | 2 +-
app/views/words/create_reply.js.erb | 5 ++++-
public/javascripts/user.js | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/app/views/users/_user_jour_reply.html.erb b/app/views/users/_user_jour_reply.html.erb
index eb44852bb..8822fdc56 100644
--- a/app/views/users/_user_jour_reply.html.erb
+++ b/app/views/users/_user_jour_reply.html.erb
@@ -26,7 +26,7 @@
-
+
取消
diff --git a/app/views/words/create_reply.js.erb b/app/views/words/create_reply.js.erb
index a7f0b42c7..6aad1bfb5 100644
--- a/app/views/words/create_reply.js.erb
+++ b/app/views/words/create_reply.js.erb
@@ -1,7 +1,10 @@
<% if @save_succ %>
<% if !@jfm.nil? && @jfm.jour_type == 'Principal' %>
$("#<%= @jfm.m_parent_id%>").children("div[nhname='reply_list']").prepend("<%= escape_javascript( render(:partial => 'users/user_jour_reply',:locals => {:reply=>@jfm} )) %>");
- $("#<%= @jfm.m_reply_id%>").children("div[nhname='div_form']").hide();
+ div_1 = $("#<%= @jfm.m_reply_id%>").children("div[nhname='div_form']");
+ div_1.hide();
+ div_2 = $("#<%= @jfm.m_reply_id%>").children("div[nhname='sub_div_form']");
+ div_2.hide();
<% else %>
var pre_append = $('<%= j(
diff --git a/public/javascripts/user.js b/public/javascripts/user.js
index 30bc44120..c7690a015 100644
--- a/public/javascripts/user.js
+++ b/public/javascripts/user.js
@@ -110,7 +110,7 @@ $(function(){
params.container = $(this).parent().parent('div');
params.div_form = $("div[nhname='sub_div_form']",params.container);
params.form = $("form",params.div_form);
- params.textarea = $("textarea[name='sub_user_notes']",params.div_form);
+ params.textarea = $("textarea[name='user_notes']",params.div_form);
params.textarea.prev('div').css("height","60px");
params.contentmsg = $("p[nhname='sub_contentmsg']",params.div_form);
params.toolbar_container = $("div[nhname='sub_toolbar_container']",params.div_form);
From d5e97c6131f9acc33eab7cf57ffc74514233788e Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 31 Jul 2015 15:25:01 +0800
Subject: [PATCH 7/8] =?UTF-8?q?1=E3=80=81=E7=95=99=E8=A8=80=E7=95=8C?=
=?UTF-8?q?=E9=9D=A2=E6=98=BE=E7=A4=BAtop=5Fview=202=E3=80=81=E7=95=99?=
=?UTF-8?q?=E8=A8=80=E7=95=8C=E9=9D=A2=E5=88=A0=E9=99=A4=E9=83=A8=E5=88=86?=
=?UTF-8?q?=E7=95=99=E8=A8=80=E5=90=8E=E6=8A=A5=E9=94=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/users/_user_jour_reply.html.erb | 68 ++++++++++++-----------
app/views/users/user_newfeedback.html.erb | 14 ++++-
2 files changed, 46 insertions(+), 36 deletions(-)
diff --git a/app/views/users/_user_jour_reply.html.erb b/app/views/users/_user_jour_reply.html.erb
index 8822fdc56..ee94cb35a 100644
--- a/app/views/users/_user_jour_reply.html.erb
+++ b/app/views/users/_user_jour_reply.html.erb
@@ -1,38 +1,40 @@
- <% parent_jour = JournalsForMessage.where("id = #{reply.m_reply_id}").first %>
-
- <%= link_to image_tag(url_to_avatar(reply.user),:width => '32',:height => '32'), user_path(reply.user),:class => "users_pic_sub fl mr5" %>
-
- <%= link_to "#{reply.user.login} ".html_safe, user_path(reply.user),:class => 'course_name fl c_blue02 ', :target => "_blank"%>
-
回复
- <%= link_to "#{parent_jour.user.login} : ".html_safe, user_path(parent_jour.user),:class => 'course_name fl c_blue02 mr5 ', :target => "_blank"%>
-
- <%= reply.notes.html_safe %>
+<% parent_jour = JournalsForMessage.where("id = #{reply.m_reply_id}").first %>
+<% if parent_jour%>
+
+ <%= link_to image_tag(url_to_avatar(reply.user),:width => '32',:height => '32'), user_path(reply.user),:class => "users_pic_sub fl mr5" %>
+
+ <%= link_to "#{reply.user.login} ".html_safe, user_path(reply.user),:class => 'course_name fl c_blue02 ', :target => "_blank"%>
+
回复
+ <%= link_to "#{parent_jour.user.login} : ".html_safe, user_path(parent_jour.user),:class => 'course_name fl c_blue02 mr5 ', :target => "_blank"%>
+
+ <%= reply.notes.html_safe %>
+
-
<%= time_tag(reply.created_on).html_safe%>
-
- <%= link_to l(:button_reply),'javascript:void(0);',:nhname=>"sub_reply_btn", :class => "ml5 c_purple" %>
- <% if User.current.admin? || reply.user == User.current%>
- <%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user},
- :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "c_purple ml5", :title => l(:button_delete)) %>
- <% end %>
-
-
-
-
-
-
-
-
-
-
-
- 取消
- 发布
-
+
+ <%= link_to l(:button_reply),'javascript:void(0);',:nhname=>"sub_reply_btn", :class => "ml5 c_purple" %>
+ <% if User.current.admin? || reply.user == User.current%>
+ <%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user},
+ :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "c_purple ml5", :title => l(:button_delete)) %>
+ <% end %>
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 发布
+
+
+
-
-
-
\ No newline at end of file
+
+<% end%>
\ No newline at end of file
diff --git a/app/views/users/user_newfeedback.html.erb b/app/views/users/user_newfeedback.html.erb
index 91c049f7a..a8107ce5f 100644
--- a/app/views/users/user_newfeedback.html.erb
+++ b/app/views/users/user_newfeedback.html.erb
@@ -1,8 +1,16 @@
+
+
+ <% if @user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true) %>
+
新建课程
+ <% end %>
+
+
+
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"user" %>
-
-
用户留言
-
+
+
+
<%= form_for('new_form',:url => leave_user_message_path(@user.id),:method => "post") do |f|%>
From d5cf0c65a7311a6ab54d837151bfa6358f1a76b1 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 31 Jul 2015 15:38:50 +0800
Subject: [PATCH 8/8] =?UTF-8?q?=E9=AA=8C=E8=AF=81=E6=AD=A3=E7=A1=AE?=
=?UTF-8?q?=E5=92=8C=E9=94=99=E8=AF=AF=E4=B9=8B=E5=90=8E=EF=BC=8C=E5=8F=AF?=
=?UTF-8?q?=E4=BB=A5=E7=BB=A7=E7=BB=AD=E7=82=B9=E5=87=BB=E8=BF=9B=E8=A1=8C?=
=?UTF-8?q?=E9=AA=8C=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/homework_common/programing_test.js.erb | 2 +-
public/stylesheets/public.css | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/views/homework_common/programing_test.js.erb b/app/views/homework_common/programing_test.js.erb
index b6bcfdc86..74ec9439a 100644
--- a/app/views/homework_common/programing_test.js.erb
+++ b/app/views/homework_common/programing_test.js.erb
@@ -1,2 +1,2 @@
-$("#test_send_<%= @index%>").replaceWith("
fl ml5 mt1'><%= @result == 0 ? '正确' : '错误'%> ");
+$("#test_send_<%= @index%>").replaceWith("
fl ml5 mt1' onclick='programing_test(<%= @index%>)' id='test_send_<%= @index%>'><%= @result == 0 ? '正确' : '错误'%> ");
$("#test_result_<%= @index%>").val("<%= @result%>");
\ No newline at end of file
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index 1bf889cba..576a9da0c 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -170,9 +170,9 @@ a:hover.grey_btn{ background:#717171; color:#fff;}
a.green_btn{background:#28be6c;color:#fff;font-size:14px; font-weight:normal; padding:2px 8px; text-align:center;cursor: pointer;}
a:hover.green_btn{ background:#14ad5a;}
.blue_btn{ background:#64bdd9; color:#fff; font-size:14px; font-weight:normal;padding:2px 8px; text-align:center;}
-a.blue_btn{background:#64bdd9;color:#fff;font-size:14px; font-weight:normal; padding:2px 8px; text-align:center;}
+a.blue_btn{background:#64bdd9;color:#fff;font-size:14px; font-weight:normal; padding:2px 8px; text-align:center;cursor: pointer;}
.red_btn{ background:red; color:#fff; font-size:14px; font-weight:normal;padding:2px 8px; text-align:center;}
-a.red_btn{background:red; color:#fff;font-size:14px; font-weight:normal; padding:2px 8px; text-align:center;}
+a.red_btn{background:red; color:#fff;font-size:14px; font-weight:normal; padding:2px 8px; text-align:center;cursor: pointer;}
a.orange_btn_homework{background:#d63502;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center;}
a:hover.blue_btn{ background:#329cbd;cursor: pointer;}
a.orange_btn{ background:#ff5722;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center; }