diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..b59df2a5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +_build +*~ diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..a4e474fe --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,35 @@ +# Read the Docs configuration file for Sphinx projects +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.12" + # You can also specify other tool versions: + # nodejs: "20" + # rust: "1.70" + # golang: "1.20" + +# Build documentation in the "docs/" directory with Sphinx +sphinx: + configuration: ./conf.py + # You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs + # builder: "dirhtml" + # Fail on all warnings to avoid broken references + # fail_on_warning: true + +# Optionally build your docs in additional formats such as PDF and ePub +formats: + - pdf + - epub + +# Optional but recommended, declare the Python requirements required +# to build your documentation +# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +python: + install: + - requirements: requirements.txt diff --git a/_static/custom.css b/_static/custom.css new file mode 100644 index 00000000..8e2b363b --- /dev/null +++ b/_static/custom.css @@ -0,0 +1,39 @@ +.rst-content code.literal { + color: inherit; + font-size: 85%; + border: none; + background: #E8E8E8; + padding: 2px 3px; + border-radius: .33em; +} + +.toctree-l1 > ul { + margin-top: 3px ! important; +} + +.toctree-l2 > ul { + margin-top: 0 ! important; + margin-bottom: 3px ! important; +} + +ul.simple > li { + margin-bottom: 10px; +} + +div.tight > ul.simple > li { + margin-bottom: 0; +} + +kbd { + display: inline-block; + padding: 3px 5px ! important; + font-size: 80% ! important; + line-height: 10px ! important; + color: #444d56 ! important; + vertical-align: middle ! important; + background-color: #fafbfc ! important; + border: solid 1.5px #c6cbd1 ! important; + border-bottom-color: #959da5 ! important; + border-radius: 3px ! important; + box-shadow: inset -.5px -1px 0 #959da5 ! important; +} diff --git a/_templates/sourcelink.html b/_templates/sourcelink.html deleted file mode 100644 index 4f1ef064..00000000 --- a/_templates/sourcelink.html +++ /dev/null @@ -1,9 +0,0 @@ -{%- if show_source and has_source and sourcename %} -

{{ _('This Page') }}

