Merge pull request #2062 from canton7/feature/issue-2041

Allow #editIgnores to scroll in browser (fixes #2041)
This commit is contained in:
Audrius Butkevicius 2015-07-15 17:48:15 +01:00
commit 00bebc317e

View File

@ -1230,18 +1230,20 @@ angular.module('syncthing.core')
.success(function (data) {
data.ignore = data.ignore || [];
$('#editFolder').modal('hide');
$('#editFolder').modal('hide')
.one('hidden.bs.modal', function() {
var textArea = $('#editIgnores textarea');
textArea.val(data.ignore.join('\n'));
$('#editIgnores').modal()
.on('hidden.bs.modal', function () {
.one('hidden.bs.modal', function () {
$('#editFolder').modal();
})
.on('shown.bs.modal', function () {
.one('shown.bs.modal', function () {
textArea.focus();
});
});
})
.then(function () {
$('#editIgnoresButton').removeAttr('disabled');