# HG changeset patch # User Thierry Florac # Date 1475143923 -7200 # Node ID 8d81f90f1d08acd72343e562c4209cbc1bf20206 # Parent abe4697a1d0e872da976759a47157a4c23599f1d Added check on modals to allow hidden overflow diff -r abe4697a1d0e -r 8d81f90f1d08 src/ztfy/myams/resources/js/ext/bootstrap-modal.js --- a/src/ztfy/myams/resources/js/ext/bootstrap-modal.js Thu Sep 01 15:18:16 2016 +0200 +++ b/src/ztfy/myams/resources/js/ext/bootstrap-modal.js Thu Sep 29 12:12:03 2016 +0200 @@ -136,8 +136,10 @@ if (value) { var body = this.$element.find(this.options.overflow); - body.style('overflow', 'auto', 'important') - .style(prop, (typeof(value) == 'function' ? value() : value) + 'px', 'important'); + if (body.css('overflow') === undefined) { + body.style('overflow', 'auto', 'important'); + } + body.style(prop, (typeof(value) == 'function' ? value() : value) + 'px', 'important'); } var modalOverflow = $(window).height() - 10 < this.$element.height(); diff -r abe4697a1d0e -r 8d81f90f1d08 src/ztfy/myams/resources/js/ext/bootstrap-modal.min.js --- a/src/ztfy/myams/resources/js/ext/bootstrap-modal.min.js Thu Sep 01 15:18:16 2016 +0200 +++ b/src/ztfy/myams/resources/js/ext/bootstrap-modal.min.js Thu Sep 29 12:12:03 2016 +0200 @@ -1,1 +1,1 @@ -!function(b){var a=function(d,c){this.init(d,c)};a.prototype={constructor:a,init:function(e,c){var f=this;this.options=c;this.$element=b(e).delegate('[data-dismiss="modal"]',"click.dismiss.modal",b.proxy(this.hide,this));this.options.remote&&this.$element.find(".modal-body").load(this.options.remote,function(){var g=b.Event("loaded");f.$element.trigger(g)});var d=typeof this.options.manager==="function"?this.options.manager.call(this):this.options.manager;d=d.appendModal?d:b(d).modalmanager().data("modalmanager");d.appendModal(this)},toggle:function(){return this[!this.isShown?"show":"hide"]()},show:function(){var c=b.Event("show");if(this.isShown){return}this.$element.trigger(c);if(c.isDefaultPrevented()){return}this.escape();this.tab();this.options.loading&&this.loading()},hide:function(c){c&&c.preventDefault();c=b.Event("hide");this.$element.trigger(c);if(!this.isShown||c.isDefaultPrevented()){return(this.isShown=false)}this.isShown=false;this.escape();this.tab();this.isLoading&&this.loading();b(document).off("focusin.modal");this.$element.removeClass("in").removeClass("animated").removeClass(this.options.attentionAnimation).removeClass("modal-overflow").attr("aria-hidden",true);b.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},layout:function(){var g=this.options.height?"height":"max-height",e=this.options.height||this.options.maxHeight;if(this.options.width){this.$element.css("width",this.options.width);var d=this;this.$element.css("margin-left",function(){if(/%/ig.test(d.options.width)){return -(parseInt(d.options.width)/2)+"%"}else{return -(b(this).width()/2)+"px"}})}else{this.$element.css("width","");this.$element.css("margin-left","")}this.$element.find(this.options.overflow).css("overflow","").css(g,"");if(e){var c=this.$element.find(this.options.overflow);c.style("overflow","auto","important").style(g,(typeof(e)=="function"?e():e)+"px","important")}var f=b(window).height()-10').append(this.options.spinner).appendTo(this.$element);if(c){this.$loading[0].offsetWidth}this.$loading.addClass("in");this.isLoading=true;c?this.$loading.one(b.support.transition.end,f):f()}else{if(this.isLoading&&this.$loading){this.$loading.removeClass("in");var e=this;b.support.transition&&this.$element.hasClass("fade")?this.$loading.one(b.support.transition.end,function(){e.removeLoading()}):e.removeLoading()}else{if(f){f(this.isLoading)}}}},focus:function(){var c=this.$element.find(this.options.focusOn);c=c.length?c:this.$element;c.focus()},attention:function(){if(this.options.attentionAnimation){this.$element.removeClass("animated").removeClass(this.options.attentionAnimation);var c=this;setTimeout(function(){c.$element.addClass("animated").addClass(c.options.attentionAnimation)},0)}this.focus()},destroy:function(){var c=b.Event("destroy");this.$element.trigger(c);if(c.isDefaultPrevented()){return}this.$element.off(".modal").removeData("modal").removeClass("in").attr("aria-hidden",true);if(this.$parent!==this.$element.parent()){this.$element.appendTo(this.$parent)}else{if(!this.$parent.length){this.$element.remove();this.$element=null}}this.$element.trigger("destroyed")}};b.fn.modal=function(d,c){return this.each(function(){var g=b(this),f=g.data("modal"),e=b.extend({},b.fn.modal.defaults,g.data(),typeof d=="object"&&d);if(!f){g.data("modal",(f=new a(this,e)))}if(typeof d=="string"){f[d].apply(f,[].concat(c))}else{if(e.show){f.show()}}})};b.fn.modal.defaults={keyboard:true,backdrop:true,loading:false,show:true,width:null,height:null,maxHeight:null,modalOverflow:false,consumeTab:true,focusOn:null,replace:false,resize:false,overflow:".modal-body",attentionAnimation:"shake",manager:"body",spinner:'
',backdropTemplate:'