help3xsl/paginathing.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
New commits: commit b3686d53d10873b1260091a4c6a898575516217e Author: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org> AuthorDate: Wed Jan 23 14:43:45 2019 +0200 Commit: Olivier Hallot <olivier.hal...@libreoffice.org> CommitDate: Wed Jan 23 15:03:51 2019 +0100 Moved the pagination controls to the top As the height of the result list keeps changing constantly, it was highly annoying to click the arrows in the controls. Change-Id: I82308adc3971f25ed629009bf1e0854d38197560 Reviewed-on: https://gerrit.libreoffice.org/66795 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hal...@libreoffice.org> diff --git a/help3xsl/paginathing.js b/help3xsl/paginathing.js index 2f3636022..81edf3e0d 100644 --- a/help3xsl/paginathing.js +++ b/help3xsl/paginathing.js @@ -29,17 +29,18 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -// Polyfill for .after() +// Polyfill for .before() +// from: https://github.com/jserz/js_piece/blob/master/DOM/ChildNode/before()/before().md (function (arr) { arr.forEach(function (item) { - if (item.hasOwnProperty('after')) { + if (item.hasOwnProperty('before')) { return; } - Object.defineProperty(item, 'after', { + Object.defineProperty(item, 'before', { configurable: true, enumerable: true, writable: true, - value: function after() { + value: function before() { var argArr = Array.prototype.slice.call(arguments), docFrag = document.createDocumentFragment(); @@ -48,7 +49,7 @@ docFrag.appendChild(isNode ? argItem : document.createTextNode(String(argItem))); }); - this.parentNode.insertBefore(docFrag, this.nextSibling); + this.parentNode.insertBefore(docFrag, this); } }); }); @@ -229,7 +230,7 @@ var Paginator = function(element) { } } - el.after(container); + el.before(container); container.appendChild(ul); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits