diff options
author | Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> | 2019-01-23 14:43:45 +0200 |
---|---|---|
committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | 2019-03-01 01:44:45 +0100 |
commit | aa7a881b0cddfab63d3fdfe3904f8a70200b8ad7 (patch) | |
tree | 13d021556b487066d3d66dfb459ea0e6d6b24da2 | |
parent | e5e19bf05d9f59e61c19b1d40aacedc643f6d6f1 (diff) |
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.hallot@libreoffice.org>
(cherry picked from commit b3686d53d10873b1260091a4c6a898575516217e)
Reviewed-on: https://gerrit.libreoffice.org/68522
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
-rw-r--r-- | help3xsl/paginathing.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/help3xsl/paginathing.js b/help3xsl/paginathing.js index 2f3636022f..81edf3e0d8 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); } |