From 6c6579902597881dd64ca8df67b54b8ca9644b5d Mon Sep 17 00:00:00 2001 From: wvengen Date: Wed, 10 Apr 2013 17:34:24 +0200 Subject: [PATCH] use more beautiful close mark --- app/helpers/application_helper.rb | 2 +- app/views/articles/_form.html.haml | 2 +- app/views/finance/balancing/_edit_note.html.haml | 2 +- app/views/finance/order_articles/_edit.html.haml | 2 +- app/views/finance/order_articles/_new.html.haml | 2 +- app/views/invites/_modal_form.html.haml | 2 +- app/views/stockit/_destroy_fail.js.haml | 2 +- app/views/stockit/destroy.js.haml | 2 +- config/locales/de/de.defaults.yml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a57253c3..934283cb 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -152,7 +152,7 @@ module ApplicationHelper type = :success if type == :notice type = :error if type == :alert text = content_tag(:div, - content_tag(:button, I18n.t('ui.marks.close'), :class => "close", "data-dismiss" => "alert") + + content_tag(:button, I18n.t('ui.marks.close').html_safe, :class => "close", "data-dismiss" => "alert") + message, :class => "alert fade in alert-#{type}") flash_messages << text if message end diff --git a/app/views/articles/_form.html.haml b/app/views/articles/_form.html.haml index c92e4901..84ed67e0 100644 --- a/app/views/articles/_form.html.haml +++ b/app/views/articles/_form.html.haml @@ -2,7 +2,7 @@ = f.hidden_field :shared_updated_on = f.hidden_field :supplier_id .modal-header - = button_tag t('ui.marks.close'), class: 'close', data: {dismiss: 'modal'} + = button_tag t('ui.marks.close').html_safe, class: 'close', data: {dismiss: 'modal'} %h3= t '.title' .modal-body = f.input :availability diff --git a/app/views/finance/balancing/_edit_note.html.haml b/app/views/finance/balancing/_edit_note.html.haml index 73ee5396..35b4cd45 100644 --- a/app/views/finance/balancing/_edit_note.html.haml +++ b/app/views/finance/balancing/_edit_note.html.haml @@ -1,6 +1,6 @@ = simple_form_for @order, url: update_note_finance_order_path(@order), remote: true, method: :put do |f| .modal-header - = button_tag t('ui.marks.close'), class: 'close', data: {dismiss: 'modal'} + = button_tag t('ui.marks.close').html_safe, class: 'close', data: {dismiss: 'modal'} %h3 Notiz bearbeiten .modal-body = f.input :note, input_html: {class: 'input-xlarge'} diff --git a/app/views/finance/order_articles/_edit.html.haml b/app/views/finance/order_articles/_edit.html.haml index 75c890ec..cc4e3874 100644 --- a/app/views/finance/order_articles/_edit.html.haml +++ b/app/views/finance/order_articles/_edit.html.haml @@ -1,6 +1,6 @@ = simple_form_for [:finance, @order, @order_article], remote: true do |form| .modal-header - = button_tag t('ui.marks.close'), class: 'close', data: {dismiss: 'modal'} + = button_tag t('ui.marks.close').html_safe, class: 'close', data: {dismiss: 'modal'} %h3= t '.title' .modal-body = form.input :units_to_order diff --git a/app/views/finance/order_articles/_new.html.haml b/app/views/finance/order_articles/_new.html.haml index 5519c68b..4e26d8c3 100644 --- a/app/views/finance/order_articles/_new.html.haml +++ b/app/views/finance/order_articles/_new.html.haml @@ -1,6 +1,6 @@ = simple_form_for [:finance, @order, @order_article], remote: true do |form| .modal-header - = button_tag t('ui.marks.close'), class: 'close', data: {dismiss: 'modal'} + = button_tag t('ui.marks.close').html_safe, class: 'close', data: {dismiss: 'modal'} %h3= t '.title' .modal-body = form.input :article_id, as: :select, collection: new_order_articles_collection diff --git a/app/views/invites/_modal_form.html.haml b/app/views/invites/_modal_form.html.haml index 1a704af9..2ae70224 100644 --- a/app/views/invites/_modal_form.html.haml +++ b/app/views/invites/_modal_form.html.haml @@ -1,6 +1,6 @@ = simple_form_for @invite, remote: true do |form| .modal-header - = button_tag t('ui.marks.close'), class: 'close', data: {dismiss: 'modal'} + = button_tag t('ui.marks.close').html_safe, class: 'close', data: {dismiss: 'modal'} %h3= t '.title' .modal-body = t('.body', group: @invite.group.name).html_safe diff --git a/app/views/stockit/_destroy_fail.js.haml b/app/views/stockit/_destroy_fail.js.haml index 7b35d38d..ca85c67c 100644 --- a/app/views/stockit/_destroy_fail.js.haml +++ b/app/views/stockit/_destroy_fail.js.haml @@ -1,5 +1,5 @@ -# please polish the following line if you know how, same in view destroy -var errorDiv = $('
#{t('ui.marks.close')}
'); +var errorDiv = $('
#{t('ui.marks.close').html_safe}
'); errorDiv.append(document.createTextNode('#{j(fail_msg)}')); $('div.container-fluid').prepend(errorDiv); diff --git a/app/views/stockit/destroy.js.haml b/app/views/stockit/destroy.js.haml index b95deab8..b70b44ca 100644 --- a/app/views/stockit/destroy.js.haml +++ b/app/views/stockit/destroy.js.haml @@ -1,5 +1,5 @@ -# please polish the following line if you know how, same in partial _destroy_fail -var successDiv = $('
#{escape_javascript(t('ui.marks.close'))}
'); +var successDiv = $('
#{escape_javascript(t('ui.marks.close').html_safe)}
'); successDiv.append(document.createTextNode('#{escape_javascript(t('.notice', name: @article.name))}')); $('div.container-fluid').prepend(successDiv); diff --git a/config/locales/de/de.defaults.yml b/config/locales/de/de.defaults.yml index acbbf74f..77892ed7 100644 --- a/config/locales/de/de.defaults.yml +++ b/config/locales/de/de.defaults.yml @@ -312,5 +312,5 @@ de: save: 'Speichern' or_cancel: 'oder abbrechen' marks: - close: 'x' + close: '×'