, jQuery AJAX. jQuery Templates jQuery TableSorter plug-in . :
Javascript ( ): Data.Lists.js
myorg.data.list.GetListItems ({
webURL: "http://our.awesome.portal.com/Lists",
listName: "Projects List",
caml: caml,
CAMLRowLimit: 6,
callback: function(data) {
var list = {};
list.items = data;
var templateHtml = $('.ptMyProjects').html()
.replace("<!--", "").replace("-->","");
var html = $.tmpl(templateHtml, list);
$('.ptMyProjects').html(html);
$('.ptMyProjects .tablesorter').tablesorter({
sortList: [[0,0]],
headers: {3: {sorter: false}},
widgets: ['zebra']
});
$('.ptMyProjects .tablesorter thead th').last().addClass('last');
$('.ptMyProjects .tablesorter tbody tr, .tablesorter thead .header').hover(function(){
$(this).addClass('hover');
}, function(){
$(this).removeClass('hover');
});
$('.ptMyProjects .vg_icon').tipsy({gravity: 's'});
}
});
HTML ()
<div class="ptMyProjects ptTemplate">
<!--
<table class="tablesorter" border="0" cellpadding="0" cellspacing="0">
<thead>
<tr class="gradient_gray">
<th>Title</th>
<th>Status</th>
<th style="border-right: none;">Progress</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{{if items.length > 0}}
{{each items}}
<tr class='item' recordid="${ows_ID}">
<td ><a class='{{if ows_Critical_x0020_Project == "1"}}critical{{/if}}' href="${DisplayURL}">${ows_Title}</a> </td>
<td class="status">
<a href="#" class="pstatus">${ows_ProjStatus}</a>
<div style='display: none;'>
{{if ows_ProjComments}}
<div style="padding-bottom: 10px;">${ows_ProjComments}</div>
{{/if}}
<div style="font-weight: bold;">Lasted Edited By ${Editor}</div>
<div style="font-style: italic;">${when}</div>
</div>
</td>
<td>
<div class="ui-widget-default">
<div class="progressbar" value="${ows_PercentComplete}" style="height:100%;"></div>
</div>
</td>
<td class="actions">
{{if ows_ProjStatus != "Completed"}}<a href="#" class="vg_icon tick" title="Mark Completed"></a>{{/if}}
<a href="${EditURL}" class="vg_icon pencil" title="Edit"></a>
<a href="#" class="vg_icon comment" title="Comments"></a>
</td>
</tr>
{{/each}}
{{else}}
<tr><td colspan="4">You have no projects.</td></tr>
{{/if}}
</tbody>
</table>
-->
</div>