From 7d8d85f45042f954ef5e571bc0d8616aaaa945ad Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Tue, 11 Feb 2014 13:45:40 +0100 Subject: [PATCH] Merged in library changes. --- h5p.classes.php | 18 ++++-------------- styles/h5p.css | 47 ----------------------------------------------- 2 files changed, 4 insertions(+), 61 deletions(-) diff --git a/h5p.classes.php b/h5p.classes.php index b647efb..122c14d 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -246,16 +246,6 @@ interface H5PFrameworkInterface { * Check if export is enabled. */ public function isExportEnabled(); - - /** - * Defines getEditorLibraries. - * - * @param $machineName Library identifier. - * @param $majorVersion Library identfier. - * @param $minorVersion Library identfier. - * @return array Editor libraries? - */ - public function getEditorLibraries($machineName, $majorVersion, $minorVersion, $complete = FALSE); } /** @@ -1131,7 +1121,7 @@ Class H5PExport { // Build h5p.json $h5pJson = array ( 'title' => $title, - 'language' => $language ? $language : 'und', + 'language' => $exportData['language'] ? $exportData['language'] : 'und', 'mainLibrary' => $exportData['mainLibrary'], 'embedTypes' => $embedTypes, ); @@ -1155,8 +1145,8 @@ Class H5PExport { } // Add preloaded and dynamic dependencies if they exist - if (isset($preloadedDependencies)) { $h5pJson['preloadedDependencies'] = $preloadedDependencies; } - if (isset($dynamicDependencies)) { $h5pJson['dynamicDependencies'] = $dynamicDependencies; } + if ($preloadedDependencies) { $h5pJson['preloadedDependencies'] = $preloadedDependencies; } + if ($dynamicDependencies) { $h5pJson['dynamicDependencies'] = $dynamicDependencies; } // Save h5p.json $results = print_r(json_encode($h5pJson), true); @@ -1208,7 +1198,7 @@ Class H5PExport { $h5pDir = $this->h5pF->getH5pPath() . DIRECTORY_SEPARATOR; $zipPath = $h5pDir . 'exports' . DIRECTORY_SEPARATOR . $contentId . '.h5p'; if (file_exists($zipPath)) { - unlink($zipPath); + file_delete($zipPath); } } diff --git a/styles/h5p.css b/styles/h5p.css index ca637e6..31a0b18 100644 --- a/styles/h5p.css +++ b/styles/h5p.css @@ -169,50 +169,3 @@ body.h5p-iframe-content div.h5p-content { body.h5p-iframe-content.h5p-fullscreen div.h5p-content { height: 100%; } - -.h5p-export { - margin-top: 6px; - display: block; - position: relative; - float: left; - border-radius: 4px; - padding: 4px 58px 3px 12px; - font-weight: 900; - font-family: "Arial Black", Arial, sans-serif; - text-transform: uppercase; - color: white !important; - background-color: #ccc; - box-shadow: 0px 0px 4px #666; -} - -.h5p-export:after { - content: ""; - - display: inline; - width: 45px; - height: 27px; - - position: absolute; - right: 0; - top: 0; - - background-image: url(../images/h5p_logo.png); - background-image: url(../images/h5p_logo.svg), none; - background-repeat: no-repeat; - background-position: left center; -} - -.h5p-export:hover { - text-decoration: none; - color: white; - box-shadow: 0px 0px 6px #333; - background-color: #0092bf; - /* Firefox */ - -moz-transition: all 0.4s ease-in; - /* WebKit */ - -webkit-transition: all 0.4s ease-in; - /* Opera */ - -o-transition: all 0.4s ease-in; - /* Standard */ - transition: all 0.4s ease-in; -}