Skip to content

Commit 0d159c1

Browse files
committed
update angular to v1.0.5
1 parent 5e6a990 commit 0d159c1

17 files changed

+30654
-420
lines changed

public/js/lib/angular/angular-bootstrap-prettify.js

Lines changed: 1833 additions & 0 deletions
Large diffs are not rendered by default.

public/js/lib/angular/angular-bootstrap-prettify.min.js

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
/**
2+
* @license AngularJS v1.0.5
3+
* (c) 2010-2012 Google, Inc. http://angularjs.org
4+
* License: MIT
5+
*/
6+
(function(window, angular, undefined) {
7+
'use strict';
8+
9+
var directive = {};
10+
11+
directive.dropdownToggle =
12+
['$document', '$location', '$window',
13+
function ($document, $location, $window) {
14+
var openElement = null, close;
15+
return {
16+
restrict: 'C',
17+
link: function(scope, element, attrs) {
18+
scope.$watch(function dropdownTogglePathWatch(){return $location.path();}, function dropdownTogglePathWatchAction() {
19+
close && close();
20+
});
21+
22+
element.parent().bind('click', function(event) {
23+
close && close();
24+
});
25+
26+
element.bind('click', function(event) {
27+
event.preventDefault();
28+
event.stopPropagation();
29+
30+
var iWasOpen = false;
31+
32+
if (openElement) {
33+
iWasOpen = openElement === element;
34+
close();
35+
}
36+
37+
if (!iWasOpen){
38+
element.parent().addClass('open');
39+
openElement = element;
40+
41+
close = function (event) {
42+
event && event.preventDefault();
43+
event && event.stopPropagation();
44+
$document.unbind('click', close);
45+
element.parent().removeClass('open');
46+
close = null;
47+
openElement = null;
48+
}
49+
50+
$document.bind('click', close);
51+
}
52+
});
53+
}
54+
};
55+
}];
56+
57+
58+
directive.tabbable = function() {
59+
return {
60+
restrict: 'C',
61+
compile: function(element) {
62+
var navTabs = angular.element('<ul class="nav nav-tabs"></ul>'),
63+
tabContent = angular.element('<div class="tab-content"></div>');
64+
65+
tabContent.append(element.contents());
66+
element.append(navTabs).append(tabContent);
67+
},
68+
controller: ['$scope', '$element', function($scope, $element) {
69+
var navTabs = $element.contents().eq(0),
70+
ngModel = $element.controller('ngModel') || {},
71+
tabs = [],
72+
selectedTab;
73+
74+
ngModel.$render = function() {
75+
var $viewValue = this.$viewValue;
76+
77+
if (selectedTab ? (selectedTab.value != $viewValue) : $viewValue) {
78+
if(selectedTab) {
79+
selectedTab.paneElement.removeClass('active');
80+
selectedTab.tabElement.removeClass('active');
81+
selectedTab = null;
82+
}
83+
if($viewValue) {
84+
for(var i = 0, ii = tabs.length; i < ii; i++) {
85+
if ($viewValue == tabs[i].value) {
86+
selectedTab = tabs[i];
87+
break;
88+
}
89+
}
90+
if (selectedTab) {
91+
selectedTab.paneElement.addClass('active');
92+
selectedTab.tabElement.addClass('active');
93+
}
94+
}
95+
96+
}
97+
};
98+
99+
this.addPane = function(element, attr) {
100+
var li = angular.element('<li><a href></a></li>'),
101+
a = li.find('a'),
102+
tab = {
103+
paneElement: element,
104+
paneAttrs: attr,
105+
tabElement: li
106+
};
107+
108+
tabs.push(tab);
109+
110+
attr.$observe('value', update)();
111+
attr.$observe('title', function(){ update(); a.text(tab.title); })();
112+
113+
function update() {
114+
tab.title = attr.title;
115+
tab.value = attr.value || attr.title;
116+
if (!ngModel.$setViewValue && (!ngModel.$viewValue || tab == selectedTab)) {
117+
// we are not part of angular
118+
ngModel.$viewValue = tab.value;
119+
}
120+
ngModel.$render();
121+
}
122+
123+
navTabs.append(li);
124+
li.bind('click', function(event) {
125+
event.preventDefault();
126+
event.stopPropagation();
127+
if (ngModel.$setViewValue) {
128+
$scope.$apply(function() {
129+
ngModel.$setViewValue(tab.value);
130+
ngModel.$render();
131+
});
132+
} else {
133+
// we are not part of angular
134+
ngModel.$viewValue = tab.value;
135+
ngModel.$render();
136+
}
137+
});
138+
139+
return function() {
140+
tab.tabElement.remove();
141+
for(var i = 0, ii = tabs.length; i < ii; i++ ) {
142+
if (tab == tabs[i]) {
143+
tabs.splice(i, 1);
144+
}
145+
}
146+
};
147+
}
148+
}]
149+
};
150+
};
151+
152+
153+
directive.tabPane = function() {
154+
return {
155+
require: '^tabbable',
156+
restrict: 'C',
157+
link: function(scope, element, attrs, tabsCtrl) {
158+
element.bind('$remove', tabsCtrl.addPane(element, attrs));
159+
}
160+
};
161+
};
162+
163+
164+
angular.module('bootstrap', []).directive(directive);
165+
166+
})(window, window.angular);

public/js/lib/angular/angular-bootstrap.min.js

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/lib/angular/angular-cookies.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.0.3
2+
* @license AngularJS v1.0.5
33
* (c) 2010-2012 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -25,6 +25,18 @@ angular.module('ngCookies', ['ng']).
2525
* this object, new cookies are created/deleted at the end of current $eval.
2626
*
2727
* @example
28+
<doc:example>
29+
<doc:source>
30+
<script>
31+
function ExampleController($cookies) {
32+
// Retrieving a cookie
33+
var favoriteCookie = $cookies.myFavorite;
34+
// Setting a cookie
35+
$cookies.myFavorite = 'oatmeal';
36+
}
37+
</script>
38+
</doc:source>
39+
</doc:example>
2840
*/
2941
factory('$cookies', ['$rootScope', '$browser', function ($rootScope, $browser) {
3042
var cookies = {},

public/js/lib/angular/angular-cookies.min.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
AngularJS v1.0.3
2+
AngularJS v1.0.5
33
(c) 2010-2012 Google, Inc. http://angularjs.org
44
License: MIT
55
*/

public/js/lib/angular/angular-loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.0.3
2+
* @license AngularJS v1.0.5
33
* (c) 2010-2012 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/

public/js/lib/angular/angular-loader.min.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
AngularJS v1.0.3
2+
AngularJS v1.0.5
33
(c) 2010-2012 Google, Inc. http://angularjs.org
44
License: MIT
55
*/

0 commit comments

Comments
 (0)