Revision 2ef21a75 snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/foundation/foundation.reveal.js

b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/foundation/foundation.reveal.js
14 14
      animation: 'fadeAndPop',
15 15
      animationSpeed: 250,
16 16
      closeOnBackgroundClick: true,
17
      closeOnEsc: true,
17 18
      dismissModalClass: 'close-reveal-modal',
18 19
      bgClass: 'reveal-modal-bg',
19 20
      open: function(){},
......
78 79
        .on('closed.fndtn.reveal', '.reveal-modal', this.settings.closed)
79 80
        .on('closed.fndtn.reveal', '.reveal-modal', this.close_video);
80 81

  
82
        $( 'body' ).bind( 'keyup.reveal', function ( event ) {
83
          var open_modal = $('.reveal-modal.open'),
84
              settings = $.extend({}, self.settings, self.data_options(open_modal));
85
          if ( event.which === 27  && settings.closeOnEsc) { // 27 is the keycode for the Escape key
86
            open_modal.foundation('reveal', 'close');
87
          }
88
        });
89

  
81 90
      return true;
82 91
    },
83 92

  

Also available in: Unified diff