I understand the restriction in dart webui and <template> items.
I.E: one can get around this restriction to use templates for tables thusly:
<table>
<tbody iterate="row in rows">
<tr iterate="cell in row">
<td> {{cell}} </td>
</tr>
</tbody>
</table>
However. How is one supposed to use templates when the table should have mutiple tbody sections (e.g: http://jsfiddle.net/umRJr/ )
I.E:
<table>
<thead><tr><td>title</td></tr></thead>
<template iterate="section in sections"> <!-- can't do this... :-( -->
<tbody iterate="row in section">
<tr iterate="cell in row">
<td> {{cell}} </td>
</tr>
</tbody>
</template>
</table>
Because we want something like
<table>
<thead> ... some headers here </thead>
<tbody> .. content1 .. </tbody>
<tbody> .. content2 .. </tbody>
...
<tbody> .. content N .. </tbody>
</table>
?
To officially answer, "soon". :) See https://github.com/dart-lang/html5lib/issues/46
Related
I am quite new to Flask and I am having a hard time to understand why I am only getting a list of elements in my browser (single column), I would like to get 3 different columns and my data is correct:
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Mail</th>
<th>Delete</th>
</tr>
{% for n in customers %}
<tr>
<td>{{n['First Name']}} </td>
</tr>
<tr>
<td>{{n['Last Name']}}</td>
</tr>
<tr>
<td>{{ n['Phone']}}</td>
</tr>
<tr>
<td> Supprimer <td></td>
</tr>
{% endfor %}
</table>
What you are really looking for is something like this:
<table>
<thead>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Mail</th>
<th>Delete</th>
</tr>
</thead>
<tbody>
{% for n in customers %}
<tr>
<td>{{n['First Name']}} </td>
<td>{{n['Last Name']}}</td>
<td>{{ n['Phone']}}</td>
<td> Supprimer <td></td>
</tr>
{% endfor %}
</tbody>
</table>
tr Stands for Table Row. Check out this link to learn a bit more about tables
I want to display table with basic informations about products, and add hyperlink to cells in column "Product name" after clicking which you will be redirected to more detailed description of product with possibility to edtiing, deleting it etc.
<table class="table table-striped table-dark">
<thead>
<tr>
<th scope="col">Product name</th>
<th scope="col">Price</th>
</tr>
</thead>
<tbody>
{% for element in object %}
<tr>
<td><div class="btn active"><i class="fa fa-check"></i></div></td>
<td>
<a href="{% url 'prod_desc' pk:element.pk %}">
{{element.name|lower|capfirst}}
</a>
</td>
<td>
{{element.price}}
</td>
</tr>
{% endfor %}
</tbody>
</table>
How can I connect hiperlink with product name in table?
In case is there any walk-around solution ?
Is there any restriction about inserting hyperlink in html in general or it's a "Django thing" ?
The problem was in passing primary key of element I used ":" like in dictionary key:value instead of "="
<a href="{% url 'prod_desc' pk=element.pk %}">
{{element.name|lower|capfirst}}
</a>
I would like to test the sortable table with Cypress.io
I follow their page instruction: https://docs.cypress.io/api/commands/trigger.html#Mouse-Events
and it doesn't work...
First: it doesn't move the element
Second: when I see the step by step test on the left side, mouse down and mouse move are located in the same position...
my test
cy.get('.resource-filter-table')
.trigger('mousedown', {witch:1, pageX:188, pageY:196})
.trigger('mousemove', {witch:1, pageX:188, pageY:261})
.trigger('mouseup')
my html
<table class="table table-borderless resource-filter-table">
<thead>
<th scope="col"><input type="checkbox" checked=True class="resourceFilterElementAll" onchange="checkAllResources(this)"></th>
<th scope="col">Line</th>
</thead>
<tbody>
{% for linija in user_lines %}
<tr>
<th><input type="checkbox" checked=True class="resourceFilterElement" onchange="filterOfResources()" id="{{linija.pk}}"></th>
<th class="filter-list-element">{{ linija.line_name}} <i class="filter-list-icon material-icons">drag_handle</i></th>
</tr>
{% endfor %}
</tbody>
</table>
I am trying to scale a cfdocument item using the scale attribute but it doesn't seem to use the number passed. The end goal is to get this cfdocument to scale to a single page when exported to pdf.
I tried using the method shown here: scale PDF to single page
It just kept looping until the scale value was negative and that threw an error.
I haven't been able to find anything online and am expecting that the scale attribute doesn't work with tables or something like that.
<cfdocument localUrl="no" format="PDF" scale="10" fontembed="false">
<cfoutput>
<body>
<cfdocumentitem type="header">
<img id="logo" style="display:inline-block;float:left;margin-bottom:5px;" src="/images/logo206x40.jpg">
<div style="font-size:20px;display:inline-block;float:right;"> Rubric: #qryRubric.rubric_name#</div>
<div style="width:100%;border-bottom:1px solid black;"></div>
</cfdocumentitem>
<div id="rubric1">
<div style="margin-left: 10%;">
<table class=" table table-hover blue-rubric table-bordered" cellspacing="1">
<thead>
<tr>
<th style="border-right:1px solid #fff"></th>
<th colspan="1000">Achievement Levels</th>
</tr>
<tr>
<th scope="col" class="rounded-firstcol" style="border-right:1px solid #fff;">Criteria Groups</th>
<th scope="col">1</th>
<th scope="col">2</th>
<th scope="col">3</th>
<th scope="col" class="rounded-lastcol">4</th>
</tr>
</thead>
<tbody>
<tr class="col_A">
<td>something</td>
<td>something</td>
<td>something</td>
<td>something</td>
<td>something</td>
</tr>
<tr class="col_A">
<td>something</td>
<td>something</td>
<td>something</td>
<td>something</td>
<td>something</td>
</tr>
</tbody>
<tfoot>
<tr></tr>
</tfoot>
</table>
</div>
</div>
<cfdocumentitem type="footer">
<div style="width:100%;border-top:1px solid black;font-size:10px;font:Arial;text-align:right;"> #cfdocument.currentpagenumber# of #cfdocument.totalpagecount#</div>
</cfdocumentitem>
</body>
</cfoutput>
I read somewhere that scale changes the size of thumbnails relative to the document or something like that, can anyone confirm or deny this? Any help would be appreciated, thanks.
I haven't used that attribute in quite some time, but if memory serves, I believe that value should be a percentage. For example scale="10%".
I have the following Ember template;
{{#with model}}
<h2>Order #{{id}}</h2>
<table>
<thead>
<tr>
<th>Outlet</th>
<th>Date</th>
<th>Link</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{outlet}}</td>
<td>{{date}}</td>
<td>{{#link-to 'next-route' this}}Go{{/link-to}}</td>
</tr>
</tbody>
</table>
{{/with}}
<hr>
{{outlet}}
How to do I keep Ember from using the first {{outlet}} (which is just the property's name) to add the next view I'm transitioning to?
outlet is a reserved word, that being said, if you fully qualify it it will work.
In your case, with the with block you can't fully qualify it, but if you remove the with block it will work.
Personally I'd avoid using it, it's analogous to having a variable named for or if
<h2>Order #{{id}}</h2>
<table>
<thead>
<tr>
<th>Outlet</th>
<th>Date</th>
<th>Link</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{model.outlet}}</td>
<td>{{date}}</td>
<td>{{#link-to 'next-route' this}}Go{{/link-to}}</td>
</tr>
</tbody>
</table>
<hr>
{{outlet}}