]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix number and insert position when adding/copying a config
authorArthur Schiwon <blizzz@owncloud.com>
Thu, 9 Apr 2015 12:44:40 +0000 (14:44 +0200)
committerArthur Schiwon <blizzz@owncloud.com>
Thu, 9 Apr 2015 12:44:40 +0000 (14:44 +0200)
apps/user_ldap/js/wizard/wizardTabElementary.js

index f4a966328c1eeabc8b4160be032396cb129e2d8f..c7767b9cf669fada9a3c640d63bbc75a1f715e75 100644 (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);
                        }
                },