memo edit/destory.

exceptionHandle
yanxd 12 years ago
parent dc00216603
commit 16c0bc3ac3

@ -136,7 +136,7 @@ private
@attachment = Attachment.find(params[:id])
# Show 404 if the filename in the url is wrong
raise ActiveRecord::RecordNotFound if params[:filename] && params[:filename] != @attachment.filename
unless @attachment.container_type == 'Bid' || @attachment.container_type == 'HomeworkAttach'
unless @attachment.container_type == 'Bid' || @attachment.container_type == 'HomeworkAttach' || @attachment.container_type == 'Memo'
@project = @attachment.project
end
rescue ActiveRecord::RecordNotFound

@ -1,5 +1,24 @@
class MemosController < ApplicationController
layout 'base_memos' ,except: [:new ]
default_search_scope :messages
before_filter :find_forum, :only => [:new, :preview]
before_filter :find_attachments, :only => [:preview]
before_filter :find_memo, :except => [:new, :create , :preview, :update]
helper :attachments
include AttachmentsHelper
layout 'base_memos'# ,except: [:new ]
def quote
@memo = Memo.find_by_id(params[:id])
@subject = @memo.subject
@subject = "RE: #{@subject}" unless @subject.starts_with?('RE:')
@content = "#{ll(Setting.default_language, :text_user_wrote, @memo.author)} <br/> &nbsp; "
@content << @memo.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n") + "</blockquote>\n\n<br/>"
@content = "<blockquote>" << @content
end
def new
@forum = Forum.find(params[:forum_id])
@memo = Memo.new
@ -13,46 +32,6 @@ class MemosController < ApplicationController
end
end
def show
# @offset, @limit = api_offset_and_limit({:limit => 10})
# @forum = Forum.find(params[:id])
# @memos_all = @forum.topics
# @topic_count = @memos_all.count
# @topic_pages = Paginator.new @topic_count, @limit, params['page']
# @offset ||= @topic_pages.offset
# @memos = @memos_all.offset(@offset).limit(@limit).all
# respond_to do |format|
# format.html {
# render :layout => 'base_forums'
# }# show.html.erb
# format.json { render json: @forum }
# end
@memo = Memo.find_by_id(params[:id])
@offset, @limit = api_offset_and_limit({:limit => 10})
@forum = Forum.find(params[:forum_id])
@replies_all = @memo.replies
@repliy_count = @replies_all.count
@repliy_pages = Paginator.new @repliy_count, @limit, params['page']
@offset ||= @repliy_pages.offset
@replies = @replies_all.offset(@offset).limit(@limit).all
@mome_new = Memo.new
# @memo = Memo.find_by_id(params[:id])
# @forum = Forum.find(params[:forum_id])
# @replies = @memo.replies
# @mome_new = Memo.new
respond_to do |format|
format.html # show.html.erb
format.json { render json: @memo }
end
end
def create
@memo = Memo.new(params[:memo])
@memo.forum_id = params[:forum_id]
@ -64,13 +43,15 @@ class MemosController < ApplicationController
@parent_memo.replies_count += 1
end
@memo.save_attachments(params[:attachments] || (params[:memo] && params[:memo][:uploads]))
respond_to do |format|
if @memo.save
@forum.memo_count += 1
@forum.last_memo_id = @memo.id
@back_memo_id = (@memo.parent_id.nil? ? @memo.id : @memo.parent_id)
if @parent_memo
@parent_memo.last_reply_id = @memo.id
@parent_memo.last_reply_id = @memo
@parent_memo.save
else
@forum.topic_count += 1
@ -80,19 +61,87 @@ class MemosController < ApplicationController
format.html { redirect_to forum_memo_path(@memo.forum_id, @back_memo_id), notice: 'Memo was successfully created.' }
format.json { render json: @memo, status: :created, location: @memo }
else
format.html { render action: "new" }
back_error_page = @memo.parent_id.nil? ? forum_path(@forum) : forum_memo_path(@forum, @memo.parent_id)
format.html { redirect_to back_error_page, notice: 'Memo was failed created.' }
format.json { render json: @memo.errors, status: :unprocessable_entity }
end
end
end
def show
pre_count = 20
@current_count = pre_count * (params['page'].to_i - 1) if params['page'].to_i > 0
@memo = Memo.find_by_id(params[:id])
@offset, @limit = api_offset_and_limit({:limit => pre_count})
@forum = Forum.find(params[:forum_id])
@replies_all = @memo.replies
@reply_count = @replies_all.count
@reply_pages = Paginator.new @reply_count, @limit, params['page']
@offset ||= @reply_pages.offset
@replies = @replies_all.offset(@offset).limit(@limit).all
@mome_new = Memo.new
# @memo = Memo.find_by_id(params[:id])
# @forum = Forum.find(params[:forum_id])
# @replies = @memo.replies
# @mome_new = Memo.new
respond_to do |format|
format.html # show.html.erb
format.json { render json: @memo }
end
end
def edit
end
def update
@forum = Forum.find(params[:forum_id])
@memo = Memo.find(params[:id])
if(@memo.update_attribute(:subject, params[:memo][:subject]) &&
@memo.update_attribute(:content, params[:memo][:content]))
respond_to do |format|
format.html {redirect_to forum_memo_path(@forum, (@memo.parent_id.nil? ? @memo : @memo.parent_id)), notice: 'Memo was successfully updated.'}
#format.html redirect_to forum_memo_url(@forum, (@memo.parent_id.nil? ? @memo : @memo.parent_id)), notice: 'Memo was successfully updated.'
end
else
format.html { render action: "edit" }
format.json { render json: @person.errors, status: :unprocessable_entity }
end
end
def destroy
@memo = Memo.find(params[:id])
@memo.destroy
if @memo.parent_id
@back_url = forum_memo_url(params[:forum_id], @memo.parent_id)
else
@back_url = forum_url(params[:forum_id])
end
respond_to do |format|
format.html { redirect_to memos_url }
format.html { redirect_to @back_url }
format.json { head :no_content }
end
end
private
def find_memo
return unless find_forum
@memo = @forum.memos.find(params[:id])
#@memo =
rescue ActiveRecord::RecordNotFound
render_404
nil
end
def find_forum
@forum = Forum.find(params[:forum_id])
rescue ActiveRecord::RecordNotFound
render_404
nil
end
end

