rails-angular-strap 2.1.6 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (194) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -10
  3. data/lib/rails-angular-strap/version.rb +1 -1
  4. data/vendor/assets/javascripts/angular-strap.js +1 -1
  5. data/vendor/assets/javascripts/angular-strap.min.js +1 -1
  6. data/vendor/assets/javascripts/angular-strap/angular-strap.js +1405 -1104
  7. data/vendor/assets/javascripts/angular-strap/angular-strap.min.js +4 -5
  8. data/vendor/assets/javascripts/angular-strap/angular-strap.tpl.js +15 -15
  9. data/vendor/assets/javascripts/angular-strap/angular-strap.tpl.min.js +2 -2
  10. metadata +2 -192
  11. data/vendor/assets/javascripts/angular-strap-unstable.js +0 -2
  12. data/vendor/assets/javascripts/angular-strap-unstable.min.js +0 -2
  13. data/vendor/assets/javascripts/angular-strap/angular-strap.min.js.map +0 -1
  14. data/vendor/assets/javascripts/angular-strap/modules/affix.js +0 -249
  15. data/vendor/assets/javascripts/angular-strap/modules/affix.min.js +0 -9
  16. data/vendor/assets/javascripts/angular-strap/modules/affix.min.js.map +0 -1
  17. data/vendor/assets/javascripts/angular-strap/modules/alert.js +0 -120
  18. data/vendor/assets/javascripts/angular-strap/modules/alert.min.js +0 -9
  19. data/vendor/assets/javascripts/angular-strap/modules/alert.min.js.map +0 -1
  20. data/vendor/assets/javascripts/angular-strap/modules/alert.tpl.js +0 -14
  21. data/vendor/assets/javascripts/angular-strap/modules/alert.tpl.min.js +0 -8
  22. data/vendor/assets/javascripts/angular-strap/modules/aside.js +0 -96
  23. data/vendor/assets/javascripts/angular-strap/modules/aside.min.js +0 -9
  24. data/vendor/assets/javascripts/angular-strap/modules/aside.min.js.map +0 -1
  25. data/vendor/assets/javascripts/angular-strap/modules/aside.tpl.js +0 -14
  26. data/vendor/assets/javascripts/angular-strap/modules/aside.tpl.min.js +0 -8
  27. data/vendor/assets/javascripts/angular-strap/modules/button.js +0 -177
  28. data/vendor/assets/javascripts/angular-strap/modules/button.min.js +0 -9
  29. data/vendor/assets/javascripts/angular-strap/modules/button.min.js.map +0 -1
  30. data/vendor/assets/javascripts/angular-strap/modules/collapse.js +0 -273
  31. data/vendor/assets/javascripts/angular-strap/modules/collapse.min.js +0 -9
  32. data/vendor/assets/javascripts/angular-strap/modules/collapse.min.js.map +0 -1
  33. data/vendor/assets/javascripts/angular-strap/modules/date-formatter.js +0 -61
  34. data/vendor/assets/javascripts/angular-strap/modules/date-formatter.min.js +0 -9
  35. data/vendor/assets/javascripts/angular-strap/modules/date-formatter.min.js.map +0 -1
  36. data/vendor/assets/javascripts/angular-strap/modules/date-parser.js +0 -273
  37. data/vendor/assets/javascripts/angular-strap/modules/date-parser.min.js +0 -9
  38. data/vendor/assets/javascripts/angular-strap/modules/date-parser.min.js.map +0 -1
  39. data/vendor/assets/javascripts/angular-strap/modules/datepicker.js +0 -640
  40. data/vendor/assets/javascripts/angular-strap/modules/datepicker.min.js +0 -9
  41. data/vendor/assets/javascripts/angular-strap/modules/datepicker.min.js.map +0 -1
  42. data/vendor/assets/javascripts/angular-strap/modules/datepicker.tpl.js +0 -14
  43. data/vendor/assets/javascripts/angular-strap/modules/datepicker.tpl.min.js +0 -8
  44. data/vendor/assets/javascripts/angular-strap/modules/debounce.js +0 -62
  45. data/vendor/assets/javascripts/angular-strap/modules/debounce.min.js +0 -9
  46. data/vendor/assets/javascripts/angular-strap/modules/debounce.min.js.map +0 -1
  47. data/vendor/assets/javascripts/angular-strap/modules/dimensions.js +0 -156
  48. data/vendor/assets/javascripts/angular-strap/modules/dimensions.min.js +0 -9
  49. data/vendor/assets/javascripts/angular-strap/modules/dimensions.min.js.map +0 -1
  50. data/vendor/assets/javascripts/angular-strap/modules/dropdown.js +0 -149
  51. data/vendor/assets/javascripts/angular-strap/modules/dropdown.min.js +0 -9
  52. data/vendor/assets/javascripts/angular-strap/modules/dropdown.min.js.map +0 -1
  53. data/vendor/assets/javascripts/angular-strap/modules/dropdown.tpl.js +0 -14
  54. data/vendor/assets/javascripts/angular-strap/modules/dropdown.tpl.min.js +0 -8
  55. data/vendor/assets/javascripts/angular-strap/modules/modal.js +0 -349
  56. data/vendor/assets/javascripts/angular-strap/modules/modal.min.js +0 -9
  57. data/vendor/assets/javascripts/angular-strap/modules/modal.min.js.map +0 -1
  58. data/vendor/assets/javascripts/angular-strap/modules/modal.tpl.js +0 -14
  59. data/vendor/assets/javascripts/angular-strap/modules/modal.tpl.min.js +0 -8
  60. data/vendor/assets/javascripts/angular-strap/modules/navbar.js +0 -72
  61. data/vendor/assets/javascripts/angular-strap/modules/navbar.min.js +0 -9
  62. data/vendor/assets/javascripts/angular-strap/modules/navbar.min.js.map +0 -1
  63. data/vendor/assets/javascripts/angular-strap/modules/parse-options.js +0 -76
  64. data/vendor/assets/javascripts/angular-strap/modules/parse-options.min.js +0 -9
  65. data/vendor/assets/javascripts/angular-strap/modules/parse-options.min.js.map +0 -1
  66. data/vendor/assets/javascripts/angular-strap/modules/popover.js +0 -112
  67. data/vendor/assets/javascripts/angular-strap/modules/popover.min.js +0 -9
  68. data/vendor/assets/javascripts/angular-strap/modules/popover.min.js.map +0 -1
  69. data/vendor/assets/javascripts/angular-strap/modules/popover.tpl.js +0 -14
  70. data/vendor/assets/javascripts/angular-strap/modules/popover.tpl.min.js +0 -8
  71. data/vendor/assets/javascripts/angular-strap/modules/raf.js +0 -61
  72. data/vendor/assets/javascripts/angular-strap/modules/raf.min.js +0 -9
  73. data/vendor/assets/javascripts/angular-strap/modules/raf.min.js.map +0 -1
  74. data/vendor/assets/javascripts/angular-strap/modules/scrollspy.js +0 -261
  75. data/vendor/assets/javascripts/angular-strap/modules/scrollspy.min.js +0 -9
  76. data/vendor/assets/javascripts/angular-strap/modules/scrollspy.min.js.map +0 -1
  77. data/vendor/assets/javascripts/angular-strap/modules/select.js +0 -325
  78. data/vendor/assets/javascripts/angular-strap/modules/select.min.js +0 -9
  79. data/vendor/assets/javascripts/angular-strap/modules/select.min.js.map +0 -1
  80. data/vendor/assets/javascripts/angular-strap/modules/select.tpl.js +0 -14
  81. data/vendor/assets/javascripts/angular-strap/modules/select.tpl.min.js +0 -8
  82. data/vendor/assets/javascripts/angular-strap/modules/tab.js +0 -186
  83. data/vendor/assets/javascripts/angular-strap/modules/tab.min.js +0 -9
  84. data/vendor/assets/javascripts/angular-strap/modules/tab.min.js.map +0 -1
  85. data/vendor/assets/javascripts/angular-strap/modules/tab.tpl.js +0 -14
  86. data/vendor/assets/javascripts/angular-strap/modules/tab.tpl.min.js +0 -8
  87. data/vendor/assets/javascripts/angular-strap/modules/timepicker.js +0 -485
  88. data/vendor/assets/javascripts/angular-strap/modules/timepicker.min.js +0 -9
  89. data/vendor/assets/javascripts/angular-strap/modules/timepicker.min.js.map +0 -1
  90. data/vendor/assets/javascripts/angular-strap/modules/timepicker.tpl.js +0 -14
  91. data/vendor/assets/javascripts/angular-strap/modules/timepicker.tpl.min.js +0 -8
  92. data/vendor/assets/javascripts/angular-strap/modules/tooltip.js +0 -690
  93. data/vendor/assets/javascripts/angular-strap/modules/tooltip.min.js +0 -9
  94. data/vendor/assets/javascripts/angular-strap/modules/tooltip.min.js.map +0 -1
  95. data/vendor/assets/javascripts/angular-strap/modules/tooltip.tpl.js +0 -14
  96. data/vendor/assets/javascripts/angular-strap/modules/tooltip.tpl.min.js +0 -8
  97. data/vendor/assets/javascripts/angular-strap/modules/typeahead.js +0 -266
  98. data/vendor/assets/javascripts/angular-strap/modules/typeahead.min.js +0 -9
  99. data/vendor/assets/javascripts/angular-strap/modules/typeahead.min.js.map +0 -1
  100. data/vendor/assets/javascripts/angular-strap/modules/typeahead.tpl.js +0 -14
  101. data/vendor/assets/javascripts/angular-strap/modules/typeahead.tpl.min.js +0 -8
  102. data/vendor/assets/javascripts/angular-strap/unstable/angular-strap.js +0 -5040
  103. data/vendor/assets/javascripts/angular-strap/unstable/angular-strap.min.js +0 -11
  104. data/vendor/assets/javascripts/angular-strap/unstable/angular-strap.min.js.map +0 -1
  105. data/vendor/assets/javascripts/angular-strap/unstable/angular-strap.tpl.js +0 -89
  106. data/vendor/assets/javascripts/angular-strap/unstable/angular-strap.tpl.min.js +0 -8
  107. data/vendor/assets/javascripts/angular-strap/unstable/modules/affix.js +0 -249
  108. data/vendor/assets/javascripts/angular-strap/unstable/modules/affix.min.js +0 -9
  109. data/vendor/assets/javascripts/angular-strap/unstable/modules/affix.min.js.map +0 -1
  110. data/vendor/assets/javascripts/angular-strap/unstable/modules/alert.js +0 -120
  111. data/vendor/assets/javascripts/angular-strap/unstable/modules/alert.min.js +0 -9
  112. data/vendor/assets/javascripts/angular-strap/unstable/modules/alert.min.js.map +0 -1
  113. data/vendor/assets/javascripts/angular-strap/unstable/modules/alert.tpl.js +0 -14
  114. data/vendor/assets/javascripts/angular-strap/unstable/modules/alert.tpl.min.js +0 -8
  115. data/vendor/assets/javascripts/angular-strap/unstable/modules/aside.js +0 -96
  116. data/vendor/assets/javascripts/angular-strap/unstable/modules/aside.min.js +0 -9
  117. data/vendor/assets/javascripts/angular-strap/unstable/modules/aside.min.js.map +0 -1
  118. data/vendor/assets/javascripts/angular-strap/unstable/modules/aside.tpl.js +0 -14
  119. data/vendor/assets/javascripts/angular-strap/unstable/modules/aside.tpl.min.js +0 -8
  120. data/vendor/assets/javascripts/angular-strap/unstable/modules/button.js +0 -177
  121. data/vendor/assets/javascripts/angular-strap/unstable/modules/button.min.js +0 -9
  122. data/vendor/assets/javascripts/angular-strap/unstable/modules/button.min.js.map +0 -1
  123. data/vendor/assets/javascripts/angular-strap/unstable/modules/collapse.js +0 -273
  124. data/vendor/assets/javascripts/angular-strap/unstable/modules/collapse.min.js +0 -9
  125. data/vendor/assets/javascripts/angular-strap/unstable/modules/collapse.min.js.map +0 -1
  126. data/vendor/assets/javascripts/angular-strap/unstable/modules/date-formatter.js +0 -61
  127. data/vendor/assets/javascripts/angular-strap/unstable/modules/date-formatter.min.js +0 -9
  128. data/vendor/assets/javascripts/angular-strap/unstable/modules/date-formatter.min.js.map +0 -1
  129. data/vendor/assets/javascripts/angular-strap/unstable/modules/date-parser.js +0 -273
  130. data/vendor/assets/javascripts/angular-strap/unstable/modules/date-parser.min.js +0 -9
  131. data/vendor/assets/javascripts/angular-strap/unstable/modules/date-parser.min.js.map +0 -1
  132. data/vendor/assets/javascripts/angular-strap/unstable/modules/datepicker.js +0 -640
  133. data/vendor/assets/javascripts/angular-strap/unstable/modules/datepicker.min.js +0 -9
  134. data/vendor/assets/javascripts/angular-strap/unstable/modules/datepicker.min.js.map +0 -1
  135. data/vendor/assets/javascripts/angular-strap/unstable/modules/datepicker.tpl.js +0 -14
  136. data/vendor/assets/javascripts/angular-strap/unstable/modules/datepicker.tpl.min.js +0 -8
  137. data/vendor/assets/javascripts/angular-strap/unstable/modules/debounce.js +0 -62
  138. data/vendor/assets/javascripts/angular-strap/unstable/modules/debounce.min.js +0 -9
  139. data/vendor/assets/javascripts/angular-strap/unstable/modules/debounce.min.js.map +0 -1
  140. data/vendor/assets/javascripts/angular-strap/unstable/modules/dimensions.js +0 -156
  141. data/vendor/assets/javascripts/angular-strap/unstable/modules/dimensions.min.js +0 -9
  142. data/vendor/assets/javascripts/angular-strap/unstable/modules/dimensions.min.js.map +0 -1
  143. data/vendor/assets/javascripts/angular-strap/unstable/modules/dropdown.js +0 -149
  144. data/vendor/assets/javascripts/angular-strap/unstable/modules/dropdown.min.js +0 -9
  145. data/vendor/assets/javascripts/angular-strap/unstable/modules/dropdown.min.js.map +0 -1
  146. data/vendor/assets/javascripts/angular-strap/unstable/modules/dropdown.tpl.js +0 -14
  147. data/vendor/assets/javascripts/angular-strap/unstable/modules/dropdown.tpl.min.js +0 -8
  148. data/vendor/assets/javascripts/angular-strap/unstable/modules/modal.js +0 -357
  149. data/vendor/assets/javascripts/angular-strap/unstable/modules/modal.min.js +0 -9
  150. data/vendor/assets/javascripts/angular-strap/unstable/modules/modal.min.js.map +0 -1
  151. data/vendor/assets/javascripts/angular-strap/unstable/modules/modal.tpl.js +0 -14
  152. data/vendor/assets/javascripts/angular-strap/unstable/modules/modal.tpl.min.js +0 -8
  153. data/vendor/assets/javascripts/angular-strap/unstable/modules/navbar.js +0 -72
  154. data/vendor/assets/javascripts/angular-strap/unstable/modules/navbar.min.js +0 -9
  155. data/vendor/assets/javascripts/angular-strap/unstable/modules/navbar.min.js.map +0 -1
  156. data/vendor/assets/javascripts/angular-strap/unstable/modules/parse-options.js +0 -76
  157. data/vendor/assets/javascripts/angular-strap/unstable/modules/parse-options.min.js +0 -9
  158. data/vendor/assets/javascripts/angular-strap/unstable/modules/parse-options.min.js.map +0 -1
  159. data/vendor/assets/javascripts/angular-strap/unstable/modules/popover.js +0 -112
  160. data/vendor/assets/javascripts/angular-strap/unstable/modules/popover.min.js +0 -9
  161. data/vendor/assets/javascripts/angular-strap/unstable/modules/popover.min.js.map +0 -1
  162. data/vendor/assets/javascripts/angular-strap/unstable/modules/popover.tpl.js +0 -14
  163. data/vendor/assets/javascripts/angular-strap/unstable/modules/popover.tpl.min.js +0 -8
  164. data/vendor/assets/javascripts/angular-strap/unstable/modules/raf.js +0 -61
  165. data/vendor/assets/javascripts/angular-strap/unstable/modules/raf.min.js +0 -9
  166. data/vendor/assets/javascripts/angular-strap/unstable/modules/raf.min.js.map +0 -1
  167. data/vendor/assets/javascripts/angular-strap/unstable/modules/scrollspy.js +0 -261
  168. data/vendor/assets/javascripts/angular-strap/unstable/modules/scrollspy.min.js +0 -9
  169. data/vendor/assets/javascripts/angular-strap/unstable/modules/scrollspy.min.js.map +0 -1
  170. data/vendor/assets/javascripts/angular-strap/unstable/modules/select.js +0 -328
  171. data/vendor/assets/javascripts/angular-strap/unstable/modules/select.min.js +0 -9
  172. data/vendor/assets/javascripts/angular-strap/unstable/modules/select.min.js.map +0 -1
  173. data/vendor/assets/javascripts/angular-strap/unstable/modules/select.tpl.js +0 -14
  174. data/vendor/assets/javascripts/angular-strap/unstable/modules/select.tpl.min.js +0 -8
  175. data/vendor/assets/javascripts/angular-strap/unstable/modules/tab.js +0 -186
  176. data/vendor/assets/javascripts/angular-strap/unstable/modules/tab.min.js +0 -9
  177. data/vendor/assets/javascripts/angular-strap/unstable/modules/tab.min.js.map +0 -1
  178. data/vendor/assets/javascripts/angular-strap/unstable/modules/tab.tpl.js +0 -14
  179. data/vendor/assets/javascripts/angular-strap/unstable/modules/tab.tpl.min.js +0 -8
  180. data/vendor/assets/javascripts/angular-strap/unstable/modules/timepicker.js +0 -485
  181. data/vendor/assets/javascripts/angular-strap/unstable/modules/timepicker.min.js +0 -9
  182. data/vendor/assets/javascripts/angular-strap/unstable/modules/timepicker.min.js.map +0 -1
  183. data/vendor/assets/javascripts/angular-strap/unstable/modules/timepicker.tpl.js +0 -14
  184. data/vendor/assets/javascripts/angular-strap/unstable/modules/timepicker.tpl.min.js +0 -8
  185. data/vendor/assets/javascripts/angular-strap/unstable/modules/tooltip.js +0 -705
  186. data/vendor/assets/javascripts/angular-strap/unstable/modules/tooltip.min.js +0 -9
  187. data/vendor/assets/javascripts/angular-strap/unstable/modules/tooltip.min.js.map +0 -1
  188. data/vendor/assets/javascripts/angular-strap/unstable/modules/tooltip.tpl.js +0 -14
  189. data/vendor/assets/javascripts/angular-strap/unstable/modules/tooltip.tpl.min.js +0 -8
  190. data/vendor/assets/javascripts/angular-strap/unstable/modules/typeahead.js +0 -266
  191. data/vendor/assets/javascripts/angular-strap/unstable/modules/typeahead.min.js +0 -9
  192. data/vendor/assets/javascripts/angular-strap/unstable/modules/typeahead.min.js.map +0 -1
  193. data/vendor/assets/javascripts/angular-strap/unstable/modules/typeahead.tpl.js +0 -14
  194. data/vendor/assets/javascripts/angular-strap/unstable/modules/typeahead.tpl.min.js +0 -8
