Loading core/modules/media_library/js/media_library.ui.es6.js +0 −24 Original line number Diff line number Diff line Loading @@ -35,30 +35,6 @@ }); }; /** * Warn users when clicking outgoing links from the library or widget. * * @type {Drupal~behavior} * * @prop {Drupal~behaviorAttach} attach * Attaches behavior to links in the media library. */ Drupal.behaviors.MediaLibraryWidgetWarn = { attach(context) { $('.js-media-library-item a[href]', context) .once('media-library-warn-link') .on('click', e => { const message = Drupal.t( 'Unsaved changes to the form will be lost. Are you sure you want to leave?', ); const confirmation = window.confirm(message); if (!confirmation) { e.preventDefault(); } }); }, }; /** * Load media library content through AJAX. * Loading core/modules/media_library/js/media_library.ui.js +0 −12 Original line number Diff line number Diff line Loading @@ -16,18 +16,6 @@ }); }; Drupal.behaviors.MediaLibraryWidgetWarn = { attach: function attach(context) { $('.js-media-library-item a[href]', context).once('media-library-warn-link').on('click', function (e) { var message = Drupal.t('Unsaved changes to the form will be lost. Are you sure you want to leave?'); var confirmation = window.confirm(message); if (!confirmation) { e.preventDefault(); } }); } }; Drupal.behaviors.MediaLibraryTabs = { attach: function attach(context) { var $menu = $('.js-media-library-menu'); Loading Loading
core/modules/media_library/js/media_library.ui.es6.js +0 −24 Original line number Diff line number Diff line Loading @@ -35,30 +35,6 @@ }); }; /** * Warn users when clicking outgoing links from the library or widget. * * @type {Drupal~behavior} * * @prop {Drupal~behaviorAttach} attach * Attaches behavior to links in the media library. */ Drupal.behaviors.MediaLibraryWidgetWarn = { attach(context) { $('.js-media-library-item a[href]', context) .once('media-library-warn-link') .on('click', e => { const message = Drupal.t( 'Unsaved changes to the form will be lost. Are you sure you want to leave?', ); const confirmation = window.confirm(message); if (!confirmation) { e.preventDefault(); } }); }, }; /** * Load media library content through AJAX. * Loading
core/modules/media_library/js/media_library.ui.js +0 −12 Original line number Diff line number Diff line Loading @@ -16,18 +16,6 @@ }); }; Drupal.behaviors.MediaLibraryWidgetWarn = { attach: function attach(context) { $('.js-media-library-item a[href]', context).once('media-library-warn-link').on('click', function (e) { var message = Drupal.t('Unsaved changes to the form will be lost. Are you sure you want to leave?'); var confirmation = window.confirm(message); if (!confirmation) { e.preventDefault(); } }); } }; Drupal.behaviors.MediaLibraryTabs = { attach: function attach(context) { var $menu = $('.js-media-library-menu'); Loading