Transfer table clone feature
Summary:
Adding a clone feature to transfer table.
Motivation:
Currently, it is a pain to create a transfer table. A user must create 2 separate templates: one for allocated and one for available. Both templates are nearly identical with subtle differences. It would be great if we can write one template and clone it. This would remove a lot of boilerplate templates.
Description:
Here is roughly how the clone template should look like. Note that we have flags: $displayedItems, $sourceItems, $available, and $allocated. These are variables that depends on whether it is the allocated table or available table. They are similar to how $index work in the ng-repeat directive.
<transfer-table tr-available="data" clone-content>
<table hz-table st-table=
<thead>
<tr>
<th>Name</th>
<th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in $displayedItems">
<td>{{ item.name }}</td>
<td>
<action-list>
<action ng-if="$available" callback=
<action ng-if="$allocated" callback=
</action-list>
</td>
</tr>
</tbody>
</table>
</transfer-table>
Here is the old HTML for comparison:
<transfer-table tr-model="data">
<allocated>
<table hz-table st-table=
<thead>
<tr>
<th>Name</th>
<th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in displayedAlloca
<td>{{ item.name }}</td>
<td>
<action-list>
<action callback=
<
</td>
</tr>
</tbody>
</table>
<allocated>
</available>
<table hz-table st-table=
<thead>
<tr>
<th>Name</th>
<th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in displayedAvaila
<td>{{ item.name }}</td>
<td>
<action-list>
<action callback=
<
</td>
</tr>
</tbody>
</table>
</available>
</transfer-table>
UX:
N/A
Outside Dependencies:
N/A
Requirements Update Required:
N/A
Doc Impact:
Need to update comments in code.
Blueprint information
Related branches
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
Added clone feature for transfer table
Gerrit topic: https:/
Addressed by: https:/
Adding clone feature to Transfer Table
Addressed by: https:/
Inconsistent karma conf for xstatic files
Gerrit topic: https:/