fix some bug
This commit is contained in:
parent
f8c03d2342
commit
4433d4d40d
|
@ -78,6 +78,7 @@ class Admin::PatchfilesController < OrbitAdminController
|
||||||
redirect_to admin_patchfiles_showckeditor_path
|
redirect_to admin_patchfiles_showckeditor_path
|
||||||
end
|
end
|
||||||
def newfont
|
def newfont
|
||||||
|
params["patchfilefield"]["new_add_font"] = params["patchfilefield"]["new_add_font"].gsub('\"','').gsub("\'",'').gsub(";",'')
|
||||||
@field.new_add_font = params["patchfilefield"]["new_add_font"] rescue (redirect_to admin_patchfiles_showckeditor_path and return)
|
@field.new_add_font = params["patchfilefield"]["new_add_font"] rescue (redirect_to admin_patchfiles_showckeditor_path and return)
|
||||||
params["patchfilefield"]["font_array"].each_with_index do |(font,istrue),index|
|
params["patchfilefield"]["font_array"].each_with_index do |(font,istrue),index|
|
||||||
if istrue =="0"
|
if istrue =="0"
|
||||||
|
|
|
@ -223,6 +223,7 @@ class Patchfilefield
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@delete_font_array.each do |font_to_delete|
|
@delete_font_array.each do |font_to_delete|
|
||||||
|
if @filedata.index(font_to_delete) != nil
|
||||||
@str_above_end = @filedata.index(font_to_delete) - 1
|
@str_above_end = @filedata.index(font_to_delete) - 1
|
||||||
@str_above_start
|
@str_above_start
|
||||||
for @str_above_start in (0..@str_above_end).to_a.reverse
|
for @str_above_start in (0..@str_above_end).to_a.reverse
|
||||||
|
@ -239,6 +240,7 @@ class Patchfilefield
|
||||||
@filedata.slice!(@i)
|
@filedata.slice!(@i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
puts self.used_font
|
puts self.used_font
|
||||||
puts @filedata
|
puts @filedata
|
||||||
#render :html => @delete_font_array.to_s+" "+ @filedata and return
|
#render :html => @delete_font_array.to_s+" "+ @filedata and return
|
||||||
|
|
Loading…
Reference in New Issue