Commit 43cc8715 authored by Radim Klaska's avatar Radim Klaska
Browse files

Rename module from sentry to disclaimer.

parent c463dc9e
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
{
  "name": "drupal/sentry",
  "name": "drupal/disclaimer",
  "type": "drupal-module",
  "description": "Watches over users visiting sections of the site and displays disclaimer when section is entered.",
  "keywords": [
    "Drupal"
  ],
  "license": "GPL-2.0+",
  "homepage": "https://www.drupal.org/project/sentry",
  "homepage": "https://www.drupal.org/project/disclaimer",
  "minimum-stability": "dev",
  "support": {
    "issues": "https://www.drupal.org/project/issues/sentry",
    "source": "http://cgit.drupalcode.org/sentry"
    "issues": "https://www.drupal.org/project/issues/disclaimer",
    "source": "http://cgit.drupalcode.org/disclaimer"
  },
  "require": {}
}
+1 −1
Original line number Diff line number Diff line
name: Sentry
name: Disclaimer
type: module
description: Watches over users visiting sections of the site and displays disclaimer when section is entered.
core: 8.x
+2 −2
Original line number Diff line number Diff line
sentry:
disclaimer:
  js:
    js/sentry.js: {}
    js/disclaimer.js: {}
  dependencies:
    - core/drupal
    - core/drupalSettings
+3 −3
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@

/**
 * @file
 * Contains sentry.module.
 * Contains disclaimer.module.
 */

use Drupal\Core\Routing\RouteMatchInterface;
@@ -10,9 +10,9 @@ use Drupal\Core\Routing\RouteMatchInterface;
/**
 * Implements hook_help().
 */
function sentry_help($route_name, RouteMatchInterface $route_match) {
function disclaimer_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.sentry':
    case 'help.page.disclaimer':
      $output = '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('Watches over users visiting sections of the site and displays disclaimer when section is entered.') . '</p>';
      return $output;
+5 −5
Original line number Diff line number Diff line
@@ -6,19 +6,19 @@

  'use strict';

  Drupal.behaviors.sentry = {
  Drupal.behaviors.disclaimer = {
    attach: function (context, settings) {

      // Show/Hide based on Javascript availability.
      $('.sentryNoScript').hide();
      $('.disclaimerNoScript').hide();

      // Go trough all sentry block instances on this page.
      $.each(drupalSettings.sentry, function (index, value) {
      // Go trough all disclaimer block instances on this page.
      $.each(drupalSettings.disclaimer, function (index, value) {

        // Skip popup in case cookie says user already agreed.
        if ($.cookie(index) !== '1') {
          // User did not agreed yet. Show popup.
          $('.block.' + index + ' .sentry__challenge', context).dialog({
          $('.block.' + index + ' .disclaimer__challenge', context).dialog({
            closeOnEscape: false,
            open: function (event, ui) {
              $('.ui-dialog-titlebar-close', ui.dialog | ui).hide();
Loading