Merge pull request #1072 from marcelklehr/fix/timeslider-links-regexp

Fix #1067 Corrected exports links regexp
pull/1073/head
John McLear 2012-10-16 13:36:20 -07:00
commit 429651874f
1 changed files with 1 additions and 2 deletions

View File

@ -144,13 +144,12 @@ function handleClientVars(message)
require('./pad_impexp').padimpexp.init();
//change export urls when the slider moves
var export_rev_regex = /(\/\d+)?\/export/
BroadcastSlider.onSlider(function(revno)
{
// export_links is a jQuery Array, so .each is allowed.
export_links.each(function()
{
this.setAttribute('href', this.href.replace(export_rev_regex, '/' + revno + '/export'));
this.setAttribute('href', this.href.replace( /(.+?)\/\w+\/(\d+\/)?export/ , '$1/' + padId + '/' + revno + '/export'));
});
});