Merge branch 'feature/widgets' into feature/fix_18697

pull/6827/head
Philipp Tessenow 14 years ago
commit 81aa334721
  1. BIN
      assets/images/delete.gif
  2. BIN
      assets/images/disk.gif
  3. BIN
      assets/images/disks.gif
  4. BIN
      assets/images/remove.gif
  5. 54
      assets/stylesheets/reporting.css
  6. 2
      lib/widget/controls/clear.rb
  7. 11
      lib/widget/controls/delete.rb
  8. 4
      lib/widget/controls/save.rb
  9. 4
      lib/widget/controls/save_as.rb

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 B

@ -329,8 +329,10 @@ td:hover .drill_down, th:hover .drill_down {
} }
.form_controls { .form_controls {
font-size: 13px; font-size: 11px;
line-height: 18px; line-height: 17px;
margin-top: 6px;
margin-bottom: 10px;
} }
.buttons .reporting_button:hover { .buttons .reporting_button:hover {
@ -356,8 +358,7 @@ td:hover .drill_down, th:hover .drill_down {
margin: 2px; margin: 2px;
} }
.buttons .apply { .buttons .button {
background-color: #9a9a9a;
border: none; border: none;
cursor: pointer; cursor: pointer;
margin: 0px; margin: 0px;
@ -369,11 +370,23 @@ td:hover .drill_down, th:hover .drill_down {
padding: 4px; padding: 4px;
} }
.buttons .apply {
background-color: #990000;
}
.buttons .apply:hover { .buttons .apply:hover {
background-color: #CC0000;
}
.buttons .secondary {
background-color: #9a9a9a;
}
.buttons .secondary:hover {
background-color: #666666; background-color: #666666;
} }
.buttons .apply span em { .buttons .button span em {
color: white; color: white;
display: block; display: block;
font-size: 11px; font-size: 11px;
@ -382,9 +395,36 @@ td:hover .drill_down, th:hover .drill_down {
line-height: 17px; line-height: 17px;
} }
.buttons .apply span { .buttons .button span {
display: inline-block; display: inline-block;
margin: 0px; margin: 3px;
}
.buttons .button-icon {
padding: 3px 5px 0 16px;
cursor: pointer;
background: no-repeat left center;
border-style: none;
display: inline-block;
margin-top: 0px;
margin-bottom: 0px;
}
.button .icon-save {
background-image: url(../images/disk.gif);
}
.button .icon-save-as {
background-image: url(../images/disks.gif);
}
.button .icon-delete {
background-image: url(../images/delete.gif);
}
.button .icon-clear {
background-image: url(../images/remove.gif);
} }
div.button_form { div.button_form {

@ -1,5 +1,5 @@
class Widget::Controls::Clear < Widget::Base class Widget::Controls::Clear < Widget::Base
def render def render
link_to l(:button_clear), '#', :id => 'query-link-clear', :class => 'icon icon-clear' link_to content_tag(:span, content_tag(:em, l(:"button_clear"), :class => "button-icon icon-clear")), '#', :id => 'query-link-clear', :class => 'button secondary'
end end
end end

@ -1,14 +1,19 @@
class Widget::Controls::Delete < Widget::Base class Widget::Controls::Delete < Widget::Base
def render def render
return "" if @query.new_record? return "" if @query.new_record?
button = link_to l(:button_delete), "#", button = link_to content_tag(:span, content_tag(:em, l(:button_delete), :class => "button-icon icon-delete")), "#",
:class => 'breadcrumb_icon icon-delete', :class => 'button secondary',
:id => 'query-icon-delete', :id => 'query-icon-delete',
:title => l(:button_delete) :title => l(:button_delete)
popup = content_tag :div, :id => "delete_form", :class => "button_form" do popup = content_tag :div, :id => "delete_form", :class => "button_form" do
question = content_tag :p, l(:label_really_delete_question) question = content_tag :p, l(:label_really_delete_question)
options = content_tag :p do options = content_tag :p do
opt1 = link_to l(:button_delete), url_for(:action => 'delete', :id => @query.id) delete_button = content_tag :span do
span = content_tag :em do
l(:button_delete)
end
end
opt1 = link_to delete_button, url_for(:action => 'delete', :id => @query.id), :class => "button apply"
opt2 = link_to l(:button_cancel), "#", :id => "query-icon-delete-cancel", :class => 'icon icon-cancel' opt2 = link_to l(:button_cancel), "#", :id => "query-icon-delete-cancel", :class => 'icon icon-cancel'
opt1 + opt2 opt1 + opt2
end end

@ -1,9 +1,9 @@
class Widget::Controls::Save < Widget::Base class Widget::Controls::Save < Widget::Base
def render def render
return "" if @query.new_record? return "" if @query.new_record?
link_to content_tag(:span, content_tag(:em, l(:button_save))), {}, link_to content_tag(:span, content_tag(:em, l(:button_save)), :class => "button-icon icon-save"), {},
:href => "#", :id => "query-breadcrumb-save", :href => "#", :id => "query-breadcrumb-save",
:class => "breadcrumb_icon icon-save", :class => "button secondary",
:title => l(:button_save), :title => l(:button_save),
:"data-target" => url_for(:action => 'update', :id => @query.id, :set_filter => '1') :"data-target" => url_for(:action => 'update', :id => @query.id, :set_filter => '1')
end end

@ -7,8 +7,8 @@ class Widget::Controls::SaveAs < Widget::Base
link_name = l(:button_save_as) link_name = l(:button_save_as)
icon = "icon-save-as" icon = "icon-save-as"
end end
button = link_to link_name, "#", button = link_to content_tag(:span, content_tag(:em, link_name, :class => "button-icon icon-save-as")), "#",
:class => "breadcrumb_icon #{icon}", :class => "button secondary",
:id => 'query-icon-save-as', :title => link_name :id => 'query-icon-save-as', :title => link_name
button + render_popup button + render_popup
end end

Loading…
Cancel
Save