Module: ActionView::Helpers::FormHelper

Defined in:
lib/progress_upload_field.rb

Instance Method Summary collapse

Instance Method Details

#progress_upload_field(div_name) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/progress_upload_field.rb', line 6

def progress_upload_field(div_name)
  fields = ""
  fields += "<div id='progressIndicator'>"
    fields += "<div id='#{div_name}Bar'>"
      fields += "<div id='#{div_name}Response'></div>"
      fields += "<div id='#{div_name}Number'></div>"
    fields += "</div>"
    fields += "<div id='#{div_name}UploadInfo'>"
      fields += "<span id='#{div_name}TransferSpeedInfo'></span>"
      fields += "<span id='#{div_name}TimeRemainingInfo'></span>"
      fields += "<span id='#{div_name}BytesInfo'></span>"
    fields += "</div>"
  fields += "</div>"
  fields += "<div id='#{div_name}Info'></div>"
  fields += "<div id='#{div_name}Name'></div>"
  fields += "<div id='#{div_name}Size'></div>"
  fields += "<div id='#{div_name}Type'></div>"
  raw(fields)
end