tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Callender (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (TAP5-2183) 5.4 Linksubmit does not generate events with Bootstrap glyphicon
Date Fri, 25 Apr 2014 01:51:15 GMT

    [ https://issues.apache.org/jira/browse/TAP5-2183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13980614#comment-13980614
] 

Geoff Callender edited comment on TAP5-2183 at 4/25/14 1:51 AM:
----------------------------------------------------------------

In beta-3 it's still a problem. Here's another example: clicking on "Add" works but clicking
on "plus" icon doesn't - it submits without a submitter:
{code}
    <t:linksubmit t:id="toAdd" mode="cancel"><span class="ion ion-ios7-plus-outline"></span>Add</t:linksubmit>
{code}
If you put "Add" in a span then it stops working, too.

I solved it by modifying forms.js like this: locate this event handler:
{code}
    dom.onDocument("click", "a[data-submit-mode]", function() {
{code}
and in it replace this:
{code}
    setSubmittingHidden(form, this);
{code}
with this:
{code}
      var submitter;
      if (this.element.tagName == "A") {
    	  submitter = this;
      }
      else {
    	  submitter = this.findParent("a");
      }
      setSubmittingHidden(form, submitter);
{code}
That's it.


was (Author: geoffcallender):
In beta-3 it's still a problem. Here's another example: clicking on "Add" works but clicking
on "plus" icon doesn't - it submits without a submitter:

    <t:linksubmit t:id="toAdd" mode="cancel"><span class="ion ion-ios7-plus-outline"></span>Add</t:linksubmit>

If you put "Add" in a span then it stops working, too.

I solved it by modifying forms.js like this: locate this event handler:

    dom.onDocument("click", "a[data-submit-mode]", function() {

and in it replace this:

    setSubmittingHidden(form, this);

with this:

      var submitter;
      if (this.element.tagName == "A") {
    	  submitter = this;
      }
      else {
    	  submitter = this.findParent("a");
      }
      setSubmittingHidden(form, submitter);

That's it.

> 5.4 Linksubmit does not generate events with Bootstrap glyphicon
> ----------------------------------------------------------------
>
>                 Key: TAP5-2183
>                 URL: https://issues.apache.org/jira/browse/TAP5-2183
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.4
>            Reporter: Barry Books
>
> It appears for some reason the link submit component does not work
> correctly if the only thing it contains is a Bootstrap glyphicon.
> For example:
> <t:linkSubmit event="changeCart" mode="UNCONDITIONAL">Change</t:linkSubmit>
> calls the changeCart event handler
> <t:linkSubmit event="changeCart" mode="UNCONDITIONAL"><span class="glyphicon
> glyphicon-edit"/></t:linkSubmit>
> does not



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message