From 8c29125592b665d7aae7e8ec2c3018d0e3ca77ee Mon Sep 17 00:00:00 2001 From: Michael Heppler Date: Tue, 3 Jul 2018 13:25:39 -0400 Subject: [PATCH 1/2] Upgrade Bootstrap for the Dataverse UI, pointing to CDN for v. 3.3.7. Also upgrade local version for the guides. [ref #4219] --- .../source/_static/navbarscroll.js | 2 +- doc/sphinx_bootstrap_theme/__init__.py | 2 +- .../bootstrap/layout.html | 46 +- .../bootstrap/navbar-2.html | 2 +- .../bootstrap/navbar.html | 5 +- .../bootstrap/navbartoc.html | 2 +- .../bootstrap/relations.html | 6 +- .../bootstrap-3.1.0/css/bootstrap-theme.css | 347 - .../css/bootstrap-theme.css.map | 1 - .../css/bootstrap-theme.min.css | 7 - .../static/bootstrap-3.1.0/css/bootstrap.css | 5831 ----------------- .../bootstrap-3.1.0/css/bootstrap.css.map | 1 - .../bootstrap-3.1.0/css/bootstrap.min.css | 7 - .../fonts/glyphicons-halflings-regular.eot | Bin 20290 -> 0 bytes .../fonts/glyphicons-halflings-regular.svg | 229 - .../fonts/glyphicons-halflings-regular.ttf | Bin 41236 -> 0 bytes .../fonts/glyphicons-halflings-regular.woff | Bin 23292 -> 0 bytes .../static/bootstrap-3.1.0/js/bootstrap.js | 1951 ------ .../bootstrap-3.1.0/js/bootstrap.min.js | 6 - .../bootstrap-3.3.7}/css/bootstrap-theme.css | 141 +- .../css/bootstrap-theme.css.map | 1 + .../css/bootstrap-theme.min.css | 6 + .../css/bootstrap-theme.min.css.map | 1 + .../static/bootstrap-3.3.7}/css/bootstrap.css | 519 +- .../bootstrap-3.3.7/css/bootstrap.css.map | 1 + .../bootstrap-3.3.7/css/bootstrap.min.css | 6 + .../bootstrap-3.3.7/css/bootstrap.min.css.map | 1 + .../fonts/glyphicons-halflings-regular.eot | Bin .../fonts/glyphicons-halflings-regular.svg | 0 .../fonts/glyphicons-halflings-regular.ttf | Bin .../fonts/glyphicons-halflings-regular.woff | Bin .../fonts/glyphicons-halflings-regular.woff2 | Bin .../static/bootstrap-3.3.7}/js/bootstrap.js | 489 +- .../bootstrap-3.3.7/js/bootstrap.min.js | 7 + .../static/bootstrap-3.3.7}/js/npm.js | 0 .../bootstrap/static/bootstrap-sphinx.css_t | 97 +- .../bootstrap/static/bootstrap-sphinx.js_t | 86 +- .../bootstrap/static/js/jquery-1.11.0.min.js | 4 - .../bootstrap/static/js/jquery-3.1.0.min.js | 4 + .../static/js/xnavbar_from_dataverse_org.js | 19 - .../bootstrap/theme.conf | 11 +- src/main/webapp/dataverse_header.xhtml | 5 +- src/main/webapp/dataverse_template.xhtml | 9 +- .../resources/bs/css/bootstrap-theme.css.map | 1 - .../resources/bs/css/bootstrap-theme.min.css | 5 - .../webapp/resources/bs/css/bootstrap.css.map | 1 - .../webapp/resources/bs/css/bootstrap.min.css | 5 - .../bs/js/bootstrap-hover-dropdown.min.js | 13 - .../webapp/resources/bs/js/bootstrap.min.js | 7 - 49 files changed, 944 insertions(+), 8940 deletions(-) delete mode 100755 doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.1.0/css/bootstrap-theme.css delete mode 100755 doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.1.0/css/bootstrap-theme.css.map delete mode 100755 doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.1.0/css/bootstrap-theme.min.css delete mode 100755 doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.1.0/css/bootstrap.css delete mode 100755 doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.1.0/css/bootstrap.css.map delete mode 100755 doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.1.0/css/bootstrap.min.css delete mode 100755 doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.1.0/fonts/glyphicons-halflings-regular.eot delete mode 100755 doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.1.0/fonts/glyphicons-halflings-regular.svg delete mode 100755 doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.1.0/fonts/glyphicons-halflings-regular.ttf delete mode 100755 doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.1.0/fonts/glyphicons-halflings-regular.woff delete mode 100755 doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.1.0/js/bootstrap.js delete mode 100755 doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.1.0/js/bootstrap.min.js rename {src/main/webapp/resources/bs => doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.3.7}/css/bootstrap-theme.css (85%) mode change 100644 => 100755 create mode 100755 doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.3.7/css/bootstrap-theme.css.map create mode 100755 doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.3.7/css/bootstrap-theme.min.css create mode 100755 doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.3.7/css/bootstrap-theme.min.css.map rename {src/main/webapp/resources/bs => doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.3.7}/css/bootstrap.css (93%) mode change 100644 => 100755 create mode 100755 doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.3.7/css/bootstrap.css.map create mode 100755 doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.3.7/css/bootstrap.min.css create mode 100755 doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.3.7/css/bootstrap.min.css.map rename {src/main/webapp/resources/bs => doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.3.7}/fonts/glyphicons-halflings-regular.eot (100%) mode change 100644 => 100755 rename {src/main/webapp/resources/bs => doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.3.7}/fonts/glyphicons-halflings-regular.svg (100%) mode change 100644 => 100755 rename {src/main/webapp/resources/bs => doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.3.7}/fonts/glyphicons-halflings-regular.ttf (100%) mode change 100644 => 100755 rename {src/main/webapp/resources/bs => doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.3.7}/fonts/glyphicons-halflings-regular.woff (100%) mode change 100644 => 100755 rename {src/main/webapp/resources/bs => doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.3.7}/fonts/glyphicons-halflings-regular.woff2 (100%) mode change 100644 => 100755 rename {src/main/webapp/resources/bs => doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.3.7}/js/bootstrap.js (85%) mode change 100644 => 100755 create mode 100755 doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.3.7/js/bootstrap.min.js rename {src/main/webapp/resources/bs => doc/sphinx_bootstrap_theme/bootstrap/static/bootstrap-3.3.7}/js/npm.js (100%) mode change 100644 => 100755 delete mode 100755 doc/sphinx_bootstrap_theme/bootstrap/static/js/jquery-1.11.0.min.js create mode 100644 doc/sphinx_bootstrap_theme/bootstrap/static/js/jquery-3.1.0.min.js delete mode 100644 doc/sphinx_bootstrap_theme/bootstrap/static/js/xnavbar_from_dataverse_org.js delete mode 100644 src/main/webapp/resources/bs/css/bootstrap-theme.css.map delete mode 100644 src/main/webapp/resources/bs/css/bootstrap-theme.min.css delete mode 100644 src/main/webapp/resources/bs/css/bootstrap.css.map delete mode 100644 src/main/webapp/resources/bs/css/bootstrap.min.css delete mode 100755 src/main/webapp/resources/bs/js/bootstrap-hover-dropdown.min.js delete mode 100644 src/main/webapp/resources/bs/js/bootstrap.min.js diff --git a/doc/sphinx-guides/source/_static/navbarscroll.js b/doc/sphinx-guides/source/_static/navbarscroll.js index fac5d6056f2..b0cb6bb640d 100644 --- a/doc/sphinx-guides/source/_static/navbarscroll.js +++ b/doc/sphinx-guides/source/_static/navbarscroll.js @@ -3,7 +3,7 @@ See: http://stackoverflow.com/questions/10732690/offsetting-an-html-anchor-to-adjust-for-fixed-header */ $jqTheme(document).ready(function() { - $jqTheme('a[href*=#]:not([href=#])').on('click', function() { + $jqTheme('a[href*="#"]:not([href="#"])').on('click', function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var target = $jqTheme(this.hash); diff --git a/doc/sphinx_bootstrap_theme/__init__.py b/doc/sphinx_bootstrap_theme/__init__.py index 5e72b573b8d..b1ce532c57d 100755 --- a/doc/sphinx_bootstrap_theme/__init__.py +++ b/doc/sphinx_bootstrap_theme/__init__.py @@ -1,7 +1,7 @@ """Sphinx bootstrap theme.""" import os -VERSION = (0, 4, 0) +VERSION = (0, 6, 1) __version__ = ".".join(str(v) for v in VERSION) __version_full__ = __version__ diff --git a/doc/sphinx_bootstrap_theme/bootstrap/layout.html b/doc/sphinx_bootstrap_theme/bootstrap/layout.html index b85ebd2a360..5477ec74600 100755 --- a/doc/sphinx_bootstrap_theme/bootstrap/layout.html +++ b/doc/sphinx_bootstrap_theme/bootstrap/layout.html @@ -1,46 +1,15 @@ {% extends "basic/layout.html" %} -{% set theme_css_files = [] %} {% if theme_bootstrap_version == "3" %} - {% set bootstrap_version, bootstrap_additional_css, navbar_version = "3.1.0", "theme", "" %} + {% set bootstrap_version, navbar_version = "3.3.7", "" %} {% set bs_span_prefix = "col-md-" %} {% else %} - {% set bootstrap_version, bootstrap_additional_css, navbar_version = "2.3.2", "responsive", "-2" %} + {% set bootstrap_version, navbar_version = "2.3.2", "-2" %} {% set bs_span_prefix = "span" %} {% endif %} -{% if theme_bootswatch_theme %} - {# BS2 needs "bootstrap-responsive.css". BS3 doesn't. #} - {% if theme_bootstrap_version == "3" %} - {% set theme_css_files = theme_css_files + [ - '_static/bootswatch-' + bootstrap_version + '/' + theme_bootswatch_theme + '/bootstrap.min.css', - '_static/bootstrap-sphinx.css' - ] - %} - {% else %} - {% set theme_css_files = theme_css_files + [ - '_static/bootswatch-' + bootstrap_version + '/' + theme_bootswatch_theme + '/bootstrap.min.css', - '_static/bootstrap-' + bootstrap_version + '/css/bootstrap-' + bootstrap_additional_css + '.min.css', - '_static/bootstrap-sphinx.css' - ] - %} - {% endif %} -{% else %} - {% set theme_css_files = theme_css_files + [ - '_static/bootstrap-' + bootstrap_version + '/css/bootstrap.min.css', - '_static/bootstrap-' + bootstrap_version + '/css/bootstrap-' + bootstrap_additional_css + '.min.css', - '_static/bootstrap-sphinx.css' - ] - %} -{% endif %} - -{% if not bootswatch_css_custom %} - {% set bootswatch_css_custom = [] %} -{% endif %} -{% set css_files = css_files + theme_css_files + bootswatch_css_custom %} - {% set script_files = script_files + [ - '_static/js/jquery-1.11.0.min.js', + '_static/js/jquery-3.1.0.min.js', '_static/js/jquery-fix.js', '_static/bootstrap-' + bootstrap_version + '/js/bootstrap.min.js', '_static/bootstrap-sphinx.js', @@ -65,9 +34,8 @@ {%- endblock %} {%- block extrahead %} - - - + + {% endblock %} @@ -114,7 +82,7 @@
{%- block sidebar1 %}{{ bsidebar() }}{% endblock %} -
+
{% block body %}{% endblock %}
{% block sidebar2 %} {# possible location for sidebar #} {% endblock %} @@ -124,7 +92,7 @@ {%- block footer %}