Skip to content

Commit

Permalink
3901: Small changes requested by code review
Browse files Browse the repository at this point in the history
  • Loading branch information
holt83 committed Dec 17, 2018
1 parent 9847587 commit b366e11
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions modules/ding_webtrekk/ding_webtrekk.js
Expand Up @@ -111,6 +111,9 @@
// on the panel pane. There are no panel hooks where we can get the title
// and easily change the content tree to add event and URL-parameters to
// elements (content is already rendered when hook is run).
// Note that 'once' and 'context' is left out intentionally in the outer
// most selector. This is because items in the carousel are lazy loaded
// and we want to make sure the selector applies when new items is added.
$('.ding-carousel').each(function() {
var key = 'u_navigatedby';
// We need a title to send as value in the 'u_navigatedby' parameter, so
Expand Down
10 changes: 5 additions & 5 deletions modules/ding_webtrekk/ding_webtrekk.module
Expand Up @@ -51,10 +51,10 @@ function ding_webtrekk_page_alter(&$page) {
'option: {}
};' . $tag_integration_logic,
'type' => 'inline',
// Use the JS_LIBRARY group to add script at the top of head. Use -21 for
// weight to ensure it's added below the Page parameters which has -22.
// The weights are set above -20 to get it above core jQuery library,
// which is added with the weight -20.
// We want the webtrekk loader as high as possible in the HTML-head, as
// recommended in the implementation guidelines. We therefore use the
// JS_LIBRARY group and choose a weight lower than the weights in
// system_library().
// See: ding_webtrekk_preprocess_html().
// See: system_library().
'group' => JS_LIBRARY,
Expand Down Expand Up @@ -194,7 +194,7 @@ function ding_webtrekk_ding_entity_view($entity, $view_mode) {
'p_mat_indexno' => $entity->getClassification(),
'p_mat_lang' => $entity->getLanguage(),
'p_mat_source' => $entity->getAc_source(),
'p_mat_category' => implode(';', $entity->reply->getGenre()),
'p_mat_category' => implode(';', $entity->getTingObject()->getGenre()),
];
ding_webtrekk_add_page_parameters($params);
}
Expand Down

0 comments on commit b366e11

Please sign in to comment.