diff --git a/src/static/css/timeslider.css b/src/static/css/timeslider.css index 926c80123..ea914ae66 100644 --- a/src/static/css/timeslider.css +++ b/src/static/css/timeslider.css @@ -67,13 +67,56 @@ width:122px; } + .topbarcenter, #docbar {display:none;} -#padmain {top:30px;} +#padmain {top:0px !important;} #editbarright {float:right;} #returnbutton {color:#222; font-size:16px; line-height:29px; margin-top:0; padding-right:6px;} #importexport {top:118px;} #importexport .popup {width:185px;} + +.timeslider-bar +{ + background: #f7f7f7; + background: linear-gradient(#f7f7f7, #f1f1f1 80%); + border-bottom: 1px solid #ccc; + overflow: hidden; + padding-top: 3px; + width: 100%; +} + +.timeslider-bar #editbar +{ + border-bottom: none; + float: right; + width: 170px; + width: initial; +} + +.timeslider-bar h1 +{ + margin: 5px; +} +.timeslider-bar p +{ + margin: 5px; +} +#timeslider-top { + width: 100%; + position: fixed; + z-index: 1; +} + +#authorsList .author { + padding-left: 0.4em; + padding-right: 0.4em; +} + +#padeditor { + position: static; +} + /* lists */ .list-bullet2, .list-indent2, .list-number2 {margin-left:3em;} .list-bullet3, .list-indent3, .list-number3 {margin-left:4.5em;} diff --git a/src/static/js/broadcast_slider.js b/src/static/js/broadcast_slider.js index f88eb5ddc..9aceb7336 100644 --- a/src/static/js/broadcast_slider.js +++ b/src/static/js/broadcast_slider.js @@ -170,26 +170,27 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded) $('#error').show(); } + var fixPadHeight = _.throttle(function(){ + var height = $('#timeslider-top').height(); + $('#editorcontainerbox').css({marginTop: height}); + }, 600); + function setAuthors(authors) { - $("#authorstable").empty(); + var authorsList = $("#authorsList"); + authorsList.empty(); var numAnonymous = 0; var numNamed = 0; _.each(authors, function(author) { if (author.name) { + if (numNamed !== 0) authorsList.append(', '); + + var authorColor = clientVars.colorPalette[author.colorId] || author.colorId; + var span = $('').text(author.name || "unnamed").css('background-color', authorColor).addClass('author'); + authorsList.append(span); numNamed++; - var tr = $(''); - var swatchtd = $(''); - var swatch = $('
'); - swatch.css('background-color', clientVars.colorPalette[author.colorId]); - swatchtd.append(swatch); - tr.append(swatchtd); - var nametd = $(''); - nametd.text(author.name || "unnamed"); - tr.append(nametd); - $("#authorstable").append(tr); } else { @@ -198,13 +199,19 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded) }); if (numAnonymous > 0) { - var html = "" + (numNamed > 0 ? "...and " : "") + numAnonymous + " unnamed author" + (numAnonymous > 1 ? "s" : "") + ""; - $("#authorstable").append($(html)); + var anonymousAuthorString = numAnonymous + " unnamed author" + (numAnonymous > 1 ? "s" : "") + if (numNamed !== 0){ + authorsList.append(' + ' + anonymousAuthorString); + } else { + authorsList.append(anonymousAuthorString); + } } if (authors.length == 0) { - $("#authorstable").append($("No Authors")) + authorsList.append("No Authors"); } + + fixPadHeight(); } BroadcastSlider = { @@ -465,7 +472,6 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded) { if (clientVars.supportsSlider) { - $("#padmain, #rightbars").css('top', "130px"); $("#timeslider").show(); setSliderLength(clientVars.totalRevs); setSliderPosition(clientVars.revNum); diff --git a/src/static/timeslider.html b/src/static/timeslider.html index 413fbe804..3c909ede0 100644 --- a/src/static/timeslider.html +++ b/src/static/timeslider.html @@ -11,40 +11,14 @@ - +
-
-
- -
- -
- -
- -
- Etherpad v1.1 Etherpad is free software - -
- Full screen -
-
- -
- -
-

Server Notice:

hide -

@@ -67,104 +41,56 @@
- -
-