From a8a498684eb2585e628b7264bbdac17188dfe8f5 Mon Sep 17 00:00:00 2001 From: Godwin Date: Sat, 21 May 2016 14:27:27 -0700 Subject: [PATCH] Fixed errors --- .../stylesheets/bumbleberry-settings.json | 11 +- app/helpers/application_helper.rb | 111 ++++-------------- 2 files changed, 32 insertions(+), 90 deletions(-) diff --git a/app/assets/stylesheets/bumbleberry-settings.json b/app/assets/stylesheets/bumbleberry-settings.json index 96ad992..407ddb7 100644 --- a/app/assets/stylesheets/bumbleberry-settings.json +++ b/app/assets/stylesheets/bumbleberry-settings.json @@ -1,5 +1,14 @@ { "stylesheets": ["application", "translations", "email-example"], + "precompile": { + "test": { + "chrome": ["50"] + }, + "development": { + "chrome": ["50"], + "ios_saf": ["8", "9"] + } + }, "background-color": "#FFFEFE", "breakpoint-unit": "px", "unresponsive-width": 1000, @@ -21,7 +30,7 @@ "reset-order": "n" }, "medium": { - "range": [564], + "range": [680], "grid": "y", "offset": "n", "reset-order": "n" diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index fafef04..2cf3889 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -151,84 +151,6 @@ module ApplicationHelper content_for?(section) ? content_for(section) : default end -# def _(key, behavior = nil, behavior_size = nil, locale: nil, vars: {}, html: nil, blockData: {}, &block) -# options = vars -# options[:fallback] = true -# if behavior -# options[:behavior] = behavior -# options[:behavior_size] = behavior_size -# end -# if locale -# options[:locale] = locale.to_sym -# end -# #if vars -# # puts "\nVARS:\t#{vars}\n" -# #end -# I18n.translate(key, options) -# -# #queued_keys = nil -# #result = nil -# -# #if key.kind_of?(Hash) -# # blockData.merge!(key) -# # key = key.keys -# #end -# -# #if block_given? -# # @@keyQueue ||= Array.new -# -# # if key.kind_of?(Array) -# # @@keyQueue += key -# # else -# # @@keyQueue << key -# # end -# #end -# -# #if key.kind_of?(Array) -# # new_key = key.shift -# # if key.count > 0 -# # queued_keys = key.dup -# # end -# # key = new_key -# #end -# -# #if blockData[key] -# # behavior = blockData[key][:behavior] || nil -# # behavior_size = blockData[key][:behavior_size] || nil -# # vars = blockData[key][:vars] || {} -# #end -# -# #@@lastTranslation = nil -# #generate_control = _can_translate? -# -# #puts "\nLLOOCCAALLEE:\t#{locale.to_s}" -# #translation = _do_translate(key, vars, behavior, behavior_size, locale) -# -# #if block_given? -# # html = capture(&block) -# #end -# -# #if html -# # translation['html'] = html.gsub('%' + key + '%', translation['untranslated']) -# #end -# -# #if generate_control -# # @@lastTranslation = translation -# # @@allTranslations ||= Hash.new -# # @@allTranslations[key] = key -# -# # result = _translate_me(translation) -# #end -# -# #result ||= translation['html'] || (behavior.to_s == 'strict' ? nil : translation['untranslated']) -# -# #if queued_keys -# # return _ queued_keys, behavior, behavior_size, vars: vars, html: result, blockData: blockData -# #end -# - #return result -# end - def _translate_me(translation) @@translationsOnThisPage = true datakeys = '' @@ -263,17 +185,20 @@ module ApplicationHelper false end - #def _!() - # if @@keyQueue - # return '%' + @@keyQueue.shift + '%' - # end - #end + def url_for_locale(locale) + url_for(params + .merge({action: (params[:_original_action] || params[:action])} + .merge(url_params(locale))) + .delete(:_original_action) + ) + end - #def _?() - # if @@keyQueue - # return '%' + @@keyQueue[0] + '%' - # end - #end + def registration_steps(conference = @conference) + { + pre: [:policy, :basic_info, :workshops], + open: [:policy, :basic_info, :questions, :payment, :workshops] + }[@this_conference.registration_status] + end def sortable(objects, id = 'id', url: nil, &block) result = '