New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change in title on minimal trigger has no effect on client #3561

Closed
ebruchez opened this Issue Apr 18, 2018 · 3 comments

Comments

Projects
1 participant
@ebruchez
Collaborator

ebruchez commented Apr 18, 2018

We have, in grid.xbl, a trigger with:

<xf:trigger
    appearance="minimal"
    id="fr-grid-add"
    xxf:title="{{xxf:r('components.grid.add-another', '|fr-fr-resources|')}}">
    <xf:label><xh:i class="icon-plus-sign "/></xf:label>
    <xf:hint ref="xxf:r('components.grid.insert-below', 'fr-fr-resources')"/>
    …
</xf:trigger>

The hint is actually provided by xxf:title. <xf:hint> doesn't seem to have an effect.

A language change causes a title attribute to be sent to the client:

<xxf:control
    id="fr-view-component≡section-1-section≡grid-3-grid≡fr-grid-add"
    title="Ajouter une ligne"/>

But the client doesn't handle the change at all.

@ebruchez ebruchez added the XForms label Apr 18, 2018

@ebruchez ebruchez self-assigned this Apr 18, 2018

@ebruchez

This comment has been minimized.

Collaborator

ebruchez commented Apr 18, 2018

The hint doesn't do anything because XFormsTriggerControl has:

override def lhhaHTMLSupport = TriggerLhhaHtmlSupport

val TriggerLhhaHtmlSupport = LHHA.DefaultLHHAHTMLSupport - LHHA.Hint

Questions:

  • Should the hint translate to the title attribute?
  • Should the client just handle title for minimal triggers?
@ebruchez

This comment has been minimized.

Collaborator

ebruchez commented Apr 18, 2018

setHintMessage on the client already does this:

if ($(control).is('.xforms-trigger, .xforms-submit')) {
    // For triggers, the value is stored in the title for the control

@ebruchez ebruchez changed the title from Change in title on minimal trigger to Change in title on minimal trigger has no effect on client Apr 18, 2018

@ebruchez ebruchez closed this in 6383aec Apr 18, 2018

@ebruchez ebruchez added this to Done in Orbeon Forms 2018.1 via automation Apr 18, 2018

@ebruchez

This comment has been minimized.

Collaborator

ebruchez commented Apr 18, 2018

Opted for handling title on the client if present and no hint is present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment