fix number and insert position when adding/copying a config

This commit is contained in:
Arthur Schiwon 2015-04-09 14:44:40 +02:00
parent 00c2970547
commit 3abc72dad8

View File

@ -205,8 +205,8 @@ OCA = OCA || {};
onNewConfiguration: function(view, result) {
if(result.isSuccess === true) {
$(view.configChooserID + ' option:selected').removeAttr('selected');
var html = '<option value="'+result.configPrefix+'" selected="selected">'+t('user_ldap','{nthServer}. Server', {nthServer: $(view.configChooserID + ' option').length})+'</option>';
$(view.configChooserID + ' option:last').before(html);
var html = '<option value="'+result.configPrefix+'" selected="selected">'+t('user_ldap','{nthServer}. Server', {nthServer: $(view.configChooserID + ' option').length + 1})+'</option>';
$(view.configChooserID + ' option:last').after(html);
}
},