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

Conflicts:
	Gemfile
	app/views/attachments/_form.html.erb
This commit is contained in:
guange 2015-03-19 17:41:45 +08:00
commit e007920cb6
277 changed files with 14022 additions and 681 deletions

View File

@ -1,6 +1,5 @@
source 'http://ruby.taobao.org'
#source 'http://ruby.sdutlinux.org/'
#
unless RUBY_PLATFORM =~ /w32/
# unix-like only
@ -24,6 +23,7 @@ gem 'ruby-ole'
#gem 'email_verifier', path: 'lib/email_verifier'
gem 'rufus-scheduler'
#gem 'dalli', path: 'lib/dalli-2.7.2'
gem 'rails_kindeditor'
group :development do
gem 'grape-swagger'
#gem 'grape-swagger-ui', git: 'https://github.com/guange2015/grape-swagger-ui.git'

View File

@ -2,6 +2,7 @@
module Mobile
module Apis
class Comments < Grape::API
include ApplicationHelper
resource :comments do
desc '课程通知评论'
params do
@ -82,8 +83,8 @@ module Mobile
memo: {:subject => params[:subject],:content => '该贴来自手机App意见反馈'},
}
cs = CommentService.new
memo = cs.create_feedback cs_params, current_user
raise "commit failed #{memo.errors.full_messages}" if memo.new_record?
memo,message = cs.create_feedback cs_params, current_user
raise message if memo.new_record?
present :status, 0
end

View File

@ -82,7 +82,7 @@ module Mobile
desc "用户搜索"
params do
requires :name, type: String, desc: '用户名关键字'
requires :search_by, type: String,desc: '搜索依据0 昵称1 用户名2 邮箱'
requires :search_by, type: String,desc: '搜索依据0 昵称1 用户名2 邮箱,3 昵称和姓名'
end
get 'search/search_user' do
us = UsersService.new

View File

@ -15,6 +15,8 @@ module Mobile
course_dynamic_expose :type
course_dynamic_expose :count
course_dynamic_expose :course_name
course_dynamic_expose :course_term
course_dynamic_expose :course_time
course_dynamic_expose :course_id
course_dynamic_expose :course_img_url
course_dynamic_expose :message

View File

@ -0,0 +1,40 @@
class DiscussDemosController < ApplicationController
def index
@discuss_demo_list = DiscussDemo.where("body is not null").order("created_at desc").page(params[:page] || 1).per(10)
end
def new
@discuss_demo = DiscussDemo.create
@discuss_demo.save!
@discuss_demo
end
def create
end
def update
@discuss_demo = DiscussDemo.find(params[:id])
@discuss_demo.update_attributes(:title => params[:discuss_demo][:title],:body => params[:discuss_demo][:body])
redirect_to :controller=> 'discuss_demos',:action => 'show',:id => params[:id]
end
def delete
end
def destroy
asset = Kindeditor::Asset.find_by_owner_id(params[:id])
filepath = File.join(Rails.root,"public","files","uploads",
asset[:created_at].to_s.gsub("+0800","").to_datetime.strftime("%Y%m").to_s,
asset[:asset].to_s)
File.delete(filepath) if File.exist?filepath
DiscussDemo.destroy(params[:id])
redirect_to :controller=> 'discuss_demos',:action => 'index'
end
def show
@discuss_demo = DiscussDemo.find(params[:id])
end
end

View File

@ -91,6 +91,7 @@ class DocumentsController < ApplicationController
def update
@document.safe_attributes = params[:document]
@document.save_attachments(params[:attachments])
if request.put? and @document.save
flash[:notice] = l(:notice_successful_update)
redirect_to document_url(@document)

View File

@ -20,7 +20,7 @@ class ForumsController < ApplicationController
#@memo.author_id = User.current.id
#@forum = @memo.forum
cs = CommentService.new
@memo = cs.create_feedback params,User.current
@memo,message = cs.create_feedback params,User.current
respond_to do |format|
if !@memo.new_record?
format.html { redirect_to forum_path(@memo.forum) }

View File

@ -162,7 +162,7 @@ class IssuesController < ApplicationController
respond_to do |format|
format.html {
render_attachment_warning_if_needed(@issue)
flash[:notice] = l(:notice_issue_successful_create, :id => view_context.link_to("#{@issue.source_from}", issue_path(@issue), :title => @issue.subject))
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))
if params[:continue]
attrs = {:tracker_id => @issue.tracker, :parent_issue_id => @issue.parent_issue_id}.reject {|k,v| v.nil?}

View File

@ -109,7 +109,7 @@ class MembersController < ApplicationController
end
if params[:flag]
unless members.present? && members.all? {|m| m.valid? }
flash[:error] = members.collect {|m| m.errors.full_messages}.flatten.uniq.join(', ')
flash[:error] = members.empty? ? l(:label_user_role_null) :members.collect {|m| m.errors.full_messages}.flatten.uniq.join(', ')
else
flash[:notice] = l(:label_invite_success)
end

View File

@ -340,6 +340,7 @@ class ProjectsController < ApplicationController
@is_zhuce =false
flash[:notice] = l(:notice_email_sent, :value => email)
else
flash[:error] = l(:notice_registed_success, :value => email)
@is_zhuce = true
end
respond_to do |format|

View File

@ -20,7 +20,7 @@ class WelcomeController < ApplicationController
include WelcomeHelper
helper :project_score
caches_action :robots
before_filter :find_first_page, :only => [:index]
#before_filter :find_first_page, :only => [:index]
# before_filter :fake, :only => [:index, :course]
before_filter :entry_select, :only => [:index]

View File

@ -60,4 +60,8 @@ module ApiHelper
end
[count,is_teacher]
end
def get_user_language user
(user.language.nil? || user.language == "") ? 'zh':user.language
end
end

View File

@ -355,7 +355,7 @@ module CoursesHelper
# 课程time+term简写2014.春/2014.秋)国际化输出
def get_course_term course
strterm = course.try(:term).to_s
if !(User.current.language == 'zh')
if !(User.current.language == 'zh'||User.current.language == '')
strterm == '春季学期' ? strterm = 'spring term' : strterm = 'autumn term'
str = ( course.try(:time).to_s << '.' << strterm )
str[0..-6]
@ -369,7 +369,7 @@ module CoursesHelper
# 课程term春季学期/秋季学期)国际化输出
def get_course_term_locales course
str = course.try(:term).to_s
if !(User.current.language == 'zh')
if !(User.current.language == 'zh'||User.current.language == '')
str == '春季学期' ? str = ' ' + 'spring term' : str = ' ' + 'autumn term'
end
return str

View File

@ -0,0 +1,2 @@
module DiscussDemosHelper
end

View File

@ -43,7 +43,7 @@ module WatchersHelper
)
method = watched ? 'delete' : 'post'
link_to text, url, :remote => true, :method => method, :class => css
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"
end
############## added by linchun
@ -278,11 +278,11 @@ module WatchersHelper
)
method = applied ? 'delete' : 'post'
link_to text, url, :remote => true, :method => method ,:class=>css
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"
end
def exit_project_link(project)
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: 22px; line-height: 22px; background: none repeat scroll 0% 0% #64BDD9; TES" )
: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;" )
end
end

View File

@ -0,0 +1,4 @@
class DiscussDemo < ActiveRecord::Base
attr_accessible :title, :body
has_many_kindeditor_assets :assets, :dependent => :destroy
end

View File

@ -0,0 +1,15 @@
class Kindeditor::Asset < ActiveRecord::Base
self.table_name = 'kindeditor_assets'
mount_uploader :asset, Kindeditor::AssetUploader
validates_presence_of :asset
before_save :update_asset_attributes
attr_accessible :asset
private
def update_asset_attributes
if asset.present? && asset_changed?
self.file_size = asset.file.size
self.file_type = asset.file.content_type
end
end
end

View File

@ -0,0 +1,3 @@
class Kindeditor::File < Kindeditor::Asset
mount_uploader :asset, Kindeditor::FileUploader
end

View File

@ -0,0 +1,3 @@
class Kindeditor::Flash < Kindeditor::Asset
mount_uploader :asset, Kindeditor::FlashUploader
end

View File

@ -0,0 +1,3 @@
class Kindeditor::Image < Kindeditor::Asset
mount_uploader :asset, Kindeditor::ImageUploader
end

View File

@ -0,0 +1,3 @@
class Kindeditor::Media < Kindeditor::Asset
mount_uploader :asset, Kindeditor::MediaUploader
end

View File

@ -214,6 +214,8 @@ class User < Principal
where(" LOWER(login) LIKE '#{pattern}' ")
elsif type == "1"
where(" LOWER(concat(lastname, firstname)) LIKE '#{pattern}' ")
elsif type == "3"
where(" LOWER(concat(lastname, firstname,login)) LIKE '#{pattern}' ")
else
where(" LOWER(mail) LIKE '#{pattern}' ")
end

View File

@ -32,40 +32,42 @@ class UserExtensions < ActiveRecord::Base
def get_brief_introduction
return self.brief_introduction
end
# added by meng
def show_identity
if self.identity == 0
if User.current.language == 'zh'
user_identity = '教师'
else
user_identity = 'Teacher'
end
elsif self.identity == 1
if User.current.language == 'zh'
user_identity = '学生'
else
user_identity = 'Student'
end
elsif self.identity == 2
if User.current.language == 'zh'
user_identity = '企业'
else
user_identity = 'Enterprise'
end
elsif self.identity == 3
if User.current.language == 'zh'
user_identity = '开发者'
else
user_identity = 'Developer'
if User.current.language == 'zh'||User.current.language == ''
case self.identity
when 0
user_identity = l(:label_account_identity_teacher)
when 1
user_identity = l(:label_account_identity_student)
when 2
user_identity = l(:label_account_identity_enterprise)
when 3
user_identity = l(:label_account_identity_developer)
else
user_identity = ''
end
else
user_identity = ''
case self.identity
when 0
user_identity = l(:label_account_identity_teacher)
when 1
user_identity = l(:label_account_identity_student)
when 2
user_identity = l(:label_account_identity_enterprise)
when 3
user_identity = l(:label_account_identity_developer)
else
user_identity = ''
end
end
return user_identity
end
# end
# end
def self.introduction(user, message)
unless user.user_extensions.nil?
info = user.user_extensions

View File

@ -1,4 +1,6 @@
class CommentService
include ApiHelper
include Redmine::I18n
#评论
def news_comments params,current_user
@news = News.find(params[:id])
@ -84,7 +86,8 @@ class CommentService
@memo.forum_id = "1"
@memo.author_id = current_user.id
@memo.save
@memo
message = "#{l(:label_commit_failed,:locale => get_user_language(current_user))}: #{@memo.errors.full_messages}" if @memo.new_record?
[@memo,message]
end
#课程留言列表

View File

@ -38,7 +38,7 @@ class CoursesService
if name.blank?
raise 'sumbit empty'
end
@courses = courses_all.visible
@courses = courses_all.visible(current_user)
if params[:name].present?
@courses_all = @courses.like(params[:name])
else
@ -346,7 +346,7 @@ class CoursesService
membership = @user.coursememberships.all(:conditions => Course.visible_condition(current_user))
end
if membership.nil? || membership.count == 0
raise l(:label_no_courses,:locale => current_user.language.nil? ? 'zh':current_user.language)
raise l(:label_no_courses,:locale => get_user_language(current_user))
end
membership.sort! {|older, newer| newer.created_on <=> older.created_on }
result = []
@ -355,19 +355,19 @@ class CoursesService
latest_course_dynamics = []
latest_news = course.news.order("created_on desc").first
unless latest_news.nil?
latest_course_dynamics << {:type => 1,:time => latest_news.created_on,:message => l(:label_recently_updated_notification,:locale => current_user.language.nil? ? 'zh':current_user.language)}
latest_course_dynamics << {:type => 1,:time => latest_news.created_on,:message => l(:label_recently_updated_notification,:locale => get_user_language(current_user))}
end
latest_message = course.journals_for_messages.order("created_on desc").first
unless latest_message.nil?
latest_course_dynamics << {:type => 2,:time => latest_message.created_on,:message => l(:label_recently_updated_message,:locale => current_user.language.nil? ? 'zh':current_user.language)}
latest_course_dynamics << {:type => 2,:time => latest_message.created_on,:message => l(:label_recently_updated_message,:locale => get_user_language(current_user))}
end
latest_attachment = course.attachments.order("created_on desc").first
unless latest_attachment.nil?
latest_course_dynamics << {:type => 3,:time => latest_attachment.created_on,:message => l(:label_recently_updated_courseware,:locale => current_user.language.nil? ? 'zh':current_user.language)}
latest_course_dynamics << {:type => 3,:time => latest_attachment.created_on,:message => l(:label_recently_updated_courseware,:locale => get_user_language(current_user))}
end
latest_bid = course.homeworks.order('updated_on DESC').first
unless latest_bid.nil?
latest_course_dynamics << {:type => 4,:time => latest_bid.updated_on,:message => l(:label_recently_updated_homework,:locale => current_user.language.nil? ? 'zh':current_user.language)}
latest_course_dynamics << {:type => 4,:time => latest_bid.updated_on,:message => l(:label_recently_updated_homework,:locale => get_user_language(current_user))}
end
#每个作业中的最新留言
messages = []
@ -382,7 +382,7 @@ class CoursesService
end
latest_bid_message = messages.first
unless latest_bid_message.nil?
latest_course_dynamics << {:type => 4,:time => latest_bid_message.created_on,:message => l(:label_recently_updated_message,:locale => current_user.language.nil? ? 'zh':current_user.language)}
latest_course_dynamics << {:type => 4,:time => latest_bid_message.created_on,:message => l(:label_recently_updated_message,:locale => get_user_language(current_user))}
end
#每个作业中学生最后提交的作业
homeworks = []
@ -397,12 +397,12 @@ class CoursesService
end
latest_homework_attach = homeworks.first
unless latest_homework_attach.nil?
latest_course_dynamics << {:type => 4,:time => latest_homework_attach.updated_at,:message => l(:label_recently_updated_homework,:locale => current_user.language.nil? ? 'zh':current_user.language)}
latest_course_dynamics << {:type => 4,:time => latest_homework_attach.updated_at,:message => l(:label_recently_updated_homework,:locale => get_user_language(current_user))}
end
latest_course_dynamics.sort!{|order,newer| newer[:time] <=> order[:time]}
latest_course_dynamic = latest_course_dynamics.first
unless latest_course_dynamic.nil?
result << {:course_name => course.name,:course_id => course.id,:course_img_url => url_to_avatar(course),:type => latest_course_dynamic[:type],:update_time => latest_course_dynamic[:time],:message => latest_course_dynamic[:message],:count => nil}
result << {:course_name => course.name,:course_id => course.id,:course_img_url => url_to_avatar(course),:course_time => course.time,:course_term => course.term,:type => latest_course_dynamic[:type],:update_time => latest_course_dynamic[:time],:message => latest_course_dynamic[:message],:count => nil}
end
end
result.sort!{|order,newer| newer[:update_time] <=> order[:update_time]}

View File

@ -193,7 +193,6 @@ class UsersService
@current_user.save
#raise @current_user.errors.full_message
#return @current_user
else
raise 'wrong password'
end

View File

@ -1,5 +1,22 @@
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
<% if defined?(container) && container && container.saved_attachments %>
<% container.attachments.each_with_index do |attachment, i| %>
<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}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
<span class="ispublic-label"><%= l(:field_is_public)%>:</span>
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
<%= if attachment.id.nil?
#待补充代码
else
link_to('&nbsp;'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload')
end
%>
<%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
</span>
<% end %>
<% container.saved_attachments.each_with_index do |attachment, i| %>
<span id="attachments_p<%= i %>" class="attachment">
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%>
@ -31,7 +48,7 @@
<span class="add_attachment" style="font-weight:normal;">
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
<%= button_tag "浏览", :type=>"button", :onclick=>"_file.click()",:onmouseover => 'this.focus()', :style => ie8? ? 'display:none' : '' %>
<%= button_tag l(:button_browse), :type=>"button", :onclick=>"_file.click()",:onmouseover => 'this.focus()', :style => ie8? ? 'display:none' : '' %>
<%= file_field_tag 'attachments[dummy][file]',
:id => '_file',
:class => 'file_selector',

View File

@ -38,7 +38,7 @@
<span class="add_attachment">
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
<%= button_tag "浏览", :type=>"button", :onclick=>"_file.click()" %>
<%= button_tag l(:button_browse), :type=>"button", :onclick=>"_file.click()" %>
<%= file_field_tag 'attachments[dummy][file]',
:id => '_file',
:class => 'file_selector',

View File

@ -1,7 +1,7 @@
$('#attachments_<%= j params[:attachment_id] %>').remove();
var count=$('#attachments_fields>span').length;
if(count<=0){
$("#upload_file_count").text("未上传文件");
$("#upload_file_count").text(<%= l(:label_no_file_uploaded)%>);
$(".remove_all").remove();
}else{
$("#upload_file_count").html("已上传"+"<span id=\"count\">"+count+"</span>"+"个文件");

View File

@ -24,10 +24,6 @@
</div>
<!--display the board-->
<div class="project_r_h">
<h2 class="project_h2"><%= h @board.name %></h2>
</div>
<% if !User.current.logged? %>
<div style="font-size: 14px;margin:20px;">
<% if @project.project_type == 1 %>
@ -39,62 +35,52 @@
<hr/>
</div>
<% end %>
<div class="borad-setitle">
<span class="borad-topic-count">
共有
<%= link_to @topic_count,:controller => 'boards',:action => 'index' %>
个贴子
</span>
<% if @project.enabled_modules.where("name = 'boards'").count > 0 && User.current.member_of?(@project) %>
<span>
<%= link_to l(:label_message_new),
new_board_message_path(@board),
:class => 'icon icon-add',
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %>
</span>
<% end %>
</div>
<div style="width: 100%;word-break: break-all;word-wrap: break-word;">
<% if @topics.any? %>
<% @topics.each do |topic| %>
<table class="content-text-list">
<tr>
<td colspan="2" valign="top" width="50">
<%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) %>
</td>
<td>
<table width="640px" border="0">
<tr>
<td valign="top" width="500px" class=" <%= topic.sticky? ? 'sticky' : '' %>
<%= topic.locked? ? 'locked' : '' %>">
<%= link_to h(topic.subject.truncate(40,ommision:'...')), board_message_path(@board, topic),title:topic.subject.to_s %>
</td>
<td align="right" rowspan="3">
<table class="borad-count">
<tr>
<td align="center" class="borad-count-digit"><%= link_to (topic.replies_count), board_message_path(@board, topic) %></td>
</tr>
<tr>
<td align="center">回答</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="left" colspan="2">
<span class="font_lighter"><%= authoring topic.created_on, topic.author %><br/></span></td>
</tr>
</table>
</td>
</tr>
</table>
<% end %>
<div class="pagination">
<%= pagination_links_full @topic_pages, @topic_count %>
</div>
<!-- 内容显示部分 -->
<div class="project_right">
<div class="project_r_h">
<h2 class="project_h2"><%= h @board.name %></h2>
</div>
<div class="talk_top">
<div class="fl">项目讨论区共有<span><%= @topic_count %></span>个帖子 </div>
<% if @project.enabled_modules.where("name = 'boards'").count > 0 && User.current.member_of?(@project) %>
<span><%= link_to l(:label_message_new), new_board_message_path(@board),
:class => 'problem_new_btn fl',
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %></span>
<% end %>
<div class="cl"></div>
</div>
<!-- 帖子内容显示 -->
<% if @topics.any? %>
<% @topics.each do |topic| %>
<div class="problem_main">
<a>
<%= link_to image_tag(url_to_avatar(topic.author), :class => "problem_pic talk_pic fl"), user_path(topic.author) %>
</a>
<div class="talk_txt fl">
<div>
<span><%= link_to h(topic.subject), board_message_path(@board, topic), title:topic.subject.to_s, :class =>"problem_tit fl" %></span>
<% if topic.sticky? %>
<span class="talk_up">置顶</span>
<% end %>
</div>
<div class="problem_line">
<span>由<%= link_to topic.author, user_path(topic.author), :class =>"problem_name" %></span>
<span>添加于<%= format_time topic.created_on %></span>
</div>
</div>
<span class="talk_btn fr">回复<%= link_to (topic.replies_count), board_message_path(@board, topic), :style =>"color:#fff;" %></span>
<div class="cl"></div>
</div><!--讨论主类容 end-->
<% end %>
<ul class="wlist">
<%= pagination_links_full @topic_pages, @topic_count, :per_page_links => false, :remote => false, :flag => true %>
</ul>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
<!--讨论主类容 end-->
<div class="cl"></div>
</div>
<% other_formats_links do |f| %>

View File

@ -0,0 +1,25 @@
<h1 style="">文章列表</h1>
<div>
<table border="1px solid !important" >
<% @discuss_demo_list.each do |e| %>
<tr align="left" height="20">
<td width="30%" ><%= truncate(e.title,:length => 50) %></td>
<td align="center" width="60%">
<%= truncate(e.body,:length => 50) %> &nbsp;
</td>
<td style=" margin-right: 1" width="10%">
<%= link_to '查看文章',{:controller => 'discuss_demos',:action => 'show',:id=>e.id} %>
</td>
<td>
&nbsp;&nbsp;
<%= link_to '删除文章',discuss_demo_path(e.id), :method => :delete,:confirm => l(:text_are_you_sure) %>
</td>
</tr>
<tr height="20"></tr>
<tr height="20"></tr>
<% end %>
</table>
<% paginate @discuss_demo_list %>
<%= link_to '新建文章',new_discuss_demo_path %>
</div>

View File

@ -0,0 +1,7 @@
<%= javascript_include_tag src='/assets/kindeditor/kindeditor' %>
<h1>新建文章</h1>
<%= form_for @discuss_demo,:url => {:controller => 'discuss_demos',:action => "show",:id =>@discuss_demo.id, :method => :put} do |f| %>
<%= f.text_field :title %>
<%= f.kindeditor :body ,:owner_id => @discuss_demo.id%>
<%= f.submit :value=> '提交' %>
<% end %>

View File

@ -0,0 +1,3 @@
<h1><%= @discuss_demo.title %></h1>
<%= textAreailizable @discuss_demo.body %>
<%=link_to "返回首页",discuss_demos_path %>

View File

@ -11,8 +11,8 @@
<%= wikitoolbar_for 'document_description' %>
<% if @document.new_record? %>
<div class="box tabular">
<p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form', :locals => {:container => @document} %></p>
</div>
<% end %>

View File

@ -1,4 +1,6 @@
<h3><%=l(:label_document)%></h3>
<div class="project_r_h">
<h2 class="project_h2"><%=l(:label_document_plural)%></h2>
</div>
<%= labelled_form_for @document do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>

View File

@ -8,10 +8,10 @@
<table>
<tr>
<% if versions.any? %>
<td><p><%= l(:field_version) %></p></td>
<td><p style="padding-left: 50px;"><%= l(:field_version) %></p></td>
<td>
<%= select_tag "version_id", content_tag('option', '') +
options_from_collection_for_select(versions, "id", "name"), {style: 'width:100px'} %>
options_from_collection_for_select(versions, "id", "name"), {style: 'width:230px'} %>
</td>
<% if attachmenttypes.any? %>
<td><%= l(:attachment_type) %></label></td>
@ -31,14 +31,10 @@
<% end %>
</p>
<% end %>
</tr>
</table>
<p style="padding-left: 54px;"> <%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form', locals: {project: project} %></p>
</p>
<p><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form', locals: {project: project} %></p>
</div>
<%= submit_tag l(:button_add) %>
<% end %>

View File

@ -1,7 +1,7 @@
<% attachmenttypes = @project.attachmenttypes %>
<% sufixtypes = @project.contenttypes %>
<div class="project_r_h">
<h2 class="project_h2">资源共享区</h2>
<h2 class="project_h2"><%= l(:lable_file_sharingarea) %></h2>
</div>
<div class="content-title-top">
@ -16,12 +16,12 @@
</div>
<div id="relation_file_div" class="relation_file_div hidden">
<fieldset>
<legend>搜索</legend>
<legend><%= l(:label_search)%></legend>
<%= form_tag(
attachments_autocomplete_path(:format => 'js'),
:remote => true,
:method => :post) do %>
<%= label_tag(:attach_search, "按关键字搜索:") %>
<%= label_tag(:attach_search, l(:label_search_by_keyword)) %>
<%= text_field_tag(:attach_search) %>
<%#= submit_tag("Search") %>
<% end -%>

View File

@ -16,8 +16,8 @@
<tr>
<%= sort_header_tag('filename', :caption => l(:field_filename), :scope => "col", :id => "vzebra-adventure",:class => "tableth") %>
<%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc', :scope => "col", :id => "vzebra-children",:class => "tableth") %>
<%= sort_header_tag('attach_type', :caption => l(:attachment_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype",:class => "tableth") %>
<%= content_tag('th', l(:attachment_sufix_browse), id: 'vzebra-contenttype', class: 'tableth', style: 'color: black')%>
<%= sort_header_tag('attach_type', :caption => l(:field_filecontenttype), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype",:class => "tableth") %>
<%= content_tag('th', l(:field_filetype), id: 'vzebra-contenttype', class: 'tableth', style: 'color: black')%>
<%= sort_header_tag('field_file_dense', :caption => l(:field_file_dense), :default_order => 'desc', :scope => "col", :id => "vzebra-field_file_dense",:class => "tableth") %>
<%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action",:class => "tableth") %>
<%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children",:class => "tableth") %>
@ -73,7 +73,7 @@
<div class="tags_gradint"></div>
</div>
<div class="read-more hidden">
<a href="javascript:void(0);" onclick="readmore(this);"> 更多 </a>
<a href="javascript:void(0);" onclick="readmore(this);"> <%= l(:button_more)%> </a>
</div>
</td>
</tr>

View File

@ -15,8 +15,8 @@
<tr>
<%= sort_header_tag('filename', :caption => l(:field_filename), :scope => "col", :id => "vzebra-adventure" ,:class => "tableth") %>
<%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc', :scope => "col", :id => "vzebra-children",:class => "tableth") %>
<%= sort_header_tag('attach_type', :caption => l(:attachment_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype",:class => "tableth") %>
<%= content_tag('th', l(:attachment_sufix_browse), id: 'vzebra-contenttype', class: 'tableth', style: 'color: black')%>
<%= sort_header_tag('attach_type', :caption => l(:field_filecontenttype), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype",:class => "tableth") %>
<%= content_tag('th', l(:field_filetype), id: 'vzebra-contenttype', class: 'tableth', style: 'color: black')%>
<%= sort_header_tag('field_file_dense', :caption => l(:field_file_dense), :default_order => 'desc', :scope => "col", :id => "vzebra-field_file_dense",:class => "tableth") %>
<%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action",:class => "tableth") %>
<%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children",:class => "tableth") %>
@ -76,7 +76,7 @@
<div class="tags_gradint"></div>
</div>
<div class="read-more hidden">
<a href="javascript:void(0);" onclick="readmore(this);"> 更多 </a>
<a href="javascript:void(0);" onclick="readmore(this);"> <%= l(:button_more)%> </a>
</div>
</td>
</tr>

View File

@ -12,7 +12,7 @@
<% 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_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>

View File

@ -1,139 +0,0 @@
<div class="project_r_h">
<h2 class="project_h2">问题跟踪</h2>
</div>
<div class="problem_top">
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
<span>
<% if User.current.member_of?(@project) %>
<%= link_to l(:label_issue_new), {:controller => 'issues', :action => 'new', :copy_from => nil}, :param => :project_id, :caption => :label_issue_new,
:html => {:accesskey => Redmine::AccessKeys.key_for(:new_issue)}, :class => 'icon icon-add' %>
<% end %>
<%= link_to l(:label_query), '#', :class => 'icon icon-help',
:onclick => '$("#custom_query").slideToggle(400); ' if true || User.current.logged? %>
</span>
<% 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>
</div>
<div class="contextual">
<% if !@query.new_record? && @query.editable_by?(User.current) %>
<%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
<%= delete_link query_path(@query) %>
<% end %>
</div>
<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
<div style="clear:right; ">
<%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project}, :method => :get, :id => 'query_form', :class => 'query_form') do %>
<%= hidden_field_tag 'set_filter', '1' %>
<div id="custom_query" class="custom_query" style="display: <%= !params[:utf8].blank? ? 'block' : 'none' %>;">
<span>---<%= l :label_query_new %>---</span>
<div id="query_form_content" class="hide-when-print">
<fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
<legend onclick="toggleFieldset(this);">
<%= l(:label_issue_query_condition) %>
</legend>
<div style="<%= @query.new_record? ? "" : "display: none;" %>">
<%= render :partial => 'queries/filters', :locals => {:query => @query} %>
</div>
</fieldset>
<!--
<fieldset class="collapsible collapsed">
<legend onclick="toggleFieldset(this);">
<%= l(:label_options) %>
</legend>
<div style="display: none;">
<table>
<tr>
<td><%= l(:field_column_names) %></td>
<td><%= render_query_columns_selection(@query) %></td>
</tr>
<tr>
<td><label for='group_by'><%= l(:field_group_by) %></label></td>
<td><%= select_tag('group_by', options_for_select([[]] + @query.groupable_columns.collect { |c| [c.caption, c.name.to_s] }, @query.group_by)) %></td>
</tr>
<tr>
<td><%= l(:button_show) %></td>
<td><%= available_block_columns_tags(@query) %></td>
</tr>
</table>
</div>
</fieldset>
-->
<div class="buttons hide-when-print">
<%= link_to_function l(:label_issue_query), 'submit_query_form("query_form")', :class => 'icon icon-checked' %>
<%= link_to l(:label_issue_cancel_query), {:set_filter => 1, :project_id => @project}, :class => 'icon icon-reload' %>
</div>
</div>
</div>
<% end %>
</div>
<%= error_messages_for 'query' %>
<% if @query.valid? %>
<% if @issues.empty? %>
<p class="nodata">
<%= l(:label_no_data) %>
</p>
<% else %>
<%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %>
<div class="pagination">
<ul><%= pagination_links_full @issue_pages, @issue_count %></ul>
</div>
<% end %>
<div style="float: right; padding-top: 30px">
<% other_formats_links do |f| %>
<%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %>
<%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '330px'); return false;" %>
<%= f.link_to 'PDF', :url => params %>
<% end %>
</div>
<div id="csv-export-options" style="display:none;">
<h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>
<%= form_tag(params.merge({:format => 'csv', :page => nil}), :method => :get, :id => 'csv-export-form') do %>
<p>
<label>
<%= radio_button_tag 'columns', 'all' %>
<%= l(:description_all_columns) %>
</label>
</p>
<p>
<label>
<%= check_box_tag 'description', '1', @query.has_column?(:description) %>
<%= l(:field_description) %>
</label>
</p>
<p class="buttons">
<%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %>
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
</p>
<% end %>
</div>
<% end %>
<%= call_hook(:view_issues_index_bottom, {:issues => @issues, :project => @project, :query => @query}) %>
<% content_for :sidebar do %>
<%= render :partial => 'issues/sidebar' %>
<% end %>
<% content_for :header_tags do %>
<%= auto_discovery_link_tag(:atom,
{:query_id => @query, :format => 'atom',
:page => nil, :key => User.current.rss_key},
:title => l(:label_issue_plural)) %>
<%= auto_discovery_link_tag(:atom,
{:controller => 'journals', :action => 'index',
:query_id => @query, :format => 'atom',
:page => nil, :key => User.current.rss_key},
:title => l(:label_changes_details)) %>
<% end %>
<%= context_menu issues_context_menu_path %>

View File

@ -1 +1,139 @@
<%= render :partial => 'issues/newissue_index' %>
<div class="project_r_h">
<h2 class="project_h2">问题跟踪</h2>
</div>
<div class="problem_top">
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
<span>
<% if User.current.member_of?(@project) %>
<%= link_to l(:label_issue_new), {:controller => 'issues', :action => 'new', :copy_from => nil}, :param => :project_id, :caption => :label_issue_new,
:html => {:accesskey => Redmine::AccessKeys.key_for(:new_issue)}, :class => 'icon icon-add' %>
<% end %>
<%= link_to l(:label_query), '#', :class => 'icon icon-help',
:onclick => '$("#custom_query").slideToggle(400); ' if true || User.current.logged? %>
</span>
<% 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>
</div>
<div class="contextual">
<% if !@query.new_record? && @query.editable_by?(User.current) %>
<%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
<%= delete_link query_path(@query) %>
<% end %>
</div>
<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
<div style="clear:right; ">
<%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project}, :method => :get, :id => 'query_form', :class => 'query_form') do %>
<%= hidden_field_tag 'set_filter', '1' %>
<div id="custom_query" class="custom_query" style="display: <%= !params[:utf8].blank? ? 'block' : 'none' %>;">
<span>---<%= l :label_query_new %>---</span>
<div id="query_form_content" class="hide-when-print">
<fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
<legend onclick="toggleFieldset(this);">
<%= l(:label_issue_query_condition) %>
</legend>
<div style="<%= @query.new_record? ? "" : "display: none;" %>">
<%= render :partial => 'queries/filters', :locals => {:query => @query} %>
</div>
</fieldset>
<!--
<fieldset class="collapsible collapsed">
<legend onclick="toggleFieldset(this);">
<%= l(:label_options) %>
</legend>
<div style="display: none;">
<table>
<tr>
<td><%= l(:field_column_names) %></td>
<td><%= render_query_columns_selection(@query) %></td>
</tr>
<tr>
<td><label for='group_by'><%= l(:field_group_by) %></label></td>
<td><%= select_tag('group_by', options_for_select([[]] + @query.groupable_columns.collect { |c| [c.caption, c.name.to_s] }, @query.group_by)) %></td>
</tr>
<tr>
<td><%= l(:button_show) %></td>
<td><%= available_block_columns_tags(@query) %></td>
</tr>
</table>
</div>
</fieldset>
-->
<div class="buttons hide-when-print">
<%= link_to_function l(:label_issue_query), 'submit_query_form("query_form")', :class => 'icon icon-checked' %>
<%= link_to l(:label_issue_cancel_query), {:set_filter => 1, :project_id => @project}, :class => 'icon icon-reload' %>
</div>
</div>
</div>
<% end %>
</div>
<%= error_messages_for 'query' %>
<% if @query.valid? %>
<% if @issues.empty? %>
<p class="nodata">
<%= l(:label_no_data) %>
</p>
<% else %>
<%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %>
<div class="pagination">
<ul><%= pagination_links_full @issue_pages, @issue_count %></ul>
</div>
<% end %>
<div style="float: right; padding-top: 30px">
<% other_formats_links do |f| %>
<%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %>
<%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '330px'); return false;" %>
<%= f.link_to 'PDF', :url => params %>
<% end %>
</div>
<div id="csv-export-options" style="display:none;">
<h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>
<%= form_tag(params.merge({:format => 'csv', :page => nil}), :method => :get, :id => 'csv-export-form') do %>
<p>
<label>
<%= radio_button_tag 'columns', 'all' %>
<%= l(:description_all_columns) %>
</label>
</p>
<p>
<label>
<%= check_box_tag 'description', '1', @query.has_column?(:description) %>
<%= l(:field_description) %>
</label>
</p>
<p class="buttons">
<%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %>
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
</p>
<% end %>
</div>
<% end %>
<%= call_hook(:view_issues_index_bottom, {:issues => @issues, :project => @project, :query => @query}) %>
<% content_for :sidebar do %>
<%= render :partial => 'issues/sidebar' %>
<% end %>
<% content_for :header_tags do %>
<%= auto_discovery_link_tag(:atom,
{:query_id => @query, :format => 'atom',
:page => nil, :key => User.current.rss_key},
:title => l(:label_issue_plural)) %>
<%= auto_discovery_link_tag(:atom,
{:controller => 'journals', :action => 'index',
:query_id => @query, :format => 'atom',
:page => nil, :key => User.current.rss_key},
:title => l(:label_changes_details)) %>
<% end %>
<%= context_menu issues_context_menu_path %>

View File

@ -1 +0,0 @@
$('#content').html('<%= escape_javascript(render :partial => 'issues/newissue_index') %>');

View File

@ -1,181 +1,181 @@
<div class="project_r_h">
<h2 class="project_h2"><%= l(:label_issue_plural) %></h2>
</div>
<%# html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
<% html_title "#{@issue.tracker.name} #{@issue.source_from}'#'#{@issue.project_index}: #{@issue.subject}" %>
<%= render :partial => 'action_menu' %>
<h3>
<%= issue_heading(@issue) %>
</h3>
<style type="text/css"></style>
<div class="<%= @issue.css_classes %> details">
<% if @prev_issue_id || @next_issue_id %>
<div class="next-prev-links contextual">
<%= link_to_if @prev_issue_id,
"\xc2\xab #{l(:label_previous)}",
(@prev_issue_id ? issue_path(Issue.find_by_id(@prev_issue_id)) : nil),
:title => "##{@prev_issue_id}" %> |
<% if @issue_position && @issue_count %>
<span class="position"><%= l(:label_item_position, :position => @issue_position, :count => @issue_count) %></span> |
<% end %>
<%= link_to_if @next_issue_id,
"#{l(:label_next)} \xc2\xbb",
(@next_issue_id ? issue_path(Issue.find_by_id(@next_issue_id)) : nil),
:title => "##{@next_issue_id}" %>
</div>
<% end %>
<!-- <%#= avatar(@issue.author, :size => "50") %> -->
<div class="subject" style="word-wrap: break-word;">
<%= render_issue_subject_with_tree(@issue) %>
</div>
<!-- 顶和踩 在这里添加 -->
<span id="praise_tread" style="float: right">
<%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @issue,:show_flag => true,:user_id =>User.current.id,:horizontal => false}%>
</span>
<p class="author">
<%= authoring @issue.created_on, @issue.author %>.
<% if @issue.created_on != @issue.updated_on %>
<%= l(:label_updated_time, time_tag(@issue.updated_on)).html_safe %>.
<% end %>
</p>
<!-- added by william -for tag -->
<div id="tags">
<%= render :partial => 'tags/tag', :locals => {:obj => @issue,:object_flag => "3" }%>
</div>
<table class="attributes">
<%= issue_fields_rows do |rows|
rows.left l(:field_status), h(@issue.status.name), :class => 'status'
rows.left l(:field_priority), h(@issue.priority.name), :class => 'priority'
unless @issue.disabled_core_fields.include?('assigned_to_id')
#modified by nie
#modified by huang
rows.left l(:field_assigned_to), (image_tag url_to_avatar(@issue.assigned_to(@user)), :class => 'avatar').to_s.html_safe + (@issue.assigned_to ? link_to_user(@issue.assigned_to) : "-"), :class => 'assigned-to'
end
# end huang
unless @issue.disabled_core_fields.include?('category_id')
rows.left l(:field_category), h(@issue.category ? @issue.category.name : "-"), :class => 'category'
end
unless @issue.disabled_core_fields.include?('fixed_version_id')
rows.left l(:field_fixed_version), (@issue.fixed_version ? link_to_version(@issue.fixed_version) : "-"), :class => 'fixed-version'
end
unless @issue.disabled_core_fields.include?('start_date')
rows.right l(:field_start_date), format_date(@issue.start_date), :class => 'start-date'
end
unless @issue.disabled_core_fields.include?('due_date')
rows.right l(:field_due_date), format_date(@issue.due_date), :class => 'due-date'
end
unless @issue.disabled_core_fields.include?('done_ratio')
rows.right l(:field_done_ratio), progress_bar(@issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%"), :class => 'progress'
end
unless @issue.disabled_core_fields.include?('estimated_hours')
unless @issue.estimated_hours.nil?
rows.right l(:field_estimated_hours), l_hours(@issue.estimated_hours), :class => 'estimated-hours'
end
end
if User.current.allowed_to?(:view_time_entries, @project)
rows.right l(:label_spent_time), (@issue.total_spent_hours > 0 ? link_to(l_hours(@issue.total_spent_hours), project_issue_time_entries_path(@project, @issue)) : "-"), :class => 'spent-time'
end
end %>
<%= render_custom_fields_rows(@issue) %>
<%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
</table>
woca
<% if @issue.description? || @issue.attachments.any? -%>
<hr />
<% if @issue.description? %>
<div class="description">
<div class="contextual">
<%= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
</div>
<p><strong><%=l(:field_description)%></strong></p>
<div class="wiki">
<%= textilizable @issue, :description, :attachments => @issue.attachments %>
</div>
</div>
<% end %>
<%= link_to_attachments @issue, :thumbnails => true %>
<% end -%>
<%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
<% if false # !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %>
<hr />
<div id="issue_tree">
<div class="contextual">
<%= link_to_new_subtask(@issue) if User.current.allowed_to?(:manage_subtasks, @project) %>
</div>
<p><strong><%=l(:label_subtask_plural)%></strong></p>
<%= render_descendants_tree(@issue) unless @issue.leaf? %>
</div>
<% end %>
<% if @relations.present? || User.current.allowed_to?(:manage_issue_relations, @project) %>
<hr />
<div id="relations">
<%= render :partial => 'relations' %>
</div>
<% end %>
</div>
<% if @changesets.present? %>
<div id="issue-changesets">
<h3><%=l(:label_associated_revisions)%></h3>
<%= render :partial => 'changesets', :locals => { :changesets => @changesets} %>
</div>
<% end %>
<% if @journals.present? %>
<div id="history">
<h3><%=l(:label_history)%></h3>
<%= render :partial => 'history', :locals => { :issue => @issue, :journals => @journals } %>
</div>
<% end %>
<div style="clear: both;"></div>
<%= render :partial => 'action_menu' %>
<div style="clear: both;"></div>
<% if @issue.editable? %>
<div id="update">
<h3><%= l(:button_update) %></h3>
<%= render :partial => 'edit' %>
</div>
<% end %>
<% other_formats_links do |f| %>
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
<%= f.link_to 'PDF' %>
<% end %>
<% content_for :sidebar do %>
<%= render :partial => 'issues/sidebar' %>
<% if User.current.allowed_to?(:add_issue_watchers, @project) ||
(@issue.watchers.present? && User.current.allowed_to?(:view_issue_watchers, @project)) %>
<div id="watchers">
<%= render :partial => 'watchers/watchers', :locals => {:watched => @issue} %>
</div>
<% end %>
<% end %>
<% content_for :header_tags do %>
<%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %>
<% end %>
<%= context_menu issues_context_menu_path %>
<div class="project_r_h">
<h2 class="project_h2"><%= l(:label_issue_plural) %></h2>
</div>
<%# html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
<% html_title "#{@issue.tracker.name} #{@issue.source_from}'#'#{@issue.project_index}: #{@issue.subject}" %>
<%= render :partial => 'action_menu' %>
<h3>
<%= issue_heading(@issue) %>
</h3>
<style type="text/css"></style>
<div class="<%= @issue.css_classes %> details">
<% if @prev_issue_id || @next_issue_id %>
<div class="next-prev-links contextual">
<%= link_to_if @prev_issue_id,
"\xc2\xab #{l(:label_previous)}",
(@prev_issue_id ? issue_path(Issue.find_by_id(@prev_issue_id)) : nil),
:title => "##{@prev_issue_id}" %> |
<% if @issue_position && @issue_count %>
<span class="position"><%= l(:label_item_position, :position => @issue_position, :count => @issue_count) %></span> |
<% end %>
<%= link_to_if @next_issue_id,
"#{l(:label_next)} \xc2\xbb",
(@next_issue_id ? issue_path(Issue.find_by_id(@next_issue_id)) : nil),
:title => "##{@next_issue_id}" %>
</div>
<% end %>
<!-- <%#= avatar(@issue.author, :size => "50") %> -->
<div class="subject" style="word-wrap: break-word;">
<%= render_issue_subject_with_tree(@issue) %>
</div>
<!-- 顶和踩 在这里添加 -->
<span id="praise_tread" style="float: right">
<%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @issue,:show_flag => true,:user_id =>User.current.id,:horizontal => false}%>
</span>
<p class="author">
<%= authoring @issue.created_on, @issue.author %>.
<% if @issue.created_on != @issue.updated_on %>
<%= l(:label_updated_time, time_tag(@issue.updated_on)).html_safe %>.
<% end %>
</p>
<!-- added by william -for tag -->
<div id="tags">
<%= render :partial => 'tags/tag', :locals => {:obj => @issue,:object_flag => "3" }%>
</div>
<table class="attributes">
<%= issue_fields_rows do |rows|
rows.left l(:field_status), h(@issue.status.name), :class => 'status'
rows.left l(:field_priority), h(@issue.priority.name), :class => 'priority'
unless @issue.disabled_core_fields.include?('assigned_to_id')
#modified by nie
#modified by huang
rows.left l(:field_assigned_to), (image_tag url_to_avatar(@issue.assigned_to(@user)), :class => 'avatar').to_s.html_safe + (@issue.assigned_to ? link_to_user(@issue.assigned_to) : "-"), :class => 'assigned-to'
end
# end huang
unless @issue.disabled_core_fields.include?('category_id')
rows.left l(:field_category), h(@issue.category ? @issue.category.name : "-"), :class => 'category'
end
unless @issue.disabled_core_fields.include?('fixed_version_id')
rows.left l(:field_fixed_version), (@issue.fixed_version ? link_to_version(@issue.fixed_version) : "-"), :class => 'fixed-version'
end
unless @issue.disabled_core_fields.include?('start_date')
rows.right l(:field_start_date), format_date(@issue.start_date), :class => 'start-date'
end
unless @issue.disabled_core_fields.include?('due_date')
rows.right l(:field_due_date), format_date(@issue.due_date), :class => 'due-date'
end
unless @issue.disabled_core_fields.include?('done_ratio')
rows.right l(:field_done_ratio), progress_bar(@issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%"), :class => 'progress'
end
unless @issue.disabled_core_fields.include?('estimated_hours')
unless @issue.estimated_hours.nil?
rows.right l(:field_estimated_hours), l_hours(@issue.estimated_hours), :class => 'estimated-hours'
end
end
if User.current.allowed_to?(:view_time_entries, @project)
rows.right l(:label_spent_time), (@issue.total_spent_hours > 0 ? link_to(l_hours(@issue.total_spent_hours), project_issue_time_entries_path(@project, @issue)) : "-"), :class => 'spent-time'
end
end %>
<%= render_custom_fields_rows(@issue) %>
<%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
</table>
<% if @issue.description? || @issue.attachments.any? -%>
<hr />
<% if @issue.description? %>
<div class="description">
<div class="contextual">
<%= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
</div>
<p><strong><%=l(:field_description)%></strong></p>
<div class="wiki">
<%= textilizable @issue, :description, :attachments => @issue.attachments %>
</div>
</div>
<% end %>
<%= link_to_attachments @issue, :thumbnails => true %>
<% end -%>
<%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
<% if false # !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %>
<hr />
<div id="issue_tree">
<div class="contextual">
<%= link_to_new_subtask(@issue) if User.current.allowed_to?(:manage_subtasks, @project) %>
</div>
<p><strong><%=l(:label_subtask_plural)%></strong></p>
<%= render_descendants_tree(@issue) unless @issue.leaf? %>
</div>
<% end %>
<% if @relations.present? || User.current.allowed_to?(:manage_issue_relations, @project) %>
<hr />
<div id="relations">
<%= render :partial => 'relations' %>
</div>
<% end %>
</div>
<% if @changesets.present? %>
<div id="issue-changesets">
<h3><%=l(:label_associated_revisions)%></h3>
<%= render :partial => 'changesets', :locals => { :changesets => @changesets} %>
</div>
<% end %>
<% if @journals.present? %>
<div id="history">
<h3><%=l(:label_history)%></h3>
<%= render :partial => 'history', :locals => { :issue => @issue, :journals => @journals } %>
</div>
<% end %>
<div style="clear: both;"></div>
<%= render :partial => 'action_menu' %>
<div style="clear: both;"></div>
<% if @issue.editable? %>
<div id="update">
<h3><%= l(:button_update) %></h3>
<%= render :partial => 'edit' %>
</div>
<% end %>
<% other_formats_links do |f| %>
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
<%= f.link_to 'PDF' %>
<% end %>
<% content_for :sidebar do %>
<%= render :partial => 'issues/sidebar' %>
<% if User.current.allowed_to?(:add_issue_watchers, @project) ||
(@issue.watchers.present? && User.current.allowed_to?(:view_issue_watchers, @project)) %>
<div id="watchers">
<%= render :partial => 'watchers/watchers', :locals => {:watched => @issue} %>
</div>
<% end %>
<% end %>
<% content_for :header_tags do %>
<%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %>
<% end %>
<%= context_menu issues_context_menu_path %>

View File

@ -194,7 +194,7 @@
</strong>
<% if show_more_fans?(@bid) %>
<span style="display:inline-block; font-size: 12px; float:right; margin-bottom: -4px;">
<%= link_to l(:label_more), :controller => 'bids', :action => 'show_bid_user'%>
<%= link_to l(:button_more), :controller => 'bids', :action => 'show_bid_user'%>
</span>
<% end %>
</div>
@ -217,7 +217,7 @@
</strong>
<% if show_more_bid_project?(@bid) %>
<span style="display:inline-block; font-size: 12px; float:right; margin-bottom: -4px;">
<%= link_to l(:label_more), :controller => 'bids', :action => 'show_project'%>
<%= link_to l(:button_more), :controller => 'bids', :action => 'show_project'%>
</span>
<% end %>
</div>
@ -244,7 +244,7 @@
</strong>
<% if show_more_participate?(@bid) %>
<span style="font-size: 12px; display: inline; float: right;" >
<%= link_to l(:label_more), :controller => "bids", :action => "show_participator"%>
<%= link_to l(:button_more), :controller => "bids", :action => "show_participator"%>
</span>
<% end %>
</div>

View File

@ -215,7 +215,7 @@
<%= l(:label_x_followers, :count => @contest.watcher_users.count) %>
</strong>
<% if show_more_fans?(@contest) %>
<span style="display:inline-block; font-size: 12px; float:right; margin-bottom: -4px;"><%= link_to l(:label_more), show_contest_user_contest_path(@contest) %></span>
<span style="display:inline-block; font-size: 12px; float:right; margin-bottom: -4px;"><%= link_to l(:button_more), show_contest_user_contest_path(@contest) %></span>
<% end %>
</div>
<div class="left_wf">

View File

@ -93,7 +93,7 @@
<%= image_tag(url_to_avatar(@project), :style => 'width:61px; height:61px;') %>
</div>
<div class="pr_info_id fl mb5">
ID:<%= @project.id %>
<%= l(:label_project_id)%><%= @project.id %>
</div>
<!--关注、申请加入/退出项目-->
<div id="join_exit_project_div">
@ -126,7 +126,9 @@
<%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :style => "color:#3CA5C6;font-weight:bold" %></span>
<span>| </span>
<%= l(:project_module_attachments) %><span class="info_foot_num" >
<%= link_to "#{@project.attachments.count}", project_files_path(@project), :style => "color:#3CA5C6;font-weight:bold" %></a></div>
<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %>
<%= link_to "#{attaments_num}", project_files_path(@project), :style => "color:#3CA5C6;font-weight:bold" %></span>
</div>
<div class="cl"></div>
</div><!--项目信息 end-->
@ -168,9 +170,9 @@
<% end%>
<% unless @project.enabled_modules.where("name = 'files'").empty? %>
<div class="subNav">
<%= link_to l(:label_course_file), project_files_path(@project), :style => "color:#3CA5C6" %>
<% unless @project.attachments.count == 0 %>
<span class="subnav_num">(<%= @project.attachments.count %>)</span>
<%= link_to l(:project_module_files), project_files_path(@project), :style => "color:#3CA5C6" %>
<% unless attaments_num == 0 %>
<span class="subnav_num">(<%= attaments_num %>)</span>
<% end %>
<% 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;" %>
@ -187,7 +189,7 @@
</div>
<% end %>
<div class="subNav subNav_jiantou"><%= l(:label_more) %></div>
<div class="subNav subNav_jiantou"><%= l(:label_project_more) %></div>
<ul class="navContent" style="padding-left: 0px">
<%= render 'projects/tools_expand' %>
</ul>

View File

@ -258,10 +258,10 @@
<% else %>
<tr>
<td style=" float: right" width="70px" >
<%= l(:label_identity)%>
<span style="float: right"><%= l(:label_identity)%></span>
</td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<%= l(:label_account_student) %>
<%= l(:label_account_identity_student) %>
</td>
</tr>
@ -269,10 +269,10 @@
<% elsif @user.user_extensions.identity == 3 %>
<tr>
<td style=" float: right" width="70px" >
<%= l(:label_identity)%>
<span style="float: right"><%= l(:label_identity)%></span>
</td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<%= l(:label_account_developer) %>
<%= l(:label_account_identity_developer) %>
</td>
</tr>
<% end %>
@ -295,7 +295,7 @@
</strong>
<% if show_more_watchers?(@user) %>
<div style="font-size: 11px; display: inline; float: right; margin-top: 5px; margin-right: 20px" >
<%= link_to l(:label_more), :controller => "users", :action => "user_watchlist"%>
<%= link_to l(:button_more), :controller => "users", :action => "user_watchlist"%>
</div>
<% end %>
</div>
@ -319,7 +319,7 @@
</strong>
<% if show_more_fans?(@user) %>
<div style="font-size: 11px; display: inline; float: right; margin-top: 5px; margin-right: 20px" >
<%= link_to l(:label_more), :controller => "users", :action => "user_fanslist"%>
<%= link_to l(:button_more), :controller => "users", :action => "user_fanslist"%>
</div>
<% end %>
</div>

View File

@ -41,7 +41,8 @@ a:hover.mail_reply{ background:#06a9bc; text-decoration:none;}
<div class="container" style="margin:0; padding:0; border:0;">
<div class="mail" style="width:600px; margin:20px; height:auto; color:#4b4b4b; font-size:14px; margin:0; padding:0; border:0;">
<div class="mail_head" style="margin:0; padding:0; border:0;">
<p><%= l(:mail_issue_greetings)%></p>
</div><!--mail_head end-->
<%= yield %>
</div>

View File

@ -57,6 +57,9 @@
</style>
<div class="lz">
<div class="project_r_h">
<h2 class="project_h2"><%= h @board.name %></h2>
</div>
<!-- 在这里添加赞和踩-->
<span id="praise_tread" style="float: right">
<%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @topic,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%>

View File

@ -1,4 +1,4 @@
<%= error_messages_for @news %>
.<%= error_messages_for @news %>
<div class="add_frame_header" >
<%= @project ? l(:label_news_new) : l(:bale_news_notice) %>
</div>

View File

@ -72,9 +72,9 @@
:html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%#= submit_tag l(:button_save) %>
<%= link_to l(:button_save), "#", :onclick => 'submitNews();',:onmouseover => 'this.focus()',:class => 'whiteButton m3p10' %>
<%= link_to l(:button_save), "#", :onclick => 'submitNews();',:onmouseover => 'this.focus()',:class => 'ButtonColor m3p10' %>
<%#= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form',target='preview',{:class => 'whiteButton m3p10'} %>
<%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;',:class => 'whiteButton m3p10' %>
<%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;',:class => 'ButtonColor m3p10'%>
<% end %>
<div id="preview" class="wiki"></div>
</div>

View File

@ -3,7 +3,7 @@
<div class="well">
<% next if member.new_record? %>
<% unless member.created_on.nil? %>
<%= content_tag "p", "#{format_date(member.created_on)}#{l(:label_member_since)}", :class => "float_right member_since" %>
<%= content_tag "p", (User.current.language == ""|| User.current.language == "zh")?("#{format_date(member.created_on)}"+" "+"#{l(:label_member_since)}"):("#{l(:label_member_since)}"+" "+"#{format_date(member.created_on)}"), :class => "float_right member_since" %>
<% end %>
<%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :class => 'avatar')) %>
<%= content_tag "div", link_to(member.user.name, user_path(member.user)), :class => "nomargin avatar_name" %>

View File

@ -42,7 +42,7 @@
</li>
<li>
<% unless @project.enabled_modules.where("name = 'dts'").empty? %>
<%= link_to l(:label_module_share) ,share_show_path(@project) %>
<%= link_to l(:project_module_dts) ,share_show_path(@project) %>
<% end %>
</li>

View File

@ -45,6 +45,7 @@
</div>
<div class="cl"></div>
<div class="box_main">
<div style="padding-left: 20px;">
<h3 class="box_h3"><%= l(:label_invite_new_user)%></h3>
<p class="box_p">
<%= l(:label_invite_email_tips)%>
@ -62,5 +63,6 @@
</a>
<%#= submit_tag '免费发送', :style => "display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;" %>
<% end %>
</div>
</div>
</div>

View File

@ -17,7 +17,7 @@
<tr>
<td colspan="2" width="580px" ><p class="font_description">
<% 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 %>
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : '' %>
<% end %>
@ -25,7 +25,7 @@
</p></td>
</tr>
<tr>
<td width="200" align="right" class="font_lighter"><%= l(:label_user_joinin) %><%= format_date(user.created_on) %>
<td width="200" align="right" class="font_lighter"><%= l(:label_user_joinin) %>&nbsp;<%= format_date(user.created_on) %>
</td>
</tr>
</table></td>

