diff --git a/js/h5p-x-api-event.js b/js/h5p-x-api-event.js index 212fe0b..cc7fd66 100644 --- a/js/h5p-x-api-event.js +++ b/js/h5p-x-api-event.js @@ -248,6 +248,16 @@ H5P.XAPIEvent.prototype.getContentXAPIId = function (instance) { return xAPIId; }; +/** + * Check if this event is sent from a child (i.e not from grandchild) + * + * @return {Boolean} + */ +H5P.XAPIEvent.prototype.isFromChild = function () { + var parentId = this.getVerifiedStatementValue(['context', 'contextActivities', 'parent', 0, 'id']); + return !parentId || parentId.indexOf('subContentId') === -1; +} + /** * Figure out if a property exists in the statement and return it * diff --git a/styles/h5p-core-button.css b/styles/h5p-core-button.css index eb4e08d..e6511dc 100644 --- a/styles/h5p-core-button.css +++ b/styles/h5p-core-button.css @@ -8,7 +8,7 @@ button.h5p-core-button { padding: 0.5em 1.25em; border-radius: 2em; - background: #488ac9; + background: #2579c6; color: #fff; cursor: pointer; @@ -21,24 +21,19 @@ button.h5p-core-button { text-shadow: none; vertical-align: baseline; text-decoration: none; -} -button.h5p-core-button:hover, -button.h5p-core-button:focus { - background: #3b71a5; - color: #fff; - text-decoration: none; + -webkit-transition: initial; transition: initial; } -button.h5p-core-button:active { - position: relative; - background: #104888; - - -webkit-box-shadow: inset 0 4px 0 #0e407a; - -moz-box-shadow: inset 0 4px 0 #0e407a; - box-shadow: inset 0 4px 0 #0e407a; +button.h5p-core-button:focus { + background: #1f67a8; +} +button.h5p-core-button:hover { + background: rgba(31, 103, 168, 0.83); +} +button.h5p-core-button:active { + background: #104888; } - button.h5p-core-button:before { font-family: 'H5P'; padding-right: 0.15em; @@ -46,7 +41,6 @@ button.h5p-core-button:before { vertical-align: middle; line-height: 0.7; } - button.h5p-core-cancel-button:visited, button.h5p-core-cancel-button:link, button.h5p-core-cancel-button { @@ -58,7 +52,6 @@ button.h5p-core-cancel-button { text-decoration: none; cursor: pointer; } - button.h5p-core-cancel-button:hover, button.h5p-core-cancel-button:focus { background: none;