diff --git a/docs/assets/js/google-code-prettify/prettify.css b/docs/assets/js/google-code-prettify/prettify.css index aedd8d1a9157..990090209bb3 100644 --- a/docs/assets/js/google-code-prettify/prettify.css +++ b/docs/assets/js/google-code-prettify/prettify.css @@ -1,28 +1,28 @@ -.com { color: #93a1a1; } -.lit { color: #195f91; } -.pun, .opn, .clo { color: #93a1a1; } -.fun { color: #dc322f; } -.str, .atv { color: #D14; } -.kwd, .linenums .tag { color: #1e347b; } -.typ, .atn, .dec, .var { color: teal; } -.pln { color: #48484c; } +.su_bootstrap_safe .com { color: #93a1a1; } +.su_bootstrap_safe .lit { color: #195f91; } +.su_bootstrap_safe .pun, .su_bootstrap_safe .opn, .su_bootstrap_safe .clo { color: #93a1a1; } +.su_bootstrap_safe .fun { color: #dc322f; } +.su_bootstrap_safe .str, .su_bootstrap_safe .atv { color: #D14; } +.su_bootstrap_safe .kwd, .su_bootstrap_safe .linenums .tag { color: #1e347b; } +.su_bootstrap_safe .typ, .su_bootstrap_safe .atn, .su_bootstrap_safe .dec, .su_bootstrap_safe .var { color: teal; } +.su_bootstrap_safe .pln { color: #48484c; } -.prettyprint { +.su_bootstrap_safe .prettyprint { padding: 8px; background-color: #f7f7f9; border: 1px solid #e1e1e8; } -.prettyprint.linenums { +.su_bootstrap_safe .prettyprint.linenums { -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; } /* Specify class=linenums on a pre to get line numbering */ -ol.linenums { +.su_bootstrap_safe ol.linenums { margin: 0 0 0 33px; /* IE indents via margin-left */ } -ol.linenums li { +.su_bootstrap_safe ol.linenums li { padding-left: 12px; color: #bebec5; line-height: 18px; diff --git a/js/bootstrap-modal.js b/js/bootstrap-modal.js index c831de6b64b5..67f6f0e60d5e 100644 --- a/js/bootstrap-modal.js +++ b/js/bootstrap-modal.js @@ -30,7 +30,10 @@ this.options = options this.$element = $(content) .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)) + this.$element.removeClass('su_bootstrap_safe').addClass('su_bootstrap_safe') } + + var openedModals = [] Modal.prototype = { @@ -49,6 +52,9 @@ if (this.isShown || e.isDefaultPrevented()) return $('body').addClass('modal-open') + + // SU focused modal hack + $(openedModals).removeClass('focused'); for( var i = 0; i < openedModals.length; i++ ) { var $modal = openedModals[i]; $modal.removeClass('focused'); } this.$element.addClass('focused'); openedModals.push(this.$element); this.isShown = true @@ -77,6 +83,7 @@ } , hide: function (e) { + if( ! this.$element.hasClass('focused') ) return; e && e.preventDefault() var that = this @@ -89,15 +96,15 @@ this.isShown = false - $('body').removeClass('modal-open') + openedModals.length <= 1 && $('body').removeClass('modal-open') escape.call(this) - - this.$element.removeClass('in') + + this.$element.removeClass('in focused'); openedModals.pop() $.support.transition && this.$element.hasClass('fade') ? hideWithTransition.call(this) : - hideModal.call(this) + hideModal.call(this) } } @@ -125,6 +132,7 @@ .trigger('hidden') backdrop.call(this) + var previousModal = openedModals[openedModals.length - 1]; previousModal && previousModal.addClass('focused'); } function backdrop(callback) { @@ -134,7 +142,7 @@ if (this.isShown && this.options.backdrop) { var doAnimate = $.support.transition && animate - this.$backdrop = $('