Migration to rails 5.1 complete
This commit is contained in:
parent
32298c4980
commit
76358d1056
13
Gemfile
13
Gemfile
@ -10,7 +10,7 @@ gem 'simple_calendar'
|
||||
# The recurrence management library
|
||||
gem 'ice_cube'
|
||||
|
||||
gem 'rails', '~> 5.1.4'
|
||||
gem 'rails', '>= 5.1.4'
|
||||
|
||||
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
||||
gem 'jbuilder', '~> 2.5'
|
||||
@ -67,9 +67,6 @@ group :development, :test do
|
||||
# Call 'byebug' anywhere in the code to stop execution and get a debugger
|
||||
# console
|
||||
gem 'byebug', platforms: %i[mri mingw x64_mingw]
|
||||
# Adds support for Capybara system testing and selenium driver
|
||||
gem 'capybara', '~> 2.13'
|
||||
gem 'selenium-webdriver'
|
||||
end
|
||||
|
||||
group :development do
|
||||
@ -102,6 +99,14 @@ group :development do
|
||||
gem 'guard-rails', require: false
|
||||
end
|
||||
|
||||
group :test do
|
||||
# Adds support for Capybara system testing and selenium driver
|
||||
gem 'capybara', '~> 2.13'
|
||||
# To test objects assigned in controllers, much easier...
|
||||
gem 'rails-controller-testing'
|
||||
gem 'selenium-webdriver'
|
||||
end
|
||||
|
||||
group :development, :test, :assets do
|
||||
# Use CoffeeScript for .coffee assets and views
|
||||
gem 'coffee-rails'
|
||||
|
80
Gemfile.lock
80
Gemfile.lock
@ -27,13 +27,13 @@ GEM
|
||||
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
||||
actionview-encoded_mail_to (1.0.9)
|
||||
rails
|
||||
activeadmin (1.1.0)
|
||||
activeadmin (1.2.0)
|
||||
arbre (>= 1.1.1)
|
||||
coffee-rails
|
||||
formtastic (~> 3.1)
|
||||
formtastic_i18n
|
||||
inherited_resources (~> 1.7)
|
||||
jquery-rails
|
||||
jquery-rails (>= 4.2.0)
|
||||
kaminari (>= 0.15, < 2.0)
|
||||
railties (>= 4.2, < 5.2)
|
||||
ransack (~> 1.3)
|
||||
@ -63,14 +63,14 @@ GEM
|
||||
ast (2.3.0)
|
||||
bcrypt (3.1.11)
|
||||
bindex (0.5.0)
|
||||
brakeman (4.0.1)
|
||||
brakeman (4.1.1)
|
||||
buftok (0.2.0)
|
||||
builder (3.2.3)
|
||||
bundler-audit (0.6.0)
|
||||
bundler (~> 1.2)
|
||||
thor (~> 0.18)
|
||||
byebug (9.1.0)
|
||||
capybara (2.15.4)
|
||||
capybara (2.16.1)
|
||||
addressable
|
||||
mini_mime (>= 0.1.3)
|
||||
nokogiri (>= 1.3.3)
|
||||
@ -88,15 +88,15 @@ GEM
|
||||
execjs
|
||||
coffee-script-source (1.12.2)
|
||||
concurrent-ruby (1.0.5)
|
||||
crass (1.0.2)
|
||||
devise (4.3.0)
|
||||
crass (1.0.3)
|
||||
devise (4.4.0)
|
||||
bcrypt (~> 3.0)
|
||||
orm_adapter (~> 0.1)
|
||||
railties (>= 4.1.0, < 5.2)
|
||||
responders
|
||||
warden (~> 1.2.3)
|
||||
devise-i18n (1.4.0)
|
||||
devise (>= 3.1)
|
||||
devise-i18n (1.5.0)
|
||||
devise (>= 3.4)
|
||||
differ (0.1.2)
|
||||
domain_name (0.5.20170404)
|
||||
unf (>= 0.0.5, < 1.0.0)
|
||||
@ -119,7 +119,7 @@ GEM
|
||||
formtastic (3.1.5)
|
||||
actionpack (>= 3.2.13)
|
||||
formtastic_i18n (0.6.0)
|
||||
geocoder (1.4.4)
|
||||
geocoder (1.4.5)
|
||||
globalid (0.4.1)
|
||||
activesupport (>= 4.2.0)
|
||||
guard (2.14.1)
|
||||
@ -193,13 +193,13 @@ GEM
|
||||
http_parser.rb (0.6.0)
|
||||
i18n (0.9.1)
|
||||
concurrent-ruby (~> 1.0)
|
||||
i18n-active_record (0.2.0)
|
||||
i18n-active_record (0.2.2)
|
||||
i18n (>= 0.5.0)
|
||||
ice_cube (0.16.2)
|
||||
inherited_resources (1.7.2)
|
||||
actionpack (>= 3.2, < 5.2.x)
|
||||
inherited_resources (1.8.0)
|
||||
actionpack (>= 4.2, <= 5.2)
|
||||
has_scope (~> 0.6)
|
||||
railties (>= 3.2, < 5.2.x)
|
||||
railties (>= 4.2, <= 5.2)
|
||||
responders
|
||||
jbuilder (2.7.0)
|
||||
activesupport (>= 4.2.0)
|
||||
@ -223,7 +223,7 @@ GEM
|
||||
activerecord
|
||||
kaminari-core (= 1.1.1)
|
||||
kaminari-core (1.1.1)
|
||||
kramdown (1.15.0)
|
||||
kramdown (1.16.2)
|
||||
libv8 (3.16.14.19)
|
||||
listen (3.1.5)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
@ -237,7 +237,7 @@ GEM
|
||||
mini_mime (>= 0.1.1)
|
||||
memoizable (0.4.2)
|
||||
thread_safe (~> 0.3, >= 0.3.1)
|
||||
meta-tags (2.6.0)
|
||||
meta-tags (2.7.0)
|
||||
actionpack (>= 3.2.0, < 5.3)
|
||||
method_source (0.9.0)
|
||||
mini_mime (1.0.0)
|
||||
@ -245,37 +245,37 @@ GEM
|
||||
modernizr-rails (2.7.1)
|
||||
multi_json (1.12.2)
|
||||
multipart-post (2.0.0)
|
||||
mysql2 (0.4.9)
|
||||
mysql2 (0.4.10)
|
||||
naught (1.1.0)
|
||||
nenv (0.3.0)
|
||||
nio4r (2.1.0)
|
||||
nio4r (2.2.0)
|
||||
nokogiri (1.8.1)
|
||||
notiffany (0.1.1)
|
||||
nenv (~> 0.1)
|
||||
shellany (~> 0.0)
|
||||
orm_adapter (0.5.0)
|
||||
paper_trail (8.0.1)
|
||||
paper_trail (8.1.2)
|
||||
activerecord (>= 4.2, < 5.2)
|
||||
request_store (~> 1.1)
|
||||
parallel (1.12.0)
|
||||
parser (2.4.0.0)
|
||||
ast (~> 2.2)
|
||||
parallel (1.12.1)
|
||||
parser (2.4.0.2)
|
||||
ast (~> 2.3)
|
||||
piwik_analytics (1.0.2)
|
||||
actionpack
|
||||
activesupport
|
||||
rails (>= 3.0.0)
|
||||
polyamorous (1.3.1)
|
||||
polyamorous (1.3.2)
|
||||
activerecord (>= 3.0)
|
||||
powerpack (0.1.1)
|
||||
pry (0.11.2)
|
||||
pry (0.11.3)
|
||||
coderay (~> 1.1.0)
|
||||
method_source (~> 0.9.0)
|
||||
public_suffix (3.0.1)
|
||||
puma (3.10.0)
|
||||
puma (3.11.0)
|
||||
rack (2.0.3)
|
||||
rack-livereload (0.3.16)
|
||||
rack
|
||||
rack-test (0.7.0)
|
||||
rack-test (0.8.2)
|
||||
rack (>= 1.0, < 3)
|
||||
rails (5.1.4)
|
||||
actioncable (= 5.1.4)
|
||||
@ -293,6 +293,10 @@ GEM
|
||||
rails-assets-leaflet (1.2.0)
|
||||
rails-assets-leaflet.markercluster (1.2.0)
|
||||
rails-assets-leaflet (>= 1.0.3)
|
||||
rails-controller-testing (1.0.2)
|
||||
actionpack (~> 5.x, >= 5.0.1)
|
||||
actionview (~> 5.x, >= 5.0.1)
|
||||
activesupport (~> 5.x)
|
||||
rails-dom-testing (2.0.3)
|
||||
activesupport (>= 4.2.0)
|
||||
nokogiri (>= 1.6)
|
||||
@ -307,9 +311,8 @@ GEM
|
||||
method_source
|
||||
rake (>= 0.8.7)
|
||||
thor (>= 0.18.1, < 2.0)
|
||||
rainbow (2.2.2)
|
||||
rake
|
||||
rake (12.2.1)
|
||||
rainbow (3.0.0)
|
||||
rake (12.3.0)
|
||||
ransack (1.8.4)
|
||||
actionpack (>= 3.0)
|
||||
activerecord (>= 3.0)
|
||||
@ -325,11 +328,11 @@ GEM
|
||||
responders (2.4.0)
|
||||
actionpack (>= 4.2.0, < 5.3)
|
||||
railties (>= 4.2.0, < 5.3)
|
||||
rubocop (0.51.0)
|
||||
rubocop (0.52.1)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 2.3.3.1, < 3.0)
|
||||
parser (>= 2.4.0.2, < 3.0)
|
||||
powerpack (~> 0.1)
|
||||
rainbow (>= 2.2.2, < 3.0)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (~> 1.0, >= 1.0.1)
|
||||
ruby-progressbar (1.9.0)
|
||||
@ -337,12 +340,12 @@ GEM
|
||||
ruby_parser (3.10.1)
|
||||
sexp_processor (~> 4.9)
|
||||
rubyzip (1.2.1)
|
||||
sass (3.5.3)
|
||||
sass (3.5.4)
|
||||
sass-listen (~> 4.0.0)
|
||||
sass-listen (4.0.0)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
sass-rails (5.0.6)
|
||||
sass-rails (5.0.7)
|
||||
railties (>= 4.0.0, < 6)
|
||||
sass (~> 3.1)
|
||||
sprockets (>= 2.8, < 4.0)
|
||||
@ -351,7 +354,7 @@ GEM
|
||||
sdoc (0.4.2)
|
||||
json (~> 1.7, >= 1.7.7)
|
||||
rdoc (~> 4.0)
|
||||
selenium-webdriver (3.7.0)
|
||||
selenium-webdriver (3.8.0)
|
||||
childprocess (~> 0.5)
|
||||
rubyzip (~> 1.0)
|
||||
sexp_processor (4.10.0)
|
||||
@ -384,7 +387,7 @@ GEM
|
||||
thor (0.20.0)
|
||||
thread_safe (0.3.6)
|
||||
tilt (2.0.8)
|
||||
tinymce-rails (4.7.1)
|
||||
tinymce-rails (4.7.4)
|
||||
railties (>= 3.1.1)
|
||||
tinymce-rails-langs (4.20160310)
|
||||
tinymce-rails (~> 4.1, >= 4.1.10)
|
||||
@ -404,7 +407,7 @@ GEM
|
||||
simple_oauth (~> 0.3.0)
|
||||
tzinfo (1.2.4)
|
||||
thread_safe (~> 0.1)
|
||||
uglifier (3.2.0)
|
||||
uglifier (4.1.2)
|
||||
execjs (>= 0.3.0, < 3)
|
||||
unf (0.1.4)
|
||||
unf_ext
|
||||
@ -419,7 +422,7 @@ GEM
|
||||
railties (>= 5.0)
|
||||
websocket-driver (0.6.5)
|
||||
websocket-extensions (>= 0.1.0)
|
||||
websocket-extensions (0.1.2)
|
||||
websocket-extensions (0.1.3)
|
||||
xpath (2.1.0)
|
||||
nokogiri (~> 1.3)
|
||||
|
||||
@ -467,10 +470,11 @@ DEPENDENCIES
|
||||
piwik_analytics
|
||||
puma (~> 3.7)
|
||||
rack-livereload
|
||||
rails (~> 5.1.4)
|
||||
rails (>= 5.1.4)
|
||||
rails-assets-jquery-sparkline!
|
||||
rails-assets-leaflet!
|
||||
rails-assets-leaflet.markercluster!
|
||||
rails-controller-testing
|
||||
rails-i18n
|
||||
sass-rails
|
||||
sdoc
|
||||
|
@ -1,6 +1,6 @@
|
||||
# The top level controller, where can be centralised almost everything
|
||||
class ApplicationController < ActionController::Base
|
||||
before_action :set_paper_trail_whodunnit, :set_locale, :set_filters
|
||||
before_action :set_paper_trail_whodunnit, :set_filters
|
||||
# Prevent CSRF attacks by raising an exception.
|
||||
# For APIs, you may want to use :null_session instead.
|
||||
protect_from_forgery prepend: true, with: :exception
|
||||
|
@ -58,6 +58,8 @@ class EventsController < ApplicationController
|
||||
render action: :edit
|
||||
end
|
||||
|
||||
def edit; end
|
||||
|
||||
# PATCH/PUT /events/1
|
||||
# PATCH/PUT /events/1.json
|
||||
def update
|
||||
|
@ -45,8 +45,8 @@ class ModerationsController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
# DELETE /events/1
|
||||
# DELETE /events/1.json
|
||||
# DELETE /moderations/1
|
||||
# DELETE /moderations/1.json
|
||||
def destroy
|
||||
if @moderation.reason == 'r_0'
|
||||
@moderation.paper_trail.without_versioning :destroy
|
||||
|
@ -30,6 +30,10 @@ class UsersController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def show; end
|
||||
|
||||
def edit; end
|
||||
|
||||
# PATCH/PUT /users/1
|
||||
# PATCH/PUT /users/1.json
|
||||
def update
|
||||
|
@ -18,7 +18,7 @@ class Event < ApplicationRecord
|
||||
validates :title, presence: true
|
||||
validate :end_after_start
|
||||
RULES = %w[daily weekly monthly monthly_day].freeze
|
||||
validates :rule, inclusion: RULES
|
||||
validates :rule, inclusion: RULES, allow_nil: true
|
||||
validates :description, presence: true
|
||||
validates :city, presence: true
|
||||
validates :region, presence: true
|
||||
|
@ -22,7 +22,7 @@ class EventCallbacks
|
||||
def self.after_update(event)
|
||||
return unless ActionMailer::Base.default_url_options[:host]
|
||||
|
||||
if event.moderated_changed? && event.moderated?
|
||||
if event.saved_change_to_moderated? && event.moderated?
|
||||
tweet event
|
||||
|
||||
# Send an acceptation mail to its author
|
||||
|
@ -1,12 +1,12 @@
|
||||
# Manages data related to events' moderation
|
||||
class Note < ApplicationRecord
|
||||
belongs_to :event
|
||||
belongs_to :author, class_name: 'User'
|
||||
belongs_to :author, class_name: 'User', inverse_of: false
|
||||
|
||||
validates :contents, presence: true
|
||||
|
||||
# Setup the magic time stamp so it uses the "date" column
|
||||
def timestamp_attributes_for_create
|
||||
super << :date
|
||||
def self.timestamp_attributes_for_create
|
||||
super << 'date'
|
||||
end
|
||||
end
|
||||
|
@ -18,7 +18,7 @@ class Orga < ApplicationRecord
|
||||
validates :submitter, allow_blank: true, email: true
|
||||
|
||||
geocoded_by :full_address
|
||||
# after_validation :geocode, if: -> (obj) { obj.address_changed? }
|
||||
# after_validation :geocode, if: -> (obj) { obj.saved_change_to_address? }
|
||||
after_validation :geocode
|
||||
|
||||
scope :active, -> { where active: true }
|
||||
@ -55,9 +55,9 @@ class Orga < ApplicationRecord
|
||||
end
|
||||
|
||||
after_update do
|
||||
send_secret if secret_changed? || submitter_changed?
|
||||
send_secret if saved_change_to_secret? || saved_change_to_submitter?
|
||||
|
||||
if moderated_changed?
|
||||
if saved_change_to_moderated?
|
||||
OrgaMailer.accept(self).deliver_now!
|
||||
# Send email to moderators when an orga is accepted
|
||||
ModerationorgaMailer.accept(self).deliver_now!
|
||||
|
@ -91,8 +91,8 @@
|
||||
%h3= t '.description'
|
||||
.description
|
||||
= description sanitize @event.description,
|
||||
tags: %w(p h1 h2 h3 h4 br table tr th td ul ol li a strong b em i img sub sup span),
|
||||
attributes: %w(href src width height style title)
|
||||
tags: %w[p h1 h2 h3 h4 br table tr th td ul ol li a strong b em i img sub sup span],
|
||||
attributes: %w[href src width height style title]
|
||||
|
||||
%h3
|
||||
%em.fa.fa-info-circle
|
||||
@ -101,7 +101,7 @@
|
||||
%p
|
||||
%em.fa.fa-external-link
|
||||
%span.label= Event.human_attribute_name :url
|
||||
= link_to @event.url, @event.url
|
||||
= link_to @event.url, sanitize(@event.url)
|
||||
%p
|
||||
%em.fa.fa-envelope
|
||||
%span.label= Event.human_attribute_name :contact
|
||||
|
@ -75,8 +75,8 @@
|
||||
%h3= t '.description'
|
||||
.description
|
||||
= description sanitize @orga.description,
|
||||
tags: %w(p h1 h2 h3 h4 br table tr th td ul ol li a strong b em i img sub sup span),
|
||||
attributes: %w(href src width height style title)
|
||||
tags: %w[p h1 h2 h3 h4 br table tr th td ul ol li a strong b em i img sub sup span],
|
||||
attributes: %w[href src width height style title]
|
||||
|
||||
%dl
|
||||
- if @orga.department.present?
|
||||
@ -88,7 +88,7 @@
|
||||
%dt
|
||||
%em.fa.fa-external-link
|
||||
= Orga.human_attribute_name :url
|
||||
%dd= link_to @orga.url, @orga.url
|
||||
%dd= link_to @orga.url, sanitize(@orga.url)
|
||||
- if @orga.diaspora.present?
|
||||
%dt
|
||||
%em.fa.fa-bullhorn
|
||||
|
@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env ruby
|
||||
require 'pathname'
|
||||
require 'fileutils'
|
||||
include FileUtils
|
||||
|
||||
# path to your application root.
|
||||
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
||||
@ -10,7 +9,7 @@ def system!(*args)
|
||||
system(*args) || abort("\n== Command #{args} failed ==")
|
||||
end
|
||||
|
||||
chdir APP_ROOT do
|
||||
Dir.chdir APP_ROOT do
|
||||
# This script is a starting point to setup your application.
|
||||
# Add necessary setup steps to this file.
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env ruby
|
||||
require 'pathname'
|
||||
require 'fileutils'
|
||||
include FileUtils
|
||||
|
||||
# path to your application root.
|
||||
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
||||
@ -10,7 +9,7 @@ def system!(*args)
|
||||
system(*args) || abort("\n== Command #{args} failed ==")
|
||||
end
|
||||
|
||||
chdir APP_ROOT do
|
||||
Dir.chdir APP_ROOT do
|
||||
# This script is a way to update your development environment automatically.
|
||||
# Add necessary update steps to this file.
|
||||
|
||||
|
@ -49,4 +49,5 @@ class DeviseCreateAdminUsers < ActiveRecord::Migration
|
||||
# add_index :admin_users, :confirmation_token, :unique => true
|
||||
# add_index :admin_users, :unlock_token, :unique => true
|
||||
end
|
||||
# rubocop:enable Metrics/MethodLength
|
||||
end
|
||||
|
@ -14,6 +14,7 @@ class CreateActiveAdminComments < ActiveRecord::Migration
|
||||
add_index :active_admin_comments, %i[author_type author_id]
|
||||
add_index :active_admin_comments, %i[resource_type resource_id]
|
||||
end
|
||||
# rubocop:enable Metrics/MethodLength
|
||||
|
||||
def self.down
|
||||
drop_table :active_admin_comments
|
||||
|
@ -1,6 +1,7 @@
|
||||
# Add a translations table, to mange many texts from the database
|
||||
# Add a translations table, to manage many texts from the database
|
||||
class CreateTranslation < ActiveRecord::Migration
|
||||
def change
|
||||
# rubocop:disable Rails/CreateTableWithTimestamps
|
||||
create_table :translations do |t|
|
||||
t.string :locale
|
||||
t.string :key
|
||||
@ -8,5 +9,6 @@ class CreateTranslation < ActiveRecord::Migration
|
||||
t.text :interpolations
|
||||
t.boolean :is_proc, default: false
|
||||
end
|
||||
# rubocop:enable Rails/CreateTableWithTimestamps
|
||||
end
|
||||
end
|
||||
|
@ -21,9 +21,11 @@ class ActsAsTaggableOnMigration < ActiveRecord::Migration
|
||||
end
|
||||
|
||||
def self.up
|
||||
# rubocop:disable Rails/CreateTableWithTimestamps
|
||||
create_table :tags do |t|
|
||||
t.string :name
|
||||
end
|
||||
# rubocop:enable Rails/CreateTableWithTimestamps
|
||||
|
||||
taggings
|
||||
end
|
||||
|
@ -23,6 +23,7 @@ Kind.create name: 'provider', icon: 'tty'
|
||||
Kind.create name: 'institution', icon: 'institution'
|
||||
|
||||
# rubocop:disable Metrics/LineLength
|
||||
# rubocop:disable Layout/EmptyLinesAroundArguments
|
||||
I18n::Backend::ActiveRecord::Translation.create(
|
||||
[
|
||||
{ locale: 'fr', key: 'mail_suffix', value: '[AdL] ' },
|
||||
@ -410,3 +411,5 @@ Ces recommandations de modération sont à discuter et à améliorer au fur et
|
||||
" }
|
||||
]
|
||||
)
|
||||
# rubocop:enable Metrics/LineLength
|
||||
# rubocop:enable Layout/EmptyLinesAroundArguments
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -1,23 +0,0 @@
|
||||
(function() {
|
||||
$(document).on('turbolinks:load', function() {
|
||||
return tinyMCE.init({
|
||||
schema: 'html5',
|
||||
height: '40em',
|
||||
menubar: false,
|
||||
branding: false,
|
||||
language: 'fr_FR',
|
||||
selector: 'input.description',
|
||||
content_css: '/assets/application-ba1c3eda80784b6eec3860ce601adf04370c8c8b17855bd3438a42dc8a69cfa2.css',
|
||||
entity_encoding: 'raw',
|
||||
add_unload_trigger: true,
|
||||
browser_spellcheck: true,
|
||||
toolbar: [' cut copy paste | undo redo | searchreplace | link image media charmap table | code visualblocks preview fullscreen', ' removeformat | bold italic strikethrough | superscript subscript | bullist numlist | alignleft aligncenter alignright alignjustify alignnone | outdent indent'],
|
||||
plugins: 'lists, advlist, autolink, link, image, charmap, paste, print, preview, table, fullscreen, searchreplace, media, insertdatetime, visualblocks, wordcount, contextmenu, code'
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('turbolinks:before-cache', function() {
|
||||
return tinymce.remove();
|
||||
});
|
||||
|
||||
}).call(this);
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -1 +0,0 @@
|
||||
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c;g("0",[],function(){return function(a){function b(){function a(a){"remove"===a&&this.each(function(a,b){var c=d(b);c&&c.remove()}),this.find("span.mceEditor,div.mceEditor").each(function(a,b){var c=i().get(b.id.replace(/_parent$/,""));c&&c.remove()})}function b(b){var c,d=this;if(null!=b)a.call(d),d.each(function(a,c){var d;(d=i().get(c.id))&&d.setContent(b)});else if(d.length>0&&(c=i().get(d[0].id)))return c.getContent()}function d(a){var b=null;return a&&a.id&&g.tinymce&&(b=i().get(a.id)),b}function e(a){return!!(a&&a.length&&g.tinymce&&a.is(":tinymce"))}var h={};f.each(["text","html","val"],function(a,g){var i=h[g]=f.fn[g],j="text"===g;f.fn[g]=function(a){var g=this;if(!e(g))return i.apply(g,arguments);if(a!==c)return b.call(g.filter(":tinymce"),a),i.apply(g.not(":tinymce"),arguments),g;var h="",k=arguments;return(j?g:g.eq(0)).each(function(a,b){var c=d(b);h+=c?j?c.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):c.getContent({save:!0}):i.apply(f(b),k)}),h}}),f.each(["append","prepend"],function(a,b){var g=h[b]=f.fn[b],i="prepend"===b;f.fn[b]=function(a){var b=this;return e(b)?a!==c?("string"==typeof a&&b.filter(":tinymce").each(function(b,c){var e=d(c);e&&e.setContent(i?a+e.getContent():e.getContent()+a)}),g.apply(b.not(":tinymce"),arguments),b):void 0:g.apply(b,arguments)}}),f.each(["remove","replaceWith","replaceAll","empty"],function(b,c){var d=h[c]=f.fn[c];f.fn[c]=function(){return a.call(this,c),d.apply(this,arguments)}}),h.attr=f.fn.attr,f.fn.attr=function(a,g){var i=this,j=arguments;if(!a||"value"!==a||!e(i))return g!==c?h.attr.apply(i,j):h.attr.apply(i,j);if(g!==c)return b.call(i.filter(":tinymce"),g),h.attr.apply(i.not(":tinymce"),j),i;var k=i[0],l=d(k);return l?l.getContent({save:!0}):h.attr.apply(f(k),j)}}var c,d,e,f,g,h=[];g=a?a:window,f=g.jQuery;var i=function(){return g.tinymce};f.fn.tinymce=function(a){function c(){var c=[],d=0;e||(b(),e=!0),m.each(function(b,e){var f,g=e.id,h=a.oninit;g||(e.id=g=i().DOM.uniqueId()),i().get(g)||(f=i().createEditor(g,a),c.push(f),f.on("init",function(){var a,b=h;m.css("visibility",""),h&&++d==c.length&&("string"==typeof b&&(a=b.indexOf(".")===-1?null:i().resolve(b.replace(/\.\w+$/,"")),b=i().resolve(b)),b.apply(a||i(),c))}))}),f.each(c,function(a,b){b.render()})}var j,k,l,m=this,n="";if(!m.length)return m;if(!a)return i()?i().get(m[0].id):null;if(m.css("visibility","hidden"),g.tinymce||d||!(j=a.script_url))1===d?h.push(c):c();else{d=1,k=j.substring(0,j.lastIndexOf("/")),j.indexOf(".min")!=-1&&(n=".min"),g.tinymce=g.tinyMCEPreInit||{base:k,suffix:n},j.indexOf("gzip")!=-1&&(l=a.language||"en",j=j+(/\?/.test(j)?"&":"?")+"js=true&core=true&suffix="+escape(n)+"&themes="+escape(a.theme||"modern")+"&plugins="+escape(a.plugins||"")+"&languages="+(l||""),g.tinyMCE_GZ||(g.tinyMCE_GZ={start:function(){function b(a){i().ScriptLoader.markDone(i().baseURI.toAbsolute(a))}b("langs/"+l+".js"),b("themes/"+a.theme+"/theme"+n+".js"),b("themes/"+a.theme+"/langs/"+l+".js"),f.each(a.plugins.split(","),function(a,c){c&&(b("plugins/"+c+"/plugin"+n+".js"),b("plugins/"+c+"/langs/"+l+".js"))})},end:function(){}}));var o=document.createElement("script");o.type="text/javascript",o.onload=o.onreadystatechange=function(b){b=b||window.event,2===d||"load"!=b.type&&!/complete|loaded/.test(o.readyState)||(i().dom.Event.domLoaded=1,d=2,a.script_loaded&&a.script_loaded(),c(),f.each(h,function(a,b){b()}))},o.src=j,document.body.appendChild(o)}return m},f.extend(f.expr[":"],{tinymce:function(a){var b;return!!(a.id&&"tinymce"in g&&(b=i().get(a.id),b&&b.editorManager===i()))}})}}),d("0")()}();
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e[f]=d(a[f]);b.apply(null,e)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("1",document),h("2",window),g("0",["1","2"],function(a,b){return function(c){var d,e,f,g,h,i=[];h=c?c:b,g=h.jQuery;var j=function(){return h.tinymce};g.fn.tinymce=function(c){var d,l,m,n=this,o="";if(!n.length)return n;if(!c)return j()?j().get(n[0].id):null;n.css("visibility","hidden");var p=function(){var a=[],b=0;f||(k(),f=!0),n.each(function(d,e){var f,g=e.id,h=c.oninit;g||(e.id=g=j().DOM.uniqueId()),j().get(g)||(f=j().createEditor(g,c),a.push(f),f.on("init",function(){var c,d=h;n.css("visibility",""),h&&++b==a.length&&("string"==typeof d&&(c=d.indexOf(".")===-1?null:j().resolve(d.replace(/\.\w+$/,"")),d=j().resolve(d)),d.apply(c||j(),a))}))}),g.each(a,function(a,b){b.render()})};if(h.tinymce||e||!(d=c.script_url))1===e?i.push(p):p();else{e=1,l=d.substring(0,d.lastIndexOf("/")),d.indexOf(".min")!=-1&&(o=".min"),h.tinymce=h.tinyMCEPreInit||{base:l,suffix:o},d.indexOf("gzip")!=-1&&(m=c.language||"en",d=d+(/\?/.test(d)?"&":"?")+"js=true&core=true&suffix="+escape(o)+"&themes="+escape(c.theme||"modern")+"&plugins="+escape(c.plugins||"")+"&languages="+(m||""),h.tinyMCE_GZ||(h.tinyMCE_GZ={start:function(){var a=function(a){j().ScriptLoader.markDone(j().baseURI.toAbsolute(a))};a("langs/"+m+".js"),a("themes/"+c.theme+"/theme"+o+".js"),a("themes/"+c.theme+"/langs/"+m+".js"),g.each(c.plugins.split(","),function(b,c){c&&(a("plugins/"+c+"/plugin"+o+".js"),a("plugins/"+c+"/langs/"+m+".js"))})},end:function(){}}));var q=a.createElement("script");q.type="text/javascript",q.onload=q.onreadystatechange=function(a){a=a||b.event,2===e||"load"!=a.type&&!/complete|loaded/.test(q.readyState)||(j().dom.Event.domLoaded=1,e=2,c.script_loaded&&c.script_loaded(),p(),g.each(i,function(a,b){b()}))},q.src=d,a.body.appendChild(q)}return n},g.extend(g.expr[":"],{tinymce:function(a){var b;return!!(a.id&&"tinymce"in h&&(b=j().get(a.id),b&&b.editorManager===j()))}});var k=function(){var a=function(a){"remove"===a&&this.each(function(a,b){var d=c(b);d&&d.remove()}),this.find("span.mceEditor,div.mceEditor").each(function(a,b){var c=j().get(b.id.replace(/_parent$/,""));c&&c.remove()})},b=function(b){var c,d=this;if(null!=b)a.call(d),d.each(function(a,c){var d;(d=j().get(c.id))&&d.setContent(b)});else if(d.length>0&&(c=j().get(d[0].id)))return c.getContent()},c=function(a){var b=null;return a&&a.id&&h.tinymce&&(b=j().get(a.id)),b},e=function(a){return!!(a&&a.length&&h.tinymce&&a.is(":tinymce"))},f={};g.each(["text","html","val"],function(a,h){var i=f[h]=g.fn[h],j="text"===h;g.fn[h]=function(a){var f=this;if(!e(f))return i.apply(f,arguments);if(a!==d)return b.call(f.filter(":tinymce"),a),i.apply(f.not(":tinymce"),arguments),f;var h="",k=arguments;return(j?f:f.eq(0)).each(function(a,b){var d=c(b);h+=d?j?d.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):d.getContent({save:!0}):i.apply(g(b),k)}),h}}),g.each(["append","prepend"],function(a,b){var h=f[b]=g.fn[b],i="prepend"===b;g.fn[b]=function(a){var b=this;return e(b)?a!==d?("string"==typeof a&&b.filter(":tinymce").each(function(b,d){var e=c(d);e&&e.setContent(i?a+e.getContent():e.getContent()+a)}),h.apply(b.not(":tinymce"),arguments),b):void 0:h.apply(b,arguments)}}),g.each(["remove","replaceWith","replaceAll","empty"],function(b,c){var d=f[c]=g.fn[c];g.fn[c]=function(){return a.call(this,c),d.apply(this,arguments)}}),f.attr=g.fn.attr,g.fn.attr=function(a,h){var i=this,j=arguments;if(!a||"value"!==a||!e(i))return h!==d?f.attr.apply(i,j):f.attr.apply(i,j);if(h!==d)return b.call(i.filter(":tinymce"),h),f.attr.apply(i.not(":tinymce"),j),i;var k=i[0],l=c(k);return l?l.getContent({save:!0}):f.attr.apply(g(k),j)}}}}),d("0")()}();
|
Binary file not shown.
@ -1 +1 @@
|
||||
jquery.tinymce-c4e34b289f498e7a8e4ff16c48b895310113eae7c296ac5f17680704bc3a0032.js
|
||||
jquery.tinymce-c9ec5ed0b9118216bc9aa1ad4a251afff33d2c60e62057737b026003ab34efb3.js
|
@ -1 +1 @@
|
||||
jquery.tinymce-c4e34b289f498e7a8e4ff16c48b895310113eae7c296ac5f17680704bc3a0032.js.gz
|
||||
jquery.tinymce-c9ec5ed0b9118216bc9aa1ad4a251afff33d2c60e62057737b026003ab34efb3.js.gz
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user