View File

@ -1,32 +1,30 @@
<div id="tags_show">
<div id="tags_show" style="float: left;">
<%= render :partial => "tags/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
</div>
<div style="float: left;">
<% if User.current.logged? %>
<span> <%= toggle_link (l(:label_add_tag)), 'put-tag-form', {:focus => 'tags_name'} %> </span>
<% end %>
<div id="put-tag-form" style="display: none;text-align: center">
<%= form_for "tag_for_save",:remote=>true,:url=>tag_path,
:update => "tags_show",
:complete => '$("#put-tag-form").slideUp();' do |f| %>
<table>
:update => "tags_show",
:complete => '$("#put-tag-form").slideUp();' do |f| %>
<table>
<tr>
<td>
<%= f.text_field :name ,:id => "tags_name",:size=>"20",
:require=>true,
:maxlength => Setting.tags_max_length,
:minlength=>Setting.tags_min_length %>
:require=>true,
:maxlength => Setting.tags_max_length,
:minlength=>Setting.tags_min_length %>
</td>
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
<td style="margin-left: 5px">
<td style="margin-left: 5px" vertical-valign="middle" >
<a href="#" onclick='$("#tags_name").parent().submit();' type="button" class="submit f_l"></a>
</td>
<tr>
</table>
<% end %>
</div>
</div>

View File

@ -24,19 +24,19 @@
&nbsp;&nbsp;
<%= file.description %>
<div class="c9 gray-color">
<%= l('label_attachment_category')%>
<%= l('attachment.category')%>
<%=result_come_from file%>
</div>
<span class="gray blue-color">
<%= l('label_attachment_download_num')%>
<%= l('attachment.download_num')%>
<%= file.downloads%>|
<%= l('label_attachment_size')%>
<%= l('attachment.size')%>
<%= number_to_human_size(file.filesize) %>|
<%= l('label_attachment_sharer')%>
<%= l('attachment.sharer')%>
<a class="gray" >
<%= link_to file.author, user_path(file.author), target: "_blank" unless file.author.blank? %>
</a>|
<%= l('label_attachment_upload_time')%>
<%= l('attachment.upload_time')%>
<%= format_time(file.created_on) %>
</span>
<div style="display: none"></div>

View File

@ -31,7 +31,12 @@
<!-- 用来显示三大对象的主页中的tag 故是全部显示 -->
<% if @tags.size > 0 %>
<% @tags.each do |tag| %>
<div id="tag">
<!--项目暂时单独出来,后面重构-->
<% if object_flag == '2' %>
<span class="re_tag f_l">
<%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %></span>
<% else %>
<div id="tag">
<span class="tag_show">
<%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
<!-- 对用户主页 是本人 ,对项目,需求,问题是管理员 -->
@ -43,13 +48,6 @@
:taggable_id => obj.id, :taggable_type => object_flag %>
</span>
<% end %>
<% when '2' %>
<% if (ProjectInfo.find_by_project_id(obj.id)).try(:user_id) == User.current.id %>
<span class='del'>
<%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %>
</span>
<% end %>
<% when '3' %>
<% if (ProjectInfo.find_by_project_id(obj.project_id)).try(:user_id) == User.current.id %>
<span class='del'>
@ -101,6 +99,7 @@
<% end %>
</span>
</div>
<% end %>
<% end %>
<% end %>
<% end %>
<% end %>

View File

@ -16,8 +16,8 @@
<div class="menu">
<%= link_to "#{l(:label_course_new)}", new_course_path, class: 'icon icon-add' if @user == User.current %>
<ul>
<li mode='doing' class="on"><%= l(:label_course_doing)%></li>
<li mode='end'><%= l(:label_course_done)%></li>
<li mode='doing' class="on"><%= l('user.courses.doing')%></li>
<li mode='end'><%= l('user.courses.done')%></li>
</ul>
</div>

View File

@ -10,7 +10,7 @@
</span>
<% end %>
<%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%>
(<%= link_to l(:label_project_member_amount, :count=>projectCount(project)), project_member_path(project) ,:course =>'0' %>)
(<%= link_to l(:label_project_member_amount, :count => projectCount(project)), project_member_path(project) ,:course =>'0' %>)
</div>
<div style=" float: left;margin:5px; margin-left: 10px; width: 380px;min-height: 42px;">
<span class='font_lighter' title ='<%= project.short_description%>'> <%=project.description.truncate(90, omission: '...')%> </span>

View File

@ -115,7 +115,7 @@
<div class="forum-topic" style="height: 25px; width: 98%; margin-left: 2px;">
<h3 style="color: rgb(21, 188, 207);"><strong> <%= l(:lable_bar_active)%> </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: -30px;float: right; display: block;"> <%= link_to l(:label_more), forums_path %> </span>
<span style="margin-top: -30px;float: right; display: block;"> <%= link_to l(:button_more), forums_path %> </span>
</div>
<div class="welcome-box-list-new memo_activity">
<% topics = find_new_forum_topics(12) %>

View File

@ -0,0 +1,19 @@
RailsKindeditor.setup do |config|
# Specify the subfolders in public directory.
# You can customize it , eg: config.upload_dir = 'this/is/my/folder'
config.upload_dir = 'files/uploads'
# Allowed file types for upload.
config.upload_image_ext = %w[gif jpg jpeg png bmp]
config.upload_flash_ext = %w[swf flv]
config.upload_media_ext = %w[swf flv mp3 wav wma wmv mid avi mpg asf rm rmvb]
config.upload_file_ext = %w[doc docx xls xlsx ppt htm html txt zip rar gz bz2]
# Porcess upload image size
# eg: 1600x1600 => 800x800
# 1600x800 => 800x400
# 400x400 => 400x400 # No Change
# config.image_resize_to_limit = [800, 800]
end

View File

@ -138,10 +138,7 @@ en:
circular_dependency: "This relation would create a circular dependency"
cant_link_an_issue_with_a_descendant: "An issue cannot be linked to one of its subtasks"
attachment_all: "All"
attachment_browse: "Attachment Content Browse"
attachment_sufix_browse: "Attachment Type Browse"
attachment_type: "Attachment Type"
general_text_No: 'No'
general_text_Yes: 'Yes'
general_text_no: 'no'
@ -166,7 +163,6 @@ en:
label_requirement: Calls
label_forum: Forum
label_contest: Contest
@ -189,7 +185,7 @@ en:
text_are_you_sure: Are you sure? #js 提示
label_no_data: No data to display
# 项目、课程、用户公用
label_settings: Settings
label_information_plural: Information
@ -206,11 +202,12 @@ en:
button_cancel: Cancel
label_submit: Submit
button_project_tags_add: Add
label_more: "More>>"
button_download: Download
button_more: "More»"
button_delete: Delete
button_unfollow: Unfollow
button_follow: Follow
button_browse: Browse
#

View File

@ -147,10 +147,7 @@ zh:
cant_link_an_issue_with_a_descendant: "问题不能关联到它的子任务"
groupname_repeat: "该班名已存在"
attachment_all: "全部"
attachment_sufix_browse: "文件类型"
attachment_browse: "内容类型"
attachment_type: '分类'
general_text_No: '否'
general_text_Yes: '是'
general_text_no: '否'
@ -190,7 +187,10 @@ zh:
text_are_you_sure: 您确定要删除吗? #js 提示
label_no_data: 没有任何数据可供显示
# 项目、课程、用户公用
label_settings: 配置
label_information_plural: 信息
@ -207,10 +207,14 @@ zh:
button_cancel: 取消
label_submit: 提交
button_project_tags_add: 增加
label_more: "更多>>"
button_download: 下载
button_more: 更多
button_more: "更多»"
button_delete: 删除
button_unfollow: 取消关注
button_follow: 关注
button_watch: 跟踪
button_unwatch: 取消跟踪
button_browse: 浏览
#

View File

@ -2,3 +2,13 @@ en:
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
direction: ltr
#
# 竞赛托管平台
#
# 主页
#
label_current_hot_contest: Latest Hot Competition
label_current_attendingcontest_work: Latest Competition Work
label_issue_feedback_activities: Question&Feedback
label_more_information: More...
label_release_time: Release-time

View File

@ -3,4 +3,15 @@
# by tsechingho (http://github.com/tsechingho)
zh:
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
direction: ltr
direction: ltr
#
# 竞赛托管平台
#
# 主页
#
label_current_hot_contest: 最新热门竞赛
label_current_attendingcontest_work: 最新参赛作品
label_issue_feedback_activities: 问题和反馈动态
label_more_information: 更多>>
label_release_time: 发布时间

View File

@ -71,10 +71,9 @@ en:
field_summary: Summary
field_job_category: Job category # added by bai
field_filename: File
field_file_dense: File Dense
field_filesize: Size
field_downloads: Downloads
field_author: Author
field_created_on: Created
field_closed_on: Closed
@ -108,7 +107,6 @@ en:
field_last_login_on: Last connection
field_effective_date: Date
field_version: Version
field_type: Type
field_host: Host
field_port: Port
@ -329,10 +327,7 @@ en:
permission_notificationcomment_contestnotifications: Add the notice of contest comments
permission_upload_attachments: Uploading resource
project_module_issue_tracking: Issue tracking
project_module_time_tracking: Time tracking
project_module_files: Files
project_module_boards: Forums
# edit by meng
lable_hot_course: Hot Courses
label_course_join_student: Join a course
@ -343,8 +338,7 @@ en:
label_create_new_projects: Create a project
label_work_scores_people: The total number of users given scores
label_project_grade: Score
label_user_for_project_grade: Score
label_relation_files: Select an existing resource
# Personal signature tips
@ -481,13 +475,11 @@ en:
label_text: Long text
label_attribute: Attribute
label_attribute_plural: Attributes
label_no_data: No data to display
label_change_status: Change status
label_history: History
label_attachment: Files
label_attachment_new: New file
label_attachment_delete: Delete file
label_attachment_plural: Files
label_file_added: File added
label_report: Report
label_report_plural: Reports
@ -617,12 +609,10 @@ en:
label_latest_revision_plural: Latest revisions
label_view_revisions: View revisions
label_view_all_revisions: View all revisions
label_max_size: Maximum size
label_sort_highest: Move to top
label_sort_higher: Move up
label_sort_lower: Move down
label_sort_lowest: Move to bottom
label_roadmap: Roadmap
label_roadmap_due_in: "Due in %{value}"
label_roadmap_overdue: "%{value} late"
label_roadmap_no_issues: No issues for this version
@ -727,7 +717,6 @@ en:
label_plugins: Plugins
label_ldap_authentication: LDAP authentication
label_downloads_abbr: D/L
label_optional_description: Optional description
label_add_another_file: Add another file
label_preferences: Preferences
label_chronological_order: In chronological order
@ -797,7 +786,7 @@ en:
label_cross_project_hierarchy: With project hierarchy
label_cross_project_system: With all projects
label_gantt_progress_line: Progress line
label_files_filter: Files Filter
button_check_all: Check all
button_uncheck_all: Uncheck all
@ -896,7 +885,7 @@ en:
text_issues_destroy_confirmation: 'Are you sure you want to delete the selected issue(s)?'
text_issues_destroy_descendants_confirmation: "This will also delete %{count} subtask(s)."
text_time_entries_destroy_confirmation: 'Are you sure you want to delete the selected time entr(y/ies)?'
text_select_project_modules: 'Select modules to enable for this project:'
text_default_administrator_account_changed: Default administrator account changed
text_file_repository_writable: Attachments directory writable
text_plugin_assets_writable: Plugin assets directory writable
@ -936,9 +925,7 @@ en:
text_turning_multiple_off: "If you disable multiple values, multiple values will be removed in order to preserve only one value per item."
text_applied_project: "User %{id} Apply Join Project %{project}"
default_role_manager: Manager
default_role_developer: Developer
default_role_reporter: Reporter
default_tracker_bug: Bug
default_tracker_feature: Feature
default_tracker_support: Support
@ -1022,8 +1009,7 @@ en:
#end by huang
#added by liuping
button_unfollow: Unfollow
button_follow: Follow
label_delete_confirm: Confirm delete
label_exit_project: Exit Project
@ -1037,7 +1023,7 @@ en:
label_leave_message: Message content
label_message: message board
field_add: Add before %{time}
button_more: More
label_bidding_project: projects
button_bidding: I will participate in it
@ -1070,11 +1056,6 @@ en:
zero: Follower
one: Follower
other: Followers
#end
label_member_since: joined
label_contribute_to: Participates %{project_count} projects
#modify by men
#end
label_total_commit: Totally %{total_commit} commits # modified by bai
#modify by men
@ -1087,7 +1068,7 @@ en:
label_type_as: Type as
label_status_as: Status as
label_priority_as: Priority as
label_member_list: Member list
label_author_name: Posted by %{author_name}
label_comments_count: (%{count} comments)
label_post_on: posts on
@ -1443,13 +1424,7 @@ en:
label_your_course: your course
label_have_message: have a new message
lable_not_receive_mail: Click here don't receive email form site
#added by linchun as competition#
label_current_hot_contest: Latest Hot Competition
label_current_attendingcontest_work: Latest Competition Work
label_issue_feedback_activities: Question&Feedback
label_more_information: More...
label_release_time: Release-time
label_weixin: WeiXin
@ -1584,7 +1559,6 @@ en:
label_trustie_team: The Trustie development team
label_memos_max_length: The content of the post up to 65535 characters in length
label_forums_max_length: Post Bar describing the maximum length of 65535 characters
label_unknow_type: Unknow type
review_assignments: Review assignments
label_my_school: My school
@ -1609,3 +1583,5 @@ en:
label_recently_updated_message: Recently updated the message
label_recently_updated_courseware: Recently updated the courseware
label_no_courses: You do not participate in any course, please search the curriculum, course, or create a course!
label_commit_failed: commit failed
#api end

View File

@ -19,7 +19,9 @@ en:
#
lable_hot_projects: Hot Projects
label_private: private
label_project_member_amount: "%{count} members"
label_project_member_amount:
one: "%{count} member"
other: "%{count} members"
label_project_score_tips: "Considering all activities of the project, project's score reflects the activity level of project"
label_project_score: Score
@ -29,7 +31,7 @@ en:
#
# 左边栏
#
label_id: "ID:"
label_project_id: "Projcet ID:"
label_apply_project: Apply to Join
label_exit_project: Exit
@ -48,24 +50,116 @@ en:
project_module_boards: Forums
project_module_boards_post: New Post
# 与课程公用资源库
project_module_files: Resources
label_upload_files: New File
project_module_repository: Repository
project_module_create_repository: New Repository
label_project_more: More
project_module_news: News
project_module_wiki: Wiki
project_module_code_review: Code Review
project_module_calendar: Calendar
project_module_gantt: Gantt
project_module_documents: Documents
label_project_tool_response: Response
label_module_share: DTS Test Tool
label_roadmap: Roadmap
label_project_tool_response: Feedback
project_module_dts: DTS Test Tool
label_project_overview: "Profile:"
label_expend_information: More Information
#
# 项目托管平台
#
# 项目成员
#
label_member_list: Members
label_member_since: "joined at"
label_user_for_project_grade: Score
default_role_manager: Manager
default_role_developer: Developer
default_role_reporter: Reporter
#
# 项目托管平台
#
# 关注者列表
#
label_followers: Followers
label_contribute_to:
one: "Participates %{count} project—"
other: "Participates %{count} projects—"
#
# 项目托管平台
#
# 资源库
#
lable_file_sharingarea: Resources
# 资源库(附件)公用
label_relation_files: Select an existing resource
label_search_by_keyword: "Search by keywords"
label_files_filter: "Files Filter:"
attachment_all: "All"
attachment_browse: "Attachment Content Browse"
attachment_sufix_browse: "Attachment Type Browse"
label_unknow_type: Unknow type
field_filename: File
field_filesize: Size
field_filecontenttype: Content
field_filetype: File Typ
field_downloads: Downloads
field_file_dense: Dense
# 资源库(附件)公用 > 上传文件
label_attachment_new: New file
field_version: Version
attachment_type: "Attachment Type"
label_attachment_plural: Files
label_no_file_uploaded: No file uploaded
label_max_size: Maximum size
label_optional_description: Description
label_file_count: "%{count} files were uploaded successfully"
#
# 项目托管平台
#
# 问题跟踪
#
#
# 项目托管平台
#
# 项目讨论区
#
#
# 项目托管平台
#
# 资源库
#
#
# 项目托管平台
#
# 版本库
#
#
# 项目托管平台
#
@ -77,6 +171,12 @@ en:
label_repository_plural: Repositories
enumeration_activities: Activities
text_select_project_modules: "Select modules to enable for this project:"
project_module_issue_tracking: Issue tracking
project_module_time_tracking: Time tracking
project_module_course: 课程
project_module_boards: Forums
#
# 项目托管平台
#
@ -100,7 +200,7 @@ en:
#
# 项目托管平台
#
# 新建项目
# 新建项目/项目配置 >信息
#
label_project_new_description: "A project can be used to do anything that requires distributed collaboration."
field_name: Name
@ -155,6 +255,10 @@ en:
#
# 项目托管平台
#
# 项目得分
#
label_approve: Approve
label_refusal: Refusal

View File

@ -22,7 +22,9 @@ zh:
#
lable_hot_projects: 热门项目
label_private: 私有
label_project_member_amount: "%{count}人"
label_project_member_amount:
one: "%{count}人"
other: "%{count}人"
label_project_score_tips: 项目得分,综合考虑了项目的各项活动,反映了该项目的活跃程度
label_project_score: 项目评分
@ -32,13 +34,14 @@ zh:
#
# 左边栏
#
label_id: "ID:"
label_project_id: "项目ID:"
label_apply_project: 申请加入
label_exit_project: 退出项目
label_apply_project_waiting: 已处理申请,请等待管理员审核
label_unapply_project: 取消申请
lable_sure_exit_project: 是否确认退出该项目
label_member: 成员
project_module_attachments: 资源
@ -49,22 +52,119 @@ zh:
project_module_boards: 讨论区
project_module_boards_post: 发帖
# 与课程公用资源库
project_module_files: 资源库
project_module_repository: 版本库
project_module_create_repository: 创建版本库
label_project_more: 更多
project_module_news: 新闻
project_module_wiki: Wiki
project_module_code_review: 代码审查
project_module_calendar: 日历
project_module_gantt: 甘特图
project_module_documents: 文档
label_roadmap: 里程碑 #版本路线图
project_module_dts: DTS测试工具
label_project_tool_response: 用户反馈
label_module_share: DTS测试工具
label_project_overview: "项目简介:"
label_expend_information: 展开更多信息
#
# 项目托管平台
#
# 项目成员
#
label_member_list: 成员列表
label_member_since: "加入"
label_user_for_project_grade: 个人得分
default_role_manager: 管理人员
default_role_developer: 开发人员
default_role_reporter: 报告人员
#
# 项目托管平台
#
# 关注者列表
#
label_followers: 关注
label_contribute_to:
one: "参与了 %{count}个项目:"
other: "参与了 %{count}个项目:"
#
# 项目托管平台
#
# 资源库
#
lable_file_sharingarea: 资源共享区
label_upload_files: 上传文件
# 资源库(附件)公用 > 关联资源
label_relation_files: 关联已有资源
label_search_by_keyword: "按关键字搜索:"
label_files_filter: "资源过滤:"
field_filename: 文件
field_filesize: 大小
field_filecontenttype: 内容分类
field_filetype: 文件格式
field_file_dense: 是否公开
field_downloads: 下载次数
attachment_sufix_browse: "文件类型"
attachment_browse: "内容类型"
attachment_all: "全部"
label_unknow_type: 未知类型
# 资源库(附件)公用 > 上传文件
label_attachment_new: 新建文件
field_version: 版本
attachment_type: "分类"
label_attachment_plural: 文件
label_no_file_uploaded: 未上传文件
label_max_size: 最大文件大小
label_optional_description: 可选的描述
#
# 项目托管平台
#
# 问题跟踪
#
#
# 项目托管平台
#
# 项目讨论区
#
#
# 项目托管平台
#
# 资源库
#
#
# 项目托管平台
#
# 版本库
#
#
# 项目托管平台
@ -79,8 +179,12 @@ zh:
text_select_project_modules: '请选择此项目可以使用的模块:'
project_module_issue_tracking: 问题跟踪
project_moule_boards_show: 项目论坛
project_module_time_tracking: 时间跟踪
project_module_course: 课程
#
# 项目托管平台
#
@ -91,6 +195,7 @@ zh:
label_invite_email_tips: 输入好友邮箱地址Trustie会自动为该邮箱注册用户
notice_registed_success: 您输入的邮箱为空或者该邮箱已被注册!
label_email_format_error: 您所填写的电子邮件格式不正确
label_user_role_null: 用户和角色不能留空!
label_send_email: 免费发送
label_input_email: 请输入邮箱地址

View File

@ -77,8 +77,6 @@ en:
label_technical_title: Title
label_bidding_user_studentcode: Student ID
label_account_developer: Developer
label_account_student: Student
#
@ -112,7 +110,7 @@ en:
label_layouts_feedback: "a message "
label_of_feedback: from
label_goto: Go to>>
label_goto: "Go to»"
label_activity_project: "Project"
label_active_call: call
@ -180,12 +178,12 @@ en:
#
label_responses: Messages
label_user_response: Feedback
label_leave_a_message: Leave him/her a message
label_leave_a_message: "Leave him/her a message"
button_leave_meassge: Submit
button_clear_meassge: Reset
label_user_login_new: Login
label_user_login_tips: You haven't logged in, please login first to leave a message!
label_user_login_tips: "You haven't logged in, please login first to leave a message!"
label_bid_respond_delete: Delete
label_bid_respond_quote: Respond

View File

@ -36,6 +36,7 @@ zh:
label_user_edit: "修改资料"
label_user_score: 个人综合得分
# 用户身份在/my的修改资料下
label_user_score_of_collaboration: 协同得分
label_user_score_of_influence: 影响力得分
label_user_score_of_skill: 技术得分
@ -87,10 +88,9 @@ zh:
label_technicl_title_associate_professor: 副教授
label_technicl_title_lecturer: 讲师
label_technicl_title_teaching_assistant: 助教
# 用户身份(学生、开发者)标签在/my的修改资料下
label_bidding_user_studentcode: 学号
label_account_developer: 开发者
label_account_student: 学生
label_no_current_fans: 该用户暂无粉丝
label_no_current_watchers: 该用户暂未关注其他用户
@ -115,7 +115,7 @@ zh:
label_of_feedback:
label_layouts_feedback: 留言
label_goto: 前往>>
label_goto: "前往»"
label_activity_project: "项目:"
label_active_call: 需求

View File

@ -99,10 +99,9 @@ zh:
lastname_empty: 姓氏不能为空
enterprise_empty: 企业名不能为空
field_lastname_eg: '(例:张三丰,请填写[张])'
field_filename: 文件
field_file_dense: 是否公开
field_filesize: 大小
field_downloads: 下载次数
field_author: 作者
field_created_on: 创建于
field_updated_on: 更新于
@ -130,13 +129,12 @@ zh:
field_priority: 优先级
field_fixed_version: 目标版本
field_user: 用户
field_principal: 用户/用户组
field_principal: 用户
field_role: 角色
field_homepage: 主页
field_time: 课时
field_class_period: 学时
field_code: 学分
field_is_public: 公开
field_open_student: 学生列表公开
field_parent: 上级项目
field_is_in_roadmap: 在路线图中显示
@ -145,7 +143,6 @@ zh:
field_last_login_on: 最后登录
field_language: 语言
field_effective_date: 日期
field_version: 版本
field_type: 类型
field_host: 主机
field_port: 端口
@ -350,17 +347,9 @@ zh:
permission_contest_attachments_download: 竞赛附件下载
permission_upload_attachments: 资源上传
project_module_issue_tracking: 问题跟踪
project_moule_boards_show: 项目论坛
project_module_time_tracking: 时间跟踪
project_module_course: 课程
label_user: 用户
label_user_plural: 用户列表
@ -474,8 +463,6 @@ zh:
label_new_contest: 竞赛
label_requirement_focus: 关注需求
label_developer: 用户
label_account_developer: 开发者
label_account_student: 学生
label_enterprise_into: 进入企业
label_college_into: 进入高校
label_investor: 投资人:
@ -517,7 +504,7 @@ zh:
label_summer: 夏季学期
label_autumn: 秋季学期
label_winter: 冬季学期
label_followers: 关注
label_teacher_list: 教师列表
label_student_list: 学生列表
@ -566,15 +553,15 @@ zh:
label_text: 文本
label_attribute: 属性
label_attribute_plural: 属性
label_no_data: 没有任何数据可供显示
label_change_status: 变更状态
label_history: 历史记录
label_attachment: 文件
label_attachment_new: 新建文件
label_file_upload: 上传资料
label_course_file_upload: 上传了课件
label_attachment_delete: 删除文件
label_attachment_plural: 文件
label_file_added: 文件已添加
label_report: 报表
label_report_plural: 报表
@ -700,13 +687,11 @@ zh:
label_latest_revision_plural: 最近的修订版本
label_view_revisions: 查看修订
label_view_all_revisions: 查看所有修订
label_no_file_uploaded: 未上传文件
label_max_size: 最大文件大小
label_sort_highest: 置顶
label_sort_higher: 上移
label_sort_lower: 下移
label_sort_lowest: 置底
label_roadmap: 里程碑 #版本路线图
label_roadmap_due_in: "截止日期到 %{value}"
label_roadmap_overdue: "%{value} 延期"
label_roadmap_no_issues: 该版本没有问题
@ -855,7 +840,7 @@ zh:
label_plugins: 插件
label_ldap_authentication: LDAP 认证
label_downloads_abbr: D/L
label_optional_description: 可选的描述
label_add_another_file: 添加其它文件
label_preferences: 首选项
label_chronological_order: 按时间顺序
@ -923,8 +908,6 @@ zh:
button_sort: 排序
button_log_time: 登记工时
button_rollback: 恢复到这个版本
button_watch: 跟踪
button_unwatch: 取消跟踪
button_reply: 回复
button_archive: 存档
button_unarchive: 取消存档
@ -1011,9 +994,6 @@ zh:
text_applied_project: "用户 %{id} 申请加入项目 %{project}"
text_issue_expire: "分配给您的任务%{issue}即将到期"
default_role_manager: 管理人员
default_role_developer: 开发人员
default_role_reporter: 报告人员
default_tracker_bug: 错误
default_tracker_feature: 功能
default_tracker_support: 支持
@ -1107,7 +1087,7 @@ zh:
description_all_columns: 所有列
button_export: 导出
label_export_options: "%{export_format} 导出选项"
error_attachment_too_big: 该文件无法上传。超过文件大小限制 (%{max_size})
error_pic_type: "仅支持如下图片格式:"
notice_failed_to_save_time_entries: "无法保存下列所选取的 %{total} 个项目中的 %{count} 工时: %{ids}。"
label_x_issues:
@ -1236,11 +1216,6 @@ zh:
zero: 个关注者
one: 个关注者
other: 个关注者
#end
label_member_since: 加入
label_contribute_to: 参与了 %{project_count} 个项目:
#modify by men
#end
label_total_commit: 共%{total_commit}次提交
label_question_number: 第%{question_number}题:
@ -1257,7 +1232,7 @@ zh:
label_type_as: 类型为
label_status_as: 状态为
label_priority_as: 优先级为
label_member_list: 成员列表
label_author_name: 由%{author_name}发表了
label_post_on: 发表了
@ -1271,12 +1246,8 @@ zh:
#added by liuping
button_unfollow: 取消关注
button_follow: 关注
label_followers: 关注
label_delete_confirm: 确认删除?
label_more_tags: 更多
label_tags_bid: 需求名称
label_tags_course_name: 课程名称
label_tags_bid_description: 需求描述
@ -1613,8 +1584,6 @@ zh:
label_code_submit_number: 代码提交次数
label_topic_number: 讨论区发言数量
label_files_filter: 资源过滤:
label_join_contest: 加入竞赛
@ -1741,7 +1710,6 @@ zh:
label_project_grade: 项目得分
label_user_grade: 个人得分
label_user_for_project_grade: 个人得分
label_system_grade: 系统评分
label_ta: 助教
@ -1807,7 +1775,6 @@ zh:
you_are_master: 您是该项目的版主
#add by linchun (竞赛相关)
label_upload_files: 上传文件
label_upload_softwarepackage: 上传软件包
label_upload_cuttingphoto: 上传截图
label_contests_reward_method: 奖励方式
@ -1888,7 +1855,6 @@ zh:
one: 个动态
other: 个动态
label_relation_files: 关联已有资源
label_contest_settings: 配置竞赛
label_contest_delete: 删除竞赛
label_noawards_current: 暂未评奖
@ -1945,12 +1911,6 @@ zh:
lable_not_receive_mail: 点此设置接收本站邮件偏好!
label_contest_notification: 竞赛通知
#english site translation
label_current_hot_contest: 最新热门竞赛
label_current_attendingcontest_work: 最新参赛作品
label_issue_feedback_activities: 问题和反馈动态
label_more_information: 更多>>
label_release_time: 发布时间
label_weixin: 微信扫码
@ -1985,7 +1945,6 @@ zh:
lable_hot_course: 活跃课程
lable_student_list_visable: 学生列表是否公开
lable_sure_exit_project: 是否确认退出该项目
lable_input_class_vilidate: 学时只能为整数
lable_school_list: 学校列表
@ -1993,7 +1952,6 @@ zh:
lable_teacher_evaluation: 作业综评
lable_course_teacher: 主讲老师
lable_course_end: 课程学期已结束
lable_file_sharingarea: 资源共享区
label_no_contest_news_description: 竞赛描述不能为空
label_contest_news_condition: 竞赛描述超过5000个汉字
label_no_contest_news_title: 竞赛标题不能为空
@ -2061,13 +2019,6 @@ zh:
label_enterprise_nil: 该模块为最新上线模块,目前还没有创建企业项目!
label_enterprises: 组织
label_tags_opensource: 开源项目
label_attachment_category: 所属分类
label_attachment_download_num: 下载
label_attachment_size: 大小
label_attachment_sharer: 共享者
label_attachment_upload_time: 上传时间
#api
label_recently_updated_notification: 最近更新了通知
@ -2075,9 +2026,12 @@ zh:
label_recently_updated_message: 最近更新了留言
label_recently_updated_courseware: 最近更新了课件
label_no_courses: 您没有参与任何课程,请搜索课程、加入课程,或者创建课程吧!
label_commit_failed: 提交失败
#api end
label_end_time: 截止时间
label_send_email: 确定发送
label_input_email: 请输入邮箱地址
project_module_files: 资源库

View File

@ -27,6 +27,9 @@
RedmineApp::Application.routes.draw do
resources :discuss_demos
#match '/discuss_demos/new',:to => 'discuss_demo#create',:via =>[:post]
#match '/discuss_demo/show',:to => 'discuss_demo#show'
mount Mobile::API => '/api'
resources :homework_users

View File

@ -0,0 +1,9 @@
class CreateDiscussDemos < ActiveRecord::Migration
def change
create_table :discuss_demos do |t|
t.string :title
t.text :body
t.timestamps
end
end
end

View File

@ -0,0 +1,17 @@
class CreateKindeditorAssets < ActiveRecord::Migration
def self.up
create_table :kindeditor_assets do |t|
t.string :asset
t.integer :file_size
t.string :file_type
t.integer :owner_id
t.string :asset_type # list by kindeditor: image, file, media, flash
t.timestamps
end
end
def self.down
drop_table :kindeditor_assets
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20150311013036) do
ActiveRecord::Schema.define(:version => 20150305081132) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,233 @@
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
* Arabic Translation By daif alotaibi (http://daif.net/)
*******************************************************************************/
KindEditor.lang({
source : 'عرض المصدر',
preview : 'معاينة الصفحة',
undo : 'تراجع(Ctrl+Z)',
redo : 'إعادة التراجع(Ctrl+Y)',
cut : 'قص(Ctrl+X)',
copy : 'نسخ(Ctrl+C)',
paste : 'لصق(Ctrl+V)',
plainpaste : 'لصق كنص عادي',
wordpaste : 'لصق من مايكروسفت ورد',
selectall : 'تحديد الكل',
justifyleft : 'محاذاه لليسار',
justifycenter : 'محاذاه للوسط',
justifyright : 'محاذاه لليمين',
justifyfull : 'محاذاه تلقائية',
insertorderedlist : 'قائمة مرقمه',
insertunorderedlist : 'قائمة نقطية',
indent : 'إزاحه النص',
outdent : 'إلغاء الازاحة',
subscript : 'أسفل النص',
superscript : 'أعلى النص',
formatblock : 'Paragraph format',
fontname : 'نوع الخط',
fontsize : 'حجم الخط',
forecolor : 'لون النص',
hilitecolor : 'لون خلفية النص',
bold : 'عريض(Ctrl+B)',
italic : 'مائل(Ctrl+I)',
underline : 'خط تحت النص(Ctrl+U)',
strikethrough : 'خط على النص',
removeformat : 'إزالة التنسيق',
image : 'إدراج صورة',
multiimage : 'Multi image',
flash : 'إدراج فلاش',
media : 'إدراج وسائط متعددة',
table : 'إدراج جدول',
tablecell : 'خلية',
hr : 'إدراج خط أفقي',
emoticons : 'إدراج وجه ضاحك',
link : 'رابط',
unlink : 'إزالة الرابط',
fullscreen : 'محرر ملئ الشاشة',
about : 'حول',
print : 'طباعة',
filemanager : 'مدير الملفات',
code : 'إدراج نص برمجي',
map : 'خرائط قووقل',
baidumap : 'خرائط قووقل',
lineheight : 'إرتفاع السطر',
clearhtml : 'مسح كود HTML',
pagebreak : 'إدراج فاصل صفحات',
quickformat : 'تنسيق سريع',
insertfile : 'إدراج ملف',
template : 'إدراج قالب',
anchor : 'رابط',
yes : 'موافق',
no : 'إلغاء',
close : 'إغلاق',
editImage : 'خصائص الصورة',
deleteImage : 'حذفالصورة',
editFlash : 'خصائص الفلاش',
deleteFlash : 'حذف الفلاش',
editMedia : 'خصائص الوسائط',
deleteMedia : 'حذف الوسائط',
editLink : 'خصائص الرابط',
deleteLink : 'إزالة الرابط',
tableprop : 'خصائص الجدول',
tablecellprop : 'خصائص الخلية',
tableinsert : 'إدراج جدول',
tabledelete : 'حذف جدول',
tablecolinsertleft : 'إدراج عمود لليسار',
tablecolinsertright : 'إدراج عمود لليسار',
tablerowinsertabove : 'إدراج صف للأعلى',
tablerowinsertbelow : 'إدراج صف للأسفل',
tablerowmerge : 'دمج للأسفل',
tablecolmerge : 'دمج لليمين',
tablerowsplit : 'تقسم الصف',
tablecolsplit : 'تقسيم العمود',
tablecoldelete : 'حذف العمود',
tablerowdelete : 'حذف الصف',
noColor : 'إفتراضي',
pleaseSelectFile : 'Please select file.',
invalidImg : "الرجاء إدخال رابط صحيح.\nالملفات المسموح بها: jpg,gif,bmp,png",
invalidMedia : "الرجاء إدخال رابط صحيح.\nالملفات المسموح بها: swf,flv,mp3,wav,wma,wmv,mid,avi,mpg,asf,rm,rmvb",
invalidWidth : "العرض يجب أن يكون رقم.",
invalidHeight : "الإرتفاع يجب أن يكون رقم.",
invalidBorder : "عرض الحد يجب أن يكون رقم.",
invalidUrl : "الرجاء إدخال رابط حيح.",
invalidRows : 'صفوف غير صحيح.',
invalidCols : 'أعمدة غير صحيحة.',
invalidPadding : 'The padding must be number.',
invalidSpacing : 'The spacing must be number.',
invalidJson : 'Invalid JSON string.',
uploadSuccess : 'تم رفع الملف بنجاح.',
cutError : 'حاليا غير مدعومة من المتصفح, إستخدم إختصار لوحة المفاتيح (Ctrl+X).',
copyError : 'حاليا غير مدعومة من المتصفح, إستخدم إختصار لوحة المفاتيح (Ctrl+C).',
pasteError : 'حاليا غير مدعومة من المتصفح, إستخدم إختصار لوحة المفاتيح (Ctrl+V).',
ajaxLoading : 'Loading ...',
uploadLoading : 'Uploading ...',
uploadError : 'Upload Error',
'plainpaste.comment' : 'إستخدم إختصار لوحة المفاتيح (Ctrl+V) للصق داخل النافذة.',
'wordpaste.comment' : 'إستخدم إختصار لوحة المفاتيح (Ctrl+V) للصق داخل النافذة.',
'code.pleaseInput' : 'Please input code.',
'link.url' : 'الرابط',
'link.linkType' : 'الهدف',
'link.newWindow' : 'نافذة جديدة',
'link.selfWindow' : 'نفس النافذة',
'flash.url' : 'الرابط',
'flash.width' : 'العرض',
'flash.height' : 'الإرتفاع',
'flash.upload' : 'رفع',
'flash.viewServer' : 'أستعراض',
'media.url' : 'الرابط',
'media.width' : 'العرض',
'media.height' : 'الإرتفاع',
'media.autostart' : 'تشغيل تلقائي',
'media.upload' : 'رفع',
'media.viewServer' : 'أستعراض',
'image.remoteImage' : 'إدراج الرابط',
'image.localImage' : 'رفع',
'image.remoteUrl' : 'الرابط',
'image.localUrl' : 'الملف',
'image.size' : 'الحجم',
'image.width' : 'العرض',
'image.height' : 'الإرتفاع',
'image.resetSize' : 'إستعادة الأبعاد',
'image.align' : 'محاذاة',
'image.defaultAlign' : 'الإفتراضي',
'image.leftAlign' : 'اليسار',
'image.rightAlign' : 'اليمين',
'image.imgTitle' : 'العنوان',
'image.upload' : 'أستعراض',
'image.viewServer' : 'أستعراض',
'multiimage.uploadDesc' : 'Allows users to upload <%=uploadLimit%> images, single image size not exceeding <%=sizeLimit%>',
'multiimage.startUpload' : 'Start upload',
'multiimage.clearAll' : 'Clear all',
'multiimage.insertAll' : 'Insert all',
'multiimage.queueLimitExceeded' : 'Queue limit exceeded.',
'multiimage.fileExceedsSizeLimit' : 'File exceeds size limit.',
'multiimage.zeroByteFile' : 'Zero byte file.',
'multiimage.invalidFiletype' : 'Invalid file type.',
'multiimage.unknownError' : 'Unknown upload error.',
'multiimage.pending' : 'Pending ...',
'multiimage.uploadError' : 'Upload error',
'filemanager.emptyFolder' : 'فارغ',
'filemanager.moveup' : 'المجلد الأب',
'filemanager.viewType' : 'العرض: ',
'filemanager.viewImage' : 'مصغرات',
'filemanager.listImage' : 'قائمة',
'filemanager.orderType' : 'الترتيب: ',
'filemanager.fileName' : 'بالإسم',
'filemanager.fileSize' : 'بالحجم',
'filemanager.fileType' : 'بالنوع',
'insertfile.url' : 'الرابط',
'insertfile.title' : 'العنوان',
'insertfile.upload' : 'رفع',
'insertfile.viewServer' : 'أستعراض',
'table.cells' : 'خلايا',
'table.rows' : 'صفوف',
'table.cols' : 'أعمدة',
'table.size' : 'الأبعاد',
'table.width' : 'العرض',
'table.height' : 'الإرتفاع',
'table.percent' : '%',
'table.px' : 'px',
'table.space' : 'الخارج',
'table.padding' : 'الداخل',
'table.spacing' : 'الفراغات',
'table.align' : 'محاذاه',
'table.textAlign' : 'افقى',
'table.verticalAlign' : 'رأسي',
'table.alignDefault' : 'إفتراضي',
'table.alignLeft' : 'يسار',
'table.alignCenter' : 'وسط',
'table.alignRight' : 'يمين',
'table.alignTop' : 'أعلى',
'table.alignMiddle' : 'منتصف',
'table.alignBottom' : 'أسفل',
'table.alignBaseline' : 'Baseline',
'table.border' : 'الحدود',
'table.borderWidth' : 'العرض',
'table.borderColor' : 'اللون',
'table.backgroundColor' : 'الخلفية',
'map.address' : 'العنوان: ',
'map.search' : 'بحث',
'baidumap.address' : 'العنوان: ',
'baidumap.search' : 'بحث',
'baidumap.insertDynamicMap' : 'Dynamic Map',
'anchor.name' : 'إسم الرابط',
'formatblock.formatBlock' : {
h1 : 'عنوان 1',
h2 : 'عنوان 2',
h3 : 'عنوان 3',
h4 : 'عنوان 4',
p : 'عادي'
},
'fontname.fontName' : {
'Arial' : 'Arial',
'Arial Black' : 'Arial Black',
'Comic Sans MS' : 'Comic Sans MS',
'Courier New' : 'Courier New',
'Garamond' : 'Garamond',
'Georgia' : 'Georgia',
'Tahoma' : 'Tahoma',
'Times New Roman' : 'Times New Roman',
'Trebuchet MS' : 'Trebuchet MS',
'Verdana' : 'Verdana'
},
'lineheight.lineHeight' : [
{'1' : 'إرتفاع السطر 1'},
{'1.5' : 'إرتفاع السطر 1.5'},
{'2' : 'إرتفاع السطر 2'},
{'2.5' : 'إرتفاع السطر 2.5'},
{'3' : 'إرتفاع السطر 3'}
],
'template.selectTemplate' : 'قالب',
'template.replaceContent' : 'إستبدال المحتوى الحالي',
'template.fileList' : {
'1.html' : 'صورة ونص',
'2.html' : 'جدول',
'3.html' : 'قائمة'
}
}, 'ar');

View File

@ -0,0 +1,232 @@
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
*******************************************************************************/
KindEditor.lang({
source : 'Source',
preview : 'Preview',
undo : 'Undo(Ctrl+Z)',
redo : 'Redo(Ctrl+Y)',
cut : 'Cut(Ctrl+X)',
copy : 'Copy(Ctrl+C)',
paste : 'Paste(Ctrl+V)',
plainpaste : 'Paste as plain text',
wordpaste : 'Paste from Word',
selectall : 'Select all',
justifyleft : 'Align left',
justifycenter : 'Align center',
justifyright : 'Align right',
justifyfull : 'Align full',
insertorderedlist : 'Ordered list',
insertunorderedlist : 'Unordered list',
indent : 'Increase indent',
outdent : 'Decrease indent',
subscript : 'Subscript',
superscript : 'Superscript',
formatblock : 'Paragraph format',
fontname : 'Font family',
fontsize : 'Font size',
forecolor : 'Text color',
hilitecolor : 'Highlight color',
bold : 'Bold(Ctrl+B)',
italic : 'Italic(Ctrl+I)',
underline : 'Underline(Ctrl+U)',
strikethrough : 'Strikethrough',
removeformat : 'Remove format',
image : 'Image',
multiimage : 'Multi image',
flash : 'Flash',
media : 'Embeded media',
table : 'Table',
tablecell : 'Cell',
hr : 'Insert horizontal line',
emoticons : 'Insert emoticon',
link : 'Link',
unlink : 'Unlink',
fullscreen : 'Toggle fullscreen mode',
about : 'About',
print : 'Print',
filemanager : 'File Manager',
code : 'Insert code',
map : 'Google Maps',
baidumap : 'Baidu Maps',
lineheight : 'Line height',
clearhtml : 'Clear HTML code',
pagebreak : 'Insert Page Break',
quickformat : 'Quick Format',
insertfile : 'Insert file',
template : 'Insert Template',
anchor : 'Anchor',
yes : 'OK',
no : 'Cancel',
close : 'Close',
editImage : 'Image properties',
deleteImage : 'Delete image',
editFlash : 'Flash properties',
deleteFlash : 'Delete flash',
editMedia : 'Media properties',
deleteMedia : 'Delete media',
editLink : 'Link properties',
deleteLink : 'Unlink',
tableprop : 'Table properties',
tablecellprop : 'Cell properties',
tableinsert : 'Insert table',
tabledelete : 'Delete table',
tablecolinsertleft : 'Insert column left',
tablecolinsertright : 'Insert column right',
tablerowinsertabove : 'Insert row above',
tablerowinsertbelow : 'Insert row below',
tablerowmerge : 'Merge down',
tablecolmerge : 'Merge right',
tablerowsplit : 'Split row',
tablecolsplit : 'Split column',
tablecoldelete : 'Delete column',
tablerowdelete : 'Delete row',
noColor : 'Default',
pleaseSelectFile : 'Please select file.',
invalidImg : "Please type valid URL.\nAllowed file extension: jpg,gif,bmp,png",
invalidMedia : "Please type valid URL.\nAllowed file extension: swf,flv,mp3,wav,wma,wmv,mid,avi,mpg,asf,rm,rmvb",
invalidWidth : "The width must be number.",
invalidHeight : "The height must be number.",
invalidBorder : "The border must be number.",
invalidUrl : "Please type valid URL.",
invalidRows : 'Invalid rows.',
invalidCols : 'Invalid columns.',
invalidPadding : 'The padding must be number.',
invalidSpacing : 'The spacing must be number.',
invalidJson : 'Invalid JSON string.',
uploadSuccess : 'Upload success.',
cutError : 'Currently not supported by your browser, use keyboard shortcut(Ctrl+X) instead.',
copyError : 'Currently not supported by your browser, use keyboard shortcut(Ctrl+C) instead.',
pasteError : 'Currently not supported by your browser, use keyboard shortcut(Ctrl+V) instead.',
ajaxLoading : 'Loading ...',
uploadLoading : 'Uploading ...',
uploadError : 'Upload Error',
'plainpaste.comment' : 'Use keyboard shortcut(Ctrl+V) to paste the text into the window.',
'wordpaste.comment' : 'Use keyboard shortcut(Ctrl+V) to paste the text into the window.',
'code.pleaseInput' : 'Please input code.',
'link.url' : 'URL',
'link.linkType' : 'Target',
'link.newWindow' : 'New window',
'link.selfWindow' : 'Same window',
'flash.url' : 'URL',
'flash.width' : 'Width',
'flash.height' : 'Height',
'flash.upload' : 'Upload',
'flash.viewServer' : 'Browse',
'media.url' : 'URL',
'media.width' : 'Width',
'media.height' : 'Height',
'media.autostart' : 'Auto start',
'media.upload' : 'Upload',
'media.viewServer' : 'Browse',
'image.remoteImage' : 'Insert URL',
'image.localImage' : 'Upload',
'image.remoteUrl' : 'URL',
'image.localUrl' : 'File',
'image.size' : 'Size',
'image.width' : 'Width',
'image.height' : 'Height',
'image.resetSize' : 'Reset dimensions',
'image.align' : 'Align',
'image.defaultAlign' : 'Default',
'image.leftAlign' : 'Left',
'image.rightAlign' : 'Right',
'image.imgTitle' : 'Title',
'image.upload' : 'Browse',
'image.viewServer' : 'Browse',
'multiimage.uploadDesc' : 'Allows users to upload <%=uploadLimit%> images, single image size not exceeding <%=sizeLimit%>',
'multiimage.startUpload' : 'Start upload',
'multiimage.clearAll' : 'Clear all',
'multiimage.insertAll' : 'Insert all',
'multiimage.queueLimitExceeded' : 'Queue limit exceeded.',
'multiimage.fileExceedsSizeLimit' : 'File exceeds size limit.',
'multiimage.zeroByteFile' : 'Zero byte file.',
'multiimage.invalidFiletype' : 'Invalid file type.',
'multiimage.unknownError' : 'Unknown upload error.',
'multiimage.pending' : 'Pending ...',
'multiimage.uploadError' : 'Upload error',
'filemanager.emptyFolder' : 'Blank',
'filemanager.moveup' : 'Parent folder',
'filemanager.viewType' : 'Display: ',
'filemanager.viewImage' : 'Thumbnails',
'filemanager.listImage' : 'List',
'filemanager.orderType' : 'Sorting: ',
'filemanager.fileName' : 'By name',
'filemanager.fileSize' : 'By size',
'filemanager.fileType' : 'By type',
'insertfile.url' : 'URL',
'insertfile.title' : 'Title',
'insertfile.upload' : 'Upload',
'insertfile.viewServer' : 'Browse',
'table.cells' : 'Cells',
'table.rows' : 'Rows',
'table.cols' : 'Columns',
'table.size' : 'Dimensions',
'table.width' : 'Width',
'table.height' : 'Height',
'table.percent' : '%',
'table.px' : 'px',
'table.space' : 'Space',
'table.padding' : 'Padding',
'table.spacing' : 'Spacing',
'table.align' : 'Align',
'table.textAlign' : 'Horizontal',
'table.verticalAlign' : 'Vertical',
'table.alignDefault' : 'Default',
'table.alignLeft' : 'Left',
'table.alignCenter' : 'Center',
'table.alignRight' : 'Right',
'table.alignTop' : 'Top',
'table.alignMiddle' : 'Middle',
'table.alignBottom' : 'Bottom',
'table.alignBaseline' : 'Baseline',
'table.border' : 'Border',
'table.borderWidth' : 'Width',
'table.borderColor' : 'Color',
'table.backgroundColor' : 'Background',
'map.address' : 'Address: ',
'map.search' : 'Search',
'baidumap.address' : 'Address: ',
'baidumap.search' : 'Search',
'baidumap.insertDynamicMap' : 'Dynamic Map',
'anchor.name' : 'Anchor name',
'formatblock.formatBlock' : {
h1 : 'Heading 1',
h2 : 'Heading 2',
h3 : 'Heading 3',
h4 : 'Heading 4',
p : 'Normal'
},
'fontname.fontName' : {
'Arial' : 'Arial',
'Arial Black' : 'Arial Black',
'Comic Sans MS' : 'Comic Sans MS',
'Courier New' : 'Courier New',
'Garamond' : 'Garamond',
'Georgia' : 'Georgia',
'Tahoma' : 'Tahoma',
'Times New Roman' : 'Times New Roman',
'Trebuchet MS' : 'Trebuchet MS',
'Verdana' : 'Verdana'
},
'lineheight.lineHeight' : [
{'1' : 'Line height 1'},
{'1.5' : 'Line height 1.5'},
{'2' : 'Line height 2'},
{'2.5' : 'Line height 2.5'},
{'3' : 'Line height 3'}
],
'template.selectTemplate' : 'Template',
'template.replaceContent' : 'Replace current content',
'template.fileList' : {
'1.html' : 'Image and Text',
'2.html' : 'Table',
'3.html' : 'List'
}
}, 'en');

View File

@ -0,0 +1,237 @@
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Composite <ukjinplant@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
*******************************************************************************/
KindEditor.lang({
source : '소스',
preview : '미리보기',
undo : '작업취소(Ctrl+Z)',
redo : '작업재개(Ctrl+Y)',
cut : '잘라내기(Ctrl+X)',
copy : '복사(Ctrl+C)',
paste : '붙여넣기(Ctrl+V)',
plainpaste : '일반 텍스트로 붙여넣기',
wordpaste : '워드 문서로 붙여넣기',
selectall : '전체 선택',
justifyleft : '왼쪽 정렬',
justifycenter : '가운데 정렬',
justifyright : '오른쪽 정렬',
justifyfull : '양쪽 정렬',
insertorderedlist : '순서 목록',
insertunorderedlist : '비순서 목록',
indent : '들여쓰기',
outdent : '내어쓰기',
subscript : '아랫첨자',
superscript : '윗첨자',
formatblock : '문단 형식',
fontname : '글꼴',
fontsize : '글자 크기',
forecolor : '글자색',
hilitecolor : '강조색',
bold : '굵게(Ctrl+B)',
italic : '이텔릭(Ctrl+I)',
underline : '빝줄(Ctrl+U)',
strikethrough : '취소선',
removeformat : '형식 제거',
image : '이미지 추가',
multiimage : '여러 이미지 추가',
flash : '플래시 추가',
media : '미디어 추가',
table : '표',
tablecell : '열',
hr : '구분선 추가',
emoticons : '이모티콘 추가',
link : '링크',
unlink : '링크 제거',
fullscreen : '전체 화면 모드',
about : '이 에디터는...',
print : '인쇄',
filemanager : '파일 관리자',
code : '코드 추가',
map : '구글 맵 추가',
baidumap : '바이두 맵 추가',
lineheight : '행 간격',
clearhtml : 'HTML 코드 정리',
pagebreak : '페이지 구분 추가',
quickformat : '빠른 형식',
insertfile : '파일 추가',
template : '템플릿 추가',
anchor : '책갈피',
yes : '확인',
no : '취소',
close : '닫기',
editImage : '이미지 속성',
deleteImage : '이미지 삭제',
editFlash : '플래시 속성',
deleteFlash : '플래시 삭제',
editMedia : '미디어 속성',
deleteMedia : '미디어 삭제',
editLink : '링크 속성',
deleteLink : '링크 삭제',
tableprop : '표 속성',
tablecellprop : '열 속성',
tableinsert : '표 추가',
tabledelete : '표 삭제',
tablecolinsertleft : '왼쪽으로 열 추가',
tablecolinsertright : '오른쪽으로 열 추가',
tablerowinsertabove : '위쪽으로 열 추가',
tablerowinsertbelow : '아래쪽으로 열 추가',
tablerowmerge : '아래로 병합',
tablecolmerge : '오른쪽으로 병합',
tablerowsplit : '행 나누기',
tablecolsplit : '열 나누기',
tablecoldelete : '열 삭제',
tablerowdelete : '행 삭제',
noColor : '기본색',
pleaseSelectFile : '파일 선택',
invalidImg : "올바른 주소를 입력하세요.\njpg,gif,bmp,png 형식이 가능합니다.",
invalidMedia : "올바른 주소를 입력하세요.\nswf,flv,mp3,wav,wma,wmv,mid,avi,mpg,asf,rm,rmvb 형식이 가능합니다.",
invalidWidth : "넓이 값은 숫자여야 합니다.",
invalidHeight : "높이 값은 숫자여야 합니다.",
invalidBorder : "굵기 값은 숫자여야 합니다.",
invalidUrl : "올바른 주소를 입력하세요.",
invalidRows : '올바른 행이 아닙니다.',
invalidCols : '올바른 열이 아닙니다.',
invalidPadding : '안쪽 여백 값은 숫자여야 합니다.',
invalidSpacing : '간격 길이 값은 숫자여야 합니다.',
invalidJson : '올바른 JSON 형식이 아닙니다.',
uploadSuccess : '업로드가 완료되었습니다.',
cutError : '브라우저가 잘라내기 기능을 지원하지 않습니다, 단축키로 대신 사용하세요. (Ctrl+X)',
copyError : '브라우저가 복사 기능을 지원하지 않습니다, 단축키로 대신 사용하세요. (Ctrl+X)',
pasteError : '브라우저가 붙여넣기 기능을 지원하지 않습니다, 단축키로 대신 사용하세요. (Ctrl+X)',
ajaxLoading : '불러오는 중 ...',
uploadLoading : '업로드 중 ...',
uploadError : '업로드 오류',
'plainpaste.comment' : '단축키(Ctrl+V)를 통하여 여기에 텍스트를 붙여넣으세요.',
'wordpaste.comment' : '단축키(Ctrl+V)를 통하여 여기에 워드 텍스트를 붙여넣으세요.',
'code.pleaseInput' : 'Please input code.',
'link.url' : '주소',
'link.linkType' : '창',
'link.newWindow' : '새 창',
'link.selfWindow' : '현재 창',
'flash.url' : '주소',
'flash.width' : '넓이',
'flash.height' : '높이',
'flash.upload' : '업로드',
'flash.viewServer' : '찾아보기',
'media.url' : '주소',
'media.width' : '넓이',
'media.height' : '높이',
'media.autostart' : '자동 시작',
'media.upload' : '업로드',
'media.viewServer' : '찾아보기',
'image.remoteImage' : '외부 이미지',
'image.localImage' : '내부 이미지',
'image.remoteUrl' : '주소',
'image.localUrl' : '파일',
'image.size' : '크기',
'image.width' : '넓이',
'image.height' : '높이',
'image.resetSize' : '기본 크기로',
'image.align' : '정렬',
'image.defaultAlign' : '기본',
'image.leftAlign' : '왼쪽',
'image.rightAlign' : '오른쪽',
'image.imgTitle' : '제목',
'image.upload' : '찾아보기',
'image.viewServer' : '찾아보기',
'multiimage.uploadDesc' : '최대 이미지 개수: <%=uploadLimit%>개, 개당 이미지 크기: <%=sizeLimit%>',
'multiimage.startUpload' : '업로드 시작',
'multiimage.clearAll' : '모두 삭제',
'multiimage.insertAll' : '모두 삽입',
'multiimage.queueLimitExceeded' : '업로드 개수가 초과되었습니다.',
'multiimage.fileExceedsSizeLimit' : '업로드 크기가 초과되었습니다.',
'multiimage.zeroByteFile' : '파일 크기가 없습니다.',
'multiimage.invalidFiletype' : '올바른 이미지가 아닙니다.',
'multiimage.unknownError' : '알 수 없는 업로드 오류가 발생하였습니다.',
'multiimage.pending' : '처리 중 ...',
'multiimage.uploadError' : '업로드 오류',
'filemanager.emptyFolder' : '빈 폴더',
'filemanager.moveup' : '위로',
'filemanager.viewType' : '보기 방식: ',
'filemanager.viewImage' : '미리 보기',
'filemanager.listImage' : '목록',
'filemanager.orderType' : '정렬 방식: ',
'filemanager.fileName' : '이름별',
'filemanager.fileSize' : '크기별',
'filemanager.fileType' : '종류별',
'insertfile.url' : '주소',
'insertfile.title' : '제목',
'insertfile.upload' : '업로드',
'insertfile.viewServer' : '찾아보기',
'table.cells' : '열',
'table.rows' : '행',
'table.cols' : '열',
'table.size' : '표 크기',
'table.width' : '넓이',
'table.height' : '높이',
'table.percent' : '%',
'table.px' : 'px',
'table.space' : '간격',
'table.padding' : '안쪽여백',
'table.spacing' : '간격',
'table.align' : '정렬',
'table.textAlign' : '수직',
'table.verticalAlign' : '수평',
'table.alignDefault' : '기본',
'table.alignLeft' : '왼쪽',
'table.alignCenter' : '가운데',
'table.alignRight' : '오른쪽',
'table.alignTop' : '위쪽',
'table.alignMiddle' : '중간',
'table.alignBottom' : '아래쪽',
'table.alignBaseline' : '글자기준',
'table.border' : '테두리',
'table.borderWidth' : '크기',
'table.borderColor' : '색상',
'table.backgroundColor' : '배경',
'map.address' : '주소: ',
'map.search' : '검색',
'baidumap.address' : '주소: ',
'baidumap.search' : '검색',
'baidumap.insertDynamicMap' : '동적 지도',
'anchor.name' : '책갈피명',
'formatblock.formatBlock' : {
h1 : '제목 1',
h2 : '제목 2',
h3 : '제목 3',
h4 : '제목 4',
p : '본문'
},
'fontname.fontName' : {
'Gulim' : '굴림',
'Dotum' : '돋움',
'Batang' : '바탕',
'Gungsuh' : '궁서',
'Malgun Gothic' : '맑은 고딕',
'Arial' : 'Arial',
'Arial Black' : 'Arial Black',
'Comic Sans MS' : 'Comic Sans MS',
'Courier New' : 'Courier New',
'Garamond' : 'Garamond',
'Georgia' : 'Georgia',
'Tahoma' : 'Tahoma',
'Times New Roman' : 'Times New Roman',
'Trebuchet MS' : 'Trebuchet MS',
'Verdana' : 'Verdana'
},
'lineheight.lineHeight' : [
{'1' : '행간 1'},
{'1.5' : '행간 1.5'},
{'2' : '행간 2'},
{'2.5' : '행간 2.5'},
{'3' : '행간 3'}
],
'template.selectTemplate' : '템플릿',
'template.replaceContent' : '내용 바꾸기',
'template.fileList' : {
'1.html' : '이미지와 텍스트',
'2.html' : '표',
'3.html' : '목록'
}
}, 'ko');

View File

@ -0,0 +1,236 @@
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
*******************************************************************************/
KindEditor.lang({
source : 'HTML代码',
preview : '预览',
undo : '后退(Ctrl+Z)',
redo : '前进(Ctrl+Y)',
cut : '剪切(Ctrl+X)',
copy : '复制(Ctrl+C)',
paste : '粘贴(Ctrl+V)',
plainpaste : '粘贴为无格式文本',
wordpaste : '从Word粘贴',
selectall : '全选(Ctrl+A)',
justifyleft : '左对齐',
justifycenter : '居中',
justifyright : '右对齐',
justifyfull : '两端对齐',
insertorderedlist : '编号',
insertunorderedlist : '项目符号',
indent : '增加缩进',
outdent : '减少缩进',
subscript : '下标',
superscript : '上标',
formatblock : '段落',
fontname : '字体',
fontsize : '文字大小',
forecolor : '文字颜色',
hilitecolor : '文字背景',
bold : '粗体(Ctrl+B)',
italic : '斜体(Ctrl+I)',
underline : '下划线(Ctrl+U)',
strikethrough : '删除线',
removeformat : '删除格式',
image : '图片',
multiimage : '批量图片上传',
flash : 'Flash',
media : '视音频',
table : '表格',
tablecell : '单元格',
hr : '插入横线',
emoticons : '插入表情',
link : '超级链接',
unlink : '取消超级链接',
fullscreen : '全屏显示',
about : '关于',
print : '打印(Ctrl+P)',
filemanager : '文件空间',
code : '插入程序代码',
map : 'Google地图',
baidumap : '百度地图',
lineheight : '行距',
clearhtml : '清理HTML代码',
pagebreak : '插入分页符',
quickformat : '一键排版',
insertfile : '插入文件',
template : '插入模板',
anchor : '锚点',
yes : '确定',
no : '取消',
close : '关闭',
editImage : '图片属性',
deleteImage : '删除图片',
editFlash : 'Flash属性',
deleteFlash : '删除Flash',
editMedia : '视音频属性',
deleteMedia : '删除视音频',
editLink : '超级链接属性',
deleteLink : '取消超级链接',
editAnchor : '锚点属性',
deleteAnchor : '删除锚点',
tableprop : '表格属性',
tablecellprop : '单元格属性',
tableinsert : '插入表格',
tabledelete : '删除表格',
tablecolinsertleft : '左侧插入列',
tablecolinsertright : '右侧插入列',
tablerowinsertabove : '上方插入行',
tablerowinsertbelow : '下方插入行',
tablerowmerge : '向下合并单元格',
tablecolmerge : '向右合并单元格',
tablerowsplit : '拆分行',
tablecolsplit : '拆分列',
tablecoldelete : '删除列',
tablerowdelete : '删除行',
noColor : '无颜色',
pleaseSelectFile : '请选择文件。',
invalidImg : "请输入有效的URL地址。\n只允许jpg,gif,bmp,png格式。",
invalidMedia : "请输入有效的URL地址。\n只允许swf,flv,mp3,wav,wma,wmv,mid,avi,mpg,asf,rm,rmvb格式。",
invalidWidth : "宽度必须为数字。",
invalidHeight : "高度必须为数字。",
invalidBorder : "边框必须为数字。",
invalidUrl : "请输入有效的URL地址。",
invalidRows : '行数为必选项只允许输入大于0的数字。',
invalidCols : '列数为必选项只允许输入大于0的数字。',
invalidPadding : '边距必须为数字。',
invalidSpacing : '间距必须为数字。',
invalidJson : '服务器发生故障。',
uploadSuccess : '上传成功。',
cutError : '您的浏览器安全设置不允许使用剪切操作,请使用快捷键(Ctrl+X)来完成。',
copyError : '您的浏览器安全设置不允许使用复制操作,请使用快捷键(Ctrl+C)来完成。',
pasteError : '您的浏览器安全设置不允许使用粘贴操作,请使用快捷键(Ctrl+V)来完成。',
ajaxLoading : '加载中,请稍候 ...',
uploadLoading : '上传中,请稍候 ...',
uploadError : '上传错误',
'plainpaste.comment' : '请使用快捷键(Ctrl+V)把内容粘贴到下面的方框里。',
'wordpaste.comment' : '请使用快捷键(Ctrl+V)把内容粘贴到下面的方框里。',
'code.pleaseInput' : '请输入程序代码。',
'link.url' : 'URL',
'link.linkType' : '打开类型',
'link.newWindow' : '新窗口',
'link.selfWindow' : '当前窗口',
'flash.url' : 'URL',
'flash.width' : '宽度',
'flash.height' : '高度',
'flash.upload' : '上传',
'flash.viewServer' : '文件空间',
'media.url' : 'URL',
'media.width' : '宽度',
'media.height' : '高度',
'media.autostart' : '自动播放',
'media.upload' : '上传',
'media.viewServer' : '文件空间',
'image.remoteImage' : '网络图片',
'image.localImage' : '本地上传',
'image.remoteUrl' : '图片地址',
'image.localUrl' : '上传文件',
'image.size' : '图片大小',
'image.width' : '宽',
'image.height' : '高',
'image.resetSize' : '重置大小',
'image.align' : '对齐方式',
'image.defaultAlign' : '默认方式',
'image.leftAlign' : '左对齐',
'image.rightAlign' : '右对齐',
'image.imgTitle' : '图片说明',
'image.upload' : '浏览...',
'image.viewServer' : '图片空间',
'multiimage.uploadDesc' : '允许用户同时上传<%=uploadLimit%>张图片,单张图片容量不超过<%=sizeLimit%>',
'multiimage.startUpload' : '开始上传',
'multiimage.clearAll' : '全部清空',
'multiimage.insertAll' : '全部插入',
'multiimage.queueLimitExceeded' : '文件数量超过限制。',
'multiimage.fileExceedsSizeLimit' : '文件大小超过限制。',
'multiimage.zeroByteFile' : '无法上传空文件。',
'multiimage.invalidFiletype' : '文件类型不正确。',
'multiimage.unknownError' : '发生异常,无法上传。',
'multiimage.pending' : '等待上传',
'multiimage.uploadError' : '上传失败',
'filemanager.emptyFolder' : '空文件夹',
'filemanager.moveup' : '移到上一级文件夹',
'filemanager.viewType' : '显示方式:',
'filemanager.viewImage' : '缩略图',
'filemanager.listImage' : '详细信息',
'filemanager.orderType' : '排序方式:',
'filemanager.fileName' : '名称',
'filemanager.fileSize' : '大小',
'filemanager.fileType' : '类型',
'insertfile.url' : 'URL',
'insertfile.title' : '文件说明',
'insertfile.upload' : '上传',
'insertfile.viewServer' : '文件空间',
'table.cells' : '单元格数',
'table.rows' : '行数',
'table.cols' : '列数',
'table.size' : '大小',
'table.width' : '宽度',
'table.height' : '高度',
'table.percent' : '%',
'table.px' : 'px',
'table.space' : '边距间距',
'table.padding' : '边距',
'table.spacing' : '间距',
'table.align' : '对齐方式',
'table.textAlign' : '水平对齐',
'table.verticalAlign' : '垂直对齐',
'table.alignDefault' : '默认',
'table.alignLeft' : '左对齐',
'table.alignCenter' : '居中',
'table.alignRight' : '右对齐',
'table.alignTop' : '顶部',
'table.alignMiddle' : '中部',
'table.alignBottom' : '底部',
'table.alignBaseline' : '基线',
'table.border' : '边框',
'table.borderWidth' : '边框',
'table.borderColor' : '颜色',
'table.backgroundColor' : '背景颜色',
'map.address' : '地址: ',
'map.search' : '搜索',
'baidumap.address' : '地址: ',
'baidumap.search' : '搜索',
'baidumap.insertDynamicMap' : '插入动态地图',
'anchor.name' : '锚点名称',
'formatblock.formatBlock' : {
h1 : '标题 1',
h2 : '标题 2',
h3 : '标题 3',
h4 : '标题 4',
p : '正 文'
},
'fontname.fontName' : {
'SimSun' : '宋体',
'NSimSun' : '新宋体',
'FangSong_GB2312' : '仿宋_GB2312',
'KaiTi_GB2312' : '楷体_GB2312',
'SimHei' : '黑体',
'Microsoft YaHei' : '微软雅黑',
'Arial' : 'Arial',
'Arial Black' : 'Arial Black',
'Times New Roman' : 'Times New Roman',
'Courier New' : 'Courier New',
'Tahoma' : 'Tahoma',
'Verdana' : 'Verdana'
},
'lineheight.lineHeight' : [
{'1' : '单倍行距'},
{'1.5' : '1.5倍行距'},
{'2' : '2倍行距'},
{'2.5' : '2.5倍行距'},
{'3' : '3倍行距'}
],
'template.selectTemplate' : '可选模板',
'template.replaceContent' : '替换当前内容',
'template.fileList' : {
'1.html' : '图片和文字',
'2.html' : '表格',
'3.html' : '项目编号'
}
}, 'zh_CN');

View File

@ -0,0 +1,235 @@
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
*******************************************************************************/
KindEditor.lang({
source : '原始碼',
preview : '預覽',
undo : '復原(Ctrl+Z)',
redo : '重複(Ctrl+Y)',
cut : '剪下(Ctrl+X)',
copy : '複製(Ctrl+C)',
paste : '貼上(Ctrl+V)',
plainpaste : '貼為純文字格式',
wordpaste : '自Word貼上',
selectall : '全選(Ctrl+A)',
justifyleft : '靠左對齊',
justifycenter : '置中',
justifyright : '靠右對齊',
justifyfull : '左右對齊',
insertorderedlist : '編號清單',
insertunorderedlist : '項目清單',
indent : '增加縮排',
outdent : '減少縮排',
subscript : '下標',
superscript : '上標',
formatblock : '標題',
fontname : '字體',
fontsize : '文字大小',
forecolor : '文字顏色',
hilitecolor : '背景顏色',
bold : '粗體(Ctrl+B)',
italic : '斜體(Ctrl+I)',
underline : '底線(Ctrl+U)',
strikethrough : '刪除線',
removeformat : '清除格式',
image : '影像',
multiimage : '批量影像上傳',
flash : 'Flash',
media : '多媒體',
table : '表格',
hr : '插入水平線',
emoticons : '插入表情',
link : '超連結',
unlink : '移除超連結',
fullscreen : '最大化',
about : '關於',
print : '列印(Ctrl+P)',
fileManager : '瀏覽伺服器',
code : '插入程式代碼',
map : 'Google地圖',
baidumap : 'Baidu地圖',
lineheight : '行距',
clearhtml : '清理HTML代碼',
pagebreak : '插入分頁符號',
quickformat : '快速排版',
insertfile : '插入文件',
template : '插入樣板',
anchor : '錨點',
yes : '確定',
no : '取消',
close : '關閉',
editImage : '影像屬性',
deleteImage : '刪除影像',
editFlash : 'Flash屬性',
deleteFlash : '删除Flash',
editMedia : '多媒體屬性',
deleteMedia : '删除多媒體',
editLink : '超連結屬性',
deleteLink : '移除超連結',
tableprop : '表格屬性',
tablecellprop : '儲存格屬性',
tableinsert : '插入表格',
tabledelete : '刪除表格',
tablecolinsertleft : '向左插入列',
tablecolinsertright : '向右插入列',
tablerowinsertabove : '向上插入欄',
tablerowinsertbelow : '下方插入欄',
tablerowmerge : '向下合併單元格',
tablecolmerge : '向右合併單元格',
tablerowsplit : '分割欄',
tablecolsplit : '分割列',
tablecoldelete : '删除列',
tablerowdelete : '删除欄',
noColor : '自動',
pleaseSelectFile : '請選擇文件。',
invalidImg : "請輸入有效的URL。\n只允許jpg,gif,bmp,png格式。",
invalidMedia : "請輸入有效的URL。\n只允許swf,flv,mp3,wav,wma,wmv,mid,avi,mpg,asf,rm,rmvb格式。",
invalidWidth : "寬度必須是數字。",
invalidHeight : "高度必須是數字。",
invalidBorder : "邊框必須是數字。",
invalidUrl : "請輸入有效的URL。",
invalidRows : '欄數是必須輸入項目只允許輸入大於0的數字。',
invalidCols : '列數是必須輸入項目只允許輸入大於0的數字。',
invalidPadding : '內距必須是數字。',
invalidSpacing : '間距必須是數字。',
invalidBorder : '边框必须为数字。',
pleaseInput : "請輸入內容。",
invalidJson : '伺服器發生故障。',
uploadSuccess : '上傳成功。',
cutError : '您的瀏覽器安全設置不允許使用剪下操作,請使用快捷鍵(Ctrl+X)完成。',
copyError : '您的瀏覽器安全設置不允許使用剪下操作,請使用快捷鍵(Ctrl+C)完成。',
pasteError : '您的瀏覽器安全設置不允許使用剪下操作,請使用快捷鍵(Ctrl+V)完成。',
ajaxLoading : '加載中,請稍候 ...',
uploadLoading : '上傳中,請稍候 ...',
uploadError : '上傳錯誤',
'plainpaste.comment' : '請使用快捷鍵(Ctrl+V)把內容貼到下方區域裡。',
'wordpaste.comment' : '請使用快捷鍵(Ctrl+V)把內容貼到下方區域裡。',
'code.pleaseInput' : 'Please input code.',
'link.url' : 'URL',
'link.linkType' : '打開類型',
'link.newWindow' : '新窗口',
'link.selfWindow' : '本頁窗口',
'flash.url' : 'URL',
'flash.width' : '寬度',
'flash.height' : '高度',
'flash.upload' : '上傳',
'flash.viewServer' : '瀏覽',
'media.url' : 'URL',
'media.width' : '寬度',
'media.height' : '高度',
'media.autostart' : '自動播放',
'media.upload' : '上傳',
'media.viewServer' : '瀏覽',
'image.remoteImage' : '網絡影像',
'image.localImage' : '上傳影像',
'image.remoteUrl' : '影像URL',
'image.localUrl' : '影像URL',
'image.size' : '影像大小',
'image.width' : '寬度',
'image.height' : '高度',
'image.resetSize' : '原始大小',
'image.align' : '對齊方式',
'image.defaultAlign' : '未設定',
'image.leftAlign' : '向左對齊',
'image.rightAlign' : '向右對齊',
'image.imgTitle' : '影像說明',
'image.upload' : '瀏覽...',
'image.viewServer' : '瀏覽...',
'multiimage.uploadDesc' : 'Allows users to upload <%=uploadLimit%> images, single image size not exceeding <%=sizeLimit%>',
'multiimage.startUpload' : 'Start upload',
'multiimage.clearAll' : 'Clear all',
'multiimage.insertAll' : 'Insert all',
'multiimage.queueLimitExceeded' : 'Queue limit exceeded.',
'multiimage.fileExceedsSizeLimit' : 'File exceeds size limit.',
'multiimage.zeroByteFile' : 'Zero byte file.',
'multiimage.invalidFiletype' : 'Invalid file type.',
'multiimage.unknownError' : 'Unknown upload error.',
'multiimage.pending' : 'Pending ...',
'multiimage.uploadError' : 'Upload error',
'filemanager.emptyFolder' : '空文件夾',
'filemanager.moveup' : '至上一級文件夾',
'filemanager.viewType' : '顯示方式:',
'filemanager.viewImage' : '縮略圖',
'filemanager.listImage' : '詳細信息',
'filemanager.orderType' : '排序方式:',
'filemanager.fileName' : '名稱',
'filemanager.fileSize' : '大小',
'filemanager.fileType' : '類型',
'insertfile.url' : 'URL',
'insertfile.title' : '文件說明',
'insertfile.upload' : '上傳',
'insertfile.viewServer' : '瀏覽',
'table.cells' : '儲存格數',
'table.rows' : '欄數',
'table.cols' : '列數',
'table.size' : '表格大小',
'table.width' : '寬度',
'table.height' : '高度',
'table.percent' : '%',
'table.px' : 'px',
'table.space' : '內距間距',
'table.padding' : '內距',
'table.spacing' : '間距',
'table.align' : '對齊方式',
'table.textAlign' : '水平對齊',
'table.verticalAlign' : '垂直對齊',
'table.alignDefault' : '未設定',
'table.alignLeft' : '向左對齊',
'table.alignCenter' : '置中',
'table.alignRight' : '向右對齊',
'table.alignTop' : '靠上',
'table.alignMiddle' : '置中',
'table.alignBottom' : '靠下',
'table.alignBaseline' : '基線',
'table.border' : '表格邊框',
'table.borderWidth' : '邊框',
'table.borderColor' : '顏色',
'table.backgroundColor' : '背景顏色',
'map.address' : '住所: ',
'map.search' : '尋找',
'baidumap.address' : '住所: ',
'baidumap.search' : '尋找',
'baidumap.insertDynamicMap' : '插入動態地圖',
'anchor.name' : '錨點名稱',
'formatblock.formatBlock' : {
h1 : '標題 1',
h2 : '標題 2',
h3 : '標題 3',
h4 : '標題 4',
p : '一般'
},
'fontname.fontName' : {
'MingLiU' : '細明體',
'PMingLiU' : '新細明體',
'DFKai-SB' : '標楷體',
'SimSun' : '宋體',
'NSimSun' : '新宋體',
'FangSong' : '仿宋體',
'Arial' : 'Arial',
'Arial Black' : 'Arial Black',
'Times New Roman' : 'Times New Roman',
'Courier New' : 'Courier New',
'Tahoma' : 'Tahoma',
'Verdana' : 'Verdana'
},
'lineheight.lineHeight' : [
{'1' : '单倍行距'},
{'1.5' : '1.5倍行距'},
{'2' : '2倍行距'},
{'2.5' : '2.5倍行距'},
{'3' : '3倍行距'}
],
'template.selectTemplate' : '可選樣板',
'template.replaceContent' : '取代當前內容',
'template.fileList' : {
'1.html' : '影像和文字',
'2.html' : '表格',
'3.html' : '项目清單'
}
}, 'zh_TW');

View File

@ -0,0 +1,46 @@
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
*******************************************************************************/
KindEditor.plugin('anchor', function(K) {
var self = this, name = 'anchor', lang = self.lang(name + '.');
self.plugin.anchor = {
edit : function() {
var html = ['<div style="padding:20px;">',
'<div class="ke-dialog-row">',
'<label for="keName">' + lang.name + '</label>',
'<input class="ke-input-text" type="text" id="keName" name="name" value="" style="width:100px;" />',
'</div>',
'</div>'].join('');
var dialog = self.createDialog({
name : name,
width : 300,
title : self.lang(name),
body : html,
yesBtn : {
name : self.lang('yes'),
click : function(e) {
self.insertHtml('<a name="' + nameBox.val() + '">').hideDialog().focus();
}
}
});
var div = dialog.div,
nameBox = K('input[name="name"]', div);
var img = self.plugin.getSelectedAnchor();
if (img) {
nameBox.val(unescape(img.attr('data-ke-name')));
}
nameBox[0].focus();
nameBox[0].select();
},
'delete' : function() {
self.plugin.getSelectedAnchor().remove();
}
};
self.clickToolbar(name, self.plugin.anchor.edit);
});

View File

@ -0,0 +1,54 @@
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
*******************************************************************************/
KindEditor.plugin('autoheight', function(K) {
var self = this;
if (!self.autoHeightMode) {
return;
}
var minHeight;
function hideScroll() {
var edit = self.edit;
var body = edit.doc.body;
edit.iframe[0].scroll = 'no';
body.style.overflowY = 'hidden';
}
function resetHeight() {
var edit = self.edit;
var body = edit.doc.body;
edit.iframe.height(minHeight);
self.resize(null, Math.max((K.IE ? body.scrollHeight : body.offsetHeight) + 76, minHeight));
}
function init() {
minHeight = K.removeUnit(self.height);
self.edit.afterChange(resetHeight);
hideScroll();
resetHeight();
}
if (self.isCreated) {
init();
} else {
self.afterCreate(init);
}
});
/*
* 如何实现真正的自动高度
* 修改编辑器高度之后再次获取body内容高度时最小值只会是当前iframe的设置高度这样就导致高度只增不减
* 所以每次获取body内容高度之前先将iframe的高度重置为最小高度这样就能获取body的实际高度
* 由此就实现了真正的自动高度
* 测试chromefirefoxIE9IE8
* */

View File

@ -0,0 +1,93 @@
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
*******************************************************************************/
// Baidu Maps: http://dev.baidu.com/wiki/map/index.php?title=%E9%A6%96%E9%A1%B5
KindEditor.plugin('baidumap', function(K) {
var self = this, name = 'baidumap', lang = self.lang(name + '.');
var mapWidth = K.undef(self.mapWidth, 558);
var mapHeight = K.undef(self.mapHeight, 360);
self.clickToolbar(name, function() {
var html = ['<div style="padding:10px 20px;">',
'<div class="ke-header">',
// left start
'<div class="ke-left">',
lang.address + ' <input id="kindeditor_plugin_map_address" name="address" class="ke-input-text" value="" style="width:200px;" /> ',
'<span class="ke-button-common ke-button-outer">',
'<input type="button" name="searchBtn" class="ke-button-common ke-button" value="' + lang.search + '" />',
'</span>',
'</div>',
// right start
'<div class="ke-right">',
'<input type="checkbox" id="keInsertDynamicMap" name="insertDynamicMap" value="1" /> <label for="keInsertDynamicMap">' + lang.insertDynamicMap + '</label>',
'</div>',
'<div class="ke-clearfix"></div>',
'</div>',
'<div class="ke-map" style="width:' + mapWidth + 'px;height:' + mapHeight + 'px;"></div>',
'</div>'].join('');
var dialog = self.createDialog({
name : name,
width : mapWidth + 42,
title : self.lang(name),
body : html,
yesBtn : {
name : self.lang('yes'),
click : function(e) {
var map = win.map;
var centerObj = map.getCenter();
var center = centerObj.lng + ',' + centerObj.lat;
var zoom = map.getZoom();
var url = [checkbox[0].checked ? self.pluginsPath + 'baidumap/index.html' : 'http://api.map.baidu.com/staticimage',
'?center=' + encodeURIComponent(center),
'&zoom=' + encodeURIComponent(zoom),
'&width=' + mapWidth,
'&height=' + mapHeight,
'&markers=' + encodeURIComponent(center),
'&markerStyles=' + encodeURIComponent('l,A')].join('');
if (checkbox[0].checked) {
self.insertHtml('<iframe src="' + url + '" frameborder="0" style="width:' + (mapWidth + 2) + 'px;height:' + (mapHeight + 2) + 'px;"></iframe>');
} else {
self.exec('insertimage', url);
}
self.hideDialog().focus();
}
},
beforeRemove : function() {
searchBtn.remove();
if (doc) {
doc.write('');
}
iframe.remove();
}
});
var div = dialog.div,
addressBox = K('[name="address"]', div),
searchBtn = K('[name="searchBtn"]', div),
checkbox = K('[name="insertDynamicMap"]', dialog.div),
win, doc;
var iframe = K('<iframe class="ke-textarea" frameborder="0" src="' + self.pluginsPath + 'baidumap/map.html" style="width:' + mapWidth + 'px;height:' + mapHeight + 'px;"></iframe>');
function ready() {
win = iframe[0].contentWindow;
doc = K.iframeDoc(iframe);
}
iframe.bind('load', function() {
iframe.unbind('load');
if (K.IE) {
ready();
} else {
setTimeout(ready, 0);
}
});
K('.ke-map', div).replaceWith(iframe);
// search map
searchBtn.click(function() {
win.search(addressBox.val());
});
});
});

View File

@ -0,0 +1,83 @@
<!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 charset="utf-8" />
<meta name="keywords" content="百度地图,百度地图API百度地图自定义工具百度地图所见即所得工具" />
<meta name="description" content="百度地图API自定义地图帮助用户在可视化操作下生成百度地图" />
<title>百度地图API自定义地图</title>
<!--引用百度地图API-->
<style type="text/css">
html,body{margin:0;padding:0;}
.iw_poi_title {color:#CC5522;font-size:14px;font-weight:bold;overflow:hidden;padding-right:13px;white-space:nowrap}
.iw_poi_content {font:12px arial,sans-serif;overflow:visible;padding-top:4px;white-space:-moz-pre-wrap;word-wrap:break-word}
</style>
<script type="text/javascript" src="http://api.map.baidu.com/api?key=&v=1.1&services=true"></script>
</head>
<body onload="initMap();">
<!--百度地图容器-->
<div style="width:697px;height:550px;border:#ccc solid 1px;" id="dituContent"></div>
</body>
<script type="text/javascript">
function getParam(name) {
return location.href.match(new RegExp('[?&]' + name + '=([^?&]+)', 'i')) ? decodeURIComponent(RegExp.$1) : '';
}
var centerParam = getParam('center');
var zoomParam = getParam('zoom');
var widthParam = getParam('width');
var heightParam = getParam('height');
var markersParam = getParam('markers');
var markerStylesParam = getParam('markerStyles');
//创建和初始化地图函数:
function initMap(){
// [FF]切换模式后报错
if (!window.BMap) {
return;
}
var dituContent = document.getElementById('dituContent');
dituContent.style.width = widthParam + 'px';
dituContent.style.height = heightParam + 'px';
createMap();//创建地图
setMapEvent();//设置地图事件
addMapControl();//向地图添加控件
// 创建标注
var markersArr = markersParam.split(',');
var point = new BMap.Point(markersArr[0], markersArr[1]);
var marker = new BMap.Marker(point);
map.addOverlay(marker); // 将标注添加到地图中
}
//创建地图函数:
function createMap(){
var map = new BMap.Map("dituContent");//在百度地图容器中创建一个地图
var centerArr = centerParam.split(',');
var point = new BMap.Point(centerArr[0], centerArr[1]);//定义一个中心点坐标
map.centerAndZoom(point, zoomParam);//设定地图的中心点和坐标并将地图显示在地图容器中
window.map = map;//将map变量存储在全局
}
//地图事件设置函数:
function setMapEvent(){
map.enableDragging();//启用地图拖拽事件,默认启用(可不写)
map.enableScrollWheelZoom();//启用地图滚轮放大缩小
map.enableDoubleClickZoom();//启用鼠标双击放大,默认启用(可不写)
map.enableKeyboard();//启用键盘上下左右键移动地图
}
//地图控件添加函数:
function addMapControl(){
//向地图中添加缩放控件
var ctrl_nav = new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_LEFT,type:BMAP_NAVIGATION_CONTROL_LARGE});
map.addControl(ctrl_nav);
//向地图中添加缩略图控件
var ctrl_ove = new BMap.OverviewMapControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT,isOpen:1});
map.addControl(ctrl_ove);
//向地图中添加比例尺控件
var ctrl_sca = new BMap.ScaleControl({anchor:BMAP_ANCHOR_BOTTOM_LEFT});
map.addControl(ctrl_sca);
}
</script>
</html>

