Merge remote-tracking branch 'origin/dev_hjq' into dev_hjq

This commit is contained in:
lizanle 2015-04-17 10:38:54 +08:00
commit 8cee159cb7
30 changed files with 250 additions and 177 deletions

View File

@ -173,6 +173,7 @@ class ProjectsController < ApplicationController
@project.safe_attributes = params[:project] @project.safe_attributes = params[:project]
@project.organization_id = params[:organization_id] @project.organization_id = params[:organization_id]
@project.user_id = User.current.id @project.user_id = User.current.id
@project.project_new_type = 1
if validate_parent_id && @project.save if validate_parent_id && @project.save
@project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id') @project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
# Add current user as a project member if he is not admin # Add current user as a project member if he is not admin

View File

@ -49,6 +49,16 @@ module ApplicationHelper
end end
end end
def get_project_type_css(value)
if value == 1
"pr_friend"
elsif value == 1
"pr_keyan"
else
"pr_kafa"
end
end
# Time 2015-03-24 16:38:05 # Time 2015-03-24 16:38:05
# Author lizanle # Author lizanle
# Description after save后需要进行资源记录的更新 # Description after save后需要进行资源记录的更新
@ -325,6 +335,20 @@ module ApplicationHelper
:title => attachment.filename :title => attachment.filename
end end
def thumbnail_issue_tag(attachment)
imagesize = attachment.thumbnail(:size => "50*50")
imagepath = named_attachment_path(attachment, attachment.filename)
if imagesize
link_to image_tag(imagesize),
imagepath,
:title => attachment.filename
else
link_to image_tag(imagepath , height: '73', width: '100'),
imagepath,
:title => attachment.filename
end
end
# 图片缩略图链接 # 图片缩略图链接
def thumbnail_small_tag(attachment) def thumbnail_small_tag(attachment)
imagesize = attachment.thumbnail(:size => "200*200") imagesize = attachment.thumbnail(:size => "200*200")

View File

@ -340,9 +340,9 @@ module IssuesHelper
if detail.property == 'attachment' && !value.blank? && atta = Attachment.find_by_id(detail.prop_key) if detail.property == 'attachment' && !value.blank? && atta = Attachment.find_by_id(detail.prop_key)
# Link to the attachment if it has not been removed # Link to the attachment if it has not been removed
if options[:token].nil? if options[:token].nil?
value = link_to_attachment(atta, :download => true, :only_path => options[:only_path]) value = link_to_attachment(atta, :download => true, :only_path => options[:only_path], :class=> "info_foot_num c_blue")
else else
value = link_to_attachment(atta, :download => true, :only_path => options[:only_path], :token => options[:token]) value = link_to_attachment(atta, :download => true, :only_path => options[:only_path], :token => options[:token], :class=> "info_foot_num c_blue")
end end
if options[:only_path] != false && atta.is_text? if options[:only_path] != false && atta.is_text?
value += link_to( value += link_to(

View File

@ -5,7 +5,7 @@
<%if is_float%> <%if is_float%>
<div style="max-width:55%;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;float: left;"> <div style="max-width:55%;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;float: left;">
<% end%> <% end%>
<span title="<%= attachment.filename%>" id = "attachment_"> <span title="<%= attachment.filename %>" id = "attachment_">
<% if options[:length] %> <% if options[:length] %>
<%= link_to_short_attachment attachment, :class => ' link_file_board', :download => true,:length => options[:length] -%> <%= link_to_short_attachment attachment, :class => ' link_file_board', :download => true,:length => options[:length] -%>
<% else %> <% else %>
@ -53,7 +53,7 @@
<% end %> <% end %>
<% if options[:author] %> <% if options[:author] %>
<span class="author" title="<%= attachment.author%>"> <span class="author" title="<%= attachment.author%>">
<%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author) %>, <%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "c_orange" %>,
<%= format_time(attachment.created_on) %> <%= format_time(attachment.created_on) %>
</span> </span>
<% end %> <% end %>
@ -62,11 +62,9 @@
<% if defined?(thumbnails) && thumbnails %> <% if defined?(thumbnails) && thumbnails %>
<% images = attachments.select(&:thumbnailable?) %> <% images = attachments.select(&:thumbnailable?) %>
<% if images.any? %> <% if images.any? %>
<div class="thumbnails">
<% images.each do |attachment| %> <% images.each do |attachment| %>
<div><%= thumbnail_tag(attachment) %></div> <div class="pro_pic fl " width="100" height="73"><%= thumbnail_issue_tag(attachment) %></div>
<% end %> <% end %>
</div>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>

View File

@ -45,14 +45,14 @@
<!-- 内容显示部分 --> <!-- 内容显示部分 -->
<div class="talk_top"> <div class="talk_top">
<div class="fl"><span><%= l(:label_project_board_count , :count => @topic_count)%></span></div> <div class="fl"><span><%= l(:label_project_board_count , :count => @topic_count)%></span></div>
<% if @project.enabled_modules.where("name = 'boards'").count > 0 && User.current.member_of?(@project) %> <% if @project.enabled_modules.where("name = 'boards'").count > 0 && User.current.member_of?(@project) %>
<span><%= link_to l(:project_module_boards_post), new_board_message_path(@board), <span><%= link_to l(:project_module_boards_post), new_board_message_path(@board),
:class => 'problem_new_btn fl c_dorange', :class => 'problem_new_btn fl c_dorange',
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %></span> :onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %></span>
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<!-- 帖子内容显示 --> <!-- 帖子内容显示 -->
<% if @topics.any? %> <% if @topics.any? %>
<% @topics.each do |topic| %> <% @topics.each do |topic| %>
@ -67,7 +67,7 @@
<%= l(:label_post_by)%><%= link_to topic.author, user_path(topic.author), :class =>"problem_name" %> <%= l(:label_post_by)%><%= link_to topic.author, user_path(topic.author), :class =>"problem_name" %>
&nbsp;<%= l(:label_post_by_time)%><%= format_time topic.created_on %> &nbsp;<%= l(:label_post_by_time)%><%= format_time topic.created_on %>
</div> </div>
<span class="talk_btn fr"><%= link_to (l(:label_short_reply) + " "+topic.replies_count.to_s), board_message_path(@board, topic), :style =>"color:#fff;line-height: 18px;" %></span> <%= link_to (l(:label_short_reply) + " "+topic.replies_count.to_s), board_message_path(@board, topic), :class => "talk_btn fr c_white" %>
<div class="cl"></div> <div class="cl"></div>
</div><!--讨论主类容 end--> </div><!--讨论主类容 end-->
<% end %> <% end %>

View File

@ -11,7 +11,7 @@
showModal('ajax-modal', '513px'); showModal('ajax-modal', '513px');
$('#ajax-modal').siblings().remove(); $('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'><a href='javascript:void(0)' onclick='closeModal()'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>") $('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'><a href='javascript:void(0)' onclick='closeModal()'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>")
$('#ajax-modal').parent().css("top","").css("left",""); $('#ajax-modal').parent().css("top","40%").css("left","30%");
$('#ajax-modal').parent().addClass("popbox_polls"); $('#ajax-modal').parent().addClass("popbox_polls");
} }

View File

@ -7,5 +7,5 @@
showModal('ajax-modal', '513px'); showModal('ajax-modal', '513px');
$('#ajax-modal').siblings().remove(); $('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'><a href='javascript:void(0)' onclick='closeModal()'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>"); $('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'><a href='javascript:void(0)' onclick='closeModal()'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","").css("left",""); $('#ajax-modal').parent().css("top","30%").css("left","35%");
$('#ajax-modal').parent().addClass("popbox_polls"); $('#ajax-modal').parent().addClass("popbox_polls");

View File

@ -1,5 +1,5 @@
<!--added by huang--> <!--added by huang-->
<%= watcher_link_issue(@issue, User.current) %> <%#= watcher_link_issue(@issue, User.current) %>
<%#= link_to l(:button_copy), project_copy_issue_path(@project, @issue), :class => 'icon icon-copy' if User.current.allowed_to?(:add_issues, @project) %> <%#= link_to l(:button_copy), project_copy_issue_path(@project, @issue), :class => 'icon icon-copy' if User.current.allowed_to?(:add_issues, @project) %>
<%= link_to l(:button_delete), issue_path(@issue.id), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'talk_edit fr' if User.current.allowed_to?(:delete_issues, @project) %> <%= link_to l(:button_delete), issue_path(@issue.id), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'talk_edit fr' if User.current.allowed_to?(:delete_issues, @project) %>

View File

@ -8,7 +8,8 @@
<% if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %> <% if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %>
<%= f.select :status_id, <%= f.select :status_id,
(@allowed_statuses.collect { |p| [p.name, p.id] }), (@allowed_statuses.collect { |p| [p.name, p.id] }),
{:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')", :no_label => true}, {:no_label => true},
:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')",
:class => "w150" %> :class => "w150" %>
<% else %> <% else %>
<%= h(@issue.status.name) %> <%= h(@issue.status.name) %>
@ -36,8 +37,8 @@
</li> </li>
<div class="cl"></div> <div class="cl"></div>
<li> <li>
<label class="label"><%= l(:field_fixed_version) %></label>
<% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %> <% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %>
<label class="label"><%= l(:field_fixed_version) %></label>
<%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version), <%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version),
{:include_blank => true, :required => @issue.required_attribute?('fixed_version_id'), :no_label => true}, {:include_blank => true, :required => @issue.required_attribute?('fixed_version_id'), :no_label => true},
:class => "w150" %> :class => "w150" %>
@ -92,7 +93,8 @@
<li><label class="label02">&nbsp;% 完成&nbsp;&nbsp;:&nbsp;</label> <li><label class="label02">&nbsp;% 完成&nbsp;&nbsp;:&nbsp;</label>
<% if @issue.safe_attribute?('done_ratio') && @issue.leaf? && Issue.use_field_for_done_ratio? %> <% if @issue.safe_attribute?('done_ratio') && @issue.leaf? && Issue.use_field_for_done_ratio? %>
<%= f.select :done_ratio, ((0..10).to_a.collect { |r| ["#{r*10} %", r*10] }), <%= f.select :done_ratio, ((0..10).to_a.collect { |r| ["#{r*10} %", r*10] }),
{:required => @issue.required_attribute?('done_ratio'), :no_label => true, :onchange => "PrecentChange(this.value)"}, {:required => @issue.required_attribute?('done_ratio'), :no_label => true},
:onchange => "PrecentChange(this.value)",
:class => "w150" %> :class => "w150" %>
<% end %> <% end %>
</li> </li>

View File

@ -5,9 +5,9 @@
<% if @edit_allowed || !@allowed_statuses.empty? %> <% if @edit_allowed || !@allowed_statuses.empty? %>
<div id="all_attributes" style="display:none;"> <div id="all_attributes" style="display:none;">
<%= render :partial => 'form', :locals => {:f => f} %> <%= render :partial => 'form', :locals => {:f => f} %>
<a remote="true" href="javascript:void(0)" class="blue_btn fl" style="margin-left: 80px;margin-bottom: 10px;margin-top: -10px;" onclick="$('#issue-form').submit();"> <!--<a remote="true" href="javascript:void(0)" class="blue_btn fl" style="margin-left: 80px;margin-bottom: 10px;margin-top: -10px;" onclick="$('#issue-form').submit();">-->
<%= l(:button_submit) %> <!--<%#= l(:button_submit) %>-->
</a> <!--</a>-->
</div> </div>
<% end %><!--end--> <% end %><!--end-->
<div class="ping_C mb10"></div> <div class="ping_C mb10"></div>
@ -18,7 +18,7 @@
<%= render :partial => 'history', :locals => {:issue => @issue, :journals => @journals} %> <%= render :partial => 'history', :locals => {:issue => @issue, :journals => @journals} %>
</div> </div>
<% end %> <% end %>
<fieldset><legend>说明</legend> <fieldset><legend>回复</legend>
<%= f.text_area :notes, :style => "width:99%;", :rows => "5", :no_label => true %> <%= f.text_area :notes, :style => "width:99%;", :rows => "5", :no_label => true %>
</fieldset> </fieldset>
<!--<%# if @issue.safe_attribute? 'private_notes' %>--> <!--<%# if @issue.safe_attribute? 'private_notes' %>-->
@ -29,7 +29,7 @@
<!--</fieldset>--> <!--</fieldset>-->
<!--<fieldset><legend><%#= l(:label_attachment_plural) %></legend>--> <!--<fieldset><legend><%#= l(:label_attachment_plural) %></legend>-->
<!--<p style="padding-top: 5px;"><%= render :partial => 'attachments/new_form', :locals => {:container => @issue} %>--> <!--<p style="padding-top: 5px;"><%#= render :partial => 'attachments/new_form', :locals => {:container => @issue} %>
<!--</fieldset>--> <!--</fieldset>-->
<div class="cl"></div> <div class="cl"></div>

View File

