<%= form_for('new_form',:url => leave_user_message_path(@user.id),:method => "post") do |f|%>
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/db/schema.rb b/db/schema.rb
index 3791eb248..29aeb1f16 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20150730093403) do
+ActiveRecord::Schema.define(:version => 20150730130816) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -635,6 +635,7 @@ ActiveRecord::Schema.define(:version => 20150730093403) do
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "result", :default => 0
+ t.text "error_msg"
end
create_table "homework_users", :force => true do |t|
diff --git a/public/javascripts/user.js b/public/javascripts/user.js
index 5cf18590a..c7690a015 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='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;
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; }