Skip to content

Commit

Permalink
Allow trailing ? when calling rezept or interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
ngiger committed Mar 19, 2014
1 parent 7695e09 commit 502e915
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/state/drugs/prescription.rb
Expand Up @@ -39,7 +39,7 @@ def handle_drug_changes(drugs, msg)
end
def init
ean13 = @session.user_input(:search_query)
path = @session.request_path
path = @session.request_path.sub(/(\?|)$/, '')
uri = @session.lookandfeel._event_url(:rezept, [])
search_code = path.split('rezept/ean/')[1]
drugs = {}
Expand Down
2 changes: 1 addition & 1 deletion src/state/interactions/interaction_chooser.rb
Expand Up @@ -36,7 +36,7 @@ def handle_drug_changes(drugs, msg)

def init
ean13 = @session.user_input(:search_query)
path = @session.request_path
path = @session.request_path.sub(/(\?|)$/, '')
search_code = path.split('home_interactions/')[1]
drugs = {}
if search_code
Expand Down
2 changes: 1 addition & 1 deletion src/view/interactions/interaction_chooser.rb
Expand Up @@ -311,7 +311,7 @@ class InteractionChooserForm < View::Form
private
def init
super
self.onload = "document.getElementById('interaction_searchbar').focus();"
self.onload = "if (document.getElementById('interaction_searchbar') != null) document.getElementById('interaction_searchbar').focus();"
@form_properties.update({
'id' => 'interaction_chooser_form',
'target' => '_blank',
Expand Down

0 comments on commit 502e915

Please sign in to comment.