SYWEB-12: More formatting.

This commit is contained in:
Kegan Dougal 2014-10-30 13:24:40 +00:00
parent 40342af459
commit 6f3f631fd1
4 changed files with 32 additions and 7 deletions

View file

@ -40,4 +40,19 @@ angular.module('matrixWebClient')
}
}
};
}]);
}])
.directive('elastic', [ // http://stackoverflow.com/questions/17772260/textarea-auto-height
'$timeout',
function($timeout) {
return {
restrict: 'A',
link: function($scope, element) {
var resize = function() {
return element[0].style.height = "" + element[0].scrollHeight + "px";
};
element.on("blur keyup change", resize);
$timeout(resize, 10);
}
};
}
]);;