diff --git a/README.md b/README.md index e859a36319..68f87231ef 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ core engine. **Cool API:** Publify supports the various blogging engine APIs so you can publish from desktop clients. -**On demand editor:** Publify supports various editors (visual, plain HTML, +**On demand syntax:** Publify supports various syntax (plain HTML, Markdown, Textile) **Multilingual**: Publify is (more or less) translated in English, French, diff --git a/app/controllers/admin/base_controller.rb b/app/controllers/admin/base_controller.rb index 793c1c76eb..09460d8986 100644 --- a/app/controllers/admin/base_controller.rb +++ b/app/controllers/admin/base_controller.rb @@ -6,15 +6,6 @@ class Admin::BaseController < ApplicationController before_filter :look_for_needed_db_updates, :except => [:login, :signup, :update_database, :migrate] before_filter :check_and_generate_secret_token, :except => [:login, :signup, :update_database, :migrate] - def insert_editor - editor = 'visual' - editor = 'simple' if params[:editor].to_s == 'simple' - current_user.editor = editor - current_user.save! - - render :partial => "#{editor}_editor" - end - private def update_settings_with!(params) diff --git a/app/controllers/admin/content_controller.rb b/app/controllers/admin/content_controller.rb index 5a5f23e83d..f2d8236285 100644 --- a/app/controllers/admin/content_controller.rb +++ b/app/controllers/admin/content_controller.rb @@ -96,11 +96,6 @@ def autosave @article.attributes = params[:article] - # Crappy workaround to have the visual editor work. - if current_user.visual_editor? - @article.body = params[:article][:body_and_extended] - end - @article.published = false @article.set_author(current_user) @article.save_attachments!(params[:attachments]) diff --git a/app/controllers/admin/pages_controller.rb b/app/controllers/admin/pages_controller.rb index 32d9377814..b4e6bb9ce3 100644 --- a/app/controllers/admin/pages_controller.rb +++ b/app/controllers/admin/pages_controller.rb @@ -45,11 +45,7 @@ def destroy private def default_textfilter - if current_user.visual_editor? - "none" - else - current_user.text_filter || blog.text_filter - end + current_user.text_filter || blog.text_filter end diff --git a/app/helpers/admin/base_helper.rb b/app/helpers/admin/base_helper.rb index aa9b7aa0b7..2c12fb9a0f 100644 --- a/app/helpers/admin/base_helper.rb +++ b/app/helpers/admin/base_helper.rb @@ -129,20 +129,7 @@ def published_or_not(item) end def macro_help_popup(macro, text) - unless current_user.editor == 'visual' - " 'textfilters', :action => 'macro_help', :id => macro.short_name}\" onclick=\"return popup(this, 'Publify Macro Help')\">#{text}" - end - end - - def build_editor_link(label, action, id, update, editor) - link = link_to_remote(label, - :url => { :action => action, 'editor' => editor}, - :method => :get, - :class => 'ui-button-text', - :loading => "new Element.show('update_spinner_#{id}')", - :success => "new Element.toggle('update_spinner_#{id}')", - :update => "#{update}") - link << image_tag("spinner-blue.gif", :id => "update_spinner_#{id}", :style => 'display:none;') + " 'textfilters', :action => 'macro_help', :id => macro.short_name}\" onclick=\"return popup(this, 'Publify Macro Help')\">#{text}" end def display_pagination(collection, cols, first='', last='') diff --git a/app/models/blog.rb b/app/models/blog.rb index 34cc1bc1bb..f521ed2178 100644 --- a/app/models/blog.rb +++ b/app/models/blog.rb @@ -53,7 +53,6 @@ class Blog < ActiveRecord::Base setting :ping_urls, :string, "http://blogsearch.google.com/ping/RPC2\nhttp://rpc.technorati.com/rpc/ping\nhttp://ping.blo.gs/\nhttp://rpc.weblogs.com/RPC2" setting :send_outbound_pings, :boolean, true setting :email_from, :string, 'publify@example.com' - setting :editor, :integer, 'visual' setting :allow_signup, :integer, 0 setting :date_format, :string, '%d/%m/%Y' setting :time_format, :string, '%Hh%M' diff --git a/app/models/user.rb b/app/models/user.rb index 0a0bb735de..9f2be5f7ca 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -21,7 +21,6 @@ class User < ActiveRecord::Base # Settings setting :notify_watch_my_articles, :boolean, true - setting :editor, :string, 'visual' setting :firstname, :string, '' setting :lastname, :string, '' setting :nickname, :string, '' @@ -110,7 +109,6 @@ def permalink_url(anchor=nil, only_path=false) end def default_text_filter - return "none" if visual_editor? text_filter end @@ -148,14 +146,6 @@ def self.to_prefix 'author' end - def simple_editor? - editor == 'simple' - end - - def visual_editor? - editor == 'visual' - end - def password=(newpass) @password = newpass end diff --git a/app/views/admin/content/_form.html.erb b/app/views/admin/content/_form.html.erb index b0dac3a3a1..cc7e4d4ab7 100644 --- a/app/views/admin/content/_form.html.erb +++ b/app/views/admin/content/_form.html.erb @@ -1,4 +1,3 @@ -