view · edit · sidebar · attach · print · history

< Niklaus.20170201-fix-ajax-mouseover | Index | Niklaus.20170130-fix-ddd-calculation >>





Ajax-Mouseover for category

Using htmlgrid 1.0.6 fixes the problem, as it does not add additional quotes around an identifier. Fixing htmlgrid 1.1.3.

Yasuhiro added this quoting on July 7, 2016. But why? He was working on and there tooltips work. Under he comments that But dijit/Tooltip does not have href attributue (any more).

Do we use a different dojo version on and for 1.9.3 and 1.7.10 ( Dojo-Console: dojo.version

Yasuhiro add a method setHrefTooltip in and changed the corresponding calls ( accordingly. But he did not fix the htmlgrid/widget/Tooltip.js, which is also different to the we use.

Must do the same here. Or maybe better we should fix the htmlgrid Tooltip.js and upgrade and to use a single implementation to ease the burden of maintaining 3 versions.

Removed setting the href in src/view/additional_information, but when looking at the HTML-code there is still a href value added. Why?

Changed in src/view/additional_information.rb ikscat to

        url = @lookandfeel._event_url(:ajax_swissmedic_cat, [:reg, model.iksnr, :seq, model.seqnr, :pack, model.ikscd])
        txt.css_id = "ikscat_#{@ikscat_count}"
        tooltip =, @session, self)
        tooltip.value = url
        txt.dojo_tooltip = tooltip

instead of txt.dojo_tooltip = url

I will adapt doc/resources/javascript/ywesee/widget/Tooltip.js to use the Dojo TooltipDialog. Installed dojo 1.12.1 and running watir smoketests. These look okay.

After trying to change in htmlgril/dojotoolkit Tooltip by TooltipDialog nothing was working. Tried to emit some printf via console.log. But I am only getting syntax errors like "SyntaxError: missing : after property id"

Okay. I finally understood. With htmlgrid 1.1.3 and dynamic_html the data-dojo-type changes from 'ywesee.widget.Tooltip' to 'dijit.Tooltip', therefore the oddb definition of is loaded but never activated!

In the difference between Tooltip and TooltipDialog is explained as

The difference between Tooltip and TooltipDialog widget is that the TooltipDialog stays open until the user 
clicks outside of the widget so that the "Tooltip" can have clickable links, form elements, etc. inside the
widget without it closing when you "mouseout" like a Tooltip would.

The dijit/TooltipDialog widget features most of the same properties, methods, and events supported by Tooltip and Dialog.

In src/view/public_template.rb replacing ywesee/widget/Tooltip via dijit/TooltipDialog in the required dojo packages. This did not fix the problem. The tooltip is not displayed. The details of the deductible is now

<td class="list bold right original"><span id="deductible_1" class="deductible_g">10%<div role="alertdialog" tabindex="-1" class="dijitTooltipDialog" id="deductible_1_widget" widgetid="deductible_1_widget" style="display: none;">
  <div class="dijitTooltipContainer" role="presentation">
    <div data-dojo-attach-point="contentsNode" class="dijitTooltipContents dijitTooltipFocusNode">
      <div data-dojo-attach-point="containerNode">Für dieses Produkt bezahlen Sie 10% <a href=";go_search=Suchen&amp;lang=de">Selbstbehalt</a>.<br>Achten Sie auf Ihre Krankenkassen-Abrechnung!</div>
  <div class="dijitTooltipConnector" role="presentation" data-dojo-attach-point="connectorNode"></div>

Nothing is display as the @dojo_tooltip is nil in htmlgril/dojotoolkit.rb.

Created a simple test.html to play with TooltipDialog until I get the desired effect. Now I am happy with the results and remarked that I have to change the link to the Selbstbehalt from to See Attach:test_1_html.txt

Now it is much clearer for me how the CSS elements are created when loading the HTML-page as the dojo/TooltipDialog add various elements and I did not grasp this by only looking at the Ruby/Javascript code. Will create tomorrow a helper class to generate ToolTipps for

view · edit · sidebar · attach · print · history
Page last modified on February 01, 2017, at 03:44 PM