Update: Fixes memo cut-off, changes memo to textarea, auto-expand based on content length, display memo while transaction is in Receiving state

This commit is contained in:
Sam Cheng Hung 2018-03-22 11:50:26 +09:00
commit 7b26261512
7 changed files with 498 additions and 366 deletions

View file

@ -0,0 +1,19 @@
'use strict';
angular.module('bitcoincom.directives')
.directive('elastic', [
'$timeout',
function($timeout) {
return {
restrict: 'A',
link: function($scope, element) {
$scope.initialHeight = $scope.initialHeight || element[0].style.height;
var resize = function() {
element[0].style.height = $scope.initialHeight;
element[0].style.height = "" + element[0].scrollHeight + "px";
};
element.on("input change", resize);
$timeout(resize, 0);
}
};
}
]);