Merge branch 'develop' of 10.0.47.245:/home/trustie2 into develop
Conflicts: app/views/words/_message.html.erb app/views/words/_new_respond.html.erb
This commit is contained in:
commit
112a2b4da6
|
@ -1,5 +1,45 @@
|
|||
<script>
|
||||
var W3CDOM = document.createElement && document.getElementsByTagName;
|
||||
|
||||
window.onload = setMaxLength;
|
||||
|
||||
function setMaxLength() {
|
||||
if (!W3CDOM) return;
|
||||
var textareas = document.getElementsByTagName('textarea');
|
||||
var counter = document.createElement('div');
|
||||
counter.className = 'counter';
|
||||
for (var i=0;i<textareas.length;i++) {
|
||||
if (textareas[i].getAttribute('maxlength')) {
|
||||
var counterClone = counter.cloneNode(true);
|
||||
counterClone.innerHTML = '<span>0</span>/'+textareas[i].getAttribute('maxlength');
|
||||
textareas[i].parentNode.insertBefore(counterClone,textareas[i].nextSibling);
|
||||
textareas[i].relatedElement = counterClone.getElementsByTagName('span')[0];
|
||||
textareas[i].onkeyup = textareas[i].onchange = checkMaxLength;
|
||||
textareas[i].onkeyup();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function checkMaxLength() {
|
||||
var maxLength = this.getAttribute('maxlength');
|
||||
var currentLength = this.value.length;
|
||||
alert(currentLength);
|
||||
if (currentLength >= maxLength) {
|
||||
this.relatedElement.className = 'toomuch';
|
||||
}
|
||||
else {
|
||||
this.relatedElement.className = '';
|
||||
}
|
||||
this.relatedElement.firstChild.nodeValue = currentLength;
|
||||
}
|
||||
|
||||
</script>
|
||||
<%= form_tag({:controller => 'projects', :action => 'project_respond'}) do %>
|
||||
<%= text_area_tag 'project_respond', "", :class => 'noline', :required => true, :style => "resize: none;", :rows => 6, :placeholder => l(:label_projects_feedback_respond_content) %>
|
||||
<%= text_area_tag 'project_respond', "",
|
||||
:class => 'noline', :required => true,
|
||||
:style => "resize: none;", :rows => 6,
|
||||
:placeholder => l(:label_projects_feedback_respond_content),
|
||||
:maxlength => 250 %>
|
||||
|
||||
<%= hidden_field_tag 'reference_id', params[:reference_id], :value => journal.id %>
|
||||
<%= submit_tag l(:button_projects_feedback_respond), :name => nil , :class => "bid_btn"%>
|
||||
|
|
|
@ -75,6 +75,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$("a").attr("target", "_blank");
|
||||
});
|
||||
|
||||
function showInfo(id, content) {
|
||||
var text = $('#' + id);
|
||||
if (text.val() == '') {
|
||||
|
@ -90,10 +94,10 @@
|
|||
</style>
|
||||
|
||||
<%= stylesheet_link_tag 'welcome' %>
|
||||
<div class="body_resize">
|
||||
|
||||
<div class="left" style="float: left; height: 445px; width: 50%; margin-left: 30px;">
|
||||
<ul class="welcome-message-list" style="width: 90%; ">
|
||||
|
||||
<div class="left" style="float: left; min-height: 470px; width: 48%;">
|
||||
<ul class="welcome-message-list">
|
||||
<div class="forum-topic" style="height: 25px;">
|
||||
<h3 style="color: rgb(21, 188, 207);margin-left: 8px;"><strong>贴吧动态</strong></h3>
|
||||
|
||||
|
@ -108,7 +112,7 @@
|
|||
<%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;", :target => "_blank" %>
|
||||
</span>
|
||||
<br>
|
||||
<span style="margin-left: 24px; color: rgb(172, 174, 177); white-space: nowrap; font-size: 9pt !important;;"><%=time_tag_welcome(topic_last_time topic)%>前</span>
|
||||
<span style="margin-left: 24px; color: rgb(172, 174, 177); white-space: nowrap; font-size: 9pt !important;;"><%= l(:field_updated_on) %><%=time_tag_welcome(topic_last_time topic)%>前</span>
|
||||
<span style="margin-left: 8px; margin-bottom: 0px; color: rgb(172, 174, 177) !important; white-space: nowrap;">
|
||||
由 <%= link_to topic.author ? topic.author : 'Anonymous', user_path(topic.author_id), :style => "font-size: 9pt !important; color: rgb(17, 102, 173);", :target => "_blank" %> 发表
|
||||
</span>
|
||||
|
@ -120,8 +124,8 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="right" style="float: right; margin-right: 10px; height: 445px; width: 45%; ">
|
||||
<ul class="user-welcome-message-list" style="width: 94%; margin-top: 0px;">
|
||||
<div class="right" style="float: right; min-height: 470px; width: 48%; ">
|
||||
<ul class="user-welcome-message-list">
|
||||
<h3 style="margin-left: -5px; color: rgb(21, 188, 207)"><strong>用户动态</strong></h3>
|
||||
<span style="margin-top: -30px;float: right; display: block;"><%= link_to "更多>>", { :controller => 'users', :action => 'index'}, :target => "_blank" %></span>
|
||||
<div class="user-message-box-list">
|
||||
|
@ -139,7 +143,7 @@
|
|||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
|
||||
<h3 style="margin-left: 5px; color: #e8770d;"><strong>热门项目</strong></h3>
|
||||
|
|
|
@ -1,21 +1,20 @@
|
|||
<% ids_r = 'reply_respond_form_'+ reply.id.to_s %>
|
||||
<li id='word_li_<%=reply.id.to_s%>' onmouseover="$('#<%= ids_r %>').show()" onmouseout="$('#<%= ids_r %>').hide()">
|
||||
<span class="portrait">
|
||||
<%= image_tag url_to_avatar(reply.user), :class => "avatar-3" %>
|
||||
<%= image_tag url_to_avatar(reply.user), :class => "avatar-3" %>
|
||||
</span>
|
||||
<div class="body">
|
||||
<% id = 'project_respond_form_'+ reply.id.to_s %>
|
||||
<span><%= link_to reply.user.name, user_path(reply.user) %>: </span>
|
||||
<span class="message-notes"> <%= reply.notes %></span>
|
||||
<%# ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||
|
||||
<div class="message-body">
|
||||
<% id = 'project_respond_form_'+ reply.id.to_s %>
|
||||
<p>
|
||||
<span><%= link_to reply.user.name, user_path(reply.user) %>: </span>
|
||||
<span class="message-notes"> <%= reply.notes %></span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="time"><%= format_time reply.created_on %></span>
|
||||
<span style="display: none; margin-left: 4px;" id='<%=ids_r%>' >
|
||||
<%= link_to l(:label_projects_feedback_respond),'',
|
||||
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{id}'), $('##{id} textarea'), '#{l(:label_reply_plural)} #{m_reply_id.user.show_name}: '); return false;"}
|
||||
%>
|
||||
|
||||
<% if @user == User.current || User.current.admin? || reply.user.id == User.current.id %>
|
||||
<%= 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 => "delete", :title => l(:button_delete)) %>
|
||||
|
|
|
@ -30,13 +30,14 @@
|
|||
</span>
|
||||
<div style="clear: both;"></div>
|
||||
<div id='<%= ids %>' class="respond-form">
|
||||
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal} %>
|
||||
</div>
|
||||
<div>
|
||||
<%= render :partial => "words/journal_reply", :locals => {:journal => journal } %>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal} %>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
<div>
|
||||
<%= render :partial => "words/journal_reply", :locals => {:journal => journal } %>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -1,9 +1,45 @@
|
|||
<script>
|
||||
var W3CDOM = document.createElement && document.getElementsByTagName;
|
||||
|
||||
window.onload = setMaxLength;
|
||||
|
||||
function setMaxLength() {
|
||||
if (!W3CDOM) return;
|
||||
var textareas = document.getElementsByTagName('textarea');
|
||||
var counter = document.createElement('div');
|
||||
counter.className = 'counter';
|
||||
for (var i=0;i<textareas.length;i++) {
|
||||
if (textareas[i].getAttribute('maxlength')) {
|
||||
var counterClone = counter.cloneNode(true);
|
||||
counterClone.innerHTML = '<span>0</span>/'+textareas[i].getAttribute('maxlength');
|
||||
textareas[i].parentNode.insertBefore(counterClone,textareas[i].nextSibling);
|
||||
textareas[i].relatedElement = counterClone.getElementsByTagName('span')[0];
|
||||
textareas[i].onkeyup = textareas[i].onchange = checkMaxLength;
|
||||
textareas[i].onkeyup();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function checkMaxLength() {
|
||||
var maxLength = this.getAttribute('maxlength');
|
||||
var currentLength = this.value.length;
|
||||
if (currentLength > maxLength)
|
||||
this.relatedElement.className = 'toomuch';
|
||||
else
|
||||
this.relatedElement.className = '';
|
||||
this.relatedElement.firstChild.nodeValue = currentLength;
|
||||
}
|
||||
|
||||
</script>
|
||||
<%= form_tag({:controller => 'words', :action => 'create_reply'}, :remote => true) do %>
|
||||
<%= text_area_tag 'user_notes', "", :class => 'noline', :style => "resize: none;", :rows => 4, :placeholder => l(:label_projects_feedback_respond_content) %>
|
||||
<%= text_area_tag 'user_notes', "", :class => 'noline',
|
||||
:style => "resize: none;", :rows => 4,
|
||||
:placeholder => l(:label_projects_feedback_respond_content),
|
||||
:maxlength => 250 %>
|
||||
|
||||
<%= hidden_field_tag 'reference_id', params[:reference_id], :value => journal.id %>
|
||||
<%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => m_reply_id.user.id %>
|
||||
<%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => m_reply_id.id %>
|
||||
<%= submit_tag l(:button_projects_feedback_respond), :name => nil , :class => "enterprise", :style => "margin-top: 1px;"%>
|
||||
<%= submit_tag l(:button_projects_feedback_respond), :name => nil , :class => "enterprise", :style => "float: right; margin-top: 1px; margin-right: 4px;"%>
|
||||
|
||||
<% end %>
|
|
@ -159,6 +159,7 @@ li {
|
|||
margin: 0px;
|
||||
padding: 0px;
|
||||
background-color: rgb(252, 252, 252);
|
||||
margin-top: 6px;
|
||||
}
|
||||
.d-p-index-newsource li,.d-p-index-hotproject ul.d-p-projectlist li{
|
||||
color: rgb(102, 102, 102);
|
||||
|
|
|
@ -2125,7 +2125,7 @@ ul.messages-for-user-reply li {
|
|||
display: none;
|
||||
width: 87%;
|
||||
margin: auto;
|
||||
clear:both;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.outer-message-for-use p {
|
||||
|
@ -2134,10 +2134,20 @@ ul.messages-for-user-reply li {
|
|||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.body p {
|
||||
.message-body p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin-top: 4px;
|
||||
margin-left: 4px;
|
||||
font-size: 9pt;
|
||||
}
|
||||
|
||||
.message-body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin-left: 40px;
|
||||
}
|
||||
|
||||
.counter {
|
||||
float: left;
|
||||
}
|
Loading…
Reference in New Issue