diff --git a/app/models/system_message.rb b/app/models/system_message.rb
index 4802ba252..83e1ef615 100644
--- a/app/models/system_message.rb
+++ b/app/models/system_message.rb
@@ -1,4 +1,5 @@
class SystemMessage < ActiveRecord::Base
attr_accessible :content, :id, :user_id
belongs_to :user
+ validates_length_of :content, maximum: 255
end
diff --git a/app/views/admin/messages.html.erb b/app/views/admin/messages.html.erb
index 10f20e2a0..03fa80e75 100644
--- a/app/views/admin/messages.html.erb
+++ b/app/views/admin/messages.html.erb
@@ -3,7 +3,7 @@
<%=l(:label_system_message)%>
- <%= form_for(@admin_messages) do |f| %>
+ <%= form_for(@admin_messages, :html => {:id =>'system_message', :multipart => true}) do |f| %>
<%= f.kindeditor :content, :edit_id => 'system_message',
:width => '87%',
@@ -11,9 +11,32 @@
:no_label => true
%>
+
<%= f.submit l(:label_submit),:class => "small", :onclick => "system_message.sync;" %>
<% end %>
+
diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb
index c59930742..fdfa1eaf7 100644
--- a/app/views/users/user_messages.html.erb
+++ b/app/views/users/user_messages.html.erb
@@ -55,7 +55,13 @@
<%= link_to usm.content.html_safe, {:controller => 'system_messages', :action => 'index'},
:class =>"newsGrey",
- :title => "#{usm.content.html_safe}" %>
+ :onmouseover =>"message_titile_show($(this),event);",
+ :onmouseout => "message_titile_hide($(this));"
+ %>
+
+
+ <%= ma.content.html_safe%>
+
<%= time_tag(usm.created_at).html_safe %>
<% end %>
@@ -325,7 +331,13 @@
<%= link_to ma.content.html_safe, {:controller => 'system_messages', :action => 'index'},
:class =>"newsGrey",
- :title => "#{ma.content.html_safe}" %>
+ :onmouseover =>"message_titile_show($(this),event);",
+ :onmouseout => "message_titile_hide($(this));"
+ %>
+
+
+ <%= ma.content.html_safe%>
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>