Bug Tracker

Ticket #10580 (closed bug: wontfix)

Opened 3 years ago

Last modified 3 years ago

tmpl error

Reported by: anonymous Owned by:
Priority: low Milestone: None
Component: misc Version: 1.7b2
Keywords: Cc:
Blocking: Blocked by:

Description

Hello, i have found this problem. i have the table: <table cellpadding="6" class="tableContent" id="gridAssociazioneProfili">

<thead>

<tr class="tableRowHeader">

<th style="display: none"> </th> <th>

<a unique='listSorting' field='profileDescription' order='ASC' paging=>Nome profilo</a>

</th> <th field="HasAcces">

&nbsp;

</th> <th style="display: none"> </th> <th>

<a unique='listSorting' field='profileDescription' order='ASC' paging=>Nome profilo</a>

</th> <th field="HasAcces">

&nbsp;

</th> <th style="display: none"> </th> <th>

<a unique='listSorting' field='profileDescription' order='ASC' paging=>Nome profilo</a>

</th> <th field="HasAcces">

&nbsp;

</th>

</tr>

</thead>

it is a table with 9 columns, every 3 of them repeating.

I have this template: {{if (Index%3==0)}} <tr>

<td style="display: none">

${ProfileId}

</td> <td class="tdSelectable" id="titolo_report">

${ProfileDescription}

</td> <td>

{{if (HasAccess==true)}} <input type="checkbox" unique="profileCheck" checked="checked" /> {{else}} <input type="checkbox" unique="profileCheck" /> {{/if}}

</td> {{if (Index == Count-1)}} <td> </td> <td> </td>

</tr> {{/if}} {{/if}} {{if (Index%3==1)}} <td style="display: none">

${ProfileId}

</td> <td class="tdSelectable" id="titolo_report">

${ProfileDescription}

</td> <td>

{{if (HasAccess==true)}} <input type="checkbox" unique="profileCheck" checked="checked" /> {{else}} <input type="checkbox" unique="profileCheck" /> {{/if}}

</td> {{if (Index == Count-1)}} <td> </td> </tr> {{/if}} {{/if}} </script>

The scenario is: For each item in the data object i try to create a new <tr> if the Index(custom property) is ok( {{if (Index%3==0)}} ) it the item is the last one ilose the tr, if not i pass to the next item and create a <td>...... The tmpl crashes probabli becouse it closes by himself the <tr> even if i dont give such instructions. if i start the new item whit a <tr> instead of a <td> it works fine but i need to start with a td append to the tr created at the first item. for more explications lucian.pascu@…

Change History

comment:1 Changed 3 years ago by PascuRobertLucian <lucian.pascu@…>

Hello, the ticket was sent by me, please contact me if you need any clarifications or test project.

comment:2 Changed 3 years ago by addyosmani

  • Priority changed from undecided to low
  • Resolution set to wontfix
  • Status changed from new to closed
  • Component changed from unfiled to misc

Thanks for submitting a ticket to the jQuery bug tracker. Unfortunately, the .tmpl() plugin is no longer supported. Please see here for further information  http://blog.jquery.com/2011/04/16/official-plugins-a-change-in-the-roadmap/. Should you or someone else wish to patch the issues related to this specific ticket, please feel free to. In the mean time, we recommend waiting on the templating solution being released by jQuery UI, which is mentioned in that post.

Note: See TracTickets for help on using tickets.