diff --git a/app/controllers/admin/patchfiles_controller.rb b/app/controllers/admin/patchfiles_controller.rb
index 61ebfaa..2c2eb95 100644
--- a/app/controllers/admin/patchfiles_controller.rb
+++ b/app/controllers/admin/patchfiles_controller.rb
@@ -195,7 +195,15 @@ class Admin::PatchfilesController < OrbitAdminController
@file_to_show.save
@file_to_show = Filefield.where("title"=>@app_title).first
else
+ @default_field = Filefield.new()
@file_to_show = Filefield.where("title"=>@app_title).first
+ @default_field.file_show.each do |check,istrue|
+ if @file_to_show.file_show[check] == nil
+ @file_to_show.file_show[check] = istrue
+ @file_to_show.save
+ @file_to_show = Filefield.where("title"=>@app_title).first
+ end
+ end
end
end
end
\ No newline at end of file
diff --git a/app/models/filefield.rb b/app/models/filefield.rb
index e9dfca9..3a5f7be 100644
--- a/app/models/filefield.rb
+++ b/app/models/filefield.rb
@@ -7,7 +7,8 @@ class Filefield
field :title, :type=> String ,default:"patchfile"
- field :file_show, :type=> Hash ,default:{"ckeditor"=>0,"site-preference(two-site-logo)"=>0,"member"=>0}
+ field :file_show, :type=> Hash ,default:{"ckeditor"=>0,"site-preference(two-site-logo)"=>0,"member"=>0,"accessibility"=>0}
+ field :recovery, :type=> String , default:"false"
after_update :updatefile
@@ -34,53 +35,108 @@ class Filefield
def updatefile
self.file_show.each do |key,value|
if value == 1
- @model_path = ENV['PWD'] + '/app/models/'
- @helper_path = ENV['PWD'] + '/app/helpers/'
- @views_path = ENV['PWD'] + '/app/views/'
- @controller_path = ENV['PWD'] + '/app/controllers/'
+ @model_path = Rails.root.to_s + '/app/models/'
+ @helper_path = Rails.root.to_s + '/app/helpers/'
+ @views_path = Rails.root.to_s + '/app/views/'
+ @controller_path = Rails.root.to_s + '/app/controllers/'
if key == "ckeditor"
- app_path = File.expand_path(__dir__)
- app_path = lastpath(app_path)
- app_path = lastpath(app_path)
- @ckeditor_path = ENV['PWD'] + '/app/assets/javascripts/ckeditor/'
+ @app_path = File.expand_path(__dir__)
+ @app_path = lastpath(@app_path)
+ @app_path = lastpath(@app_path)
+ @ckeditor_path = Rails.root.to_s + '/app/assets/javascripts/ckeditor/'
puts 'copying CKEDITOR'
- @aa = FileUtils.cd(app_path+'/updatefiles/')
- puts @aa.to_s
+ begin
+ Dir.chdir(@ckeditor_path)
+ File.rename('config.js.erb','config.js.erb_back')
+ rescue
+ puts Dir.pwd
+ end
+ FileUtils.cd(@app_path+'/updatefiles/')
begin
FileUtils.cp('config.js.erb' , @ckeditor_path)
puts @ckeditor_path
- rescue
+ rescue
+ puts Dir.pwd
puts 'error copy'
end
elsif key == "site-preference(two-site-logo)"
- app_path = File.expand_path(__dir__)
- app_path = lastpath(app_path)
- app_path = lastpath(app_path)
- puts app_path
+ @app_path = File.expand_path(__dir__)
+ @app_path = lastpath(@app_path)
+ @app_path = lastpath(@app_path)
+ puts @app_path
puts 'copying site'
- FileUtils.cd(app_path+'/updatefiles/')
+ begin
+ Dir.chdir(@model_path)
+ File.rename('site.rb','site.rb_back')
+ Dir.chdir(@helper_path)
+ File.rename('application_helper.rb','application_helper.rb_back')
+ Dir.chdir(@views_path+'admin/sites/')
+ File.rename('preference.html.erb','preference.html.erb_back')
+ rescue
+ puts Dir.pwd
+ end
+ FileUtils.cd(@app_path+'/updatefiles/')
begin
FileUtils.cp('site.rb' , @model_path)
FileUtils.cp('application_helper.rb' , @helper_path)
FileUtils.cd('admin/')
- FileUtils.cp('preference.html.erb',@views_path+'/admin/sites/')
- rescue
+ FileUtils.cp('preference.html.erb',@views_path+'admin/sites/')
+ rescue
+ puts Dir.pwd
+ Dir.chdir(Rails.root.to_s)
puts 'error copy'
end
elsif key == "member"
- app_path = File.expand_path(__dir__)
- app_path = lastpath(app_path)
- app_path = lastpath(app_path)
- FileUtils.cd(app_path+'/updatefiles/')
+ @app_path = File.expand_path(__dir__)
+ @app_path = lastpath(@app_path)
+ @app_path = lastpath(@app_path)
+ begin
+ Dir.chdir(@model_path)
+ File.rename('member_profile.rb','member_profile.rb_back')
+ Dir.chdir(@controller_path+'admin/')
+ File.rename('members_controller.rb','members_controller.rb_back')
+ Dir.chdir(@views_path+'admin/members/')
+ File.rename('_user_basic_passwd.html.erb','_user_basic_passwd.html.erb_back')
+ rescue
+ puts Dir.pwd
+ end
+ FileUtils.cd(@app_path+'/updatefiles/')
puts 'copying member'
begin
FileUtils.cp('member_profile.rb' , @model_path)
- FileUtils.cd('admin')
- FileUtils.cp('members_controller.rb' , @controller_path+'/admin/')
- rescue
+ FileUtils.cd('admin/')
+ FileUtils.cp('members_controller.rb' , @controller_path+'admin/')
+ FileUtils.cp('_user_basic_passwd.html.erb' , @views_path+'admin/members/')
+ rescue
+ puts Dir.pwd
+ Dir.chdir(Rails.root.to_s)
+ puts 'error copy'
+ end
+ elsif key == "accessibility"
+ @app_path = File.expand_path(__dir__)
+ @app_path = lastpath(@app_path)
+ @app_path = lastpath(@app_path)
+ begin
+ Dir.chdir(@views_path+'layouts/')
+ File.rename('back_end.html.erb','back_end.html.erb_back')
+ Dir.chdir(@views_path+'page_parts/')
+ File.rename('_form.html.erb','_form.html.erb_back')
+ rescue
+ puts Dir.pwd
+ end
+ FileUtils.cd(@app_path+'/updatefiles/accessibility/')
+ puts 'copying accessibility'
+ begin
+ FileUtils.cp('back_end.html.erb' , @views_path+'layouts/')
+ FileUtils.cp('_form.html.erb' , @views_path+'page_parts/')
+ FileUtils.cp_r('jquery-ui-1.12.1/' , ENV['PWD'] + '/app/assets/stylesheets/lib/jquery-ui-1.12.1/')
+ rescue
+ puts Dir.pwd
+ Dir.chdir(Rails.root.to_s)
puts 'error copy'
end
end
+ Dir.chdir(Rails.root.to_s)
FileUtils.cd(Rails.root.to_s)
end
end
diff --git a/app/views/admin/patchfiles/index.html.erb b/app/views/admin/patchfiles/index.html.erb
index f0ab86e..335c8fa 100644
--- a/app/views/admin/patchfiles/index.html.erb
+++ b/app/views/admin/patchfiles/index.html.erb
@@ -14,6 +14,7 @@
<%end%>
<%end%>
<%=file.submit "#{t(:updatefont)}"%>
+
<%end%>
CKEDITOR現有字形
diff --git a/updatefiles/accessibility/CKEDITOR Readme.txt b/updatefiles/accessibility/CKEDITOR Readme.txt
new file mode 100644
index 0000000..1c498f7
--- /dev/null
+++ b/updatefiles/accessibility/CKEDITOR Readme.txt
@@ -0,0 +1,320 @@
+b ثeM/app/assets/stylesheets/libJjquery-ui-12.1Ƨ
+b ثeM/app/views/layouts/back_end.html.erbM
+ ثeM/app/views/page_parts_form.html.erbJHUe
+
+
+
+
\ No newline at end of file
diff --git a/updatefiles/accessibility/_form.html.erb b/updatefiles/accessibility/_form.html.erb
new file mode 100644
index 0000000..83beebb
--- /dev/null
+++ b/updatefiles/accessibility/_form.html.erb
@@ -0,0 +1,415 @@
+
+
+
+
+ <%#= t("page_part_kinds.public_r_tag") %>
+ <%#= sub.radio_button :kind, "public_r_tag", class: "hide" %>
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/updatefiles/accessibility/back_end.html.erb b/updatefiles/accessibility/back_end.html.erb
new file mode 100644
index 0000000..1c8092a
--- /dev/null
+++ b/updatefiles/accessibility/back_end.html.erb
@@ -0,0 +1,359 @@
+
+
+
+ <%= current_site.title %> | <%= t('dashboard_') %>
+
+ <%= render 'shared/meta' %>
+ <%= render 'shared/google_font' %>
+ <%= stylesheet_link_tag "back_end", media: "all", "data-turbolinks-track" => true %>
+ <%= stylesheet_link_tag params[:controller] if Rails.application.assets.find_asset "#{params[:controller]}.css" %>
+ <%= yield :page_specific_css %>
+ <%= javascript_include_tag "back_end" %>
+ <%= render 'shared/ie_html5_fix' %>
+ <%= javascript_include_tag params[:controller] if Rails.application.assets.find_asset "#{params[:controller]}.js" %>
+ <%= yield :page_specific_javascript %>
+ <%= csrf_meta_tags %>
+
+
+ <%= render_orbit_bar %>
+ <%= render 'layouts/side_bar' %>
+
+
+ <% if @module_app.present?%>
+
+
+ <%= back_end_breadcrumb %>
+
+ <%= yield :right_nav %>
+
+ <%end%>
+ <%= yield %>
+
+
+ <%= javascript_include_tag "lib/pageslide.js" %>
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/updatefiles/accessibility/jquery-ui-1.12.1/AUTHORS.txt b/updatefiles/accessibility/jquery-ui-1.12.1/AUTHORS.txt
new file mode 100644
index 0000000..a75056b
--- /dev/null
+++ b/updatefiles/accessibility/jquery-ui-1.12.1/AUTHORS.txt
@@ -0,0 +1,333 @@
+Authors ordered by first contribution
+A list of current team members is available at http://jqueryui.com/about
+
+Paul Bakaus
+Richard Worth
+Yehuda Katz
+Sean Catchpole
+John Resig
+Tane Piper
+Dmitri Gaskin
+Klaus Hartl
+Stefan Petre
+Gilles van den Hoven
+Micheil Bryan Smith
+Jörn Zaefferer
+Marc Grabanski
+Keith Wood
+Brandon Aaron
+Scott González
+Eduardo Lundgren
+Aaron Eisenberger
+Joan Piedra
+Bruno Basto
+Remy Sharp
+Bohdan Ganicky
+David Bolter
+Chi Cheng
+Ca-Phun Ung
+Ariel Flesler
+Maggie Wachs
+Scott Jehl
+Todd Parker
+Andrew Powell
+Brant Burnett
+Douglas Neiner
+Paul Irish
+Ralph Whitbeck
+Thibault Duplessis
+Dominique Vincent
+Jack Hsu
+Adam Sontag
+Carl Fürstenberg
+Kevin Dalman
+Alberto Fernández Capel
+Jacek Jędrzejewski (http://jacek.jedrzejewski.name)
+Ting Kuei
+Samuel Cormier-Iijima
+Jon Palmer
+Ben Hollis
+Justin MacCarthy
+Eyal Kobrigo
+Tiago Freire
+Diego Tres
+Holger Rüprich
+Ziling Zhao
+Mike Alsup
+Robson Braga Araujo
+Pierre-Henri Ausseil
+Christopher McCulloh
+Andrew Newcomb
+Lim Chee Aun
+Jorge Barreiro
+Daniel Steigerwald
+John Firebaugh
+John Enters
+Andrey Kapitcyn
+Dmitry Petrov
+Eric Hynds
+Chairat Sunthornwiphat
+Josh Varner
+Stéphane Raimbault
+Jay Merrifield
+J. Ryan Stinnett
+Peter Heiberg
+Alex Dovenmuehle
+Jamie Gegerson
+Raymond Schwartz
+Phillip Barnes
+Kyle Wilkinson
+Khaled AlHourani
+Marian Rudzynski
+Jean-Francois Remy
+Doug Blood
+Filippo Cavallarin
+Heiko Henning
+Aliaksandr Rahalevich
+Mario Visic
+Xavi Ramirez
+Max Schnur
+Saji Nediyanchath
+Corey Frang
+Aaron Peterson
+Ivan Peters
+Mohamed Cherif Bouchelaghem
+Marcos Sousa
+Michael DellaNoce
+George Marshall
+Tobias Brunner
+Martin Solli
+David Petersen
+Dan Heberden
+William Kevin Manire
+Gilmore Davidson
+Michael Wu
+Adam Parod
+Guillaume Gautreau
+Marcel Toele
+Dan Streetman
+Matt Hoskins
+Giovanni Giacobbi
+Kyle Florence
+Pavol Hluchý
+Hans Hillen
+Mark Johnson
+Trey Hunner
+Shane Whittet
+Edward A Faulkner
+Adam Baratz
+Kato Kazuyoshi
+Eike Send
+Kris Borchers
+Eddie Monge
+Israel Tsadok
+Carson McDonald
+Jason Davies
+Garrison Locke
+David Murdoch
+Benjamin Scott Boyle
+Jesse Baird
+Jonathan Vingiano
+Dylan Just
+Hiroshi Tomita
+Glenn Goodrich
+Tarafder Ashek-E-Elahi
+Ryan Neufeld
+Marc Neuwirth
+Philip Graham
+Benjamin Sterling
+Wesley Walser
+Kouhei Sutou
+Karl Kirch
+Chris Kelly
+Jason Oster
+Felix Nagel
+Alexander Polomoshnov
+David Leal
+Igor Milla
+Dave Methvin
+Florian Gutmann
+Marwan Al Jubeh
+Milan Broum
+Sebastian Sauer
+Gaëtan Muller
+Michel Weimerskirch
+William Griffiths
+Stojce Slavkovski
+David Soms
+David De Sloovere
+Michael P. Jung
+Shannon Pekary
+Dan Wellman
+Matthew Edward Hutton
+James Khoury
+Rob Loach
+Alberto Monteiro
+Alex Rhea
+Krzysztof Rosiński
+Ryan Olton
+Genie <386@mail.com>
+Rick Waldron
+Ian Simpson
+Lev Kitsis
+TJ VanToll
+Justin Domnitz
+Douglas Cerna
+Bert ter Heide
+Jasvir Nagra
+Yuriy Khabarov <13real008@gmail.com>
+Harri Kilpiö
+Lado Lomidze
+Amir E. Aharoni
+Simon Sattes
+Jo Liss
+Guntupalli Karunakar
+Shahyar Ghobadpour
+Lukasz Lipinski
+Timo Tijhof
+Jason Moon
+Martin Frost
+Eneko Illarramendi
+EungJun Yi
+Courtland Allen
+Viktar Varvanovich
+Danny Trunk
+Pavel Stetina
+Michael Stay
+Steven Roussey
+Michael Hollis
+Lee Rowlands
+Timmy Willison
+Karl Swedberg
+Baoju Yuan
+Maciej Mroziński
+Luis Dalmolin
+Mark Aaron Shirley
+Martin Hoch
+Jiayi Yang
+Philipp Benjamin Köppchen
+Sindre Sorhus
+Bernhard Sirlinger
+Jared A. Scheel
+Rafael Xavier de Souza
+John Chen
+Robert Beuligmann
+Dale Kocian
+Mike Sherov
+Andrew Couch
+Marc-Andre Lafortune
+Nate Eagle
+David Souther
+Mathias Stenbom
+Sergey Kartashov
+Avinash R
+Ethan Romba
+Cory Gackenheimer
+Juan Pablo Kaniefsky
+Roman Salnikov
+Anika Henke
+Samuel Bovée
+Fabrício Matté
+Viktor Kojouharov
+Pawel Maruszczyk (http://hrabstwo.net)
+Pavel Selitskas
+Bjørn Johansen
+Matthieu Penant
+Dominic Barnes
+David Sullivan
+Thomas Jaggi
+Vahid Sohrabloo
+Travis Carden
+Bruno M. Custódio
+Nathanael Silverman
+Christian Wenz
+Steve Urmston
+Zaven Muradyan
+Woody Gilk
+Zbigniew Motyka
+Suhail Alkowaileet
+Toshi MARUYAMA
+David Hansen
+Brian Grinstead
+Christian Klammer
+Steven Luscher
+Gan Eng Chin
+Gabriel Schulhof
+Alexander Schmitz
+Vilhjálmur Skúlason
+Siebrand Mazeland
+Mohsen Ekhtiari
+Pere Orga