diff --git a/app/controllers/collections_migration_controller.rb b/app/controllers/collections_migration_controller.rb index 95ec5c08..92c0f970 100644 --- a/app/controllers/collections_migration_controller.rb +++ b/app/controllers/collections_migration_controller.rb @@ -16,7 +16,7 @@ def person RefreshUncollectedWorksCollection.call(@author) prep_toc @top_nodes = GenerateTocTree.call(@author) - + @nonce = 'top' end def create_collection diff --git a/app/views/collections_migration/person.html.haml b/app/views/collections_migration/person.html.haml index 3f11d86d..95750385 100644 --- a/app/views/collections_migration/person.html.haml +++ b/app/views/collections_migration/person.html.haml @@ -140,7 +140,7 @@ data: {collection: { collection_type: item_type, title: new_title}, authority: { id: #{@author.id } , role: $('#role').val()}}, success: function(data) { $('#newcoll_section').hide(); - $('html, body').animate({scrollTop: $('##{nonce}_coll_container_'+data.collection_id).offset().top + $('##{nonce}_coll_container_'+data.collection_id).outerHeight() - $('header').height() - 180}, 500); + $('html, body').animate({scrollTop: $('##{@nonce}_coll_container_'+data.collection_id).offset().top + $('##{@nonce}_coll_container_'+data.collection_id).outerHeight() - $('header').height() - 180}, 500); } }); });