# HG changeset patch # User Martin Bornhold # Date 2016-10-14 13:11:04 # Node ID 86a8d5c9ae68bf3ebbe1c02e948f90eddff04752 # Parent 499b9d52520360eb7e20415ec6abd9ec18d627fb svn-support: Add js on click handler to trigger Apache config genreation. Th on click handler sends a POST to trigger the config file generation. On succes it displays a notification to the user. diff --git a/rhodecode/templates/admin/settings/settings_vcs.html b/rhodecode/templates/admin/settings/settings_vcs.html --- a/rhodecode/templates/admin/settings/settings_vcs.html +++ b/rhodecode/templates/admin/settings/settings_vcs.html @@ -50,5 +50,17 @@ if ($('.locked_input').children().hasClass('error-message')) { unlockpath(); } - }) + + /* On click handler for the `Generate Apache Config` button. It sends a + POST request to trigger the (re)generation of the mod_dav_svn config. */ + $('#vcs_svn_generate_cfg').on('click', function(event) { + event.preventDefault(); + var url = "${h.route_path('admin_settings_vcs_svn_generate_cfg')}"; + var jqxhr = $.post(url, {'csrf_token': CSRF_TOKEN}); + jqxhr.done(function(data) { + $.Topic('/notifications').publish(data); + }); + }); + + });