Merge remote-tracking branch 'origin/szzh' into guange_dev

memcached_alan
guange 10 years ago
commit 273b360b51

@ -473,8 +473,10 @@ class HomeworkAttachController < ApplicationController
#保存评论
@is_comprehensive_evaluation = @is_teacher ? 1 : (@is_anonymous_comments ? 2 : 3) #判断当前评论是老师评论?匿评?留言
if params[:new_form] && params[:new_form][:user_message] && params[:new_form][:user_message] != "" #有没有留言
@homework.addjours User.current.id, params[:new_form][:user_message],0,@is_comprehensive_evaluation
if params[:new_form] && params[:new_form][:user_message] #有没有留言
@homework.addjours(User.current.id, params[:new_form][:user_message],0,@is_comprehensive_evaluation) if @is_teacher
else
@homework.addjours User.current.id, "",0,@is_comprehensive_evaluation if @is_teacher
end
@teacher_stars = @stars_reates.where("is_teacher_score = 1") #老师评分列表

@ -180,6 +180,8 @@ class ZipdownController < ApplicationController
def zipping(zip_name_refer, files_paths, output_path, is_attachment=false, not_exist_file=[])
ic = Iconv.new('GBK//IGNORE', 'UTF-8//IGNORE')
rename_zipfile = zip_name_refer ||= "#{Time.now.to_i.to_s}.zip"
zipfile_name = "#{output_path}/#{rename_zipfile}"
Zip.unicode_names = true
@ -187,8 +189,9 @@ class ZipdownController < ApplicationController
Dir.mkdir(File.dirname(zipfile_name)) unless File.exist?(File.dirname(zipfile_name))
Zip::File.open(zipfile_name, Zip::File::CREATE) do |zipfile|
files_paths.each do |filename|
rename_file = File.basename(filename)
rename_file = filename_to_real( File.basename(filename)) if is_attachment
rename_file = ic.iconv( (File.basename(filename)) ).to_s
rename_file = ic.iconv( filename_to_real( File.basename(filename))).to_s if is_attachment
begin
zipfile.add(rename_file, filename)
rescue Exception => e

@ -329,7 +329,7 @@ module ApplicationHelper
imagesize = attachment.thumbnail(:size => "50*50")
imagepath = named_attachment_path(attachment, attachment.filename)
if imagesize
link_to image_tag(thumbnail_path(attachment,"50")),
link_to image_tag(thumbnail_path(attachment), height: '73', width: '100'),
imagepath,
:title => attachment.filename
else

@ -56,7 +56,7 @@ class JournalsForMessage < ActiveRecord::Base
has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy
validates :notes, presence: true
validates :notes, presence: true, if: :is_homework_jour?
after_create :act_as_activity #huang
after_create :reset_counters!
after_destroy :reset_counters!
@ -88,6 +88,10 @@ class JournalsForMessage < ActiveRecord::Base
self.find(message_id).destroy
# self.destroy_all "id = #{message_id}"
end
def is_homework_jour?
self.jour_type != "HomeworkAttach"
end
def reference_user
User.find(reply_id)

@ -62,11 +62,11 @@
<!--<a href="javascript:void(0)" class="re_fabu f_r b_lblue" onclick="show_upload();">上传资源</a>-->
<p class="c_grey fr mt10 mr5">
上传:
<a href="javascript:void(0);" class=" c_dblue" onclick="show_upload(1);">课件</a>&nbsp;|&nbsp;
<a href="javascript:void(0);" class=" c_dblue" onclick="show_upload(2);">软件</a>&nbsp;|&nbsp;
<a href="javascript:void(0);" class=" c_dblue" onclick="show_upload(3);">媒体</a>&nbsp;|&nbsp;
<a href="javascript:void(0);" class=" c_dblue" onclick="show_upload(4);">代码</a>&nbsp;|&nbsp;
<a href="javascript:void(0);" class=" c_dblue" onclick="show_upload(5);">其他</a>
<a href="javascript:void(0);" class=" c_dblue font_bold" onclick="show_upload(1);">课件</a>&nbsp;|&nbsp;
<a href="javascript:void(0);" class=" c_dblue font_bold" onclick="show_upload(2);">软件</a>&nbsp;|&nbsp;
<a href="javascript:void(0);" class=" c_dblue font_bold" onclick="show_upload(3);">媒体</a>&nbsp;|&nbsp;
<a href="javascript:void(0);" class=" c_dblue font_bold" onclick="show_upload(4);">代码</a>&nbsp;|&nbsp;
<a href="javascript:void(0);" class=" c_dblue font_bold" onclick="show_upload(5);">其他</a>
</p>
<% end %>
</div><!---re_top end-->

@ -36,7 +36,8 @@
<% end %>
</span>
<div class="cl"></div>
<p><%= textilizable jour.nil? ? "" : jour.notes%></p>
<% notes = textilizable(jour.nil? ? "" : jour.notes)%>
<%= notes.empty? ? "<p></p>".html_safe : notes%>
</div>
<% unless jour.nil? %>
<% ids = 'project_respond_form_'+ jour.id.to_s%>

@ -72,7 +72,7 @@
<%= f.text_field "name", :required => true, :size => 60, :class => "w430 bo", :maxlength => 254, :placeholder => "作品名称", :onkeyup => "regexName();" %>
<span id="homework_attach_name_span"></span>
</p>
<p>
<p style="float:left;">
<label style="float:left;">
<span class="c_red">
*
@ -80,17 +80,16 @@
&nbsp;&nbsp;作品描述&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</label>
<%= f.text_area "description", :class => "w620", :maxlength => 3000, :style => "width:430px", :placeholder => "最多3000个汉字", :onkeyup => "regexDescription();"%>
<br />
<span id="homework_attach_description_span" style="padding-left: 100px;"></span>
<p id="homework_attach_description_span" style="padding-left: 100px;"></p>
</p>
<p>
<label style="float: left;">
&nbsp;&nbsp;&nbsp;添加附件&nbsp;&nbsp;&nbsp;&nbsp;
</label>
<p style=" padding: 3px 0 3px 0;padding-left: 90px;">
<%= render :partial => 'attachments/form' %>
</p>
<div class="cl"></div>
<p style="float: left;">
&nbsp;&nbsp;&nbsp;添加附件&nbsp;&nbsp;&nbsp;&nbsp;
</p>
<div style="float: left;margin-left: 10px;">
<%= render :partial => 'attachments/form' %>
</div>
<div class="cl"></div>
<p>
<label>&nbsp;&nbsp;&nbsp;开发项目
<img src="/images/bid/pic_question.png" width="16" height="16"

@ -3,8 +3,6 @@
<%#= link_to l(:button_copy), project_copy_issue_path(@project, @issue), :class => 'icon icon-copy' if User.current.allowed_to?(:add_issues, @project) %>
<%= link_to l(:button_delete), issue_path(@issue.id), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'talk_edit fr' if User.current.allowed_to?(:delete_issues, @project) %>
<% if (@issue.author == User.current) || (User.current.admin?) %>
<%= link_to l(:button_edit), edit_issue_path(@issue), :onclick => 'showAndScrollTo("all_attributes", "issue_notes"); return false;', :class => 'talk_edit fr', :accesskey => accesskey(:edit) if @issue.editable? %>
<% else %>
<%= link_to l(:label_user_newfeedback), edit_issue_path(@issue), :onclick => 'showAndScrollTo("update", "issue_notes"); return false;', :class => 'talk_edit fr', :accesskey => accesskey(:edit) if @issue.editable? %>
<% end %>
<%= link_to l(:button_edit), edit_issue_path(@issue), :onclick => 'showAndScrollTo("all_attributes"); return false;', :class => 'talk_edit fr', :accesskey => accesskey(:edit) if @issue.editable? && User.current.allowed_to?(:edit_issues, @project) %>
<%= link_to l(:label_user_newfeedback), edit_issue_path(@issue), :onclick => 'showAndScrollTo("update", "issue_notes"); return false;', :class => 'talk_edit fr', :accesskey => accesskey(:edit) if @issue.editable? && User.current.allowed_to?(:add_issue_notes, @project) %>

@ -17,6 +17,7 @@
<% if @issue.safe_attribute? 'is_private' %>
<%= f.check_box :is_private, :no_label => true, :class => "ml30" %>
<label class="fl ml5 mt3" for="issue_is_private" id="issue_is_private_label"><%= l(:field_is_private) %></label>
<label class="fl ml5 mt3" for="issue_is_private" id="issue_is_private_tips"><%= l(:field_is_private_tips)%></label>
<% end %>
</li>
<div class="cl"></div>

@ -1,15 +1,24 @@
<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? && !User.current.admin %>
<span><%= watcher_link_for_project(@project, User.current) %></span>
<% end %>
<!--加入项目 -->
<% if ( !(User.current.member_of? @project) && User.current.login?) %>
<% if !User.current.member_of?(@project) && User.current.login? && !User.current.admin %>
<%= join_in_project_link(@project, User.current) %>
<% end %>
<!--退出项目-->
<!--配置项目-->
<% if User.current.admin? || User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project) %>
<%= link_to "<span class='pr_setting'></span>#{l(:button_configure)}".html_safe, settings_project_path(@project), :class => "pr_join_a" %>
<% end %>
<!--项目类型-->
<% if (User.current.login? && User.current.member_of?(@project) && Member.where(:user_id => User.current.id, :project_id => @project.id).first.roles.first.to_s.include?("Manager")) || User.current.admin? %>
<%= link_to "<span class='#{typeclass}'></span>#{text}".html_safe,"javascript:void(0)" ,:onClick => "show_window();", :class => "pr_join_a",:id => "setting_project_type"%>
<% end %>
<!--退出项目-->
<% if (User.current.member_of? @project) && User.current.login? &&
Member.where(:user_id => User.current.id, :project_id => @project.id).first.roles.first.to_s != "Manager" %>
<%= exit_project_link(@project) %>
<% end %>
</div>

@ -1,9 +1,9 @@
<%= labelled_form_for(@memo, :url => forum_memos_path) do |f| %>
<div class="actions" style="max-width:680px">
<div class="actions" style="max-width:680px;">
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
<p><%= f.text_field :subject, :required => true, :size => 95 %></p>
<p style="max-width:680px"><%= f.kindeditor :content, :required => true %></p>
<p style="max-width:680px"><%= f.kindeditor :content,:width=>'99%', :required => true %></p>
<!--<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script> -->
<br/>

File diff suppressed because it is too large Load Diff

@ -256,60 +256,143 @@
<% end %>
</ul>
</div>
<% if @contest_notifications.count < 5%>
<div id="J_Slide" class="d-p-index-box d-p-index-Dynamic">
<h3 style="margin-left: 5px; color: #e8770d;">
<strong><%=l(:label_issue_feedback_activities)%></strong>
<%= link_to l(:label_my_question), newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
<%= link_to l(:label_my_feedback), suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
</h3>
<span style="margin-top: -20px;float: right; display: block;"><%= link_to l(:label_more_information), forums_path %></span>
<div class="d-p-projectlist-box">
<ul class="d-p-projectlist">
<% find_new_forum_topics(9 - @contest_notifications.count).each do |topic|%>
<li class="message-brief-intro" style="height: auto; line-height:2em; padding-bottom: 1px; border-bottom: 1px dashed ">
<div style="display: inline-block; width: 100%;">
<span class="memo_activity text_nowrap" style="color:gray; display: inline-block; margin-bottom:6px; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %>
<%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %>
</span>
<div class='memo_activity memo_attr'>
<span class='memo_timestamp'>
<%= "#{l(:label_updated_time, value: time_tag_welcome(topic_last_time topic))}".html_safe %>
</span>
<span class="memo_author">
<%=l(:label_question_sponsor)%>&nbsp;<%= link_to topic.author.login.truncate(10, omission: '...'),user_path(topic.author),title: topic.author.login %>
</span>
<span class="memo_last_person">
<% unless (topic.last_reply.nil? || topic.last_reply.author.nil?) %>
<%=l(:label_final_reply)%>&nbsp;
<%=link_to topic.last_reply.author.login.truncate(10, omission: '...'),user_path(topic.last_reply.author),title: topic.last_reply.author.login%>
<% end %>
</span>
<span class="memo_reply">
<%=l(:label_reply)%>
(<%= link_to topic.try(:replies_count), topic.event_url %>)
</span>
</div>
</div>
</li>
<% end %>
</ul>
</div>
</div>
<div id="J_Slide" class="d-p-index-box d-p-index-left">
<h3 style="margin-left: 5px; color: #e8770d;"><strong><%=l(:label_current_attendingcontest_work)%></strong></h3>
<div class="d-p-projectlist-box">
<% if Softapplication.count > 0%>
<div class="d-p-projectlist">
<% find_all_hot_softapplication.map do |softapplication| break if(softapplication == find_all_hot_softapplication[5]) %>
<li style="position:relative;height:6em;" class='<%= cycle("odd", "even") %>'>
<div class="avatar-4" style="float: left; margin-top: 7px">
<%= image_tag('/images/app1.png')%>
</div>
<div style="float: left; margin-left: 10px; margin-top: 7px;margin-bottom: -2px; width: 380px;">
<%= link_to(softapplication.name, softapplication_path(softapplication.id), :class => "d-g-blue d-p-project-name", :title => "#{softapplication.name}", :target => "_blank") %>
</div>
<div class='text_nowrap' style="float: left;margin:5px; margin-left: 10px; margin-bottom:1px; width: 380px;">
<div id="J_Slide" class="d-p-index-box d-p-index-left">
<h3 style="margin-left: 5px; color: #e8770d;"><strong><%=l(:label_current_attendingcontest_work)%></strong></h3>
<div class="d-p-projectlist-box">
<% if Softapplication.count > 0%>
<div class="d-p-projectlist">
<% find_all_hot_softapplication.map do |softapplication| break if(softapplication == find_all_hot_softapplication[5]) %>
<li style="position:relative;height:6em;" class='<%= cycle("odd", "even") %>'>
<div class="avatar-4" style="float: left; margin-top: 7px">
<%= image_tag('/images/app1.png')%>
</div>
<div style="float: left; margin-left: 10px; margin-top: 7px;margin-bottom: -2px; width: 380px;">
<%= link_to(softapplication.name, softapplication_path(softapplication.id), :class => "d-g-blue d-p-project-name", :title => "#{softapplication.name}", :target => "_blank") %>
</div>
<div class='text_nowrap' style="float: left;margin:5px; margin-left: 10px; margin-bottom:1px; width: 380px;">
<span class='font_lighter' title =<%=softapplication.description.to_s%>>
<%=softapplication.description.to_s.truncate(50, omission: '...')%>
</span>
</div><br />
</div><br />
<div style="padding-left: 55px; clear: left;">
<div style="padding-left: 55px; clear: left;">
<span class="font_lighter">
<%=l(:label_release_time)%>:&nbsp;
<%=format_time softapplication.created_at %>
</span>
</div>
</div>
</li>
<% end; reset_cycle %>
</li>
<% end; reset_cycle %>
</div>
<% else %>
<p class="font_lighter">
</div>
<% else %>
<p class="font_lighter">
<%= l(:label_no_ftapplication) %>
</p>
<% end %>
</div>
</div>
<% end %>
</div>
</div>
<% else %>
<div id="J_Slide" class="d-p-index-box d-p-index-left">
<h3 style="margin-left: 5px; color: #e8770d;"><strong><%=l(:label_current_attendingcontest_work)%></strong></h3>
<div class="d-p-projectlist-box">
<% if Softapplication.count > 0%>
<div class="d-p-projectlist">
<% find_all_hot_softapplication.map do |softapplication| break if(softapplication == find_all_hot_softapplication[5]) %>
<li style="position:relative;height:6em;" class='<%= cycle("odd", "even") %>'>
<div class="avatar-4" style="float: left; margin-top: 7px">
<%= image_tag('/images/app1.png')%>
</div>
<div style="float: left; margin-left: 10px; margin-top: 7px;margin-bottom: -2px; width: 380px;">
<%= link_to(softapplication.name, softapplication_path(softapplication.id), :class => "d-g-blue d-p-project-name", :title => "#{softapplication.name}", :target => "_blank") %>
</div>
<div class='text_nowrap' style="float: left;margin:5px; margin-left: 10px; margin-bottom:1px; width: 380px;">
<span class='font_lighter' title =<%=softapplication.description.to_s%>>
<%=softapplication.description.to_s.truncate(50, omission: '...')%>
</span>
</div><br />
<div id="J_Slide" class="d-p-index-box d-p-index-Dynamic">
<h3 style="margin-left: 5px; color: #e8770d;">
<strong><%=l(:label_issue_feedback_activities)%></strong>
<%= link_to l(:label_my_question), newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
<%= link_to l(:label_my_feedback), suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
</h3>
<span style="margin-top: -20px;float: right; display: block;"><%= link_to l(:label_more_information), forums_path %></span>
<div class="d-p-projectlist-box">
<ul class="d-p-projectlist">
<% find_new_forum_topics(9 - @contest_notifications.count).each do |topic|%>
<li class="message-brief-intro" style="height: auto; line-height:2em; padding-bottom: 1px; border-bottom: 1px dashed ">
<div style="display: inline-block; width: 100%;">
<div style="padding-left: 55px; clear: left;">
<span class="font_lighter">
<%=l(:label_release_time)%>:&nbsp;
<%=format_time softapplication.created_at %>
</span>
</div>
</li>
<% end; reset_cycle %>
</div>
<% else %>
<p class="font_lighter">
<%= l(:label_no_ftapplication) %>
</p>
<% end %>
</div>
</div>
<div id="J_Slide" class="d-p-index-box d-p-index-Dynamic">
<h3 style="margin-left: 5px; color: #e8770d;">
<strong><%=l(:label_issue_feedback_activities)%></strong>
<%= link_to l(:label_my_question), newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
<%= link_to l(:label_my_feedback), suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
</h3>
<span style="margin-top: -20px;float: right; display: block;"><%= link_to l(:label_more_information), forums_path %></span>
<div class="d-p-projectlist-box">
<ul class="d-p-projectlist">
<% find_new_forum_topics(9 - @contest_notifications.count).each do |topic|%>
<li class="message-brief-intro" style="height: auto; line-height:2em; padding-bottom: 1px; border-bottom: 1px dashed ">
<div style="display: inline-block; width: 100%;">
<span class="memo_activity text_nowrap" style="color:gray; display: inline-block; margin-bottom:6px; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %>
<%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %>
@ -333,11 +416,15 @@
</span>
</div>
</div>
</li>
<% end %>
</ul>
</div>
</div>
</li>
<% end %>
</ul>
</div>
</div>
<% end%>
<div class="clearfix"></div>

@ -57,7 +57,6 @@
</span>
<span class="font_welcome_trustie">
<!--
edit by meng
@course_page.title存储在first_page表中的title字段
原本代码
<%= @course_page.title %>
@ -68,7 +67,6 @@
<% unless @course_page.nil? %>
<span class="font_welcome_trustie">
<!--
edit by meng
@course_page.title存储在first_page表中的title字段
原本代码
<%= @course_page.title %>
@ -77,7 +75,6 @@
</span>
<span class="font_welcome_tdescription">,
<!--
edit by meng
@course_page.description存储在first_page表中的description字段
原本代码
<%= @course_page.description %>

@ -40,7 +40,7 @@
<div class="cl"></div>
<div id='<%=id%>' class="respond-form">
<% if reply_allow %>
<% if journal.jour_type == "Course" %>
<% if journal.jour_type == "Course" || journal.jour_type == "Project" %>
<%= render :partial => "words/new_respond_course", :locals => {:journal => journal, :m_reply_id => m_reply_id,:show_name => show_name} %>
<% else %>
<%= render :partial => "words/new_respond", :locals => {:journal => journal, :m_reply_id => m_reply_id,:show_name => show_name} %>

@ -10,6 +10,6 @@
<%= hidden_field_tag 'show_name',params[:show_name],:value => show_name.nil? ? true : show_name %>
<%= submit_tag l(:button_feedback_respond), :name => nil ,
:class => "enterprise",
:style => "float: right; margin-top: 1px; margin-right: 4px;"%>
:style => "float: right; margin-top: 1px; margin-right: 4px;margin-bottom: 5px;"%>
<% end %>

@ -188,6 +188,7 @@ zh:
field_priority: 优先级
field_done_ratio: "% 完成"
field_is_private: 私有
field_is_private_tips: (设置为“私有”后本问题将仅对项目成员可见)
field_watcher: 跟踪者
label_relates_to: 关联到
label_duplicates: 重复

