Files
EasySoft-ZenTaoPMS/module/mr/js/link.ui.js
T

51 lines
1.2 KiB
JavaScript

$(function()
{
$('li.' + type + '>a').trigger('click');
});
window.createStorySortLink = function(col)
{
var sort = col.name + '_asc';
var currentOrderBy = 'id_asc';
if(type == 'story') currentOrderBy = orderBy;
if(sort == currentOrderBy) sort = col.name + '_desc';
return sortLink.replace('{orderBy}', sort).replace('{type}', 'story');
}
window.createBugSortLink = function(col)
{
var sort = col.name + '_asc';
var currentOrderBy = 'id_asc';
if(type == 'bug') currentOrderBy = orderBy;
if(sort == currentOrderBy) sort = col.name + '_desc';
return sortLink.replace('{orderBy}', sort).replace('{type}', 'bug');
}
window.createTaskSortLink = function(col)
{
var sort = col.name + '_asc';
var currentOrderBy = 'id_asc';
if(type == 'task') currentOrderBy = orderBy;
if(sort == currentOrderBy) sort = col.name + '_desc';
return sortLink.replace('{orderBy}', sort).replace('{type}', 'task');
}
window.showLink = function(obj)
{
let link = $(obj).data('url');
let $tabContent = $(obj);
if($(obj).hasClass('link'))
{
$tabContent = $(obj).closest('.tab-pane');
}
else
{
link = $(obj).find('.link').data('url');
}
$tabContent.load(link);
};