app/models/inputs/asset_box.rb in effective_assets-1.3.0 vs app/models/inputs/asset_box.rb in effective_assets-1.3.1
- old
+ new
@@ -82,11 +82,13 @@
:limit => @options[:limit],
:disabled => @options[:disabled],
:file_types => @options[:file_types],
:progress_bar_partial => @options[:progress_bar_partial],
:drop_files => @options[:uploader_drop_files],
- :aws_acl => @options[:aws_acl]
+ :drop_files_help_text => @options[:drop_files_help_text],
+ :aws_acl => @options[:aws_acl],
+ :btn_label => @options[:btn_label]
}
).html_safe
end
def filter_bar_html
@@ -136,19 +138,21 @@
def initialize_options(method, opts)
{
:uploader => true, # :top, :bottom, true or false
:uploader_drop_files => false,
+ :drop_files_help_text => 'Drop files here',
:progress_bar_partial => 'asset_box_input/progress_bar_template',
:attachment_style => :thumbnail, # :thumbnail, :table, or :list
:attachment_add_to => :bottom, # :bottom or :top (of attachments div)
:attachment_actions => [:remove], # or :insert, :delete, :remove
:table_filter_bar => false,
:dialog => false,
:dialog_url => @template.effective_assets.effective_assets_path,
:disabled => false,
:file_types => [:any],
- :aws_acl => EffectiveAssets.aws_acl
+ :aws_acl => EffectiveAssets.aws_acl,
+ :btn_label => "Upload files..."
}.merge(opts).tap do |options|
options[:method] = method.to_s
options[:box] = method.to_s.pluralize
options[:attachable_id] ||= (@object.try(:id) rescue nil)
options[:attachable_type] ||= @object.class.name.titleize.gsub(" ", "_").gsub('/', '_').downcase