Projet

Général

Profil

Paste
Télécharger (1,09 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / themes / bootstrap / js / modules / dashboard / dashboard.js @ fc457866

1
(function ($) {
2
  // Override core JS so it works with "button" tags.
3
  if (Drupal.behaviors.dashboard && Drupal.behaviors.dashboard.setupDrawer) {
4
    /**
5
     * Sets up the drag-and-drop behavior and the 'close' button.
6
     */
7
    Drupal.behaviors.dashboard.setupDrawer = function () {
8
      $('div.customize .canvas-content :input').click(Drupal.behaviors.dashboard.exitCustomizeMode);
9
      $('div.customize .canvas-content').append('<a class="button" href="' + Drupal.settings.dashboard.dashboard + '">' + Drupal.t('Done') + '</a>');
10
      // Initialize drag-and-drop.
11
      var regions = $('#dashboard div.region');
12
      regions.sortable({
13
        connectWith: regions,
14
        cursor: 'move',
15
        cursorAt: {top:0},
16
        dropOnEmpty: true,
17
        items: '> div.block, > div.disabled-block',
18
        placeholder: 'block-placeholder clearfix',
19
        tolerance: 'pointer',
20
        start: Drupal.behaviors.dashboard.start,
21
        over: Drupal.behaviors.dashboard.over,
22
        sort: Drupal.behaviors.dashboard.sort,
23
        update: Drupal.behaviors.dashboard.update
24
      });
25
    };
26
  }
27
})(jQuery);