@ -4,12 +4,12 @@
<ul> <ul>
<li> <li>
<% if @issue.safe_attribute? 'tracker_id' %> <% if @issue.safe_attribute? 'tracker_id' %>
<label class="label"><span class="c_red f12">*</span>&nbsp;跟踪&nbsp;&nbsp;:&nbsp;</label> <label class="label"><span class="c_red f12">*</span>&nbsp;类型&nbsp;&nbsp;:&nbsp;</label>
<%= f.select :tracker_id, <%= f.select :tracker_id,
@issue.project.trackers.collect { |t| [t.name, t.id] }, @issue.project.trackers.collect { |t| [t.name, t.id] },
{:required => true, :no_label => true}, {:required => true, :no_label => true},
:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')", :onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')",
:class => "w150" :class => "w90"
%> %>
<% end %> <% end %>
</li> </li>
@ -52,7 +52,7 @@
<li> <li>
<% if @issue.safe_attribute? 'description' %> <% if @issue.safe_attribute? 'description' %>
<label class="label"><span class="c_red f12">*</span>&nbsp;描述&nbsp;&nbsp;:&nbsp;</label> <label class="label">&nbsp;描述&nbsp;&nbsp;:&nbsp;</label>
<%= f.label_for_field :description, :required => @issue.required_attribute?('description'), :no_label => true, :class => "label" %> <%= f.label_for_field :description, :required => @issue.required_attribute?('description'), :no_label => true, :class => "label" %>
<%= link_to_function image_tag('edit.png'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %> <%= link_to_function image_tag('edit.png'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %>
<%= content_tag 'span', :id => "issue_description_and_toolbar", :style => (@issue.new_record? ? nil : 'display:none') do %> <%= content_tag 'span', :id => "issue_description_and_toolbar", :style => (@issue.new_record? ? nil : 'display:none') do %>
@ -87,7 +87,7 @@
<div class="cl"></div> <div class="cl"></div>
<li> <li>
<br> <br>
<label class="label"><span class="c_red f12">*</span><%= l(:label_attachment_plural) %></label> <label class="label"><%= l(:label_attachment_plural) %></label>
<%= render :partial => 'attachments/form', :locals => {:container => @issue} %> <%= render :partial => 'attachments/form', :locals => {:container => @issue} %>
</li> </li>
<div class="cl"></div> <div class="cl"></div>
@ -95,22 +95,22 @@
<%= render :partial => 'issues/attributes' %> <%= render :partial => 'issues/attributes' %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<div class="newpro_box02 "> <!--<div class="newpro_box02 ">-->
<label class="label"> <%= l(:label_issue_watchers) %></label> <!--<label class="label"> <%#= l(:label_issue_watchers) %></label>-->
<!--<input id="" name="" size="22" class="fl mb10 h26" type="text" placeholder="搜索添加跟踪者">--> <!--<input id="" name="" size="22" class="fl mb10 h26" type="text" placeholder="搜索添加跟踪者">-->
<span class="search_for_watchers"> <!--<span class="search_for_watchers">-->
<%= link_to "", <%#= link_to "",
{:controller => 'watchers', :action => 'new', :project_id => @issue.project}, # {:controller => 'watchers', :action => 'new', :project_id => @issue.project},
:remote => true, # :remote => true,
:method => 'get', # :method => 'get',
:class => "pic_sch mt5 ml5" %> :class => "pic_sch mt5 ml5" %>
</span> <!--</span>-->
<%= javascript_tag "observeSearchfield('user_search', 'users_for_watcher', '#{ escape_javascript watchers_autocomplete_for_user_path(:user => @available_watchers, :format => 'js', :flag => 'ture') }')" %> <%#= javascript_tag "observeSearchfield('user_search', 'users_for_watcher', '#{ escape_javascript watchers_autocomplete_for_user_path(:user => @available_watchers, :format => 'js', :flag => 'ture') }')" %>
<div class="cl"></div> <!--<div class="cl"></div>-->
<span id="watchers_inputs"> <!--<span id="watchers_inputs">-->
<%= watchers_checkboxes(@issue, @available_watchers) %> <!--<%#= watchers_checkboxes(@issue, @available_watchers) %>-->
</span> <!--</span>-->
<div class="cl"></div> <!--<div class="cl"></div>-->
</div> <!--</div>-->
<%= call_hook(:view_issues_form_details_bottom, {:issue => @issue, :form => f}) %> <%= call_hook(:view_issues_form_details_bottom, {:issue => @issue, :form => f}) %>
<% end %> <% end %>

View File

@ -12,8 +12,8 @@
<p> <p>
<% if journal.details.any? %> <% if journal.details.any? %>
<% details_to_strings(journal.details).each do |string| %> <% details_to_strings(journal.details).each do |string| %>
<%= string %> <p><%= string %></p>
<% end %> </span> <% end %>
<% end %> <% end %>
</p> </p>
</div> </div>

View File

@ -3,7 +3,7 @@
</div> </div>
<% html_title "#{@issue.tracker.name} #{@issue.source_from}'#'#{@issue.project_index}: #{@issue.subject}" %> <% html_title "#{@issue.tracker.name} #{@issue.source_from}'#'#{@issue.project_index}: #{@issue.subject}" %>
<div class="pro_page_box"> <div class="pro_page_box">
<div class="pro_page_top"> <div class="pro_page_top break_word">
<a href="javascript:void(0)"><%= @issue.project.name %></a> > <a href="javascript:void(0)"><%= @issue.project.name %></a> >
<a href="javascript:void(0)"><%= "#" + @issue.project_index %></a> <a href="javascript:void(0)"><%= "#" + @issue.project_index %></a>
</div> </div>
@ -115,7 +115,7 @@
</div> </div>
<% end %> <% end %>
<!--留言--> <!--留言-->
<br> <p style="padding-top: 5px"></p>
<a remote="true" href="javascript:void(0)" class="blue_btn fr mr80" onclick="$('#issue-form').submit();"> <a remote="true" href="javascript:void(0)" class="blue_btn fr mr80" onclick="$('#issue-form').submit();">
<%= l(:button_submit) %> <%= l(:button_submit) %>
</a> </a>

View File

@ -10,6 +10,6 @@
<!--退出项目--> <!--退出项目-->
<% if ((User.current.member_of? @project) && User.current.login? && User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project)) %> <% if ((User.current.member_of? @project) && User.current.login? && User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project)) %>
<%= link_to "<span class='pr_setting'></span>#{l(:button_configure)}".html_safe, settings_project_path(@project), :class => "pr_join_a" %> <%= link_to "<span class='pr_setting'></span>#{l(:button_configure)}".html_safe, settings_project_path(@project), :class => "pr_join_a" %>
<%= link_to "<span class='pr_friend'></span>#{text}".html_safe,"javascript:void(0)" ,:onClick => "show_window();", :class => "pr_join_a",:id => "setting_project_type"%> <%= link_to "<span class='#{get_project_type_css(@project_type_new)}'></span>#{text}".html_safe,"javascript:void(0)" ,:onClick => "show_window();", :class => "pr_join_a",:id => "setting_project_type"%>
<% end %> <% end %>
</div> </div>

View File

