diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index a44a3bc01..b385fe610 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -2152,6 +2152,7 @@ class UsersController < ApplicationController
#这里仅仅是传递需要发送的资源id
@send_id = params[:send_id]
@send_ids = params[:checkbox1] || params[:send_ids]
+ @hidden_unproject = hidden_unproject_infos
respond_to do |format|
format.js
end
@@ -2171,6 +2172,7 @@ class UsersController < ApplicationController
#这里仅仅是传递需要发送的资源id
@send_id = params[:send_id]
@send_ids = params[:checkbox1] || params[:send_ids] #搜索的时候 和 直接 用表格提交的时候的send_ids
+ @hidden_unproject = hidden_unproject_infos
respond_to do |format|
format.js
end
@@ -3334,6 +3336,7 @@ class UsersController < ApplicationController
#这里仅仅是传递需要发送的资源id
@send_id = params[:send_id]
@send_ids = params[:checkbox1] || params[:send_ids]
+ @hidden_unproject = hidden_unproject_infos
respond_to do |format|
format.js
end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 3cec4cbc7..d0ec28317 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -837,11 +837,7 @@ module ApplicationHelper
return false if project.gpid.nil?
g = Gitlab.client
count = g.user_static(project.gpid, :rev => "master").count
- if User.current.member_of?(project) && count > 0
- true
- else
- false
- end
+ count
end
# 判断版本库是否初始为gitlab
diff --git a/app/models/user.rb b/app/models/user.rb
index b863c1f70..f2b2b6824 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -1162,18 +1162,20 @@ class User < Principal
#为新注册用户发送留言
def add_new_jour
- if Message.where("id=19504").any? and Message.where("id=19291").any? and Message.where("id=19292").any?
- lead_message1 = Message.find(19292)
- notes1 = lead_message1.content
- lead_message2 = Message.find(19291)
- notes2 = lead_message2.content
- lead_message3 = Message.find(19504)
- notes3 = lead_message3.content
- #user_id 默认为课程使者创建
- self.journals_for_messages << JournalsForMessage.new(:user_id => 1, :notes => notes1, :reply_id => 0, :status => true, :is_readed => false, :private => 0)
- self.journals_for_messages << JournalsForMessage.new(:user_id => 1, :notes => notes2, :reply_id => 0, :status => true, :is_readed => false, :private => 0)
- self.journals_for_messages << JournalsForMessage.new(:user_id => 1, :notes => notes3, :reply_id => 0, :status => true, :is_readed => false, :private => 0)
- end
+ if Setting.find_by_name("hidden_non_project") && Setting.find_by_name("hidden_non_project").value != "0"
+ if Message.where("id=19504").any? and Message.where("id=19291").any? and Message.where("id=19292").any?
+ lead_message1 = Message.find(19292)
+ notes1 = lead_message1.content
+ lead_message2 = Message.find(19291)
+ notes2 = lead_message2.content
+ lead_message3 = Message.find(19504)
+ notes3 = lead_message3.content
+ #user_id 默认为课程使者创建
+ self.journals_for_messages << JournalsForMessage.new(:user_id => 1, :notes => notes1, :reply_id => 0, :status => true, :is_readed => false, :private => 0)
+ self.journals_for_messages << JournalsForMessage.new(:user_id => 1, :notes => notes2, :reply_id => 0, :status => true, :is_readed => false, :private => 0)
+ self.journals_for_messages << JournalsForMessage.new(:user_id => 1, :notes => notes3, :reply_id => 0, :status => true, :is_readed => false, :private => 0)
+ end
+ end
end
# 更新邮箱的同事,更新invite_lists表中的邮箱信息
diff --git a/app/views/files/_org_subfield_list.html.erb b/app/views/files/_org_subfield_list.html.erb
index e567435a5..de37ed054 100644
--- a/app/views/files/_org_subfield_list.html.erb
+++ b/app/views/files/_org_subfield_list.html.erb
@@ -63,7 +63,11 @@
<% if (delete_allowed || User.current.id == file.author_id) && file.container_id == org_subfield.id && file.container_type == "OrgSubfield" %>
- - <%= link_to("发 送".html_safe, 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{file.id}','#{User.current.id}','file')") %>
+ <% if hidden_unproject_infos %>
+ - <%= link_to("发 送".html_safe, 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{file.id}','#{User.current.id}','file')") %>
+ <% else %>
+ - <%= link_to("发 送".html_safe, 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send_hidden('#{file.id}','#{User.current.id}','file')") %>
+ <% end %>
- <%= link_to '更新版本',attachments_versions_path(file),:class => "postOptionLink",:remote=>true %>
<% if file.container.try(:organization).try(:is_public?) %>
-
diff --git a/app/views/files/_tool_settings.html.erb b/app/views/files/_tool_settings.html.erb
index a0ce42eac..5d96d8da2 100644
--- a/app/views/files/_tool_settings.html.erb
+++ b/app/views/files/_tool_settings.html.erb
@@ -4,7 +4,11 @@
<% if User.current.admin? || ((is_project_manager?(User.current, project) || file.author_id == User.current.id) && project_contains_attachment?(project, file)) %>
<% if User.current.admin? || ((delete_allowed || User.current.id == file.author_id) && file.container_id == project.id && file.container_type == "Project") %>
- - <%= link_to("发 送".html_safe, 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{file.id}','#{User.current.id}','file')") %>
+ <% if hidden_unproject_infos %>
+ - <%= link_to("发 送".html_safe, 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{file.id}','#{User.current.id}','file')") %>
+ <% else %>
+ - <%= link_to("发 送".html_safe, 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send_hidden('#{file.id}','#{User.current.id}','file')") %>
+ <% end %>
- <%= link_to '更新版本',attachments_versions_path(file),:class => "postOptionLink",:remote=>true %>
<% if project.is_public? %>
-
@@ -20,7 +24,11 @@
<% end %>
<% else %>
- - <%= link_to("发 送".html_safe, 'javascript:void(0)',:class => "postOptionLink2",:onclick=>"show_send('#{file.id}','#{User.current.id}','file')") %>
+ <% if hidden_unproject_infos %>
+ - <%= link_to("发 送".html_safe, 'javascript:void(0)',:class => "postOptionLink2",:onclick=>"show_send('#{file.id}','#{User.current.id}','file')") %>
+ <% else %>
+ - <%= link_to("发 送".html_safe, 'javascript:void(0)',:class => "postOptionLink2",:onclick=>"show_send_hidden('#{file.id}','#{User.current.id}','file')") %>
+ <% end %>
<% end %>
<% end %>
diff --git a/app/views/layouts/_footer_show.html.erb b/app/views/layouts/_footer_show.html.erb
index 19028ed8a..99e71762d 100644
--- a/app/views/layouts/_footer_show.html.erb
+++ b/app/views/layouts/_footer_show.html.erb
@@ -4,7 +4,9 @@
- <%= l(:label_about_us)%>|
- 服务协议|
- <%= l(:label_recruitment_information)%>|
- - <%= link_to l(:label_surpport_group), "javascript:void(0);", :class => "f_grey mw20", :target=>"_blank" %>|
+ <% if hidden_unproject_infos %>
+ - <%= link_to l(:label_surpport_group), "javascript:void(0);", :class => "f_grey mw20", :target=>"_blank" %>|
+ <% end %>
- <%= l(:label_forums)%>
diff --git a/app/views/layouts/_logined_header_show.html.erb b/app/views/layouts/_logined_header_show.html.erb
index a6721501e..c593c3e8c 100644
--- a/app/views/layouts/_logined_header_show.html.erb
+++ b/app/views/layouts/_logined_header_show.html.erb
@@ -10,12 +10,14 @@
-
-
+ <% if hidden_unproject_infos %>
+
+
+ <% end %>
diff --git a/app/views/layouts/new_base_user_show.html.erb b/app/views/layouts/new_base_user_show.html.erb
index b49df8829..8bce41fad 100644
--- a/app/views/layouts/new_base_user_show.html.erb
+++ b/app/views/layouts/new_base_user_show.html.erb
@@ -152,9 +152,7 @@
- <% hidden_courses = Setting.find_by_name("hidden_courses") %>
- <% unvisiable = hidden_courses && hidden_courses.value == "1"%>
- <% if !unvisiable %>
+ <% if hidden_unproject_infos %>
-
课程
@@ -233,7 +231,9 @@
<%= yield %>
- <%= render :partial => 'layouts/forbidden_new_feedback' %>
+ <% if hidden_unproject_infos %>
+ <%= render :partial => 'layouts/forbidden_new_feedback' %>
+ <% end %>
<%= render :partial => 'layouts/footer_show' %>
diff --git a/app/views/messages/_project_show.html.erb b/app/views/messages/_project_show.html.erb
index ff358f7c3..41c2f7d1f 100644
--- a/app/views/messages/_project_show.html.erb
+++ b/app/views/messages/_project_show.html.erb
@@ -116,7 +116,11 @@
) if @message.destroyable_by?(User.current) %>
<% end %>
- <%= link_to "发送", "javascript:void(0);", :onclick => "show_send(#{@message.id},#{User.current.id},'message');", :class => 'postOptionLink' %>
+ <% if hidden_unproject_infos %>
+ <%= link_to "发送", "javascript:void(0);", :onclick => "show_send(#{@message.id},#{User.current.id},'message');", :class => 'postOptionLink' %>
+ <% else %>
+ <%= link_to "发送", "javascript:void(0);", :onclick => "show_send_hidden(#{@message.id},#{User.current.id},'message');", :class => 'postOptionLink' %>
+ <% end %>
diff --git a/app/views/organizations/_org_left_subfield_list.html.erb b/app/views/organizations/_org_left_subfield_list.html.erb
index 9d043fbb5..a414a1181 100644
--- a/app/views/organizations/_org_left_subfield_list.html.erb
+++ b/app/views/organizations/_org_left_subfield_list.html.erb
@@ -61,19 +61,21 @@
<%= link_to "动态",organization_path(organization), :class => "homepageMenuText" %>
<% when 'course' %>
-
-
-
-
+ <% if hidden_unproject_infos %>
+
+
+
+
+ <% end %>
<% when 'project' %>
<% end %>
-
- <%= link_to "Pull Requests", project_pull_requests_path(@project), :class => "f14 c_blue02" %>
- <% if allow_pull_request(@project) %>
- <%= link_to "+新建请求", new_project_pull_request_path(:project_id => @project.id), :class => "subnav_green" %>
- <% end %>
-
+<% if allow_pull_request(@project) %>
+
+ <%= link_to "Pull Requests", project_pull_requests_path(@project), :class => "f14 c_blue02" %>
+ <% if User.current.member_of?(@project) %>
+ <%= link_to "+新建请求", new_project_pull_request_path(:project_id => @project.id), :class => "subnav_green" %>
+ <% end %>
+
+<% end %>
<%# --版本库被设置成私有、module中设置不显示、没有创建版本库 三种情况不显示-- %>
<% if visible_repository?(@project) %>
diff --git a/app/views/projects/_project_news.html.erb b/app/views/projects/_project_news.html.erb
index 161221526..6b3e8e43c 100644
--- a/app/views/projects/_project_news.html.erb
+++ b/app/views/projects/_project_news.html.erb
@@ -38,7 +38,12 @@
<% if User.current.logged? %>
- - <%= link_to("发送", 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{activity.id}',#{User.current.id},'news')") %>
+ <% if hidden_unproject_infos %>
+ - <%= link_to("发送", 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{activity.id}',#{User.current.id},'news')") %>
+ <% else %>
+ - <%= link_to("发送", 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send_hidden('#{activity.id}',#{User.current.id},'news')") %>
+ <% end %>
+
-
<%= link_to(l(:button_edit), {:controller => 'news', :action => 'edit', :id => activity}, :class => 'postOptionLink') if activity.author == User.current %>
diff --git a/app/views/pull_requests/index.html.erb b/app/views/pull_requests/index.html.erb
index f4fe0725e..2af67293f 100644
--- a/app/views/pull_requests/index.html.erb
+++ b/app/views/pull_requests/index.html.erb
@@ -3,7 +3,7 @@
- <%= link_to "待处理#{@requests_opened_count}".html_safe, project_pull_requests_path(:type => "1"), :remote => true %>
- <%= link_to "已处理#{@requests_merged_count}".html_safe, project_pull_requests_path(:type => "2"), :remote => true %>
- <%= link_to "已关闭#{@requests_closed_count}".html_safe, project_pull_requests_path(:type => "3"), :remote => true %>
- <% if allow_pull_request(@project) %>
+ <% if allow_pull_request(@project) && User.current.member_of?(@project) %>
<%= link_to "创建Pull Request", new_project_pull_request_path, :class => "BlueCirBtn fr ml10 mt10", :style => "width:110px;" %>
<% end %>
diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb
index afc45efde..5ee3ff0ba 100644
--- a/app/views/users/_project_message.html.erb
+++ b/app/views/users/_project_message.html.erb
@@ -68,7 +68,11 @@
) if activity.destroyable_by?(User.current) %>
<% end %>
-
<%= link_to "发送", "javascript:void(0);", :onclick => "show_send(#{activity.id}, #{User.current.id}, 'message');", :class => "postOptionLink" %>
+ <% if hidden_unproject_infos %>
+
<%= link_to "发送", "javascript:void(0);", :onclick => "show_send(#{activity.id}, #{User.current.id}, 'message');", :class => "postOptionLink" %>
+ <% else %>
+
<%= link_to "发送", "javascript:void(0);", :onclick => "show_send_hidden(#{activity.id}, #{User.current.id}, 'message');", :class => "postOptionLink" %>
+ <% end %>
diff --git a/app/views/users/_project_news.html.erb b/app/views/users/_project_news.html.erb
index 4c7ec2b04..284f5b821 100644
--- a/app/views/users/_project_news.html.erb
+++ b/app/views/users/_project_news.html.erb
@@ -35,7 +35,12 @@
<% if User.current.logged? %>
- - <%= link_to("发送", 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{activity.id}',#{User.current.id},'news')") %>
+ <% if hidden_unproject_infos %>
+ - <%= link_to("发送", 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{activity.id}',#{User.current.id},'news')") %>
+ <% else %>
+ - <%= link_to("发送", 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send_hidden('#{activity.id}',#{User.current.id},'news')") %>
+ <% end %>
+
-
<%= link_to(
l(:button_edit),
diff --git a/app/views/users/_resource_share_for_orgs.html.erb b/app/views/users/_resource_share_for_orgs.html.erb
index 36d1c774f..b5aafcb7e 100644
--- a/app/views/users/_resource_share_for_orgs.html.erb
+++ b/app/views/users/_resource_share_for_orgs.html.erb
@@ -4,11 +4,18 @@
<% unless send_ids.blank? %>
<% send_ids = send_ids.class == String ? send_ids : send_ids.join(",") %>
<% end %>
-
+ <% if @hidden_unproject %>
+
+ <% else %>
+
+ <% end %>
<%= form_tag search_user_org_user_path(user, :type => @type),:method => 'get',
:remote=>true,:id=>'search_user_org_form' do %>
diff --git a/app/views/users/_resource_share_for_project_popup.html.erb b/app/views/users/_resource_share_for_project_popup.html.erb
index b521bcb90..41133a91e 100644
--- a/app/views/users/_resource_share_for_project_popup.html.erb
+++ b/app/views/users/_resource_share_for_project_popup.html.erb
@@ -5,11 +5,18 @@
<% unless send_ids.blank? %>
<% send_ids = send_ids.class == String ? send_ids : send_ids.join(",") %>
<% end %>
-
+ <% if @hidden_unproject %>
+
+ <% else %>
+
+ <% end %>
diff --git a/app/views/users/_resources_list.html.erb b/app/views/users/_resources_list.html.erb
index 3f5138107..77a2386fe 100644
--- a/app/views/users/_resources_list.html.erb
+++ b/app/views/users/_resources_list.html.erb
@@ -87,6 +87,33 @@
}
+ function show_send_hidden(){
+ $("#contextMenu").hide();
+ document.oncontextmenu = function() {return true;}
+ line.children().css("background-color",'white');
+ id = line.children().last().html();
+ user_id = line.children().eq(5).html();
+ allow = line.children().eq(13).html();
+ if( allow == 0){
+ alert('您无权发送私有资源')
+ }else{
+ if (lastSendType === '2'){ //如果已经发送过一次了,那么就应该沿用上次发送的类型。
+ $.ajax({
+ type: 'get',
+ url: '<%= search_user_project_user_path(User.current.id) %>' + "?send_id=" + id + "&type=<%= @type %>",
+ data:{send_type:'file'}
+ });
+ }else{
+ $.ajax({
+ type: 'get',
+ url: '<%= search_user_project_user_path(User.current.id)%>' + "?send_id=" + id + "&type=<%= @type %>",
+ data:{send_type:'file'}
+ });
+ }
+ }
+
+ }
+
function batch_send(){
if($("#resources_list_form").serialize() == ""){
alert('暂时不支持多页选择,您当前页没有选择任何资源');
@@ -121,6 +148,35 @@
}
}
+// 隐藏非项目信息特用
+ function batch_send_hidden(){
+ if($("#resources_list_form").serialize() == ""){
+ alert('暂时不支持多页选择,您当前页没有选择任何资源');
+ return ;
+ }
+ if (lastSendType === '1'){
+ $.ajax({
+ type: 'get',
+ url: '<%= search_user_project_user_path(User.current.id) %>' + '?' + $("#resources_list_form").serialize() + "&type=<%= @type %>",
+ data:{send_type:'file'}
+ });
+ }else if (lastSendType === '2'){
+ $.ajax({
+ type: 'get',
+ url: '<%= search_user_org_user_path(User.current.id) %>' + '?' + $("#resources_list_form").serialize() + "&type=<%= @type %>",
+ data:{send_type:'file'}
+ });
+ }
+ else{
+ $.ajax({
+ type: 'get',
+ url: '<%= search_user_project_user_path(User.current.id)%>' + '?'+ $("#resources_list_form").serialize() + "&type=<%= @type %>",
+ data:{send_type:'file'}
+ });
+
+ }
+ }
+
function preview(){
$("#contextMenu").hide();
document.oncontextmenu = function() {return true;}
diff --git a/app/views/users/_selector_for_messages.html.erb b/app/views/users/_selector_for_messages.html.erb
index 14609f4fc..1e2e40e06 100644
--- a/app/views/users/_selector_for_messages.html.erb
+++ b/app/views/users/_selector_for_messages.html.erb
@@ -24,6 +24,7 @@
+ <% if hidden_unproject_infos %>
@@ -35,7 +36,18 @@
- <%= link_to "用户留言",user_message_path(User.current, :type => 'user_feedback'), :class => "homepageTypeUMessage postTypeGrey" %>
-
+ <% else %>
+
+
+ - 更多
+ - <%= link_to "所有消息",user_message_path(User.current), :class => "resourcesTypeAll postTypeGrey" %>
+ - <%= link_to "未读消息", user_message_path(User.current, :type => 'unviewed'), :class => "homepageTypeUnread postTypeGrey" %>
+ - <%= link_to "系统消息", user_system_messages_path(User.current, :type => 'system_messages'), :class => "homepageTypeSystem postTypeGrey" %>
+ - <%= link_to "贴吧帖子", user_message_path(User.current, :type => 'forum'), :class => "homepageTypePost postTypeGrey" %>
+ - <%= link_to "用户留言",user_message_path(User.current, :type => 'user_feedback'), :class => "homepageTypeUMessage postTypeGrey" %>
+
+
+ <% end %>
diff --git a/app/views/users/_send_part.html.erb b/app/views/users/_send_part.html.erb
new file mode 100644
index 000000000..b47386da8
--- /dev/null
+++ b/app/views/users/_send_part.html.erb
@@ -0,0 +1,12 @@
+<% if @hidden_unproject %>
+
+<% else %>
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/users/_share_message_to_org.html.erb b/app/views/users/_share_message_to_org.html.erb
index 37575a8d5..8c1d81140 100644
--- a/app/views/users/_share_message_to_org.html.erb
+++ b/app/views/users/_share_message_to_org.html.erb
@@ -1,11 +1,18 @@
发送到
-
+ <% if @hidden_unproject %>
+
+ <% else %>
+
+ <% end %>
<%= form_tag search_user_org_user_path(user),:method => 'get',
:remote=>true,:id=>'search_user_org_form' do %>
diff --git a/app/views/users/_share_message_to_project.html.erb b/app/views/users/_share_message_to_project.html.erb
index 89b36e22a..21abd85de 100644
--- a/app/views/users/_share_message_to_project.html.erb
+++ b/app/views/users/_share_message_to_project.html.erb
@@ -2,11 +2,18 @@
发送到
-
+ <% if @hidden_unproject %>
+
+ <% else %>
+
+ <% end %>
diff --git a/app/views/users/_share_news_to_org.html.erb b/app/views/users/_share_news_to_org.html.erb
index 85d5e7104..c40e05199 100644
--- a/app/views/users/_share_news_to_org.html.erb
+++ b/app/views/users/_share_news_to_org.html.erb
@@ -1,11 +1,18 @@
发送到
-
+ <% if @hidden_unproject %>
+
+ <% else %>
+
+ <% end %>
<%= form_tag search_user_org_user_path(user),:method => 'get',
:remote=>true,:id=>'search_user_org_form' do %>
diff --git a/app/views/users/_share_news_to_project.html.erb b/app/views/users/_share_news_to_project.html.erb
index d4c293304..c9c60198f 100644
--- a/app/views/users/_share_news_to_project.html.erb
+++ b/app/views/users/_share_news_to_project.html.erb
@@ -2,11 +2,18 @@
发送到
-
+ <% if @hidden_unproject %>
+
+ <% else %>
+
+ <% end %>
diff --git a/app/views/users/_user_resource_info.html.erb b/app/views/users/_user_resource_info.html.erb
index e00489193..d3b169a17 100644
--- a/app/views/users/_user_resource_info.html.erb
+++ b/app/views/users/_user_resource_info.html.erb
@@ -23,9 +23,15 @@
删除
-
+ <% if hidden_unproject_infos %>
+
+ <% else %>
+
+ <% end %>
选择 0 个资源
@@ -45,7 +51,11 @@
预览
重命名
-
发送
+ <% if hidden_unproject_infos %>
+
发送
+ <% else %>
+
发送
+ <% end %>
删除
diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb
index 578e97b9a..2baa9f2f2 100644
--- a/app/views/users/user_messages.html.erb
+++ b/app/views/users/user_messages.html.erb
@@ -21,9 +21,7 @@
<%= render :partial => 'users/user_at_message', :locals => {:ma => ma} %>
<%# 课程消息 %>
- <% if hidden_unproject_infos %>
- <%= render :partial => 'users/user_message_course', :locals => {:ma => ma} %>
- <% end %>
+ <%= render :partial => 'users/user_message_course', :locals => {:ma => ma} %>
<%= render :partial => 'users/user_message_forge', :locals => {:ma => ma} %>
diff --git a/app/views/users/user_resource.html.erb b/app/views/users/user_resource.html.erb
index ee2ea7e4f..6c0e067db 100644
--- a/app/views/users/user_resource.html.erb
+++ b/app/views/users/user_resource.html.erb
@@ -8,12 +8,6 @@
function remote_get_resources(user_id,type){
}
- $(document).ready(function(){
- $(".resource-switch").click(function(){
- $(".resource-switch").children().removeClass("resource-tab-active");
- $(this).children().addClass("resource-tab-active");
- });
- });
function remote_search(){
$("#resource_search_form").submit();
}
@@ -75,5 +69,10 @@
-
+
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index c2e357e0f..d576ba42f 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -1153,6 +1153,31 @@ function show_send(id, user_id, send_type){
}
}
+//为了隐藏非项目功能
+//var sendType = '1';
+var lastSendType ;//初始为发送到我的项目
+function show_send_hidden(id, user_id, send_type){
+ if (lastSendType === '1'){ //如果已经发送过一次了,那么就应该沿用上次发送的类型。
+ $.ajax({
+ type: 'get',
+ url: '/users/' + user_id + '/search_user_project',
+ data:{send_id:id, send_type:send_type}
+ });
+ }else if( lastSendType == '2'){//组织
+ $.ajax({
+ type: 'get',
+ url: '/users/' + user_id + '/search_user_org',
+ data:{send_id:id, send_type:send_type}
+ });
+ }else{
+ $.ajax({
+ type: 'get',
+ url: '/users/' + user_id + '/search_user_project',
+ data:{send_id:id, send_type:send_type}
+ });
+ }
+}
+
//id 发送的id
//发送的id数组
//send_type:发送的类型,file对应文件,message对应帖子,news对应通知或新闻
@@ -1216,6 +1241,30 @@ function chooseSendType2(res_id,res_ids, user_id, send_type, type){
lastSendType = sendType;
}
+//隐藏项目其它信息特用
+function chooseSendType2hidden(res_id,res_ids, user_id, send_type, type){
+ console.log(res_ids);
+ sendType = $(".resourcesSendType").val();
+ if (sendType === lastSendType) {
+ return;
+ } else if(lastSendType != null) { //不是第一次点击的时候
+ if (sendType == '1') {
+ $.ajax({
+ type: 'get',
+ url: '/users/' + user_id + '/search_user_project' + '?' + "&type=" + type,
+ data:{send_id:res_id, send_ids:res_ids ,send_type:send_type}
+ });
+ }else if(sendType == '2'){
+ $.ajax({
+ type: 'get',
+ url: '/users/' + user_id + '/search_user_org' + '?' + "&type=" + type,
+ data:{send_id:res_id, send_ids:res_ids, send_type:send_type}
+ });
+ }
+ }
+ lastSendType = sendType;
+}
+
//组织新建和配置中,选择组织为私有后,disbled掉允许游客下载选项
function disable_down(source, des, hint){
if (source.attr("checked")){
diff --git a/public/stylesheets/css/structure.css b/public/stylesheets/css/structure.css
index 729bf2f4a..7004c0928 100644
--- a/public/stylesheets/css/structure.css
+++ b/public/stylesheets/css/structure.css
@@ -455,8 +455,8 @@ a.topnav_login_box:hover {color:#a1ebff;}
/*底部*/
#Footer{background-color:#ffffff; padding-bottom:15px; color:#666666;} /*margin-bottom:10px;*/
-.footerAboutContainer {width:auto; border-bottom:1px solid #efefef;}
-.footerAbout{ width:365px; margin:0 auto;height:35px; line-height:35px; padding-top: 10px;}
+.footerAboutContainer {width:auto; border-bottom:1px solid #efefef; text-align:center;}
+.footerAbout{margin:0 auto;height:35px; line-height:35px; padding-top: 10px; display:inline-block;}
.languageBox {width:55px; height:20px; margin-left:5px; outline:none; color:#666666; border:1px solid #d9d9d9;}
.departments{ width:855px; margin:5px auto;height:40px;line-height:40px;}
.departments li {height:40px; line-height:40px;}