Sha256: 7410fcd4a4db9f6e23b5bafa5d8596dc0029079db42c952c7a48910b3f4d8bb5
Contents?: true
Size: 916 Bytes
Versions: 18
Compression:
Stored size: 916 Bytes
Contents
pageflow.links = { setup: function() { this.ensureClickOnEnterKeyPress(); this.setupContentSkipLinks(); this.ensureTargetBlankForContentLinks(); }, ensureClickOnEnterKeyPress: function() { $('body').on('keypress', 'a, [tabindex]', function(e) { if (e.which == 13) { $(this).click(); } }); $('body').on('keyup', 'a, [tabindex]', function (e) { e.stopPropagation(); }); }, setupContentSkipLinks: function() { $('.content_link').attr('href', '#firstContent'); $('.content_link').click(function(e) { $('#firstContent').focus(); e.preventDefault(); return false; }); }, // There was a time when the rich text editor did not add target // attributes to inline links even though it should have. ensureTargetBlankForContentLinks: function(context) { $('.contentText p a', context).attr('target', '_blank'); } };
Version data entries
18 entries across 18 versions & 1 rubygems