@ -81,7 +81,7 @@
<%= l(:label_projects_community) %> <%= l(:label_projects_community) %>
</a> </a>
</h2> </h2>
<p> <p class="hidden">
<%= l(:label_user_location) %> : <%= l(:label_user_location) %> :
<%= link_to l(:field_homepage), home_path %> <%= link_to l(:field_homepage), home_path %>
> >
@ -121,7 +121,7 @@
<!-- 项目得分 --> <!-- 项目得分 -->
<div class="cl"></div> <div class="cl"></div>
<div> <div>
<a class="pr_info_name fl c_dark fb" href="javascript:void(0)" target="_blank"> <a class="pr_info_name fl c_dark fb break_word" href="javascript:void(0)" target="_blank">
<%= l(:label_project_name) %><%= @project.name %></a> <%= l(:label_project_name) %><%= @project.name %></a>
<% if @project.is_public? %> <% if @project.is_public? %>
<span class="img_private"><%= l(:label_public)%></span> <span class="img_private"><%= l(:label_public)%></span>
@ -182,7 +182,7 @@
<div class="project_intro"> <div class="project_intro">
<div id="course_description" class="course_description"> <div id="course_description" class="course_description">
<h4 ><%= l(:label_project_overview)%></h4> <h4 ><%= l(:label_project_overview)%></h4>
<div id="course_description_content"> <div id="course_description_content break_word">
<%= textilizable(@project.description) if @project.description && !@project.description.blank? %> <%= textilizable(@project.description) if @project.description && !@project.description.blank? %>
</div> </div>
</div> </div>

View File

@ -1,7 +1,7 @@
<%= error_messages_for 'message' %> <%= error_messages_for 'message' %>
<% replying ||= false %> <% replying ||= false %>
<% extra_option = replying ? { readonly: true} : { maxlength: 200 } %> <% extra_option = replying ? { readonly: true} : { maxlength: 200 } %>
<p class="talk_top"><%= l(:label_message_new) %></p> <p class="talk_top"><%= l(:label_message_reply) %></p>
<li> <li>
<label><span class="c_red">*</span>&nbsp;<%= l(:field_subject) %>&nbsp;&nbsp;</label> <label><span class="c_red">*</span>&nbsp;<%= l(:field_subject) %>&nbsp;&nbsp;</label>
<% if replying %> <% if replying %>

View File

@ -50,11 +50,11 @@
<div class="ping_C mb10" id="<%= "message-#{message.id}" %>"> <div class="ping_C mb10" id="<%= "message-#{message.id}" %>">
<div class="ping_dispic"><%= link_to image_tag(url_to_avatar(message.author), :width => '46',:height => '46'), user_path(message.author) %></div> <div class="ping_dispic"><%= link_to image_tag(url_to_avatar(message.author), :width => '46',:height => '46'), user_path(message.author) %></div>
<div class="ping_discon"> <div class="ping_discon">
<div class="ping_distop upload_img"> <div class="ping_distop upload_img break_word">
<%= link_to_user_header message.author,false,:class => 'c_blue fb fl mb10 ' %> <%= link_to_user_header message.author,false,:class => 'c_blue fb fl mb10 ' %>
<span class="c_grey fr"><%= format_time(message.created_on) %></span> <span class="c_grey fr"><%= format_time(message.created_on) %></span>
<div class="cl"></div> <div class="cl"></div>
<p><%= textAreailizable message,:content,:attachments => message.attachments %></p> <p class="break_word"><%= textAreailizable message,:content,:attachments => message.attachments %></p>
<%= link_to_attachments_course message, :author => false %> <%= link_to_attachments_course message, :author => false %>
</div> </div>
<div class="ping_disfoot"> <div class="ping_disfoot">

View File

@ -29,7 +29,7 @@
<%= link_to_user_header(news.author,false,{:class=> 'problem_name c_orange fl'}) if news.respond_to?(:author) %> <%= link_to_user_header(news.author,false,{:class=> 'problem_name c_orange fl'}) if news.respond_to?(:author) %>
<span class="fl"> <%= l(:label_add_news) %></span><%= link_to h(news.title), news_path(news),:class => 'problem_tit fl fb c_dblue' %><br /> <span class="fl"> <%= l(:label_add_news) %></span><%= link_to h(news.title), news_path(news),:class => 'problem_tit fl fb c_dblue' %><br />
<div class="cl mb5"></div> <div class="cl mb5"></div>
<p id="news_description_<%= news.id %>" class="news_description mt5"><%= news.description %><br /> </p> <p id="news_description_<%= news.id %>" class="mt5 break_word"><%= news.description %><br /> </p>
<div class="news_foot" style="display: none;" onclick="news_show_more_des(<%= news.id %>);" id="news_foot_<%= news.id %>"><%= l(:label_expend_information) %> <span class="g-arr-down"><img src="/images/jiantou.jpg" width="12" height="6" /></span></div> <div class="news_foot" style="display: none;" onclick="news_show_more_des(<%= news.id %>);" id="news_foot_<%= news.id %>"><%= l(:label_expend_information) %> <span class="g-arr-down"><img src="/images/jiantou.jpg" width="12" height="6" /></span></div>
<span class="f1"><%= l(:label_create_time) %> <%= format_time(news.created_on) %></span> <span class="f1"><%= l(:label_create_time) %> <%= format_time(news.created_on) %></span>
</div> </div>

View File

@ -10,7 +10,7 @@
</p> </p>
<p style="padding-right: 20px;"> <p style="padding-right: 20px;">
<%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %> <%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:0px;" %>
</p><!--by young--> </p><!--by young-->
<p> <p>
<%#= f.text_field :enterprise_name, :size => 60, :style => "width:490px;" %> <%#= f.text_field :enterprise_name, :size => 60, :style => "width:490px;" %>

View File

@ -1,6 +1,6 @@
<%= labelled_form_for @project do |f| %> <%= labelled_form_for @project do |f| %>
<ul class="newpro_box "> <ul class="newpro_box ">
<li class="ml110 mb10"> <li class="ml45 mb10">
<%= render :partial=>"avatar/new_avatar_form",:locals=> {source:@project} %> <%= render :partial=>"avatar/new_avatar_form",:locals=> {source:@project} %>
<div class="cl"></div> <div class="cl"></div>
</li> </li>
@ -17,7 +17,7 @@
<div class="cl"></div> <div class="cl"></div>
</li> </li>
<li > <li >
<label class="label02"><span class="c_red">*</span>&nbsp;组织&nbsp;&nbsp;</label> <label class="label02">&nbsp;组织&nbsp;&nbsp;</label>
<%= select_tag :organization_id,options_for_select(project_organizations_id_option,@project.organization_id),{} %> <%= select_tag :organization_id,options_for_select(project_organizations_id_option,@project.organization_id),{} %>
</li> </li>
<div class="cl"></div> <div class="cl"></div>

View File

@ -16,15 +16,15 @@
<%= call_hook(:view_projects_settings_members_table_header, :project => @project) %> <%= call_hook(:view_projects_settings_members_table_header, :project => @project) %>
<% members.each do |member| %> <% members.each do |member| %>
<li > <li >
<%= link_to_user_header member.principal,false,:class => "w150 c_orange fl" %> <%= link_to_user_header member.principal,false,:class => "w90 c_orange fl" %>
<span class="w150 fl"> <span class="w210 fl">
<%= h member.roles.sort.collect(&:to_s).join(', ') %> <%= h member.roles.sort.collect(&:to_s).join(', ') %>
<%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member), <%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member),
:method => :put, :method => :put,
:html => {:id => "member-#{member.id}-roles-form", :class => 'hol'}} :html => {:id => "member-#{member.id}-roles-form", :class => 'hol'}}
) do |f| %> ) do |f| %>
<% roles.each do |role| %> <% roles.each do |role| %>
<ul style="text-align: left;" class="ml20"> <ul style="text-align: left;" class="m115">
<%= check_box_tag 'membership[role_ids][]', role.id, member.roles.include?(role), <%= check_box_tag 'membership[role_ids][]', role.id, member.roles.include?(role),
:disabled => member.member_roles.detect { |mr| mr.role_id == role.id && !mr.inherited_from.nil? } %> :disabled => member.member_roles.detect { |mr| mr.role_id == role.id && !mr.inherited_from.nil? } %>
<label ><%= h role %></label> <label ><%= h role %></label>
@ -32,7 +32,7 @@
<!--<br/>--> <!--<br/>-->
<% end %> <% end %>
<%= hidden_field_tag 'membership[role_ids][]', '' %> <%= hidden_field_tag 'membership[role_ids][]', '' %>
<div class="ml20"> <div class="m130">
<a href="javascript:void(0)" class="member_btn" onclick="$('#member-<%= member.id%>-roles-form').submit();" style="margin-right: 10px;"> <a href="javascript:void(0)" class="member_btn" onclick="$('#member-<%= member.id%>-roles-form').submit();" style="margin-right: 10px;">
<%= l(:button_change)%> <%= l(:button_change)%>
</a> </a>

View File

@ -9,7 +9,7 @@
<% if e.forge_act_type == "ProjectCreateInfo"%> <% if e.forge_act_type == "ProjectCreateInfo"%>
<div class="problem_main"> <div class="problem_main">
<a class="problem_pic fl"><%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %></a> <a class="problem_pic fl"><%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %></a>
<div class="problem_txt fl mt5"> <div class="problem_txt fl mt5 break_word">
<%= link_to e.user, user_path(e.user), :class => "problem_name c_orange fl" %> <span class="fl"> <%= l(:label_project_create) %> </span> <%= link_to e.user, user_path(e.user), :class => "problem_name c_orange fl" %> <span class="fl"> <%= l(:label_project_create) %> </span>
<%= link_to e.project.name, :class => "problem_tit fl fb" %></a><br /> <%= link_to e.project.name, :class => "problem_tit fl fb" %></a><br />
<p class="mt5"><br /> <%= l :label_create_time %> <%= format_time(e.project.created_on) %></p> <p class="mt5"><br /> <%= l :label_create_time %> <%= format_time(e.project.created_on) %></p>
@ -24,7 +24,7 @@
<% if e.forge_act_type == "Issue" %> <% if e.forge_act_type == "Issue" %>
<div class="problem_main"> <div class="problem_main">
<a class="problem_pic fl"><%= image_tag(url_to_avatar(act.author), :width => "42", :height => "42") %></a> <a class="problem_pic fl"><%= image_tag(url_to_avatar(act.author), :width => "42", :height => "42") %></a>
<div class="problem_txt fl mt5"> <div class="problem_txt fl mt5 break_word">
<a class="problem_name fl "> <a class="problem_name fl ">
<%= h(e.project) if @project.nil? || @project.id != e.project_id %> <%= h(e.project) if @project.nil? || @project.id != e.project_id %>
<%= link_to act.author, user_path(act.author), :class => "problem_name c_orange fl" %><span class="fl"> <%= l(:label_new_activity) %> </span> <%= link_to act.author, user_path(act.author), :class => "problem_name c_orange fl" %><span class="fl"> <%= l(:label_new_activity) %> </span>
@ -44,7 +44,7 @@
<% elsif e.forge_act_type == "Journal" %> <% elsif e.forge_act_type == "Journal" %>
<div class="problem_main"> <div class="problem_main">
<a class="problem_pic fl"><%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %></a> <a class="problem_pic fl"><%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %></a>
<div class="problem_txt fl mt5"> <div class="problem_txt fl mt5 break_word">
<a class="problem_name fl "> <a class="problem_name fl ">
<%= h(e.project) if @project.nil? || @project.id != e.project_id %> <%= h(e.project) if @project.nil? || @project.id != e.project_id %>
<%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %><span class="fl"> <%= l(:label_new_activity) %> </span> <%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %><span class="fl"> <%= l(:label_new_activity) %> </span>
@ -60,7 +60,7 @@
<% elsif e.forge_act_type == "Message" %> <% elsif e.forge_act_type == "Message" %>
<div class="problem_main"> <div class="problem_main">
<a class="problem_pic fl"><%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %></a> <a class="problem_pic fl"><%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %></a>
<div class="problem_txt fl mt5"> <div class="problem_txt fl mt5 break_word">
<a class="problem_name fl "> <a class="problem_name fl ">
<%= h(e.project) if @project.nil? || @project.id != e.project_id %> <%= h(e.project) if @project.nil? || @project.id != e.project_id %>
<%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %></a><span class="fl"> <%= l(:label_new_activity) %> </span> <%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %></a><span class="fl"> <%= l(:label_new_activity) %> </span>
@ -80,7 +80,7 @@
<% elsif e.forge_act_type == "News" %> <% elsif e.forge_act_type == "News" %>
<div class="problem_main"> <div class="problem_main">
<a class="problem_pic fl"><%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %></a> <a class="problem_pic fl"><%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %></a>
<div class="problem_txt fl mt5"> <div class="problem_txt fl mt5 break_word">
<a class="problem_name fl "> <a class="problem_name fl ">
<%= h(e.project) if @project.nil? || @project.id != e.project_id %> <%= h(e.project) if @project.nil? || @project.id != e.project_id %>
<%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %></a><span class="fl"> <%= l(:label_new_activity) %> </span> <%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %></a><span class="fl"> <%= l(:label_new_activity) %> </span>
@ -98,7 +98,7 @@
<% elsif e.forge_act_type == "Document" %> <% elsif e.forge_act_type == "Document" %>
<div class="problem_main"> <div class="problem_main">
<a class="problem_pic fl"><%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %></a> <a class="problem_pic fl"><%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %></a>
<div class="problem_txt fl mt5"> <div class="problem_txt fl mt5 break_word">
<a class="problem_name fl "> <a class="problem_name fl ">
<%= h(e.project) if @project.nil? || @project.id != e.project_id %> <%= h(e.project) if @project.nil? || @project.id != e.project_id %>
<%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %></a><span class="fl"> <%= l(:label_new_activity) %> </span> <%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %></a><span class="fl"> <%= l(:label_new_activity) %> </span>
@ -113,7 +113,7 @@
<% elsif e.forge_act_type == "Attachment" %> <% elsif e.forge_act_type == "Attachment" %>
<div class="problem_main"> <div class="problem_main">
<a class="problem_pic fl"><%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %></a> <a class="problem_pic fl"><%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %></a>
<div class="problem_txt fl mt5"> <div class="problem_txt fl mt5 break_word">
<a class="problem_name fl "> <a class="problem_name fl ">
<%= h(e.project) if @project.nil? || @project.id != e.project_id %> <%= h(e.project) if @project.nil? || @project.id != e.project_id %>
<%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %></a><span class="fl"> <%= l(:label_new_activity) %> </span> <%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %></a><span class="fl"> <%= l(:label_new_activity) %> </span>

