Merge pull request #69 from Bitcoin-com/fixmemofield

BW-235 & BW-236
This commit is contained in:
Sam Cheng Hung 2018-03-23 09:01:51 +09:00 committed by GitHub
commit 31b7ad02fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 498 additions and 366 deletions

View file

@ -18,7 +18,8 @@ var modules = [
'copayApp.services',
'copayApp.controllers',
'copayApp.directives',
'copayApp.addons'
'copayApp.addons',
'bitcoincom.directives'
];
var copayApp = window.copayApp = angular.module('copayApp', modules);
@ -28,3 +29,4 @@ angular.module('copayApp.services', []);
angular.module('copayApp.controllers', []);
angular.module('copayApp.directives', []);
angular.module('copayApp.addons', []);
angular.module('bitcoincom.directives', []);

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);
}
};
}
]);

View file

@ -290,4 +290,20 @@
font-size: 12px;
color: $v-text-accent-color;
}
/*
Helper classes for .label. Will have to relook into the whole CSS structure for potential optimisations.
*/
.label {
&.flex {
display: flex;
textarea {
flex: 1 1 auto;
}
}
&.align-items-center {
align-items: center;
}
}
}