# HG changeset patch # User Patrick PIERRE # Date 1363520481 -3600 # Node ID f9b4457d07788a3cafaafbc393ddf79a5d91205b # Parent af222772225f07b1ddb348e081d5f12cc10c9970 Mise en place des scénarios hotspot diff -r af222772225f -r f9b4457d0778 RelaxNG/Examples/Documents/torture_test.xml --- a/RelaxNG/Examples/Documents/torture_test.xml sam. mars 16 20:42:16 2013 +0100 +++ b/RelaxNG/Examples/Documents/torture_test.xml dim. mars 17 12:41:21 2013 +0100 @@ -505,7 +505,7 @@ Émile BAYARD - + @@ -530,14 +530,32 @@

- +

Directionnel

+ + + +
- +

Compte-tours

-
- + + + + + + + + + + + + +

Copyright P²

Robin DR-400, F-GCRU. diff -r af222772225f -r f9b4457d0778 RelaxNG/publidoc.rnc --- a/RelaxNG/publidoc.rnc sam. mars 16 20:42:16 2013 +0100 +++ b/RelaxNG/publidoc.rnc dim. mars 17 12:41:21 2013 +0100 @@ -376,18 +376,25 @@ x.attribute & y.attribute & w.attribute - & h.attribute - & (hotspot.type.attribute & dx.attribute? & dy.attribute?)? + & h.attribute? + & (hotspot.type.attribute + & dx.attribute? + & dy.attribute? + & dw.attribute? + & dh.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})?%"} } w.attribute = attribute w { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} } h.attribute = attribute h { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} } -hotspot.type.attribute = attribute type { "pulse" | "border" } -dx.attribute = attribute dx { xsd:token {pattern = "-?\d{1,2}(\.\d)?"} } -dy.attribute = attribute dy { xsd:token {pattern = "-?\d{1,2}(\.\d)?"} } +hotspot.type.attribute = attribute type { "normal" | "visible" | "pulse" } +dx.attribute = attribute dx { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?"} } +dy.attribute = attribute dy { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?"} } +dw.attribute = attribute dw { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?"} } +dh.attribute = attribute dh { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?"} } hotspot.content = - (p | link | image | audio | video) + (p | link | image | audio | video), + scenario? # ~~~~~~ media.caption media.caption = element caption { caption.attributes, caption.content } @@ -396,6 +403,29 @@ x.attribute? & y.attribute? +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ scenario ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# ~~~~~~ scenario +scenario = element scenario { scenario.content } + +scenario.content = + init*, + onclick* + +# ~~~~~~ init +init = element init { init.attributes } + +init.attributes = + init.action.attribute +init.action.attribute = attribute action { "hide" } + +# ~~~~~~ onclick +onclick = element onclick { onclick.attributes } + +onclick.attributes = + onclick.action.attribute +onclick.action.attribute = attribute action { "show" } + # ============================================================================= # HEAD LEVEL diff -r af222772225f -r f9b4457d0778 RelaxNG/publiquiz.rnc --- a/RelaxNG/publiquiz.rnc sam. mars 16 20:42:16 2013 +0100 +++ b/RelaxNG/publiquiz.rnc dim. mars 17 12:41:21 2013 +0100 @@ -372,14 +372,18 @@ blanks.image.content = copyright?, - hotspot*, blanks.hotspot* # ~~~~~~ blanks.hotspot -blanks.hotspot = element hotspot { hotspot.attributes, blanks.hotspot.content } +blanks.hotspot = element hotspot { + blanks.hotspot.attributes, blanks.hotspot.content } + +blanks.hotspot.attributes = + x.attribute + & y.attribute blanks.hotspot.content = - (p | image | blank) + blank # ~~~~~~~~~~~~~~~~~~~~~~~~ choices.right, choices.wrong ~~~~~~~~~~~~~~~~~~~~~~~ diff -r af222772225f -r f9b4457d0778 Xxe/Css/publidoc.css --- a/Xxe/Css/publidoc.css sam. mars 16 20:42:16 2013 +0100 +++ b/Xxe/Css/publidoc.css dim. mars 17 12:41:21 2013 +0100 @@ -508,8 +508,8 @@ hotspot { display: block; - padding: .5em; - margin-right: 1.5em; + padding: .4em; + margin: 0 1em .1em 0; background-color: #ffefd8; border-radius: 1.5em; } @@ -527,6 +527,7 @@ hotspot > p { font-family: sans-serif; font-size: 85%; + margin: 0 .5em 0 .5em; } hotspot > blank {