Merge remote-tracking branch 'origin/szzh' into szzh
This commit is contained in:
commit
72eff3a032
|
@ -759,7 +759,7 @@ class CoursesController < ApplicationController
|
||||||
def homework
|
def homework
|
||||||
if @course.is_public != 0 || User.current.member_of_course?(@course) || User.current.admin?
|
if @course.is_public != 0 || User.current.member_of_course?(@course) || User.current.admin?
|
||||||
@offset, @limit = api_offset_and_limit({:limit => 10})
|
@offset, @limit = api_offset_and_limit({:limit => 10})
|
||||||
@bids = @course.homeworks.order('deadline DESC')
|
@bids = @course.homeworks.order('deadline ASC')
|
||||||
@bids = @bids.like(params[:name]) if params[:name].present?
|
@bids = @bids.like(params[:name]) if params[:name].present?
|
||||||
@bid_count = @bids.count
|
@bid_count = @bids.count
|
||||||
@bid_pages = Paginator.new @bid_count, @limit, params['page']
|
@bid_pages = Paginator.new @bid_count, @limit, params['page']
|
||||||
|
|
|
@ -162,7 +162,8 @@ class IssuesController < ApplicationController
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {
|
format.html {
|
||||||
render_attachment_warning_if_needed(@issue)
|
render_attachment_warning_if_needed(@issue)
|
||||||
flash[:notice] = l(:notice_issue_successful_create, :id => view_context.link_to("#{@issue.subject}", issue_path(@issue), :title => @issue.subject))
|
flash[:notice] = l(:label_successful_create)
|
||||||
|
#flash[:notice] = l(:notice_issue_successful_create, :id => view_context.link_to("#{@issue.subject}", issue_path(@issue), :title => @issue.subject))
|
||||||
#flash[:notice] = l(:notice_issue_successful_create, :id => view_context.link_to("##{@issue.id}", issue_path(@issue), :title => @issue.subject))
|
#flash[:notice] = l(:notice_issue_successful_create, :id => view_context.link_to("##{@issue.id}", issue_path(@issue), :title => @issue.subject))
|
||||||
if params[:continue]
|
if params[:continue]
|
||||||
attrs = {:tracker_id => @issue.tracker, :parent_issue_id => @issue.parent_issue_id}.reject {|k,v| v.nil?}
|
attrs = {:tracker_id => @issue.tracker, :parent_issue_id => @issue.parent_issue_id}.reject {|k,v| v.nil?}
|
||||||
|
|
|
@ -340,7 +340,7 @@ class ProjectsController < ApplicationController
|
||||||
@is_zhuce =false
|
@is_zhuce =false
|
||||||
flash[:notice] = l(:notice_email_sent, :value => email)
|
flash[:notice] = l(:notice_email_sent, :value => email)
|
||||||
else
|
else
|
||||||
flash[:error] = l(:notice_registed_success, :value => email)
|
flash[:error] = l(:notice_registed_error, :value => email)
|
||||||
@is_zhuce = true
|
@is_zhuce = true
|
||||||
end
|
end
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
|
@ -43,7 +43,7 @@ module WatchersHelper
|
||||||
)
|
)
|
||||||
method = watched ? 'delete' : 'post'
|
method = watched ? 'delete' : 'post'
|
||||||
|
|
||||||
link_to text, url, :remote => true, :method => method, :style => "color: #fff; display:block; padding: 0px 5px; margin-right: 10px; height: 22px; line-height: 21px;padding-top:1px; background: none repeat scroll 0% 0% #64BDD9; TES"
|
link_to text, url, :remote => true, :method => method, :class => css
|
||||||
end
|
end
|
||||||
|
|
||||||
############## added by linchun
|
############## added by linchun
|
||||||
|
@ -278,11 +278,48 @@ module WatchersHelper
|
||||||
)
|
)
|
||||||
method = applied ? 'delete' : 'post'
|
method = applied ? 'delete' : 'post'
|
||||||
|
|
||||||
link_to text, url, :remote => true, :method => method ,:style => "color: #fff; display:block; padding: 0px 5px; margin-right: 10px; height: 21px; line-height: 22px;padding-top:1px; background: none repeat scroll 0% 0% #64BDD9; TES"
|
link_to text, url, :remote => true, :method => method , :class => css
|
||||||
end
|
end
|
||||||
|
|
||||||
def exit_project_link(project)
|
def exit_project_link(project)
|
||||||
link_to(l(:label_exit_project),exit_cur_project_path(project.id),
|
link_to(l(:label_exit_project),exit_cur_project_path(project.id),
|
||||||
:remote => true, :confirm => l(:lable_sure_exit_project), :style => "color: #fff; display:block; padding: 0px 5px; margin-right: 10px; height: 21px; line-height: 22px; background: none repeat scroll 0% 0% #64BDD9; TES;padding-top:1px;" )
|
:remote => true, :confirm => l(:lable_sure_exit_project),
|
||||||
|
:style => "color: #fff; display:block;font-size:12px; padding: 0px 5px; margin-right: 10px; height: 20px; line-height: 22px; background: none repeat scroll 0% 0% #64BDD9; TES;padding-top:1px;" )
|
||||||
|
end
|
||||||
|
|
||||||
|
#项目关注、取消关注
|
||||||
|
#REDO:项目样式确定后方法需要对CSS变量进行改进
|
||||||
|
def watcher_link_for_project(objects, user, options=[])
|
||||||
|
return '' unless user && user.logged?
|
||||||
|
objects = Array.wrap(objects)
|
||||||
|
watched = objects.any? {|object| object.watched_by?(user)}
|
||||||
|
@watch_flag = objects.first.instance_of?(Project)
|
||||||
|
id = watcher_css(objects)
|
||||||
|
text = @watch_flag ?
|
||||||
|
(watched ? l(:button_unfollow) : l(:label_button_following)) : (watched ? l(:button_unwatch) : l(:label_button_following))
|
||||||
|
url = watch_path(:object_type => objects.first.class.to_s.underscore,
|
||||||
|
:object_id => (objects.size == 1 ? objects.first.id : objects.map(&:id).sort))
|
||||||
|
method = watched ? 'delete' : 'post'
|
||||||
|
link_to text, url, :remote => true, :method => method,
|
||||||
|
:class => "project_watch_new" ,:id=>id
|
||||||
|
end
|
||||||
|
|
||||||
|
#申请加入项目
|
||||||
|
def join_in_project_link(project, user, options=[])
|
||||||
|
return '' unless user && user.logged?
|
||||||
|
applied = project.applied_projects.find_by_user_id(user.id)
|
||||||
|
text = applied ? l(:label_unapply_project) : l(:label_apply_project)
|
||||||
|
@applied_flag = project.instance_of?(Project)
|
||||||
|
if applied
|
||||||
|
appliedid = applied.id
|
||||||
|
end
|
||||||
|
id = applied_css(project)
|
||||||
|
url = appliedproject_path(
|
||||||
|
:id=>appliedid,
|
||||||
|
:user_id => user.id,
|
||||||
|
:project_id => project.id)
|
||||||
|
method = applied ? 'delete' : 'post'
|
||||||
|
link_to text, url, :remote => true, :method => method , :class => "project_watch_new",:id => id
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -125,7 +125,7 @@ class Mailer < ActionMailer::Base
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 公共讨论区发帖、回帖添加邮件发送信息
|
||||||
def forum_message_added(memo)
|
def forum_message_added(memo)
|
||||||
@memo = memo
|
@memo = memo
|
||||||
redmine_headers 'Memo' => memo.id
|
redmine_headers 'Memo' => memo.id
|
||||||
|
@ -134,9 +134,11 @@ class Mailer < ActionMailer::Base
|
||||||
@forum_url = url_for(:controller => 'forums', :action => 'show', :id => @forum.id)
|
@forum_url = url_for(:controller => 'forums', :action => 'show', :id => @forum.id)
|
||||||
@issue_author_url = url_for(user_activities_url(@author))
|
@issue_author_url = url_for(user_activities_url(@author))
|
||||||
recipients ||= []
|
recipients ||= []
|
||||||
if @forum.author.mail_notification != 'day' && @forum.author.mail_notification != 'week'
|
#将帖子创建者邮箱地址加入数组
|
||||||
|
if @forum.creator.mail_notification != 'day' && @forum.creator.mail_notification != 'week'
|
||||||
recipients << @forum.creator.mail
|
recipients << @forum.creator.mail
|
||||||
end
|
end
|
||||||
|
#回复人邮箱地址加入数组
|
||||||
if @author.mail_notification != 'day' && @author.mail_notification != 'week'
|
if @author.mail_notification != 'day' && @author.mail_notification != 'week'
|
||||||
recipients << @author.mail
|
recipients << @author.mail
|
||||||
end
|
end
|
||||||
|
|
|
@ -42,7 +42,7 @@ class Memo < ActiveRecord::Base
|
||||||
"parent_id",
|
"parent_id",
|
||||||
"replies_count"
|
"replies_count"
|
||||||
|
|
||||||
after_create :add_author_as_watcher, :reset_counters! #, :sendmail#,:be_user_score -- 公共区发帖暂不计入得分
|
after_create :add_author_as_watcher, :reset_counters!, :sendmail
|
||||||
# after_update :update_memos_forum
|
# after_update :update_memos_forum
|
||||||
after_destroy :reset_counters!#,:down_user_score -- 公共区发帖暂不计入得分
|
after_destroy :reset_counters!#,:down_user_score -- 公共区发帖暂不计入得分
|
||||||
# after_create :send_notification
|
# after_create :send_notification
|
||||||
|
|
|
@ -1,5 +1,14 @@
|
||||||
<% selector = ".#{applied_css(@project)}" %>
|
<% selector = ".#{applied_css(@project)}" %>
|
||||||
$("<%= selector %>").each(function(){$(this).replaceWith("<%= escape_javascript applied_link(@project, User.current) %>")});
|
<% id_selector = "#{applied_css(@project)}" %>
|
||||||
|
if($("<%= selector %>").get(0) == undefined)
|
||||||
|
{
|
||||||
|
$("#<%= id_selector %>").each(function(){$(this).replaceWith("<%= escape_javascript join_in_project_link(@project, User.current) %>")});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$("<%= selector %>").each(function(){$(this).replaceWith("<%= escape_javascript applied_link(@project, User.current) %>")});
|
||||||
|
}
|
||||||
|
|
||||||
if (window.Messenger) {
|
if (window.Messenger) {
|
||||||
Messenger.options = {
|
Messenger.options = {
|
||||||
extraClasses: 'messenger-fixed messenger-on-bottom messenger-on-right',
|
extraClasses: 'messenger-fixed messenger-on-bottom messenger-on-right',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
|
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
|
||||||
<% if defined?(container) && container && container.saved_attachments %>
|
<% if defined?(container) && container && container.saved_attachments %>
|
||||||
<% container.saved_attachments.each_with_index do |attachment, i| %>
|
<% container.attachments.each_with_index do |attachment, i| %>
|
||||||
<span id="attachments_p<%= i %>" class="attachment">
|
<span id="attachments_p<%= i %>" class="attachment">
|
||||||
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%>
|
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%>
|
||||||
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
|
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
|
||||||
|
@ -60,7 +60,11 @@
|
||||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||||
:upload_path => uploads_path(:format => 'js',:project =>project),
|
:upload_path => uploads_path(:format => 'js',:project =>project),
|
||||||
:description_placeholder => l(:label_optional_description)
|
:description_placeholder => l(:label_optional_description),
|
||||||
|
:field_is_public => l(:field_is_public),
|
||||||
|
:are_you_sure => l(:text_are_you_sure),
|
||||||
|
:file_count => l(:label_file_count),
|
||||||
|
:delete_all_files => l(:text_are_you_sure_all)
|
||||||
} %>
|
} %>
|
||||||
<span id="upload_file_count">
|
<span id="upload_file_count">
|
||||||
<%= l(:label_no_file_uploaded)%>
|
<%= l(:label_no_file_uploaded)%>
|
||||||
|
|
|
@ -50,7 +50,11 @@
|
||||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||||
:upload_path => uploads_path(:format => 'js'),
|
:upload_path => uploads_path(:format => 'js'),
|
||||||
:description_placeholder => l(:label_optional_description)
|
:description_placeholder => l(:label_optional_description),
|
||||||
|
:field_is_public => l(:field_is_public),
|
||||||
|
:are_you_sure => l(:text_are_you_sure),
|
||||||
|
:file_count => l(:label_file_count),
|
||||||
|
:delete_all_files => l(:text_are_you_sure_all)
|
||||||
} %>
|
} %>
|
||||||
<span id="upload_file_count"><%= l(:label_no_file_uploaded)%></span>
|
<span id="upload_file_count"><%= l(:label_no_file_uploaded)%></span>
|
||||||
(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
|
(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
<% end%>
|
<% end%>
|
||||||
<span title="<%= attachment.filename%>" id = "attachment_">
|
<span title="<%= attachment.filename%>" id = "attachment_">
|
||||||
<% if options[:length] %>
|
<% if options[:length] %>
|
||||||
<%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true,:length => options[:length] -%>
|
<%= link_to_short_attachment attachment, :class => 'icon icon-attachment', :download => true,:length => options[:length] -%>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
|
<%= link_to_short_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
<%if is_float%>
|
<%if is_float%>
|
||||||
|
|
|
@ -165,7 +165,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" width="580px" >
|
<td colspan="2" width="580px" >
|
||||||
<span class="font_description">
|
<span class="font_description">
|
||||||
<%= textilizable bid, :description %>
|
<%=h sanitize(bid.description.html_safe) %>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" width="580px" ><p class="font_description">
|
<td colspan="2" width="580px" ><p class="font_description">
|
||||||
<% unless user.memberships.empty? %>
|
<% unless user.memberships.empty? %>
|
||||||
<%= l(:label_contribute_to, :project_count => "#{user.memberships.count}") %>
|
<%= l(:label_contribute_to, :count => "#{user.memberships.count}") %>
|
||||||
<% for member in user.memberships %>
|
<% for member in user.memberships %>
|
||||||
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %>
|
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -34,7 +34,11 @@
|
||||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||||
:upload_path => uploads_path(:format => 'js'),
|
:upload_path => uploads_path(:format => 'js'),
|
||||||
:description_placeholder => l(:label_optional_description)
|
:description_placeholder => l(:label_optional_description),
|
||||||
|
:field_is_public => l(:field_is_public),
|
||||||
|
:are_you_sure => l(:text_are_you_sure),
|
||||||
|
:file_count => l(:label_file_count),
|
||||||
|
:delete_all_files => l(:text_are_you_sure_all)
|
||||||
} %>
|
} %>
|
||||||
<!--<input type="submit" name="" value="上传文件" class="f_l ml10" style="width:80px; height:26px;">-->
|
<!--<input type="submit" name="" value="上传文件" class="f_l ml10" style="width:80px; height:26px;">-->
|
||||||
<label class="f_l ml10 c_grey" style=" margin-top: 3px;">
|
<label class="f_l ml10 c_grey" style=" margin-top: 3px;">
|
||||||
|
|
|
@ -14,9 +14,10 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
<div class="for_img_thumbnails">
|
||||||
<% curse_attachments.each do |file| %>
|
<% curse_attachments.each do |file| %>
|
||||||
<div class="re_con_box">
|
<div class="re_con_box">
|
||||||
<div class=" ">
|
<div class="">
|
||||||
<%= link_to_attachment file, :download => true,:text => truncate(file.filename,length: 35, omission: '...'), :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %>
|
<%= link_to_attachment file, :download => true,:text => truncate(file.filename,length: 35, omission: '...'), :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %>
|
||||||
<% if User.current.logged? %>
|
<% if User.current.logged? %>
|
||||||
<% if (is_course_teacher(User.current,@course) || file.author_id == User.current.id) && course_contains_attachment?(@course,file) %>
|
<% if (is_course_teacher(User.current,@course) || file.author_id == User.current.id) && course_contains_attachment?(@course,file) %>
|
||||||
|
@ -50,6 +51,7 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div><!---re_con_box end-->
|
</div><!---re_con_box end-->
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</div>
|
||||||
<ul class="wlist">
|
<ul class="wlist">
|
||||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => @is_remote, :flag => true%>
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => @is_remote, :flag => true%>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -31,4 +31,5 @@ closeModal();
|
||||||
$("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>');
|
$("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>');
|
||||||
<%end%>
|
<%end%>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
$(document).ready(img_thumbnails);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<%= watcher_link(@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 => 'icon icon-del' 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 => 'icon icon-del' if User.current.allowed_to?(:delete_issues, @project) %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="project_r_h">
|
<div class="project_r_h">
|
||||||
<h2 class="project_h2">问题跟踪</h2>
|
<h2 class="project_h2"><%= l(:label_issue_tracking) %></h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="problem_top">
|
<div class="problem_top">
|
||||||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
:onclick => '$("#custom_query").slideToggle(400); ' if true || User.current.logged? %>
|
:onclick => '$("#custom_query").slideToggle(400); ' if true || User.current.logged? %>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<span class="problem_p fr">问题总数:<span><%= @project.issues.count %></span> 未解决:<span><%= @project.issues.where('status_id in (1,2,4,6)').count %></span></span>
|
<span class="problem_p fr"><%= l(:label_issues_sum) %>:<span><%= @project.issues.count %></span> <%= l(:lable_issues_undo) %> <span><%= @project.issues.where('status_id in (1,2,4,6)').count %></span></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<% if !@query.new_record? && @query.editable_by?(User.current) %>
|
<% if !@query.new_record? && @query.editable_by?(User.current) %>
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
closeBtn.bind("click",function(){
|
closeBtn.bind("click",function(){
|
||||||
sideContent.animate({width: '0px'},"fast");
|
sideContent.animate({width: '0px'},"fast");
|
||||||
show_btn.stop(true, true).delay(300).animate({ width: '25px'},"fast");
|
show_btn.stop(true, true).delay(300).animate({ width: '25px'},"fast");
|
||||||
cookiesave('minStatue','false','','','');
|
cookiesave('minStatue','true','','','');
|
||||||
});
|
});
|
||||||
//show???
|
//show???
|
||||||
show_btn.bind("click",function() {
|
show_btn.bind("click",function() {
|
||||||
|
@ -121,15 +121,15 @@ function cookiesave(n, v, mins, dn, path)
|
||||||
{
|
{
|
||||||
if(n)
|
if(n)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(!mins) mins = 365 * 24 * 60;
|
if(!mins) mins = 365 * 24 * 60;
|
||||||
if(!path) path = "/";
|
if(!path) path = "/";
|
||||||
var date = new Date();
|
var date = new Date();
|
||||||
|
|
||||||
date.setTime(date.getTime() + (mins * 60 * 1000));
|
date.setTime(date.getTime() + (mins * 60 * 1000));
|
||||||
|
|
||||||
var expires = "; expires=" + date.toGMTString();
|
var expires = "; expires=" + date.toGMTString();
|
||||||
|
|
||||||
if(dn) dn = "domain=" + dn + "; ";
|
if(dn) dn = "domain=" + dn + "; ";
|
||||||
document.cookie = n + "=" + v + expires + "; " + dn + "path=" + path;
|
document.cookie = n + "=" + v + expires + "; " + dn + "path=" + path;
|
||||||
|
|
||||||
|
@ -170,8 +170,8 @@ function cookieget(n)
|
||||||
<%= f.hidden_field :content, :required => true , :value => l(:label_feedback_value) %>
|
<%= f.hidden_field :content, :required => true , :value => l(:label_feedback_value) %>
|
||||||
<%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %>
|
<%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %>
|
||||||
<a href="javascript:void(0);" class="opnionButton" style=" color:#fff;" id="" onclick="f_submit();"><%= l(:label_submit)%></a>
|
<a href="javascript:void(0);" class="opnionButton" style=" color:#fff;" id="" onclick="f_submit();"><%= l(:label_submit)%></a>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="msgserver">
|
<div class="msgserver">
|
||||||
<a href="http://user.trustie.net/users/12/user_newfeedback" style="color: #15BCCF;"><%= l(:label_technical_support) %>黄井泉</a>
|
<a href="http://user.trustie.net/users/12/user_newfeedback" style="color: #15BCCF;"><%= l(:label_technical_support) %>黄井泉</a>
|
||||||
<a href="http://user.trustie.net/users/34/user_newfeedback" style="color: #15BCCF;"><%= l(:label_technical_support) %>白 羽</a>
|
<a href="http://user.trustie.net/users/34/user_newfeedback" style="color: #15BCCF;"><%= l(:label_technical_support) %>白 羽</a>
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<div class="pr_info_join fl">
|
<div class="pr_info_join fl">
|
||||||
<!--关注项目-->
|
<!--关注项目-->
|
||||||
<% if ( !(User.current.member_of? @project) && User.current.login?) %> <!--added by linchun-->
|
<% if ( !(User.current.member_of? @project) && User.current.login?) %> <!--added by linchun-->
|
||||||
<span><%= watcher_link(@project, User.current) %></span>
|
<span><%= watcher_link_for_project(@project, User.current) %></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!--加入项目 -->
|
<!--加入项目 -->
|
||||||
<% if ( !(User.current.member_of? @project) && User.current.login?) %>
|
<% if ( !(User.current.member_of? @project) && User.current.login?) %>
|
||||||
<%= applied_link(@project, User.current) %>
|
<%= join_in_project_link(@project, User.current) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!--退出项目-->
|
<!--退出项目-->
|
||||||
<% if ((User.current.member_of? @project) &&
|
<% if ((User.current.member_of? @project) &&
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>升级浏览器</title>
|
||||||
|
<script src="jquery-1.8.3-ui-1.9.2-ujs-2.0.3.js" type="text/javascript"></script>
|
||||||
|
<style type="text/css">
|
||||||
|
body{ font-size:12px; font-family:"微软雅黑","宋体"; background: #F2F2F2; font-style:normal;}
|
||||||
|
.update{ border-bottom:1px solid #d7d7d7; color:#fea254; text-align:center; width:100%; font-size:10px; height:30px; background:#fdffd9; padding:2px 0;z-index:1000;}
|
||||||
|
a.green_btn{ padding:2px 10px; background:#3caf3f; font-size:12px;color:#fff;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
|
||||||
|
a:hover.green_btn{ background:#289c2b;}
|
||||||
|
a.close_btn{ background:url(images/floatbox/img_floatbox.png) -20px -35px no-repeat; display:block; width:16px; height:16px; float:right; margin:7px 5px 0 0;}
|
||||||
|
a:hover.close_btn{ background:url(images/floatbox/img_floatbox.png) -20px -63px no-repeat;}
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function close_window(){
|
||||||
|
$('#light').slideUp(400);
|
||||||
|
}
|
||||||
|
if ((navigator.userAgent.indexOf('MSIE 8.0') >= 0) && (navigator.userAgent.indexOf('Opera') < 0))
|
||||||
|
{alert('你是使用IE')}else
|
||||||
|
if (navigator.userAgent.indexOf('Firefox') >= 0)
|
||||||
|
Document.html{
|
||||||
|
div class="update" id="light">
|
||||||
|
<p>您的浏览器版本过低,建议升级您的浏览器。
|
||||||
|
<a href="#" onClick="close_window();" class="close_btn" ></a>
|
||||||
|
</p>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
{alert('你是使用Firefox')}else
|
||||||
|
if (navigator.userAgent.indexOf('Opera') >= 0){alert('你是使用Opera')}else
|
||||||
|
{alert('你是使用其他的浏览器浏览网页!')}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body style=" height:1500px;">
|
||||||
|
<div class="update" id="light">
|
||||||
|
<span style="font-size: 14px;line-height:2.2;">您当前使用的是IE8浏览器,建议升级您的浏览器。
|
||||||
|
<a href="#" onClick="close_window();" class="close_buttton" ></a>
|
||||||
|
</span>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
<!DOCTYPE html PUBLIC "-
|
|
@ -3,6 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title><%=h html_title %></title>
|
<title><%=h html_title %></title>
|
||||||
|
<%= render :partial => "layouts/point_browser" %>
|
||||||
<meta name="description" content="<%= Redmine::Info.app_name %>" />
|
<meta name="description" content="<%= Redmine::Info.app_name %>" />
|
||||||
<meta name="keywords" content="issue,bug,tracker" />
|
<meta name="keywords" content="issue,bug,tracker" />
|
||||||
<%= csrf_meta_tag %>
|
<%= csrf_meta_tag %>
|
||||||
|
|
|
@ -153,7 +153,7 @@
|
||||||
<span class="subnav_num">(<%= @project.issues.count %>)</span><span>
|
<span class="subnav_num">(<%= @project.issues.count %>)</span><span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if User.current.member_of?(@project) %>
|
<% if User.current.member_of?(@project) %>
|
||||||
<%= link_to "+"+l(:label_release_issue), new_project_issue_path(@project) , :style => "font-size:12px;color:#fff; padding:1px 3px 3px 3px;height:16px;margin-top:4px;background:#28be6c;float:right;line-height:20px;" %></span>
|
<%= link_to "+"+l(:label_release_issue), new_project_issue_path(@project) , :style => "font-size:12px !important;color:#fff; padding:1px 3px 3px 3px;height:16px;margin-top:4px;background:#28be6c;float:right;line-height:20px;" %></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -164,7 +164,7 @@
|
||||||
<span class="subnav_num">(<%= @project.boards.first.topics.count %>)</span>
|
<span class="subnav_num">(<%= @project.boards.first.topics.count %>)</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if User.current.member_of?(@project) %>
|
<% if User.current.member_of?(@project) %>
|
||||||
<%= link_to "+"+l(:project_module_boards_post), project_boards_path(@project, :flag => true), :layout => 'base_projects',:style => "font-size:12px;color:#fff; padding:0px 3px 3px 3px;height:16px;margin-top:5px;background:#28be6c;float:right;line-height:20px;" %>
|
<%= link_to "+"+l(:project_module_boards_post), project_boards_path(@project, :flag => true), :layout => 'base_projects',:style => "font-size:12px !important;color:#fff; padding:0px 3px 3px 3px;height:16px;margin-top:5px;background:#28be6c;float:right;line-height:20px;" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end%>
|
<% end%>
|
||||||
|
@ -175,7 +175,7 @@
|
||||||
<span class="subnav_num">(<%= attaments_num %>)</span>
|
<span class="subnav_num">(<%= attaments_num %>)</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if User.current.member_of?(@project) %>
|
<% if User.current.member_of?(@project) %>
|
||||||
<%= link_to "+"+l(:label_upload_files), project_files_path(@project,:flag => true),:style => "font-size:12px;color:#fff; padding:1px 3px 3px 3px;height:16px;margin-top:4px;background:#28be6c;float:right;line-height:20px;" %>
|
<%= link_to "+"+l(:label_upload_files), project_files_path(@project,:flag => true),:style => "font-size:12px !important;color:#fff; padding:1px 3px 3px 3px;height:16px;margin-top:4px;background:#28be6c;float:right;line-height:20px;" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end%>
|
<% end%>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<div class="lz">
|
<div class="lz">
|
||||||
<!-- 在这里添加赞和踩-->
|
<!-- 在这里添加赞和踩-->
|
||||||
<span id="praise_tread" style="float: right"> <%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @memo,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%> </span>
|
<span id="praise_tread" style="float: right"> <%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @memo,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%> </span>
|
||||||
<div class="lz-left">
|
<div class="lz-left">
|
||||||
<div>
|
<div>
|
||||||
<%= link_to image_tag(url_to_avatar(@memo.author), :class => "avatar"), user_path(@memo.author) %>
|
<%= link_to image_tag(url_to_avatar(@memo.author), :class => "avatar"), user_path(@memo.author) %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
:remote => true,
|
:remote => true,
|
||||||
:method => 'get',
|
:method => 'get',
|
||||||
:title => l(:button_quote)
|
:title => l(:button_quote)
|
||||||
)if !@memo.locked? && User.current.logged? %>
|
)if !@memo.locked? && User.current.logged? %>
|
||||||
|
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
#image_tag('edit.png'),
|
#image_tag('edit.png'),
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="memo-content" id="memo-content_div">
|
<div class="memo-content" id="memo-content_div">
|
||||||
<%= textAreailizable(@memo,:content) %>
|
<%= textAreailizable(@memo,:content) %>
|
||||||
<p>
|
<p>
|
||||||
<% if @memo.attachments.any?%>
|
<% if @memo.attachments.any?%>
|
||||||
<% options = {:author => true, :deletable => @memo.deleted_attach_able_by?(User.current) } %>
|
<% options = {:author => true, :deletable => @memo.deleted_attach_able_by?(User.current) } %>
|
||||||
<%= render :partial => 'attachments/links', :locals => {:attachments => @memo.attachments, :options => options, :is_float => true} %>
|
<%= render :partial => 'attachments/links', :locals => {:attachments => @memo.attachments, :options => options, :is_float => true} %>
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
:method => 'get',
|
:method => 'get',
|
||||||
:title => l(:button_quote)
|
:title => l(:button_quote)
|
||||||
)if !@memo.locked? && User.current.logged? %>
|
)if !@memo.locked? && User.current.logged? %>
|
||||||
|
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
#image_tag('edit.png'),
|
#image_tag('edit.png'),
|
||||||
l(:button_edit),
|
l(:button_edit),
|
||||||
|
@ -120,7 +120,7 @@
|
||||||
:method => :delete,
|
:method => :delete,
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:title => l(:button_delete)
|
:title => l(:button_delete)
|
||||||
) if reply.destroyable_by?(User.current) %>
|
) if reply.destroyable_by?(User.current) %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
|
@ -146,7 +146,7 @@
|
||||||
<%= authoring reply.created_at, reply.author %>
|
<%= authoring reply.created_at, reply.author %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="pagination">
|
<div class="pagination">
|
||||||
|
|
|
@ -118,7 +118,7 @@
|
||||||
<div>
|
<div>
|
||||||
<!-- 昵称 -->
|
<!-- 昵称 -->
|
||||||
<p style="width:630px;padding-left: 40px;">
|
<p style="width:630px;padding-left: 40px;">
|
||||||
<%= f.text_field :login, :required => true, :size => 25, :name => "login", :readonly => true, :style => 'border:1px solid #d3d3d3;'%>
|
<%= f.text_field :login, :required => true, :size => 25, :name => "login", :style => 'border:1px solid #d3d3d3;'%>
|
||||||
<span class='font_lighter'><%= l(:label_max_number) %></span>
|
<span class='font_lighter'><%= l(:label_max_number) %></span>
|
||||||
<br/>
|
<br/>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>");
|
$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>");
|
||||||
$('#ajax-modal').html("<%= escape_javascript(render :partial => 'alert', locals: { :message => l(:label_memo_create_succ)}) %>");
|
$('#ajax-modal').html("<%= escape_javascript(render :partial => 'alert', locals: { :message => l(:label_memo_create_succ)}) %>");
|
||||||
showModal('ajax-modal', '250px');
|
showModal('ajax-modal', '250px');
|
||||||
$('#ajax-modal').css('height','111px');
|
//$('#ajax-modal').css('height','111px');
|
||||||
$('#ajax-modal').siblings().remove();
|
$('#ajax-modal').siblings().remove();
|
||||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||||
"<a href='#' onclick='close_alert_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
"<a href='#' onclick='close_alert_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>");
|
$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>");
|
||||||
$('#ajax-modal').html("<%= escape_javascript(render :partial => 'alert', locals: { :message => l(:label_poll_republish_success)}) %>");
|
$('#ajax-modal').html("<%= escape_javascript(render :partial => 'alert', locals: { :message => l(:label_poll_republish_success)}) %>");
|
||||||
showModal('ajax-modal', '250px');
|
showModal('ajax-modal', '250px');
|
||||||
$('#ajax-modal').css('height','80px');
|
//$('#ajax-modal').css('height','80px');
|
||||||
$('#ajax-modal').siblings().remove();
|
$('#ajax-modal').siblings().remove();
|
||||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||||
"<a href='#' onclick='close_alert_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
"<a href='#' onclick='close_alert_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||||
|
|
|
@ -126,7 +126,7 @@
|
||||||
<div class="grade">
|
<div class="grade">
|
||||||
|
|
||||||
<% if @project.project_type !=1 %>
|
<% if @project.project_type !=1 %>
|
||||||
<%= l(:label_project_grade)%>:
|
<%= l(:label_project_score)%>:
|
||||||
<span >
|
<span >
|
||||||
<%= link_to(format("%.2f" , red_project_scores(@project) ).to_i,
|
<%= link_to(format("%.2f" , red_project_scores(@project) ).to_i,
|
||||||
{:controller => 'projects',
|
{:controller => 'projects',
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<% if isregisted %>
|
<% if isregisted %>
|
||||||
<p style="color: #ff0000"><%= l(:notice_registed_success) %></p>
|
<p style="color: #ff0000"><%= l(:notice_registed_error) %></p>
|
||||||
<% end %>
|
<% end %>
|
|
@ -1,10 +1,29 @@
|
||||||
|
<script type="text/javascript" src="/javascripts/jQuery.autoMail.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function(){
|
||||||
|
$("#mail").mailAutoComplete({
|
||||||
|
boxClass: "out_box", //外部box样式
|
||||||
|
listClass: "list_box", //默认的列表样式
|
||||||
|
focusClass: "focus_box", //列表选样式中
|
||||||
|
markCalss: "mark_box", //高亮样式
|
||||||
|
autoClass: false,
|
||||||
|
textHint: true //提示文字自动隐藏
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style type="text/css">
|
||||||
|
.out_box{border:1px solid #ccc; background:#fff; font:12px/20px Tahoma;}
|
||||||
|
.list_box{border-bottom:1px solid #eee; padding:0 5px; cursor:pointer;}
|
||||||
|
.focus_box{background:#83DAF6;}
|
||||||
|
.mark_box{color:#FF7143;}
|
||||||
|
</style>
|
||||||
<script>
|
<script>
|
||||||
function verifyAddress() {
|
function verifyAddress() {
|
||||||
var email = $.trim($('#mail').val());
|
var email = $.trim($('#mail').val());
|
||||||
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
|
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
|
||||||
if(email == "")
|
if(email == "")
|
||||||
{
|
{
|
||||||
$("#valid_email").html("电子邮件不能为空");
|
$("#valid_email").text("<%= l(:label_input_email_blank)%>");
|
||||||
}
|
}
|
||||||
else if (filter.test(email)) {
|
else if (filter.test(email)) {
|
||||||
$("#valid_email").html("");
|
$("#valid_email").html("");
|
||||||
|
@ -12,7 +31,7 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$("#valid_email").html("您所填写的电子邮件格式不正确");
|
$("#valid_email").text("<%= l(:label_email_format_error)%>");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -55,7 +74,9 @@
|
||||||
</div>
|
</div>
|
||||||
<%= form_tag('send_mail_to_member', :controller => 'projects',:action => 'send_mail_to_member', method: 'get') do %>
|
<%= form_tag('send_mail_to_member', :controller => 'projects',:action => 'send_mail_to_member', method: 'get') do %>
|
||||||
<span id="valid_email" style="color: #FF0000;"></span>
|
<span id="valid_email" style="color: #FF0000;"></span>
|
||||||
<%= text_field_tag 'mail', '', :class => "fb_item fl", :placeholder => l(:label_input_email), :onkeyup => "verifyAddress();" %>
|
<div class="lin1_2">
|
||||||
|
<%= text_field_tag 'mail', '', :class => "fb_item fl", :placeholder => l(:label_input_email), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyAddress(this);" %>
|
||||||
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<a href="#" class="btn_free" onclick="senderEmail($(this));">
|
<a href="#" class="btn_free" onclick="senderEmail($(this));">
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<!-- new repository ,new by xianbo-->
|
<!-- new repository ,new by xianbo-->
|
||||||
<h3><%= l(:label_repository_new_repos) %></h3>
|
<div class="project_r_h">
|
||||||
|
<h2 class="project_h2"><%= l(:label_repository_new_repos) %></h2>
|
||||||
|
</div>
|
||||||
<%= labelled_form_for :repository, @repository, :url =>project_repositories_path(@project),:html => {:id => 'repository-form'} do |f| %>
|
<%= labelled_form_for :repository, @repository, :url =>project_repositories_path(@project),:html => {:id => 'repository-form'} do |f| %>
|
||||||
<%= render :partial => 'form_create', :locals => {:f => f} %>
|
<%= render :partial => 'form_create', :locals => {:f => f} %>
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,12 @@
|
||||||
<!--项目暂时单独出来,后面重构-->
|
<!--项目暂时单独出来,后面重构-->
|
||||||
<% if object_flag == '2' %>
|
<% if object_flag == '2' %>
|
||||||
<span class="re_tag f_l">
|
<span class="re_tag f_l">
|
||||||
<%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %></span>
|
<%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
|
||||||
|
<% if (ProjectInfo.find_by_project_id(obj.id)).try(:user_id) == User.current.id %>
|
||||||
|
<%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
|
||||||
|
:taggable_id => obj.id, :taggable_type => object_flag %>
|
||||||
|
<% end %>
|
||||||
|
</span>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div id="tag">
|
<div id="tag">
|
||||||
<span class="tag_show">
|
<span class="tag_show">
|
||||||
|
@ -47,7 +52,7 @@
|
||||||
<%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
|
<%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
|
||||||
:taggable_id => obj.id, :taggable_type => object_flag %>
|
:taggable_id => obj.id, :taggable_type => object_flag %>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% when '3' %>
|
<% when '3' %>
|
||||||
<% if (ProjectInfo.find_by_project_id(obj.project_id)).try(:user_id) == User.current.id %>
|
<% if (ProjectInfo.find_by_project_id(obj.project_id)).try(:user_id) == User.current.id %>
|
||||||
<span class='del'>
|
<span class='del'>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<%= hidden_field_tag 'with_subprojects', 0 %>
|
<%= hidden_field_tag 'with_subprojects', 0 %>
|
||||||
<label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label>
|
<label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= submit_tag l(:button_apply), :class => 'button-small', :style => "height:20px;padding: 1px 1px;font-size:11px;margin-left:10px;", :name => nil %>
|
<%= submit_tag l(:button_apply), :class => 'button', :name => nil %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<!-- <h3><%= l(:label_version_plural) %></h3>
|
<!-- <h3><%= l(:label_version_plural) %></h3>
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
<div class="project_r_h">
|
||||||
|
<h2 class="project_h2"><%= l(:label_roadmap) %></h2>
|
||||||
|
</div>
|
||||||
<h3>
|
<h3>
|
||||||
<%=l(:label_version_new)%>
|
<%=l(:label_version_new)%>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
|
@ -1,2 +1,11 @@
|
||||||
<% selector = ".#{watcher_css(watched)}" %>
|
<% selector = ".#{watcher_css(watched)}" %>
|
||||||
$("<%= selector %>").each(function(){$(this).replaceWith("<%= escape_javascript watcher_link(watched, user) %>")});
|
<% id_selector = "#{watcher_css(watched)}" %>
|
||||||
|
if($("<%= selector %>").get(0) == undefined)
|
||||||
|
{
|
||||||
|
$("#<%= id_selector %>").each(function(){$(this).replaceWith("<%= escape_javascript watcher_link_for_project(watched, user) %>")});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$("<%= selector %>").each(function(){$(this).replaceWith("<%= escape_javascript watcher_link(watched, user) %>")});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -337,7 +337,6 @@ en:
|
||||||
label_work_description_lengthlimit: less than 500 characters
|
label_work_description_lengthlimit: less than 500 characters
|
||||||
label_create_new_projects: Create a project
|
label_create_new_projects: Create a project
|
||||||
label_work_scores_people: The total number of users given scores
|
label_work_scores_people: The total number of users given scores
|
||||||
label_project_grade: Score
|
|
||||||
|
|
||||||
# Personal signature tips
|
# Personal signature tips
|
||||||
|
|
||||||
|
@ -629,8 +628,7 @@ en:
|
||||||
label_preview: Preview
|
label_preview: Preview
|
||||||
label_feed_plural: Feeds
|
label_feed_plural: Feeds
|
||||||
label_changes_details: Details of all changes
|
label_changes_details: Details of all changes
|
||||||
label_issue_tracking: Issue tracking
|
|
||||||
|
|
||||||
label_overall_spent_time: Overall spent time
|
label_overall_spent_time: Overall spent time
|
||||||
label_f_hour: "%{value} hour"
|
label_f_hour: "%{value} hour"
|
||||||
label_f_hour_plural: "%{value} hours"
|
label_f_hour_plural: "%{value} hours"
|
||||||
|
@ -937,11 +935,7 @@ en:
|
||||||
default_issue_status_rejected: Rejected
|
default_issue_status_rejected: Rejected
|
||||||
default_doc_category_user: User documentation
|
default_doc_category_user: User documentation
|
||||||
default_doc_category_tech: Technical documentation
|
default_doc_category_tech: Technical documentation
|
||||||
default_priority_low: Low
|
|
||||||
default_priority_normal: Normal
|
|
||||||
default_priority_high: High
|
|
||||||
default_priority_urgent: Urgent
|
|
||||||
default_priority_immediate: Immediate
|
|
||||||
default_activity_design: Design
|
default_activity_design: Design
|
||||||
default_activity_development: Development
|
default_activity_development: Development
|
||||||
|
|
||||||
|
@ -1529,12 +1523,12 @@ en:
|
||||||
|
|
||||||
|
|
||||||
label_project_notice: release the notice
|
label_project_notice: release the notice
|
||||||
label_no_file_uploaded: No file uploaded
|
|
||||||
label_forum_new: New forum
|
label_forum_new: New forum
|
||||||
label_memo_new_from_forum: Release memo
|
label_memo_new_from_forum: Release memo
|
||||||
bale_edit_notice: Edit
|
bale_edit_notice: Edit
|
||||||
|
|
||||||
label_user_grade: Individual score
|
|
||||||
|
|
||||||
label_course_term: Semester
|
label_course_term: Semester
|
||||||
label_comment_time: Comment time
|
label_comment_time: Comment time
|
||||||
|
|
|
@ -33,7 +33,7 @@ en:
|
||||||
#
|
#
|
||||||
label_project_id: "Projcet ID:"
|
label_project_id: "Projcet ID:"
|
||||||
|
|
||||||
label_apply_project: Apply to Join
|
label_apply_project: "+Apply to Join"
|
||||||
label_exit_project: Exit
|
label_exit_project: Exit
|
||||||
label_apply_project_waiting: "Application has been processed, please wait for administrator review."
|
label_apply_project_waiting: "Application has been processed, please wait for administrator review."
|
||||||
label_unapply_project: Cancel the application
|
label_unapply_project: Cancel the application
|
||||||
|
@ -45,7 +45,7 @@ en:
|
||||||
label_invite_new_user: "Send e-mail to invite new user"
|
label_invite_new_user: "Send e-mail to invite new user"
|
||||||
label_invite_trustie_user: "Invite the Trustie registered user"
|
label_invite_trustie_user: "Invite the Trustie registered user"
|
||||||
|
|
||||||
label_issue_tracking: Issue Tracking
|
label_issue_tracking: Issues
|
||||||
label_release_issue: New Issue
|
label_release_issue: New Issue
|
||||||
|
|
||||||
project_module_boards: Forums
|
project_module_boards: Forums
|
||||||
|
@ -106,11 +106,11 @@ en:
|
||||||
# 资源库(附件)公用
|
# 资源库(附件)公用
|
||||||
label_relation_files: Select an existing resource
|
label_relation_files: Select an existing resource
|
||||||
label_search_by_keyword: "Search by keywords"
|
label_search_by_keyword: "Search by keywords"
|
||||||
label_files_filter: "Files Filter:"
|
label_files_filter: "Filter Files:"
|
||||||
|
|
||||||
attachment_all: "All"
|
attachment_all: "All"
|
||||||
attachment_browse: "Attachment Content Browse"
|
attachment_browse: "By Attachment Content "
|
||||||
attachment_sufix_browse: "Attachment Type Browse"
|
attachment_sufix_browse: "By Attachment Type "
|
||||||
label_unknow_type: Unknow type
|
label_unknow_type: Unknow type
|
||||||
|
|
||||||
field_filename: File
|
field_filename: File
|
||||||
|
@ -130,15 +130,24 @@ en:
|
||||||
label_max_size: Maximum size
|
label_max_size: Maximum size
|
||||||
|
|
||||||
label_optional_description: Description
|
label_optional_description: Description
|
||||||
label_file_count: "%{count} files were uploaded successfully"
|
label_file_count: "files were uploaded successfully"
|
||||||
|
|
||||||
#
|
#
|
||||||
# 项目托管平台
|
# 项目托管平台
|
||||||
#
|
#
|
||||||
# 问题跟踪
|
# 问题跟踪
|
||||||
|
label_successful_create: Successfully created
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# 问题优先级
|
||||||
|
default_priority_low: Low
|
||||||
|
default_priority_normal: Normal
|
||||||
|
default_priority_high: High
|
||||||
|
default_priority_urgent: Urgent
|
||||||
|
default_priority_immediate: Immediate
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# 项目托管平台
|
# 项目托管平台
|
||||||
#
|
#
|
||||||
|
@ -185,13 +194,15 @@ en:
|
||||||
label_invite_new_user: "Send email to invite users"
|
label_invite_new_user: "Send email to invite users"
|
||||||
label_invite_join: Invite
|
label_invite_join: Invite
|
||||||
label_invite_email_tips: Enter the email address, Trustie will automatically register a user for the email address!
|
label_invite_email_tips: Enter the email address, Trustie will automatically register a user for the email address!
|
||||||
notice_registed_success: Email address is blank or has been registered!
|
notice_registed_error: Email address is blank or has been registered!
|
||||||
|
label_input_email_blank: Email address is blank!
|
||||||
label_email_format_error: Email format is incorrect!
|
label_email_format_error: Email format is incorrect!
|
||||||
label_send_email: Send
|
label_send_email: Send
|
||||||
label_input_email: Please input email address
|
label_input_email: Please input email address
|
||||||
|
|
||||||
label_invite_trustie_user: "Invite Trustie registered users"
|
label_invite_trustie_user: "Invite Trustie registered users"
|
||||||
label_invite_trustie_user_tips: "Please enter the Trustie user name"
|
label_invite_trustie_user_tips: "Type to find users"
|
||||||
|
label_user_role_null: User and Role can not be blank!
|
||||||
label_invite_project: "invites you to join the project"
|
label_invite_project: "invites you to join the project"
|
||||||
label_invite_success: Successful invitation
|
label_invite_success: Successful invitation
|
||||||
label_invite_members: Invite
|
label_invite_members: Invite
|
||||||
|
|
|
@ -10,9 +10,8 @@ zh:
|
||||||
#
|
#
|
||||||
# 公共类
|
# 公共类
|
||||||
#
|
#
|
||||||
label_apply_project: 申请加入
|
label_project_new: "新建项目"
|
||||||
label_project_new: 新建项目
|
label_join_project: "加入项目"
|
||||||
label_join_project: 加入项目
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -36,7 +35,8 @@ zh:
|
||||||
#
|
#
|
||||||
label_project_id: "项目ID:"
|
label_project_id: "项目ID:"
|
||||||
|
|
||||||
label_apply_project: 申请加入
|
label_apply_project: "+申请加入"
|
||||||
|
label_button_following: "+关注"
|
||||||
label_exit_project: 退出项目
|
label_exit_project: 退出项目
|
||||||
label_apply_project_waiting: 已处理申请,请等待管理员审核
|
label_apply_project_waiting: 已处理申请,请等待管理员审核
|
||||||
label_unapply_project: 取消申请
|
label_unapply_project: 取消申请
|
||||||
|
@ -49,6 +49,8 @@ zh:
|
||||||
|
|
||||||
label_issue_tracking: 问题跟踪
|
label_issue_tracking: 问题跟踪
|
||||||
label_release_issue: 发布问题
|
label_release_issue: 发布问题
|
||||||
|
label_issues_sum: 问题总数:
|
||||||
|
lable_issues_undo: 未解决:
|
||||||
|
|
||||||
project_module_boards: 讨论区
|
project_module_boards: 讨论区
|
||||||
project_module_boards_post: 发帖
|
project_module_boards_post: 发帖
|
||||||
|
@ -134,16 +136,22 @@ zh:
|
||||||
label_max_size: 最大文件大小
|
label_max_size: 最大文件大小
|
||||||
|
|
||||||
label_optional_description: 可选的描述
|
label_optional_description: 可选的描述
|
||||||
|
label_file_count: "个文件已上传"
|
||||||
|
|
||||||
|
text_are_you_sure_all: 您确定要删除所有文件吗
|
||||||
#
|
#
|
||||||
# 项目托管平台
|
# 项目托管平台
|
||||||
#
|
#
|
||||||
# 问题跟踪
|
# 问题跟踪
|
||||||
|
label_successful_create: 创建成功
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
default_priority_low: 低
|
||||||
|
default_priority_normal: 普通
|
||||||
|
default_priority_high: 高
|
||||||
|
default_priority_urgent: 紧急
|
||||||
|
default_priority_immediate: 立刻
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -192,15 +200,16 @@ zh:
|
||||||
#
|
#
|
||||||
label_invite_new_user: "发送邮件邀请新用户"
|
label_invite_new_user: "发送邮件邀请新用户"
|
||||||
label_invite_join: 邀请加入
|
label_invite_join: 邀请加入
|
||||||
label_invite_email_tips: 输入好友邮箱地址,Trustie会自动为该邮箱注册用户!
|
label_invite_email_tips: 输入好友的邮箱地址,Trustie会自动为该好友注册邮箱用户!
|
||||||
notice_registed_success: 您输入的邮箱为空或者该邮箱已被注册!
|
notice_registed_error: 您输入的邮箱地址为空或者该邮箱已被注册!
|
||||||
label_email_format_error: 您所填写的电子邮件格式不正确
|
label_input_email_blank: 您输入的邮箱地址为空!
|
||||||
label_user_role_null: 用户和角色不能留空!
|
label_email_format_error: 您输入的邮箱格式不正确!
|
||||||
label_send_email: 免费发送
|
label_send_email: 免费发送
|
||||||
label_input_email: 请输入邮箱地址
|
label_input_email: 请输入邮箱地址
|
||||||
|
|
||||||
label_invite_trustie_user: "邀请Trustie注册用户"
|
label_invite_trustie_user: "邀请Trustie注册用户"
|
||||||
label_invite_trustie_user_tips: "请输入用户名称来搜索好友"
|
label_invite_trustie_user_tips: "请输入用户名称来搜索好友"
|
||||||
|
label_user_role_null: 用户和角色不能留空!
|
||||||
label_invite_project: 邀请您加入项目
|
label_invite_project: 邀请您加入项目
|
||||||
label_invite_success: 邀请成功
|
label_invite_success: 邀请成功
|
||||||
label_invite_members: 邀请用户
|
label_invite_members: 邀请用户
|
||||||
|
|
|
@ -25,7 +25,8 @@ en:
|
||||||
# 左边栏
|
# 左边栏
|
||||||
#
|
#
|
||||||
label_user_edit: Edit information
|
label_user_edit: Edit information
|
||||||
|
label_user_grade: Individual score
|
||||||
|
|
||||||
label_user_score: Individual synthetic score
|
label_user_score: Individual synthetic score
|
||||||
label_user_score_of_influence: Influence score
|
label_user_score_of_influence: Influence score
|
||||||
label_user_score_of_collaboration: Collaborative score
|
label_user_score_of_collaboration: Collaborative score
|
||||||
|
|
|
@ -34,7 +34,8 @@ zh:
|
||||||
# 左边栏
|
# 左边栏
|
||||||
#
|
#
|
||||||
label_user_edit: "修改资料"
|
label_user_edit: "修改资料"
|
||||||
|
label_user_grade: 个人得分
|
||||||
|
|
||||||
label_user_score: 个人综合得分
|
label_user_score: 个人综合得分
|
||||||
# 用户身份在/my的修改资料下
|
# 用户身份在/my的修改资料下
|
||||||
label_user_score_of_collaboration: 协同得分
|
label_user_score_of_collaboration: 协同得分
|
||||||
|
|
|
@ -14,7 +14,6 @@ zh:
|
||||||
notice_successful_create: 创建成功
|
notice_successful_create: 创建成功
|
||||||
notice_successful_update: 更新成功
|
notice_successful_update: 更新成功
|
||||||
notice_successful_delete: 删除成功
|
notice_successful_delete: 删除成功
|
||||||
notice_registed_success: 您输入的邮箱为空或者该邮箱已被注册!
|
|
||||||
notice_failed_delete: 删除失败
|
notice_failed_delete: 删除失败
|
||||||
notice_successful_connection: 连接成功
|
notice_successful_connection: 连接成功
|
||||||
notice_successful_join: 加入成功
|
notice_successful_join: 加入成功
|
||||||
|
@ -91,14 +90,7 @@ zh:
|
||||||
field_course_un: 暂未填写
|
field_course_un: 暂未填写
|
||||||
#end
|
#end
|
||||||
field_summary: 摘要
|
field_summary: 摘要
|
||||||
field_is_required: 必填
|
|
||||||
field_firstname: 名字
|
|
||||||
firstname_empty: 名字不能为空
|
|
||||||
field_firstname_eg: '(例:张三丰,请填写[三丰])'
|
|
||||||
field_lastname: 姓氏
|
|
||||||
lastname_empty: 姓氏不能为空
|
|
||||||
enterprise_empty: 企业名不能为空
|
|
||||||
field_lastname_eg: '(例:张三丰,请填写[张])'
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1005,11 +997,7 @@ zh:
|
||||||
default_issue_status_rejected: 已拒绝
|
default_issue_status_rejected: 已拒绝
|
||||||
default_doc_category_user: 用户文档
|
default_doc_category_user: 用户文档
|
||||||
default_doc_category_tech: 技术文档
|
default_doc_category_tech: 技术文档
|
||||||
default_priority_low: 低
|
|
||||||
default_priority_normal: 普通
|
|
||||||
default_priority_high: 高
|
|
||||||
default_priority_urgent: 紧急
|
|
||||||
default_priority_immediate: 立刻
|
|
||||||
default_activity_design: 设计
|
default_activity_design: 设计
|
||||||
default_activity_development: 开发
|
default_activity_development: 开发
|
||||||
|
|
||||||
|
@ -1708,8 +1696,6 @@ zh:
|
||||||
label_school_not_fount: 没有符合的高校信息
|
label_school_not_fount: 没有符合的高校信息
|
||||||
|
|
||||||
|
|
||||||
label_project_grade: 项目得分
|
|
||||||
label_user_grade: 个人得分
|
|
||||||
label_system_grade: 系统评分
|
label_system_grade: 系统评分
|
||||||
|
|
||||||
label_ta: 助教
|
label_ta: 助教
|
||||||
|
@ -1999,7 +1985,7 @@ zh:
|
||||||
label_poll_proportion: 比例
|
label_poll_proportion: 比例
|
||||||
label_poll_valid_commit: 本题有效填写人次
|
label_poll_valid_commit: 本题有效填写人次
|
||||||
label_poll_result: 问卷调查_问卷统计
|
label_poll_result: 问卷调查_问卷统计
|
||||||
label_answer: 答案:
|
label_answer: "答案:"
|
||||||
label_poll_answer_valid_result: 以上为有效问答题答案!
|
label_poll_answer_valid_result: 以上为有效问答题答案!
|
||||||
label_poll_republish_success: 取消成功
|
label_poll_republish_success: 取消成功
|
||||||
label_answer_total: 总计:
|
label_answer_total: 总计:
|
||||||
|
@ -2031,7 +2017,6 @@ zh:
|
||||||
|
|
||||||
label_end_time: 截止时间
|
label_end_time: 截止时间
|
||||||
label_send_email: 确定发送
|
label_send_email: 确定发送
|
||||||
label_input_email: 请输入邮箱地址
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ module Redmine
|
||||||
@defaults = {
|
@defaults = {
|
||||||
'email_delivery' => nil,
|
'email_delivery' => nil,
|
||||||
'max_concurrent_ajax_uploads' => 2,
|
'max_concurrent_ajax_uploads' => 2,
|
||||||
'pic_types' => "bmp,jpeg,jpg,png,gif"
|
'pic_types' => "bmp,jpeg,jpg,png,gif,BMP,JPEG,JPG,PNG,GIF"
|
||||||
}
|
}
|
||||||
|
|
||||||
@config = nil
|
@config = nil
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1012 B |
|
@ -629,10 +629,15 @@ function img_thumbnails() {
|
||||||
$('.thumbnails a').colorbox({rel:'nofollow'});
|
$('.thumbnails a').colorbox({rel:'nofollow'});
|
||||||
$('.attachments').find('a').each(function(index, element) {
|
$('.attachments').find('a').each(function(index, element) {
|
||||||
var href_value = $(element).attr('href');
|
var href_value = $(element).attr('href');
|
||||||
if (/\.(jpg|png|gif|bmp)$/.test(href_value)) {
|
if (/\.(jpg|png|gif|bmp|jpeg|PNG|BMP|GIF|JPG|JPEG)$/.test(href_value)) {
|
||||||
$(element).colorbox({rel:'nofollow'});
|
$(element).colorbox({rel:'nofollow'});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
$('.for_img_thumbnails').find('a').each(function(index, element) {
|
||||||
|
var href_value = $(element).attr('href');
|
||||||
|
if (/\.(jpg|png|gif|bmp|jpeg|PNG|BMP|GIF|JPG|JPEG)$/.test(href_value)) {
|
||||||
|
$(element).colorbox({rel:'nofollow'});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$(document).ready(img_thumbnails);
|
$(document).ready(img_thumbnails);
|
||||||
|
|
|
@ -22,10 +22,10 @@ function addFile(inputEl, file, eagerUpload) {
|
||||||
|
|
||||||
fileSpan.append(
|
fileSpan.append(
|
||||||
$('<input>', { 'type': 'text', 'class': 'filename readonly', 'name': 'attachments[' + attachmentId + '][filename]', 'readonly': 'readonly'} ).val(file.name),
|
$('<input>', { 'type': 'text', 'class': 'filename readonly', 'name': 'attachments[' + attachmentId + '][filename]', 'readonly': 'readonly'} ).val(file.name),
|
||||||
$('<input>', { 'type': 'text', 'class': 'description', 'name': 'attachments[' + attachmentId + '][description]', 'maxlength': 254, 'placeholder': $(inputEl).data('description-placeholder') } ).toggle(!eagerUpload),
|
$('<input>', { 'type': 'text', 'class': 'description', 'name': 'attachments[' + attachmentId + '][description]', 'maxlength': 254, 'placeholder': $(inputEl).data('descriptionPlaceholder') } ).toggle(!eagerUpload),
|
||||||
$('<span >公开:</span>').attr({ 'class': 'ispublic-label' }) ,
|
$('<span >'+$(inputEl).data('fieldIsPublic')+':</span>').attr({ 'class': 'ispublic-label' }) ,
|
||||||
$('<input>', { 'type': 'checkbox', 'class': 'is_public_checkbox','value':1, 'name': 'attachments[' + attachmentId + '][is_public_checkbox]', checked:'checked' } ).toggle(!eagerUpload),
|
$('<input>', { 'type': 'checkbox', 'class': 'is_public_checkbox','value':1, 'name': 'attachments[' + attachmentId + '][is_public_checkbox]', checked:'checked' } ).toggle(!eagerUpload),
|
||||||
$('<a> </a>').attr({ 'href': "#", 'class': 'remove-upload', 'data-confirm' : "您确定要删除吗?" }).click(removeFile).toggle(!eagerUpload),
|
$('<a> </a>').attr({ 'href': "#", 'class': 'remove-upload', 'data-confirm' : $(inputEl).data('areYouSure') }).click(removeFile).toggle(!eagerUpload),
|
||||||
$('<div>', { 'class': 'div_attachments', 'name': 'div_'+'attachments_' + attachmentId} )
|
$('<div>', { 'class': 'div_attachments', 'name': 'div_'+'attachments_' + attachmentId} )
|
||||||
).appendTo('#attachments_fields');
|
).appendTo('#attachments_fields');
|
||||||
|
|
||||||
|
@ -86,8 +86,7 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) {
|
||||||
//gcm files count and add delete_all link
|
//gcm files count and add delete_all link
|
||||||
|
|
||||||
var count=$('#attachments_fields>span').length;
|
var count=$('#attachments_fields>span').length;
|
||||||
$('#upload_file_count').html("已上传"+"<span id=\"count\">"+count+"</span>"+"个文件");
|
$('#upload_file_count').html("<span id=\"count\">"+count+"</span>"+"个文件已上传");
|
||||||
|
|
||||||
if(count>=1){
|
if(count>=1){
|
||||||
var add_attachs=$('.add_attachment');
|
var add_attachs=$('.add_attachment');
|
||||||
var delete_all=$('.remove_all');
|
var delete_all=$('.remove_all');
|
||||||
|
@ -121,7 +120,7 @@ function removeFile() {
|
||||||
|
|
||||||
//gcm delete all file
|
//gcm delete all file
|
||||||
function removeAll(){
|
function removeAll(){
|
||||||
if(confirm("您确定要删除所有文件吗?")){
|
if(confirm("您确定要删除所有文件吗")){
|
||||||
$(".remove-upload").removeAttr("data-confirm");
|
$(".remove-upload").removeAttr("data-confirm");
|
||||||
$(".remove-upload").click();
|
$(".remove-upload").click();
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,153 @@
|
||||||
|
/**
|
||||||
|
* 2015-01-11
|
||||||
|
* edit by meng
|
||||||
|
*/
|
||||||
|
(function($){
|
||||||
|
$.fn.mailAutoComplete = function(options){
|
||||||
|
var defaults = {
|
||||||
|
boxClass: "mailListBox", //外部box样式
|
||||||
|
listClass: "mailListDefault", //默认的列表样式
|
||||||
|
focusClass: "mailListFocus", //列表选中样式
|
||||||
|
markCalss: "mailListHlignt", //高亮样式
|
||||||
|
zIndex: 1,
|
||||||
|
autoClass: true,//是否使用插件自带class样式
|
||||||
|
mailArr: ["qq.com","gmail.com","126.com","163.com","hotmail.com","live.com","sohu.com","sina.com","sina.cn","139.cn","189.cn"], //邮件数组
|
||||||
|
textHint: false, //文字提示的自动显示与隐藏
|
||||||
|
hintText: "",
|
||||||
|
focusColor: "#333"
|
||||||
|
//blurColor: "#999
|
||||||
|
};
|
||||||
|
var settings = $.extend({}, defaults, options || {});
|
||||||
|
//页面装载CSS样式
|
||||||
|
if(settings.autoClass && $("#mailListAppendCss").size() === 0){
|
||||||
|
$('<style id="mailListAppendCss" type="text/css">.mailListBox{border:1px solid #369; background:#fff; font:12px/20px Arial;}.mailListDefault{padding:0 5px;cursor:pointer;white-space:nowrap;}.mailListFocus{padding:0 5px;cursor:pointer;white-space:nowrap;background:#369;color:white;}.mailListHlignt{color:red;}.mailListFocus .mailListHlignt{color:#fff;}</style>').appendTo($("head"));
|
||||||
|
}
|
||||||
|
var cb = settings.boxClass, cl = settings.listClass, cf = settings.focusClass, cm = settings.markCalss; //插件的class变量
|
||||||
|
var z = settings.zIndex, newArr = mailArr = settings.mailArr, hint = settings.textHint, text = settings.hintText, fc = settings.focusColor, bc = settings.blurColor;
|
||||||
|
//创建邮件内部列表内容
|
||||||
|
$.createHtml = function(str, arr, cur){
|
||||||
|
var mailHtml = "";
|
||||||
|
if($.isArray(arr)){
|
||||||
|
$.each(arr, function(i, n){
|
||||||
|
if(i === cur){
|
||||||
|
mailHtml += '<div class="mailHover '+cf+'" id="mailList_'+i+'"><span class="'+cm+'">'+str+'</span>@'+arr[i]+'</div>';
|
||||||
|
}else{
|
||||||
|
mailHtml += '<div class="mailHover '+cl+'" id="mailList_'+i+'"><span class="'+cm+'">'+str+'</span>@'+arr[i]+'</div>';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return mailHtml;
|
||||||
|
};
|
||||||
|
//一些全局变量
|
||||||
|
var index = -1, s;
|
||||||
|
$(this).each(function(){
|
||||||
|
var that = $(this), i = $(".justForJs").size();
|
||||||
|
if(i > 0){ //只绑定一个文本框
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var w = that.outerWidth(), h = that.outerHeight(); //获取当前对象(即文本框)的宽高
|
||||||
|
//样式的初始化
|
||||||
|
that.wrap('<span style="display:inline-block;position:relative;"></span>')
|
||||||
|
.before('<div id="mailListBox_'+i+'" class="justForJs '+cb+'" style="min-width:'+w+'px;_width:'+w+'px;position:absolute;left:-6000px;top:'+h+'px;z-index:'+z+';"></div>');
|
||||||
|
var x = $("#mailListBox_" + i), liveValue; //列表框对象
|
||||||
|
that.focus(function(){
|
||||||
|
//父标签的层级
|
||||||
|
$(this).css("color", fc).parent().css("z-index", z);
|
||||||
|
//提示文字的显示与隐藏
|
||||||
|
if(hint && text){
|
||||||
|
var focus_v = $.trim($(this).val());
|
||||||
|
if(focus_v === text){
|
||||||
|
$(this).val("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//键盘事件
|
||||||
|
$(this).keyup(function(e){
|
||||||
|
s = v = $.trim($(this).val());
|
||||||
|
if(/@/.test(v)){
|
||||||
|
s = v.replace(/@.*/, "");
|
||||||
|
}
|
||||||
|
if(v.length > 0){
|
||||||
|
//如果按键是上下键
|
||||||
|
if(e.keyCode === 38){
|
||||||
|
//向上
|
||||||
|
if(index <= 0){
|
||||||
|
index = newArr.length;
|
||||||
|
}
|
||||||
|
index--;
|
||||||
|
}else if(e.keyCode === 40){
|
||||||
|
//向下
|
||||||
|
if(index >= newArr.length - 1){
|
||||||
|
index = -1;
|
||||||
|
}
|
||||||
|
index++;
|
||||||
|
}else if(e.keyCode === 13){
|
||||||
|
//回车
|
||||||
|
if(index > -1 && index < newArr.length){
|
||||||
|
//如果当前有激活列表
|
||||||
|
$(this).val($("#mailList_"+index).text());
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(/@/.test(v)){
|
||||||
|
index = -1;
|
||||||
|
//获得@后面的值
|
||||||
|
//s = v.replace(/@.*/, "");
|
||||||
|
//创建新匹配数组
|
||||||
|
var site = v.replace(/.*@/, "");
|
||||||
|
newArr = $.map(mailArr, function(n){
|
||||||
|
var reg = new RegExp(site);
|
||||||
|
if(reg.test(n)){
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
newArr = mailArr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
x.html($.createHtml(s, newArr, index)).css("left", 0);
|
||||||
|
if(e.keyCode === 13){
|
||||||
|
//回车
|
||||||
|
if(index > -1 && index < newArr.length){
|
||||||
|
//如果当前有激活列表
|
||||||
|
x.css("left", "-6000px");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
x.css("left", "-6000px");
|
||||||
|
}
|
||||||
|
}).blur(function(){
|
||||||
|
if(hint && text){
|
||||||
|
var blur_v = $.trim($(this).val());
|
||||||
|
if(blur_v === ""){
|
||||||
|
$(this).val(text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$(this).css("color", bc).unbind("keyup").parent().css("z-index",0);
|
||||||
|
x.css("left", "-6000px");
|
||||||
|
|
||||||
|
}).keydown(function(event){
|
||||||
|
if(event.keyCode == 13){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//鼠标经过列表项事件
|
||||||
|
//鼠标经过
|
||||||
|
$(".mailHover").live("mouseover", function(){
|
||||||
|
index = Number($(this).attr("id").split("_")[1]);
|
||||||
|
liveValue = $("#mailList_"+index).text();
|
||||||
|
x.children("." + cf).removeClass(cf).addClass(cl);
|
||||||
|
$(this).addClass(cf).removeClass(cl);
|
||||||
|
});
|
||||||
|
$(".mailHover").live("click", function(){
|
||||||
|
$("#mail").val($(this).html());
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
x.bind("mousedown", function(){
|
||||||
|
that.val(liveValue);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
})(jQuery);
|
|
@ -31,7 +31,7 @@ a{ text-decoration:none; }
|
||||||
.fl{ float: left;}
|
.fl{ float: left;}
|
||||||
.fr{ float:right;}
|
.fr{ float:right;}
|
||||||
.project_h4{ font-size:14px; color:#3b3b3b;}
|
.project_h4{ font-size:14px; color:#3b3b3b;}
|
||||||
|
.project_watch_new{color: #fff !important;font-size:12px; display:block !important; padding: 0px 4px !important; margin-right: 10px !important; height: 20px !important; line-height: 21px !important;padding-top:1px !important; background: none repeat scroll 0% 0% #64BDD9 !important;}
|
||||||
|
|
||||||
.project_content{ width:940px; margin:10px auto;}
|
.project_content{ width:940px; margin:10px auto;}
|
||||||
.project_left{ float:left;}
|
.project_left{ float:left;}
|
||||||
|
@ -51,7 +51,6 @@ a{ text-decoration:none; }
|
||||||
a.info_foot_num{ font-weight: bold; color:#3ca5c6; }
|
a.info_foot_num{ font-weight: bold; color:#3ca5c6; }
|
||||||
.pr_info_foot{ color:#7f7f7f; margin-top:5px; font-size:12px }
|
.pr_info_foot{ color:#7f7f7f; margin-top:5px; font-size:12px }
|
||||||
a:hover.info_foot_num{ color:#2390b2;}
|
a:hover.info_foot_num{ color:#2390b2;}
|
||||||
|
|
||||||
/*左侧导航*/
|
/*左侧导航*/
|
||||||
.subNavBox{width:222px; background:#fff;margin:10px 10px 0 0;}
|
.subNavBox{width:222px; background:#fff;margin:10px 10px 0 0;}
|
||||||
.subNav{border-bottom:solid 1px #e5e3da;cursor:pointer;font-weight:bold;font-size:14px;color:#3ca5c6;line-height:28px;padding-left:10px;background-color:#fff;}
|
.subNav{border-bottom:solid 1px #e5e3da;cursor:pointer;font-weight:bold;font-size:14px;color:#3ca5c6;line-height:28px;padding-left:10px;background-color:#fff;}
|
||||||
|
@ -75,7 +74,7 @@ a:hover.subnav_green{ background:#14ad5a;}
|
||||||
.lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;}
|
.lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;}
|
||||||
.lg-foot:hover{ color:#787b7e;}
|
.lg-foot:hover{ color:#787b7e;}
|
||||||
/****标签(和资源库的tag样式一致)***/
|
/****标签(和资源库的tag样式一致)***/
|
||||||
.project_Label{ width:220px; padding-left:10px; padding-right:10px; background:#fff; margin-top:10px;}
|
.project_Label{ width:220px; padding-left:10px !important; padding-right:10px; background:#fff; margin-top:10px;}
|
||||||
a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;}
|
a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;}
|
||||||
.submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; }
|
.submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; }
|
||||||
.isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;}
|
.isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;}
|
||||||
|
@ -132,7 +131,7 @@ a:hover.more{ color:#64bdd9;}
|
||||||
.problem_search_btn:hover{ background:#3da1c1; border:1px solid #3da1c1;}
|
.problem_search_btn:hover{ background:#3da1c1; border:1px solid #3da1c1;}
|
||||||
.problem_new_btn{ margin-left:10px; border:1px solid #ff7143; color:#ff7143 !important; width:60px; height:19px; font-size:12px; text-align:center; padding-top:4px;margin-top:-2px;}
|
.problem_new_btn{ margin-left:10px; border:1px solid #ff7143; color:#ff7143 !important; width:60px; height:19px; font-size:12px; text-align:center; padding-top:4px;margin-top:-2px;}
|
||||||
.problem_new_btn:hover{ background:#ff7143; color:#fff !important;}
|
.problem_new_btn:hover{ background:#ff7143; color:#fff !important;}
|
||||||
.problem_p{ color:#535252; margin-top:5px;}
|
.problem_p{ color:#535252; margin-top:5px;padding-right:15px;}
|
||||||
.problem_p span{ color:#ff3e00;}
|
.problem_p span{ color:#ff3e00;}
|
||||||
.problem_pic{ display:block; width:42px; height:42px; padding:3px; border:1px solid #e3e3e3; margin-top:5px;}
|
.problem_pic{ display:block; width:42px; height:42px; padding:3px; border:1px solid #e3e3e3; margin-top:5px;}
|
||||||
.problem_pic:hover{border:1px solid #64bdd9;}
|
.problem_pic:hover{border:1px solid #64bdd9;}
|
||||||
|
|
Loading…
Reference in New Issue