1 // http://civicrm.org/licensing
4 .on('crmWysiwygCreate', function(e
, type
, editor
) {
5 if (type
=== 'ckeditor') {
6 editor
.on('maximize', function(e
) {
7 $('#wpadminbar').toggle(e
.data
=== 2);
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);
21 $('<a href="#crm-qsearch-input" class="screen-reader-shortcut">' + ts("Open CiviCRM Menu") + '</a>')
22 .prependTo('#adminmenumain')
24 CRM
.menubar
.open('Home');