mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-25 18:06:15 -04:00
Create a customizable timeslider toolbar
This commit is contained in:
parent
867e40533a
commit
6054cda473
9 changed files with 50 additions and 31 deletions
|
@ -126,6 +126,10 @@ a img {
|
|||
position: relative;
|
||||
top: 1px;
|
||||
}
|
||||
.toolbar ul li a .buttontext {
|
||||
color: #222;
|
||||
font-size: 14px;
|
||||
}
|
||||
.toolbar ul li a.grouped-left {
|
||||
border-radius: 3px 0 0 3px;
|
||||
}
|
||||
|
|
|
@ -157,13 +157,6 @@
|
|||
#editbarright {
|
||||
float: right
|
||||
}
|
||||
#returnbutton {
|
||||
color: #222;
|
||||
font-size: 16px;
|
||||
line-height: 29px;
|
||||
margin-top: 0;
|
||||
padding-right: 6px;
|
||||
}
|
||||
#settings,
|
||||
#importexport,
|
||||
#embed,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue