mirror of
https://github.com/nextcloud/passman.git
synced 2024-11-15 12:32:46 +08:00
23 lines
445 B
JavaScript
23 lines
445 B
JavaScript
|
'use strict';
|
||
|
|
||
|
/**
|
||
|
* @ngdoc directive
|
||
|
* @name passmanApp.directive:autoScroll
|
||
|
* @description
|
||
|
* # autoScroll
|
||
|
*/
|
||
|
angular.module('passmanApp')
|
||
|
.directive('autoScroll', function () {
|
||
|
return {
|
||
|
restrict: 'A',
|
||
|
scope: {
|
||
|
autoScroll: '='
|
||
|
},
|
||
|
link: function postLink(scope, element, attrs) {
|
||
|
scope.$watch('autoScroll', function () {
|
||
|
$('#import_log').scrollTop($('#import_log')[0].scrollHeight);
|
||
|
}, true);
|
||
|
}
|
||
|
};
|
||
|
});
|