Erreur de syntaxe...
authorThierry Florac <thierry.florac@onf.fr>
Tue, 20 Dec 2016 14:18:35 +0100
changeset 176 308f11404e60
parent 175 16c3f89f1a3a
child 177 e9c68061c1e3
Erreur de syntaxe...
src/pyams_skin/resources/js/ext/bootstrap-modal.js
src/pyams_skin/resources/js/ext/bootstrap-modal.min.js
--- a/src/pyams_skin/resources/js/ext/bootstrap-modal.js	Fri Dec 09 11:51:01 2016 +0100
+++ b/src/pyams_skin/resources/js/ext/bootstrap-modal.js	Tue Dec 20 14:18:35 2016 +0100
@@ -139,7 +139,7 @@
 				if (body.css('overflow') === undefined) {
 					body.style('overflow', 'auto', 'important');
 				}
-				body.style(prop, (typeof(value) == 'function' ? value() : value) + 'px', 'important');
+				body.style(prop, (typeof(value) === 'function' ? value() : value) + 'px', 'important');
 			}
 
 			var modalOverflow = $(window).height() - 10 < this.$element.height();
--- a/src/pyams_skin/resources/js/ext/bootstrap-modal.min.js	Fri Dec 09 11:51:01 2016 +0100
+++ b/src/pyams_skin/resources/js/ext/bootstrap-modal.min.js	Tue Dec 20 14:18:35 2016 +0100
@@ -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);if(c.css("overflow")===undefined){c.style("overflow","auto","important")}c.style(g,(typeof(e)=="function"?e():e)+"px","important")}var f=b(window).height()-10<this.$element.height();this.$element.css("margin-top",0).addClass("modal-overflow")},tab:function(){var c=this;if(this.isShown&&this.options.consumeTab){this.$element.on("keydown.tabindex.modal","[data-tabindex]",function(h){if(h.keyCode&&h.keyCode==9){var g=[],f=Number(b(this).data("tabindex"));c.$element.find("[data-tabindex]:enabled:visible:not([readonly])").each(function(e){g.push(Number(b(this).data("tabindex")))});g.sort(function(i,e){return i-e});var d=b.inArray(f,g);if(!h.shiftKey){d<g.length-1?c.$element.find("[data-tabindex="+g[d+1]+"]").focus():c.$element.find("[data-tabindex="+g[0]+"]").focus()}else{d==0?c.$element.find("[data-tabindex="+g[g.length-1]+"]").focus():c.$element.find("[data-tabindex="+g[d-1]+"]").focus()}h.preventDefault()}})}else{if(!this.isShown){this.$element.off("keydown.tabindex.modal")}}},escape:function(){var c=this;if(this.isShown&&this.options.keyboard){if(!this.$element.attr("tabindex")){this.$element.attr("tabindex",-1)}this.$element.on("keyup.dismiss.modal",function(d){d.which==27&&c.hide()})}else{if(!this.isShown){this.$element.off("keyup.dismiss.modal")}}},hideWithTransition:function(){var c=this,d=setTimeout(function(){c.$element.off(b.support.transition.end);c.hideModal()},500);this.$element.one(b.support.transition.end,function(){clearTimeout(d);c.hideModal()})},hideModal:function(){var d=this.options.height?"height":"max-height";var c=this.options.height||this.options.maxHeight;if(c){this.$element.find(this.options.overflow).css("overflow","").css(d,"")}this.$element.hide().trigger("hidden")},removeLoading:function(){this.$loading.remove();this.$loading=null;this.isLoading=false},loading:function(f){f=f||function(){};var d=this.$element.hasClass("fade")?"fade":"";if(!this.isLoading){var c=b.support.transition&&d;this.$loading=b('<div class="loading-mask '+d+'">').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:'<div class="loading-spinner" style="width: 200px; margin-left: -100px;"><div class="progress progress-striped active"><div class="bar" style="width: 100%;"></div></div></div>',backdropTemplate:'<div class="modal-backdrop" />'};b.fn.modal.Constructor=a;b(function(){b(document).off("click.modal").on("click.modal.data-api",'[data-toggle="modal"]',function(h){var g=b(this),d=g.attr("href"),c=b(g.attr("data-target")||(d&&d.replace(/.*(?=#[^\s]+$)/,""))),f=c.data("modal")?"toggle":b.extend({remote:!/#/.test(d)&&d},c.data(),g.data());h.preventDefault();c.modal(f).one("hide",function(){g.focus()})})})}(window.jQuery);
\ No newline at end of file
+!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);if(c.css("overflow")===undefined){c.style("overflow","auto","important")}c.style(g,(typeof(e)==="function"?e():e)+"px","important")}var f=b(window).height()-10<this.$element.height();this.$element.css("margin-top",0).addClass("modal-overflow")},tab:function(){var c=this;if(this.isShown&&this.options.consumeTab){this.$element.on("keydown.tabindex.modal","[data-tabindex]",function(h){if(h.keyCode&&h.keyCode==9){var g=[],f=Number(b(this).data("tabindex"));c.$element.find("[data-tabindex]:enabled:visible:not([readonly])").each(function(e){g.push(Number(b(this).data("tabindex")))});g.sort(function(i,e){return i-e});var d=b.inArray(f,g);if(!h.shiftKey){d<g.length-1?c.$element.find("[data-tabindex="+g[d+1]+"]").focus():c.$element.find("[data-tabindex="+g[0]+"]").focus()}else{d==0?c.$element.find("[data-tabindex="+g[g.length-1]+"]").focus():c.$element.find("[data-tabindex="+g[d-1]+"]").focus()}h.preventDefault()}})}else{if(!this.isShown){this.$element.off("keydown.tabindex.modal")}}},escape:function(){var c=this;if(this.isShown&&this.options.keyboard){if(!this.$element.attr("tabindex")){this.$element.attr("tabindex",-1)}this.$element.on("keyup.dismiss.modal",function(d){d.which==27&&c.hide()})}else{if(!this.isShown){this.$element.off("keyup.dismiss.modal")}}},hideWithTransition:function(){var c=this,d=setTimeout(function(){c.$element.off(b.support.transition.end);c.hideModal()},500);this.$element.one(b.support.transition.end,function(){clearTimeout(d);c.hideModal()})},hideModal:function(){var d=this.options.height?"height":"max-height";var c=this.options.height||this.options.maxHeight;if(c){this.$element.find(this.options.overflow).css("overflow","").css(d,"")}this.$element.hide().trigger("hidden")},removeLoading:function(){this.$loading.remove();this.$loading=null;this.isLoading=false},loading:function(f){f=f||function(){};var d=this.$element.hasClass("fade")?"fade":"";if(!this.isLoading){var c=b.support.transition&&d;this.$loading=b('<div class="loading-mask '+d+'">').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:'<div class="loading-spinner" style="width: 200px; margin-left: -100px;"><div class="progress progress-striped active"><div class="bar" style="width: 100%;"></div></div></div>',backdropTemplate:'<div class="modal-backdrop" />'};b.fn.modal.Constructor=a;b(function(){b(document).off("click.modal").on("click.modal.data-api",'[data-toggle="modal"]',function(h){var g=b(this),d=g.attr("href"),c=b(g.attr("data-target")||(d&&d.replace(/.*(?=#[^\s]+$)/,""))),f=c.data("modal")?"toggle":b.extend({remote:!/#/.test(d)&&d},c.data(),g.data());h.preventDefault();c.modal(f).one("hide",function(){g.focus()})})})}(window.jQuery);
\ No newline at end of file