4
4
* @link http://angular-ui.github.com
5
5
* @license MIT License, http://www.opensource.org/licenses/MIT
6
6
*/
7
- 'use strict' ;
8
-
9
7
angular . module ( 'ui.alias' , [ ] ) . config ( [ '$compileProvider' , 'uiAliasConfig' , function ( $compileProvider , uiAliasConfig ) {
8
+ 'use strict' ;
9
+
10
10
uiAliasConfig = uiAliasConfig || { } ;
11
11
angular . forEach ( uiAliasConfig , function ( config , alias ) {
12
12
if ( angular . isString ( config ) ) {
@@ -21,8 +21,6 @@ angular.module('ui.alias', []).config(['$compileProvider', 'uiAliasConfig', func
21
21
} ) ;
22
22
} ] ) ;
23
23
24
- 'use strict' ;
25
-
26
24
/**
27
25
* General-purpose Event binding. Bind any event not natively supported by Angular
28
26
* Pass an object with keynames for events to ui-event
@@ -35,6 +33,8 @@ angular.module('ui.alias', []).config(['$compileProvider', 'uiAliasConfig', func
35
33
*/
36
34
angular . module ( 'ui.event' , [ ] ) . directive ( 'uiEvent' , [ '$parse' ,
37
35
function ( $parse ) {
36
+ 'use strict' ;
37
+
38
38
return function ( $scope , elm , attrs ) {
39
39
var events = $scope . $eval ( attrs . uiEvent ) ;
40
40
angular . forEach ( events , function ( uiEvent , eventName ) {
@@ -52,8 +52,6 @@ angular.module('ui.event',[]).directive('uiEvent', ['$parse',
52
52
} ;
53
53
} ] ) ;
54
54
55
- 'use strict' ;
56
-
57
55
/**
58
56
* A replacement utility for internationalization very similar to sprintf.
59
57
*
@@ -68,6 +66,8 @@ angular.module('ui.event',[]).directive('uiEvent', ['$parse',
68
66
* @example : '$0 agrees to all mentions $0 makes in the event that $0 hits a tree while $0 is driving drunk'.format('Bob')
69
67
*/
70
68
angular . module ( 'ui.format' , [ ] ) . filter ( 'format' , function ( ) {
69
+ 'use strict' ;
70
+
71
71
return function ( value , replace ) {
72
72
var target = value ;
73
73
if ( angular . isString ( target ) && replace !== undefined ) {
@@ -92,15 +92,15 @@ angular.module('ui.format',[]).filter('format', function(){
92
92
} ;
93
93
} ) ;
94
94
95
- 'use strict' ;
96
-
97
95
/**
98
96
* Wraps the
99
97
* @param text {string} haystack to search through
100
98
* @param search {string} needle to search for
101
99
* @param [caseSensitive] {boolean} optional boolean to use case-sensitive searching
102
100
*/
103
101
angular . module ( 'ui.highlight' , [ ] ) . filter ( 'highlight' , function ( ) {
102
+ 'use strict' ;
103
+
104
104
return function ( text , search , caseSensitive ) {
105
105
if ( text && ( search || angular . isNumber ( search ) ) ) {
106
106
text = text . toString ( ) ;
@@ -116,12 +116,12 @@ angular.module('ui.highlight',[]).filter('highlight', function () {
116
116
} ;
117
117
} ) ;
118
118
119
- 'use strict' ;
120
-
121
119
// modeled after: angular-1.0.7/src/ng/directive/ngInclude.js
122
120
angular . module ( 'ui.include' , [ ] )
123
121
. directive ( 'uiInclude' , [ '$http' , '$templateCache' , '$anchorScroll' , '$compile' ,
124
122
function ( $http , $templateCache , $anchorScroll , $compile ) {
123
+ 'use strict' ;
124
+
125
125
return {
126
126
restrict : 'ECA' ,
127
127
terminal : true ,
@@ -185,15 +185,15 @@ angular.module('ui.include',[])
185
185
} ;
186
186
} ] ) ;
187
187
188
- 'use strict' ;
189
-
190
188
/**
191
189
* Provides an easy way to toggle a checkboxes indeterminate property
192
190
*
193
191
* @example <input type="checkbox" ui-indeterminate="isUnkown">
194
192
*/
195
193
angular . module ( 'ui.indeterminate' , [ ] ) . directive ( 'uiIndeterminate' , [
196
194
function ( ) {
195
+ 'use strict' ;
196
+
197
197
return {
198
198
compile : function ( tElm , tAttrs ) {
199
199
if ( ! tAttrs . type || tAttrs . type . toLowerCase ( ) !== 'checkbox' ) {
@@ -209,8 +209,6 @@ angular.module('ui.indeterminate',[]).directive('uiIndeterminate', [
209
209
} ;
210
210
} ] ) ;
211
211
212
- 'use strict' ;
213
-
214
212
/**
215
213
* Converts variable-esque naming conventions to something presentational, capitalized words separated by space.
216
214
* @param {String } value The value to be parsed and prettified.
@@ -221,6 +219,7 @@ angular.module('ui.indeterminate',[]).directive('uiIndeterminate', [
221
219
* {{ 'Here Is my_phoneNumber' | inflector:'variable' }} => hereIsMyPhoneNumber
222
220
*/
223
221
angular . module ( 'ui.inflector' , [ ] ) . filter ( 'inflector' , function ( ) {
222
+ 'use strict' ;
224
223
225
224
function tokenize ( text ) {
226
225
text = text . replace ( / ( [ A - Z ] ) | ( [ \- | \_ ] ) / g, function ( _ , $1 ) { return ' ' + ( $1 || '' ) ; } ) ;
@@ -259,8 +258,6 @@ angular.module('ui.inflector',[]).filter('inflector', function () {
259
258
} ;
260
259
} ) ;
261
260
262
- 'use strict' ;
263
-
264
261
/**
265
262
* General-purpose jQuery wrapper. Simply pass the plugin name as the expression.
266
263
*
@@ -279,6 +276,8 @@ angular.module('ui.inflector',[]).filter('inflector', function () {
279
276
angular . module ( 'ui.jq' , [ ] ) .
280
277
value ( 'uiJqConfig' , { } ) .
281
278
directive ( 'uiJq' , [ 'uiJqConfig' , '$timeout' , function uiJqInjectingFunction ( uiJqConfig , $timeout ) {
279
+ 'use strict' ;
280
+
282
281
283
282
return {
284
283
restrict : 'A' ,
@@ -328,10 +327,10 @@ angular.module('ui.jq',[]).
328
327
} ;
329
328
} ] ) ;
330
329
331
- 'use strict' ;
332
-
333
330
angular . module ( 'ui.keypress' , [ ] ) .
334
331
factory ( 'keypressHelper' , [ '$parse' , function keypress ( $parse ) {
332
+ 'use strict' ;
333
+
335
334
var keysByCode = {
336
335
8 : 'backspace' ,
337
336
9 : 'tab' ,
@@ -422,6 +421,8 @@ factory('keypressHelper', ['$parse', function keypress($parse){
422
421
* @example <input ui-keypress="{enter:'x = 1', 'ctrl-shift-space':'foo()', 'shift-13':'bar()'}" /> <input ui-keypress="foo = 2 on ctrl-13 and bar('hello') on shift-esc" />
423
422
**/
424
423
angular . module ( 'ui.keypress' ) . directive ( 'uiKeydown' , [ 'keypressHelper' , function ( keypressHelper ) {
424
+ 'use strict' ;
425
+
425
426
return {
426
427
link : function ( scope , elm , attrs ) {
427
428
keypressHelper ( 'keydown' , scope , elm , attrs ) ;
@@ -430,6 +431,8 @@ angular.module('ui.keypress').directive('uiKeydown', ['keypressHelper', function
430
431
} ] ) ;
431
432
432
433
angular . module ( 'ui.keypress' ) . directive ( 'uiKeypress' , [ 'keypressHelper' , function ( keypressHelper ) {
434
+ 'use strict' ;
435
+
433
436
return {
434
437
link : function ( scope , elm , attrs ) {
435
438
keypressHelper ( 'keypress' , scope , elm , attrs ) ;
@@ -438,15 +441,15 @@ angular.module('ui.keypress').directive('uiKeypress', ['keypressHelper', functio
438
441
} ] ) ;
439
442
440
443
angular . module ( 'ui.keypress' ) . directive ( 'uiKeyup' , [ 'keypressHelper' , function ( keypressHelper ) {
444
+ 'use strict' ;
445
+
441
446
return {
442
447
link : function ( scope , elm , attrs ) {
443
448
keypressHelper ( 'keyup' , scope , elm , attrs ) ;
444
449
}
445
450
} ;
446
451
} ] ) ;
447
452
448
- 'use strict' ;
449
-
450
453
/*
451
454
Attaches input mask onto input element
452
455
*/
@@ -459,6 +462,8 @@ angular.module('ui.mask', [])
459
462
}
460
463
} )
461
464
. directive ( 'uiMask' , [ 'uiMaskConfig' , '$parse' , function ( maskConfig , $parse ) {
465
+ 'use strict' ;
466
+
462
467
return {
463
468
priority : 100 ,
464
469
require : 'ngModel' ,
@@ -957,12 +962,12 @@ angular.module('ui.mask', [])
957
962
}
958
963
] ) ;
959
964
960
- 'use strict' ;
961
-
962
965
/**
963
966
* Add a clear button to form inputs to reset their value
964
967
*/
965
968
angular . module ( 'ui.reset' , [ ] ) . value ( 'uiResetConfig' , null ) . directive ( 'uiReset' , [ 'uiResetConfig' , function ( uiResetConfig ) {
969
+ 'use strict' ;
970
+
966
971
var resetValue = null ;
967
972
if ( uiResetConfig !== undefined ) {
968
973
resetValue = uiResetConfig ;
@@ -988,12 +993,12 @@ angular.module('ui.reset',[]).value('uiResetConfig',null).directive('uiReset', [
988
993
} ;
989
994
} ] ) ;
990
995
991
- 'use strict' ;
992
-
993
996
/**
994
997
* Set a $uiRoute boolean to see if the current route matches
995
998
*/
996
999
angular . module ( 'ui.route' , [ ] ) . directive ( 'uiRoute' , [ '$location' , '$parse' , function ( $location , $parse ) {
1000
+ 'use strict' ;
1001
+
997
1002
return {
998
1003
restrict : 'AC' ,
999
1004
scope : true ,
@@ -1071,9 +1076,10 @@ angular.module('ui.route', []).directive('uiRoute', ['$location', '$parse', func
1071
1076
} ;
1072
1077
} ] ) ;
1073
1078
1074
- 'use strict' ;
1075
1079
angular . module ( 'ui.scroll.jqlite' , [ 'ui.scroll' ] ) . service ( 'jqLiteExtras' , [
1076
1080
'$log' , '$window' , function ( console , window ) {
1081
+ 'use strict' ;
1082
+
1077
1083
return {
1078
1084
registerFor : function ( element ) {
1079
1085
var convertToPx , css , getMeasurements , getStyle , getWidthHeight , isWindow , scrollTo ;
@@ -1290,6 +1296,8 @@ angular.module('ui.scroll.jqlite', ['ui.scroll']).service('jqLiteExtras', [
1290
1296
}
1291
1297
] ) . run ( [
1292
1298
'$log' , '$window' , 'jqLiteExtras' , function ( console , window , jqLiteExtras ) {
1299
+ 'use strict' ;
1300
+
1293
1301
if ( ! window . jQuery ) {
1294
1302
return jqLiteExtras . registerFor ( angular . element ) ;
1295
1303
}
@@ -1301,7 +1309,6 @@ angular.module('ui.scroll.jqlite', ['ui.scroll']).service('jqLiteExtras', [
1301
1309
*/
1302
1310
1303
1311
1304
- 'use strict' ;
1305
1312
/*
1306
1313
globals: angular, window
1307
1314
@@ -1317,6 +1324,8 @@ globals: angular, window
1317
1324
1318
1325
angular . module ( 'ui.scroll' , [ ] ) . directive ( 'uiScrollViewport' , [
1319
1326
'$log' , function ( ) {
1327
+ 'use strict' ;
1328
+
1320
1329
return {
1321
1330
controller : [
1322
1331
'$scope' , '$element' , function ( scope , element ) {
@@ -1328,6 +1337,8 @@ angular.module('ui.scroll', []).directive('uiScrollViewport', [
1328
1337
}
1329
1338
] ) . directive ( 'uiScroll' , [
1330
1339
'$log' , '$injector' , '$rootScope' , '$timeout' , function ( console , $injector , $rootScope , $timeout ) {
1340
+ 'use strict' ;
1341
+
1331
1342
return {
1332
1343
require : [ '?^uiScrollViewport' ] ,
1333
1344
transclude : 'element' ,
@@ -1890,14 +1901,14 @@ angular.module('ui.scroll', []).directive('uiScrollViewport', [
1890
1901
*/
1891
1902
1892
1903
1893
- 'use strict' ;
1894
-
1895
1904
/**
1896
1905
* Adds a 'ui-scrollfix' class to the element when the page scrolls past it's position.
1897
1906
* @param [offset] {int} optional Y-offset to override the detected offset.
1898
1907
* Takes 300 (absolute) or -300 or +300 (relative to detected)
1899
1908
*/
1900
1909
angular . module ( 'ui.scrollfix' , [ ] ) . directive ( 'uiScrollfix' , [ '$window' , function ( $window ) {
1910
+ 'use strict' ;
1911
+
1901
1912
function getWindowScrollTop ( ) {
1902
1913
if ( angular . isDefined ( $window . pageYOffset ) ) {
1903
1914
return $window . pageYOffset ;
@@ -1942,15 +1953,14 @@ angular.module('ui.scrollfix',[]).directive('uiScrollfix', ['$window', function
1942
1953
}
1943
1954
} ;
1944
1955
} ] ) . directive ( 'uiScrollfixTarget' , [ function ( ) {
1956
+ 'use strict' ;
1945
1957
return {
1946
1958
controller : [ '$element' , function ( $element ) {
1947
1959
this . $element = $element ;
1948
1960
} ]
1949
1961
} ;
1950
1962
} ] ) ;
1951
1963
1952
- 'use strict' ;
1953
-
1954
1964
/**
1955
1965
* uiShow Directive
1956
1966
*
@@ -1961,6 +1971,8 @@ angular.module('ui.scrollfix',[]).directive('uiScrollfix', ['$window', function
1961
1971
*/
1962
1972
angular . module ( 'ui.showhide' , [ ] )
1963
1973
. directive ( 'uiShow' , [ function ( ) {
1974
+ 'use strict' ;
1975
+
1964
1976
return function ( scope , elm , attrs ) {
1965
1977
scope . $watch ( attrs . uiShow , function ( newVal ) {
1966
1978
if ( newVal ) {
@@ -1981,6 +1993,8 @@ angular.module('ui.showhide',[])
1981
1993
* @param expression {boolean} evaluated expression to determine if the class should be added
1982
1994
*/
1983
1995
. directive ( 'uiHide' , [ function ( ) {
1996
+ 'use strict' ;
1997
+
1984
1998
return function ( scope , elm , attrs ) {
1985
1999
scope . $watch ( attrs . uiHide , function ( newVal ) {
1986
2000
if ( newVal ) {
@@ -2002,6 +2016,8 @@ angular.module('ui.showhide',[])
2002
2016
* @param expression {boolean} evaluated expression to determine if the class should be added
2003
2017
*/
2004
2018
. directive ( 'uiToggle' , [ function ( ) {
2019
+ 'use strict' ;
2020
+
2005
2021
return function ( scope , elm , attrs ) {
2006
2022
scope . $watch ( attrs . uiToggle , function ( newVal ) {
2007
2023
if ( newVal ) {
@@ -2013,8 +2029,6 @@ angular.module('ui.showhide',[])
2013
2029
} ;
2014
2030
} ] ) ;
2015
2031
2016
- 'use strict' ;
2017
-
2018
2032
/**
2019
2033
* Filters out all duplicate items from an array by checking the specified key
2020
2034
* @param [key] {string} the name of the attribute of each object to compare for uniqueness
@@ -2023,6 +2037,7 @@ angular.module('ui.showhide',[])
2023
2037
* @return {array }
2024
2038
*/
2025
2039
angular . module ( 'ui.unique' , [ ] ) . filter ( 'unique' , [ '$parse' , function ( $parse ) {
2040
+ 'use strict' ;
2026
2041
2027
2042
return function ( items , filterOn ) {
2028
2043
@@ -2104,7 +2119,6 @@ angular.module('ui.unique',[]).filter('unique', ['$parse', function ($parse) {
2104
2119
} ) ;
2105
2120
}
2106
2121
} ) ( ) ;
2107
- 'use strict' ;
2108
2122
/*
2109
2123
* Author: Remy Alain Ticona Carbajal http://realtica.org
2110
2124
* Description: The main objective of ng-uploader is to have a user control,
@@ -2117,6 +2131,8 @@ angular.module('ui.uploader', []).service('uiUploader', uiUploader);
2117
2131
uiUploader . $inject = [ '$log' ] ;
2118
2132
2119
2133
function uiUploader ( $log ) {
2134
+ 'use strict' ;
2135
+
2120
2136
/*jshint validthis: true */
2121
2137
var self = this ;
2122
2138
self . files = [ ] ;
@@ -2224,8 +2240,7 @@ function uiUploader($log) {
2224
2240
}
2225
2241
2226
2242
}
2227
- 'use strict' ;
2228
-
2243
+
2229
2244
/**
2230
2245
* General-purpose validator for ngModel.
2231
2246
* angular.js comes with several built-in validation mechanism for input fields (ngRequired, ngPattern etc.) but using
@@ -2243,6 +2258,7 @@ function uiUploader($log) {
2243
2258
* In both cases validator function should take a value to validate as its argument and should return true/false indicating a validation result.
2244
2259
*/
2245
2260
angular . module ( 'ui.validate' , [ ] ) . directive ( 'uiValidate' , function ( ) {
2261
+ 'use strict' ;
2246
2262
2247
2263
return {
2248
2264
restrict : 'A' ,
0 commit comments