[FIT #19061] Hide SaveAs and Delete popup widgets per default.

pull/6827/head
Tim Felgentreff 14 years ago
parent f1c47a2bab
commit 268f51fc75
  1. 19
      lib/widget/controls/delete.rb
  2. 2
      lib/widget/controls/save_as.rb

@ -1,11 +1,19 @@
class Widget::Controls::Delete < Widget::Base
def render
return "" if @query.new_record?
button = link_to content_tag(:span, content_tag(:em, l(:button_delete), :class => "button-icon icon-delete")), "#",
:class => 'button secondary',
:id => 'query-icon-delete',
:title => l(:button_delete)
popup = content_tag :div, :id => "delete_form", :class => "button_form" do
render_button + render_popup
end
def render_button
link_to(content_tag(:span, content_tag(:em, l(:button_delete), :class => "button-icon icon-delete")),
"#",
:class => 'button secondary',
:id => 'query-icon-delete',
:title => l(:button_delete))
end
def render_popup
content_tag :div, :id => "delete_form", :class => "button_form", :style => "display:none" do
question = content_tag :p, l(:label_really_delete_question)
options = content_tag :p do
delete_button = content_tag :span do
@ -19,6 +27,5 @@ class Widget::Controls::Delete < Widget::Base
end
question + options
end
button + popup
end
end

@ -39,7 +39,7 @@ class Widget::Controls::SaveAs < Widget::Base
end
def render_popup
content_tag :div, :id => 'save_as_form', :class => "button_form" do
content_tag :div, :id => 'save_as_form', :class => "button_form", :style => "display:none" do
render_popup_form + render_popup_buttons
end
end

Loading…
Cancel
Save