Merge branch 'szzh' into develop
This commit is contained in:
commit
1637977159
|
@ -107,7 +107,7 @@
|
||||||
<!--邀请加入-->
|
<!--邀请加入-->
|
||||||
<div class="subNavBox">
|
<div class="subNavBox">
|
||||||
<% if User.current.member_of?(@project) %>
|
<% if User.current.member_of?(@project) %>
|
||||||
<div class="subNav currentDd currentDt subNav_jiantou" id="expand_tools_expand_invit" nhtype="toggle4cookie" data-id="expand_invit" data-target="#navContent_invit">
|
<div class="subNav currentDd currentDt subNav_jiantou" id="expand_tools_expand_invit" nhtype="toggle4cookie" data-id="expand_invit" data-target="#navContent_invit" data-val="expand">
|
||||||
<%= l(:label_invite)%>
|
<%= l(:label_invite)%>
|
||||||
</div>
|
</div>
|
||||||
<ul class="navContent " style="display:block" id="navContent_invit">
|
<ul class="navContent " style="display:block" id="navContent_invit">
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<%= link_to l(:button_create), "javascript:void(0)", :onclick => 'submitNews();', :onmouseover => 'submitFocus(this);', :class => 'blue_btn fl c_white' %>
|
<%= link_to l(:button_create), "javascript:void(0)", :onclick => 'submitNews();', :onmouseover => 'submitFocus(this);', :class => 'blue_btn fl c_white' %>
|
||||||
<%= link_to l(:button_cancel), project_news_index_path(@project), :onclick => '$("#add-news").hide()', :class => 'blue_btn grey_btn fl c_white' %>
|
<%= link_to l(:button_cancel), project_news_index_path(@project), :onclick => '$("#add-news").hide()', :class => 'blue_btn grey_btn fl c_white' %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to l(:button_save), "javascript:void(0)", :onclick => "submitNews();",:onmouseover => 'this.focus()',:class => 'blue_btn fl c_white' %>
|
<%= link_to l(:button_save), "javascript:void(0)", :onclick => "submitNews();",:onmouseover => 'this.focus()',:class => 'blue_btn fl c_white'%>
|
||||||
<%= link_to l(:button_cancel), news_path(@news), :class => 'blue_btn grey_btn fl c_white' %>
|
<%= link_to l(:button_cancel), news_path(@news), :class => 'blue_btn grey_btn fl c_white' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
|
@ -1,64 +1,6 @@
|
||||||
<div class="project_r_h">
|
<div class="project_r_h">
|
||||||
<h2 class="project_h2"><%= l(:label_news) %></h2>
|
<h2 class="project_h2"><%= l(:label_news) %></h2>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
|
||||||
function regexTitle()
|
|
||||||
{
|
|
||||||
var name = $("#news_title").val();
|
|
||||||
if(name.length ==0)
|
|
||||||
{
|
|
||||||
$("#title_notice_span").text("<%= l(:label_title_blank)%>");
|
|
||||||
$("#title_notice_span").css('color','#ff0000');
|
|
||||||
$("#title_notice_span").focus();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else if(name.length <= 60)
|
|
||||||
{
|
|
||||||
$("#title_notice_span").text("<%= l(:label_field_correct)%>");
|
|
||||||
$("#title_notice_span").css('color','#008000');
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$("#title_notice_span").text("<%= l(:label_title_long)%>");
|
|
||||||
$("#title_notice_span").css('color','#ff0000');
|
|
||||||
$("#title_notice_span").focus();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function submitComment()
|
|
||||||
{
|
|
||||||
$("#add_comment_form").submit();
|
|
||||||
}
|
|
||||||
|
|
||||||
function regexDescription()
|
|
||||||
{
|
|
||||||
var name = $("#news_description").val();
|
|
||||||
if(name.length ==0)
|
|
||||||
{
|
|
||||||
$("#description_notice_span").text("<%= l(:label_descripition_blank)%>");
|
|
||||||
$("#description_notice_span").css('color','#ff0000');
|
|
||||||
$("#description_notice_span").focus();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$("#description_notice_span").text("<%= l(:label_field_correct)%>");
|
|
||||||
$("#description_notice_span").css('color','#008000');
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function submitNews()
|
|
||||||
{
|
|
||||||
if(regexTitle() && regexDescription())
|
|
||||||
{
|
|
||||||
$("#news-form").submit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<% if authorize_for('news', 'edit') %>
|
<% if authorize_for('news', 'edit') %>
|
||||||
<div id="edit-news" style="display:none;">
|
<div id="edit-news" style="display:none;">
|
||||||
|
|
|
@ -265,6 +265,11 @@ function submitFocus(obj) {
|
||||||
$(obj).focus();
|
$(obj).focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function submitComment()
|
||||||
|
{
|
||||||
|
$("#add_comment_form").submit();
|
||||||
|
}
|
||||||
|
|
||||||
//当项目描述长度小于112px时,不显示更多按钮
|
//当项目描述长度小于112px时,不显示更多按钮
|
||||||
$(function () {
|
$(function () {
|
||||||
// alert($("#course_description_content").height());
|
// alert($("#course_description_content").height());
|
||||||
|
|
Loading…
Reference in New Issue