I took the sortable table example from AUI sandbox and added it to a JIRA gadget to see if it worked well. If so I could develop our companies gadget using AUI.
When I ran the gadget I got fairly similar looks of the table as to what was shown in AUI sandbox but the table wasn't sortable.
Is there something wrong in the way I call required resources, should I add something to my pom file?
I'm using ATLAS 4.2.3 and to create the plugin I used atlas-create-jira-plugin
Also is there another way to display data tables that can be used for rapid development?
here's excerpt of my code....
#requireResource("com.atlassian.jira.gadgets:common")
#requireResource("com.atlassian.gadgets.publisher:ajs-gadgets")
#requireResource("com.mycompany.plugin.dashboard:dashboard-resources")
...
<div id = "container">
<table id="mySortableTabley" class="aui aui-table-sortable">
<thead>
<tr>
<th class="aui-table-column-issue-key">Key</th>
<th>Issue Name</th>
<th>Watchers</th>
<th class="aui-table-column-unsortable">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#z">KAR-1123</a></td>
<td>Cannot sort tables</td>
<td>2</td>
<td>Table sorting should be allowed</td>
</tr>
<tr>
<td><a href="#y">KAR-87</a></td>
<td>Issue Page doesn't load in IE</td>
<td>0</td>
<td>When loading issue page on IE it doesn't show</td>
</tr>
<tr>
<td><a href="#b">KAR-1133</a></td>
<td>Program crashes on opening</td>
<td>3</td>
<td>When opening JIRA it crashses</td>
</tr>
<tr>
<td><a href="#a">KAR-4</a></td>
<td>Vending Machine is empty</td>
<td>9001</td>
<td>NO SOFT DRINK!</td>
</tr>
<tr>
<td><a href="#a">BAT-4</a></td>
<td>Computer is dead</td>
<td>1</td>
<td>Work computer is not turning on</td>
</tr>
<tr>
<td><a href="#a">BAT-11</a></td>
<td>Workers are being too loud</td>
<td>10</td>
<td>The people around me are too loud</td>
</tr>
<tr>
<td><a href="#a">BATA-8</a></td>
<td>Lift door sometimes doesn't open</td>
<td>16</td>
<td>When trying to enter the lift, the doors do not open</td>
</tr>
<tr>
<td><a href="#a">BATA-14</a></td>
<td>Coffee machine is needed</td>
<td>501</td>
<td>Coffee is needed</td>
</tr>
</tbody>
</table>
</div>
Reviewing your code, I see the table header defined like
<th class="aui-table-column-unsortable">Description</th>
My research indicates that using the aui-table-column-unsortable class will restrict users from sorting the table. Please try calling the class aui-table-column-sortable to allow users to sort the results.
I know that sortable table is experimental. I tried regular table and used class "aui" The table doesn't look similar to what is showed in sandbox. That is, it doesn't draw a line after each row.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.