- -{%- endif %} \ No newline at end of file diff --git a/_themes/mjtheme/layout.html b/_themes/mjtheme/layout.html deleted file mode 100644 index 7862e78e..00000000 --- a/_themes/mjtheme/layout.html +++ /dev/null @@ -1,282 +0,0 @@ -{# - basic/layout.html - ~~~~~~~~~~~~~~~~~ - - Master layout template for Sphinx themes. - - :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -#} -{%- block doctype -%} - -{%- endblock %} -{%- set reldelim1 = reldelim1 is not defined and ' »' or reldelim1 %} -{%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %} -{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and - (sidebars != []) %} -{%- set url_root = pathto('', 1) %} -{%- if url_root == '#' %}{% set url_root = '' %}{% endif %} - -{%- macro relbar() %} - -{%- endmacro %} - -{%- macro sidebar() %} - {%- if render_sidebar %} -
-
- {%- block sidebarlogo %} - {%- if logo %} - - {%- endif %} - {%- endblock %} - {%- if sidebars != None %} - {#- new style sidebar: explicitly include/exclude templates #} - {%- for sidebartemplate in sidebars %} - {%- include sidebartemplate %} - {%- endfor %} - {%- else %} - {#- old style sidebars: using blocks -- should be deprecated #} - {%- block sidebartoc %} - {%- include "localtoc.html" %} - {%- endblock %} - {%- block sidebarrel %} - {%- include "relations.html" %} - {%- endblock %} - {%- block sidebarsourcelink %} - {%- include "sourcelink.html" %} - {%- endblock %} - {%- if customsidebar %} - {%- include customsidebar %} - {%- endif %} - {%- block sidebarsearch %} - {%- include "searchbox.html" %} - {%- endblock %} - {%- endif %} -
-
- {%- endif %} -{%- endmacro %} - - - - - {{ metatags }} - {%- if not embedded and docstitle %} - {%- set titlesuffix = " — "|safe + docstitle|e %} - {%- else %} - {%- set titlesuffix = "" %} - {%- endif %} - {%- block htmltitle %} - {{ title|striptags|e }}{{ titlesuffix }} - {%- endblock %} - - - {%- for cssfile in css_files %} - - {%- endfor %} - {%- if not embedded %} - - {%- for scriptfile in script_files %} - - {%- endfor %} - - {%- if use_opensearch %} - - {%- endif %} - {%- if favicon %} - - {%- endif %} - {%- endif %} -{%- block linktags %} - {%- if hasdoc('about') %} - - {%- endif %} - {%- if hasdoc('genindex') %} - - {%- endif %} - {%- if hasdoc('search') %} - - {%- endif %} - {%- if hasdoc('copyright') %} - - {%- endif %} - - {%- if parents %} - - {%- endif %} - {%- if next %} - - {%- endif %} - {%- if prev %} - - {%- endif %} -{%- endblock %} -{%- block extrahead %} {% endblock %} - - - {% if for_site %} -
- -
- - {% endif %} -{%- block header %}{% endblock %} - -{%- block relbar1 %}{{ relbar() }}{% endblock %} - -{%- block content %} - {%- block sidebar1 %} {# possible location for sidebar #} {% endblock %} - -
- {%- block document %} -
- {%- if render_sidebar %} -
- {%- endif %} -
- {% block body %} {% endblock %} -
- {%- if render_sidebar %} -
- {%- endif %} -
- {%- endblock %} - - {%- block sidebar2 %}{{ sidebar() }}{% endblock %} -
-
-{%- endblock %} - -{%- block relbar2 %}{{ relbar() }}{% endblock %} - -{%- block footer %} - -{%- endblock %} - {% if for_site %} -
- {% endif %} - - diff --git a/_themes/mjtheme/static/mj.css_t b/_themes/mjtheme/static/mj.css_t deleted file mode 100644 index f67ebff2..00000000 --- a/_themes/mjtheme/static/mj.css_t +++ /dev/null @@ -1,648 +0,0 @@ -/** - * Sphinx stylesheet -- default theme - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - */ - -@import url("basic.css"); - -{% if for_site %} - -/****************************************** - * CSS configuration from www.mathjax.org - ******************************************/ - -/* - * Culled from twentyten style.css - */ - * -#access .menu-header, -#branding, -#wrapper { - margin: 0 auto; - width: 940px; -} -#wrapper { - margin-top: 20px; - background: #fff; - padding: 0 20px; -} - -#site-info { - float: left; - width: 700px; - font-weight: bold; - font-size: 14px; -} -body { - background: #D2D3D3 ! important; -} - - -#header { - padding: 30px 0 0 0; -} -#site-title { - float: left; - margin: 0 0 18px 0; - width: 700px; - font-size: 30px; - line-height: 36px; -} -#site-title a { - color: #000; - font-weight: bold; - text-decoration: none; -} -#site-description { - clear: right; - float: right; - font-style: italic; - margin: 14px 0 18px 0; - width: 220px; -} - -#branding img { - clear: both; - border-top: 4px solid #000; - display: block; - border-bottom: 1px solid #000; -} - - -#access { - background: #000; - margin: 0 auto; - width: 940px; - display:block; - float:left; -} -#access .menu-header { - font-size: 13px; - margin-left: 12px; -} -#access .menu-header ul { - list-style: none; - margin: 0; -} -#access .menu-header li { - float:left; - position: relative; -} -#access a { - display:block; - text-decoration:none; - color:#aaa; - padding:0 10px; - line-height:38px; -} -#access ul ul { - display:none; - position:absolute; - top:38px; - left:0; - float:left; - box-shadow: 0px 3px 3px rgba(0,0,0,0.2); - -moz-box-shadow: 0px 3px 3px rgba(0,0,0,0.2); - -webkit-box-shadow: 0px 3px 3px rgba(0,0,0,0.2); - width: 180px; - z-index: 99999; -} -#access ul ul li { - min-width: 180px; -} -#access ul ul ul { - left:100%; - top:0; -} -#access ul ul a { - background:#333; - height:auto; - line-height:1em; - padding:10px; - width: 160px; -} -#access li:hover > a, -#access ul ul :hover > a { - color:#fff; - background:#333; -} -#access ul li:hover > ul { - display:block; -} -#access ul li.current_page_item > a, -#access ul li.current-menu-ancestor > a, -#access ul li.current-menu-item > a, -#access ul li.current-menu-parent > a { - color: #fff; -} - -* html #access ul li.current_page_item a, -* html #access ul li.current-menu-ancestor a, -* html #access ul li.current-menu-item a, -* html #access ul li.current-menu-parent a, -* html #access ul li a:hover { - color:#fff; -} - -.navigation { - font-size: 12px; - line-height: 18px; - overflow: hidden; - color: #888; -} -.navigation a:link, -.navigation a:visited { - color: #888; - text-decoration: none; -} -.navigation a:active, -.navigation a:hover { - color: #FF4B33; -} - -.widget_search #s { /* This keeps the search inputs in line */ - width: 60%; -} -.widget_search label { - display:none; -} -.widget-container { - margin: 0 0 18px 0; -} - -#site-info { - font-weight: bold; -} -#site-info a { - color: #000; - text-decoration: none; -} - -#access, -.navigation { - -webkit-text-size-adjust: 120%; -} -#site-description { - -webkit-text-size-adjust: none; -} - - -@media print { - body { - background:none !important; - } - #wrapper { - float: none !important; - clear: both !important; - display: block !important; - position: relative !important; - } - #header { - border-bottom: 2pt solid #000; - padding-bottom: 18pt; - } - #site-title, - #site-description { - float: none; - margin: 0; - padding:0; - line-height: 1.4em; - } - #access, - #branding img, - #respond, - .navigation { - display: none !important; - } - #header { - width: 100%; - margin: 0; - } - #site-info { - float: none; - width: auto; - } -} - -/* - * from mathjax style.css - */ - -.clear { - clear: both; -} - -/* HEADER */ -#header { - padding: 20px 0 0; -} -#site-title { - margin: 0; - width: 300px; -} - -#branding img { - border: 0; -} - -#site-description { - margin: 36px 0 0; - font-size: 18px; - float: left; - width: auto; - font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif; - font-style: normal; - font-weight: bold; - letter-spacing: -1px; - color: #a5a5a5; -} - -#header-box-right { - margin: 10px 0 0; - float: right; -} -.icon-list { - display: block; - margin: 0 0 0 93px; - list-style: none; -} -.icon-list li { - float: left; - display: inline; - margin: 0 8px 5px 0; -} -.icon-list img { border: 0; } -.widget_search { - clear: both; - margin: 0; -} -.widget_search #s { - width: 150px; - height: 16px; - float: left; -} -input[type="text"], textarea { - border: 2px solid #b5bfb8; - background-color: #eaeaea; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; -} -input[type="text"]:focus, textarea:focus{ - outline-width: 0; - border-color: #169538; -} -.search-button { - float: left; - display: inline; - margin: 2px 0 0 5px; -} - -/* NAVIGATION */ - -#access { - margin: 20px 0 10px; -} -#access li { min-width: 20px; } -#access a { color: #dddddd; font-weight: bold; } -#access a:hover, #access ul li.current_page_item > a, #access ul li.current-menu-ancestor > a, -#access ul li.current-menu-item > a, #access ul li.current-menu-parent > a { - color: #ffffff; - font-weight: bold; -} -#access li:hover > a, #access ul ul :hover > a { - color:#fff; - background:#444; -} -#access ul ul a { - background:#444; -} - -#menu-item-1167 { - margin-right: 12px; - float: right !important; - background: #E18B16 !important; -} -#menu-item-1167:hover > a { - background: #ef9d32 !important; -} -#menu-item-1167 a, #menu-item-1167 a:visited { - color: #ffffff !important; -} - - - -/* - * Adjustementst to www.mathjax.org settings to work with - * to match the global settings from www.mathjax.org - */ - -#access { - margin-bottom: 1px; -} - -fieldset { - border: 0; - padding: 0; - margin: 0; -} - -#header { - font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif; - line-height:18px; -} - -#header-box-right { - line-height: 18px; - font-size: 12px; - border: 0; - padding: 0; -} -#header-box-right ul, #header-box-right form { - margin: 0; - padding: 0; - border: 0; -} -#header-box-right .icon-list { - margin-left: 93px -} - -#header input { - font-family: Georgia, "Bitstream Charter", serif; -} -#header input[type="text"] { - padding: 2px; - background-color: #eaeaea; - border: 2px solid #b5bfb8; - box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1); - -moz-box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1); - -webkit-box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1); - -moz-border-radius: 4px; - -webkit-border-radius: 4px; -} -#header input[type="text"]:focus { - outline-width: 0; - border-color: #169538; -} - -.menu-header ul, .menu-header li { - margin: 0; - padding: 0; - border: 0; -} - -/*************************************** - * End of site-specific configuration - ***************************************/ - -{% endif %} - - -/* -- page layout ----------------------------------------------------------- */ - -body { - font-family: {{ theme_bodyfont }}; - font-size: 100%; - background-color: {{ theme_footerbgcolor }}; - color: #000; - margin: 0; - padding: 0; -} - -div.document { - background-color: {{ theme_sidebarbgcolor }}; -} - -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 0 0 0 230px; -} - -div.body { - background-color: {{ theme_bgcolor }}; - color: {{ theme_textcolor }}; - padding: 0 20px 30px 20px; -} - -{%- if theme_rightsidebar|tobool %} -div.bodywrapper { - margin: 0 230px 0 0; -} -{%- endif %} - -div.footer { - color: {{ theme_footertextcolor }}; - width: 100%; - padding: 9px 0 9px 0; - text-align: center; - font-size: 75%; -} - -div.footer a { - color: {{ theme_footertextcolor }}; - text-decoration: underline; -} - -div.related { - background-color: {{ theme_relbarbgcolor }}; - line-height: 30px; - color: {{ theme_relbartextcolor }}; -} - -div.related a { - color: {{ theme_relbarlinkcolor }}; -} - -div.sphinxsidebar { - {%- if theme_stickysidebar|tobool %} - top: 30px; - margin: 0; - position: fixed; - overflow: auto; - height: 100%; - {%- endif %} - {%- if theme_rightsidebar|tobool %} - float: right; - {%- if theme_stickysidebar|tobool %} - right: 0; - {%- endif %} - {%- endif %} -} - -{%- if theme_stickysidebar|tobool %} -/* this is nice, but it it leads to hidden headings when jumping - to an anchor */ -/* -div.related { - position: fixed; -} - -div.documentwrapper { - margin-top: 30px; -} -*/ -{%- endif %} - -div.sphinxsidebar h3 { - font-family: {{ theme_headfont }}; - color: {{ theme_sidebartextcolor }}; - font-size: 1.4em; - font-weight: normal; - margin: 0; - padding: 0; -} - -div.sphinxsidebar h3 a { - color: {{ theme_sidebartextcolor }}; -} - -div.sphinxsidebar h4 { - font-family: {{ theme_headfont }}; - color: {{ theme_sidebartextcolor }}; - font-size: 1.3em; - font-weight: normal; - margin: 5px 0 0 0; - padding: 0; -} - -div.sphinxsidebar p { - color: {{ theme_sidebartextcolor }}; -} - -div.sphinxsidebar p.topless { - margin: 5px 10px 10px 10px; -} - -div.sphinxsidebar ul { - margin: 10px; - padding: 0; - color: {{ theme_sidebartextcolor }}; -} - -div.sphinxsidebar ul li { - margin-top: .2em; -} - -div.sphinxsidebar a { - color: {{ theme_sidebarlinkcolor }}; -} - -div.sphinxsidebar input { - border: 1px solid {{ theme_sidebarlinkcolor }}; - font-family: sans-serif; - font-size: 1em; -} - -/* -- body styles ----------------------------------------------------------- */ - -a { - color: {{ theme_linkcolor }}; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - -div.body p, div.body dd, div.body li { - text-align: justify; - line-height: 130%; -} - -div.body h1, -div.body h2, -div.body h3, -div.body h4, -div.body h5, -div.body h6 { - font-family: {{ theme_headfont }}; - background-color: {{ theme_headbgcolor }}; - font-weight: normal; - color: {{ theme_headtextcolor }}; - border-top: 2px solid {{ theme_headbordercolor }}; - border-bottom: 1px solid {{ theme_headbordercolor }}; - margin: 30px -20px 20px -20px; - padding: 3px 0 3px 10px; -} - -div.body h1 { margin-top: 0; font-size: 200%; } -div.body h2 { font-size: 160%; } -div.body h3 { font-size: 140%; padding-left: 20px; } -div.body h4 { font-size: 120%; padding-left: 20px; } -div.body h5 { font-size: 110%; padding-left: 20px; } -div.body h6 { font-size: 100%; padding-left: 20px; } - -a.headerlink { - color: {{ theme_headlinkcolor }}; - font-size: 0.8em; - padding: 0 4px 0 4px; - text-decoration: none; -} - -a.headerlink:hover { - background-color: {{ theme_headlinkcolor }}; - color: white; -} - -div.body p, div.body dd, div.body li { - text-align: justify; - line-height: 130%; -} - -div.admonition p.admonition-title + p { - display: inline; -} - -div.note { - background-color: #eee; - border: 1px solid #ccc; -} - -div.seealso { - background-color: #ffc; - border: 1px solid #ff6; -} - -div.topic { - background-color: #eee; -} - -div.warning { - background-color: #ffe4e4; - border: 1px solid #f66; -} - -p.admonition-title { - display: inline; -} - -p.admonition-title:after { - content: ":"; -} - -pre { - padding: 5px; - background-color: {{ theme_codebgcolor }}; - color: {{ theme_codetextcolor }}; - line-height: 130%; - border: 2px solid {{ theme_codebordercolor }}; - border-left: none; - border-right: none; -} - -tt { - background-color: #ecf0f3; - padding: 0 1px 0 1px; -/* font-size: 0.95em;*/ -} - -.warning tt { - background: #efc2c2; -} - -.note tt { - background: #d6d6d6; -} diff --git a/_themes/mjtheme/theme.conf b/_themes/mjtheme/theme.conf deleted file mode 100644 index a61e9d33..00000000 --- a/_themes/mjtheme/theme.conf +++ /dev/null @@ -1,30 +0,0 @@ -[theme] -inherit = basic -stylesheet = mj.css -pygments_style = sphinx - -[options] -rightsidebar = false -stickysidebar = false - -footerbgcolor = #11303d -footertextcolor = #ffffff -sidebarbgcolor = #d4e9f7 -sidebartextcolor = #3a3a3a -sidebarlinkcolor = #3a8942 -relbarbgcolor = #191a19 -relbartextcolor = #ffffff -relbarlinkcolor = #ffffff -bgcolor = #ffffff -textcolor = #222222 -headbgcolor = #f2f2f2 -headtextcolor = #20435c -headlinkcolor = #c60f0f -headbordercolor = #cccccc -linkcolor = #355f7c -codebgcolor = #f1f8ff -codetextcolor = #333333 -codebordercolor = #6799b3 - -bodyfont = sans-serif -headfont = 'Trebuchet MS', sans-serif diff --git a/_themes/sphinx-bootstrap/bootstrap.js b/_themes/sphinx-bootstrap/bootstrap.js deleted file mode 100755 index 39ad031e..00000000 --- a/_themes/sphinx-bootstrap/bootstrap.js +++ /dev/null @@ -1,2038 +0,0 @@ -/* =================================================== - * bootstrap-transition.js v2.1.0 - * http://twitter.github.com/bootstrap/javascript.html#transitions - * =================================================== - * Copyright 2012 Twitter, Inc. - * - * 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 ($) { - - $(function () { - - "use strict"; // jshint ;_; - - - /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) - * ======================================================= */ - - $.support.transition = (function () { - - var transitionEnd = (function () { - - var el = document.createElement('bootstrap') - , transEndEventNames = { - 'WebkitTransition' : 'webkitTransitionEnd' - , 'MozTransition' : 'transitionend' - , 'OTransition' : 'oTransitionEnd otransitionend' - , 'transition' : 'transitionend' - } - , name - - for (name in transEndEventNames){ - if (el.style[name] !== undefined) { - return transEndEventNames[name] - } - } - - }()) - - return transitionEnd && { - end: transitionEnd - } - - })() - - }) - -}(window.jQuery); -/* ========================================================= - * bootstrap-modal.js v2.1.0 - * http://twitter.github.com/bootstrap/javascript.html#modals - * ========================================================= - * Copyright 2012 Twitter, Inc. - * - * 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 ($) { - - "use strict"; // jshint ;_; - - - /* MODAL CLASS DEFINITION - * ====================== */ - - var Modal = function (element, options) { - this.options = options - this.$element = $(element) - .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)) - this.options.remote && this.$element.find('.modal-body').load(this.options.remote) - } - - Modal.prototype = { - - constructor: Modal - - , toggle: function () { - return this[!this.isShown ? 'show' : 'hide']() - } - - , show: function () { - var that = this - , e = $.Event('show') - - this.$element.trigger(e) - - if (this.isShown || e.isDefaultPrevented()) return - - $('body').addClass('modal-open') - - this.isShown = true - - this.escape() - - this.backdrop(function () { - var transition = $.support.transition && that.$element.hasClass('fade') - - if (!that.$element.parent().length) { - that.$element.appendTo(document.body) //don't move modals dom position - } - - that.$element - .show() - - if (transition) { - that.$element[0].offsetWidth // force reflow - } - - that.$element - .addClass('in') - .attr('aria-hidden', false) - .focus() - - that.enforceFocus() - - transition ? - that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) : - that.$element.trigger('shown') - - }) - } - - , hide: function (e) { - e && e.preventDefault() - - var that = this - - e = $.Event('hide') - - this.$element.trigger(e) - - if (!this.isShown || e.isDefaultPrevented()) return - - this.isShown = false - - $('body').removeClass('modal-open') - - this.escape() - - $(document).off('focusin.modal') - - this.$element - .removeClass('in') - .attr('aria-hidden', true) - - $.support.transition && this.$element.hasClass('fade') ? - this.hideWithTransition() : - this.hideModal() - } - - , enforceFocus: function () { - var that = this - $(document).on('focusin.modal', function (e) { - if (that.$element[0] !== e.target && !that.$element.has(e.target).length) { - that.$element.focus() - } - }) - } - - , escape: function () { - var that = this - if (this.isShown && this.options.keyboard) { - this.$element.on('keyup.dismiss.modal', function ( e ) { - e.which == 27 && that.hide() - }) - } else if (!this.isShown) { - this.$element.off('keyup.dismiss.modal') - } - } - - , hideWithTransition: function () { - var that = this - , timeout = setTimeout(function () { - that.$element.off($.support.transition.end) - that.hideModal() - }, 500) - - this.$element.one($.support.transition.end, function () { - clearTimeout(timeout) - that.hideModal() - }) - } - - , hideModal: function (that) { - this.$element - .hide() - .trigger('hidden') - - this.backdrop() - } - - , removeBackdrop: function () { - this.$backdrop.remove() - this.$backdrop = null - } - - , backdrop: function (callback) { - var that = this - , animate = this.$element.hasClass('fade') ? 'fade' : '' - - if (this.isShown && this.options.backdrop) { - var doAnimate = $.support.transition && animate - - this.$backdrop = $('