add javascript translations, darken background and other confirm

This commit is contained in:
2012-09-07 11:35:33 +02:00
parent 19232be356
commit 3adf392e54
7 changed files with 60 additions and 20 deletions
+8 -2
View File
@@ -5,8 +5,7 @@ class UserController < ApplicationController
alias :list :active_list
def home
flash.now[:notice] = t('messages.the_list_has_been_closed', list: List.model_name.human) if params[:list_closed].present?
flash.now[:notice] = t("messages.#{params[:message]}") if params[:message].present? && params[:message] =~ /^\w+$/
handle_message_params
render layout: 'phone'
end
@@ -52,6 +51,7 @@ class UserController < ApplicationController
@supplier = list.supplier
respond_to do |format|
format.html do
handle_message_params
render layout: 'phone'
end
format.json do
@@ -260,4 +260,10 @@ class UserController < ApplicationController
render json: {occupied: false}
end
end
private
def handle_message_params
flash.now[:notice] = t('messages.the_list_has_been_closed', list: List.model_name.human) if params[:list_closed].present?
flash.now[:notice] = t("messages.#{params[:message]}", list: List.model_name.human, supplier: Supplier.model_name.human) if params[:message].present? && params[:message] =~ /^\w+$/
end
end