delete unuse code
This commit is contained in:
1 parent
4433d4d40d
commit
d39daee2cd
2 files changed
-462
No files matched your search
@@ -6,43 +6,14 @@ class Patchfilefield
|
||||
# encoding: utf-8
|
||||
include OrbitTag::Taggable
|
||||
include OrbitCategory::Categorizable
|
||||
#include Slug
|
||||
field :font_array , :type => Hash, default:{}
|
||||
field :new_add_font, type: String, default:""
|
||||
field :delete_font, type: String, default:""
|
||||
field :used_font , :type => Array, default:[]
|
||||
field :un_used_font , :type => Array, default:[]
|
||||
#field :title, as: :slug_title, type: String, localize: true
|
||||
field :title ,type:String ,default:""
|
||||
field :subtitle, localize: true
|
||||
field :text, localize: true
|
||||
#field :create_user_id
|
||||
#field :update_user_id
|
||||
# field :public, :type => Boolean, :default => true
|
||||
#field :postdate , :type => DateTime, :default => Time.now
|
||||
#field :deadline , :type => DateTime
|
||||
# field :rss2_sn
|
||||
#field :approved, :type => Boolean, :default => false
|
||||
#field :is_preview, :type => Boolean, :default => false
|
||||
#field :expirable_created_at, type: DateTime
|
||||
# field :rejected, :type => Boolean, :default => false
|
||||
#field :reapproval, :type => Boolean, :default => false
|
||||
# field :rejection_reason
|
||||
#field :is_external_link, :type => Boolean, :default => false
|
||||
#field :external_link
|
||||
#field :email_id
|
||||
#field :email_sent, :type => Boolean, :default => false
|
||||
# field :email_sentdate , :type => DateTime
|
||||
# field :email_member_ids
|
||||
#field :other_mailaddress
|
||||
# field :image_description, localize: true
|
||||
# field :top_end_date, :type => DateTime
|
||||
# mount_uploader :image, ImageUploader
|
||||
#has_many :bulletin_links, :autosave => true, :dependent => :destroy
|
||||
# has_many :bulletin_files, :autosave => true, :dependent => :destroy
|
||||
|
||||
#accepts_nested_attributes_for :bulletin_files, :allow_destroy => true
|
||||
# accepts_nested_attributes_for :bulletin_links, :allow_destroy => true
|
||||
# before_destroy :destroy_email
|
||||
scope :can_display, ->{where(:is_hidden=>false,:is_preview => false).any_of({:postdate.lt=>Time.now, :deadline.gt=>Time.now},{:postdate.lt=>Time.now, :deadline=>nil}).order_by([:is_top, :desc],[:postdate, :desc])}
|
||||
scope :is_approved, ->{where(:approved => true)}
|
||||
@@ -61,7 +32,6 @@ class Patchfilefield
|
||||
@end_character
|
||||
if @index_of_font != nil
|
||||
@inex_start_to_search = @index_of_font + @name_to_search.length
|
||||
#@str_start = 0 #if @str_start=0 =>not reach the start of font string
|
||||
@str_start = @inex_start_to_search
|
||||
if (@filedata[@inex_start_to_search] != "\'" && @filedata[@inex_start_to_search] != "\"")
|
||||
for @str_start in @inex_start_to_search..@filedata.length
|
||||
@@ -116,7 +86,6 @@ class Patchfilefield
|
||||
@count = self.font_array.count
|
||||
self.font_array = self.font_array.merge({@count =>{self.new_add_font.strip => true}})
|
||||
end
|
||||
#self.cuurent_used_font push true
|
||||
self.new_add_font = ""
|
||||
end
|
||||
end
|
||||
@@ -243,7 +212,6 @@ class Patchfilefield
|
||||
end
|
||||
puts self.used_font
|
||||
puts @filedata
|
||||
#render :html => @delete_font_array.to_s+" "+ @filedata and return
|
||||
@filetowrite.write(@filedata)
|
||||
@filetowrite.close
|
||||
@filetocover = File.open("config.js.erb","w")
|
||||
|
||||
Reference in new issue
Block a user