Create a customizable timeslider toolbar

This commit is contained in:
Marcel Klehr 2014-03-30 13:02:41 +02:00
parent 867e40533a
commit 6054cda473
9 changed files with 50 additions and 31 deletions

View file

@ -331,6 +331,14 @@ var padeditbar = (function()
ace.ace_setAttributeOnSelection('author', '');
}
});
toolbar.registerCommand('timeslider_returnToPad', function(cmd) {
if( document.referrer.length > 0 && document.referrer.substring(document.referrer.lastIndexOf("/")-1, document.referrer.lastIndexOf("/")) === "p") {
document.location = document.referrer;
} else {
document.location = document.location.href.substring(0,document.location.href.lastIndexOf("/"));
}
});
}
return self;

View file

@ -95,12 +95,6 @@ function init() {
//get all the export links
export_links = $('#export > .exportlink')
if(document.referrer.length > 0 && document.referrer.substring(document.referrer.lastIndexOf("/")-1,document.referrer.lastIndexOf("/")) === "p") {
$("#returnbutton").attr("href", document.referrer);
} else {
$("#returnbutton").attr("href", document.location.href.substring(0,document.location.href.lastIndexOf("/")));
}
$('button#forcereconnect').click(function()
{
window.location.reload();