View File

@ -0,0 +1,43 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Baidu Maps</title>
<style>
html { height: 100% }
body { height: 100%; margin: 0; padding: 0; background-color: #FFF }
</style>
<script charset="utf-8" src="http://api.map.baidu.com/api?v=1.3"></script>
<script>
var map, geocoder;
function initialize() {
map = new BMap.Map('map_canvas');
var point = new BMap.Point(121.473704, 31.230393);
map.centerAndZoom(point, 11);
map.addControl(new BMap.NavigationControl());
map.enableScrollWheelZoom();
var gc = new BMap.Geocoder();
gc.getLocation(point, function(rs){
var addComp = rs.addressComponents;
var address = [addComp.city].join('');
parent.document.getElementById("kindeditor_plugin_map_address").value = address;
});
}
function search(address) {
if (!map) return;
var local = new BMap.LocalSearch(map, {
renderOptions: {
map: map,
autoViewport: true,
selectFirstResult: false
}
});
local.search(address);
}
</script>
</head>
<body onload="initialize();">
<div id="map_canvas" style="width:100%; height:100%"></div>
</body>
</html>

View File

@ -0,0 +1,29 @@
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
*******************************************************************************/
KindEditor.plugin('clearhtml', function(K) {
var self = this, name = 'clearhtml';
self.clickToolbar(name, function() {
self.focus();
var html = self.html();
html = html.replace(/(<script[^>]*>)([\s\S]*?)(<\/script>)/ig, '');
html = html.replace(/(<style[^>]*>)([\s\S]*?)(<\/style>)/ig, '');
html = K.formatHtml(html, {
a : ['href', 'target'],
embed : ['src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', '.width', '.height', 'align', 'allowscriptaccess'],
img : ['src', 'width', 'height', 'border', 'alt', 'title', '.width', '.height'],
table : ['border'],
'td,th' : ['rowspan', 'colspan'],
'div,hr,br,tbody,tr,p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6' : []
});
self.html(html);
self.cmd.selection(true);
self.addBookmark();
});
});

View File

@ -0,0 +1,62 @@
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
*******************************************************************************/
// google code prettify: http://google-code-prettify.googlecode.com/
// http://google-code-prettify.googlecode.com/
KindEditor.plugin('code', function(K) {
var self = this, name = 'code';
self.clickToolbar(name, function() {
var lang = self.lang(name + '.'),
html = ['<div style="padding:10px 20px;">',
'<div class="ke-dialog-row">',
'<select class="ke-code-type">',
'<option value="js">JavaScript</option>',
'<option value="html">HTML</option>',
'<option value="css">CSS</option>',
'<option value="php">PHP</option>',
'<option value="pl">Perl</option>',
'<option value="py">Python</option>',
'<option value="rb">Ruby</option>',
'<option value="java">Java</option>',
'<option value="vb">ASP/VB</option>',
'<option value="cpp">C/C++</option>',
'<option value="cs">C#</option>',
'<option value="xml">XML</option>',
'<option value="bsh">Shell</option>',
'<option value="">Other</option>',
'</select>',
'</div>',
'<textarea class="ke-textarea" style="width:408px;height:260px;"></textarea>',
'</div>'].join(''),
dialog = self.createDialog({
name : name,
width : 450,
title : self.lang(name),
body : html,
yesBtn : {
name : self.lang('yes'),
click : function(e) {
var type = K('.ke-code-type', dialog.div).val(),
code = textarea.val(),
cls = type === '' ? '' : ' lang-' + type,
html = '<pre class="prettyprint' + cls + '">\n' + K.escape(code) + '</pre> ';
if (K.trim(code) === '') {
alert(lang.pleaseInput);
textarea[0].focus();
return;
}
self.insertHtml(html).hideDialog().focus();
}
}
}),
textarea = K('textarea', dialog.div);
textarea[0].focus();
});
});

View File

@ -0,0 +1,13 @@
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
pre.prettyprint {
border: 0;
border-left: 3px solid rgb(204, 204, 204);
margin-left: 2em;
padding: 0.5em;
font-size: 110%;
display: block;
font-family: "Consolas", "Monaco", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace;
margin: 1em 0px;
white-space: pre;
}

View File

@ -0,0 +1,28 @@
var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),
["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",
/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();

View File

@ -0,0 +1,129 @@
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
*******************************************************************************/
KindEditor.plugin('emoticons', function(K) {
var self = this, name = 'emoticons',
path = (self.emoticonsPath || self.pluginsPath + 'emoticons/images/'),
allowPreview = self.allowPreviewEmoticons === undefined ? true : self.allowPreviewEmoticons,
currentPageNum = 1;
self.clickToolbar(name, function() {
var rows = 5, cols = 9, total = 135, startNum = 0,
cells = rows * cols, pages = Math.ceil(total / cells),
colsHalf = Math.floor(cols / 2),
wrapperDiv = K('<div class="ke-plugin-emoticons"></div>'),
elements = [],
menu = self.createMenu({
name : name,
beforeRemove : function() {
removeEvent();
}
});
menu.div.append(wrapperDiv);
var previewDiv, previewImg;
if (allowPreview) {
previewDiv = K('<div class="ke-preview"></div>').css('right', 0);
previewImg = K('<img class="ke-preview-img" src="' + path + startNum + '.gif" />');
wrapperDiv.append(previewDiv);
previewDiv.append(previewImg);
}
function bindCellEvent(cell, j, num) {
if (previewDiv) {
cell.mouseover(function() {
if (j > colsHalf) {
previewDiv.css('left', 0);
previewDiv.css('right', '');
} else {
previewDiv.css('left', '');
previewDiv.css('right', 0);
}
previewImg.attr('src', path + num + '.gif');
K(this).addClass('ke-on');
});
} else {
cell.mouseover(function() {
K(this).addClass('ke-on');
});
}
cell.mouseout(function() {
K(this).removeClass('ke-on');
});
cell.click(function(e) {
self.insertHtml('<img src="' + path + num + '.gif" border="0" alt="" />').hideMenu().focus();
e.stop();
});
}
function createEmoticonsTable(pageNum, parentDiv) {
var table = document.createElement('table');
parentDiv.append(table);
if (previewDiv) {
K(table).mouseover(function() {
previewDiv.show('block');
});
K(table).mouseout(function() {
previewDiv.hide();
});
elements.push(K(table));
}
table.className = 'ke-table';
table.cellPadding = 0;
table.cellSpacing = 0;
table.border = 0;
var num = (pageNum - 1) * cells + startNum;
for (var i = 0; i < rows; i++) {
var row = table.insertRow(i);
for (var j = 0; j < cols; j++) {
var cell = K(row.insertCell(j));
cell.addClass('ke-cell');
bindCellEvent(cell, j, num);
var span = K('<span class="ke-img"></span>')
.css('background-position', '-' + (24 * num) + 'px 0px')
.css('background-image', 'url(' + path + 'static.gif)');
cell.append(span);
elements.push(cell);
num++;
}
}
return table;
}
var table = createEmoticonsTable(currentPageNum, wrapperDiv);
function removeEvent() {
K.each(elements, function() {
this.unbind();
});
}
var pageDiv;
function bindPageEvent(el, pageNum) {
el.click(function(e) {
removeEvent();
table.parentNode.removeChild(table);
pageDiv.remove();
table = createEmoticonsTable(pageNum, wrapperDiv);
createPageTable(pageNum);
currentPageNum = pageNum;
e.stop();
});
}
function createPageTable(currentPageNum) {
pageDiv = K('<div class="ke-page"></div>');
wrapperDiv.append(pageDiv);
for (var pageNum = 1; pageNum <= pages; pageNum++) {
if (currentPageNum !== pageNum) {
var a = K('<a href="javascript:;">[' + pageNum + ']</a>');
bindPageEvent(a, pageNum);
pageDiv.append(a);
elements.push(a);
} else {
pageDiv.append(K('@[' + pageNum + ']'));
}
pageDiv.append(K('@&nbsp;'));
}
}
createPageTable(currentPageNum);
});
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

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