@@ -1,9 +0,0 @@
1
- /**
2
- * angular-strap
3
- * @version v2.1.6 - 2015-02-08
4
- * @link http://mgcrea.github.io/angular-strap
5
- * @author Olivier Louvignes (olivier@mg-crea.com)
6
- * @license MIT License, http://www.opensource.org/licenses/MIT
7
- */
8
- "use strict";angular.module("mgcrea.ngStrap.navbar",[]).provider("$navbar",function(){var t=this.defaults={activeClass:"active",routeAttr:"data-match-route",strict:!1};this.$get=function(){return{defaults:t}}}).directive("bsNavbar",["$window","$location","$navbar",function(t,a,r){var e=r.defaults;return{restrict:"A",link:function(t,r,n){var i=angular.copy(e);angular.forEach(Object.keys(e),function(t){angular.isDefined(n[t])&&(i[t]=n[t])}),t.$watch(function(){return a.path()},function(t){var a=r[0].querySelectorAll("li["+i.routeAttr+"]");angular.forEach(a,function(a){var r=angular.element(a),e=r.attr(i.routeAttr).replace("/","\\/");i.strict&&(e="^"+e+"$");var n=new RegExp(e,["i"]);n.test(t)?r.addClass(i.activeClass):r.removeClass(i.activeClass)})})}}}]);
9
- //# sourceMappingURL=navbar.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["navbar.min.js"],"names":["angular","module","provider","defaults","this","activeClass","routeAttr","strict","$get","directive","$window","$location","$navbar","restrict","link","scope","element","attr","options","copy","forEach","Object","keys","key","isDefined","$watch","path","newValue","liElements","querySelectorAll","li","liElement","pattern","replace","regexp","RegExp","test","addClass","removeClass"],"mappings":"AAOA,YAEAA,SAAQC,OAAO,4BAEZC,SAAS,UAAW,WAEnB,GAAIC,GAAWC,KAAKD,UAClBE,YAAa,SACbC,UAAW,mBACXC,QAAQ,EAGVH,MAAKI,KAAO,WACV,OAAQL,SAAUA,MAKrBM,UAAU,YAAa,UAAW,YAAa,UAAW,SAASC,EAASC,EAAWC,GAEtF,GAAIT,GAAWS,EAAQT,QAEvB,QACEU,SAAU,IACVC,KAAM,SAAkBC,EAAOC,EAASC,GAGtC,GAAIC,GAAUlB,QAAQmB,KAAKhB,EAC3BH,SAAQoB,QAAQC,OAAOC,KAAKnB,GAAW,SAASoB,GAC3CvB,QAAQwB,UAAUP,EAAKM,MAAOL,EAAQK,GAAON,EAAKM,MAIvDR,EAAMU,OAAO,WAEX,MAAOd,GAAUe,QAEhB,SAASC,GAEV,GAAIC,GAAaZ,EAAQ,GAAGa,iBAAiB,MAAQX,EAAQZ,UAAY,IAEzEN,SAAQoB,QAAQQ,EAAY,SAASE,GAEnC,GAAIC,GAAY/B,QAAQgB,QAAQc,GAC5BE,EAAUD,EAAUd,KAAKC,EAAQZ,WAAW2B,QAAQ,IAAK,MAC1Df,GAAQX,SACTyB,EAAU,IAAMA,EAAU,IAE5B,IAAIE,GAAS,GAAIC,QAAOH,GAAU,KAE/BE,GAAOE,KAAKT,GACbI,EAAUM,SAASnB,EAAQb,aAE3B0B,EAAUO,YAAYpB,EAAQb","file":"navbar.min.js","sourcesContent":[null],"sourceRoot":"/source/"}
@@ -1,76 +0,0 @@
1
- /**
2
- * angular-strap
3
- * @version v2.1.6 - 2015-02-08
4
- * @link http://mgcrea.github.io/angular-strap
5
- * @author Olivier Louvignes (olivier@mg-crea.com)
6
- * @license MIT License, http://www.opensource.org/licenses/MIT
7
- */
8
- 'use strict';
9
-
10
- angular.module('mgcrea.ngStrap.helpers.parseOptions', [])
11
-
12
- .provider('$parseOptions', function() {
13
-
14
- var defaults = this.defaults = {
15
- regexp: /^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/
16
- };
17
-
18
- this.$get = ["$parse", "$q", function($parse, $q) {
19
-
20
- function ParseOptionsFactory(attr, config) {
21
-
22
- var $parseOptions = {};
23
-
24
- // Common vars
25
- var options = angular.extend({}, defaults, config);
26
- $parseOptions.$values = [];
27
-
28
- // Private vars
29
- var match, displayFn, valueName, keyName, groupByFn, valueFn, valuesFn;
30
-
31
- $parseOptions.init = function() {
32
- $parseOptions.$match = match = attr.match(options.regexp);
33
- displayFn = $parse(match[2] || match[1]),
34
- valueName = match[4] || match[6],
35
- keyName = match[5],
36
- groupByFn = $parse(match[3] || ''),
37
- valueFn = $parse(match[2] ? match[1] : valueName),
38
- valuesFn = $parse(match[7]);
39
- };
40
-
41
- $parseOptions.valuesFn = function(scope, controller) {
42
- return $q.when(valuesFn(scope, controller))
43
- .then(function(values) {
44
- $parseOptions.$values = values ? parseValues(values, scope) : {};
45
- return $parseOptions.$values;
46
- });
47
- };
48
-
49
- $parseOptions.displayValue = function(modelValue) {
50
- var scope = {};
51
- scope[valueName] = modelValue;
52
- return displayFn(scope);
53
- };
54
-
55
- // Private functions
56
-
57
- function parseValues(values, scope) {
58
- return values.map(function(match, index) {
59
- var locals = {}, label, value;
60
- locals[valueName] = match;
61
- label = displayFn(scope, locals);
62
- value = valueFn(scope, locals);
63
- return {label: label, value: value, index: index};
64
- });
65
- }
66
-
67
- $parseOptions.init();
68
- return $parseOptions;
69
-
70
- }
71
-
72
- return ParseOptionsFactory;
73
-
74
- }];
75
-
76
- });
@@ -1,9 +0,0 @@
1
- /**
2
- * angular-strap
3
- * @version v2.1.6 - 2015-02-08
4
- * @link http://mgcrea.github.io/angular-strap
5
- * @author Olivier Louvignes (olivier@mg-crea.com)
6
- * @license MIT License, http://www.opensource.org/licenses/MIT
7
- */
8
- "use strict";angular.module("mgcrea.ngStrap.helpers.parseOptions",[]).provider("$parseOptions",function(){var n=this.defaults={regexp:/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/};this.$get=["$parse","$q",function(r,e){function s(s,t){function a(n,r){return n.map(function(n,e){var s,t,a={};return a[c]=n,s=$(r,a),t=f(r,a),{label:s,value:t,index:e}})}var u={},i=angular.extend({},n,t);u.$values=[];var o,$,c,l,p,f,v;return u.init=function(){u.$match=o=s.match(i.regexp),$=r(o[2]||o[1]),c=o[4]||o[6],l=o[5],p=r(o[3]||""),f=r(o[2]?o[1]:c),v=r(o[7])},u.valuesFn=function(n,r){return e.when(v(n,r)).then(function(r){return u.$values=r?a(r,n):{},u.$values})},u.displayValue=function(n){var r={};return r[c]=n,$(r)},u.init(),u}return s}]});
9
- //# sourceMappingURL=parse-options.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["parse-options.min.js"],"names":["angular","module","provider","defaults","this","regexp","$get","$parse","$q","ParseOptionsFactory","attr","config","parseValues","values","scope","map","match","index","label","value","locals","valueName","displayFn","valueFn","$parseOptions","options","extend","$values","keyName","groupByFn","valuesFn","init","$match","controller","when","then","displayValue","modelValue"],"mappings":"AAOA,YAEAA,SAAQC,OAAO,0CAEZC,SAAS,gBAAiB,WAEzB,GAAIC,GAAWC,KAAKD,UAClBE,OAAQ,+KAGVD,MAAKE,MAAQ,SAAU,KAAM,SAASC,EAAQC,GAE5C,QAASC,GAAoBC,EAAMC,GAqCjC,QAASC,GAAYC,EAAQC,GAC3B,MAAOD,GAAOE,IAAI,SAASC,EAAOC,GAChC,GAAiBC,GAAOC,EAApBC,IAIJ,OAHAA,GAAOC,GAAaL,EACpBE,EAAQI,EAAUR,EAAOM,GACzBD,EAAQI,EAAQT,EAAOM,IACfF,MAAOA,EAAOC,MAAOA,EAAOF,MAAOA,KAzC/C,GAAIO,MAGAC,EAAUzB,QAAQ0B,UAAWvB,EAAUQ,EAC3Ca,GAAcG,UAGd,IAAIX,GAAOM,EAAWD,EAAWO,EAASC,EAAWN,EAASO,CAuC9D,OArCAN,GAAcO,KAAO,WACnBP,EAAcQ,OAAShB,EAAQN,EAAKM,MAAMS,EAAQpB,QAClDiB,EAAYf,EAAOS,EAAM,IAAMA,EAAM,IACrCK,EAAYL,EAAM,IAAMA,EAAM,GAC9BY,EAAUZ,EAAM,GAChBa,EAAYtB,EAAOS,EAAM,IAAM,IAC/BO,EAAUhB,EAAOS,EAAM,GAAKA,EAAM,GAAKK,GACvCS,EAAWvB,EAAOS,EAAM,KAG1BQ,EAAcM,SAAW,SAAShB,EAAOmB,GACvC,MAAOzB,GAAG0B,KAAKJ,EAAShB,EAAOmB,IAC9BE,KAAK,SAAStB,GAEb,MADAW,GAAcG,QAAUd,EAASD,EAAYC,EAAQC,MAC9CU,EAAcG,WAIzBH,EAAcY,aAAe,SAASC,GACpC,GAAIvB,KAEJ,OADAA,GAAMO,GAAagB,EACZf,EAAUR,IAenBU,EAAcO,OACPP,EAIT,MAAOf","file":"parse-options.min.js","sourcesContent":[null],"sourceRoot":"/source/"}
@@ -1,112 +0,0 @@
1
- /**
2
- * angular-strap
3
- * @version v2.1.6 - 2015-02-08
4
- * @link http://mgcrea.github.io/angular-strap
5
- * @author Olivier Louvignes (olivier@mg-crea.com)
6
- * @license MIT License, http://www.opensource.org/licenses/MIT
7
- */
8
- 'use strict';
9
-
10
- angular.module('mgcrea.ngStrap.popover', ['mgcrea.ngStrap.tooltip'])
11
-
12
- .provider('$popover', function() {
13
-
14
- var defaults = this.defaults = {
15
- animation: 'am-fade',
16
- customClass: '',
17
- container: false,
18
- target: false,
19
- placement: 'right',
20
- template: 'popover/popover.tpl.html',
21
- contentTemplate: false,
22
- trigger: 'click',
23
- keyboard: true,
24
- html: false,
25
- title: '',
26
- content: '',
27
- delay: 0,
28
- autoClose: false
29
- };
30
-
31
- this.$get = ["$tooltip", function($tooltip) {
32
-
33
- function PopoverFactory(element, config) {
34
-
35
- // Common vars
36
- var options = angular.extend({}, defaults, config);
37
-
38
- var $popover = $tooltip(element, options);
39
-
40
- // Support scope as string options [/*title, */content]
41
- if(options.content) {
42
- $popover.$scope.content = options.content;
43
- }
44
-
45
- return $popover;
46
-
47
- }
48
-
49
- return PopoverFactory;
50
-
51
- }];
52
-
53
- })
54
-
55
- .directive('bsPopover', ["$window", "$sce", "$popover", function($window, $sce, $popover) {
56
-
57
- var requestAnimationFrame = $window.requestAnimationFrame || $window.setTimeout;
58
-
59
- return {
60
- restrict: 'EAC',
61
- scope: true,
62
- link: function postLink(scope, element, attr) {
63
-
64
- // Directive options
65
- var options = {scope: scope};
66
- angular.forEach(['template', 'contentTemplate', 'placement', 'container', 'target', 'delay', 'trigger', 'keyboard', 'html', 'animation', 'customClass', 'autoClose', 'id'], function(key) {
67
- if(angular.isDefined(attr[key])) options[key] = attr[key];
68
- });
69
-
70
- // Support scope as data-attrs
71
- angular.forEach(['title', 'content'], function(key) {
72
- attr[key] && attr.$observe(key, function(newValue, oldValue) {
73
- scope[key] = $sce.trustAsHtml(newValue);
74
- angular.isDefined(oldValue) && requestAnimationFrame(function() {
75
- popover && popover.$applyPlacement();
76
- });
77
- });
78
- });
79
-
80
- // Support scope as an object
81
- attr.bsPopover && scope.$watch(attr.bsPopover, function(newValue, oldValue) {
82
- if(angular.isObject(newValue)) {
83
- angular.extend(scope, newValue);
84
- } else {
85
- scope.content = newValue;
86
- }
87
- angular.isDefined(oldValue) && requestAnimationFrame(function() {
88
- popover && popover.$applyPlacement();
89
- });
90
- }, true);
91
-
92
- // Visibility binding support
93
- attr.bsShow && scope.$watch(attr.bsShow, function(newValue, oldValue) {
94
- if(!popover || !angular.isDefined(newValue)) return;
95
- if(angular.isString(newValue)) newValue = !!newValue.match(/true|,?(popover),?/i);
96
- newValue === true ? popover.show() : popover.hide();
97
- });
98
-
99
- // Initialize popover
100
- var popover = $popover(element, options);
101
-
102
- // Garbage collection
103
- scope.$on('$destroy', function() {
104
- if (popover) popover.destroy();
105
- options = null;
106
- popover = null;
107
- });
108
-
109
- }
110
- };
111
-
112
- }]);
@@ -1,9 +0,0 @@
1
- /**
2
- * angular-strap
3
- * @version v2.1.6 - 2015-02-08
4
- * @link http://mgcrea.github.io/angular-strap
5
- * @author Olivier Louvignes (olivier@mg-crea.com)
6
- * @license MIT License, http://www.opensource.org/licenses/MIT
7
- */
8
- "use strict";angular.module("mgcrea.ngStrap.popover",["mgcrea.ngStrap.tooltip"]).provider("$popover",function(){var t=this.defaults={animation:"am-fade",customClass:"",container:!1,target:!1,placement:"right",template:"popover/popover.tpl.html",contentTemplate:!1,trigger:"click",keyboard:!0,html:!1,title:"",content:"",delay:0,autoClose:!1};this.$get=["$tooltip",function(e){function n(n,o){var a=angular.extend({},t,o),r=e(n,a);return a.content&&(r.$scope.content=a.content),r}return n}]}).directive("bsPopover",["$window","$sce","$popover",function(t,e,n){var o=t.requestAnimationFrame||t.setTimeout;return{restrict:"EAC",scope:!0,link:function(t,a,r){var i={scope:t};angular.forEach(["template","contentTemplate","placement","container","target","delay","trigger","keyboard","html","animation","customClass","autoClose","id"],function(t){angular.isDefined(r[t])&&(i[t]=r[t])}),angular.forEach(["title","content"],function(n){r[n]&&r.$observe(n,function(a,r){t[n]=e.trustAsHtml(a),angular.isDefined(r)&&o(function(){c&&c.$applyPlacement()})})}),r.bsPopover&&t.$watch(r.bsPopover,function(e,n){angular.isObject(e)?angular.extend(t,e):t.content=e,angular.isDefined(n)&&o(function(){c&&c.$applyPlacement()})},!0),r.bsShow&&t.$watch(r.bsShow,function(t){c&&angular.isDefined(t)&&(angular.isString(t)&&(t=!!t.match(/true|,?(popover),?/i)),t===!0?c.show():c.hide())});var c=n(a,i);t.$on("$destroy",function(){c&&c.destroy(),i=null,c=null})}}}]);
9
- //# sourceMappingURL=popover.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["popover.min.js"],"names":["angular","module","provider","defaults","this","animation","customClass","container","target","placement","template","contentTemplate","trigger","keyboard","html","title","content","delay","autoClose","$get","$tooltip","PopoverFactory","element","config","options","extend","$popover","$scope","directive","$window","$sce","requestAnimationFrame","setTimeout","restrict","scope","link","attr","forEach","key","isDefined","$observe","newValue","oldValue","trustAsHtml","popover","$applyPlacement","bsPopover","$watch","isObject","bsShow","isString","match","show","hide","$on","destroy"],"mappings":"AAOA,YAEAA,SAAQC,OAAO,0BAA2B,2BAEvCC,SAAS,WAAY,WAEpB,GAAIC,GAAWC,KAAKD,UAClBE,UAAW,UACXC,YAAa,GACbC,WAAW,EACXC,QAAQ,EACRC,UAAW,QACXC,SAAU,2BACVC,iBAAiB,EACjBC,QAAS,QACTC,UAAU,EACVC,MAAM,EACNC,MAAO,GACPC,QAAS,GACTC,MAAO,EACPC,WAAW,EAGbd,MAAKe,MAAQ,WAAY,SAASC,GAEhC,QAASC,GAAeC,EAASC,GAG/B,GAAIC,GAAUxB,QAAQyB,UAAWtB,EAAUoB,GAEvCG,EAAWN,EAASE,EAASE,EAOjC,OAJGA,GAAQR,UACTU,EAASC,OAAOX,QAAUQ,EAAQR,SAG7BU,EAIT,MAAOL,OAMVO,UAAU,aAAc,UAAW,OAAQ,WAAY,SAASC,EAASC,EAAMJ,GAE9E,GAAIK,GAAwBF,EAAQE,uBAAyBF,EAAQG,UAErE,QACEC,SAAU,MACVC,OAAO,EACPC,KAAM,SAAkBD,EAAOZ,EAASc,GAGtC,GAAIZ,IAAWU,MAAOA,EACtBlC,SAAQqC,SAAS,WAAY,kBAAmB,YAAa,YAAa,SAAU,QAAS,UAAW,WAAY,OAAQ,YAAa,cAAe,YAAa,MAAO,SAASC,GAChLtC,QAAQuC,UAAUH,EAAKE,MAAOd,EAAQc,GAAOF,EAAKE,MAIvDtC,QAAQqC,SAAS,QAAS,WAAY,SAASC,GAC7CF,EAAKE,IAAQF,EAAKI,SAASF,EAAK,SAASG,EAAUC,GACjDR,EAAMI,GAAOR,EAAKa,YAAYF,GAC9BzC,QAAQuC,UAAUG,IAAaX,EAAsB,WACnDa,GAAWA,EAAQC,wBAMzBT,EAAKU,WAAaZ,EAAMa,OAAOX,EAAKU,UAAW,SAASL,EAAUC,GAC7D1C,QAAQgD,SAASP,GAClBzC,QAAQyB,OAAOS,EAAOO,GAEtBP,EAAMlB,QAAUyB,EAElBzC,QAAQuC,UAAUG,IAAaX,EAAsB,WACnDa,GAAWA,EAAQC,sBAEpB,GAGHT,EAAKa,QAAUf,EAAMa,OAAOX,EAAKa,OAAQ,SAASR,GAC5CG,GAAY5C,QAAQuC,UAAUE,KAC/BzC,QAAQkD,SAAST,KAAWA,IAAaA,EAASU,MAAM,wBAC3DV,KAAa,EAAOG,EAAQQ,OAASR,EAAQS,SAI/C,IAAIT,GAAUlB,EAASJ,EAASE,EAGhCU,GAAMoB,IAAI,WAAY,WAChBV,GAASA,EAAQW,UACrB/B,EAAU,KACVoB,EAAU","file":"popover.min.js","sourcesContent":[null],"sourceRoot":"/source/"}
@@ -1,14 +0,0 @@
1
- /**
2
- * angular-strap
3
- * @version v2.1.6 - 2015-02-08
4
- * @link http://mgcrea.github.io/angular-strap
5
- * @author Olivier Louvignes (olivier@mg-crea.com)
6
- * @license MIT License, http://www.opensource.org/licenses/MIT
7
- */
8
- 'use strict';
9
-
10
- angular.module('mgcrea.ngStrap.popover').run(['$templateCache', function($templateCache) {
11
-
12
- $templateCache.put('popover/popover.tpl.html', '<div class="popover"><div class="arrow"></div><h3 class="popover-title" ng-bind="title" ng-show="title"></h3><div class="popover-content" ng-bind="content"></div></div>');
13
-
14
- }]);
@@ -1,8 +0,0 @@
1
- /**
2
- * angular-strap
3
- * @version v2.1.6 - 2015-02-08
4
- * @link http://mgcrea.github.io/angular-strap
5
- * @author Olivier Louvignes (olivier@mg-crea.com)
6
- * @license MIT License, http://www.opensource.org/licenses/MIT
7
- */
8
- "use strict";angular.module("mgcrea.ngStrap.popover").run(["$templateCache",function(t){t.put("popover/popover.tpl.html",'<div class="popover"><div class="arrow"></div><h3 class="popover-title" ng-bind="title" ng-show="title"></h3><div class="popover-content" ng-bind="content"></div></div>')}]);
@@ -1,61 +0,0 @@
1
- /**
2
- * angular-strap
3
- * @version v2.1.6 - 2015-02-08
4
- * @link http://mgcrea.github.io/angular-strap
5
- * @author Olivier Louvignes (olivier@mg-crea.com)
6
- * @license MIT License, http://www.opensource.org/licenses/MIT
7
- */
8
- 'use strict';
9
-
10
- (angular.version.minor < 3 && angular.version.dot < 14) && angular.module('ng')
11
-
12
- .factory('$$rAF', ["$window", "$timeout", function($window, $timeout) {
13
-
14
- var requestAnimationFrame = $window.requestAnimationFrame ||
15
- $window.webkitRequestAnimationFrame ||
16
- $window.mozRequestAnimationFrame;
17
-
18
- var cancelAnimationFrame = $window.cancelAnimationFrame ||
19
- $window.webkitCancelAnimationFrame ||
20
- $window.mozCancelAnimationFrame ||
21
- $window.webkitCancelRequestAnimationFrame;
22
-
23
- var rafSupported = !!requestAnimationFrame;
24
- var raf = rafSupported ?
25
- function(fn) {
26
- var id = requestAnimationFrame(fn);
27
- return function() {
28
- cancelAnimationFrame(id);
29
- };
30
- } :
31
- function(fn) {
32
- var timer = $timeout(fn, 16.66, false); // 1000 / 60 = 16.666
33
- return function() {
34
- $timeout.cancel(timer);
35
- };
36
- };
37
-
38
- raf.supported = rafSupported;
39
-
40
- return raf;
41
-
42
- }]);
43
-
44
- // .factory('$$animateReflow', function($$rAF, $document) {
45
-
46
- // var bodyEl = $document[0].body;
47
-
48
- // return function(fn) {
49
- // //the returned function acts as the cancellation function
50
- // return $$rAF(function() {
51
- // //the line below will force the browser to perform a repaint
52
- // //so that all the animated elements within the animation frame
53
- // //will be properly updated and drawn on screen. This is
54
- // //required to perform multi-class CSS based animations with
55
- // //Firefox. DO NOT REMOVE THIS LINE.
56
- // var a = bodyEl.offsetWidth + 1;
57
- // fn();
58
- // });
59
- // };
60
-
61
- // });
@@ -1,9 +0,0 @@
1
- /**
2
- * angular-strap
3
- * @version v2.1.6 - 2015-02-08
4
- * @link http://mgcrea.github.io/angular-strap
5
- * @author Olivier Louvignes (olivier@mg-crea.com)
6
- * @license MIT License, http://www.opensource.org/licenses/MIT
7
- */
8
- "use strict";angular.version.minor<3&&angular.version.dot<14&&angular.module("ng").factory("$$rAF",["$window","$timeout",function(n,e){var a=n.requestAnimationFrame||n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame,t=n.cancelAnimationFrame||n.webkitCancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelRequestAnimationFrame,i=!!a,r=i?function(n){var e=a(n);return function(){t(e)}}:function(n){var a=e(n,16.66,!1);return function(){e.cancel(a)}};return r.supported=i,r}]);
9
- //# sourceMappingURL=raf.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["raf.min.js"],"names":["angular","version","minor","dot","module","factory","$window","$timeout","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","cancelAnimationFrame","webkitCancelAnimationFrame","mozCancelAnimationFrame","webkitCancelRequestAnimationFrame","rafSupported","raf","fn","id","timer","cancel","supported"],"mappings":"AAOA,YAECA,SAAQC,QAAQC,MAAQ,GAAKF,QAAQC,QAAQE,IAAM,IAAOH,QAAQI,OAAO,MAEzEC,QAAQ,SAAU,UAAW,WAAY,SAASC,EAASC,GAE1D,GAAIC,GAAwBF,EAAQE,uBACRF,EAAQG,6BACRH,EAAQI,yBAEhCC,EAAuBL,EAAQK,sBACRL,EAAQM,4BACRN,EAAQO,yBACRP,EAAQQ,kCAE/BC,IAAiBP,EACjBQ,EAAMD,EACR,SAASE,GACP,GAAIC,GAAKV,EAAsBS,EAC/B,OAAO,YACLN,EAAqBO,KAGzB,SAASD,GACP,GAAIE,GAAQZ,EAASU,EAAI,OAAO,EAChC,OAAO,YACLV,EAASa,OAAOD,IAMtB,OAFAH,GAAIK,UAAYN,EAETC","file":"raf.min.js","sourcesContent":[null],"sourceRoot":"/source/"}
@@ -1,261 +0,0 @@
1
- /**
2
- * angular-strap
3
- * @version v2.1.6 - 2015-02-08
4
- * @link http://mgcrea.github.io/angular-strap
5
- * @author Olivier Louvignes (olivier@mg-crea.com)
6
- * @license MIT License, http://www.opensource.org/licenses/MIT
7
- */
8
- 'use strict';
9
-
10
- angular.module('mgcrea.ngStrap.scrollspy', ['mgcrea.ngStrap.helpers.debounce', 'mgcrea.ngStrap.helpers.dimensions'])
11
-
12
- .provider('$scrollspy', function() {
13
-
14
- // Pool of registered spies
15
- var spies = this.$$spies = {};
16
-
17
- var defaults = this.defaults = {
18
- debounce: 150,
19
- throttle: 100,
20
- offset: 100
21
- };
22
-
23
- this.$get = ["$window", "$document", "$rootScope", "dimensions", "debounce", "throttle", function($window, $document, $rootScope, dimensions, debounce, throttle) {
24
-
25
- var windowEl = angular.element($window);
26
- var docEl = angular.element($document.prop('documentElement'));
27
- var bodyEl = angular.element($window.document.body);
28
-
29
- // Helper functions
30
-
31
- function nodeName(element, name) {
32
- return element[0].nodeName && element[0].nodeName.toLowerCase() === name.toLowerCase();
33
- }
34
-
35
- function ScrollSpyFactory(config) {
36
-
37
- // Common vars
38
- var options = angular.extend({}, defaults, config);
39
- if(!options.element) options.element = bodyEl;
40
- var isWindowSpy = nodeName(options.element, 'body');
41
- var scrollEl = isWindowSpy ? windowEl : options.element;
42
- var scrollId = isWindowSpy ? 'window' : options.id;
43
-
44
- // Use existing spy
45
- if(spies[scrollId]) {
46
- spies[scrollId].$$count++;
47
- return spies[scrollId];
48
- }
49
-
50
- var $scrollspy = {};
51
-
52
- // Private vars
53
- var unbindViewContentLoaded, unbindIncludeContentLoaded;
54
- var trackedElements = $scrollspy.$trackedElements = [];
55
- var sortedElements = [];
56
- var activeTarget;
57
- var debouncedCheckPosition;
58
- var throttledCheckPosition;
59
- var debouncedCheckOffsets;
60
- var viewportHeight;
61
- var scrollTop;
62
-
63
- $scrollspy.init = function() {
64
-
65
- // Setup internal ref counter
66
- this.$$count = 1;
67
-
68
- // Bind events
69
- debouncedCheckPosition = debounce(this.checkPosition, options.debounce);
70
- throttledCheckPosition = throttle(this.checkPosition, options.throttle);
71
- scrollEl.on('click', this.checkPositionWithEventLoop);
72
- windowEl.on('resize', debouncedCheckPosition);
73
- scrollEl.on('scroll', throttledCheckPosition);
74
-
75
- debouncedCheckOffsets = debounce(this.checkOffsets, options.debounce);
76
- unbindViewContentLoaded = $rootScope.$on('$viewContentLoaded', debouncedCheckOffsets);
77
- unbindIncludeContentLoaded = $rootScope.$on('$includeContentLoaded', debouncedCheckOffsets);
78
- debouncedCheckOffsets();
79
-
80
- // Register spy for reuse
81
- if(scrollId) {
82
- spies[scrollId] = $scrollspy;
83
- }
84
-
85
- };
86
-
87
- $scrollspy.destroy = function() {
88
-
89
- // Check internal ref counter
90
- this.$$count--;
91
- if(this.$$count > 0) {
92
- return;
93
- }
94
-
95
- // Unbind events
96
- scrollEl.off('click', this.checkPositionWithEventLoop);
97
- windowEl.off('resize', debouncedCheckPosition);
98
- scrollEl.off('scroll', throttledCheckPosition);
99
- unbindViewContentLoaded();
100
- unbindIncludeContentLoaded();
101
- if (scrollId) {
102
- delete spies[scrollId];
103
- }
104
- };
105
-
106
- $scrollspy.checkPosition = function() {
107
-
108
- // Not ready yet
109
- if(!sortedElements.length) return;
110
-
111
- // Calculate the scroll position
112
- scrollTop = (isWindowSpy ? $window.pageYOffset : scrollEl.prop('scrollTop')) || 0;
113
-
114
- // Calculate the viewport height for use by the components
115
- viewportHeight = Math.max($window.innerHeight, docEl.prop('clientHeight'));
116
-
117
- // Activate first element if scroll is smaller
118
- if(scrollTop < sortedElements[0].offsetTop && activeTarget !== sortedElements[0].target) {
119
- return $scrollspy.$activateElement(sortedElements[0]);
120
- }
121
-
122
- // Activate proper element
123
- for (var i = sortedElements.length; i--;) {
124
- if(angular.isUndefined(sortedElements[i].offsetTop) || sortedElements[i].offsetTop === null) continue;
125
- if(activeTarget === sortedElements[i].target) continue;
126
- if(scrollTop < sortedElements[i].offsetTop) continue;
127
- if(sortedElements[i + 1] && scrollTop > sortedElements[i + 1].offsetTop) continue;
128
- return $scrollspy.$activateElement(sortedElements[i]);
129
- }
130
-
131
- };
132
-
133
- $scrollspy.checkPositionWithEventLoop = function() {
134
- // IE 9 throws an error if we use 'this' instead of '$scrollspy'
135
- // in this setTimeout call
136
- setTimeout($scrollspy.checkPosition, 1);
137
- };
138
-
139
- // Protected methods
140
-
141
- $scrollspy.$activateElement = function(element) {
142
- if(activeTarget) {
143
- var activeElement = $scrollspy.$getTrackedElement(activeTarget);
144
- if(activeElement) {
145
- activeElement.source.removeClass('active');
146
- if(nodeName(activeElement.source, 'li') && nodeName(activeElement.source.parent().parent(), 'li')) {
147
- activeElement.source.parent().parent().removeClass('active');
148
- }
149
- }
150
- }
151
- activeTarget = element.target;
152
- element.source.addClass('active');
153
- if(nodeName(element.source, 'li') && nodeName(element.source.parent().parent(), 'li')) {
154
- element.source.parent().parent().addClass('active');
155
- }
156
- };
157
-
158
- $scrollspy.$getTrackedElement = function(target) {
159
- return trackedElements.filter(function(obj) {
160
- return obj.target === target;
161
- })[0];
162
- };
163
-
164
- // Track offsets behavior
165
-
166
- $scrollspy.checkOffsets = function() {
167
-
168
- angular.forEach(trackedElements, function(trackedElement) {
169
- var targetElement = document.querySelector(trackedElement.target);
170
- trackedElement.offsetTop = targetElement ? dimensions.offset(targetElement).top : null;
171
- if(options.offset && trackedElement.offsetTop !== null) trackedElement.offsetTop -= options.offset * 1;
172
- });
173
-
174
- sortedElements = trackedElements
175
- .filter(function(el) {
176
- return el.offsetTop !== null;
177
- })
178
- .sort(function(a, b) {
179
- return a.offsetTop - b.offsetTop;
180
- });
181
-
182
- debouncedCheckPosition();
183
-
184
- };
185
-
186
- $scrollspy.trackElement = function(target, source) {
187
- trackedElements.push({target: target, source: source});
188
- };
189
-
190
- $scrollspy.untrackElement = function(target, source) {
191
- var toDelete;
192
- for (var i = trackedElements.length; i--;) {
193
- if(trackedElements[i].target === target && trackedElements[i].source === source) {
194
- toDelete = i;
195
- break;
196
- }
197
- }
198
- trackedElements = trackedElements.splice(toDelete, 1);
199
- };
200
-
201
- $scrollspy.activate = function(i) {
202
- trackedElements[i].addClass('active');
203
- };
204
-
205
- // Initialize plugin
206
-
207
- $scrollspy.init();
208
- return $scrollspy;
209
-
210
- }
211
-
212
- return ScrollSpyFactory;
213
-
214
- }];
215
-
216
- })
217
-
218
- .directive('bsScrollspy', ["$rootScope", "debounce", "dimensions", "$scrollspy", function($rootScope, debounce, dimensions, $scrollspy) {
219
-
220
- return {
221
- restrict: 'EAC',
222
- link: function postLink(scope, element, attr) {
223
-
224
- var options = {scope: scope};
225
- angular.forEach(['offset', 'target'], function(key) {
226
- if(angular.isDefined(attr[key])) options[key] = attr[key];
227
- });
228
-
229
- var scrollspy = $scrollspy(options);
230
- scrollspy.trackElement(options.target, element);
231
-
232
- scope.$on('$destroy', function() {
233
- if (scrollspy) {
234
- scrollspy.untrackElement(options.target, element);
235
- scrollspy.destroy();
236
- }
237
- options = null;
238
- scrollspy = null;
239
- });
240
-
241
- }
242
- };
243
-
244
- }])
245
-
246
-
247
- .directive('bsScrollspyList', ["$rootScope", "debounce", "dimensions", "$scrollspy", function($rootScope, debounce, dimensions, $scrollspy) {
248
-
249
- return {
250
- restrict: 'A',
251
- compile: function postLink(element, attr) {
252
- var children = element[0].querySelectorAll('li > a[href]');
253
- angular.forEach(children, function(child) {
254
- var childEl = angular.element(child);
255
- childEl.parent().attr('bs-scrollspy', '').attr('data-target', childEl.attr('href'));
256
- });
257
- }
258
-
259
- };
260
-
261
- }]);