Files
cdnjs/ajax/libs/angular.js/1.0.0/angular-bootstrap.min.js
T
Pete Cooper e429b95643 Updating angular.js to 1.2.9 + back fill
Sources: http://code.angularjs.org/*

Added missing versions, fixed some files reporting as min’d but
weren’t, the sneaky varmints.

Addresses https://github.com/cdnjs/cdnjs/issues/1188 - I think. Can be
closed if it does.
2014-01-23 22:01:44 +00:00

1 line
1.9 KiB
JavaScript

(function(b,a,d){var c={};c.dropdownToggle=["$document","$location","$window",function(h,i,g){var e=null,f;return{restrict:"C",link:function(l,k,j){l.$watch(function(){return i.path()},function(){f&&f()});k.parent().bind("click",function(m){f&&f()});k.bind("click",function(m){m.preventDefault();m.stopPropagation();var n=false;if(e){n=e===k;f()}if(!n){k.parent().addClass("open");e=k;f=function(o){o&&o.preventDefault();o&&o.stopPropagation();h.unbind("click",f);k.parent().removeClass("open");f=null;e=null};h.bind("click",f)}})}}}];c.tabbable=function(){return{restrict:"C",compile:function(f){var e=a.element('<ul class="nav nav-tabs"></ul>'),g=a.element('<div class="tab-content"></div>');g.append(f.contents());f.append(e).append(g)},controller:["$scope","$element",function(h,f){var e=f.contents().eq(0),j=f.controller("ngModel")||{},i=[],g;j.$render=function(){var k=this.$viewValue;if(g?(g.value!=k):k){if(g){g.paneElement.removeClass("active");g.tabElement.removeClass("active");g=null}if(k){for(var l=0,m=i.length;l<m;l++){if(k==i[l].value){g=i[l];break}}if(g){g.paneElement.addClass("active");g.tabElement.addClass("active")}}}};this.addPane=function(n,l){var k=a.element("<li><a href></a></li>"),m=k.find("a"),o={paneElement:n,paneAttrs:l,tabElement:k};i.push(o);l.$observe("value",p)();l.$observe("title",function(){p();m.text(o.title)})();function p(){o.title=l.title;o.value=l.value||l.title;if(!j.$setViewValue&&(!j.$viewValue||o==g)){j.$viewValue=o.value}j.$render()}e.append(k);k.bind("click",function(q){q.preventDefault();q.stopPropagation();if(j.$setViewValue){h.$apply(function(){j.$setViewValue(o.value);j.$render()})}else{j.$viewValue=o.value;j.$render()}});return function(){o.tabElement.remove();for(var q=0,r=i.length;q<r;q++){if(o==i[q]){i.splice(q,1)}}}}}]}};c.tabPane=function(){return{require:"^tabbable",restrict:"C",link:function(h,g,f,e){g.bind("$remove",e.addPane(g,f))}}};a.module("bootstrap",[]).directive(c)})(window,window.angular);