---
Must first correct the following stuff
Done with commit https://github.com/ngiger/oddb.org/commit/c4934b8206c6fe18ab4d0a10a9a01f605c7cf499 Remove qr_code_text. Changed placement of signature. and Corrected watir tests. Added one
It is becoming clear that I still must fix the following problem. When I start ODDB from scratch upon loading the first time a prescription with the ZSR-id set in the proxy I must display the corresponding Info.
Loading the ZSR-info was easily fixed by adding js_goto_url_with_zsr('#{@session.request_path}', '#{@session.zsr_id}');
to the prescription_form_init.onload javascript snippet in src/view/drugs/prescription.rb
Java-Console log shows the following output after trying to add Merfen
XHR finished loading: GET "http://oddb-ci2.dyndns.org/de/gcc/ajax_matches/index_name/oddb_package_name_with_size_company_name_and_ean13/?search_query=M". dojo.js:15 _59c {stack: "Error: Request canceled↵ at Error (native)↵ …dyndns.org/resources/dojo/dojo/dojo.js:15:128184)", message: "Request canceled", response: Object, status: undefined, responseText: undefined…} dojo.js:15 _59c {stack: "Error: Request canceled↵ at Error (native)↵ …dyndns.org/resources/dojo/dojo/dojo.js:15:128184)", message: "Request canceled", response: Object, status: undefined, responseText: undefined…} dojo.js:15 XHR finished loading: GET "http://oddb-ci2.dyndns.org/de/gcc/ajax_matches/index_name/oddb_package_name_with_size_company_name_and_ean13/?search_query=Merfe". dojo.js:15 XHR finished loading: GET "http://oddb-ci2.dyndns.org/de/gcc/ajax_matches/index_name/oddb_package_name_with_size_company_name_and_ean13/?search_query=Merfen". dojo.js:15 XHR finished loading: GET "http://oddb-ci2.dyndns.org/de/gcc/rezept/ean/7680495260320,7680516821226". dojo.js:15
As the URL still displays http://oddb-ci2.dyndns.org/de/gcc/rezept/zsr_P006309/ean/7680495260320 no Merfen shows up.
It takes more time than I though to clean up the stuff. Also changing all occurences of rezept to prescription to be consistent. Why did I start to use rezept at all?
Also adding a new method create_search_url to Session to unify its use. Cleaning up Javascript-Snippets which create URL like ean/7680495260320,7680495260321? instead of the _event_url pattern ean/7680495260320/7680495260321.
Things begin to work again. Now I see that I have quite a few javascript snippets in srv/view/searchbar.rb which perform similar, but not identical stuff like the javascripts in src/view/drugs/interaction_chooser.rb. It is probably time to move these snippets also to doc/rescources/javascripts/prescription.js.
But fixing the bug is much harder than expected. I don't understand sufficiently why the instant and plus search use two different CenteredCompareSearchForm/CenteredSearchForm and how this affects loading the javascripts which seem to be derived from class CenteredSearchForm < View::CenteredSearchForm.
Trying therefore to fix first the the problem of loading ZSR-info. Pushed fix Load ZSR-info when opening view
Now correcting the following small cosmetics
I was unable to test the just-medical patch on oddb-ci2 as I have no virtual host defined for it
Prescription looks good for me.
Pushed commits Corrected layout of zsr_id and Add prescriptions to just-medical
Also when running two watir tests in parallel it looks to me that searching for the interaction always blocks also the other thread. Probably searching should be delegated to a separate DRB thread. But here I must investigate closer to get definitive results.