# HG changeset patch # User Patrick PIERRE # Date 1363010052 -3600 # Node ID b1ce505b889dcfc33e5c67de31ced175eac0d300 # Parent 9817635631aa6fc7aaf58348ee01d804fced0dd3 tooltip devient hotspot diff -r 9817635631aa -r b1ce505b889d RelaxNG/Examples/Documents/torture_test.xml --- a/RelaxNG/Examples/Documents/torture_test.xml mer. mars 06 16:02:01 2013 +0100 +++ b/RelaxNG/Examples/Documents/torture_test.xml lun. mars 11 14:54:12 2013 +0100 @@ -530,9 +530,9 @@

-

Directionnel

-

Compte-tours

- + + + Robin DR-400, F-GCRU.
diff -r 9817635631aa -r b1ce505b889d RelaxNG/Examples/Quiz/Images/blanks-select_hotspotsi01.jpg Binary file RelaxNG/Examples/Quiz/Images/blanks-select_hotspotsi01.jpg has changed diff -r 9817635631aa -r b1ce505b889d RelaxNG/Examples/Quiz/Images/blanks-select_tooltipsi01.jpg Binary file RelaxNG/Examples/Quiz/Images/blanks-select_tooltipsi01.jpg has changed diff -r 9817635631aa -r b1ce505b889d RelaxNG/Examples/Quiz/blanks-select_hotspots.xml --- /dev/null jeu. janv. 01 00:00:00 1970 +0000 +++ b/RelaxNG/Examples/Quiz/blanks-select_hotspots.xml lun. mars 11 14:54:12 2013 +0100 @@ -0,0 +1,25 @@ + + + + + + Exercice à trous avec placement sur image + + + +

Placez correctement chaque élément de la voiture.

+
+ + + + + le volant + le pare-brise + le siège + le levier de vitesse + le rétroviseur + + + +
+
diff -r 9817635631aa -r b1ce505b889d RelaxNG/Examples/Quiz/blanks-select_tooltips.xml --- a/RelaxNG/Examples/Quiz/blanks-select_tooltips.xml mer. mars 06 16:02:01 2013 +0100 +++ /dev/null jeu. janv. 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ - - - - - - Exercice à trous avec placement sur image - - - -

Placez correctement chaque élément de la voiture.

-
- - - - - le volant - le pare-brise - le siège - le levier de vitesse - le rétroviseur - - - -
-
diff -r 9817635631aa -r b1ce505b889d RelaxNG/publidoc.rnc --- a/RelaxNG/publidoc.rnc mer. mars 06 16:02:01 2013 +0100 +++ b/RelaxNG/publidoc.rnc lun. mars 11 14:54:12 2013 +0100 @@ -351,8 +351,7 @@ image.content = copyright?, - hotspot*, - tooltip* + hotspot* # ~~~~~~ audio audio = element audio { audio.attributes } @@ -374,30 +373,22 @@ hotspot.attributes = x.attribute & y.attribute + & dx.attribute? + & dy.attribute? & (width.attribute & height.attribute)? + & hidden.attribute? x.attribute = attribute x { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} } y.attribute = attribute y { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} } +dx.attribute = attribute dx { xsd:token {pattern = "-?\d{1,2}(\.\d)?"} } +dy.attribute = attribute dy { xsd:token {pattern = "-?\d{1,2}(\.\d)?"} } width.attribute = attribute width { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} } height.attribute = attribute height { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} } - +hidden.attribute = attribute hidden { xsd:boolean } + hotspot.content = - (link | audio | video) - -# ~~~~~~ tooltip -tooltip = element tooltip { tooltip.attributes, tooltip.content } - -tooltip.attributes = - x.attribute - & y.attribute - & dx.attribute? - & dy.attribute? -dx.attribute = attribute dx { xsd:token {pattern = "-?\d{1,2}(\.\d)?"} } -dy.attribute = attribute dy { xsd:token {pattern = "-?\d{1,2}(\.\d)?"} } - -tooltip.content = - (p+ | image) + (p | link | image | audio | video) # ~~~~~~ media.caption media.caption = element caption { caption.attributes, caption.content } diff -r 9817635631aa -r b1ce505b889d RelaxNG/publiquiz.rnc --- a/RelaxNG/publiquiz.rnc mer. mars 06 16:02:01 2013 +0100 +++ b/RelaxNG/publiquiz.rnc lun. mars 11 14:54:12 2013 +0100 @@ -373,13 +373,13 @@ blanks.image.content = copyright?, hotspot*, - blanks.tooltip* + blanks.hotspot* -# ~~~~~~ blanks.tooltip -blanks.tooltip = element tooltip { tooltip.attributes, blanks.tooltip.content } +# ~~~~~~ blanks.hotspot +blanks.hotspot = element hotspot { hotspot.attributes, blanks.hotspot.content } -blanks.tooltip.content = - (p+ | image | blank) +blanks.hotspot.content = + (p | image | blank) # ~~~~~~~~~~~~~~~~~~~~~~~~ choices.right, choices.wrong ~~~~~~~~~~~~~~~~~~~~~~~ diff -r 9817635631aa -r b1ce505b889d Xxe/Css/publidoc.css --- a/Xxe/Css/publidoc.css mer. mars 06 16:02:01 2013 +0100 +++ b/Xxe/Css/publidoc.css lun. mars 11 14:54:12 2013 +0100 @@ -509,40 +509,34 @@ hotspot { display: block; padding: .5em; + margin-right: 1.5em; background-color: #ffefd8; border-radius: 1.5em; } -/* tooltip ~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -tooltip image:before { +hotspot image:before { content: ""; } -tooltip > image { +hotspot > image { content: concatenate("image('Images/", attr(id), ".png', -128, -96, smooth)"); } -tooltip { - display: block; - padding: .4em; - margin: 0 1em .1em 0; - background-color: #eaffe9; - border-radius: 1.5em; +hotspot p:before { + content: ""; } - -tooltip > p { +hotspot > p { font-family: sans-serif; font-size: 85%; } -tooltip > blank { +hotspot > blank { background-color: transparent; } -tooltip:after { +hotspot:after { display: marker; padding-bottom: .7em; - content: insert-after-button(color, #7f7f7f, icon, icon(right-half-disc)); + content: insert-same-after-button(color, #7f7f7f, icon, icon(right-half-disc)); } /* audio ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */