Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
8eb2b72802
|
@ -150,11 +150,15 @@ class ProjectsController < ApplicationController
|
|||
end
|
||||
|
||||
def new
|
||||
@issue_custom_fields = IssueCustomField.sorted.all
|
||||
@trackers = Tracker.sorted.all
|
||||
@project = Project.new
|
||||
@project.safe_attributes = params[:project]
|
||||
render :layout => 'base'
|
||||
if User.current.login?
|
||||
@issue_custom_fields = IssueCustomField.sorted.all
|
||||
@trackers = Tracker.sorted.all
|
||||
@project = Project.new
|
||||
@project.safe_attributes = params[:project]
|
||||
render :layout => 'base'
|
||||
else
|
||||
redirect_to signin_url
|
||||
end
|
||||
end
|
||||
|
||||
def share
|
||||
|
@ -167,6 +171,10 @@ class ProjectsController < ApplicationController
|
|||
end
|
||||
|
||||
def create
|
||||
unless User.current.login?
|
||||
redirect_to signin_url
|
||||
return
|
||||
end
|
||||
@issue_custom_fields = IssueCustomField.sorted.all
|
||||
@trackers = Tracker.sorted.all
|
||||
@project = Project.new
|
||||
|
@ -280,11 +288,11 @@ class ProjectsController < ApplicationController
|
|||
|
||||
# 根据私密性,取出符合条件的所有数据
|
||||
if User.current.member_of?(@project) || User.current.admin?
|
||||
@events_pages = ForgeActivity.where("project_id = ?",@project).order("created_at desc").page(params['page'|| 1]).per(20);
|
||||
@events_pages = ForgeActivity.where("project_id = ? and forge_act_type != ?",@project, "Document" ).order("created_at desc").page(params['page'|| 1]).per(20);
|
||||
#events = @activity.events(@date_from, @date_to)
|
||||
else
|
||||
@events_pages = ForgeActivity.includes(:project).where("forge_activities.project_id = ? and projects.is_public
|
||||
= ?",@project,1).order("created_at desc")
|
||||
= ? and forge_act_type != ? ",@project,1, "Document").order("created_at desc")
|
||||
.page(params['page'|| 1]).per(10);
|
||||
# @events = @activity.events(@date_from, @date_to, :is_public => 1)
|
||||
end
|
||||
|
|
|
@ -475,7 +475,7 @@ module UsersHelper
|
|||
when "Issue"
|
||||
return '发表了问题'
|
||||
when "Journal"
|
||||
return '回复了问题'
|
||||
return '更新了问题'
|
||||
when "JournalsForMessage"
|
||||
return e.class.to_s == 'Course' ? '发表了留言' : '提交了反馈'
|
||||
#return ( activity.act.reply_id == nil || activity.act.reply_id == 0 ) ? '' : ''
|
||||
|
|
|
@ -388,7 +388,8 @@ class Mailer < ActionMailer::Base
|
|||
@user = applied.user
|
||||
recipients = @project.manager_recipients
|
||||
s = l(:text_applied_project, :id => "##{@user.show_name}", :project => @project.name)
|
||||
@applied_url = url_for(:controller => 'projects', :action => 'settings', :id => @project.id,:tab=>'members')
|
||||
@token = Token.get_token_from_user(@user, 'autologin')
|
||||
@applied_url = url_for(:controller => 'projects', :action => 'settings', :id => @project.id,:tab=>'members', :token => @token.value)
|
||||
mail :to => recipients,
|
||||
:subject => s
|
||||
end
|
||||
|
|
|
@ -29,32 +29,32 @@
|
|||
<% is_float ||= false %>
|
||||
<% for attachment in attachments %>
|
||||
<div style="float:left;">
|
||||
<p style="height:14px;line-height:12px;width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<%if is_float%>
|
||||
<div style="max-width:55%;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;float: left;">
|
||||
<% end%>
|
||||
<span title="<%= attachment.filename %>" id = "attachment_">
|
||||
<p style="height:14px;line-height:12px;width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<%if is_float%>
|
||||
<div style="max-width:55%;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;float: left;">
|
||||
<% end%>
|
||||
<span title="<%= attachment.filename %>" id = "attachment_">
|
||||
<% if options[:length] %>
|
||||
<%= link_to_short_attachment attachment, :class => ' link_file_board', :download => true,:length => options[:length] -%>
|
||||
<% else %>
|
||||
<%= link_to_short_attachment attachment, :class => ' link_file_board', :download => true -%>
|
||||
|
||||
<% end %>
|
||||
</span>
|
||||
<%if is_float%>
|
||||
</div>
|
||||
<% end%>
|
||||
<%if is_float%>
|
||||
</div>
|
||||
<% end%>
|
||||
|
||||
<% if attachment.is_text? %>
|
||||
<%= link_to image_tag('magnifier.png'),
|
||||
:controller => 'attachments',
|
||||
:action => 'show',
|
||||
:id => attachment,
|
||||
:filename => attachment.filename%>
|
||||
<% end %>
|
||||
<% if attachment.is_text? %>
|
||||
<%= link_to image_tag('magnifier.png'),
|
||||
:controller => 'attachments',
|
||||
:action => 'show',
|
||||
:id => attachment,
|
||||
:filename => attachment.filename%>
|
||||
<% end %>
|
||||
</div>
|
||||
<div style="float:left;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" title="<%= attachment.description%>">
|
||||
<%= h(" - #{attachment.description}") unless attachment.description.blank? %>
|
||||
</div>
|
||||
<%= h(" - #{attachment.description}") unless attachment.description.blank? %>
|
||||
</div>
|
||||
<span class="size">(
|
||||
<%= number_to_human_size attachment.filesize %>)
|
||||
</span>
|
||||
|
@ -66,6 +66,16 @@
|
|||
:class => 'delete delete-homework-icon',
|
||||
:remote => true,
|
||||
:title => l(:button_delete) %>
|
||||
<% elsif attachment.container_type == 'Issue' %>
|
||||
<% if User.current == attachment.author %>
|
||||
<%= link_to image_tag('delete.png'), attachment_path(attachment),
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:method => :delete,
|
||||
:class => 'delete',
|
||||
#:remote => true,
|
||||
#:id => "attachments_" + attachment.id.to_s,
|
||||
:title => l(:button_delete) %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= link_to image_tag('delete.png'), attachment_path(attachment),
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
|
@ -89,13 +99,13 @@
|
|||
</p>
|
||||
<% end %>
|
||||
<div class="thumbnails">
|
||||
<% if defined?(thumbnails) && thumbnails %>
|
||||
<% images = attachments.select(&:thumbnailable?) %>
|
||||
<% if images.any? %>
|
||||
<% if defined?(thumbnails) && thumbnails %>
|
||||
<% images = attachments.select(&:thumbnailable?) %>
|
||||
<% if images.any? %>
|
||||
<% images.each do |attachment| %>
|
||||
<div class="pro_pic fl " width="100" height="73"><%= thumbnail_issue_tag(attachment) %></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% watcher_count,watcher_list = get_watcher_users(user) %>
|
||||
<div id="watcher_nav_list" class="leftbox mt10" style="display:<%= watcher_count==0 ? 'none' : 'block' %>">
|
||||
<div id="watcher_nav_list" class="leftbox" style="display:<%= watcher_count==0 ? 'none' : 'block' %>">
|
||||
<h4 class="fl">关注</h4><a href="<%=url_for(:controller => 'users', :action => 'user_watchlist', :id=>user.id)%>" data-count="<%= watcher_count %>" style="display:<%= watcher_count>10 ? 'block' : 'block' %>" class="more fr mr10">更多</a>
|
||||
<div class="cl"></div>
|
||||
<div class="mt5">
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
<% end %>
|
||||
</div><!--uers_info end-->
|
||||
|
||||
<div class="leftbox mt10">
|
||||
<div class="leftbox">
|
||||
<ul class="leftbox_ul_left">
|
||||
<li>最近登录 :</li> <!--加入时间修改为最近登录 -->
|
||||
<% if @user.user_extensions!=nil && @user.user_extensions.identity == 2 %>
|
||||
|
@ -133,19 +133,19 @@
|
|||
动态
|
||||
</a>
|
||||
</div>
|
||||
<% if @center_flag %>
|
||||
<% if @center_flag %>
|
||||
<div class="subNav">
|
||||
<a href="<%=url_for(:controller => 'users', :action => 'user_courses',:id=>@user.id)%>" class=" f14 c_blue02">
|
||||
我的课程
|
||||
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.courses.count%>)</span>
|
||||
</a>
|
||||
</div>
|
||||
<a href="<%=url_for(:controller => 'users', :action => 'user_courses',:id=>@user.id)%>" class=" f14 c_blue02">
|
||||
我的课程
|
||||
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.courses.count%>)</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<a href="<%=url_for(:controller => 'users', :action => 'user_projects',:id=>@user.id)%>" class=" f14 c_blue02">
|
||||
我的项目
|
||||
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.projects.count%>)</span>
|
||||
</a>
|
||||
</div>
|
||||
<a href="<%=url_for(:controller => 'users', :action => 'user_projects',:id=>@user.id)%>" class=" f14 c_blue02">
|
||||
我的项目
|
||||
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.projects.count%>)</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="subNav ">
|
||||
<a href="<%= url_for(:controller => 'my', :action => 'account') %>" class=" f14 c_blue02">编辑资料</a>
|
||||
</div>
|
||||
|
@ -166,12 +166,12 @@
|
|||
<div class="subNav ">
|
||||
<%= link_to "留言",feedback_path(@user),:class => "f14 c_blue02"%>
|
||||
</div>
|
||||
</div><!--侧导航 end-->
|
||||
</div><!--侧导航 end-->
|
||||
|
||||
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="leftbox mt10">
|
||||
<div class="leftbox">
|
||||
<ul class="leftbox_ul_left">
|
||||
<% if !@user.user_extensions.nil? && @user.user_extensions.identity == 0 %>
|
||||
<% if(get_create_course_count(@user)) == 0 %>
|
||||
|
@ -254,7 +254,7 @@
|
|||
<%= render :partial => 'layouts/user_fans_list', :locals => {:user => @user} %>
|
||||
<% visitor_count,visitor_list = get_visitor_users(@user) %>
|
||||
<% if(User.current.admin?) %>
|
||||
<div class="leftbox mt10" style="display:<%= visitor_count==0 ? 'none' : 'block' %>">
|
||||
<div class="leftbox" style="display:<%= visitor_count==0 ? 'none' : 'block' %>">
|
||||
<h4 class="fl">访客</h4><a href="<%=url_for(:controller => 'users', :action => 'user_visitorlist', :id=>@user.id)%>" data-count="<%= visitor_count %>" style="display:<%= visitor_count>10 ? 'block' : 'block' %>" class="more fr mr10">更多</a>
|
||||
<div class="cl"></div>
|
||||
<div class="mt5">
|
||||
|
|
|
@ -225,10 +225,10 @@
|
|||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_issue_update) %></span>
|
||||
<% if issues_journal.notes.blank? || issues_journal.notes.nil? %>
|
||||
<%= link_to truncate(l(:label_isuue_mail_status),length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value),
|
||||
<%= link_to truncate(issues_journal.issue.subject.html_safe, length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value),
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<% else %>
|
||||
<%= link_to truncate(issues_journal.notes.html_safe,length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value),
|
||||
<%= link_to truncate(issues_journal.notes.html_safe, length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value),
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<% end %>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(issues_journal.created_on) %></span>
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<style type="text/css">
|
||||
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
||||
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
|
||||
span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
|
||||
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
|
||||
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
|
||||
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
||||
div.ke-toolbar .ke-outline{border:none;}
|
||||
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
||||
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
|
||||
span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
|
||||
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
|
||||
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
|
||||
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
||||
div.ke-toolbar .ke-outline{border:none;}
|
||||
|
||||
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
|
||||
div.recall_con{width:570px;}
|
||||
div.recall_con .reply_btn{margin-left:525px;margin-top:5px;}
|
||||
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
|
||||
div.recall_con{width:570px;}
|
||||
div.recall_con .reply_btn{margin-left:525px;margin-top:5px;}
|
||||
</style>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<div class="msg_box" id='leave-message' nhname='new_message' style="height:auto;">
|
||||
|
@ -22,18 +22,18 @@
|
|||
<hr/>
|
||||
</div>
|
||||
<% else %>
|
||||
|
||||
<%= form_for('new_form', :method => :post,
|
||||
:url => {:controller => 'words', :action => 'leave_project_message'}) do |f|%>
|
||||
<%= f.text_area 'project_message', :rows => 3, :cols => 65,
|
||||
:placeholder => "#{l(:label_welcome_my_respond)}",:nhname=>'new_message_textarea' %>
|
||||
<p nhname="contentmsg"></p>
|
||||
<div class="fl mt10" style="padding-top:5px;" nhname="toolbar_container"></div>
|
||||
<%= submit_tag l(:button_leave_meassge), :name => nil , :class => "blue_btn fr mt10 mb10" %>
|
||||
<% end %>
|
||||
<%= form_for('new_form', :method => :post, :html => {:id => 'project_feedback_form', :multipart => true},
|
||||
:url => {:controller => 'words', :action => 'leave_project_message'}) do |f|%>
|
||||
<%= f.text_area 'project_message', :rows => 3, :cols => 65,
|
||||
:placeholder => "#{l(:label_welcome_my_respond)}",:nhname=>'new_message_textarea' %>
|
||||
<p nhname="contentmsg"></p>
|
||||
<div class="fl mt10" style="padding-top:5px;" nhname="toolbar_container"></div>
|
||||
<%#= submit_tag l(:button_leave_meassge), :name => nil , :class => "blue_btn fr mt10 mb10" %>
|
||||
<%= link_to l(:button_leave_meassge), "javascript:void(0)", :onclick => 'submitProjectFeedback();', :onmouseover => 'submitFocus(this);', :class => 'blue_btn fr mt10 mb10' %>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div id="history">
|
||||
<%= render :partial => 'history',:locals => { :journals => @jour, :state => false} %>
|
||||
|
@ -42,47 +42,47 @@
|
|||
|
||||
<div style="display:none;"><a href="#" id="nhjump"></a></div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$(function(){
|
||||
|
||||
function init_editor(params){
|
||||
params.textarea.removeAttr('placeholder');
|
||||
var editor = params.kindutil.create(params.textarea, {
|
||||
resizeType : 1,minWidth:"1px",width:"100%",height:"150px",
|
||||
items:['emoticons'],
|
||||
afterChange:function(){//按键事件
|
||||
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
||||
},
|
||||
afterCreate:function(){
|
||||
var toolbar = $("div[class='ke-toolbar']",params.div_form);
|
||||
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
|
||||
params.toolbar_container.append(toolbar);
|
||||
function init_editor(params){
|
||||
params.textarea.removeAttr('placeholder');
|
||||
var editor = params.kindutil.create(params.textarea, {
|
||||
resizeType : 1,minWidth:"1px",width:"100%",height:"150px",
|
||||
items:['emoticons'],
|
||||
afterChange:function(){//按键事件
|
||||
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
||||
},
|
||||
afterCreate:function(){
|
||||
var toolbar = $("div[class='ke-toolbar']",params.div_form);
|
||||
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
|
||||
params.toolbar_container.append(toolbar);
|
||||
}
|
||||
}).loadPlugin('paste');
|
||||
return editor;
|
||||
}
|
||||
}).loadPlugin('paste');
|
||||
return editor;
|
||||
}
|
||||
|
||||
function nh_check_field(params){
|
||||
var result=true;
|
||||
if(params.content!=undefined){
|
||||
if(params.content.isEmpty()){
|
||||
result=false;
|
||||
function nh_check_field(params){
|
||||
var result=true;
|
||||
if(params.content!=undefined){
|
||||
if(params.content.isEmpty()){
|
||||
result=false;
|
||||
}
|
||||
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
|
||||
params.textarea.html(params.content.html());
|
||||
params.content.sync();
|
||||
if(params.content.isEmpty()){
|
||||
params.contentmsg.html('内容不能为空');
|
||||
params.contentmsg.css({color:'#ff0000'});
|
||||
}else{
|
||||
params.contentmsg.html('填写正确');
|
||||
params.contentmsg.css({color:'#008000'});
|
||||
}
|
||||
params.contentmsg.show();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
|
||||
params.textarea.html(params.content.html());
|
||||
params.content.sync();
|
||||
if(params.content.isEmpty()){
|
||||
params.contentmsg.html('内容不能为空');
|
||||
params.contentmsg.css({color:'#ff0000'});
|
||||
}else{
|
||||
params.contentmsg.html('填写正确');
|
||||
params.contentmsg.css({color:'#008000'});
|
||||
}
|
||||
params.contentmsg.show();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function init_form(params){
|
||||
function init_form(params){
|
||||
// var flag = false;
|
||||
// if(params.form.attr('data-remote') != undefined ){
|
||||
// flag = true
|
||||
|
@ -108,93 +108,93 @@
|
|||
// return false;
|
||||
// }
|
||||
|
||||
params.form.submit(function(){
|
||||
var flag = false;
|
||||
if(params.form.attr('data-remote') != undefined ){
|
||||
flag = true
|
||||
}
|
||||
var is_checked = nh_check_field({
|
||||
issubmit:true,
|
||||
content:params.editor,
|
||||
contentmsg:params.contentmsg,
|
||||
textarea:params.textarea
|
||||
});
|
||||
if(is_checked){
|
||||
if(flag){
|
||||
return true;
|
||||
}else{
|
||||
$(this)[0].submit();
|
||||
return false;
|
||||
}
|
||||
params.form.submit(function(){
|
||||
var flag = false;
|
||||
if(params.form.attr('data-remote') != undefined ){
|
||||
flag = true
|
||||
}
|
||||
var is_checked = nh_check_field({
|
||||
issubmit:true,
|
||||
content:params.editor,
|
||||
contentmsg:params.contentmsg,
|
||||
textarea:params.textarea
|
||||
});
|
||||
if(is_checked){
|
||||
if(flag){
|
||||
return true;
|
||||
}else{
|
||||
$(this)[0].submit();
|
||||
return false;
|
||||
}
|
||||
// return true; //这个涛哥的firefox不能提交
|
||||
//$(this).trigger('submit'); //这个虽然能提交 但是他是个死循环
|
||||
//$(this)[0].submit(); //用这个form的data-remote='true'没效果了
|
||||
//肿么破阿 我滴个神 实在不行就用$.ajax()算了
|
||||
//$(this).trigger('submit'); //这个虽然能提交 但是他是个死循环
|
||||
//$(this)[0].submit(); //用这个form的data-remote='true'没效果了
|
||||
//肿么破阿 我滴个神 实在不行就用$.ajax()算了
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
function nh_reset_form(params){
|
||||
params.form[0].reset();
|
||||
params.textarea.empty();
|
||||
if(params.editor != undefined){
|
||||
params.editor.html(params.textarea.html());
|
||||
}
|
||||
params.contentmsg.hide();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
function nh_reset_form(params){
|
||||
params.form[0].reset();
|
||||
params.textarea.empty();
|
||||
if(params.editor != undefined){
|
||||
params.editor.html(params.textarea.html());
|
||||
}
|
||||
params.contentmsg.hide();
|
||||
}
|
||||
|
||||
KindEditor.ready(function(K){
|
||||
$("a[nhname='reply_btn']").live('click',function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.container = $(this).parent('div').parent('div');
|
||||
params.div_form = $(">.respond-form",params.container);
|
||||
params.form = $("form",params.div_form);
|
||||
params.textarea = $("textarea[name='user_notes']",params.div_form);
|
||||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||
params.cancel_btn = $("input[nhname='cancel_btn']",params.div_form);
|
||||
if(params.textarea.data('init') == undefined){
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
params.cancel_btn.click(function(){
|
||||
nh_reset_form(params);
|
||||
});
|
||||
}
|
||||
params.cancel_btn.click();
|
||||
toggleAndSettingWordsVal(params.div_form, params.textarea);
|
||||
setTimeout(function(){
|
||||
if(!params.div_form.is(':hidden')){
|
||||
params.textarea.show();
|
||||
params.textarea.focus();
|
||||
params.textarea.hide();
|
||||
KindEditor.ready(function(K){
|
||||
$("a[nhname='reply_btn']").live('click',function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.container = $(this).parent('div').parent('div');
|
||||
params.div_form = $(">.respond-form",params.container);
|
||||
params.form = $("form",params.div_form);
|
||||
params.textarea = $("textarea[name='user_notes']",params.div_form);
|
||||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||
params.cancel_btn = $("input[nhname='cancel_btn']",params.div_form);
|
||||
if(params.textarea.data('init') == undefined){
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
params.cancel_btn.click(function(){
|
||||
nh_reset_form(params);
|
||||
});
|
||||
}
|
||||
params.cancel_btn.click();
|
||||
toggleAndSettingWordsVal(params.div_form, params.textarea);
|
||||
setTimeout(function(){
|
||||
if(!params.div_form.is(':hidden')){
|
||||
params.textarea.show();
|
||||
params.textarea.focus();
|
||||
params.textarea.hide();
|
||||
// $("#nhjump").attr('href','#'+params.div_form.attr('id'));
|
||||
// $("#nhjump")[0].click();
|
||||
}
|
||||
},300);
|
||||
params.textarea.data('init',1);
|
||||
});
|
||||
}
|
||||
},300);
|
||||
params.textarea.data('init',1);
|
||||
});
|
||||
|
||||
$("div[nhname='new_message']").each(function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.div_form = $(this);
|
||||
params.form = $("form",params.div_form);
|
||||
if(params.form==undefined || params.form.length==0){
|
||||
return;
|
||||
}
|
||||
params.textarea = $("textarea[nhname='new_message_textarea']",params.div_form);
|
||||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||
if(params.textarea.data('init') == undefined){
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
$("div[nhname='new_message']").each(function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.div_form = $(this);
|
||||
params.form = $("form",params.div_form);
|
||||
if(params.form==undefined || params.form.length==0){
|
||||
return;
|
||||
}
|
||||
params.textarea = $("textarea[nhname='new_message_textarea']",params.div_form);
|
||||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||
if(params.textarea.data('init') == undefined){
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
// $("a[nhname='cancel_btn']",params.div_form).click(function(){
|
||||
// nh_reset_form(params);
|
||||
// });
|
||||
params.textarea.data('init',1);
|
||||
}
|
||||
});
|
||||
params.textarea.data('init',1);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -93,21 +93,7 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<!--Document-->
|
||||
<% elsif e.forge_act_type == "Document" %>
|
||||
<div class="problem_main">
|
||||
<a class="problem_pic fl"><%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %></a>
|
||||
<div class="problem_txt fl mt5 break_word">
|
||||
<a class="problem_name fl ">
|
||||
<%= h(e.project) if @project.nil? || @project.id != e.project_id %>
|
||||
<%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %></a><span class="fl"> <%= l(:label_new_activity) %> :</span>
|
||||
|
||||
<%= link_to format_activity_title("#{l(:label_document)}: #{act.title}"), {:controller => 'documents', :action => 'show', :id => act.id}, :class => "problem_tit fl fb" %><br />
|
||||
<p class="mt5 break_word"><%= textAreailizable act,:description %><br />
|
||||
<%= l :label_create_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<!--Attachment -->
|
||||
<% elsif e.forge_act_type == "Attachment" %>
|
||||
<div class="problem_main">
|
||||
|
|
|
@ -1,15 +1,6 @@
|
|||
<div id="tags_show">
|
||||
<%= render :partial => "tags/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
|
||||
<div id="tags">
|
||||
<div id="tags_show">
|
||||
<%= render :partial => "tags/tag_project_new_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
|
||||
</div>
|
||||
</div>
|
||||
<% if User.current.logged?%>
|
||||
<a href="javascript:void(0)" class="yellowBtn f_l" onclick="$('#add_tag01').slideToggle();"><%= l(:label_add_tag)%></a>
|
||||
<span id="add_tag01" style="display:none; vertical-align: middle;" class="ml10 f_l">
|
||||
<%= form_for "tag_for_save",:remote=>true,:url=>save_tag_path,:update => "tags_show",:complete => '$("#put-tag-form").slideUp();' do |f| %>
|
||||
<%= f.text_field :name ,:id => "tags_name",:size=>"20",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length,:class =>"isTxt w90 f_l" %>
|
||||
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
||||
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
||||
<input type="button" class="submit f_l" onclick="$('#tags_name').parent().submit();" />
|
||||
<% end %>
|
||||
</span>
|
||||
<% end%>
|
||||
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
<% @tags = obj.reload.tag_list %>
|
||||
<% if non_list_all && @tags.size > 0 %>
|
||||
|
||||
<% else %>
|
||||
<!-- 用来显示三大对象的主页中的tag 故是全部显示 -->
|
||||
<% if @tags.size > 0 %>
|
||||
<% @tags.each do |tag| %>
|
||||
<span class="re_tag f_l " id="tag">
|
||||
<%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id, :class => 'pt5' %>
|
||||
<span class="del">
|
||||
<%= link_to('x', remove_tag_path(:tag_name => tag,:taggable_id => obj.id, :taggable_type => object_flag), :remote => true, :confirm => l(:text_are_you_sure) ) if (ProjectInfo.find_by_project_id(obj.id)).try(:user_id) == User.current.id %>
|
||||
</span>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if User.current.logged?%>
|
||||
<a href="javascript:void(0)" class="yellowBtn f_l" onclick="$('#add_tag02').slideToggle();"><%= l(:label_add_tag)%></a>
|
||||
<span id="add_tag02" style="display:none; vertical-align: middle;" class="ml10 f_l">
|
||||
<%= form_for "tag_for_save",:remote => true,:url=>save_tag_path,:update => "tags_show",:complete => '$("#put-tag-form").slideUp();' do |f| %>
|
||||
<%= f.text_field :name ,:id => "tags_name2",:size=>"20",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length,:class =>"isTxt w90 f_l" %>
|
||||
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
||||
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
||||
<input type="button" class="submit f_l" onclick="$('#tags_name2').parent().submit();" />
|
||||
<% end %>
|
||||
</span>
|
||||
<% end%>
|
||||
|
||||
|
|
@ -2,6 +2,9 @@
|
|||
<% if @object_flag == '3'%>
|
||||
$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>');
|
||||
<% elsif @object_flag == '2'%>
|
||||
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_project_new_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>');
|
||||
<% elsif @object_flag == '6'%>
|
||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||
|
|
|
@ -4,6 +4,10 @@ $('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_n
|
|||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||
//$('#put-tag-form-issue').hide();
|
||||
$('#name-issue').val("");
|
||||
<% elsif @obj_flag == '2'%>
|
||||
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_project_new_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||
$('#tags_name2').val("");
|
||||
<% elsif @obj_flag == '6'%>
|
||||
<%if @course%>
|
||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||
|
|
|
@ -74,11 +74,11 @@
|
|||
|
||||
<% end %>
|
||||
<br/><br/>
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %>
|
||||
<%= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %>
|
||||
<%= f.link_to 'TXT', :url => {:id => @page.title, :version => params[:version]} %>
|
||||
<% end if User.current.allowed_to?(:export_wiki_pages, @project) %>
|
||||
<%# other_formats_links do |f| %>
|
||||
<%#= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %>
|
||||
<%#= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %>
|
||||
<%#= f.link_to 'TXT', :url => {:id => @page.title, :version => params[:version]} %>
|
||||
<%# end if User.current.allowed_to?(:export_wiki_pages, @project) %>
|
||||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'sidebar' %>
|
||||
<% end %>
|
||||
|
|
|
@ -491,3 +491,8 @@ function judgeprojectname(){
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
//用户反馈
|
||||
function submitProjectFeedback() {
|
||||
$("#project_feedback_form").submit();
|
||||
}
|
|
@ -31,7 +31,7 @@ a:hover.pr_join_a{ background:#41a8c8;}
|
|||
|
||||
/*左侧导航*/
|
||||
.subNavBox{width:240px; background:#fff;margin:10px 10px 0 0;}
|
||||
.subNav{border-bottom:solid 1px #e5e3da;cursor:pointer;font-weight:bold;font-size:14px;color:#3ca5c6; height:26px;padding-left:10px;background-color:#fff; padding-top:2px;}
|
||||
.subNav{border-bottom:solid 1px #e5e3da;cursor:auto;font-weight:bold;font-size:14px;color:#3ca5c6; height:26px;padding-left:10px;background-color:#fff; padding-top:2px;}
|
||||
.subNav_jiantou{background:url(../images/jiantou1.jpg) no-repeat;background-position:95% 50%; background-color:#fff;}
|
||||
.subNav_jiantou:hover{color:#0781b4; }
|
||||
.currentDd{color:#0781b4;}
|
||||
|
|
|
@ -74,7 +74,11 @@ a:hover.problem_pic{border:1px solid #64bdd9;}
|
|||
.issues_icon{ background:url(../images/public_icon.png) 0 -342px no-repeat; width:16px; height:21px;}
|
||||
.problem_txt{ width:600px; margin-left:10px; color:#777777; }
|
||||
.pro_txt_w{width:610px;}
|
||||
a.problem_name{ color:#ff5722; }
|
||||
a.problem_name{ color:#ff5722;max-width: 80px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
a:hover.problem_name{ color:#d33503;}
|
||||
a.problem_tit{ color:#0781b4; max-width:430px; font-weight:bold; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
a.problem_tit02{ color:#0781b4; font-weight:bold;max-width:400px;}
|
||||
|
@ -690,9 +694,10 @@ table.list thead th
|
|||
|
||||
tr.changeset { height: 20px }
|
||||
tr.changeset ul, ol { margin-top: 0px; margin-bottom: 0px; }
|
||||
tr.changeset td.revision_graph { width: 15%; background-color: #fffffb; }
|
||||
tr.changeset td.revision_graph { width: 1%; background-color: #fffffb; }
|
||||
tr.changeset td.author { text-align: center; width: 15%; white-space:nowrap;}
|
||||
tr.changeset td.committed_on { text-align: center; width: 15%; white-space:nowrap;}
|
||||
tr.changeset td.comments { text-align: center; word-break:break-all; word-wrap: break-word;;}
|
||||
|
||||
div.changeset { padding: 4px;}
|
||||
div.changeset { border-bottom: 1px solid #ddd; }
|
||||
|
|
|
@ -443,7 +443,6 @@ color: #000000;
|
|||
width:auto;
|
||||
/*float:center;*/
|
||||
min-height:800px;
|
||||
border: 1px solid #ffffff;
|
||||
}
|
||||
|
||||
/*by huang*/
|
||||
|
@ -1122,6 +1121,11 @@ a.root {
|
|||
line-height: 1;
|
||||
}
|
||||
|
||||
.courses{
|
||||
margin:0px;
|
||||
padding-left: 0em;
|
||||
}
|
||||
|
||||
.project-table {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
|
|
Loading…
Reference in New Issue