@ -1,2 +1,22 @@
module ForumsHelper
def forum_breadcrumb(item)
forum = item.is_a?(Memo) ? item.forum : item
links = [link_to(l(:label_forum_plural), forums_path(item))]
forums = forum.ancestors.reverse
if item.is_a?(Memo)
forums << forum
end
links += forums.map {|ancestor| link_to(h(ancestor.name), forum_path(ancestor))}
breadcrumb links
end
def forums_options_for_select(forums)
options = []
Forum.forum_tree(forums) do |forum, level|
label = (level > 0 ? '&nbsp;' * 2 * level + '&#187; ' : '').html_safe
label << forum.name
options << [label, forum.id]
end
options
end
end

@ -2,7 +2,30 @@ class Memo < ActiveRecord::Base
include Redmine::SafeAttributes
belongs_to :forums
belongs_to :author, :class_name => "User", :foreign_key => 'author_id'
validates_presence_of :author_id, :forum_id, :subject
validates :content, presence: true
validates_length_of :subject, maximum: 50
validates_length_of :content, maximum: 2048
validate :cannot_reply_to_locked_topic, :on => :create
validate :content_cannot_be_blank
acts_as_tree :counter_cache => :replies_count, :order => "#{Memo.table_name}.created_at ASC"
acts_as_attachable
belongs_to :last_reply_id, :class_name => 'Memo', :foreign_key => 'last_reply_id'
# acts_as_searchable :column => ['subject', 'content'],
# #:include => { :forums => :p}
# #:project_key => "#{Forum.table_name}.project_id"
# :date_column => "#{table_name}.created_at"
# acts_as_event :title => Proc.new {|o| "#{o.forums.name}: #{o.subject}"},
# :description => :content,
# :group => :parent,
# :type => Proc.new {|o| o.parent_id.nil? ? 'message' : 'reply'},
# :url => Proc.new {|o| {:controller => 'memos', :action => 'show', :forum_id => o.forum_id}.merge(o.parent_id.nil? ? {:id => o.id} : {:id => o.parent_id, :r => o.id, :anchor => "memo-#{o.id}"})}
acts_as_activity_provider :find_options => {:include => [{:board => :project}, :author]},
:author_key => :author_id
acts_as_watchable
safe_attributes "author_id",
"subject",
"content",
@ -12,22 +35,74 @@ class Memo < ActiveRecord::Base
"parent_id",
"replies_count",
"sticky"
validates_presence_of :author_id, :content, :forum_id, :subject
validates_length_of :subject, maximum: 50
validates_length_of :content, maximum: 2048
after_create :add_author_as_watcher, :reset_counters!
# after_update :update_memos_forum
after_destroy :reset_counters!
# after_create :send_notification
# scope :visible, lambda { |*args|
# includes(:forum => ).where()
# }
def cannot_reply_to_locked_topic
errors.add :base, 'Topic is locked' if root.locked? && self != root
end
def content_cannot_be_blank
errors.add :base, "content can't be blank." if self.content.blank?
end
# def update_memos_forum
# if forum_id_changed?
# Message.update_all({:board_id => board_id}, ["id = ? OR parent_id = ?", root.id, root.id ])
# Forum.reset_counters!(forum_id_was)
# Forum.reset_counters!(forum_id)
# end
# end
def reset_counters!
if parent && parent.id
Memo.update_all({:last_reply_id => parent.children.maximum(:id)}, {:id => parent.id})
end
# forums.reset_counters!
end
def sticky=(arg)
write_attribute :sticky, (arg == true || arg.to_s == '1' ? 1 : 0)
end
def sticky?
sticky == 1
end
def replies
Memo.where("parent_id = ?", id)
end
def locked?
self.lock
end
def editable_by? user
!self.lock
# user && user.logged? || (self.author == usr && usr.allowed_to?(:edit_own_messages, project))
(user && self.author == user && !self.lock || user.admin?) && true
end
def destroyable_by? user
user.admin?
#self.author == user || user.admin?
end
private
def add_author_as_watcher
Watcher.create(:watchable => self.root, :user => author)
end
def send_notification
if Setting.notified_events.include?('message_posted')
Mailer.message_posted(self).deliver
end
end
end

