fix single story view for pivotal tracker

This commit is contained in:
Bengt Brodersen 2015-05-12 13:34:26 +02:00
parent f3c04efd8e
commit 93a25bac98

View File

@ -159,8 +159,7 @@
console.logInfo("load " + issueKeyList.length + " issues..."); console.logInfo("load " + issueKeyList.length + " issues...");
var deferredList = []; var deferredList = [];
jQuery.each(issueKeyList,function(index, issueKey) {
issueKeyList.each(function(index, issueKey) {
var page = newPage(issueKey); var page = newPage(issueKey);
page.attr("index",index); page.attr("index",index);
page.hide(); page.hide();
@ -225,16 +224,15 @@
} }
function getSelectedIssueKeyListPivotalTracker() { function getSelectedIssueKeyListPivotalTracker() {
//Single Story //Single Story
if (/.*\/n\/projects\/.*\/stories\/.*/g.test(document.URL)) { if (/.*\/stories\/.*/g.test(document.URL)) {
return jQuery('.story[data-id]').map(function() {
return jQuery(this).attr('data-id');
}); return [document.URL.replace(/.*\/stories\/(.*)\??/,'$1')];
} }
// Board // Board
if (/.*\/n\/projects\/.*/g.test(document.URL)) { if (/.*\/projects\/.*/g.test(document.URL)) {
return jQuery('.story[data-id]:has(.selected)').map(function() { return jQuery('.story[data-id]:has(.selected)').map(function() {
return jQuery(this).attr('data-id'); return jQuery(this).attr('data-id');
}); });