Rename file names

This commit is contained in:
Blade Barringer
2015-08-31 20:21:01 -05:00
parent c65ab56641
commit d5bd5f281c
3 changed files with 1 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
'use strict';
(function(){
angular
.module('habitrpg')
.directive('taskFocus', taskFocus);
taskFocus.$inject = ['$timeout'];
/**
* Directive that places focus on the element it is applied to when the
* expression it binds to evaluates to true.
*/
function taskFocus($timeout) {
return function($scope, elem, attrs) {
$scope.$watch(attrs.taskFocus, function(newVal) {
if (newVal) {
$timeout(function() {
elem[0].focus();
}, 0, false);
}
});
}
}
}());