From 9eea877c777b8711f64db8a288f28969c4829b3f Mon Sep 17 00:00:00 2001 From: philscott-rg Date: Fri, 8 Nov 2024 09:33:00 +0000 Subject: [PATCH] rebuild dist --- dist/confluence/vendor/jquery.scroll-tree.js | 21 +- dist/confluence/vendor/jquery.toc-1.1.4.js | 147 ---------- dist/confluence/vendor/jquery.toc-1.5.js | 294 +++++++++++++++++++ dist/honeycomb.js | 11 +- dist/honeycomb.min.js | 2 +- 5 files changed, 311 insertions(+), 164 deletions(-) delete mode 100644 dist/confluence/vendor/jquery.toc-1.1.4.js create mode 100644 dist/confluence/vendor/jquery.toc-1.5.js diff --git a/dist/confluence/vendor/jquery.scroll-tree.js b/dist/confluence/vendor/jquery.scroll-tree.js index 5a8bd756..131171ee 100644 --- a/dist/confluence/vendor/jquery.scroll-tree.js +++ b/dist/confluence/vendor/jquery.scroll-tree.js @@ -54,18 +54,15 @@ 'root': rootLink, 'parent': parentLink || $parentLi.find('> a').attr('href'), 'current': currentLink || '' - }) - .success(function success(children) { - insertChildren($ul, children); - - $parentLi.removeClass(opts.css.loading) - .addClass(opts.css.expanded); - }) - .error(function error(jqXHR, textStatus, errorThrown) { - $parentLi.removeClass(opts.css.loading) - .addClass(opts.css.error); - }) - ; + }, function success(children) { + insertChildren($ul, children); + + $parentLi.removeClass(opts.css.loading) + .addClass(opts.css.expanded); + }).fail(function error(jqXHR, textStatus, errorThrown) { + $parentLi.removeClass(opts.css.loading) + .addClass(opts.css.error); + }); } diff --git a/dist/confluence/vendor/jquery.toc-1.1.4.js b/dist/confluence/vendor/jquery.toc-1.1.4.js deleted file mode 100644 index 6b95fbd0..00000000 --- a/dist/confluence/vendor/jquery.toc-1.1.4.js +++ /dev/null @@ -1,147 +0,0 @@ -/*! - * samaxesJS JavaScript Library - * jQuery TOC Plugin v1.1.4 - * http://code.google.com/p/samaxesjs/ - * - * Copyright (c) 2011 samaxes.com - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function($) { - /* - * The TOC plugin dynamically builds a table of contents from the headings in - * a document and prepends legal-style section numbers to each of the headings. - */ - $.fn.toc = function(options) { - var opts = $.extend({}, $.fn.toc.defaults, options); - var toc = this; - var headers = {h1: 0, h2: 0, h3: 0, h4: 0, h5: 0, h6: 0}; - var index = 0; - var indexes = {h1: 0, h2: 0, h3: 0, h4: 0, h5: 0, h6: 0}; - for (var i = 1; i <= 6; i++) { - indexes['h' + i] = (opts.exclude.match(new RegExp('h' + i, 'i')) === null && $('h' + i).length > 0) ? ++index : 0; - } - - return this.each(function() { - $(opts.context + ' :header').not(opts.exclude).each(function() { - var $this = $(this); - for (var i = 6; i >= 1; i--) { - if ($this.is('h' + i)) { - if (opts.numerate) { - checkContainer(headers['h' + i], toc); - updateNumeration(headers, 'h' + i); - if (opts.autoId && !$this.attr('id')) { - $this.attr('id', generateId($this.text())); - } - $this.text(addNumeration(headers, 'h' + i, $this.text())); - } - appendToTOC(toc, indexes['h' + i], $this.attr('id'), $this.text()); - } - } - }); - toc.append(markup); - }); - }; - - /* - * Checks if the last node is an 'ul' element. - * If not, a new one is created. - */ - function checkContainer(header, toc) { - if (header === 0 && toc.find(':last').length !== 0 && !toc.find(':last').is('ul')) { - toc.find('li:last').append(''); - } - }; - - /* - * Updates headers numeration. - */ - function updateNumeration(headers, header) { - $.each(headers, function(i, val) { - if (i === header) { - ++headers[i]; - } else if (i > header) { - headers[i] = 0; - } - }); - }; - - /* - * Generate an anchor id from a string by replacing unwanted characters. - */ - function generateId(text) { - return text.replace(/[ <>#\/\\?&\n]/g, '_'); - }; - - /* - * Prepends the numeration to a heading. - */ - function addNumeration(headers, header, text) { - var numeration = ''; - - $.each(headers, function(i, val) { - if (i <= header && headers[i] > 0) { - numeration += headers[i] + '.'; - } - }); - - return numeration + ' ' + text; - }; - - /* - * Appends a new node to the TOC. - */ - var previousIndex = 0; - var markup = ''; - function appendToTOC(toc, index, id, text) { - text = stripBrackets(text); - - if(index < previousIndex) { - - // End a list. - markup += ''; - } - - if(index > previousIndex) { - - // Start a list. - markup += '