commit
31b7ad02fe
7 changed files with 498 additions and 366 deletions
|
|
@ -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', []);
|
||||
|
|
|
|||
19
src/js/directives/elastic.js
Normal file
19
src/js/directives/elastic.js
Normal 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);
|
||||
}
|
||||
};
|
||||
}
|
||||
]);
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue