CRM-15551 - crmEditable: add placeholder if empty after editing
[civicrm-core.git] / js / crm.drupal.js
1 // http://civicrm.org/licensing
2 CRM.$(function($) {
3 $(document)
4 .on('crmLoad', function() {
5 // This is drupal's old-school way of listening for 'load' type events. It has to be called manually.
6 Drupal.attachBehaviors(this);
7 })
8 .on('crmUnload', function() {
9 Drupal.detachBehaviors(this);
10 })
11 .on('dialogopen', function(e) {
12 // D7 hack to get the toolbar out of the way (CRM-15341)
13 $('#toolbar').css('z-index', '100');
14 })
15 .on('dialogclose', function(e) {
16 if ($('.ui-dialog-content:visible').not(e.target).length < 1) {
17 // D7 hack, restore toolbar position (CRM-15341)
18 $('#toolbar').css('z-index', '');
19 }
20 })
21 });