@ -257,10 +257,10 @@ K.options = {
minHeight : 100,
minChangeSize : 50,
zIndex : 811213,
items : [ 'emoticons','code',
items : [ 'emoticons',
'source','plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', '|',
'formatblock', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
'italic', 'underline', 'removeformat', '|','imagedirectupload','table', 'link'
'italic', 'underline', 'removeformat', '|','imagedirectupload','table', 'link', 'fullscreen',"more"
],
noDisableItems : ['source', 'fullscreen'],
colorTable : [
@ -3909,10 +3909,15 @@ _extend(KToolbar, KWidget, {
});
},
get : function(name) {
if (this._itemMap[name]) {
return this._itemMap[name];
}
return (this._itemMap[name] = K('span.ke-icon-' + name, this.div).parent());
// if (this._itemMap[name]) {
// return this._itemMap[name];
// }
if($("#define").css('display') == 'block'){
pdiv = $("#define")
}else if($("#full").css('display') == 'block'){
pdiv = $("#full")
}
return (this._itemMap[name] = K('span.ke-icon-' + name, pdiv).parent());
},
select : function(name) {
_selectToolbar.call(this, name, function(knode) {
@ -4915,6 +4920,7 @@ KEditor.prototype = {
self.srcElement.before(container);
}
var toolbarDiv = K('.toolbar', container),
toolBarDivFull = K('.toolbar', container),
editDiv = K('.edit', container),
statusbar = self.statusbar = K('.statusbar', container);
container.removeClass('container')
@ -4959,9 +4965,36 @@ KEditor.prototype = {
htmlList.push('<span class="ke-toolbar-icon ke-toolbar-icon-url ke-icon-' + name + '" unselectable="on"></span></span>');
}
});
htmlList.unshift('<div style="display:block" id="define"/>')
htmlList.push('</div>')
var htmlListFull = [];
var fullItems = [
'emoticons',
'source','plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', '|',
'formatblock', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
'italic', 'underline', 'removeformat', '|','imagedirectupload','table', 'link', 'fullscreen',"less",
'/',
'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'plainpaste',
'justifyfull', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
'superscript', 'clearhtml', 'quickformat', 'selectall', 'fontname',
'strikethrough', 'lineheight', '|', 'imagedirectupload', 'hr', 'pagebreak',
'anchor', 'unlink'
]
K.each(fullItems, function(i, name) {
if (name == '|') {
htmlListFull.push('<span class="ke-inline-block ke-separator"></span>');
} else if (name == '/') {
htmlListFull.push('<div class="ke-hr"></div>');
} else {
htmlListFull.push('<span class="ke-outline" data-name="' + name + '" title="' + self.lang(name) + '" unselectable="on">');
htmlListFull.push('<span class="ke-toolbar-icon ke-toolbar-icon-url ke-icon-' + name + '" unselectable="on"></span></span>');
}
});
htmlListFull.unshift('<div style="display:none" id="full"/>')
htmlListFull.push('</div>')
var toolbar = self.toolbar = _toolbar({
src : toolbarDiv,
html : htmlList.join(''),
html : htmlList.join('')+htmlListFull.join(''),
noDisableItems : self.noDisableItems,
click : function(e, name) {
e.stop();
@ -4975,6 +5008,7 @@ KEditor.prototype = {
self.clickToolbar(name);
}
});
var editHeight = _removeUnit(height) - toolbar.div.height();
var edit = self.edit = _edit({
height : editHeight > 0 && _removeUnit(height) > self.minHeight ? editHeight : self.minHeight,
@ -5306,8 +5340,9 @@ KEditor.prototype = {
createMenu : function(options) {
var self = this,
name = options.name,
knode = self.toolbar.get(name),
knode = self.toolbar.get(name),
pos = knode.pos();
options.x = pos.x;
options.y = pos.y + knode.height();
options.z = self.options.zIndex;
@ -5992,4 +6027,5 @@ _plugin('core', function(K) {
});
});
});
})(window);

@ -9,6 +9,8 @@
KindEditor.lang({
imagedirectupload:'本地图片',
more: '切换到更多功能',
less: '切换到简单功能',
source : 'HTML代码',
preview : '预览',
undo : '后退(Ctrl+Z)',

@ -0,0 +1,15 @@
KindEditor.plugin('less', function(K) {
var self = this, name = 'less';
self.plugin.less = {
click : function(){
if($("#define").css('display') == 'block'){
$("#define").css('display','none')
$("#full").css('display','block')
}else if($("#full").css('display') == 'block'){
$("#full").css('display','none')
$("#define").css('display','block')
}
}
}
self.clickToolbar(name,self.plugin.less.click)
});

@ -0,0 +1,15 @@
KindEditor.plugin('more', function(K) {
var self = this, name = 'more';
self.plugin.more = {
click : function(){
if($("#define").css('display') == 'block'){
$("#define").css('display','none')
$("#full").css('display','block')
}else if($("#full").css('display') == 'block'){
$("#full").css('display','none')
$("#define").css('display','block')
}
}
}
self.clickToolbar(name,self.plugin.more.click)
});

@ -243,6 +243,11 @@
width: 16px;
height: 16px;
}
.ke-icon-more {
background-position: 0px -672px;
width: 16px;
height: 16px;
}
.ke-icon-plainpaste {
background-position: 0px -704px;
width: 16px;
@ -328,6 +333,11 @@
width: 16px;
height: 16px;
}
.ke-icon-less {
background-position: 0px -976px;
width: 16px;
height: 16px;
}
.ke-icon-baidumap {
background-position: 0px -976px;
width: 16px;

@ -59,6 +59,29 @@ function show_more_msg() {
}
}
//项目版本库git帮助文档显示
function showhelpAndScrollTo(id, focus) {
var information = $("#showgithelp");
var val = information.attr("value");
if (val == "show_help") {
$("#showgithelp").text("收起Git操作指南");
information.attr("value", "hide_help");
$('#' + id).show();
if (focus !== null) {
$('#' + focus).focus();
}
$('html, body').animate({scrollTop: $('#' + id).offset().top}, 400);
}
else {
$("#showgithelp").text("显示Git操作指南");
information.attr("value", "show_help");
$('#' + id).hide();
}
}
///////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////项目讨论区
function regexSubject() {
@ -191,27 +214,22 @@ function project_setting(n) {
}
//配置-验证项目名称
function regex_project_name()
{
function regex_project_name() {
var name = $.trim($("#project_name").val());
if(name.length == 0)
{
if (name.length == 0) {
$("#project_name_notice").show();
return false;
}
else
{
else {
$("#project_name_notice").hide();
return true;
}
}
//配置-信息提交
function submit_edit_project(id)
{
if(regex_project_name())
{
$("#edit_project_"+id).submit();
function submit_edit_project(id) {
if (regex_project_name()) {
$("#edit_project_" + id).submit();
}
}
@ -233,12 +251,13 @@ $(document).ready(function () {
//issue_project_id
});
function showAndScrollTo(id, focus) {
$('#' + id).show();
if (focus !== null) {
function showAndScrollTo(id, focus) {
$('#' + id).show();
if (focus !== null) {
$('#' + focus).focus();
}
$('html, body').animate({scrollTop: $('#' + id).offset().top}, 400);
}
$('html, body').animate({scrollTop: $('#' + id).offset().top}, 400);
/*缺陷完成度决定缺陷状态*/
@ -287,7 +306,4 @@ function showAndScrollTo(id, focus) {
$("pre").addClass("break_word");
}
});
}
});

@ -118,7 +118,7 @@ a:hover.ping_sub{ background:#14a8b9;}
.ping_dispic img{ height:46px; width:46px;}
.ping_discon{ float:left; width:350px; margin-left:15px;}
.ping_distop span{ float:left;}
.ping_distop p{ color:#5f5f5f;}
.ping_distop p{ color:#5f5f5f;min-height: 24px;}
.ping_disfoot a{ float:right; color:#15bccf; margin-left:5px;}
.ping_distop span a{ float:right; /*width:20px;*/ height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}

@ -177,7 +177,9 @@ a:hover.upload_btn_grey{background:#8a8a8a;}
a.link_file{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-left:20px; color:#64bdd9; }
a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;}
.r_txt_tit{width:510px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf; float:left; color:#09658c; font-size:14px;}
/* 版本库展示Git操作文档 */
.repos_more{height:23px; width:100%; border:1px solid #CCC; background:#F6F6F6; text-align:center; font-size:12px; padding-top:2px;}
.lh23{line-height: 23px;}
/* 弹框 新样式还没设计出来,暂时用的课程那边的样式 */
.alert .close{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-502px;background:url(images/close.png) no-repeat;cursor:pointer;}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save