-
Notifications
You must be signed in to change notification settings - Fork 4
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 #1 from hamrant/playlists
Backport from YGBW: playlists + alerts
- Loading branch information
Showing
165 changed files
with
11,249 additions
and
223 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
59 changes: 59 additions & 0 deletions
59
...ny_digital_signage_alerts/config/install/core.entity_view_display.node.alert.ds_alert.yml
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,59 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
config: | ||
- core.entity_view_mode.node.ds_alert | ||
- field.field.node.alert.field_alert_belongs | ||
- field.field.node.alert.field_alert_color | ||
- field.field.node.alert.field_alert_description | ||
- field.field.node.alert.field_alert_display_on_ds | ||
- field.field.node.alert.field_alert_ds_description | ||
- field.field.node.alert.field_alert_ds_screen | ||
- field.field.node.alert.field_alert_icon_color | ||
- field.field.node.alert.field_alert_link | ||
- field.field.node.alert.field_alert_place | ||
- field.field.node.alert.field_alert_text_color | ||
- field.field.node.alert.field_alert_visibility_pages | ||
- field.field.node.alert.field_alert_visibility_state | ||
- field.field.node.alert.scheduled_status | ||
- node.type.alert | ||
module: | ||
- link | ||
- options | ||
- text | ||
- user | ||
id: node.alert.ds_alert | ||
targetEntityType: node | ||
bundle: alert | ||
mode: ds_alert | ||
content: | ||
field_alert_description: | ||
weight: 0 | ||
label: hidden | ||
settings: { } | ||
third_party_settings: { } | ||
type: text_default | ||
region: content | ||
field_alert_ds_description: | ||
type: text_default | ||
weight: 1 | ||
region: content | ||
label: hidden | ||
settings: { } | ||
third_party_settings: { } | ||
hidden: | ||
addthis: true | ||
content_moderation_control: true | ||
field_alert_belongs: true | ||
field_alert_color: true | ||
field_alert_display_on_ds: true | ||
field_alert_ds_screen: true | ||
field_alert_icon_color: true | ||
field_alert_link: true | ||
field_alert_place: true | ||
field_alert_text_color: true | ||
field_alert_visibility_pages: true | ||
field_alert_visibility_state: true | ||
langcode: true | ||
links: true | ||
scheduled_status: true |
9 changes: 9 additions & 0 deletions
9
modules/openy_digital_signage_alerts/config/install/core.entity_view_mode.node.ds_alert.yml
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,9 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
module: | ||
- node | ||
id: node.ds_alert | ||
label: 'DS Alert' | ||
targetEntityType: node | ||
cache: true |
25 changes: 25 additions & 0 deletions
25
...igital_signage_alerts/config/install/field.field.node.alert.field_alert_display_on_ds.yml
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,25 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
config: | ||
- field.storage.node.field_alert_display_on_ds | ||
- node.type.alert | ||
enforced: | ||
module: | ||
- openy_digital_signage_alerts | ||
id: node.alert.field_alert_display_on_ds | ||
field_name: field_alert_display_on_ds | ||
entity_type: node | ||
bundle: alert | ||
label: 'Display alert on a DS screen' | ||
description: '' | ||
required: false | ||
translatable: false | ||
default_value: | ||
- | ||
value: 0 | ||
default_value_callback: '' | ||
settings: | ||
on_label: 'On' | ||
off_label: 'Off' | ||
field_type: boolean |
31 changes: 31 additions & 0 deletions
31
...gital_signage_alerts/config/install/field.field.node.alert.field_alert_ds_description.yml
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,31 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
config: | ||
- field.storage.node.field_alert_ds_description | ||
- node.type.alert | ||
enforced: | ||
module: | ||
- openy_digital_signage_alerts | ||
module: | ||
- allowed_formats | ||
- text | ||
third_party_settings: | ||
allowed_formats: | ||
plain_text: plain_text | ||
full_html: '0' | ||
digital_signage_html: '0' | ||
digital_signage_inline_html: '0' | ||
code: '0' | ||
id: node.alert.field_alert_ds_description | ||
field_name: field_alert_ds_description | ||
entity_type: node | ||
bundle: alert | ||
label: 'DS description' | ||
description: 'Alternative alert description specially for DS screens.' | ||
required: false | ||
translatable: false | ||
default_value: { } | ||
default_value_callback: '' | ||
settings: { } | ||
field_type: text_long |
27 changes: 27 additions & 0 deletions
27
...ny_digital_signage_alerts/config/install/field.field.node.alert.field_alert_ds_screen.yml
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,27 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
config: | ||
- field.storage.node.field_alert_ds_screen | ||
- node.type.alert | ||
enforced: | ||
module: | ||
- openy_digital_signage_alerts | ||
id: node.alert.field_alert_ds_screen | ||
field_name: field_alert_ds_screen | ||
entity_type: node | ||
bundle: alert | ||
label: Screen | ||
description: 'Optionally you can specify the list DS screens to display this alert. Otherwise, the alert will be displayed on all screens.' | ||
required: false | ||
translatable: false | ||
default_value: { } | ||
default_value_callback: '' | ||
settings: | ||
handler: 'default:openy_digital_signage_screen' | ||
handler_settings: | ||
target_bundles: null | ||
sort: | ||
field: _none | ||
auto_create: false | ||
field_type: entity_reference |
20 changes: 20 additions & 0 deletions
20
...ny_digital_signage_alerts/config/install/field.storage.node.field_alert_display_on_ds.yml
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,20 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
module: | ||
- node | ||
enforced: | ||
module: | ||
- openy_digital_signage_alerts | ||
id: node.field_alert_display_on_ds | ||
field_name: field_alert_display_on_ds | ||
entity_type: node | ||
type: boolean | ||
settings: { } | ||
module: core | ||
locked: false | ||
cardinality: 1 | ||
translatable: true | ||
indexes: { } | ||
persist_with_no_fields: false | ||
custom_storage: false |
21 changes: 21 additions & 0 deletions
21
...y_digital_signage_alerts/config/install/field.storage.node.field_alert_ds_description.yml
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,21 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
module: | ||
- node | ||
- text | ||
enforced: | ||
module: | ||
- openy_digital_signage_alerts | ||
id: node.field_alert_ds_description | ||
field_name: field_alert_ds_description | ||
entity_type: node | ||
type: text_long | ||
settings: { } | ||
module: text | ||
locked: false | ||
cardinality: 1 | ||
translatable: true | ||
indexes: { } | ||
persist_with_no_fields: false | ||
custom_storage: false |
22 changes: 22 additions & 0 deletions
22
.../openy_digital_signage_alerts/config/install/field.storage.node.field_alert_ds_screen.yml
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,22 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
module: | ||
- node | ||
- openy_digital_signage_screen | ||
enforced: | ||
module: | ||
- openy_digital_signage_alerts | ||
id: node.field_alert_ds_screen | ||
field_name: field_alert_ds_screen | ||
entity_type: node | ||
type: entity_reference | ||
settings: | ||
target_type: openy_digital_signage_screen | ||
module: core | ||
locked: false | ||
cardinality: -1 | ||
translatable: true | ||
indexes: { } | ||
persist_with_no_fields: false | ||
custom_storage: false |
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,13 @@ | ||
.openy-digital-signage-block-static-ticker.ds-alert { | ||
position: absolute; | ||
width: 100%; | ||
z-index: 1000; | ||
} | ||
|
||
.ds-alert-header { | ||
top: 0; | ||
} | ||
|
||
.ds-alert-footer { | ||
bottom: 0; | ||
} |
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,47 @@ | ||
/** | ||
* @file | ||
* Provides OpenY Digital Signage alerts related behavior. | ||
*/ | ||
(function ($, window, Drupal, drupalSettings) { | ||
|
||
'use strict'; | ||
|
||
/** | ||
* Attaches the behavior to window object once. | ||
* | ||
* @type {Drupal~behavior} | ||
* | ||
* @prop {Drupal~behaviorAttach} attach | ||
* Adds proper orientation classes to all the output layouts. | ||
*/ | ||
Drupal.behaviors.ds_alerts = { | ||
attach: function (context, settings) { | ||
checkAlerts(settings.ds.screenId); | ||
}, | ||
}; | ||
|
||
/** | ||
* Checks and redraw DS alerts. | ||
* | ||
* @param screenId | ||
* DS screen ID. | ||
*/ | ||
function checkAlerts(screenId) { | ||
if (typeof screenId !== 'undefined' && screenId) { | ||
$.ajax({ | ||
url: "/ajax/screen-alerts/redraw-alert/" + screenId, | ||
}).done(function(data) { | ||
if (data) { | ||
$('#openy-ds-alerts').replaceWith(data); | ||
} | ||
else { | ||
$('#openy-ds-alerts').empty(); | ||
} | ||
}); | ||
} | ||
|
||
// Set the function to infinite loop. | ||
setTimeout(checkAlerts, 60000); | ||
} | ||
|
||
})(jQuery, window, Drupal, drupalSettings); |
8 changes: 8 additions & 0 deletions
8
modules/openy_digital_signage_alerts/openy_digital_signage_alerts.info.yml
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,8 @@ | ||
name: Open Y Digital Signage Alerts | ||
type: module | ||
description: Digital Signage Alerts. | ||
core: 8.x | ||
package: "OpenY: Digital Signage" | ||
dependencies: | ||
- openy_digital_signage_screen | ||
- openy_node_alert |
10 changes: 10 additions & 0 deletions
10
modules/openy_digital_signage_alerts/openy_digital_signage_alerts.libraries.yml
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,10 @@ | ||
ds_alerts: | ||
version: VERSION | ||
css: | ||
theme: | ||
css/style.css: {} | ||
js: | ||
js/screen-alerts.js: {} | ||
dependencies: | ||
- core/jquery | ||
- core/drupalSettings |
Oops, something went wrong.