1// https://civicrm.org/licensing 2CRM.$(function($) { 3 $(document) 4 .on('crmWysiwygCreate', function(e, type, editor) { 5 if (type === 'ckeditor') { 6 editor.on('maximize', function(e) { 7 $('#wpadminbar').toggle(e.data === 2); 8 }); 9 } 10 }); 11 // Prevent screen reader shortcuts from changing the document hash and breaking angular routes. 12 $('a.screen-reader-shortcut').click(function() { 13 var target = $(this).attr('href'); 14 // Show toolbar if hidden. 15 if (target === '#wp-toolbar' && CRM.menubar.position === 'over-cms-menu') { 16 CRM.menubar.togglePosition(false); 17 } 18 // The targets are "div" elements so need special handling. 19 $(target).css('outline', 'none !important').attr("tabindex", -1).trigger('focus'); 20 // Prevent unwanted jump. 21 $('html').scrollTop(0); 22 return false; 23 }); 24 $('<a href="#crm-qsearch-input" class="screen-reader-shortcut">' + ts("Open CiviCRM Menu") + '</a>') 25 .prependTo('#adminmenumain') 26 .click(function() { 27 CRM.menubar.open('Home'); 28 return false; 29 }); 30});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.