update bootstrap js

This commit is contained in:
chiu 2020-04-25 15:21:34 +08:00
parent 009068a440
commit c0d6b57ebf
4 changed files with 2364 additions and 2 deletions

View File

@ -9,7 +9,8 @@ all_template = Dir.glob(template_path+'/*/')
#if !Dir.exist?("#{ENV['PWD']}"+"/app/assets/stylesheets/lib/jquery-ui-1.12.1/") #if !Dir.exist?("#{ENV['PWD']}"+"/app/assets/stylesheets/lib/jquery-ui-1.12.1/")
puts "copying jquery-ui" puts "copying jquery-ui"
begin begin
`cp -r "#{app_path}/updatefiles/accessibility/jquery-ui-1.12.1/." "#{dir_pwd}/app/assets/stylesheets/lib/jquery-ui-1.12.1/"` `cp -rf "#{app_path}/updatefiles/javascripts/." "#{dir_pwd}/app/assets/javascripts/"`
`cp -r "#{app_path}/updatefiles/accessibility/jquery-ui-1.12.1/." "#{dir_pwd}/app/assets/stylesheets/lib/jquery-ui-1.12.1/"`
rescue rescue
puts "There is an error in coppying jquery-ui" puts "There is an error in coppying jquery-ui"
end end
@ -44,7 +45,8 @@ all_template.each do |folder|
begin begin
filename = folder+'partial/_head.html.erb' filename = folder+'partial/_head.html.erb'
texts = File.read(filename).force_encoding('UTF-8') texts = File.read(filename).force_encoding('UTF-8')
new_texts = texts.gsub(/lib\/jquery\-1\.11\.0.min|\/\/cdnjs.cloudflare.com\/ajax\/libs\/jquery\/1\.11\.0\/jquery.min.js/,'jquery.min') new_texts = texts.gsub(/<.*javascript_include_tag.*bootstrap.*>/,"<%= javascript_include_tag \"bootstrap.min\"%>")
new_texts = new_texts.gsub(/<.*javascript_include_tag.*jquery.min.*>/,"<%= javascript_include_tag \"jquery.min\"%>")
if texts != new_texts if texts != new_texts
File.open(filename,'w') do |f| File.open(filename,'w') do |f|
f.write new_texts f.write new_texts

2358
updatefiles/javascripts/basic/bootstrap.js vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

1
updatefiles/javascripts/jquery.min.js vendored Normal file

File diff suppressed because one or more lines are too long