asking for confirmation when deleting files from the file widget
Oleg
committed Oct 04, 2011
commit 868b10dd5643327465260a25f9bad902faf1433d
Showing 4
changed files with
11 additions
and 6 deletions
app/assets/stylesheets/comfortable_mexican_sofa/form.css
+6
-5
| @@ | @@ -70,8 +70,8 @@ |
| #cms_body #form_blocks .files { | |
| overflow: hidden; | |
| margin-top: 5px; | |
| - | background-color: #252525; |
| - | padding: 5px 5px 0px 10px; |
| + | background-color: #f1f1f1; |
| + | padding: 5px 0px 0px 5px; |
| border-radius: 5px; | |
| color: #fff; | |
| min-height: 20px; | |
| @@ | @@ -88,12 +88,12 @@ |
| } | |
| #cms_body #form_blocks .files .file a { | |
| float: left; | |
| - | color: #a3a3a3; |
| + | color: #fff; |
| font: 9px/9px Arial, serif; | |
| text-transform: uppercase; | |
| } | |
| - | #cms_body #form_blocks .files .file a:hover { |
| - | color: #fff; |
| + | #cms_body #form_blocks .files .file:hover { |
| + | background-color: #000; |
| } | |
| #cms_body #form_blocks .files .file a.delete { | |
| float: right; | |
| @@ | @@ -106,6 +106,7 @@ |
| } | |
| #cms_body #form_blocks .files .file a.delete:hover { | |
| background-color: #fff; | |
| + | color: #9E0B0F; |
| } | |
| #cms_body .form_element.field_date_time .label, | |
| #cms_body .form_element.field_integer .label, | |
app/views/cms_admin/files/_file.html.erb
+1
-1
| @@ | @@ -6,5 +6,5 @@ |
| end | |
| %> | |
| <%= link_to file_name, file.file.url, :target => '_blank', :class => 'filename' %> | |
| - | <%= link_to span_tag('x'), cms_admin_site_file_path(@site, file), :method => :delete, :remote => true, :class => 'delete' %> |
| + | <%= link_to span_tag('x'), cms_admin_site_file_path(@site, file), :method => :delete, :remote => true, :confirm => t('.are_you_sure'), :class => 'delete' %> |
| </div> | |
| \ No newline at end of file | |
config/locales/en.yml
+2
-0
| @@ | @@ -200,6 +200,8 @@ en: |
| update: Update File | |
| page_form: | |
| are_you_sure: Are you sure? | |
| + | file: |
| + | are_you_sure: Are you sure? |
| categories: | |
| index: | |
config/locales/es.yml
+2
-0
| @@ | @@ -200,6 +200,8 @@ es: |
| update: Actualizar Archivo | |
| page_form: | |
| are_you_sure: ¿Estás seguro? | |
| + | file: |
| + | are_you_sure: ¿Estás seguro? |
| categories: | |
| index: | |