View File

@ -12,8 +12,7 @@
<%= user.nil? ? '' : (image_tag(url_to_avatar(user), :width => 32, :height => 32)) %> <%= user.nil? ? '' : (image_tag(url_to_avatar(user), :width => 32, :height => 32)) %>
</a> </a>
<span class="fl ml10 c_grey"><%= l(:label_username)%></span> <span class="fl ml10 c_grey"><%= l(:label_username)%></span>
<%= link_to_user(user) %> <%= link_to(user.name, user_path(user),:class => "ml10 c_blue02") %>
<span class="fr c_grey"><%= format_date(user.created_on) %></span> <span class="fr c_grey"><%= format_date(user.created_on) %></span>
</div> </div>
<div class="cl"></div> <div class="cl"></div>

View File

@ -45,7 +45,7 @@
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
<%= render(:partial => "wiki/content", :locals => {:content => @content}) %> <%= render(:partial => "wiki/content", :locals => {:content => @content}) %>
<%= link_to_attachment_project @page, :author => false %> <%= link_to_attachment_project @page, :author => true %>
<!--<a href="javascript:void(0)" class=" c_orange fl ml20 fl">zhang<span class="c_grey"> 2014-08-04 10:09</span></a>--> <!--<a href="javascript:void(0)" class=" c_orange fl ml20 fl">zhang<span class="c_grey"> 2014-08-04 10:09</span></a>-->
</div> </div>
<!--wiki new--> <!--wiki new-->
@ -73,7 +73,7 @@
</div> </div>
<% end %> <% end %>
<br/> <br/><br/>
<% other_formats_links do |f| %> <% other_formats_links do |f| %>
<%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %> <%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %>
<%= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %> <%= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %>

View File

@ -239,6 +239,7 @@ zh:
# 新建问题 # 新建问题
field_tracker: 跟踪 field_tracker: 跟踪
field_untracker: 取消跟踪
field_subject: 主题 field_subject: 主题
field_quote: 描述 field_quote: 描述
label_change_properties: 修改属性 label_change_properties: 修改属性

View File

@ -717,6 +717,7 @@ zh:
label_message_plural: 帖子 label_message_plural: 帖子
label_message_last: 最新的帖子 label_message_last: 最新的帖子
label_message_new: 发布新帖 label_message_new: 发布新帖
label_message_reply: 回复帖子
label_message_posted: 发帖成功 label_message_posted: 发帖成功
label_send_information: 给用户发送帐号信息 label_send_information: 给用户发送帐号信息

View File

