forked from nyuhsl/data-catalog
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request nyuhsl#164 from nyuhsl/feature/fix-js-old
Feature/fix js old
- Loading branch information
Showing
9 changed files
with
85 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
{# Insert your analytics code snippet here #} | ||
<script> | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 2 additions & 33 deletions
35
app/Resources/views/default/view_dataset_internal.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace AppBundle\EventListener; | ||
|
||
use Symfony\Component\HttpKernel\Event\FilterResponseEvent; | ||
|
||
class ResponseListener | ||
{ | ||
public function onKernelResponse(FilterResponseEvent $event) | ||
{ | ||
$event->getResponse()->headers->set('Strict-Transport-Security', 'max-age=7776000'); | ||
$event->getResponse()->headers->set('Content-Security-Policy', "default-src 'self' https://netdna.bootstrapcdn.com https://maxcdn.bootstrapcdn.com https://docs.google.com https://www.google-analytics.com https://*.nyu.edu https://*.nyumc.org https://fonts.googleapis.com; script-src 'self' https://maxcdn.bootstrapcdn.com https://cdnjs.cloudflare.com https://www.googletagmanager.com https://www.google-analytics.com https://script.crazyegg.com https://ajax.googleapis.com https://stackpath.bootstrapcdn.com; object-src 'none'; frame-ancestors 'self'; form-action 'self'"); | ||
$event->getResponse()->headers->set('X-Content-Type-Options', 'nosniff'); | ||
} | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
|
||
/** | ||
* Record outbound link clicks for Analytics | ||
*/ | ||
var trackOutboundLink = function(url, label) { | ||
gtag('event', 'click', { | ||
'event_category': 'outbound', | ||
'event_label': label, | ||
'transport_type': 'beacon' | ||
}); | ||
} | ||
|
||
/** | ||
* Initialize page popovers | ||
*/ | ||
$(function () { | ||
// initialize Author popovers | ||
$('.dataset-authors-section [data-toggle="popover"]').popover({ | ||
'html':'true', | ||
'animation':false, | ||
'trigger':'manual', | ||
'placement':'bottom', | ||
}).on("mouseenter", function () { | ||
var _this = this; | ||
$(this).popover("show"); | ||
$(".popover").on("mouseleave", function () { | ||
$(_this).popover('hide'); | ||
}); | ||
}).on("mouseleave", function () { | ||
var _this = this; | ||
setTimeout(function () { | ||
if (!$(".popover:hover").length) { | ||
$(_this).popover("hide"); | ||
} | ||
}, 200); | ||
}); | ||
|
||
// initialize Publisher popovers | ||
$('.publishers-list [data-toggle="popover"]').popover({ | ||
'html':'true', | ||
'animation':false, | ||
'trigger':'manual', | ||
'placement':'top', | ||
}).on("mouseenter", function () { | ||
var _this = this; | ||
$(this).popover("show"); | ||
$(".popover").on("mouseleave", function () { | ||
$(_this).popover('hide'); | ||
}); | ||
}).on("mouseleave", function () { | ||
var _this = this; | ||
setTimeout(function () { | ||
if (!$(".popover:hover").length) { | ||
$(_this).popover("hide"); | ||
} | ||
}, 200); | ||
}); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ | |
*/ | ||
jQuery(function($) { | ||
|
||
|
||
/** | ||
* Interactivity with breadcrumbs | ||
*/ | ||
|