Skip to content
This repository was archived by the owner on Jan 24, 2019. It is now read-only.

Commit 6d03cc2

Browse files
author
AngularUI (via TravisCI)
committed
Travis commit : build 401
1 parent c7459f1 commit 6d03cc2

File tree

2 files changed

+52
-36
lines changed

2 files changed

+52
-36
lines changed

ui-utils.js

Lines changed: 51 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
* @link http://angular-ui.github.com
55
* @license MIT License, http://www.opensource.org/licenses/MIT
66
*/
7-
'use strict';
8-
97
angular.module('ui.alias', []).config(['$compileProvider', 'uiAliasConfig', function($compileProvider, uiAliasConfig){
8+
'use strict';
9+
1010
uiAliasConfig = uiAliasConfig || {};
1111
angular.forEach(uiAliasConfig, function(config, alias){
1212
if (angular.isString(config)) {
@@ -21,8 +21,6 @@ angular.module('ui.alias', []).config(['$compileProvider', 'uiAliasConfig', func
2121
});
2222
}]);
2323

24-
'use strict';
25-
2624
/**
2725
* General-purpose Event binding. Bind any event not natively supported by Angular
2826
* Pass an object with keynames for events to ui-event
@@ -35,6 +33,8 @@ angular.module('ui.alias', []).config(['$compileProvider', 'uiAliasConfig', func
3533
*/
3634
angular.module('ui.event',[]).directive('uiEvent', ['$parse',
3735
function ($parse) {
36+
'use strict';
37+
3838
return function ($scope, elm, attrs) {
3939
var events = $scope.$eval(attrs.uiEvent);
4040
angular.forEach(events, function (uiEvent, eventName) {
@@ -52,8 +52,6 @@ angular.module('ui.event',[]).directive('uiEvent', ['$parse',
5252
};
5353
}]);
5454

55-
'use strict';
56-
5755
/**
5856
* A replacement utility for internationalization very similar to sprintf.
5957
*
@@ -68,6 +66,8 @@ angular.module('ui.event',[]).directive('uiEvent', ['$parse',
6866
* @example: '$0 agrees to all mentions $0 makes in the event that $0 hits a tree while $0 is driving drunk'.format('Bob')
6967
*/
7068
angular.module('ui.format',[]).filter('format', function(){
69+
'use strict';
70+
7171
return function(value, replace) {
7272
var target = value;
7373
if (angular.isString(target) && replace !== undefined) {
@@ -92,15 +92,15 @@ angular.module('ui.format',[]).filter('format', function(){
9292
};
9393
});
9494

95-
'use strict';
96-
9795
/**
9896
* Wraps the
9997
* @param text {string} haystack to search through
10098
* @param search {string} needle to search for
10199
* @param [caseSensitive] {boolean} optional boolean to use case-sensitive searching
102100
*/
103101
angular.module('ui.highlight',[]).filter('highlight', function () {
102+
'use strict';
103+
104104
return function (text, search, caseSensitive) {
105105
if (text && (search || angular.isNumber(search))) {
106106
text = text.toString();
@@ -116,12 +116,12 @@ angular.module('ui.highlight',[]).filter('highlight', function () {
116116
};
117117
});
118118

119-
'use strict';
120-
121119
// modeled after: angular-1.0.7/src/ng/directive/ngInclude.js
122120
angular.module('ui.include',[])
123121
.directive('uiInclude', ['$http', '$templateCache', '$anchorScroll', '$compile',
124122
function($http, $templateCache, $anchorScroll, $compile) {
123+
'use strict';
124+
125125
return {
126126
restrict: 'ECA',
127127
terminal: true,
@@ -185,15 +185,15 @@ angular.module('ui.include',[])
185185
};
186186
}]);
187187

188-
'use strict';
189-
190188
/**
191189
* Provides an easy way to toggle a checkboxes indeterminate property
192190
*
193191
* @example <input type="checkbox" ui-indeterminate="isUnkown">
194192
*/
195193
angular.module('ui.indeterminate',[]).directive('uiIndeterminate', [
196194
function () {
195+
'use strict';
196+
197197
return {
198198
compile: function(tElm, tAttrs) {
199199
if (!tAttrs.type || tAttrs.type.toLowerCase() !== 'checkbox') {
@@ -209,8 +209,6 @@ angular.module('ui.indeterminate',[]).directive('uiIndeterminate', [
209209
};
210210
}]);
211211

212-
'use strict';
213-
214212
/**
215213
* Converts variable-esque naming conventions to something presentational, capitalized words separated by space.
216214
* @param {String} value The value to be parsed and prettified.
@@ -221,6 +219,7 @@ angular.module('ui.indeterminate',[]).directive('uiIndeterminate', [
221219
* {{ 'Here Is my_phoneNumber' | inflector:'variable' }} => hereIsMyPhoneNumber
222220
*/
223221
angular.module('ui.inflector',[]).filter('inflector', function () {
222+
'use strict';
224223

225224
function tokenize(text) {
226225
text = text.replace(/([A-Z])|([\-|\_])/g, function(_, $1) { return ' ' + ($1 || ''); });
@@ -259,8 +258,6 @@ angular.module('ui.inflector',[]).filter('inflector', function () {
259258
};
260259
});
261260

262-
'use strict';
263-
264261
/**
265262
* General-purpose jQuery wrapper. Simply pass the plugin name as the expression.
266263
*
@@ -279,6 +276,8 @@ angular.module('ui.inflector',[]).filter('inflector', function () {
279276
angular.module('ui.jq',[]).
280277
value('uiJqConfig',{}).
281278
directive('uiJq', ['uiJqConfig', '$timeout', function uiJqInjectingFunction(uiJqConfig, $timeout) {
279+
'use strict';
280+
282281

283282
return {
284283
restrict: 'A',
@@ -328,10 +327,10 @@ angular.module('ui.jq',[]).
328327
};
329328
}]);
330329

331-
'use strict';
332-
333330
angular.module('ui.keypress',[]).
334331
factory('keypressHelper', ['$parse', function keypress($parse){
332+
'use strict';
333+
335334
var keysByCode = {
336335
8: 'backspace',
337336
9: 'tab',
@@ -422,6 +421,8 @@ factory('keypressHelper', ['$parse', function keypress($parse){
422421
* @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" />
423422
**/
424423
angular.module('ui.keypress').directive('uiKeydown', ['keypressHelper', function(keypressHelper){
424+
'use strict';
425+
425426
return {
426427
link: function (scope, elm, attrs) {
427428
keypressHelper('keydown', scope, elm, attrs);
@@ -430,6 +431,8 @@ angular.module('ui.keypress').directive('uiKeydown', ['keypressHelper', function
430431
}]);
431432

432433
angular.module('ui.keypress').directive('uiKeypress', ['keypressHelper', function(keypressHelper){
434+
'use strict';
435+
433436
return {
434437
link: function (scope, elm, attrs) {
435438
keypressHelper('keypress', scope, elm, attrs);
@@ -438,15 +441,15 @@ angular.module('ui.keypress').directive('uiKeypress', ['keypressHelper', functio
438441
}]);
439442

440443
angular.module('ui.keypress').directive('uiKeyup', ['keypressHelper', function(keypressHelper){
444+
'use strict';
445+
441446
return {
442447
link: function (scope, elm, attrs) {
443448
keypressHelper('keyup', scope, elm, attrs);
444449
}
445450
};
446451
}]);
447452

448-
'use strict';
449-
450453
/*
451454
Attaches input mask onto input element
452455
*/
@@ -459,6 +462,8 @@ angular.module('ui.mask', [])
459462
}
460463
})
461464
.directive('uiMask', ['uiMaskConfig', '$parse', function (maskConfig, $parse) {
465+
'use strict';
466+
462467
return {
463468
priority: 100,
464469
require: 'ngModel',
@@ -957,12 +962,12 @@ angular.module('ui.mask', [])
957962
}
958963
]);
959964

960-
'use strict';
961-
962965
/**
963966
* Add a clear button to form inputs to reset their value
964967
*/
965968
angular.module('ui.reset',[]).value('uiResetConfig',null).directive('uiReset', ['uiResetConfig', function (uiResetConfig) {
969+
'use strict';
970+
966971
var resetValue = null;
967972
if (uiResetConfig !== undefined){
968973
resetValue = uiResetConfig;
@@ -988,12 +993,12 @@ angular.module('ui.reset',[]).value('uiResetConfig',null).directive('uiReset', [
988993
};
989994
}]);
990995

991-
'use strict';
992-
993996
/**
994997
* Set a $uiRoute boolean to see if the current route matches
995998
*/
996999
angular.module('ui.route', []).directive('uiRoute', ['$location', '$parse', function ($location, $parse) {
1000+
'use strict';
1001+
9971002
return {
9981003
restrict: 'AC',
9991004
scope: true,
@@ -1071,9 +1076,10 @@ angular.module('ui.route', []).directive('uiRoute', ['$location', '$parse', func
10711076
};
10721077
}]);
10731078

1074-
'use strict';
10751079
angular.module('ui.scroll.jqlite', ['ui.scroll']).service('jqLiteExtras', [
10761080
'$log', '$window', function(console, window) {
1081+
'use strict';
1082+
10771083
return {
10781084
registerFor: function(element) {
10791085
var convertToPx, css, getMeasurements, getStyle, getWidthHeight, isWindow, scrollTo;
@@ -1290,6 +1296,8 @@ angular.module('ui.scroll.jqlite', ['ui.scroll']).service('jqLiteExtras', [
12901296
}
12911297
]).run([
12921298
'$log', '$window', 'jqLiteExtras', function(console, window, jqLiteExtras) {
1299+
'use strict';
1300+
12931301
if (!window.jQuery) {
12941302
return jqLiteExtras.registerFor(angular.element);
12951303
}
@@ -1301,7 +1309,6 @@ angular.module('ui.scroll.jqlite', ['ui.scroll']).service('jqLiteExtras', [
13011309
*/
13021310

13031311

1304-
'use strict';
13051312
/*
13061313
globals: angular, window
13071314
@@ -1317,6 +1324,8 @@ globals: angular, window
13171324

13181325
angular.module('ui.scroll', []).directive('uiScrollViewport', [
13191326
'$log', function() {
1327+
'use strict';
1328+
13201329
return {
13211330
controller: [
13221331
'$scope', '$element', function(scope, element) {
@@ -1328,6 +1337,8 @@ angular.module('ui.scroll', []).directive('uiScrollViewport', [
13281337
}
13291338
]).directive('uiScroll', [
13301339
'$log', '$injector', '$rootScope', '$timeout', function(console, $injector, $rootScope, $timeout) {
1340+
'use strict';
1341+
13311342
return {
13321343
require: ['?^uiScrollViewport'],
13331344
transclude: 'element',
@@ -1890,14 +1901,14 @@ angular.module('ui.scroll', []).directive('uiScrollViewport', [
18901901
*/
18911902

18921903

1893-
'use strict';
1894-
18951904
/**
18961905
* Adds a 'ui-scrollfix' class to the element when the page scrolls past it's position.
18971906
* @param [offset] {int} optional Y-offset to override the detected offset.
18981907
* Takes 300 (absolute) or -300 or +300 (relative to detected)
18991908
*/
19001909
angular.module('ui.scrollfix',[]).directive('uiScrollfix', ['$window', function ($window) {
1910+
'use strict';
1911+
19011912
function getWindowScrollTop() {
19021913
if (angular.isDefined($window.pageYOffset)) {
19031914
return $window.pageYOffset;
@@ -1942,15 +1953,14 @@ angular.module('ui.scrollfix',[]).directive('uiScrollfix', ['$window', function
19421953
}
19431954
};
19441955
}]).directive('uiScrollfixTarget', [function () {
1956+
'use strict';
19451957
return {
19461958
controller: ['$element', function($element) {
19471959
this.$element = $element;
19481960
}]
19491961
};
19501962
}]);
19511963

1952-
'use strict';
1953-
19541964
/**
19551965
* uiShow Directive
19561966
*
@@ -1961,6 +1971,8 @@ angular.module('ui.scrollfix',[]).directive('uiScrollfix', ['$window', function
19611971
*/
19621972
angular.module('ui.showhide',[])
19631973
.directive('uiShow', [function () {
1974+
'use strict';
1975+
19641976
return function (scope, elm, attrs) {
19651977
scope.$watch(attrs.uiShow, function (newVal) {
19661978
if (newVal) {
@@ -1981,6 +1993,8 @@ angular.module('ui.showhide',[])
19811993
* @param expression {boolean} evaluated expression to determine if the class should be added
19821994
*/
19831995
.directive('uiHide', [function () {
1996+
'use strict';
1997+
19841998
return function (scope, elm, attrs) {
19851999
scope.$watch(attrs.uiHide, function (newVal) {
19862000
if (newVal) {
@@ -2002,6 +2016,8 @@ angular.module('ui.showhide',[])
20022016
* @param expression {boolean} evaluated expression to determine if the class should be added
20032017
*/
20042018
.directive('uiToggle', [function () {
2019+
'use strict';
2020+
20052021
return function (scope, elm, attrs) {
20062022
scope.$watch(attrs.uiToggle, function (newVal) {
20072023
if (newVal) {
@@ -2013,8 +2029,6 @@ angular.module('ui.showhide',[])
20132029
};
20142030
}]);
20152031

2016-
'use strict';
2017-
20182032
/**
20192033
* Filters out all duplicate items from an array by checking the specified key
20202034
* @param [key] {string} the name of the attribute of each object to compare for uniqueness
@@ -2023,6 +2037,7 @@ angular.module('ui.showhide',[])
20232037
* @return {array}
20242038
*/
20252039
angular.module('ui.unique',[]).filter('unique', ['$parse', function ($parse) {
2040+
'use strict';
20262041

20272042
return function (items, filterOn) {
20282043

@@ -2104,7 +2119,6 @@ angular.module('ui.unique',[]).filter('unique', ['$parse', function ($parse) {
21042119
});
21052120
}
21062121
})();
2107-
'use strict';
21082122
/*
21092123
* Author: Remy Alain Ticona Carbajal http://realtica.org
21102124
* Description: The main objective of ng-uploader is to have a user control,
@@ -2117,6 +2131,8 @@ angular.module('ui.uploader', []).service('uiUploader', uiUploader);
21172131
uiUploader.$inject = ['$log'];
21182132

21192133
function uiUploader($log) {
2134+
'use strict';
2135+
21202136
/*jshint validthis: true */
21212137
var self = this;
21222138
self.files = [];
@@ -2224,8 +2240,7 @@ function uiUploader($log) {
22242240
}
22252241

22262242
}
2227-
'use strict';
2228-
2243+
22292244
/**
22302245
* General-purpose validator for ngModel.
22312246
* angular.js comes with several built-in validation mechanism for input fields (ngRequired, ngPattern etc.) but using
@@ -2243,6 +2258,7 @@ function uiUploader($log) {
22432258
* In both cases validator function should take a value to validate as its argument and should return true/false indicating a validation result.
22442259
*/
22452260
angular.module('ui.validate',[]).directive('uiValidate', function () {
2261+
'use strict';
22462262

22472263
return {
22482264
restrict: 'A',

0 commit comments

Comments
 (0)