@ -12,6 +12,7 @@
<%= javascript_heads %>
<%= heads_for_theme %>
<%= call_hook :view_layouts_base_html_head %>
<%= javascript_include_tag "ckeditor/ckeditor.js" %>
<!-- page specific tags -->
<%= yield :header_tags -%>
</head>

@ -1,6 +1,13 @@
<%= error_messages_for 'bid' %>
<!--[form:project]-->
<p><%= l(:label_homeworks_form_new_description) %></p>
<!-- % unless @memo.parent_id %>
<% if @memo.safe_attribute? 'sticky' %>
<%= f.check_box :sticky %> <lable><%= l(:label_board_sticky) %></lable>
<% end %>
<% if @memo.safe_attribute? 'locked' %>
<%= f.check_box :locked %> <%= label_tag 'memo_locked', l(:label_board_locked) %>
<% end %>
<% end % -->
<p><%= f.text_field :content, :required => true, :size => 60, :style => "width:150px;" %></p>
<p><%= hidden_field_tag 'subject', ||=@memo.subject %>

@ -0,0 +1,14 @@
<%= form_for(@mome_new, url: forum_memos_path) do |f| %>
<%= f.hidden_field :subject, :required => true, value: @memo.subject %>
<%= f.hidden_field :forum_id, :required => true, value: @memo.forum_id %>
<%= f.hidden_field :parent_id, :required => true, value: @memo.id %>
<%= label_tag(l(:label_reply_plural)) %>:
<!-- <p> < %= f.text_area :content, :required => true, :size => "75%", :resize => "none", id: 'editor01' %> </p> -->
<%= f.text_area :content, :cols => 80, :rows => 15, :class => 'wiki-edit', :id => 'editor01', :value => @content %></p>
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script>
<p><%= l(:label_attachment_plural) %><br />
<%= render :partial => 'attachments/form', :locals => {:container => @mome_new} %>
</p>
<%= f.submit value: l(:label_reply_plural), class: "replies" %>
<% end %>

@ -13,6 +13,7 @@
<div class="actions">
<p><%= f.text_field :subject, :required => true %></p>
<p><%= f.text_field :content, :required => true, :size => 80 %></p>
<%= f.submit %>
<br/>
<%= f.submit :value => l(:label_memo_create) %>
</div>
<% end %>

