Sha256: 693cd3c7dece6512610141d55662c36b5befd6f624c51bf906a67c7978aa04ad
Contents?: true
Size: 672 Bytes
Versions: 2
Compression:
Stored size: 672 Bytes
Contents
(function() { "use strict"; var body, links; App.register('component').enter(function() { body = $('body'); links = $('a:not([data-method="delete"]):not([data-action="destroy"]):not(.has_many_add):not(.dropdown_menu_button):not([target="_blank"])'); // Add 'loading' class to the body when a link is clicked, // add add 'active' class to the clicked link. links.click(function() { links.removeClass('active'); body.addClass('loading'); $(this).addClass('active'); }); }).exit(function() { // Remove the classes when the body is unloaded body.removeClass('loading'); links.removeClass('active'); }); })();
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
active_admin_pro-0.2.4 | app/assets/javascripts/active_admin_pro/components/link.js |
active_admin_pro-0.2.3 | app/assets/javascripts/active_admin_pro/components/link.js |