Skip to main content

Bug Tracker

Side navigation

#10580 closed bug (wontfix)

Opened October 26, 2011 10:34AM UTC

Closed October 26, 2011 03:16PM UTC

tmpl error

Reported by: anonymous Owned by:
Priority: low Milestone: None
Component: misc Version: 1.7b2
Keywords: Cc:
Blocked by: Blocking:
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">

 

</th>

<th style="display: none">

</th>

<th>

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

</th>

<th field="HasAcces">

 

</th>

<th style="display: none">

</th>

<th>

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

</th>

<th field="HasAcces">

 

</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@gmail.com

Attachments (0)
Change History (2)

Changed October 26, 2011 10:54AM UTC by PascuRobertLucian <lucian.pascu@gmail.com> comment:1

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

Changed October 26, 2011 03:16PM UTC by addyosmani comment:2

component: unfiledmisc
priority: undecidedlow
resolution: → wontfix
status: newclosed

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.