@ -0,0 +1,23 @@
<!-- <h1>New memo</h1> -->
<h3><%=l(:label_memo_edit)%></h3>
<%= labelled_form_for(@memo, :url => forum_memo_path(@memo.forum_id, @memo)) do |f| %>
<% if @memo.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@memo.errors.count, "error") %> prohibited this memo from being saved:</h2>
<ul>
<% @memo.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="actions">
<p><%= f.text_field :subject, :required => true %></p>
<p><%= f.text_area :content, :required => true, :size => 80, id: 'editor01' %></p>
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script>
<br/>
<%= f.submit :value => l(:button_change) %>
</div>
<% end %>
<%= link_to l(:button_back), back_url %>
</div>

@ -1,5 +1,7 @@
<h1>New memo</h1>
<!-- <h1>New memo</h1> -->
<h3><%=l(:label_memo_new)%></h3>
<div class="box tabular" >
<%= render :partial => 'memos/topic_form' %>
<%= link_to 'Back', forums_path(@forum) %>
<%= link_to l(:button_back), forum_path(@forum) %>
</div>

@ -0,0 +1,2 @@
ckeditor.setData("<%= raw escape_javascript(@content) %>");
showAndScrollTo("new_memo", "cke_editor01");

@ -1,3 +1,4 @@
<!-- < %= javascript_include_tag "ckeditor/ckeditor.js" %> -->
<style type="text/css">
/** {
-webkit-box-sizing: border-box;
@ -10,6 +11,7 @@
margin: 10px 2px;
border-radius: 5px;
box-shadow: 1px 1px 6px #97EBF4;
border: 1px solid #F1F1F1;
}
.lz-left{
float: left;
@ -52,22 +54,50 @@
/*border-radius: 10px;*/
}
</style>
<!-- < %= forum_breadcrum%> -->
<div class="lz">
<div class="lz-left">
<div class=""><%= link_to image_tag(url_to_avatar(@memo.author), :class => "avatar"), user_path(@memo.author) %></div>
<p class=""><%=h @memo.author %></p>
<p class=""><%=h @memo.author.show_name %></p>
</div>
<div class="memo-section">
<div class="contextual-borad">
<%= link_to(
image_tag('comment.png'),
{:action => 'quote', :id => @memo},
:remote => true,
:method => 'get',
:title => l(:button_quote)
)if !@memo.locked? && User.current.logged? %>
<%= link_to(
image_tag('edit.png'),
{:action => 'edit', :id => @memo},
:method => 'get',
:title => l(:button_edit)
) if @memo.editable_by?(User.current) %>
<%= link_to(
image_tag('delete.png'),
{:action => 'destroy', :id => @memo},
:method => :delete,
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete)
) if @memo.destroyable_by?(User.current) %>
</div>
<div class="memo-title"><%= label_tag l(:field_subject) %>: <%=h @memo.subject %></div>
<div class="memo-content"><%= textilizable(@memo, :content) %></div>
<div class="memo-timestamp"> <%= authoring @memo.created_at, @memo.author %></div>
<div class="memo-content">
<!-- < %= textilizable(@memo, :content) %> -->
<%= raw @memo.content %>
<p> <%= link_to_attachments @memo, :author => false %> </p>
</div>
<div class="memo-timestamp"> <%= authoring @memo.created_at, @memo.author.show_name %></div>
</div>
<br />
</div>
<div class="replies">
<h3 class="comments"><%= l(:label_reply_plural) %> (<%= @replies.nil? ? 0 : @replies.size %>)</h3>
<% reply_count = 0%>
<% reply_count = @current_count.to_i %>
<% @replies.each do |reply| %>
<p class="font_lighter"><%= reply_count += 1 %>L :</p>
<div class="reply" id="<%= "reply-#{reply.id}" %>">
@ -77,16 +107,17 @@
{:action => 'quote', :id => reply},
:remote => true,
:method => 'get',
:title => l(:button_quote)) if !@memo.locked? && authorize_for('messages', 'reply') %>
:title => l(:button_quote)
)if !@memo.locked? && User.current.logged? %>
<%= link_to(
image_tag('edit.png'),
{:action => 'edit', :id => reply},
:title => l(:button_edit)
) if reply.destroyable_by?(User.current) %>
) if reply.editable_by?(User.current) %>
<%= link_to(
image_tag('delete.png'),
{:action => 'destroy', :id => reply},
:method => :post,
:method => :delete,
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete)
) if reply.destroyable_by?(User.current) %>
@ -98,24 +129,24 @@
<%= link_to image_tag(url_to_avatar(reply.author), :class => "avatar"), user_path(reply.author) %>
</td>
<td class="comments">
<div class="wiki"><%= textilizable reply, :content %></div>
<div class="wiki"><%=h reply.content.html_safe %></div>
<p>
<% if reply.attachments.any?%>
<% options = {:author => true} %>
<%= render :partial => 'attachments/links', :locals => {:attachments => reply.attachments, :options => options} %>
<% end %>
</p>
</td>
</tr>
<tr>
<td class="font_lighter" style="float:right"><%= authoring reply.created_at, reply.author %></td>
<td class="font_lighter" style="float:right"><%= authoring reply.created_at, reply.author.show_name %></td>
</tr>
</table>
</div>
<% end %>
<div class="pagination"><%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %></div>
</div>
<div class="reply-box" style="">
<%= form_for(@mome_new, url: forum_memos_path) do |f| %>
<%= f.hidden_field :subject, :required => true, value: @memo.subject %>
<%= f.hidden_field :forum_id, :required => true, value: @memo.forum_id %>
<%= f.hidden_field :parent_id, :required => true, value: @memo.id %>
<%= label_tag(l(:label_reply_plural)) %>:
<p> <%= f.text_area :content, :required => true, :size => "75%", :resize => "none" %> </p>
<%= f.submit value: l(:label_reply_plural), class: "replies" %>
<% end %>
<%= render :partial => 'reply_box' %>
</div>

