Created
March 7, 2012 16:42
-
-
Save SethWilson/1994277 to your computer and use it in GitHub Desktop.
Request Tracker: Add close links to listing page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function runthis() { | |
var close_link = "" | |
$("table table tr").each(function(){ | |
$(this).find('a.link').each( function(){ | |
close_link = $(this).attr('href').replace(/view/,"close" ); | |
$(this).attr('href', close_link) | |
}); | |
$(this).prepend('<td class="default" bgcolor="#FF2222"><a href="'+close_link+'" class="link">Close</a></td>'); | |
}); | |
} | |
if (typeof jQuery == 'undefined') { | |
var jQ = document.createElement('script'); | |
jQ.type = 'text/javascript'; | |
jQ.onload=runthis; | |
jQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'; | |
document.body.appendChild(jQ); | |
} else { | |
runthis(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment