diff --git a/fonts/h5p-core-16.eot b/fonts/h5p-core-16.eot deleted file mode 100644 index 239079b..0000000 Binary files a/fonts/h5p-core-16.eot and /dev/null differ diff --git a/fonts/h5p-core-16.svg b/fonts/h5p-core-16.svg deleted file mode 100644 index d0bdb88..0000000 --- a/fonts/h5p-core-16.svg +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - -{ - "fontFamily": "h5p", - "description": "Font generated by IcoMoon.", - "majorVersion": 1, - "minorVersion": 1, - "version": "Version 1.1", - "fontId": "h5p", - "psName": "h5p", - "subFamily": "Regular", - "fullName": "h5p" -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fonts/h5p-core-16.ttf b/fonts/h5p-core-16.ttf deleted file mode 100644 index daf1571..0000000 Binary files a/fonts/h5p-core-16.ttf and /dev/null differ diff --git a/fonts/h5p-core-16.woff b/fonts/h5p-core-16.woff deleted file mode 100644 index d654df4..0000000 Binary files a/fonts/h5p-core-16.woff and /dev/null differ diff --git a/fonts/h5p-core-17.eot b/fonts/h5p-core-17.eot new file mode 100755 index 0000000..89bfcc6 Binary files /dev/null and b/fonts/h5p-core-17.eot differ diff --git a/fonts/h5p-core-17.svg b/fonts/h5p-core-17.svg new file mode 100755 index 0000000..9c12732 --- /dev/null +++ b/fonts/h5p-core-17.svg @@ -0,0 +1,50 @@ + + + + + + +{ + "fontFamily": "h5p", + "description": "Font generated by IcoMoon.", + "majorVersion": 1, + "minorVersion": 1, + "version": "Version 1.1", + "fontId": "h5p", + "psName": "h5p", + "subFamily": "Regular", + "fullName": "h5p" +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fonts/h5p-core-17.ttf b/fonts/h5p-core-17.ttf new file mode 100755 index 0000000..4d70f94 Binary files /dev/null and b/fonts/h5p-core-17.ttf differ diff --git a/fonts/h5p-core-17.woff b/fonts/h5p-core-17.woff new file mode 100755 index 0000000..78cdb4c Binary files /dev/null and b/fonts/h5p-core-17.woff differ diff --git a/h5p-default-storage.class.php b/h5p-default-storage.class.php index 25ae287..0c67341 100644 --- a/h5p-default-storage.class.php +++ b/h5p-default-storage.class.php @@ -16,17 +16,20 @@ * @license MIT */ class H5PDefaultStorage implements \H5PFileStorage { - private $path; + private $path, $alteditorpath; /** * The great Constructor! * * @param string $path * The base location of H5P files + * @param string $alteditorpath + * Optional. Use a different editor path */ - function __construct($path) { + function __construct($path, $alteditorpath = NULL) { // Set H5P storage path $this->path = $path; + $this->alteditorpath = $alteditorpath; } /** @@ -50,11 +53,11 @@ class H5PDefaultStorage implements \H5PFileStorage { * * @param string $source * Path on file system to content directory. - * @param int $id - * What makes this content unique. + * @param array $content + * Content properties */ - public function saveContent($source, $id) { - $dest = "{$this->path}/content/{$id}"; + public function saveContent($source, $content) { + $dest = "{$this->path}/content/{$content['id']}"; // Remove any old content \H5PCore::deleteFileTree($dest); @@ -65,11 +68,11 @@ class H5PDefaultStorage implements \H5PFileStorage { /** * Remove content folder. * - * @param int $id - * Content identifier + * @param array $content + * Content properties */ - public function deleteContent($id) { - \H5PCore::deleteFileTree("{$this->path}/content/{$id}"); + public function deleteContent($content) { + \H5PCore::deleteFileTree("{$this->path}/content/{$content['id']}"); } /** @@ -82,7 +85,9 @@ class H5PDefaultStorage implements \H5PFileStorage { */ public function cloneContent($id, $newId) { $path = $this->path . '/content/'; - self::copyFileTree($path . $id, $path . $newId); + if (file_exists($path . $id)) { + self::copyFileTree($path . $id, $path . $newId); + } } /** @@ -106,7 +111,15 @@ class H5PDefaultStorage implements \H5PFileStorage { * Where the content folder will be saved */ public function exportContent($id, $target) { - self::copyFileTree("{$this->path}/content/{$id}", $target); + $source = "{$this->path}/content/{$id}"; + if (file_exists($source)) { + // Copy content folder if it exists + self::copyFileTree($source, $target); + } + else { + // No contnet folder, create emty dir for content.json + self::dirReady($target); + } } /** @@ -265,6 +278,114 @@ class H5PDefaultStorage implements \H5PFileStorage { } } + /** + * Read file content of given file and then return it. + * + * @param string $file_path + * @return string + */ + public function getContent($file_path) { + return file_get_contents($this->path . $file_path); + } + + /** + * Save files uploaded through the editor. + * The files must be marked as temporary until the content form is saved. + * + * @param \H5peditorFile $file + * @param int $contentid + */ + public function saveFile($file, $contentId) { + // Prepare directory + if (empty($contentId)) { + // Should be in editor tmp folder + $path = ($this->alteditorpath !== NULL ? $this->alteditorpath : $this->path . '/editor'); + } + else { + // Should be in content folder + $path = $this->path . '/content/' . $contentId; + } + $path .= '/' . $file->getType() . 's'; + self::dirReady($path); + + // Add filename to path + $path .= '/' . $file->getName(); + + $fileData = $file->getData(); + if ($fileData) { + file_put_contents($path, $fileData); + } + else { + copy($_FILES['file']['tmp_name'], $path); + } + + return $path; + } + + /** + * Copy a file from another content or editor tmp dir. + * Used when copy pasting content in H5P Editor. + * + * @param string $file path + name + * @param string|int $fromid Content ID or 'editor' string + * @param int $toid Target Content ID + */ + public function cloneContentFile($file, $fromId, $toId) { + // Determine source path + if ($fromId === 'editor') { + $sourcepath = ($this->alteditorpath !== NULL ? $this->alteditorpath : "{$this->path}/editor"); + } + else { + $sourcepath = "{$this->path}/content/{$fromId}"; + } + $sourcepath .= '/' . $file; + + // Determine target path + $filename = basename($file); + $filedir = str_replace($filename, '', $file); + $targetpath = "{$this->path}/content/{$toId}/{$filedir}"; + + // Make sure it's ready + self::dirReady($targetpath); + + $targetpath .= $filename; + + // Check to see if source exist and if target doesn't + if (!file_exists($sourcepath) || file_exists($targetpath)) { + return; // Nothing to copy from or target already exists + } + + copy($sourcepath, $targetpath); + } + + /** + * Checks to see if content has the given file. + * Used when saving content. + * + * @param string $file path + name + * @param int $contentId + * @return string File ID or NULL if not found + */ + public function getContentFile($file, $contentId) { + $path = "{$this->path}/content/{$contentId}/{$file}"; + return file_exists($path) ? $path : NULL; + } + + /** + * Checks to see if content has the given file. + * Used when saving content. + * + * @param string $file path + name + * @param int $contentid + * @return string|int File ID or NULL if not found + */ + public function removeContentFile($file, $contentId) { + $path = "{$this->path}/content/{$contentId}/{$file}"; + if (file_exists($path)) { + unlink($path); + } + } + /** * Recursive function for copying directories. * @@ -326,13 +447,10 @@ class H5PDefaultStorage implements \H5PFileStorage { * Recursive function that makes sure the specified directory exists and * is writable. * - * TODO: Will be made private when the editor file handling is done by this - * class! - * * @param string $path * @return bool */ - public static function dirReady($path) { + private static function dirReady($path) { if (!file_exists($path)) { $parent = preg_replace("/\/[^\/]+\/?$/", '', $path); if (!self::dirReady($parent)) { diff --git a/h5p-file-storage.interface.php b/h5p-file-storage.interface.php index 3e4de89..3c621f7 100644 --- a/h5p-file-storage.interface.php +++ b/h5p-file-storage.interface.php @@ -22,18 +22,18 @@ interface H5PFileStorage { * * @param string $source * Path on file system to content directory. - * @param int $id - * What makes this content unique. + * @param array $content + * Content properties */ - public function saveContent($source, $id); + public function saveContent($source, $content); /** * Remove content folder. * - * @param int $id - * Content identifier + * @param array $content + * Content properties */ - public function deleteContent($id); + public function deleteContent($content); /** * Creates a stored copy of the content folder. @@ -125,4 +125,50 @@ interface H5PFileStorage { * The hash keys of removed files */ public function deleteCachedAssets($keys); + + /** + * Read file content of given file and then return it. + * + * @param string $file_path + * @return string contents + */ + public function getContent($file_path); + + /** + * Save files uploaded through the editor. + * The files must be marked as temporary until the content form is saved. + * + * @param \H5peditorFile $file + * @param int $contentid + */ + public function saveFile($file, $contentId); + + /** + * Copy a file from another content or editor tmp dir. + * Used when copy pasting content in H5P. + * + * @param string $file path + name + * @param string|int $fromid Content ID or 'editor' string + * @param int $toid Target Content ID + */ + public function cloneContentFile($file, $fromId, $toId); + + /** + * Checks to see if content has the given file. + * Used when saving content. + * + * @param string $file path + name + * @param int $contentId + * @return string|int File ID or NULL if not found + */ + public function getContentFile($file, $contentId); + + /** + * Remove content files that are no longer used. + * Used when saving content. + * + * @param string $file path + name + * @param int $contentId + */ + public function removeContentFile($file, $contentId); } diff --git a/h5p.classes.php b/h5p.classes.php index ac10ebb..b0ad889 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -580,7 +580,7 @@ class H5PValidator { // Schemas used to validate the h5p files private $h5pRequired = array( 'title' => '/^.{1,255}$/', - 'language' => '/^[a-z]{1,5}$/', + 'language' => '/^[-a-zA-Z]{1,10}$/', 'preloadedDependencies' => array( 'machineName' => '/^[\w0-9\-\.]{1,255}$/i', 'majorVersion' => '/^[0-9]{1,5}$/', @@ -1326,15 +1326,15 @@ class H5PStorage { if (isset($options['disable'])) { $content['disable'] = $options['disable']; } - $contentId = $this->h5pC->saveContent($content, $contentMainId); - $this->contentId = $contentId; + $content['id'] = $this->h5pC->saveContent($content, $contentMainId); + $this->contentId = $content['id']; try { // Save content folder contents - $this->h5pC->fs->saveContent($current_path, $contentId); + $this->h5pC->fs->saveContent($current_path, $content); } catch (Exception $e) { - $this->h5pF->setErrorMessage($this->h5pF->t($e->getMessage())); + $this->h5pF->setErrorMessage($e->getMessage()); } // Remove temp content folder @@ -1448,7 +1448,7 @@ class H5PStorage { * @param $content */ public function deletePackage($content) { - $this->h5pC->fs->deleteContent($content['id']); + $this->h5pC->fs->deleteContent($content); $this->h5pC->fs->deleteExport(($content['slug'] ? $content['slug'] . '-' : '') . $content['id'] . '.h5p'); $this->h5pF->deleteContentData($content['id']); } @@ -1725,7 +1725,7 @@ class H5PCore { public static $defaultContentWhitelist = 'json png jpg jpeg gif bmp tif tiff svg eot ttf woff woff2 otf webm mp4 ogg mp3 txt pdf rtf doc docx xls xlsx ppt pptx odt ods odp xml csv diff patch swf md textile'; public static $defaultLibraryWhitelistExtras = 'js css'; - public $librariesJsonData, $contentJsonData, $mainJsonData, $h5pF, $fs, $development_mode, $h5pD, $disableFileCheck; + public $librariesJsonData, $contentJsonData, $mainJsonData, $h5pF, $fs, $h5pD, $disableFileCheck; const SECONDS_IN_WEEK = 604800; private $exportEnabled; @@ -1761,23 +1761,18 @@ class H5PCore { * @param string $url To file storage directory. * @param string $language code. Defaults to english. * @param boolean $export enabled? - * @param int $development_mode mode. */ - public function __construct(H5PFrameworkInterface $H5PFramework, $path, $url, $language = 'en', $export = FALSE, $development_mode = H5PDevelopment::MODE_NONE) { + public function __construct(H5PFrameworkInterface $H5PFramework, $path, $url, $language = 'en', $export = FALSE) { $this->h5pF = $H5PFramework; $this->fs = ($path instanceof \H5PFileStorage ? $path : new \H5PDefaultStorage($path)); $this->url = $url; $this->exportEnabled = $export; - $this->development_mode = $development_mode; + $this->development_mode = H5PDevelopment::MODE_NONE; $this->aggregateAssets = FALSE; // Off by default.. for now - if ($development_mode & H5PDevelopment::MODE_LIBRARY) { - $this->h5pD = new H5PDevelopment($this->h5pF, $path . '/', $language); - } - $this->detectSiteType(); $this->fullPluginPath = preg_replace('/\/[^\/]+[\/]?$/', '' , dirname(__FILE__)); @@ -1785,6 +1780,8 @@ class H5PCore { $this->relativePathRegExp = '/^((\.\.\/){1,2})(.*content\/)?(\d+|editor)\/(.+)$/'; } + + /** * Save content and clear cache. * @@ -1827,7 +1824,7 @@ class H5PCore { unset($content['libraryId'], $content['libraryName'], $content['libraryEmbedTypes'], $content['libraryFullscreen']); // // TODO: Move to filterParameters? -// if ($this->development_mode & H5PDevelopment::MODE_CONTENT) { +// if (isset($this->h5pD)) { // // TODO: Remove Drupal specific stuff // $json_content_path = file_create_path(file_directory_path() . '/' . variable_get('h5p_default_path', 'h5p') . '/content/' . $id . '/content.json'); // if (file_exists($json_content_path) === TRUE) { @@ -1937,7 +1934,7 @@ class H5PCore { public function loadContentDependencies($id, $type = NULL) { $dependencies = $this->h5pF->loadContentDependencies($id, $type); - if ($this->development_mode & H5PDevelopment::MODE_LIBRARY) { + if (isset($this->h5pD)) { $developmentLibraries = $this->h5pD->getLibraries(); foreach ($dependencies as $key => $dependency) { @@ -2086,7 +2083,7 @@ class H5PCore { */ public function loadLibrarySemantics($name, $majorVersion, $minorVersion) { $semantics = NULL; - if ($this->development_mode & H5PDevelopment::MODE_LIBRARY) { + if (isset($this->h5pD)) { // Try to load from dev lib $semantics = $this->h5pD->getSemantics($name, $majorVersion, $minorVersion); } @@ -2114,7 +2111,7 @@ class H5PCore { */ public function loadLibrary($name, $majorVersion, $minorVersion) { $library = NULL; - if ($this->development_mode & H5PDevelopment::MODE_LIBRARY) { + if (isset($this->h5pD)) { // Try to load from dev $library = $this->h5pD->getLibrary($name, $majorVersion, $minorVersion); if ($library !== NULL) { @@ -2512,9 +2509,9 @@ class H5PCore { * @return array */ public function getDisplayOptionsForEdit($disable = NULL) { - $display_options = []; + $display_options = array(); - $current_display_options = $disable === NULL ? [] : $this->getDisplayOptionsAsArray($disable); + $current_display_options = $disable === NULL ? array() : $this->getDisplayOptionsAsArray($disable); if ($this->h5pF->getOption(self::DISPLAY_OPTION_FRAME, TRUE)) { $display_options[self::DISPLAY_OPTION_FRAME] = @@ -3267,9 +3264,11 @@ class H5PContentValidator { if (!in_array($value->library, $semantics->options)) { $message = NULL; // Create an understandable error message: - $machineName = explode(' ', $value->library)[0]; + $machineNameArray = explode(' ', $value->library); + $machineName = $machineNameArray[0]; foreach ($semantics->options as $semanticsLibrary) { - $semanticsMachineName = explode(' ', $semanticsLibrary)[0]; + $semanticsMachineNameArray = explode(' ', $semanticsLibrary); + $semanticsMachineName = $semanticsMachineNameArray[0]; if ($machineName === $semanticsMachineName) { // Using the wrong version of the library in the content $message = $this->h5pF->t('The version of the H5P library %machineName used in this content is not valid. Content contains %contentLibrary, but it should be %semanticsLibrary.', array( diff --git a/js/h5p-action-bar.js b/js/h5p-action-bar.js index 8e34eb7..9a0f441 100644 --- a/js/h5p-action-bar.js +++ b/js/h5p-action-bar.js @@ -1,9 +1,19 @@ +/** + * @class + * @augments H5P.EventDispatcher + * @param {Object} displayOptions + * @param {boolean} displayOptions.export Triggers the display of the 'Download' button + * @param {boolean} displayOptions.copyright Triggers the display of the 'Copyright' button + * @param {boolean} displayOptions.embed Triggers the display of the 'Embed' button + * @param {boolean} displayOptions.icon Triggers the display of the 'H5P icon' link + */ H5P.ActionBar = (function ($, EventDispatcher) { "use strict"; function ActionBar(displayOptions) { EventDispatcher.call(this); + /** @alias H5P.ActionBar# */ var self = this; var hasActions = false; @@ -19,6 +29,9 @@ H5P.ActionBar = (function ($, EventDispatcher) { * @param {string} customClass Instead of type class */ var addActionButton = function (type, customClass) { + /** + * Handles selection of action + */ var handler = function () { self.trigger(type); }; @@ -63,7 +76,6 @@ H5P.ActionBar = (function ($, EventDispatcher) { /** * Returns a reference to the dom element * - * @method getDOMElement * @return {H5P.jQuery} */ self.getDOMElement = function () { @@ -73,13 +85,12 @@ H5P.ActionBar = (function ($, EventDispatcher) { /** * Does the actionbar contain actions? * - * @method hasActions * @return {Boolean} */ self.hasActions = function () { return hasActions; - } - }; + }; + } ActionBar.prototype = Object.create(EventDispatcher.prototype); ActionBar.prototype.constructor = ActionBar; diff --git a/js/h5p-content-type.js b/js/h5p-content-type.js index afe4136..8be8fcd 100644 --- a/js/h5p-content-type.js +++ b/js/h5p-content-type.js @@ -3,10 +3,17 @@ * * Functions here may be overridable by the libraries. In special cases, * it is also possible to override H5P.ContentType on a global level. - * */ + * + * NOTE that this doesn't actually 'extend' the event dispatcher but instead + * it creates a single instance which all content types shares as their base + * prototype. (in some cases this may be the root of strange event behavior) + * + * @class + * @augments H5P.EventDispatcher + */ H5P.ContentType = function (isRootLibrary, library) { - function ContentType() {}; + function ContentType() {} // Inherit from EventDispatcher. ContentType.prototype = new H5P.EventDispatcher(); @@ -15,7 +22,6 @@ H5P.ContentType = function (isRootLibrary, library) { * Is library standalone or not? Not beeing standalone, means it is * included in another library * - * @method isStandalone * @return {Boolean} */ ContentType.prototype.isRoot = function () { @@ -24,7 +30,6 @@ H5P.ContentType = function (isRootLibrary, library) { /** * Returns the file path of a file in the current library - * @method getLibraryFilePath * @param {string} filePath The path to the file relative to the library folder * @return {string} The full path to the file */ diff --git a/js/h5p-x-api-event.js b/js/h5p-x-api-event.js index 212fe0b..e5d6368 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 * @@ -298,5 +308,10 @@ H5P.XAPIEvent.allowedXAPIVerbs = [ 'shared', 'suspended', 'terminated', - 'voided' + 'voided', + + // Custom verbs used for action toolbar below content + 'downloaded', + 'accessed-embed', + 'accessed-copyright' ]; diff --git a/js/h5p.js b/js/h5p.js index d5a6436..36e2709 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -158,16 +158,19 @@ H5P.init = function (target) { actionBar.on('download', function () { window.location.href = contentData.exportUrl; + instance.triggerXAPI('downloaded'); }); actionBar.on('copyrights', function () { var dialog = new H5P.Dialog('copyrights', H5P.t('copyrightInformation'), copyrights, $container); dialog.open(); + instance.triggerXAPI('accessed-copyright'); }); actionBar.on('embed', function () { H5P.openEmbedDialog($actions, contentData.embedCode, contentData.resizeCode, { width: $element.width(), height: $element.height() }); + instance.triggerXAPI('accessed-embed'); }); if (actionBar.hasActions()) { @@ -435,7 +438,6 @@ H5P.communicator = (function () { /** * Enter semi fullscreen for the given H5P instance * - * @method semiFullScreen * @param {H5P.jQuery} $element Content container. * @param {Object} instance * @param {function} exitCallback Callback function called when user exits fullscreen. @@ -660,7 +662,14 @@ H5P.getPath = function (path, contentId) { var prefix; if (contentId !== undefined) { - prefix = H5PIntegration.url + '/content/' + contentId; + // Check for custom override URL + if (H5PIntegration.contents !== undefined && + H5PIntegration.contents['cid-' + contentId]) { + prefix = H5PIntegration.contents['cid-' + contentId].contentUrl; + } + if (!prefix) { + prefix = H5PIntegration.url + '/content/' + contentId; + } } else if (window.H5PEditor !== undefined) { prefix = H5PEditor.filesPath; @@ -886,6 +895,7 @@ H5P.t = function (key, vars, ns) { * Which DOM element the dialog should be inserted after. */ H5P.Dialog = function (name, title, content, $element) { + /** @alias H5P.Dialog# */ var self = this; var $dialog = H5P.jQuery('
\
\ @@ -914,7 +924,10 @@ H5P.Dialog = function (name, title, content, $element) { .end() .end(); - this.open = function () { + /** + * Opens the dialog. + */ + self.open = function () { setTimeout(function () { $dialog.addClass('h5p-open'); // Fade in // Triggering an event, in case something has to be done after dialog has been opened. @@ -922,7 +935,10 @@ H5P.Dialog = function (name, title, content, $element) { }, 1); }; - this.close = function () { + /** + * Closes the dialog. + */ + self.close = function () { $dialog.removeClass('h5p-open'); // Fade out setTimeout(function () { $dialog.remove(); @@ -1646,8 +1662,7 @@ H5P.setFinished = function (contentId, score, maxScore, time) { maxScore: maxScore, opened: toUnix(H5P.opened[contentId]), finished: toUnix(new Date()), - time: time, - token: H5PIntegration.tokens.result + time: time }); } }; @@ -1791,8 +1806,7 @@ H5P.createTitle = function (rawTitle, maxLength) { options.data = { data: (data === null ? 0 : data), preload: (preload ? 1 : 0), - invalidate: (invalidate ? 1 : 0), - token: H5PIntegration.tokens.contentUserData + invalidate: (invalidate ? 1 : 0) }; } else { diff --git a/styles/h5p-admin.css b/styles/h5p-admin.css index bcd72d5..64c025c 100644 --- a/styles/h5p-admin.css +++ b/styles/h5p-admin.css @@ -204,7 +204,7 @@ button.h5p-admin.disabled:hover { line-height: 130%; border: none; background: none; - font-family: 'H5P'; /* TODO: Find content */ + font-family: 'H5P'; font-size: 1.4em; } .h5p-content-pager > button:focus { diff --git a/styles/h5p-confirmation-dialog.css b/styles/h5p-confirmation-dialog.css index 4fd45c0..47f727a 100644 --- a/styles/h5p-confirmation-dialog.css +++ b/styles/h5p-confirmation-dialog.css @@ -5,7 +5,7 @@ left: 0; top: 0; - background: rgba(28, 34, 41, 0.9); + background: rgba(44, 44, 44, 0.9); opacity: 1; visibility: visible; -webkit-transition: opacity 0.1s, linear 0s, visibility 0s linear 0s; 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; diff --git a/styles/h5p.css b/styles/h5p.css old mode 100644 new mode 100755 index 2e5842e..7bb0a56 --- a/styles/h5p.css +++ b/styles/h5p.css @@ -3,11 +3,11 @@ /* Custom H5P font to use for icons. */ @font-face { font-family: 'h5p'; - src: url('../fonts/h5p-core-16.eot?80e76o'); - src: url('../fonts/h5p-core-16.eot?80e76o#iefix') format('embedded-opentype'), - url('../fonts/h5p-core-16.ttf?80e76o') format('truetype'), - url('../fonts/h5p-core-16.woff?80e76o') format('woff'), - url('../fonts/h5p-core-16.svg?80e76o#h5p-core-15') format('svg'); + src: url('../fonts/h5p-core-17.eot?ddjqkb'); + src: url('../fonts/h5p-core-17.eot?ddjqkb#iefix') format('embedded-opentype'), + url('../fonts/h5p-core-17.ttf?ddjqkb') format('truetype'), + url('../fonts/h5p-core-17.woff?ddjqkb') format('woff'), + url('../fonts/h5p-core-17.svg?ddjqkb#h5p') format('svg'); font-weight: normal; font-style: normal; }