@ -13,9 +13,10 @@ function regexName(content) {
} }
} }
function submitSerch(content) function submitSerch(content) {
{ if (regexName(content)) {
if(regexName(content)){$("#project_search_form").submit();} $("#project_search_form").submit();
}
} }
@ -25,15 +26,13 @@ function submitSerch(content)
// //
// }) // })
//}) //})
function expand_tools_expand(content) function expand_tools_expand(content) {
{ if (content == "invit") {
if (content=="invit"){
$("#expand_tools_expand_invit").toggleClass("currentDd").siblings(".subNav").removeClass("currentDd"); $("#expand_tools_expand_invit").toggleClass("currentDd").siblings(".subNav").removeClass("currentDd");
$("#expand_tools_expand_invit").toggleClass("currentDt").siblings(".subNav").removeClass("currentDt"); $("#expand_tools_expand_invit").toggleClass("currentDt").siblings(".subNav").removeClass("currentDt");
$("#expand_tools_expand_invit").next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500); $("#expand_tools_expand_invit").next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500);
} }
else else {
{
$("#expand_tools_expand").toggleClass("currentDd").siblings(".subNav").removeClass("currentDd"); $("#expand_tools_expand").toggleClass("currentDd").siblings(".subNav").removeClass("currentDd");
$("#expand_tools_expand").toggleClass("currentDt").siblings(".subNav").removeClass("currentDt"); $("#expand_tools_expand").toggleClass("currentDt").siblings(".subNav").removeClass("currentDt");
$("#expand_tools_expand").next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500); $("#expand_tools_expand").next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500);
@ -43,200 +42,226 @@ function expand_tools_expand(content)
} }
// 描述显示更多信息 // 描述显示更多信息
function show_more_msg(){ function show_more_msg() {
$("#course_description").toggleClass("course_description_none"); $("#course_description").toggleClass("course_description_none");
var information = $("#expend_more_information"); var information = $("#expend_more_information");
var arrow = $("#arrow"); var arrow = $("#arrow");
var val = information.attr("value"); var val = information.attr("value");
if (val=="展开更多信息" ) if (val == "展开更多信息") {
{
$("#expend_more_information").text("收起描述信息"); $("#expend_more_information").text("收起描述信息");
information.attr("value","收起描述信息"); information.attr("value", "收起描述信息");
arrow.attr("src","/images/jiantouup.jpg") arrow.attr("src", "/images/jiantouup.jpg")
} }
else else {
{
$("#expend_more_information").text("展开更多信息"); $("#expend_more_information").text("展开更多信息");
information.attr("value","展开更多信息"); information.attr("value", "展开更多信息");
arrow.attr("src","/images/jiantou.jpg") arrow.attr("src", "/images/jiantou.jpg")
} }
} }
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////项目讨论区 //////////////////////////////////////////////////////////////项目讨论区
function regexSubject() function regexSubject() {
{
var content = $.trim($("#message_subject").val()); var content = $.trim($("#message_subject").val());
if(content.length ==0) if (content.length == 0) {
{
$("#subject_span").text("主题不能为空"); $("#subject_span").text("主题不能为空");
$("#subject_span").css('color','#ff0000'); $("#subject_span").css('color', '#ff0000');
return false; return false;
} }
else else {
{
$("#subject_span").text("填写正确"); $("#subject_span").text("填写正确");
$("#subject_span").css('color','#008000'); $("#subject_span").css('color', '#008000');
return true; return true;
} }
return false; return false;
} }
function regexContent() function regexContent() {
{
var content = $.trim($("#message_content").val()); var content = $.trim($("#message_content").val());
if(content.length ==0) if (content.length == 0) {
{
$("#message_content_span").text("描述不能为空"); $("#message_content_span").text("描述不能为空");
$("#message_content_span").css('color','#ff0000'); $("#message_content_span").css('color', '#ff0000');
return false; return false;
} }
else else {
{
$("#message_content_span").text("填写正确"); $("#message_content_span").text("填写正确");
$("#message_content_span").css('color','#008000'); $("#message_content_span").css('color', '#008000');
return true; return true;
} }
return false; return false;
} }
// 项目编辑和提交 // 项目编辑和提交
function submitProjectsBoard() function submitProjectsBoard() {
{ if (regexSubject() && regexContent()) {
if(regexSubject()&&regexContent()){$("#message-form").submit();} $("#message-form").submit();
}
} }
// 提交新闻 // 提交新闻
function regexTitle() function regexTitle() {
{
var name = $("#news_title").val(); var name = $("#news_title").val();
if(name.length ==0) if (name.length == 0) {
{
$("#title_notice_span").text("标题不能为空"); $("#title_notice_span").text("标题不能为空");
$("#title_notice_span").css('color','#ff0000'); $("#title_notice_span").css('color', '#ff0000');
$("#title_notice_span").focus(); $("#title_notice_span").focus();
return false; return false;
} }
else if(name.length <= 60) else if (name.length <= 60) {
{
$("#title_notice_span").text("填写正确"); $("#title_notice_span").text("填写正确");
$("#title_notice_span").css('color','#008000'); $("#title_notice_span").css('color', '#008000');
return true; return true;
} }
else else {
{
$("#title_notice_span").text("标题超过60个字符"); $("#title_notice_span").text("标题超过60个字符");
$("#title_notice_span").css('color','#ff0000'); $("#title_notice_span").css('color', '#ff0000');
$("#title_notice_span").focus(); $("#title_notice_span").focus();
return false; return false;
} }
} }
function regexDescription() function regexDescription() {
{
var name = $("#news_description").val(); var name = $("#news_description").val();
if(name.length ==0) if (name.length == 0) {
{
$("#description_notice_span").text("描述不能为空"); $("#description_notice_span").text("描述不能为空");
$("#description_notice_span").css('color','#ff0000'); $("#description_notice_span").css('color', '#ff0000');
$("#description_notice_span").focus(); $("#description_notice_span").focus();
return false; return false;
} }
else else {
{
$("#description_notice_span").text("填写正确"); $("#description_notice_span").text("填写正确");
$("#description_notice_span").css('color','#008000'); $("#description_notice_span").css('color', '#008000');
return true; return true;
} }
} }
function submitNews() function submitNews() {
{ if (regexTitle() && regexDescription()) {
if(regexTitle() && regexDescription())
{
$("#news-form").submit(); $("#news-form").submit();
} }
} }
function submitFocus(obj) function submitFocus(obj) {
{
$(obj).focus(); $(obj).focus();
} }
//当项目描述长度小于112px时不显示更多按钮 //当项目描述长度小于112px时不显示更多按钮
$(function(){ $(function () {
// alert($("#course_description_content").height()); // alert($("#course_description_content").height());
if($("#course_description_content").height()>112) if ($("#course_description_content").height() > 112) {
{
$("#lg-foot").show(); $("#lg-foot").show();
} }
}); });
//配置项目信息 //配置项目信息
function course_setting(id) function course_setting(id) {
{
//alert(id); //alert(id);
$('#tb_'+id).removeClass().addClass("hwork_hovertab"); $('#tb_' + id).removeClass().addClass("hwork_hovertab");
$('#tbc_0'+id).removeClass().addClass("dis"); $('#tbc_0' + id).removeClass().addClass("dis");
$('#tb_'+(3-id)).removeClass().addClass("hwork_normaltab"); $('#tb_' + (3 - id)).removeClass().addClass("hwork_normaltab");
$('#tbc_0'+(3-id)).removeClass().addClass("undis"); $('#tbc_0' + (3 - id)).removeClass().addClass("undis");
} }
//项目类型 //项目类型
function show_window () { function show_window() {
$('#light').css('display','block'); $('#light').css('display', 'block');
$('#fade').css('display','block'); $('#fade').css('display', 'block');
} }
function close_window(type){ function close_window(type) {
$('#light').css('display','none'); $('#light').css('display', 'none');
$('#fade').css('display','none'); $('#fade').css('display', 'none');
$("#" + type).attr("checked","checked"); $("#" + type).attr("checked", "checked");
} }
//弹框l //弹框l
///////////////////////////////////////////// /////////////////////////////////////////////
//项目配置 //项目配置
function project_setting(n) function project_setting(n) {
{ for (var i = 1; i < 9; i++) {
for(var i = 1;i < 9; i++) if (i == n) {
{ $("#pro_st_tb_" + i).removeClass().addClass("pro_st_hovertab");
if(i == n) $("#pro_st_tbc_0" + i).removeClass().addClass("pro_st_dis");
{
$("#pro_st_tb_"+i).removeClass().addClass("pro_st_hovertab");
$("#pro_st_tbc_0"+i).removeClass().addClass("pro_st_dis");
} }
else else {
{ $("#pro_st_tb_" + i).removeClass().addClass("pro_st_normaltab");
$("#pro_st_tb_"+i).removeClass().addClass("pro_st_normaltab"); $("#pro_st_tbc_0" + i).removeClass().addClass("pro_st_undis");
$("#pro_st_tbc_0"+i).removeClass().addClass("pro_st_undis");
} }
} }
} }
//配置--成员---申请列表--拒绝 //配置--成员---申请列表--拒绝
function refusal_applied_member() function refusal_applied_member() {
{
$('#new_membership').append("<input name = 'refusal_button' style='display: none;'>"); $('#new_membership').append("<input name = 'refusal_button' style='display: none;'>");
$('#new_membership').submit(); $('#new_membership').submit();
} }
//新闻描述显示更多信息 //新闻描述显示更多信息
function news_show_more_des(id) function news_show_more_des(id) {
{
$('#news_description_' + id).toggleClass("news_description_none"); $('#news_description_' + id).toggleClass("news_description_none");
} }
$(document).ready(function(){ $(document).ready(function () {
$("#issue_project_id").css("width","100%"); $("#issue_project_id").css("width", "100%");
$("#issue_project_id").css("overflow ","hidden"); $("#issue_project_id").css("overflow ", "hidden");
// $(".jstEditor").css("margin-left ","80px"); // $(".jstEditor").css("margin-left ","80px");
//issue_project_id //issue_project_id
}); });
function showAndScrollTo(id, focus) { function showAndScrollTo(id, focus) {
$('#'+id).show(); $('#' + id).show();
if (focus !== null) { if (focus !== null) {
$('#'+focus).focus(); $('#' + focus).focus();
} }
$('html, body').animate({scrollTop: $('#'+id).offset().top}, 400); $('html, body').animate({scrollTop: $('#' + id).offset().top}, 400);
/*缺陷完成度决定缺陷状态*/
function PrecentChange(obj) {
var _v = obj;
if (_v == 100) {
//var select=$("select[id='issue_status_id']");
$("select[id='issue_status_id']").find("option[value='3']").attr("selected", "selected");
}
else if (_v == 0) {
//alert(1);
$("select[id='issue_status_id']").find("option[value='1']").attr("selected", "selected");
}
else if (_v != 100 && _v != 0) {
// alert(2);
$("select[id='issue_status_id']").find("option[value='2']").attr("selected", "selected");
}
}
// Can't use Rails' remote select because we need the form data
// 根据缺陷状态值改变完成度状态
function updateIssueFrom(url) {
$.ajax({
url: url,
type: 'post',
data: $('#issue-form').serialize()
});
}
// firefox pre标签换行
$(document).ready(function () {
var userAgent = navigator.userAgent.toLowerCase();
var browser = {
version: (userAgent.match(/.+(?:rv|it|ra|ie)[/: ]([d.]+)/) || [])[1],
safari: /webkit/.test(userAgent),
opera: /opera/.test(userAgent),
msie: /msie/.test(userAgent) && !/opera/.test(userAgent),
mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent)
};
if (browser.mozilla || browser.opera) {
$("pre").addClass("break_word_firefox");
}
else {
$("pre").addClass("break_word");
}
});
} }

