Просмотр исходного кода

Merge pull request #3145 from tashanta/fix-collection-regexp

Fix collection counter when we have more than 10 elements
Oskar Stark 9 лет назад
Родитель
Сommit
ae94dfa5e0
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Resources/public/Admin.js

+ 1 - 1
Resources/public/Admin.js

@@ -313,7 +313,7 @@ var Admin = {
         Admin.log('[core|setup_collection_counter] setup collection counter', subject);
 
         // Count and save element of each collection
-        var highestCounterRegexp = new RegExp('_([0-9])+$');
+        var highestCounterRegexp = new RegExp('_([0-9]+)[^0-9]*$');
         jQuery(subject).find('[data-prototype]').each(function() {
             var collection = jQuery(this);
             var counter = 0;