Commit 4fd52986 authored by paalj's avatar paalj

Updated php-libs to solve IE fieldset problem

parent 55523ed6
......@@ -285,7 +285,7 @@ class H5PDefaultStorage implements \H5PFileStorage {
* @return string
*/
public function getContent($file_path) {
return file_get_contents($file_path);
return file_get_contents($this->path . $file_path);
}
/**
......
......@@ -1589,15 +1589,11 @@ Class H5PExport {
$zip = new ZipArchive();
$zip->open($tmpFile, ZipArchive::CREATE | ZipArchive::OVERWRITE);
// Some system needs the root prefix for ZipArchive's addFile()
$rootPrefix = (empty($_SERVER['DOCUMENT_ROOT']) ? '' : $_SERVER['DOCUMENT_ROOT'] . '/');
// Add all the files from the tmp dir.
foreach ($files as $file) {
// Please note that the zip format has no concept of folders, we must
// use forward slashes to separate our directories.
$zip->addFile($file->absolutePath, $file->relativePath);
$zip->addFile($rootPrefix . $file->absolutePath, $file->relativePath);
$zip->addFile(realpath($file->absolutePath), $file->relativePath);
}
// Close zip and remove tmp dir
......
......@@ -312,9 +312,8 @@ class H5peditor {
* @param int $majorVersion
* @param int $minorVersion
* @param string $prefix Optional part to add between URL and asset path
* @param string $fileDir Optional file dir to read files from
*/
public function getLibraryData($machineName, $majorVersion, $minorVersion, $languageCode, $prefix = '', $fileDir = '') {
public function getLibraryData($machineName, $majorVersion, $minorVersion, $languageCode, $prefix = '') {
$libraryData = new stdClass();
$libraries = $this->findEditorLibraries($machineName, $majorVersion, $minorVersion);
......@@ -328,14 +327,14 @@ class H5peditor {
// the editor works.
// Get list of JS and CSS files that belongs to the dependencies
$files = $this->h5p->getDependenciesFiles($libraries, $prefix);
$files = $this->h5p->getDependenciesFiles($libraries);
$this->storage->alterLibraryFiles($files, $libraries);
// Restore asset aggregation setting
$this->h5p->aggregateAssets = $aggregateAssets;
// Create base URL
$url = $this->h5p->url;
$url = $this->h5p->url . $prefix;
// Javascripts
if (!empty($files['scripts'])) {
......@@ -346,7 +345,7 @@ class H5peditor {
}
else {
// Local file
$libraryData->javascript[$url . $script->path . $script->version] = "\n" . $this->h5p->fs->getContent($fileDir . $script->path);
$libraryData->javascript[$url . $script->path . $script->version] = "\n" . $this->h5p->fs->getContent($script->path);
}
}
}
......@@ -361,7 +360,7 @@ class H5peditor {
else {
// Local file
H5peditor::buildCssPath(NULL, $url . dirname($css->path) . '/');
$libraryData->css[$url . $css->path . $css->version] = preg_replace_callback('/url\([\'"]?(?![a-z]+:|\/+)([^\'")]+)[\'"]?\)/i', 'H5peditor::buildCssPath', $this->h5p->fs->getContent($fileDir . $css->path));
$libraryData->css[$url . $css->path . $css->version] = preg_replace_callback('/url\([\'"]?(?![a-z]+:|\/+)([^\'")]+)[\'"]?\)/i', 'H5peditor::buildCssPath', $this->h5p->fs->getContent($css->path));
}
}
}
......
......@@ -353,10 +353,15 @@
margin: 0;
padding: 0;
min-width: 0;
display: table-column;
}
/* line 321, ../scss/_form-groups.scss */
@-moz-document url-prefix() {
/* line 321, ../scss/_form-groups.scss */
.listgroup > .group.field {
display: table-column;
}
}
/* line 325, ../scss/_form-groups.scss */
.content {
display: block;
margin: 0;
......@@ -366,36 +371,36 @@
background: #FFFFFF;
}
/* line 330, ../scss/_form-groups.scss */
/* line 334, ../scss/_form-groups.scss */
.common {
margin-top: 20px;
}
/* line 333, ../scss/_form-groups.scss */
/* line 337, ../scss/_form-groups.scss */
.common > .h5peditor-label {
margin: 0;
padding: 0 10px;
cursor: pointer;
font-size: 1em;
}
/* line 342, ../scss/_form-groups.scss */
/* line 346, ../scss/_form-groups.scss */
.common > .h5peditor-label > .icon:before {
content: "\e565";
font-family: "H5P";
margin-right: 5px;
}
/* line 347, ../scss/_form-groups.scss */
/* line 351, ../scss/_form-groups.scss */
.common > .h5peditor-label:hover > .icon {
opacity: 1;
}
/* line 351, ../scss/_form-groups.scss */
/* line 355, ../scss/_form-groups.scss */
.common > .h5peditor-label:focus {
outline: none;
}
/* line 355, ../scss/_form-groups.scss */
/* line 359, ../scss/_form-groups.scss */
.common > .h5peditor-label:focus > .icon:before {
outline: 1px dashed;
}
/* line 359, ../scss/_form-groups.scss */
/* line 363, ../scss/_form-groups.scss */
.common > .fields {
min-height: 2em;
padding: 20px;
......@@ -403,30 +408,30 @@
border-top: none;
background: #FFFFFF;
}
/* line 366, ../scss/_form-groups.scss */
/* line 370, ../scss/_form-groups.scss */
.common > .fields > .desc {
margin: 0;
font-size: 0.875em;
color: #666;
}
/* line 372, ../scss/_form-groups.scss */
/* line 376, ../scss/_form-groups.scss */
.common > .fields p:first-child {
margin-bottom: 20px;
}
/* line 378, ../scss/_form-groups.scss */
/* line 382, ../scss/_form-groups.scss */
.common.collapsed > .h5peditor-label > .icon:before {
content: "\e566";
}
/* line 381, ../scss/_form-groups.scss */
/* line 385, ../scss/_form-groups.scss */
.common.collapsed > .fields {
display: none;
}
/* line 386, ../scss/_form-groups.scss */
/* line 390, ../scss/_form-groups.scss */
.common.hidden {
display: none;
}
/* line 393, ../scss/_form-groups.scss */
/* line 397, ../scss/_form-groups.scss */
.h5peditor-button[aria-label]:before {
content: attr(aria-label);
visibility: hidden;
......@@ -442,11 +447,11 @@
line-height: 1.5;
box-shadow: 0 0 0.5em #858585;
}
/* line 411, ../scss/_form-groups.scss */
/* line 415, ../scss/_form-groups.scss */
.h5peditor-button[aria-label]:hover:before {
visibility: visible;
}
/* line 415, ../scss/_form-groups.scss */
/* line 419, ../scss/_form-groups.scss */
.h5peditor-button[aria-label][aria-disabled="true"]:before {
display: none;
}
......
......@@ -316,7 +316,11 @@
margin: 0;
padding: 0;
min-width: 0;
display: table-column;
}
@-moz-document url-prefix() {
.listgroup > .group.field {
display: table-column;
}
}
.content {
display: block;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment