change location using href in javascript for phonegap support
This commit is contained in:
@@ -135,7 +135,7 @@ function redirect_to(mapping, variables){
|
||||
vars.push(name + '=' +variables[name]);
|
||||
Qstorage.setItem(name, variables[name]);
|
||||
}
|
||||
window.location = QMobile.root_url() + path_mapping[mapping] + '.html'
|
||||
window.location.href = QMobile.root_url() + path_mapping[mapping] + '.html'
|
||||
}
|
||||
function direct_to_site(mapping, variables){
|
||||
variables || (variables = {});
|
||||
|
||||
@@ -4,6 +4,7 @@ class ApplicationController < ActionController::Base
|
||||
protect_from_forgery
|
||||
|
||||
rescue_from SimplyStored::RecordNotFound, with: :show_404
|
||||
|
||||
private
|
||||
|
||||
def authorize_cmtool
|
||||
@@ -15,11 +16,13 @@ private
|
||||
uri = URI.parse(event_host)
|
||||
Net::HTTP.post_form(uri, :message => message.to_json)
|
||||
end
|
||||
|
||||
def broadcast_supplier(sid, event, data = {})
|
||||
message = {channel: "/supplier/#{sid}", data: {event: event, data: data}}
|
||||
uri = URI.parse(event_host)
|
||||
Net::HTTP.post_form(uri, :message => message.to_json)
|
||||
end
|
||||
|
||||
def set_locale
|
||||
I18n.locale = (params[:locale].presence || :nl).to_sym
|
||||
end
|
||||
@@ -31,6 +34,7 @@ private
|
||||
end
|
||||
"theme1"
|
||||
end
|
||||
|
||||
def check_active_list_state
|
||||
if current_user.try(:active_list_id)
|
||||
unless active_list.active?
|
||||
@@ -38,7 +42,6 @@ private
|
||||
redirect_to user_root_path, alert: t('messages.the_list_has_been_closed', list: List.model_name.human)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def active_list
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
td
|
||||
td.currency
|
||||
strong.list-total-amount
|
||||
script#active-list-order-template[type="text/html"]= render 'active_list_order.mustache'
|
||||
script#active-list-order-template[type="text/html"]= mustache_template 'active_list_order'
|
||||
- content_for :footer do
|
||||
javascript:
|
||||
jQuery(function(){
|
||||
|
||||
Reference in New Issue
Block a user