Fixed Default Locale

This commit is contained in:
saurabhbhatia 2013-11-29 21:37:25 +08:00
parent 7cfd9080e8
commit 18a1701472
3 changed files with 10 additions and 10 deletions

View File

@ -21,7 +21,9 @@ class Admin::SitesController < OrbitBackendController
end end
def update def update
params[:site][:defalut_locale] = nil if params[:site][:default_locale].blank? if params[:site][:enable_language_detection]
Site.update_all({:default_locale => nil})
end
@site.update_attributes(params[:site]) @site.update_attributes(params[:site])
redirect_to :back redirect_to :back
end end
@ -72,12 +74,12 @@ class Admin::SitesController < OrbitBackendController
end end
def reset_default_locale # def reset_default_locale
@site.defalut_locale = params[:default_locale] # @site.defalut_locale = params[:default_locale]
if @site.save # if @site.save
render :nothing => true # render :nothing => true
end # end
end # end
def change_design def change_design
design = Design.find(params[:site_id]) rescue nil design = Design.find(params[:site_id]) rescue nil

View File

@ -262,7 +262,6 @@ delete locales;
<script type="text/javascript"> <script type="text/javascript">
$(".language-nav li a").click(function(){window.location.hash = $(this).attr("href")}) $(".language-nav li a").click(function(){window.location.hash = $(this).attr("href")})
</script>> </script>>
<% content_for :page_specific_javascript do %>
<script> <script>
$(document).ready(function(){ $(document).ready(function(){
$(document).on('change', '.reset_default_locale', function(){ $(document).on('change', '.reset_default_locale', function(){
@ -274,7 +273,6 @@ delete locales;
}); });
}); });
</script> </script>
<% end %>
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
$('a[data-toggle="tab"]').on('click', function (e) { $('a[data-toggle="tab"]').on('click', function (e) {

View File

@ -67,7 +67,7 @@ Orbit::Application.configure do
:enable_starttls_auto => true, :enable_starttls_auto => true,
:openssl_verify_mode => 'none', :openssl_verify_mode => 'none',
:address => 'smtp.sendgrid.net', :address => 'smtp.sendgrid.net',
:port => '25', :port => '587',
:domain => "new.tp.rulingcom.com", :domain => "new.tp.rulingcom.com",
:authentication => "plain", :authentication => "plain",
:user_name => "rulingcom", :user_name => "rulingcom",