From b51811ac73b284b43e108475316ee1a21ad2d6d3 Mon Sep 17 00:00:00 2001 From: thednp Date: Sun, 19 Feb 2017 20:47:07 +0200 Subject: [PATCH] Changes: * fixed issue Tooltip and Popover container option * demo fixes and updates --- README.md | 12 ++--- assets/css/theme.css | 55 +++-------------------- dist/bootstrap-native-v4.js | 10 +++-- dist/bootstrap-native-v4.min.js | 2 +- dist/bootstrap-native.js | 12 +++-- dist/bootstrap-native.min.js | 2 +- index.html | 80 ++++++++++++++++----------------- lib/V3/popover-native.js | 6 ++- lib/V3/tooltip-native.js | 4 +- lib/V3/utils.js | 2 +- lib/V4/popover-native.js | 4 +- lib/V4/tooltip-native.js | 4 +- lib/V4/utils.js | 2 +- v4.html | 21 ++++++--- 14 files changed, 96 insertions(+), 120 deletions(-) diff --git a/README.md b/README.md index 29fce410..97b1da5d 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,8 @@ $ bower install --save bootstrap.native ```html - - + + @@ -35,8 +35,8 @@ $ bower install --save bootstrap.native ```html - - + + @@ -66,8 +66,8 @@ The components are developed with clean code mainly for modern browsers that nat ```html - - + + diff --git a/assets/css/theme.css b/assets/css/theme.css index c8fcd4e2..065e5cfe 100644 --- a/assets/css/theme.css +++ b/assets/css/theme.css @@ -25,10 +25,6 @@ h3:not(.popover-title) { font-weight: bold; letter-spacing: -2px; } -.navbar-brand { - font-weight: bold; - letter-spacing: -1px; -} hr.clearfix {clear: both; width: 100%; float: left} @@ -110,38 +106,13 @@ p .btn, p .form-control {margin-bottom: 20px; vertical-align: top} /* CUSTOMIZE THE NAVBAR -------------------------------------------------- */ -/* Special class on .container surrounding .navbar, used for positioning it into place. */ -.navbar-wrapper { - position: absolute; - top: 0; - right: 0; - left: 0; - z-index: 20; -} - -.navbar-default .navbar-brand { color: #286090 } +.navbar-inverse .navbar-brand { color: #fff } .navbar-nav .open .dropdown-menu { left: auto; right:0 } -.navbar-default .navbar-nav>li>a:focus, -.navbar-default .navbar-nav>li>a:hover, -.navbar-inverse .navbar-nav>.active>a, -.navbar-inverse .navbar-nav>.active>a:focus, -.navbar-inverse .navbar-nav>.active>a:hover { background-color: #286090; color: #fff } +.navbar-collapse.collapsing {overflow-y: hidden} - -/* Flip around the padding for proper display in narrow viewports */ -.navbar-wrapper .container { - padding-right: 0; - padding-left: 0; -} -.navbar-wrapper .navbar { - padding-right: 15px; - padding-left: 15px; -} - -.navbar-default {border:0; background:#fff} -.navbar-nav { float: none} +.navbar-nav { float: none } /* CUSTOMIZE THE CAROUSEL @@ -252,7 +223,9 @@ p .btn, p .form-control {margin-bottom: 20px; vertical-align: top} #side-nav > .nav li.active.list11.additional > ul { height: 506px; height: calc(32px*11 + 2px*10 + 32px*5 + 2px*4); } #side-nav > .nav li > a { z-index: 1; padding: 6px 10px; } -#side-nav > .nav li > ul { z-index: 0 } +#side-nav > .nav li > ul { z-index: 0 } + +.tooltip b, .tooltip strong {color: #fff} /* RESPONSIVE CSS -------------------------------------------------- */ @@ -272,22 +245,6 @@ p .btn, p .form-control {margin-bottom: 20px; vertical-align: top} #side-nav .nav.affix-bottom { top: auto; bottom: 100px } /* Navbar positioning foo */ - .navbar-wrapper { - margin-top: 40px; - } - .navbar-wrapper .container { - padding-right: 15px; - padding-left: 15px; - } - .navbar-wrapper .navbar { - padding-right: 0; - padding-left: 0; - } - - /* The navbar becomes detached from the top, so we round the corners */ - .navbar-wrapper .navbar { - border-radius: 4px; - } .navbar .navbar-nav {margin-right: 15px; float: right} diff --git a/dist/bootstrap-native-v4.js b/dist/bootstrap-native-v4.js index cb180e0c..17721972 100644 --- a/dist/bootstrap-native-v4.js +++ b/dist/bootstrap-native-v4.js @@ -163,7 +163,7 @@ // source http://gomakethings.com/climbing-up-and-down-the-dom-tree-with-vanilla-javascript/ var firstChar = selector.charAt(0); for ( ; element && element !== document; element = element[parentNode] ) {// Get closest match - if ( firstChar === '.') {// If selector is a class + if ( firstChar === '.' ) {// If selector is a class if ( queryElement(selector,element[parentNode]) !== null && hasClass(element,selector.replace('.','')) ) { return element; } } else if ( firstChar === '#' ) { // If selector is an ID if ( element.id === selector.substr(1) ) { return element; } @@ -1118,7 +1118,9 @@ this[placement] = options[placement] ? options[placement] : placementData || top; this[delay] = parseInt(options[delay] || delayData) || 200; this[dismissible] = options[dismissible] || dismissibleData === 'true' ? true : false; - this[container] = queryElement(options[container]) || queryElement(containerData) || modal ? modal : body; + this[container] = queryElement(options[container]) ? queryElement(options[container]) + : queryElement(containerData) ? queryElement(containerData) + : modal ? modal : body; // bind, content var self = this, @@ -1501,7 +1503,9 @@ this[animation] = options[animation] && options[animation] !== fade ? options[animation] : animationData || fade; this[placement] = options[placement] ? options[placement] : placementData || top; this[delay] = parseInt(options[delay] || delayData) || 200; - this[container] = queryElement(options[container]) || queryElement(containerData) || modal ? modal : body; + this[container] = queryElement(options[container]) ? queryElement(options[container]) + : queryElement(containerData) ? queryElement(containerData) + : modal ? modal : body; // bind, event targets, title and constants var self = this, timer = 0, placementSetting = this[placement], tooltip = null, diff --git a/dist/bootstrap-native-v4.min.js b/dist/bootstrap-native-v4.min.js index 9e3cb4c9..745286bb 100644 --- a/dist/bootstrap-native-v4.min.js +++ b/dist/bootstrap-native-v4.min.js @@ -1,2 +1,2 @@ // Native Javascript for Bootstrap 4 v2.0.6 | © dnp_theme | MIT-License -!function(t,e){if("function"==typeof define&&define.amd)define([],e);else if("object"==typeof module&&module.exports)module.exports=e();else{var n=e();t.Alert=n.Alert,t.Button=n.Button,t.Carousel=n.Carousel,t.Collapse=n.Collapse,t.Dropdown=n.Dropdown,t.Modal=n.Modal,t.Popover=n.Popover,t.ScrollSpy=n.ScrollSpy,t.Tab=n.Tab,t.Tooltip=n.Tooltip}}(this,function(){var t="undefined"!=typeof global?global:this||window,e=document.documentElement,n=document.body,i="data-toggle",o="data-dismiss",a="data-spy",l="data-ride",r="Alert",c="Button",u="Carousel",s="Collapse",f="Dropdown",d="Modal",h="Popover",p="ScrollSpy",m="Tab",v="Tooltip",g="data-backdrop",T="data-keyboard",b="data-target",y="data-interval",x="data-height",w="data-pause",C="data-original-title",I="data-dismissible",A="data-trigger",L="data-animation",D="data-container",E="data-placement",S="data-delay",k="backdrop",M="keyboard",B="delay",H="content",N="target",W="interval",P="pause",$="animation",j="placement",O="container",R="offsetTop",q="offsetLeft",z="scrollTop",U="scrollLeft",X="clientWidth",Y="clientHeight",F="offsetWidth",G="offsetHeight",J="innerWidth",K="innerHeight",Q="scrollHeight",V="height",Z="aria-expanded",_="aria-hidden",tt="click",et="hover",nt="keydown",it="resize",ot="scroll",at="show",lt="shown",rt="hide",ct="hidden",ut="close",st="closed",ft="slid",dt="slide",ht="change",pt="getAttribute",mt="setAttribute",vt="hasAttribute",gt="getElementsByTagName",Tt="getBoundingClientRect",bt="getElementsByClassName",yt="indexOf",xt="parentNode",wt="length",Ct="toLowerCase",It="Transition",At="Webkit",Lt="style",Dt="active",Et="show",St="collapsing",kt="left",Mt="right",Bt="top",Ht="bottom",Nt="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],Wt=/\b(top|bottom|left|top)+/,Pt=At+It in e[Lt]||It[Ct]()in e[Lt],$t=At+It in e[Lt]?At[Ct]()+It+"End":It[Ct]()+"end",jt=function(t){t.focus?t.focus():t.setActive()},Ot=function(t,e){t.classList.add(e)},Rt=function(t,e){t.classList.remove(e)},qt=function(t,e){return t.classList.contains(e)},zt=function(t,e){return[].slice.call(t[bt](e))},Ut=function(t,e){var n=e?e:document;return"object"==typeof t?t:n.querySelector(t)},Xt=function(t,e){for(var n=e.charAt(0);t&&t!==document;t=t[xt])if("."===n){if(null!==Ut(e,t[xt])&&qt(t,e.replace(".","")))return t}else if("#"===n&&t.id===e.substr(1))return t;return!1},Yt=function(t,e,n){t.addEventListener(e,n,!1)},Ft=function(t,e,n){t.removeEventListener(e,n,!1)},Gt=function(t,e,n){Yt(t,e,function i(o){n(o),Ft(t,e,i)})},Jt=function(t,e){Pt?Gt(t,$t,function(t){e(t)}):e()},Kt=function(t,e,n){var i=new CustomEvent(t+".bs."+e);i.relatedTarget=n,this.dispatchEvent(i)},Qt=document[gt]("*"),Vt=function(t,e,n,i){for(var o=i&&i[wt]?i:Qt,a=0;a-1||l===r)&&new e(o[a])}},Zt=/^\#(.)+$/,_t=function(e){var n=e&&t.getComputedStyle(e),i=/px/.test(n.borderTopWidth)?Math.round(n.borderTopWidth.replace("px","")):0,o=/px/.test(n.borderBottomWidth)?Math.round(n.borderBottomWidth.replace("px","")):0,a=/px/.test(n.marginTop)?Math.round(n.marginTop.replace("px","")):0,l=/px/.test(n.marginBottom)?Math.round(n.marginBottom.replace("px","")):0;return e[Y]+parseInt(i)+parseInt(o)+parseInt(a)+parseInt(l)},te=function(t){for(var e=0,n=0,i=t.children[wt];n=0&&i[kt]>=0&&i[Ht]<=(t[K]||e[Y])&&i[Mt]<=(t[J]||e[X])},ne=function(){return{y:t.pageYOffset||e[z],x:t.pageXOffset||e[U]}},ie=function(t,e,i,o){var a=t[Tt](),l=o===n?ne():{x:o[q]+o[U],y:o[R]+o[z]},r={w:a[Mt]-a[kt],h:a[Ht]-a[Bt]},c={w:e[F],h:e[G]};i===Bt?(e[Lt][Bt]=a[Bt]+l.y-c.h+"px",e[Lt][kt]=a[kt]+l.x-c.w/2+r.w/2+"px"):i===Ht?(e[Lt][Bt]=a[Bt]+l.y+r.h+"px",e[Lt][kt]=a[kt]+l.x-c.w/2+r.w/2+"px"):i===kt?(e[Lt][Bt]=a[Bt]+l.y-c.h/2+r.h/2+"px",e[Lt][kt]=a[kt]+l.x-c.w+"px"):i===Mt&&(e[Lt][Bt]=a[Bt]+l.y-c.h/2+r.h/2+"px",e[Lt][kt]=a[kt]+l.x+r.w+"px"),e.className[yt](i)===-1&&(e.className=e.className.replace(Wt,i))},oe=function(t){return t===Bt?Ht:t===Ht?Bt:t===kt?Mt:t===Mt?kt:t},ae=function(t){t=Ut(t);var e=this,n="alert",i=Xt(t,"."+n),a=function(a){var l=a[N];l=l[vt](o)?l:l[xt],l&&l[vt](o)&&(i=Xt(l,"."+n),t=Ut("["+o+'="'+n+'"]',i),(t===l||t===l[xt])&&i&&e.close())},l=function(){Kt.call(i,st,n),Ft(t,tt,a),i[xt].removeChild(i)};this.close=function(){i&&t&&qt(i,Et)&&(Kt.call(i,ut,n),Rt(i,Et),function(){i&&Jt(i,l)}())},r in t||Yt(t,tt,a),t[r]=this};Vt(r,ae,o);var le=function(t){t=Ut(t);var e=!1,n="button",i="checked",o="LABEL",a="INPUT",l=function(l){var r=l[N][xt],c=l[N].tagName===o?l[N]:r.tagName===o?r:null;if(c){var u=this,s=zt(u,"btn"),f=c[gt](a)[0];if(f){if("checkbox"===f.type&&(f[i]?(Rt(c,Dt),f[pt](i),f.removeAttribute(i),f[i]=!1):(Ot(c,Dt),f[pt](i),f[mt](i,i),f[i]=!0),e||(e=!0,Kt.call(f,ht,n),Kt.call(t,ht,n))),"radio"===f.type&&!e&&!f[i]){Ot(c,Dt),f[mt](i,i),f[i]=!0,Kt.call(f,ht,n),Kt.call(t,ht,n),e=!0;for(var d=0,h=s[wt];dh||n===g-1&&0===h)&&(b=d[c]=Mt),d.slideTo(h)}},S=function(t){if(t.preventDefault(),!m){var e=t.currentTarget||t.srcElement;e===C?(h++,b=d[c]=kt,h===g-1?h=g-1:h===g&&(h=0)):e===x&&(h--,b=d[c]=Mt,0===h?h=0:h<0&&(h=g-1)),d.slideTo(h)}},k=function(t){if(!m){switch(t.which){case 39:h++,b=d[c]=kt,h==g-1?h=g-1:h==g&&(h=0);break;case 37:h--,b=d[c]=Mt,0==h?h=0:h<0&&(h=g-1);break;default:return}d.slideTo(h)}},B=function(t){for(var e=0,n=A[wt];e-1)&&(n.persist||l))return;r=null,p()}(/\#$/.test(s.href)||s[xt]&&/\#$/.test(s[xt].href))&&e.preventDefault()},h=function(){Kt.call(a,at,l,r),Ot(a,Et),c[mt](Z,!0),Kt.call(a,lt,l,r),Yt(document,nt,s),o=!0},p=function(){Kt.call(a,rt,l,r),Rt(a,Et),c[mt](Z,!1),Kt.call(a,ct,l,r),Ft(document,nt,s),o=!1};this.toggle=function(){qt(a,Et)&&o?p():h()},f in t||(c[mt]("tabindex","0"),Yt(document,tt,d)),t[f]=this};Vt(f,ue,i);var se=function(i,a){i=Ut(i);var l=i[pt](b)||i[pt]("href"),r=Ut(l),c=qt(i,"modal")?i:r,u="modal",s="static",f="paddingLeft",h="paddingRight",p="modal-backdrop";if(qt(i,"modal")&&(i=null),c){a=a||{},this[M]=a[M]!==!1&&"false"!==c[pt](T),this[k]=a[k]!==s&&c[pt](g)!==s||s,this[k]=a[k]!==!1&&"false"!==c[pt](g)&&this[k],this[H]=a[H];var m,v,y,x,w=this,C=this.open=!1,I=null,A=zt(e,"fixed-top").concat(zt(e,"fixed-bottom")),L=function(){var n=e[Tt]();return t[J]||n[Mt]-Math.abs(n[kt])},D=function(){var e,i=t.getComputedStyle(n),o=parseInt(i[h],10);if(m&&(n[Lt][h]=o+y+"px",A[wt]))for(var a=0;ae[Y],y=S()},W=function(){c[Lt][f]=!m&&v?y+"px":"",c[Lt][h]=m&&!v?y+"px":""},P=function(){c[Lt][f]="",c[Lt][h]=""},$=function(){var t=document.createElement("div");x=Ut("."+p),null===x&&(t[mt]("class",p+" fade"),x=t,n.appendChild(x))},j=function(){x=Ut("."+p),x&&null!==x&&"object"==typeof x&&(n.removeChild(x),x=null)},O=function(){qt(c,Et)?Ft(document,nt,U):Yt(document,nt,U)},R=function(){qt(c,Et)?Ft(t,it,w.update):Yt(t,it,w.update)},q=function(){qt(c,Et)?Ft(c,tt,G):Yt(c,tt,G)},z=function(t){var e=t[N];e=e[vt](b)||e[vt]("href")?e:e[xt],C||e!==i||qt(c,Et)||(c.modalTrigger=i,I=i,w.show(),t.preventDefault())},U=function(t){var e=t.which||t.keyCode;w[M]&&27==e&&C&&w.hide()},G=function(t){var e=t[N];C&&(e[xt][pt](o)===u||e[pt](o)===u||e===c&&w[k]!==s)&&(w.hide(),I=null,t.preventDefault())};this.toggle=function(){C&&qt(c,Et)?this.hide():this.show()},this.show=function(){Kt.call(c,at,u,I);var t=zt(document,u+" "+Et)[0];t&&t!==c&&t.modalTrigger[d].hide(),this[k]&&$(),x&&!qt(x,Et)&&setTimeout(function(){Ot(x,Et)},0),setTimeout(function(){c[Lt].display="block",B(),D(),W(),R(),q(),O(),Ot(n,u+"-open"),Ot(c,Et),c[mt](_,!1),Jt(c,function(){C=w.open=!0,jt(c),Kt.call(c,lt,u,I)})},Pt?150:0)},this.hide=function(){Kt.call(c,rt,u),x=Ut("."+p),Rt(c,Et),c[mt](_,!0),!!x&&Rt(x,Et),setTimeout(function(){Jt(c,function(){R(),q(),O(),c[Lt].display="",C=w.open=!1,i&&jt(i),Kt.call(c,ct,u),setTimeout(function(){zt(document,u+" "+Et)[0]||(P(),E(),Rt(n,u+"-open"),j())},100)})},Pt?150:0)},this.setContent=function(t){Ut("."+u+"-content",c).innerHTML=t},this.update=function(){C&&(B(),D(),W())},!i||d in i||Yt(i,tt,z),this[H]&&this.setContent(this[H]),!!i&&(i[d]=this)}};Vt(d,se,i);var fe=function(e,i){e=Ut(e);var o=e[pt](A),a=e[pt](L),l=e[pt](E),r=e[pt](I),c=e[pt](S),u=e[pt](D),s="popover",f="template",d="trigger",p="class",m="div",v="fade",g="data-title",T="data-content",b="dismissible",y='',x=Xt(e,".modal");i=i||{},this[f]=i[f]?i[f]:null,this[d]=i[d]?i[d]:o||et,this[$]=i[$]&&i[$]!==v?i[$]:a||v,this[j]=i[j]?i[j]:l||Bt,this[B]=parseInt(i[B]||c)||200,this[b]=!(!i[b]&&"true"!==r),this[O]=Ut(i[O])||Ut(u)||x?x:n;var w=this,C=e[pt](g)||null,k=e[pt](T)||null;if(k||this[f]){var M=null,H=0,W=this[j],P=function(t){null!==M&&t[N]===Ut(".close",M)&&w.hide()},R=function(){w[O].removeChild(M),H=null,M=null},q=function(){if(C=e[pt](g),k=e[pt](T),M=document.createElement(m),null!==k&&null===w[f]){if(M[mt]("role","tooltip"),null!==C){var t=document.createElement("h3");t[mt](p,s+"-title"),t.innerHTML=w[b]?C+y:C,M.appendChild(t)}var n=document.createElement(m);n[mt](p,s+"-content"),n.innerHTML=w[b]&&null===C?k+y:k,M.appendChild(n)}else{var i=document.createElement(m);i.innerHTML=w[f],M.innerHTML=i.firstChild.innerHTML}w[O].appendChild(M),M[Lt].display="block",M[mt](p,s+" "+s+"-"+W+" "+w[$])},z=function(){!qt(M,Et)&&Ot(M,Et)},U=function(){ie(e,M,W,w[O]),ee(M)||(W=oe(W),ie(e,M,W,w[O]))};this.toggle=function(){null===M?w.show():w.hide()},this.show=function(){clearTimeout(H),H=setTimeout(function(){null===M&&(W=w[j],q(),U(),z(),Kt.call(e,at,s),Jt(M,function(){Kt.call(e,lt,s)}))},20)},this.hide=function(){clearTimeout(H),H=setTimeout(function(){M&&null!==M&&qt(M,Et)&&(Kt.call(e,rt,s),Rt(M,Et),Jt(M,function(){R(),Kt.call(e,ct,s)}))},w[B])},h in e||(w[d]===et?(Yt(e,Nt[0],w.show),w[b]||Yt(e,Nt[1],w.hide)):/^(click|focus)$/.test(w[d])&&(Yt(e,w[d],w.toggle),w[b]||Yt(e,"blur",w.hide)),w[b]&&Yt(document,tt,P),Yt(t,it,w.hide)),e[h]=w}};Vt(h,fe,i);var de=function(e,n){e=Ut(e);var i=Ut(e[pt](b));if(n=n||{},n[N]||i){for(var o,a=n[N]&&Ut(n[N])||i,l=a&&a[gt]("A"),r=[],c=[],u=e[G]=d&&h>o;if(!f&&p)qt(n,Dt)||(Ot(n,Dt),f=!0,l&&!qt(l,Dt)&&Ot(l,Dt),Kt.call(e,"activate","scrollspy",r[t]));else if(p){if(!p&&!f||f&&p)return}else qt(n,Dt)&&(Rt(n,Dt),f=!1,l&&qt(l,Dt)&&!zt(n[xt],Dt).length&&Rt(l,Dt))},g=function(){o=s?ne().y:e[z];for(var t=0,n=r[wt];t1&&(t=e[e[wt]-1]):t=e[0],t},h=function(){return Ut(d()[pt]("href"))},p=function(t){t.preventDefault(),r=t[N][pt](i)===o||Zt.test(t[N][pt]("href"))?t[N]:t[N][xt],u.show()};this.show=function(){var e=Ut(r[pt]("href")),n=d(),i=h();n[l]&&r[l]||qt(r,Dt)||(n[l]=r[l]=!0,Rt(n,Dt),Ot(r,Dt),f&&(qt(t[xt],"dropdown-menu")?qt(f,Dt)||Ot(f,Dt):qt(f,Dt)&&Rt(f,Dt)),c&&(c[Lt][a]=te(i)+"px"),function(){Rt(i,Et),Kt.call(n,rt,o,r),function(){Jt(i,function(){Rt(i,Dt),Ot(e,Dt),setTimeout(function(){Ot(e,Et),e[G],c&&Ot(c,St),function(){Kt.call(r,at,o,n),function(){c&&(c[Lt][a]=te(e)+"px"),Kt.call(n,ct,o,r)}()}()},20)})}()}(),function(){Jt(e,function(){Kt.call(r,lt,o,n),c?!function(){Jt(c,function(){setTimeout(function(){c[Lt][a]="",Rt(c,St),n[l]=r[l]=!1},200)})}():n[l]=r[l]=!1})}())},m in t||Yt(t,tt,p),this[a]&&(c=h()[xt]),t[m]=this};Vt(m,he,i);var pe=function(t,e){t=Ut(t);var i=t[pt](L);placementData=t[pt](E),delayData=t[pt](S),containerData=t[pt](D),component="tooltip",classString="class",title="title",fade="fade",div="div",modal=Xt(t,".modal"),e=e||{},this[$]=e[$]&&e[$]!==fade?e[$]:i||fade,this[j]=e[j]?e[j]:placementData||Bt,this[B]=parseInt(e[B]||delayData)||200,this[O]=Ut(e[O])||Ut(containerData)||modal?modal:n;var o=this,a=0,l=this[j],r=null,c=t[pt](title)||t[pt](C);if(c){var u=function(){o[O].removeChild(r),r=null,a=null},s=function(){c=t[pt](title)||t[pt](C),r=document.createElement(div),r[mt]("role",component);var e=document.createElement(div);e[mt](classString,component+"-inner"),r.appendChild(e),e.innerHTML=c,o[O].appendChild(r),r[mt](classString,component+" "+component+"-"+l+" "+o[$])},f=function(){ie(t,r,l,o[O]),ee(r)||(l=oe(l),ie(t,r,l,o[O]))},d=function(){!qt(r,Et)&&Ot(r,Et)};this.show=function(){clearTimeout(a),a=setTimeout(function(){null===r&&(l=o[j],s(),f(),d(),Kt.call(t,at,component),Jt(r,function(){Kt.call(t,lt,component)}))},20)},this.hide=function(){clearTimeout(a),a=setTimeout(function(){r&&null!==r&&qt(r,Et)&&(Kt.call(t,rt,component),Rt(r,Et),Jt(r,function(){u(),Kt.call(t,ct,component)}))},o[B])},this.toggle=function(){r?o.hide():o.show()},v in t||(t[mt](C,c),t.removeAttribute(title),Yt(t,Nt[0],this.show),Yt(t,Nt[1],this.hide)),t[v]=this}};return Vt(v,pe,i),{Alert:ae,Button:le,Carousel:re,Collapse:ce,Dropdown:ue,Modal:se,Popover:fe,ScrollSpy:de,Tab:he,Tooltip:pe}}); +!function(t,e){if("function"==typeof define&&define.amd)define([],e);else if("object"==typeof module&&module.exports)module.exports=e();else{var n=e();t.Alert=n.Alert,t.Button=n.Button,t.Carousel=n.Carousel,t.Collapse=n.Collapse,t.Dropdown=n.Dropdown,t.Modal=n.Modal,t.Popover=n.Popover,t.ScrollSpy=n.ScrollSpy,t.Tab=n.Tab,t.Tooltip=n.Tooltip}}(this,function(){var t="undefined"!=typeof global?global:this||window,e=document.documentElement,n=document.body,i="data-toggle",o="data-dismiss",a="data-spy",l="data-ride",r="Alert",c="Button",u="Carousel",s="Collapse",f="Dropdown",d="Modal",h="Popover",p="ScrollSpy",m="Tab",v="Tooltip",g="data-backdrop",T="data-keyboard",b="data-target",y="data-interval",x="data-height",w="data-pause",C="data-original-title",I="data-dismissible",A="data-trigger",L="data-animation",D="data-container",E="data-placement",S="data-delay",k="backdrop",M="keyboard",B="delay",H="content",N="target",W="interval",P="pause",$="animation",j="placement",O="container",R="offsetTop",q="offsetLeft",z="scrollTop",U="scrollLeft",X="clientWidth",Y="clientHeight",F="offsetWidth",G="offsetHeight",J="innerWidth",K="innerHeight",Q="scrollHeight",V="height",Z="aria-expanded",_="aria-hidden",tt="click",et="hover",nt="keydown",it="resize",ot="scroll",at="show",lt="shown",rt="hide",ct="hidden",ut="close",st="closed",ft="slid",dt="slide",ht="change",pt="getAttribute",mt="setAttribute",vt="hasAttribute",gt="getElementsByTagName",Tt="getBoundingClientRect",bt="getElementsByClassName",yt="indexOf",xt="parentNode",wt="length",Ct="toLowerCase",It="Transition",At="Webkit",Lt="style",Dt="active",Et="show",St="collapsing",kt="left",Mt="right",Bt="top",Ht="bottom",Nt="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],Wt=/\b(top|bottom|left|top)+/,Pt=At+It in e[Lt]||It[Ct]()in e[Lt],$t=At+It in e[Lt]?At[Ct]()+It+"End":It[Ct]()+"end",jt=function(t){t.focus?t.focus():t.setActive()},Ot=function(t,e){t.classList.add(e)},Rt=function(t,e){t.classList.remove(e)},qt=function(t,e){return t.classList.contains(e)},zt=function(t,e){return[].slice.call(t[bt](e))},Ut=function(t,e){var n=e?e:document;return"object"==typeof t?t:n.querySelector(t)},Xt=function(t,e){for(var n=e.charAt(0);t&&t!==document;t=t[xt])if("."===n){if(null!==Ut(e,t[xt])&&qt(t,e.replace(".","")))return t}else if("#"===n&&t.id===e.substr(1))return t;return!1},Yt=function(t,e,n){t.addEventListener(e,n,!1)},Ft=function(t,e,n){t.removeEventListener(e,n,!1)},Gt=function(t,e,n){Yt(t,e,function i(o){n(o),Ft(t,e,i)})},Jt=function(t,e){Pt?Gt(t,$t,function(t){e(t)}):e()},Kt=function(t,e,n){var i=new CustomEvent(t+".bs."+e);i.relatedTarget=n,this.dispatchEvent(i)},Qt=document[gt]("*"),Vt=function(t,e,n,i){for(var o=i&&i[wt]?i:Qt,a=0;a-1||l===r)&&new e(o[a])}},Zt=/^\#(.)+$/,_t=function(e){var n=e&&t.getComputedStyle(e),i=/px/.test(n.borderTopWidth)?Math.round(n.borderTopWidth.replace("px","")):0,o=/px/.test(n.borderBottomWidth)?Math.round(n.borderBottomWidth.replace("px","")):0,a=/px/.test(n.marginTop)?Math.round(n.marginTop.replace("px","")):0,l=/px/.test(n.marginBottom)?Math.round(n.marginBottom.replace("px","")):0;return e[Y]+parseInt(i)+parseInt(o)+parseInt(a)+parseInt(l)},te=function(t){for(var e=0,n=0,i=t.children[wt];n=0&&i[kt]>=0&&i[Ht]<=(t[K]||e[Y])&&i[Mt]<=(t[J]||e[X])},ne=function(){return{y:t.pageYOffset||e[z],x:t.pageXOffset||e[U]}},ie=function(t,e,i,o){var a=t[Tt](),l=o===n?ne():{x:o[q]+o[U],y:o[R]+o[z]},r={w:a[Mt]-a[kt],h:a[Ht]-a[Bt]},c={w:e[F],h:e[G]};i===Bt?(e[Lt][Bt]=a[Bt]+l.y-c.h+"px",e[Lt][kt]=a[kt]+l.x-c.w/2+r.w/2+"px"):i===Ht?(e[Lt][Bt]=a[Bt]+l.y+r.h+"px",e[Lt][kt]=a[kt]+l.x-c.w/2+r.w/2+"px"):i===kt?(e[Lt][Bt]=a[Bt]+l.y-c.h/2+r.h/2+"px",e[Lt][kt]=a[kt]+l.x-c.w+"px"):i===Mt&&(e[Lt][Bt]=a[Bt]+l.y-c.h/2+r.h/2+"px",e[Lt][kt]=a[kt]+l.x+r.w+"px"),e.className[yt](i)===-1&&(e.className=e.className.replace(Wt,i))},oe=function(t){return t===Bt?Ht:t===Ht?Bt:t===kt?Mt:t===Mt?kt:t},ae=function(t){t=Ut(t);var e=this,n="alert",i=Xt(t,"."+n),a=function(a){var l=a[N];l=l[vt](o)?l:l[xt],l&&l[vt](o)&&(i=Xt(l,"."+n),t=Ut("["+o+'="'+n+'"]',i),(t===l||t===l[xt])&&i&&e.close())},l=function(){Kt.call(i,st,n),Ft(t,tt,a),i[xt].removeChild(i)};this.close=function(){i&&t&&qt(i,Et)&&(Kt.call(i,ut,n),Rt(i,Et),function(){i&&Jt(i,l)}())},r in t||Yt(t,tt,a),t[r]=this};Vt(r,ae,o);var le=function(t){t=Ut(t);var e=!1,n="button",i="checked",o="LABEL",a="INPUT",l=function(l){var r=l[N][xt],c=l[N].tagName===o?l[N]:r.tagName===o?r:null;if(c){var u=this,s=zt(u,"btn"),f=c[gt](a)[0];if(f){if("checkbox"===f.type&&(f[i]?(Rt(c,Dt),f[pt](i),f.removeAttribute(i),f[i]=!1):(Ot(c,Dt),f[pt](i),f[mt](i,i),f[i]=!0),e||(e=!0,Kt.call(f,ht,n),Kt.call(t,ht,n))),"radio"===f.type&&!e&&!f[i]){Ot(c,Dt),f[mt](i,i),f[i]=!0,Kt.call(f,ht,n),Kt.call(t,ht,n),e=!0;for(var d=0,h=s[wt];dh||n===g-1&&0===h)&&(b=d[c]=Mt),d.slideTo(h)}},S=function(t){if(t.preventDefault(),!m){var e=t.currentTarget||t.srcElement;e===C?(h++,b=d[c]=kt,h===g-1?h=g-1:h===g&&(h=0)):e===x&&(h--,b=d[c]=Mt,0===h?h=0:h<0&&(h=g-1)),d.slideTo(h)}},k=function(t){if(!m){switch(t.which){case 39:h++,b=d[c]=kt,h==g-1?h=g-1:h==g&&(h=0);break;case 37:h--,b=d[c]=Mt,0==h?h=0:h<0&&(h=g-1);break;default:return}d.slideTo(h)}},B=function(t){for(var e=0,n=A[wt];e-1)&&(n.persist||l))return;r=null,p()}(/\#$/.test(s.href)||s[xt]&&/\#$/.test(s[xt].href))&&e.preventDefault()},h=function(){Kt.call(a,at,l,r),Ot(a,Et),c[mt](Z,!0),Kt.call(a,lt,l,r),Yt(document,nt,s),o=!0},p=function(){Kt.call(a,rt,l,r),Rt(a,Et),c[mt](Z,!1),Kt.call(a,ct,l,r),Ft(document,nt,s),o=!1};this.toggle=function(){qt(a,Et)&&o?p():h()},f in t||(c[mt]("tabindex","0"),Yt(document,tt,d)),t[f]=this};Vt(f,ue,i);var se=function(i,a){i=Ut(i);var l=i[pt](b)||i[pt]("href"),r=Ut(l),c=qt(i,"modal")?i:r,u="modal",s="static",f="paddingLeft",h="paddingRight",p="modal-backdrop";if(qt(i,"modal")&&(i=null),c){a=a||{},this[M]=a[M]!==!1&&"false"!==c[pt](T),this[k]=a[k]!==s&&c[pt](g)!==s||s,this[k]=a[k]!==!1&&"false"!==c[pt](g)&&this[k],this[H]=a[H];var m,v,y,x,w=this,C=this.open=!1,I=null,A=zt(e,"fixed-top").concat(zt(e,"fixed-bottom")),L=function(){var n=e[Tt]();return t[J]||n[Mt]-Math.abs(n[kt])},D=function(){var e,i=t.getComputedStyle(n),o=parseInt(i[h],10);if(m&&(n[Lt][h]=o+y+"px",A[wt]))for(var a=0;ae[Y],y=S()},W=function(){c[Lt][f]=!m&&v?y+"px":"",c[Lt][h]=m&&!v?y+"px":""},P=function(){c[Lt][f]="",c[Lt][h]=""},$=function(){var t=document.createElement("div");x=Ut("."+p),null===x&&(t[mt]("class",p+" fade"),x=t,n.appendChild(x))},j=function(){x=Ut("."+p),x&&null!==x&&"object"==typeof x&&(n.removeChild(x),x=null)},O=function(){qt(c,Et)?Ft(document,nt,U):Yt(document,nt,U)},R=function(){qt(c,Et)?Ft(t,it,w.update):Yt(t,it,w.update)},q=function(){qt(c,Et)?Ft(c,tt,G):Yt(c,tt,G)},z=function(t){var e=t[N];e=e[vt](b)||e[vt]("href")?e:e[xt],C||e!==i||qt(c,Et)||(c.modalTrigger=i,I=i,w.show(),t.preventDefault())},U=function(t){var e=t.which||t.keyCode;w[M]&&27==e&&C&&w.hide()},G=function(t){var e=t[N];C&&(e[xt][pt](o)===u||e[pt](o)===u||e===c&&w[k]!==s)&&(w.hide(),I=null,t.preventDefault())};this.toggle=function(){C&&qt(c,Et)?this.hide():this.show()},this.show=function(){Kt.call(c,at,u,I);var t=zt(document,u+" "+Et)[0];t&&t!==c&&t.modalTrigger[d].hide(),this[k]&&$(),x&&!qt(x,Et)&&setTimeout(function(){Ot(x,Et)},0),setTimeout(function(){c[Lt].display="block",B(),D(),W(),R(),q(),O(),Ot(n,u+"-open"),Ot(c,Et),c[mt](_,!1),Jt(c,function(){C=w.open=!0,jt(c),Kt.call(c,lt,u,I)})},Pt?150:0)},this.hide=function(){Kt.call(c,rt,u),x=Ut("."+p),Rt(c,Et),c[mt](_,!0),!!x&&Rt(x,Et),setTimeout(function(){Jt(c,function(){R(),q(),O(),c[Lt].display="",C=w.open=!1,i&&jt(i),Kt.call(c,ct,u),setTimeout(function(){zt(document,u+" "+Et)[0]||(P(),E(),Rt(n,u+"-open"),j())},100)})},Pt?150:0)},this.setContent=function(t){Ut("."+u+"-content",c).innerHTML=t},this.update=function(){C&&(B(),D(),W())},!i||d in i||Yt(i,tt,z),this[H]&&this.setContent(this[H]),!!i&&(i[d]=this)}};Vt(d,se,i);var fe=function(e,i){e=Ut(e);var o=e[pt](A),a=e[pt](L),l=e[pt](E),r=e[pt](I),c=e[pt](S),u=e[pt](D),s="popover",f="template",d="trigger",p="class",m="div",v="fade",g="data-title",T="data-content",b="dismissible",y='',x=Xt(e,".modal");i=i||{},this[f]=i[f]?i[f]:null,this[d]=i[d]?i[d]:o||et,this[$]=i[$]&&i[$]!==v?i[$]:a||v,this[j]=i[j]?i[j]:l||Bt,this[B]=parseInt(i[B]||c)||200,this[b]=!(!i[b]&&"true"!==r),this[O]=Ut(i[O])?Ut(i[O]):Ut(u)?Ut(u):x?x:n;var w=this,C=e[pt](g)||null,k=e[pt](T)||null;if(k||this[f]){var M=null,H=0,W=this[j],P=function(t){null!==M&&t[N]===Ut(".close",M)&&w.hide()},R=function(){w[O].removeChild(M),H=null,M=null},q=function(){if(C=e[pt](g),k=e[pt](T),M=document.createElement(m),null!==k&&null===w[f]){if(M[mt]("role","tooltip"),null!==C){var t=document.createElement("h3");t[mt](p,s+"-title"),t.innerHTML=w[b]?C+y:C,M.appendChild(t)}var n=document.createElement(m);n[mt](p,s+"-content"),n.innerHTML=w[b]&&null===C?k+y:k,M.appendChild(n)}else{var i=document.createElement(m);i.innerHTML=w[f],M.innerHTML=i.firstChild.innerHTML}w[O].appendChild(M),M[Lt].display="block",M[mt](p,s+" "+s+"-"+W+" "+w[$])},z=function(){!qt(M,Et)&&Ot(M,Et)},U=function(){ie(e,M,W,w[O]),ee(M)||(W=oe(W),ie(e,M,W,w[O]))};this.toggle=function(){null===M?w.show():w.hide()},this.show=function(){clearTimeout(H),H=setTimeout(function(){null===M&&(W=w[j],q(),U(),z(),Kt.call(e,at,s),Jt(M,function(){Kt.call(e,lt,s)}))},20)},this.hide=function(){clearTimeout(H),H=setTimeout(function(){M&&null!==M&&qt(M,Et)&&(Kt.call(e,rt,s),Rt(M,Et),Jt(M,function(){R(),Kt.call(e,ct,s)}))},w[B])},h in e||(w[d]===et?(Yt(e,Nt[0],w.show),w[b]||Yt(e,Nt[1],w.hide)):/^(click|focus)$/.test(w[d])&&(Yt(e,w[d],w.toggle),w[b]||Yt(e,"blur",w.hide)),w[b]&&Yt(document,tt,P),Yt(t,it,w.hide)),e[h]=w}};Vt(h,fe,i);var de=function(e,n){e=Ut(e);var i=Ut(e[pt](b));if(n=n||{},n[N]||i){for(var o,a=n[N]&&Ut(n[N])||i,l=a&&a[gt]("A"),r=[],c=[],u=e[G]=d&&h>o;if(!f&&p)qt(n,Dt)||(Ot(n,Dt),f=!0,l&&!qt(l,Dt)&&Ot(l,Dt),Kt.call(e,"activate","scrollspy",r[t]));else if(p){if(!p&&!f||f&&p)return}else qt(n,Dt)&&(Rt(n,Dt),f=!1,l&&qt(l,Dt)&&!zt(n[xt],Dt).length&&Rt(l,Dt))},g=function(){o=s?ne().y:e[z];for(var t=0,n=r[wt];t1&&(t=e[e[wt]-1]):t=e[0],t},h=function(){return Ut(d()[pt]("href"))},p=function(t){t.preventDefault(),r=t[N][pt](i)===o||Zt.test(t[N][pt]("href"))?t[N]:t[N][xt],u.show()};this.show=function(){var e=Ut(r[pt]("href")),n=d(),i=h();n[l]&&r[l]||qt(r,Dt)||(n[l]=r[l]=!0,Rt(n,Dt),Ot(r,Dt),f&&(qt(t[xt],"dropdown-menu")?qt(f,Dt)||Ot(f,Dt):qt(f,Dt)&&Rt(f,Dt)),c&&(c[Lt][a]=te(i)+"px"),function(){Rt(i,Et),Kt.call(n,rt,o,r),function(){Jt(i,function(){Rt(i,Dt),Ot(e,Dt),setTimeout(function(){Ot(e,Et),e[G],c&&Ot(c,St),function(){Kt.call(r,at,o,n),function(){c&&(c[Lt][a]=te(e)+"px"),Kt.call(n,ct,o,r)}()}()},20)})}()}(),function(){Jt(e,function(){Kt.call(r,lt,o,n),c?!function(){Jt(c,function(){setTimeout(function(){c[Lt][a]="",Rt(c,St),n[l]=r[l]=!1},200)})}():n[l]=r[l]=!1})}())},m in t||Yt(t,tt,p),this[a]&&(c=h()[xt]),t[m]=this};Vt(m,he,i);var pe=function(t,e){t=Ut(t);var i=t[pt](L);placementData=t[pt](E),delayData=t[pt](S),containerData=t[pt](D),component="tooltip",classString="class",title="title",fade="fade",div="div",modal=Xt(t,".modal"),e=e||{},this[$]=e[$]&&e[$]!==fade?e[$]:i||fade,this[j]=e[j]?e[j]:placementData||Bt,this[B]=parseInt(e[B]||delayData)||200,this[O]=Ut(e[O])?Ut(e[O]):Ut(containerData)?Ut(containerData):modal?modal:n;var o=this,a=0,l=this[j],r=null,c=t[pt](title)||t[pt](C);if(c){var u=function(){o[O].removeChild(r),r=null,a=null},s=function(){c=t[pt](title)||t[pt](C),r=document.createElement(div),r[mt]("role",component);var e=document.createElement(div);e[mt](classString,component+"-inner"),r.appendChild(e),e.innerHTML=c,o[O].appendChild(r),r[mt](classString,component+" "+component+"-"+l+" "+o[$])},f=function(){ie(t,r,l,o[O]),ee(r)||(l=oe(l),ie(t,r,l,o[O]))},d=function(){!qt(r,Et)&&Ot(r,Et)};this.show=function(){clearTimeout(a),a=setTimeout(function(){null===r&&(l=o[j],s(),f(),d(),Kt.call(t,at,component),Jt(r,function(){Kt.call(t,lt,component)}))},20)},this.hide=function(){clearTimeout(a),a=setTimeout(function(){r&&null!==r&&qt(r,Et)&&(Kt.call(t,rt,component),Rt(r,Et),Jt(r,function(){u(),Kt.call(t,ct,component)}))},o[B])},this.toggle=function(){r?o.hide():o.show()},v in t||(t[mt](C,c),t.removeAttribute(title),Yt(t,Nt[0],this.show),Yt(t,Nt[1],this.hide)),t[v]=this}};return Vt(v,pe,i),{Alert:ae,Button:le,Carousel:re,Collapse:ce,Dropdown:ue,Modal:se,Popover:fe,ScrollSpy:de,Tab:he,Tooltip:pe}}); diff --git a/dist/bootstrap-native.js b/dist/bootstrap-native.js index ce7b8e37..603b8a99 100644 --- a/dist/bootstrap-native.js +++ b/dist/bootstrap-native.js @@ -174,7 +174,7 @@ // source http://gomakethings.com/climbing-up-and-down-the-dom-tree-with-vanilla-javascript/ var firstChar = selector.charAt(0); for ( ; element && element !== document; element = element[parentNode] ) {// Get closest match - if ( firstChar === '.') {// If selector is a class + if ( firstChar === '.' ) {// If selector is a class if ( queryElement(selector,element[parentNode]) !== null && hasClass(element,selector.replace('.','')) ) { return element; } } else if ( firstChar === '#' ) { // If selector is an ID if ( element.id === selector.substr(1) ) { return element; } @@ -1281,8 +1281,10 @@ this[placement] = options[placement] ? options[placement] : placementData || top; this[delay] = parseInt(options[delay] || delayData) || 200; this[dismissible] = options[dismissible] || dismissibleData === 'true' ? true : false; - this[container] = queryElement(options[container]) || queryElement(containerData) || modal ? modal : body; - + this[container] = queryElement(options[container]) ? queryElement(options[container]) + : queryElement(containerData) ? queryElement(containerData) + : modal ? modal : body; + // bind, content var self = this, titleString = element[getAttribute](dataTitle) || null, @@ -1663,7 +1665,9 @@ this[animation] = options[animation] && options[animation] !== fade ? options[animation] : animationData || fade; this[placement] = options[placement] ? options[placement] : placementData || top; this[delay] = parseInt(options[delay] || delayData) || 200; - this[container] = queryElement(options[container]) || queryElement(containerData) || modal ? modal : body; + this[container] = queryElement(options[container]) ? queryElement(options[container]) + : queryElement(containerData) ? queryElement(containerData) + : modal ? modal : body; // bind, event targets, title and constants var self = this, timer = 0, placementSetting = this[placement], tooltip = null, diff --git a/dist/bootstrap-native.min.js b/dist/bootstrap-native.min.js index cc9961e4..a63770bd 100644 --- a/dist/bootstrap-native.min.js +++ b/dist/bootstrap-native.min.js @@ -1,2 +1,2 @@ // Native Javascript for Bootstrap 3 v2.0.6 | © dnp_theme | MIT-License -!function(t,e){if("function"==typeof define&&define.amd)define([],e);else if("object"==typeof module&&module.exports)module.exports=e();else{var n=e();t.Affix=n.Affix,t.Alert=n.Alert,t.Button=n.Button,t.Carousel=n.Carousel,t.Collapse=n.Collapse,t.Dropdown=n.Dropdown,t.Modal=n.Modal,t.Popover=n.Popover,t.ScrollSpy=n.ScrollSpy,t.Tab=n.Tab,t.Tooltip=n.Tooltip}}(this,function(){var t="undefined"!=typeof global?global:this||window,e=document.documentElement,n=document.body,i="data-toggle",o="data-dismiss",a="data-spy",l="data-ride",r="Affix",c="Alert",u="Button",s="Carousel",f="Collapse",d="Dropdown",h="Modal",p="Popover",m="ScrollSpy",v="Tab",g="Tooltip",b="data-backdrop",x="data-keyboard",T="data-target",y="data-interval",w="data-height",C="data-pause",I="data-original-title",A="data-original-text",L="data-dismissible",S="data-trigger",E="data-animation",M="data-container",D="data-placement",k="data-delay",H="data-offset-top",B="data-offset-bottom",N="backdrop",W="keyboard",P="delay",$="content",j="target",O="interval",q="pause",z="animation",R="placement",U="container",X="offsetTop",Y="offsetBottom",F="offsetLeft",G="scrollTop",J="scrollLeft",K="clientWidth",Q="clientHeight",V="offsetWidth",Z="offsetHeight",_="innerWidth",tt="innerHeight",et="scrollHeight",nt="height",it="aria-expanded",ot="aria-hidden",at="click",lt="hover",rt="keydown",ct="resize",ut="scroll",st="show",ft="shown",dt="hide",ht="hidden",pt="close",mt="closed",vt="slid",gt="slide",bt="change",xt="getAttribute",Tt="setAttribute",yt="hasAttribute",wt="getElementsByTagName",Ct="getBoundingClientRect",It="querySelectorAll",At="getElementsByClassName",Lt="indexOf",St="parentNode",Et="length",Mt="toLowerCase",Dt="Transition",kt="Webkit",Ht="style",Bt="active",Nt="in",Wt="collapsing",Pt="disabled",$t="loading",jt="left",Ot="right",qt="top",zt="bottom",Rt=!("opacity"in n[Ht]),Ut="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],Xt=/\b(top|bottom|left|top)+/,Yt=kt+Dt in e[Ht]||Dt[Mt]()in e[Ht],Ft=kt+Dt in e[Ht]?kt[Mt]()+Dt+"End":Dt[Mt]()+"end",Gt=function(t){t.focus?t.focus():t.setActive()},Jt=function(t,e){t.classList.add(e)},Kt=function(t,e){t.classList.remove(e)},Qt=function(t,e){return t.classList.contains(e)},Vt=function(t){for(var e=[],n=0,i=t[Et];n-1||l===r)&&new e(o[a])}},ce=/^\#(.)+$/,ue=function(e){var n=e&&(e.currentStyle||t.getComputedStyle(e)),i=/px/.test(n.borderTopWidth)?Math.round(n.borderTopWidth.replace("px","")):0,o=/px/.test(n.borderBottomWidth)?Math.round(n.borderBottomWidth.replace("px","")):0,a=/px/.test(n.marginTop)?Math.round(n.marginTop.replace("px","")):0,l=/px/.test(n.marginBottom)?Math.round(n.marginBottom.replace("px","")):0;return e[Q]+parseInt(i)+parseInt(o)+parseInt(a)+parseInt(l)},se=function(t){for(var e=0,n=0,i=t.children[Et];n=0&&i[jt]>=0&&i[zt]<=(t[tt]||e[Q])&&i[Ot]<=(t[_]||e[K])},de=function(){return{y:t.pageYOffset||e[G],x:t.pageXOffset||e[J]}},he=function(t,e,i,o){var a=t[Ct](),l=o===n?de():{x:o[F]+o[J],y:o[X]+o[G]},r={w:a[Ot]-a[jt],h:a[zt]-a[qt]},c={w:e[V],h:e[Z]};i===qt?(e[Ht][qt]=a[qt]+l.y-c.h+"px",e[Ht][jt]=a[jt]+l.x-c.w/2+r.w/2+"px"):i===zt?(e[Ht][qt]=a[qt]+l.y+r.h+"px",e[Ht][jt]=a[jt]+l.x-c.w/2+r.w/2+"px"):i===jt?(e[Ht][qt]=a[qt]+l.y-c.h/2+r.h/2+"px",e[Ht][jt]=a[jt]+l.x-c.w+"px"):i===Ot&&(e[Ht][qt]=a[qt]+l.y-c.h/2+r.h/2+"px",e[Ht][jt]=a[jt]+l.x+r.w+"px"),e.className[Lt](i)===-1&&(e.className=e.className.replace(Xt,i))},pe=function(t){return t===qt?zt:t===zt?qt:t===jt?Ot:t===Ot?jt:t},me=function(i,o){i=_t(i),o=o||{};var a=i[xt](T),l=i[xt](H),c=i[xt](B),u="affix",s="affixed",f="function",d="update",h="affix-top",p="affixed-top",m="affix-bottom",v="affixed-bottom";if(this[j]=o[j]?_t(o[j]):_t(a)||null,this[X]=o[X]?o[X]:parseInt(l)||0,this[Y]=o[Y]?o[Y]:parseInt(c)||0,this[j]||this[X]||this[Y]){var g,b,x,y,w,C,I=this,A=Yt?50:500,L=!1,S=!1,E=function(){return Math.max(n[et],n[Z],e[Q],e[et],e[Z])},M=function(){return null!==I[j]?I[j][Ct]()[qt]+y:I[X]?parseInt(typeof I[X]===f?I[X]():I[X]||0):void 0},D=function(){if(I[Y])return x-i[Z]-parseInt(typeof I[Y]===f?I[Y]():I[Y]||0)},k=function(){x=E(),y=parseInt(de().y,0),g=M(),b=D(),w=parseInt(g)-y<0&&y>parseInt(g),C=parseInt(b)-y<0&&y>parseInt(b)},N=function(){L||Qt(i,u)||(ae.call(i,u,u),ae.call(i,h,u),Jt(i,u),L=!0,ae.call(i,s,u),ae.call(i,p,u))},W=function(){L&&Qt(i,u)&&(Kt(i,u),L=!1)},P=function(){S||Qt(i,m)||(ae.call(i,u,u),ae.call(i,m,u),Jt(i,m),S=!0,ae.call(i,s,u),ae.call(i,v,u))},$=function(){S&&Qt(i,m)&&(Kt(i,m),S=!1)},O=function(){C?(w&&W(),P()):($(),w?N():W())};this[d]=function(){k(),O()},r in i||(ee(t,ut,this[d]),ee(t,ct,function(){setTimeout(function(){I[d]()},A)})),i[r]=this,this[d]()}};re(r,me,a);var ve=function(t){t=_t(t);var e=this,n="alert",i=te(t,"."+n),a=function(a){var l=a[j];l=l[yt](o)?l:l[St],l&&l[yt](o)&&(i=te(l,"."+n),t=_t("["+o+'="'+n+'"]',i),(t===l||t===l[St])&&i&&e.close())},l=function(){ae.call(i,mt,n),ne(t,at,a),i[St].removeChild(i)};this.close=function(){i&&t&&Qt(i,Nt)&&(ae.call(i,pt,n),Kt(i,Nt),function(){i&&oe(i,l)}())},c in t||ee(t,at,a),t[c]=this};re(c,ve,o);var ge=function(t,e){t=_t(t),e=e||null;var n=!1,i="button",o="checked",a="reset",l="LABEL",r="INPUT",c=function(){e&&e!==a&&(e===$t&&(Jt(t,Pt),t[Tt](Pt,Pt)),t[Tt](A,t.innerHTML.replace(/^\s+|\s+$/g,"")),t.innerHTML=t[xt]("data-"+e+"-text"))},s=function(){t[xt](A)&&((Qt(t,Pt)||t[xt](Pt)===Pt)&&(Kt(t,Pt),t.removeAttribute(Pt)),t.innerHTML=t[xt](A))},f=function(e){var a=e[j][St],c=e[j].tagName===l?e[j]:a.tagName===l?a:null;if(c){var u=this,s=Zt(u,"btn"),f=c[wt](r)[0];if(f){if("checkbox"===f.type&&(f[o]?(Kt(c,Bt),f[xt](o),f.removeAttribute(o),f[o]=!1):(Jt(c,Bt),f[xt](o),f[Tt](o,o),f[o]=!0),n||(n=!0,ae.call(f,bt,i),ae.call(t,bt,i))),"radio"===f.type&&!n&&!f[o]){Jt(c,Bt),f[Tt](o,o),f[o]=!0,ae.call(f,bt,i),ae.call(t,bt,i),n=!0;for(var d=0,h=s[Et];dd||n===v-1&&0===d)&&(g=f[c]=Ot),f.slideTo(d)}},M=function(t){if(t.preventDefault(),!p){var e=t.currentTarget||t.srcElement;e===w?(d++,g=f[c]=jt,d===v-1?d=v-1:d===v&&(d=0)):e===T&&(d--,g=f[c]=Ot,0===d?d=0:d<0&&(d=v-1)),f.slideTo(d)}},D=function(t){if(!p){switch(t.which){case 39:d++,g=f[c]=jt,d==v-1?d=v-1:d==v&&(d=0);break;case 37:d--,g=f[c]=Ot,0==d?d=0:d<0&&(d=v-1);break;default:return}f.slideTo(d)}},k=function(t){for(var e=0,n=A[Et];e-1)&&(n.persist||l))return;c=null,m()}(/\#$/.test(r.href)||r[St]&&/\#$/.test(r[St].href))&&e.preventDefault()},p=function(){ae.call(a,st,l,c),Jt(a,r),u[Tt](it,!0),ae.call(a,ft,l,c),ee(document,rt,f),o=!0},m=function(){ae.call(a,dt,l,c),Kt(a,r),u[Tt](it,!1),ae.call(a,ht,l,c),ne(document,rt,f),o=!1};this.toggle=function(){Qt(a,r)&&o?m():p()},d in t||(u[Tt]("tabindex","0"),ee(document,at,h)),t[d]=this};re(d,Te,i);var ye=function(i,a){i=_t(i);var l=i[xt](T)||i[xt]("href"),r=_t(l),c=Qt(i,"modal")?i:r,u="modal",s="static",f="paddingLeft",d="paddingRight",p="modal-backdrop";if(Qt(i,"modal")&&(i=null),c){a=a||{},this[W]=a[W]!==!1&&"false"!==c[xt](x),this[N]=a[N]!==s&&c[xt](b)!==s||s,this[N]=a[N]!==!1&&"false"!==c[xt](b)&&this[N],this[$]=a[$];var m,v,g,y,w=this,C=this.open=!1,I=null,A=Zt(e,"navbar-fixed-top").concat(Zt(e,"navbar-fixed-bottom")),L=function(){var n=e[Ct]();return t[_]||n[Ot]-Math.abs(n[jt])},S=function(){var e,i=n.currentStyle||t.getComputedStyle(n),o=parseInt(i[d],10);if(m&&(n[Ht][d]=o+g+"px",A[Et]))for(var a=0;ae[Q],g=M()},k=function(){c[Ht][f]=!m&&v?g+"px":"",c[Ht][d]=m&&!v?g+"px":""},H=function(){c[Ht][f]="",c[Ht][d]=""},B=function(){var t=document.createElement("div");y=_t("."+p),null===y&&(t[Tt]("class",p+" fade"),y=t,n.appendChild(y))},P=function(){y=_t("."+p),y&&null!==y&&"object"==typeof y&&(n.removeChild(y),y=null)},O=function(){Qt(c,Nt)?ne(document,rt,U):ee(document,rt,U)},q=function(){Qt(c,Nt)?ne(t,ct,w.update):ee(t,ct,w.update)},z=function(){Qt(c,Nt)?ne(c,at,X):ee(c,at,X)},R=function(t){var e=t[j];e=e[yt](T)||e[yt]("href")?e:e[St],C||e!==i||Qt(c,Nt)||(c.modalTrigger=i,I=i,w.show(),t.preventDefault())},U=function(t){var e=t.which||t.keyCode;w[W]&&27==e&&C&&w.hide()},X=function(t){var e=t[j];C&&(e[St][xt](o)===u||e[xt](o)===u||e===c&&w[N]!==s)&&(w.hide(),I=null,t.preventDefault())};this.toggle=function(){C&&Qt(c,Nt)?this.hide():this.show()},this.show=function(){ae.call(c,st,u,I);var t=Zt(document,u+" in")[0];t&&t!==c&&t.modalTrigger[h].hide(),this[N]&&B(),y&&!Qt(y,Nt)&&setTimeout(function(){Jt(y,Nt)},0),setTimeout(function(){c[Ht].display="block",D(),S(),k(),q(),z(),O(),Jt(n,u+"-open"),Jt(c,Nt),c[Tt](ot,!1),oe(c,function(){C=w.open=!0,Gt(c),ae.call(c,ft,u,I)})},Yt?150:0)},this.hide=function(){ae.call(c,dt,u),y=_t("."+p),Kt(c,Nt),c[Tt](ot,!0),!!y&&Kt(y,Nt),setTimeout(function(){oe(c,function(){q(),z(),O(),c[Ht].display="",C=w.open=!1,i&&Gt(i),ae.call(c,ht,u),setTimeout(function(){Zt(document,u+" "+Nt)[0]||(H(),E(),Kt(n,u+"-open"),P())},100)})},Yt?150:0)},this.setContent=function(t){_t("."+u+"-content",c).innerHTML=t},this.update=function(){C&&(D(),S(),k())},!i||h in i||ee(i,at,R),this[$]&&this.setContent(this[$]),!!i&&(i[h]=this)}};re(h,ye,i);var we=function(e,i){e=_t(e);var o=e[xt](S),a=e[xt](E),l=e[xt](D),r=e[xt](L),c=e[xt](k),u=e[xt](M),s="popover",f="template",d="trigger",h="class",m="div",v="fade",g="data-title",b="data-content",x="dismissible",T='',y=te(e,".modal");i=i||{},this[f]=i[f]?i[f]:null,this[d]=i[d]?i[d]:o||lt,this[z]=i[z]&&i[z]!==v?i[z]:a||v,this[R]=i[R]?i[R]:l||qt,this[P]=parseInt(i[P]||c)||200,this[x]=!(!i[x]&&"true"!==r),this[U]=_t(i[U])||_t(u)||y?y:n;var w=this,C=e[xt](g)||null,I=e[xt](b)||null;if(I||this[f]){var A=null,H=0,B=this[R],N=function(t){null!==A&&t[j]===_t(".close",A)&&w.hide()},W=function(){w[U].removeChild(A),H=null,A=null},$=function(){if(C=e[xt](g),I=e[xt](b),A=document.createElement(m),null!==I&&null===w[f]){if(A[Tt]("role","tooltip"),null!==C){var t=document.createElement("h3");t[Tt](h,s+"-title"),t.innerHTML=w[x]?C+T:C,A.appendChild(t)}var n=document.createElement(m),i=document.createElement(m);n[Tt](h,"arrow"),i[Tt](h,s+"-content"),A.appendChild(n),A.appendChild(i),i.innerHTML=w[x]&&null===C?I+T:I}else{var o=document.createElement(m);o.innerHTML=w[f],A.innerHTML=o.firstChild.innerHTML}w[U].appendChild(A),A[Ht].display="block",A[Tt](h,s+" "+B+" "+w[z])},O=function(){!Qt(A,Nt)&&Jt(A,Nt)},q=function(){he(e,A,B,w[U]),fe(A)||(B=pe(B),he(e,A,B,w[U]))};this.toggle=function(){null===A?w.show():w.hide()},this.show=function(){clearTimeout(H),H=setTimeout(function(){null===A&&(B=w[R],$(),q(),O(),ae.call(e,st,s),oe(A,function(){ae.call(e,ft,s)}))},20)},this.hide=function(){clearTimeout(H),H=setTimeout(function(){A&&null!==A&&Qt(A,Nt)&&(ae.call(e,dt,s),Kt(A,Nt),oe(A,function(){W(),ae.call(e,ht,s)}))},w[P])},p in e||(w[d]===lt?(ee(e,Ut[0],w.show),w[x]||ee(e,Ut[1],w.hide)):/^(click|focus)$/.test(w[d])&&(ee(e,w[d],w.toggle),w[x]||ee(e,"blur",w.hide)),w[x]&&ee(document,at,N),!Rt&&ee(t,ct,w.hide)),e[p]=w}};re(p,we,i);var Ce=function(e,n){e=_t(e);var i=_t(e[xt](T));if(n=n||{},n[j]||i){for(var o,a=n[j]&&_t(n[j])||i,l=a&&a[wt]("A"),r=[],c=[],u=e[Z]=f&&d>o;if(!u&&h)"LI"!==n.tagName||Qt(n,Bt)||(Jt(n,Bt),u=!0,a&&!Qt(a,Bt)&&Jt(a,Bt),ae.call(e,"activate","scrollspy",r[t]));else if(h){if(!h&&!u||u&&h)return}else"LI"===n.tagName&&Qt(n,Bt)&&(Kt(n,Bt),u=!1,a&&Qt(a,Bt)&&!Zt(n[St],Bt).length&&Kt(a,Bt))},g=function(){o=s?de().y:e[G];for(var t=0,n=r[Et];t1&&(t=e[e[Et]-1]):t=e[0],t[wt]("A")[0]},h=function(){return _t(d()[xt]("href"))},p=function(t){t.preventDefault(),r=t[j][xt](i)===o||ce.test(t[j][xt]("href"))?t[j]:t[j][St],u.show()};this.show=function(){var e=_t(r[xt]("href")),n=d(),i=h();n[l]&&r[l]||Qt(r[St],Bt)||(n[l]=r[l]=!0,Kt(n[St],Bt),Jt(r[St],Bt),f&&(Qt(t[St][St],"dropdown-menu")?Qt(f,Bt)||Jt(f,Bt):Qt(f,Bt)&&Kt(f,Bt)),c&&(c[Ht][a]=se(i)+"px"),function(){Kt(i,Nt),ae.call(n,dt,o,r),function(){oe(i,function(){Kt(i,Bt),Jt(e,Bt),setTimeout(function(){Jt(e,Nt),e[Z],c&&Jt(c,Wt),function(){ae.call(r,st,o,n),function(){c&&(c[Ht][a]=se(e)+"px"),ae.call(n,ht,o,r)}()}()},20)})}()}(),function(){oe(e,function(){ae.call(r,ft,o,n),c?!function(){oe(c,function(){setTimeout(function(){c[Ht][a]="",Kt(c,Wt),n[l]=r[l]=!1},200)})}():n[l]=r[l]=!1})}())},v in t||ee(t,at,p),this[a]&&(c=h()[St]),t[v]=this};re(v,Ie,i);var Ae=function(t,e){t=_t(t);var i=t[xt](E);placementData=t[xt](D),delayData=t[xt](k),containerData=t[xt](M),component="tooltip",classString="class",title="title",fade="fade",div="div",modal=te(t,".modal"),e=e||{},this[z]=e[z]&&e[z]!==fade?e[z]:i||fade,this[R]=e[R]?e[R]:placementData||qt,this[P]=parseInt(e[P]||delayData)||200,this[U]=_t(e[U])||_t(containerData)||modal?modal:n;var o=this,a=0,l=this[R],r=null,c=t[xt](title)||t[xt](I);if(c){var u=function(){o[U].removeChild(r),r=null,a=null},s=function(){c=t[xt](title)||t[xt](I),r=document.createElement(div),r[Tt]("role",component);var e=document.createElement(div),n=document.createElement(div);e[Tt](classString,component+"-arrow"),n[Tt](classString,component+"-inner"),r.appendChild(e),r.appendChild(n),n.innerHTML=c,o[U].appendChild(r),r[Tt](classString,component+" "+l+" "+o[z])},f=function(){he(t,r,l,o[U]),fe(r)||(l=pe(l),he(t,r,l,o[U]))},d=function(){!Qt(r,Nt)&&Jt(r,Nt)};this.show=function(){clearTimeout(a),a=setTimeout(function(){null===r&&(l=o[R],s(),f(),d(),ae.call(t,st,component),oe(r,function(){ae.call(t,ft,component)}))},20)},this.hide=function(){clearTimeout(a),a=setTimeout(function(){r&&null!==r&&Qt(r,Nt)&&(ae.call(t,dt,component),Kt(r,Nt),oe(r,function(){u(),ae.call(t,ht,component)}))},o[P])},this.toggle=function(){r?o.hide():o.show()},g in t||(t[Tt](I,c),t.removeAttribute(title),ee(t,Ut[0],this.show),ee(t,Ut[1],this.hide)),t[g]=this}};return re(g,Ae,i),{Affix:me,Alert:ve,Button:ge,Carousel:be,Collapse:xe,Dropdown:Te,Modal:ye,Popover:we,ScrollSpy:Ce,Tab:Ie,Tooltip:Ae}}); +!function(t,e){if("function"==typeof define&&define.amd)define([],e);else if("object"==typeof module&&module.exports)module.exports=e();else{var n=e();t.Affix=n.Affix,t.Alert=n.Alert,t.Button=n.Button,t.Carousel=n.Carousel,t.Collapse=n.Collapse,t.Dropdown=n.Dropdown,t.Modal=n.Modal,t.Popover=n.Popover,t.ScrollSpy=n.ScrollSpy,t.Tab=n.Tab,t.Tooltip=n.Tooltip}}(this,function(){var t="undefined"!=typeof global?global:this||window,e=document.documentElement,n=document.body,i="data-toggle",o="data-dismiss",a="data-spy",l="data-ride",r="Affix",c="Alert",u="Button",s="Carousel",f="Collapse",d="Dropdown",h="Modal",p="Popover",m="ScrollSpy",v="Tab",g="Tooltip",b="data-backdrop",x="data-keyboard",T="data-target",y="data-interval",w="data-height",C="data-pause",I="data-original-title",A="data-original-text",L="data-dismissible",S="data-trigger",E="data-animation",M="data-container",D="data-placement",k="data-delay",H="data-offset-top",B="data-offset-bottom",N="backdrop",W="keyboard",P="delay",$="content",j="target",O="interval",q="pause",z="animation",R="placement",U="container",X="offsetTop",Y="offsetBottom",F="offsetLeft",G="scrollTop",J="scrollLeft",K="clientWidth",Q="clientHeight",V="offsetWidth",Z="offsetHeight",_="innerWidth",tt="innerHeight",et="scrollHeight",nt="height",it="aria-expanded",ot="aria-hidden",at="click",lt="hover",rt="keydown",ct="resize",ut="scroll",st="show",ft="shown",dt="hide",ht="hidden",pt="close",mt="closed",vt="slid",gt="slide",bt="change",xt="getAttribute",Tt="setAttribute",yt="hasAttribute",wt="getElementsByTagName",Ct="getBoundingClientRect",It="querySelectorAll",At="getElementsByClassName",Lt="indexOf",St="parentNode",Et="length",Mt="toLowerCase",Dt="Transition",kt="Webkit",Ht="style",Bt="active",Nt="in",Wt="collapsing",Pt="disabled",$t="loading",jt="left",Ot="right",qt="top",zt="bottom",Rt=!("opacity"in n[Ht]),Ut="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],Xt=/\b(top|bottom|left|top)+/,Yt=kt+Dt in e[Ht]||Dt[Mt]()in e[Ht],Ft=kt+Dt in e[Ht]?kt[Mt]()+Dt+"End":Dt[Mt]()+"end",Gt=function(t){t.focus?t.focus():t.setActive()},Jt=function(t,e){t.classList.add(e)},Kt=function(t,e){t.classList.remove(e)},Qt=function(t,e){return t.classList.contains(e)},Vt=function(t){for(var e=[],n=0,i=t[Et];n-1||l===r)&&new e(o[a])}},ce=/^\#(.)+$/,ue=function(e){var n=e&&(e.currentStyle||t.getComputedStyle(e)),i=/px/.test(n.borderTopWidth)?Math.round(n.borderTopWidth.replace("px","")):0,o=/px/.test(n.borderBottomWidth)?Math.round(n.borderBottomWidth.replace("px","")):0,a=/px/.test(n.marginTop)?Math.round(n.marginTop.replace("px","")):0,l=/px/.test(n.marginBottom)?Math.round(n.marginBottom.replace("px","")):0;return e[Q]+parseInt(i)+parseInt(o)+parseInt(a)+parseInt(l)},se=function(t){for(var e=0,n=0,i=t.children[Et];n=0&&i[jt]>=0&&i[zt]<=(t[tt]||e[Q])&&i[Ot]<=(t[_]||e[K])},de=function(){return{y:t.pageYOffset||e[G],x:t.pageXOffset||e[J]}},he=function(t,e,i,o){var a=t[Ct](),l=o===n?de():{x:o[F]+o[J],y:o[X]+o[G]},r={w:a[Ot]-a[jt],h:a[zt]-a[qt]},c={w:e[V],h:e[Z]};i===qt?(e[Ht][qt]=a[qt]+l.y-c.h+"px",e[Ht][jt]=a[jt]+l.x-c.w/2+r.w/2+"px"):i===zt?(e[Ht][qt]=a[qt]+l.y+r.h+"px",e[Ht][jt]=a[jt]+l.x-c.w/2+r.w/2+"px"):i===jt?(e[Ht][qt]=a[qt]+l.y-c.h/2+r.h/2+"px",e[Ht][jt]=a[jt]+l.x-c.w+"px"):i===Ot&&(e[Ht][qt]=a[qt]+l.y-c.h/2+r.h/2+"px",e[Ht][jt]=a[jt]+l.x+r.w+"px"),e.className[Lt](i)===-1&&(e.className=e.className.replace(Xt,i))},pe=function(t){return t===qt?zt:t===zt?qt:t===jt?Ot:t===Ot?jt:t},me=function(i,o){i=_t(i),o=o||{};var a=i[xt](T),l=i[xt](H),c=i[xt](B),u="affix",s="affixed",f="function",d="update",h="affix-top",p="affixed-top",m="affix-bottom",v="affixed-bottom";if(this[j]=o[j]?_t(o[j]):_t(a)||null,this[X]=o[X]?o[X]:parseInt(l)||0,this[Y]=o[Y]?o[Y]:parseInt(c)||0,this[j]||this[X]||this[Y]){var g,b,x,y,w,C,I=this,A=Yt?50:500,L=!1,S=!1,E=function(){return Math.max(n[et],n[Z],e[Q],e[et],e[Z])},M=function(){return null!==I[j]?I[j][Ct]()[qt]+y:I[X]?parseInt(typeof I[X]===f?I[X]():I[X]||0):void 0},D=function(){if(I[Y])return x-i[Z]-parseInt(typeof I[Y]===f?I[Y]():I[Y]||0)},k=function(){x=E(),y=parseInt(de().y,0),g=M(),b=D(),w=parseInt(g)-y<0&&y>parseInt(g),C=parseInt(b)-y<0&&y>parseInt(b)},N=function(){L||Qt(i,u)||(ae.call(i,u,u),ae.call(i,h,u),Jt(i,u),L=!0,ae.call(i,s,u),ae.call(i,p,u))},W=function(){L&&Qt(i,u)&&(Kt(i,u),L=!1)},P=function(){S||Qt(i,m)||(ae.call(i,u,u),ae.call(i,m,u),Jt(i,m),S=!0,ae.call(i,s,u),ae.call(i,v,u))},$=function(){S&&Qt(i,m)&&(Kt(i,m),S=!1)},O=function(){C?(w&&W(),P()):($(),w?N():W())};this[d]=function(){k(),O()},r in i||(ee(t,ut,this[d]),ee(t,ct,function(){setTimeout(function(){I[d]()},A)})),i[r]=this,this[d]()}};re(r,me,a);var ve=function(t){t=_t(t);var e=this,n="alert",i=te(t,"."+n),a=function(a){var l=a[j];l=l[yt](o)?l:l[St],l&&l[yt](o)&&(i=te(l,"."+n),t=_t("["+o+'="'+n+'"]',i),(t===l||t===l[St])&&i&&e.close())},l=function(){ae.call(i,mt,n),ne(t,at,a),i[St].removeChild(i)};this.close=function(){i&&t&&Qt(i,Nt)&&(ae.call(i,pt,n),Kt(i,Nt),function(){i&&oe(i,l)}())},c in t||ee(t,at,a),t[c]=this};re(c,ve,o);var ge=function(t,e){t=_t(t),e=e||null;var n=!1,i="button",o="checked",a="reset",l="LABEL",r="INPUT",c=function(){e&&e!==a&&(e===$t&&(Jt(t,Pt),t[Tt](Pt,Pt)),t[Tt](A,t.innerHTML.replace(/^\s+|\s+$/g,"")),t.innerHTML=t[xt]("data-"+e+"-text"))},s=function(){t[xt](A)&&((Qt(t,Pt)||t[xt](Pt)===Pt)&&(Kt(t,Pt),t.removeAttribute(Pt)),t.innerHTML=t[xt](A))},f=function(e){var a=e[j][St],c=e[j].tagName===l?e[j]:a.tagName===l?a:null;if(c){var u=this,s=Zt(u,"btn"),f=c[wt](r)[0];if(f){if("checkbox"===f.type&&(f[o]?(Kt(c,Bt),f[xt](o),f.removeAttribute(o),f[o]=!1):(Jt(c,Bt),f[xt](o),f[Tt](o,o),f[o]=!0),n||(n=!0,ae.call(f,bt,i),ae.call(t,bt,i))),"radio"===f.type&&!n&&!f[o]){Jt(c,Bt),f[Tt](o,o),f[o]=!0,ae.call(f,bt,i),ae.call(t,bt,i),n=!0;for(var d=0,h=s[Et];dd||n===v-1&&0===d)&&(g=f[c]=Ot),f.slideTo(d)}},M=function(t){if(t.preventDefault(),!p){var e=t.currentTarget||t.srcElement;e===w?(d++,g=f[c]=jt,d===v-1?d=v-1:d===v&&(d=0)):e===T&&(d--,g=f[c]=Ot,0===d?d=0:d<0&&(d=v-1)),f.slideTo(d)}},D=function(t){if(!p){switch(t.which){case 39:d++,g=f[c]=jt,d==v-1?d=v-1:d==v&&(d=0);break;case 37:d--,g=f[c]=Ot,0==d?d=0:d<0&&(d=v-1);break;default:return}f.slideTo(d)}},k=function(t){for(var e=0,n=A[Et];e-1)&&(n.persist||l))return;c=null,m()}(/\#$/.test(r.href)||r[St]&&/\#$/.test(r[St].href))&&e.preventDefault()},p=function(){ae.call(a,st,l,c),Jt(a,r),u[Tt](it,!0),ae.call(a,ft,l,c),ee(document,rt,f),o=!0},m=function(){ae.call(a,dt,l,c),Kt(a,r),u[Tt](it,!1),ae.call(a,ht,l,c),ne(document,rt,f),o=!1};this.toggle=function(){Qt(a,r)&&o?m():p()},d in t||(u[Tt]("tabindex","0"),ee(document,at,h)),t[d]=this};re(d,Te,i);var ye=function(i,a){i=_t(i);var l=i[xt](T)||i[xt]("href"),r=_t(l),c=Qt(i,"modal")?i:r,u="modal",s="static",f="paddingLeft",d="paddingRight",p="modal-backdrop";if(Qt(i,"modal")&&(i=null),c){a=a||{},this[W]=a[W]!==!1&&"false"!==c[xt](x),this[N]=a[N]!==s&&c[xt](b)!==s||s,this[N]=a[N]!==!1&&"false"!==c[xt](b)&&this[N],this[$]=a[$];var m,v,g,y,w=this,C=this.open=!1,I=null,A=Zt(e,"navbar-fixed-top").concat(Zt(e,"navbar-fixed-bottom")),L=function(){var n=e[Ct]();return t[_]||n[Ot]-Math.abs(n[jt])},S=function(){var e,i=n.currentStyle||t.getComputedStyle(n),o=parseInt(i[d],10);if(m&&(n[Ht][d]=o+g+"px",A[Et]))for(var a=0;ae[Q],g=M()},k=function(){c[Ht][f]=!m&&v?g+"px":"",c[Ht][d]=m&&!v?g+"px":""},H=function(){c[Ht][f]="",c[Ht][d]=""},B=function(){var t=document.createElement("div");y=_t("."+p),null===y&&(t[Tt]("class",p+" fade"),y=t,n.appendChild(y))},P=function(){y=_t("."+p),y&&null!==y&&"object"==typeof y&&(n.removeChild(y),y=null)},O=function(){Qt(c,Nt)?ne(document,rt,U):ee(document,rt,U)},q=function(){Qt(c,Nt)?ne(t,ct,w.update):ee(t,ct,w.update)},z=function(){Qt(c,Nt)?ne(c,at,X):ee(c,at,X)},R=function(t){var e=t[j];e=e[yt](T)||e[yt]("href")?e:e[St],C||e!==i||Qt(c,Nt)||(c.modalTrigger=i,I=i,w.show(),t.preventDefault())},U=function(t){var e=t.which||t.keyCode;w[W]&&27==e&&C&&w.hide()},X=function(t){var e=t[j];C&&(e[St][xt](o)===u||e[xt](o)===u||e===c&&w[N]!==s)&&(w.hide(),I=null,t.preventDefault())};this.toggle=function(){C&&Qt(c,Nt)?this.hide():this.show()},this.show=function(){ae.call(c,st,u,I);var t=Zt(document,u+" in")[0];t&&t!==c&&t.modalTrigger[h].hide(),this[N]&&B(),y&&!Qt(y,Nt)&&setTimeout(function(){Jt(y,Nt)},0),setTimeout(function(){c[Ht].display="block",D(),S(),k(),q(),z(),O(),Jt(n,u+"-open"),Jt(c,Nt),c[Tt](ot,!1),oe(c,function(){C=w.open=!0,Gt(c),ae.call(c,ft,u,I)})},Yt?150:0)},this.hide=function(){ae.call(c,dt,u),y=_t("."+p),Kt(c,Nt),c[Tt](ot,!0),!!y&&Kt(y,Nt),setTimeout(function(){oe(c,function(){q(),z(),O(),c[Ht].display="",C=w.open=!1,i&&Gt(i),ae.call(c,ht,u),setTimeout(function(){Zt(document,u+" "+Nt)[0]||(H(),E(),Kt(n,u+"-open"),P())},100)})},Yt?150:0)},this.setContent=function(t){_t("."+u+"-content",c).innerHTML=t},this.update=function(){C&&(D(),S(),k())},!i||h in i||ee(i,at,R),this[$]&&this.setContent(this[$]),!!i&&(i[h]=this)}};re(h,ye,i);var we=function(e,i){e=_t(e);var o=e[xt](S),a=e[xt](E),l=e[xt](D),r=e[xt](L),c=e[xt](k),u=e[xt](M),s="popover",f="template",d="trigger",h="class",m="div",v="fade",g="data-title",b="data-content",x="dismissible",T='',y=te(e,".modal");i=i||{},this[f]=i[f]?i[f]:null,this[d]=i[d]?i[d]:o||lt,this[z]=i[z]&&i[z]!==v?i[z]:a||v,this[R]=i[R]?i[R]:l||qt,this[P]=parseInt(i[P]||c)||200,this[x]=!(!i[x]&&"true"!==r),this[U]=_t(i[U])?_t(i[U]):_t(u)?_t(u):y?y:n;var w=this,C=e[xt](g)||null,I=e[xt](b)||null;if(I||this[f]){var A=null,H=0,B=this[R],N=function(t){null!==A&&t[j]===_t(".close",A)&&w.hide()},W=function(){w[U].removeChild(A),H=null,A=null},$=function(){if(C=e[xt](g),I=e[xt](b),A=document.createElement(m),null!==I&&null===w[f]){if(A[Tt]("role","tooltip"),null!==C){var t=document.createElement("h3");t[Tt](h,s+"-title"),t.innerHTML=w[x]?C+T:C,A.appendChild(t)}var n=document.createElement(m),i=document.createElement(m);n[Tt](h,"arrow"),i[Tt](h,s+"-content"),A.appendChild(n),A.appendChild(i),i.innerHTML=w[x]&&null===C?I+T:I}else{var o=document.createElement(m);o.innerHTML=w[f],A.innerHTML=o.firstChild.innerHTML}w[U].appendChild(A),A[Ht].display="block",A[Tt](h,s+" "+B+" "+w[z])},O=function(){!Qt(A,Nt)&&Jt(A,Nt)},q=function(){he(e,A,B,w[U]),fe(A)||(B=pe(B),he(e,A,B,w[U]))};this.toggle=function(){null===A?w.show():w.hide()},this.show=function(){clearTimeout(H),H=setTimeout(function(){null===A&&(B=w[R],$(),q(),O(),ae.call(e,st,s),oe(A,function(){ae.call(e,ft,s)}))},20)},this.hide=function(){clearTimeout(H),H=setTimeout(function(){A&&null!==A&&Qt(A,Nt)&&(ae.call(e,dt,s),Kt(A,Nt),oe(A,function(){W(),ae.call(e,ht,s)}))},w[P])},p in e||(w[d]===lt?(ee(e,Ut[0],w.show),w[x]||ee(e,Ut[1],w.hide)):/^(click|focus)$/.test(w[d])&&(ee(e,w[d],w.toggle),w[x]||ee(e,"blur",w.hide)),w[x]&&ee(document,at,N),!Rt&&ee(t,ct,w.hide)),e[p]=w}};re(p,we,i);var Ce=function(e,n){e=_t(e);var i=_t(e[xt](T));if(n=n||{},n[j]||i){for(var o,a=n[j]&&_t(n[j])||i,l=a&&a[wt]("A"),r=[],c=[],u=e[Z]=f&&d>o;if(!u&&h)"LI"!==n.tagName||Qt(n,Bt)||(Jt(n,Bt),u=!0,a&&!Qt(a,Bt)&&Jt(a,Bt),ae.call(e,"activate","scrollspy",r[t]));else if(h){if(!h&&!u||u&&h)return}else"LI"===n.tagName&&Qt(n,Bt)&&(Kt(n,Bt),u=!1,a&&Qt(a,Bt)&&!Zt(n[St],Bt).length&&Kt(a,Bt))},g=function(){o=s?de().y:e[G];for(var t=0,n=r[Et];t1&&(t=e[e[Et]-1]):t=e[0],t[wt]("A")[0]},h=function(){return _t(d()[xt]("href"))},p=function(t){t.preventDefault(),r=t[j][xt](i)===o||ce.test(t[j][xt]("href"))?t[j]:t[j][St],u.show()};this.show=function(){var e=_t(r[xt]("href")),n=d(),i=h();n[l]&&r[l]||Qt(r[St],Bt)||(n[l]=r[l]=!0,Kt(n[St],Bt),Jt(r[St],Bt),f&&(Qt(t[St][St],"dropdown-menu")?Qt(f,Bt)||Jt(f,Bt):Qt(f,Bt)&&Kt(f,Bt)),c&&(c[Ht][a]=se(i)+"px"),function(){Kt(i,Nt),ae.call(n,dt,o,r),function(){oe(i,function(){Kt(i,Bt),Jt(e,Bt),setTimeout(function(){Jt(e,Nt),e[Z],c&&Jt(c,Wt),function(){ae.call(r,st,o,n),function(){c&&(c[Ht][a]=se(e)+"px"),ae.call(n,ht,o,r)}()}()},20)})}()}(),function(){oe(e,function(){ae.call(r,ft,o,n),c?!function(){oe(c,function(){setTimeout(function(){c[Ht][a]="",Kt(c,Wt),n[l]=r[l]=!1},200)})}():n[l]=r[l]=!1})}())},v in t||ee(t,at,p),this[a]&&(c=h()[St]),t[v]=this};re(v,Ie,i);var Ae=function(t,e){t=_t(t);var i=t[xt](E);placementData=t[xt](D),delayData=t[xt](k),containerData=t[xt](M),component="tooltip",classString="class",title="title",fade="fade",div="div",modal=te(t,".modal"),e=e||{},this[z]=e[z]&&e[z]!==fade?e[z]:i||fade,this[R]=e[R]?e[R]:placementData||qt,this[P]=parseInt(e[P]||delayData)||200,this[U]=_t(e[U])?_t(e[U]):_t(containerData)?_t(containerData):modal?modal:n;var o=this,a=0,l=this[R],r=null,c=t[xt](title)||t[xt](I);if(c){var u=function(){o[U].removeChild(r),r=null,a=null},s=function(){c=t[xt](title)||t[xt](I),r=document.createElement(div),r[Tt]("role",component);var e=document.createElement(div),n=document.createElement(div);e[Tt](classString,component+"-arrow"),n[Tt](classString,component+"-inner"),r.appendChild(e),r.appendChild(n),n.innerHTML=c,o[U].appendChild(r),r[Tt](classString,component+" "+l+" "+o[z])},f=function(){he(t,r,l,o[U]),fe(r)||(l=pe(l),he(t,r,l,o[U]))},d=function(){!Qt(r,Nt)&&Jt(r,Nt)};this.show=function(){clearTimeout(a),a=setTimeout(function(){null===r&&(l=o[R],s(),f(),d(),ae.call(t,st,component),oe(r,function(){ae.call(t,ft,component)}))},20)},this.hide=function(){clearTimeout(a),a=setTimeout(function(){r&&null!==r&&Qt(r,Nt)&&(ae.call(t,dt,component),Kt(r,Nt),oe(r,function(){u(),ae.call(t,ht,component)}))},o[P])},this.toggle=function(){r?o.hide():o.show()},g in t||(t[Tt](I,c),t.removeAttribute(title),ee(t,Ut[0],this.show),ee(t,Ut[1],this.hide)),t[g]=this}};return re(g,Ae,i),{Affix:me,Alert:ve,Button:ge,Carousel:be,Collapse:xe,Dropdown:Te,Modal:ye,Popover:we,ScrollSpy:Ce,Tab:Ie,Tooltip:Ae}}); diff --git a/index.html b/index.html index c6a2d9ab..2ded7ceb 100644 --- a/index.html +++ b/index.html @@ -39,7 +39,7 @@ - + @@ -3248,7 +3244,7 @@

Navigation

- + diff --git a/lib/V3/popover-native.js b/lib/V3/popover-native.js index 5675f6cb..441029d2 100644 --- a/lib/V3/popover-native.js +++ b/lib/V3/popover-native.js @@ -42,8 +42,10 @@ var Popover = function( element, options ) { this[placement] = options[placement] ? options[placement] : placementData || top; this[delay] = parseInt(options[delay] || delayData) || 200; this[dismissible] = options[dismissible] || dismissibleData === 'true' ? true : false; - this[container] = queryElement(options[container]) || queryElement(containerData) || modal ? modal : body; - + this[container] = queryElement(options[container]) ? queryElement(options[container]) + : queryElement(containerData) ? queryElement(containerData) + : modal ? modal : body; + // bind, content var self = this, titleString = element[getAttribute](dataTitle) || null, diff --git a/lib/V3/tooltip-native.js b/lib/V3/tooltip-native.js index 27c2b69c..6c0a96d5 100644 --- a/lib/V3/tooltip-native.js +++ b/lib/V3/tooltip-native.js @@ -30,7 +30,9 @@ var Tooltip = function( element,options ) { this[animation] = options[animation] && options[animation] !== fade ? options[animation] : animationData || fade; this[placement] = options[placement] ? options[placement] : placementData || top; this[delay] = parseInt(options[delay] || delayData) || 200; - this[container] = queryElement(options[container]) || queryElement(containerData) || modal ? modal : body; + this[container] = queryElement(options[container]) ? queryElement(options[container]) + : queryElement(containerData) ? queryElement(containerData) + : modal ? modal : body; // bind, event targets, title and constants var self = this, timer = 0, placementSetting = this[placement], tooltip = null, diff --git a/lib/V3/utils.js b/lib/V3/utils.js index d38b8978..e5f2ca72 100644 --- a/lib/V3/utils.js +++ b/lib/V3/utils.js @@ -150,7 +150,7 @@ var globalObject = typeof global !== 'undefined' ? global : this||window, // source http://gomakethings.com/climbing-up-and-down-the-dom-tree-with-vanilla-javascript/ var firstChar = selector.charAt(0); for ( ; element && element !== document; element = element[parentNode] ) {// Get closest match - if ( firstChar === '.') {// If selector is a class + if ( firstChar === '.' ) {// If selector is a class if ( queryElement(selector,element[parentNode]) !== null && hasClass(element,selector.replace('.','')) ) { return element; } } else if ( firstChar === '#' ) { // If selector is an ID if ( element.id === selector.substr(1) ) { return element; } diff --git a/lib/V4/popover-native.js b/lib/V4/popover-native.js index c0167e2c..aff618cd 100644 --- a/lib/V4/popover-native.js +++ b/lib/V4/popover-native.js @@ -42,7 +42,9 @@ var Popover = function( element, options ) { this[placement] = options[placement] ? options[placement] : placementData || top; this[delay] = parseInt(options[delay] || delayData) || 200; this[dismissible] = options[dismissible] || dismissibleData === 'true' ? true : false; - this[container] = queryElement(options[container]) || queryElement(containerData) || modal ? modal : body; + this[container] = queryElement(options[container]) ? queryElement(options[container]) + : queryElement(containerData) ? queryElement(containerData) + : modal ? modal : body; // bind, content var self = this, diff --git a/lib/V4/tooltip-native.js b/lib/V4/tooltip-native.js index a264d38f..42e9917d 100644 --- a/lib/V4/tooltip-native.js +++ b/lib/V4/tooltip-native.js @@ -30,7 +30,9 @@ var Tooltip = function( element,options ) { this[animation] = options[animation] && options[animation] !== fade ? options[animation] : animationData || fade; this[placement] = options[placement] ? options[placement] : placementData || top; this[delay] = parseInt(options[delay] || delayData) || 200; - this[container] = queryElement(options[container]) || queryElement(containerData) || modal ? modal : body; + this[container] = queryElement(options[container]) ? queryElement(options[container]) + : queryElement(containerData) ? queryElement(containerData) + : modal ? modal : body; // bind, event targets, title and constants var self = this, timer = 0, placementSetting = this[placement], tooltip = null, diff --git a/lib/V4/utils.js b/lib/V4/utils.js index 4ddfd3ba..1e81dfa6 100644 --- a/lib/V4/utils.js +++ b/lib/V4/utils.js @@ -140,7 +140,7 @@ var globalObject = typeof global !== 'undefined' ? global : this||window, // source http://gomakethings.com/climbing-up-and-down-the-dom-tree-with-vanilla-javascript/ var firstChar = selector.charAt(0); for ( ; element && element !== document; element = element[parentNode] ) {// Get closest match - if ( firstChar === '.') {// If selector is a class + if ( firstChar === '.' ) {// If selector is a class if ( queryElement(selector,element[parentNode]) !== null && hasClass(element,selector.replace('.','')) ) { return element; } } else if ( firstChar === '#' ) { // If selector is an ID if ( element.id === selector.substr(1) ) { return element; } diff --git a/v4.html b/v4.html index b484a8ae..3e03d6bb 100644 --- a/v4.html +++ b/v4.html @@ -29,6 +29,13 @@ #myCarousel .carousel-item { height: 500px; width: 100%; + -webkit-transition-timing-function: cubic-bezier(.45,.18,0,1); + transition-timing-function: cubic-bezier(.45,.18,0,1); + } + @media (max-width: 575px) { + #myCarousel .container { + width: 100%; + } } @@ -41,7 +48,7 @@ - Native JavaScript for Bootstrap + Native JavaScript for Bootstrap