|
|
@ -1,10 +1,9 @@ |
|
|
|
class Widget::Table::Progressbar < Widget::Base |
|
|
|
class Widget::Table::Progressbar < Widget::Base |
|
|
|
attr_accessor :threshhold |
|
|
|
THRESHHOLD = 500 |
|
|
|
|
|
|
|
|
|
|
|
def render |
|
|
|
def render |
|
|
|
@threshhold ||= 500 |
|
|
|
|
|
|
|
size = @query.size |
|
|
|
size = @query.size |
|
|
|
if size >= @threshhold || cached? |
|
|
|
if size >= THRESHHOLD || cached? |
|
|
|
write(content_tag :div, :id => "progressbar", :class => "form_controls", |
|
|
|
write(content_tag :div, :id => "progressbar", :class => "form_controls", |
|
|
|
:"data-query-size" => size do |
|
|
|
:"data-query-size" => size do |
|
|
|
content_tag :div, :id => "progressbar-load-table-question", :class => "form_controls" do |
|
|
|
content_tag :div, :id => "progressbar-load-table-question", :class => "form_controls" do |
|
|
|