@ -106,7 +106,7 @@
<div class="home"><%= l :label_hot_project%></div>
<% find_all_hot_project.map do |project| break if(project == find_all_hot_project[5]) %>
<div class="project">
<%=link_to( project.name, project_path(project), :class => "nowrap" )%>
<%=link_to( project.name, project_path(project.project_id), :class => "nowrap" )%>
<p><%= project.description %></p>
<!-- span class="grey"><strong><em> </em></strong></span -->
</div>

@ -1727,3 +1727,6 @@ zh:
label_newbie_faq: '新手指引 & 问答'
label_hot_project: '热门项目'
label_memo_create_succ: 回复成功
label_memo_create: 发布
label_memo_new: 新建主题
label_memo_edit: 修改主题

@ -17,7 +17,11 @@
RedmineApp::Application.routes.draw do
resources :forums do
resources :memos
resources :memos do
collection do
get "quote"
end
end
end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,39 @@
CKEditor 4
==========
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
http://ckeditor.com - See LICENSE.md for license information.
CKEditor is a text editor to be used inside web pages. It's not a replacement
for desktop text editors like Word or OpenOffice, but a component to be used as
part of web applications and websites.
## Documentation
The full editor documentation is available online at the following address:
http://docs.ckeditor.com
## Installation
Installing CKEditor is an easy task. Just follow these simple steps:
1. **Download** the latest version from the CKEditor website:
http://ckeditor.com. You should have already completed this step, but be
sure you have the very latest version.
2. **Extract** (decompress) the downloaded file into the root of your website.
**Note:** CKEditor is by default installed in the `ckeditor` folder. You can
place the files in whichever you want though.
## Checking Your Installation
The editor comes with a few sample pages that can be used to verify that
installation proceeded properly. Take a look at the `samples` directory.
To test your installation, just call the following page at your website:
http://<your site>/<CKEditor installation path>/samples/index.html
For example:
http://www.example.com/ckeditor/samples/index.html

@ -0,0 +1,10 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
(function(a){CKEDITOR.config.jqueryOverrideVal="undefined"==typeof CKEDITOR.config.jqueryOverrideVal?!0:CKEDITOR.config.jqueryOverrideVal;"undefined"!=typeof a&&(a.extend(a.fn,{ckeditorGet:function(){var a=this.eq(0).data("ckeditorInstance");if(!a)throw"CKEditor is not initialized yet, use ckeditor() with a callback.";return a},ckeditor:function(g,d){if(!CKEDITOR.env.isCompatible)throw Error("The environment is incompatible.");if(!a.isFunction(g))var k=d,d=g,g=k;var i=[],d=d||{};this.each(function(){var b=
a(this),c=b.data("ckeditorInstance"),f=b.data("_ckeditorInstanceLock"),h=this,j=new a.Deferred;i.push(j.promise());if(c&&!f)g&&g.apply(c,[this]),j.resolve();else if(f)c.once("instanceReady",function(){setTimeout(function(){c.element?(c.element.$==h&&g&&g.apply(c,[h]),j.resolve()):setTimeout(arguments.callee,100)},0)},null,null,9999);else{if(d.autoUpdateElement||"undefined"==typeof d.autoUpdateElement&&CKEDITOR.config.autoUpdateElement)d.autoUpdateElementJquery=!0;d.autoUpdateElement=!1;b.data("_ckeditorInstanceLock",
!0);c=a(this).is("textarea")?CKEDITOR.replace(h,d):CKEDITOR.inline(h,d);b.data("ckeditorInstance",c);c.on("instanceReady",function(d){var e=d.editor;setTimeout(function(){if(e.element){d.removeListener();e.on("dataReady",function(){b.trigger("dataReady.ckeditor",[e])});e.on("setData",function(a){b.trigger("setData.ckeditor",[e,a.data])});e.on("getData",function(a){b.trigger("getData.ckeditor",[e,a.data])},999);e.on("destroy",function(){b.trigger("destroy.ckeditor",[e])});e.on("save",function(){a(h.form).submit();
return!1},null,null,20);if(e.config.autoUpdateElementJquery&&b.is("textarea")&&a(h.form).length){var c=function(){b.ckeditor(function(){e.updateElement()})};a(h.form).submit(c);a(h.form).bind("form-pre-serialize",c);b.bind("destroy.ckeditor",function(){a(h.form).unbind("submit",c);a(h.form).unbind("form-pre-serialize",c)})}e.on("destroy",function(){b.removeData("ckeditorInstance")});b.removeData("_ckeditorInstanceLock");b.trigger("instanceReady.ckeditor",[e]);g&&g.apply(e,[h]);j.resolve()}else setTimeout(arguments.callee,
100)},0)},null,null,9999)}});var f=new a.Deferred;this.promise=f.promise();a.when.apply(this,i).then(function(){f.resolve()});this.editor=this.eq(0).data("ckeditorInstance");return this}}),CKEDITOR.config.jqueryOverrideVal&&(a.fn.val=CKEDITOR.tools.override(a.fn.val,function(g){return function(d){if(arguments.length){var k=this,i=[],f=this.each(function(){var b=a(this),c=b.data("ckeditorInstance");if(b.is("textarea")&&c){var f=new a.Deferred;c.setData(d,function(){f.resolve()});i.push(f.promise());
return!0}return g.call(b,d)});if(i.length){var b=new a.Deferred;a.when.apply(this,i).done(function(){b.resolveWith(k)});return b.promise()}return f}var f=a(this).eq(0),c=f.data("ckeditorInstance");return f.is("textarea")&&c?c.getData():g.call(f)}})))})(window.jQuery);

@ -0,0 +1,142 @@

/**
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* This file was added automatically by CKEditor builder.
* You may re-use it at any time at http://ckeditor.com/builder to build CKEditor again.
*
* NOTE:
* This file is not used by CKEditor, you may remove it.
* Changing this file will not change your CKEditor configuration.
*/
var CKBUILDER_CONFIG = {
skin: 'moono',
preset: 'standard',
ignore: [
'dev',
'.gitignore',
'.gitattributes',
'README.md',
'.mailmap'
],
plugins : {
'about' : 1,
'a11yhelp' : 1,
'basicstyles' : 1,
'blockquote' : 1,
'clipboard' : 1,
'contextmenu' : 1,
'resize' : 1,
'toolbar' : 1,
'elementspath' : 1,
'enterkey' : 1,
'entities' : 1,
'filebrowser' : 1,
'floatingspace' : 1,
'format' : 1,
'horizontalrule' : 1,
'htmlwriter' : 1,
'wysiwygarea' : 1,
'image' : 1,
'indentlist' : 1,
'link' : 1,
'list' : 1,
'magicline' : 1,
'maximize' : 1,
'pastetext' : 1,
'pastefromword' : 1,
'removeformat' : 1,
'sourcearea' : 1,
'specialchar' : 1,
'scayt' : 1,
'stylescombo' : 1,
'tab' : 1,
'table' : 1,
'tabletools' : 1,
'undo' : 1,
'wsc' : 1,
'dialog' : 1,
'dialogui' : 1,
'menu' : 1,
'floatpanel' : 1,
'panel' : 1,
'button' : 1,
'popup' : 1,
'richcombo' : 1,
'listblock' : 1,
'indent' : 1,
'fakeobjects' : 1,
'menubutton' : 1
},
languages : {
'af' : 1,
'sq' : 1,
'ar' : 1,
'eu' : 1,
'bn' : 1,
'bs' : 1,
'bg' : 1,
'ca' : 1,
'zh-cn' : 1,
'zh' : 1,
'hr' : 1,
'cs' : 1,
'da' : 1,
'nl' : 1,
'en' : 1,
'en-au' : 1,
'en-ca' : 1,
'en-gb' : 1,
'eo' : 1,
'et' : 1,
'fo' : 1,
'fi' : 1,
'fr' : 1,
'fr-ca' : 1,
'gl' : 1,
'ka' : 1,
'de' : 1,
'el' : 1,
'gu' : 1,
'he' : 1,
'hi' : 1,
'hu' : 1,
'is' : 1,
'id' : 1,
'it' : 1,
'ja' : 1,
'km' : 1,
'ko' : 1,
'ku' : 1,
'lv' : 1,
'lt' : 1,
'mk' : 1,
'ms' : 1,
'mn' : 1,
'no' : 1,
'nb' : 1,
'fa' : 1,
'pl' : 1,
'pt-br' : 1,
'pt' : 1,
'ro' : 1,
'ru' : 1,
'sr' : 1,
'sr-latn' : 1,
'si' : 1,
'sk' : 1,
'sl' : 1,
'es' : 1,
'sv' : 1,
'th' : 1,
'tr' : 1,
'ug' : 1,
'uk' : 1,
'vi' : 1,
'cy' : 1
}
};

File diff suppressed because it is too large Load Diff

@ -0,0 +1,38 @@
/**
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here.
// For the complete reference:
// http://docs.ckeditor.com/#!/api/CKEDITOR.config
// The toolbar groups arrangement, optimized for two toolbar rows.
config.toolbarGroups = [
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
{ name: 'links' },
{ name: 'insert' },
{ name: 'forms' },
{ name: 'tools' },
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
{ name: 'others' },
'/',
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
{ name: 'styles' },
{ name: 'colors' },
{ name: 'about' }
];
// Remove some buttons, provided by the standard plugins, which we don't
// need to have in the Standard(s) toolbar.
config.removeButtons = 'Underline,Subscript,Superscript';
// Se the most common block elements.
config.format_tags = 'p;h1;h2;h3;pre';
// Make dialogs simpler.
config.removeDialogTabs = 'image:advanced;link:advanced';
};

@ -0,0 +1,106 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
body
{
/* Font */
font-family: sans-serif, Arial, Verdana, "Trebuchet MS";
font-size: 12px;
/* Text color */
color: #333;
/* Remove the background color to make it transparent */
background-color: #fff;
margin: 20px;
}
.cke_editable
{
font-size: 13px;
line-height: 1.6em;
}
blockquote
{
font-style: italic;
font-family: Georgia, Times, "Times New Roman", serif;
padding: 2px 0;
border-style: solid;
border-color: #ccc;
border-width: 0;
}
.cke_contents_ltr blockquote
{
padding-left: 20px;
padding-right: 8px;
border-left-width: 5px;
}
.cke_contents_rtl blockquote
{
padding-left: 8px;
padding-right: 20px;
border-right-width: 5px;
}
a
{
color: #0782C1;
}
ol,ul,dl
{
/* IE7: reset rtl list margin. (#7334) */
*margin-right: 0px;
/* preserved spaces for list items with text direction other than the list. (#6249,#8049)*/
padding: 0 40px;
}
h1,h2,h3,h4,h5,h6
{
font-weight: normal;
line-height: 1.2em;
}
hr
{
border: 0px;
border-top: 1px solid #ccc;
}
img.right
{
border: 1px solid #ccc;
float: right;
margin-left: 15px;
padding: 5px;
}
img.left
{
border: 1px solid #ccc;
float: left;
margin-right: 15px;
padding: 5px;
}
pre
{
white-space: pre-wrap; /* CSS 2.1 */
word-wrap: break-word; /* IE7 */
}
.marker
{
background-color: Yellow;
}
span[lang]
{
font-style: italic;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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

Loading…
Cancel
Save