View File

@ -50,7 +50,7 @@ a:hover.subnav_green{ background:#14ad5a;}
.project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;} .project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;}
.course_description{max-height: 112px;overflow:hidden; word-break: break-all;word-wrap: break-word;} .course_description{max-height: 112px;overflow:hidden; word-break: break-all;word-wrap: break-word;}
.course_description_none{max-height: none;} .course_description_none{max-height: none;}
.lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;display: none;} .lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;}
.lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;} .lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;}
/****标签(和资源库的tag样式一致)***/ /****标签(和资源库的tag样式一致)***/
.project_Label{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; margin-bottom:10px;} .project_Label{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; margin-bottom:10px;}

View File

@ -71,7 +71,7 @@ a:hover.problem_pic{border:1px solid #64bdd9;}
.pro_txt_w{width:610px;} .pro_txt_w{width:610px;}
a.problem_name{ color:#ff5722; } a.problem_name{ color:#ff5722; }
a:hover.problem_name{ color:#d33503;} a:hover.problem_name{ color:#d33503;}
a.problem_tit{ color:#0781b4; width:430px; font-weight:bold; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} a.problem_tit{ color:#0781b4; max-width:430px; font-weight:bold; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
a.problem_tit02{ color:#0781b4; font-weight:bold;width:400px; } a.problem_tit02{ color:#0781b4; font-weight:bold;width:400px; }
a:hover.problem_tit,a:hover.problem_tit02{ color:#09658c; } a:hover.problem_tit,a:hover.problem_tit02{ color:#09658c; }
.problem_main{ border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;} .problem_main{ border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;}
@ -213,7 +213,7 @@ a:hover.ping_sub{ background:#14a8b9;}
/*.ping_distop span a{ float:right; width:20px; height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}*/ /*.ping_distop span a{ float:right; width:20px; height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}*/
/*上传资源弹出框样式*/ /*上传资源弹出框样式*/
.popbox_polls{width:300px;height:100px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-100px 0 0 -150px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;} /*#popbox_polls{width:300px;height:100px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-100px 0 0 -150px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}*/
.upload_con h2{ display:block; background:#eaeaea; font-size:14px; color:#343333; height:31px; width: auto; margin-top:25px; padding-left:20px; padding-top:5px;} .upload_con h2{ display:block; background:#eaeaea; font-size:14px; color:#343333; height:31px; width: auto; margin-top:25px; padding-left:20px; padding-top:5px;}
.upload_box{ width:430px; margin:15px auto;} .upload_box{ width:430px; margin:15px auto;}
@ -378,6 +378,8 @@ blockquote {
.pro_st_dis{display:block; } .pro_st_dis{display:block; }
.pro_st_undis{display:none;} .pro_st_undis{display:none;}
.upbtn { margin: 40px 0px 0px 15px;display: block;padding: 2px 5px;border: 1px solid #EAEAEA;}
.upimg{ border:1px solid #eaeaea; display:block; width:60px; height:60px; padding:1px;} .upimg{ border:1px solid #eaeaea; display:block; width:60px; height:60px; padding:1px;}
.upimg:hover{ border:1px solid #64bdd9; } .upimg:hover{ border:1px solid #64bdd9; }
.box{ margin-bottom:10px;} .box{ margin-bottom:10px;}
@ -464,6 +466,21 @@ img.ui-datepicker-trigger {
.wiki_con_box{ line-height:1.9; color:#2d2d2d;} .wiki_con_box{ line-height:1.9; color:#2d2d2d;}
.wiki_page_con{ border-bottom:1px dashed #CCC; margin-bottom:10px; padding-bottom:10px;} .wiki_page_con{ border-bottom:1px dashed #CCC; margin-bottom:10px; padding-bottom:10px;}
#wiki_new_box{ display:none;} #wiki_new_box{ display:none;}
/*wiki显示附加*/
.wiki-page {
font-size: 14px;
color: #09658C !important;
font-weight: bold;
width: 630px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-bottom: 10px;
}
/*.author{*/
/*color: #FF5722;*/
/*margin-left:20px;*/
/*}*/
/*里程碑进度条*/ /*里程碑进度条*/
table.progress { table.progress {
@ -499,3 +516,7 @@ a.atom { background: url(../images/feed.png) no-repeat 1px 50%; padding: 2px 0px
p.other-formats { text-align: right; font-size:0.9em; color: #666; } p.other-formats { text-align: right; font-size:0.9em; color: #666; }
.other-formats span + span:before { content: "| "; } .other-formats span + span:before { content: "| "; }
/*pre标签换行*/
.break_word{word-break: break-all;word-wrap: break-word;}
.break_word_firefox{white-space: pre-wrap;word-break: break-all;}

View File

@ -44,6 +44,7 @@ h4{ font-size:14px; color:#3b3b3b;}
.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden} .clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden}
.clearfix{clear:both;zoom:1} .clearfix{clear:both;zoom:1}
.break_word{ word-break:break-all; word-wrap: break-word;} .break_word{ word-break:break-all; word-wrap: break-word;}
.hidden{overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.flow_hidden{ width:300px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} .flow_hidden{ width:300px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
/* Spacing */ /* Spacing */