Rename isStandalone to isRoot and use ned libraryInfo instead of the so called ubername
parent
aa96d726bd
commit
71f147058d
|
@ -4,7 +4,7 @@
|
||||||
* Functions here may be overridable by the libraries. In special cases,
|
* Functions here may be overridable by the libraries. In special cases,
|
||||||
* it is also possible to override H5P.ContentType on a global level.
|
* it is also possible to override H5P.ContentType on a global level.
|
||||||
* */
|
* */
|
||||||
H5P.ContentType = function (standalone, library) {
|
H5P.ContentType = function (isRootLibrary, library) {
|
||||||
|
|
||||||
function ContentType() {};
|
function ContentType() {};
|
||||||
|
|
||||||
|
@ -18,8 +18,8 @@ H5P.ContentType = function (standalone, library) {
|
||||||
* @method isStandalone
|
* @method isStandalone
|
||||||
* @return {Boolean}
|
* @return {Boolean}
|
||||||
*/
|
*/
|
||||||
ContentType.prototype.isStandalone = function () {
|
ContentType.prototype.isRoot = function () {
|
||||||
return standalone;
|
return isRootLibrary;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,8 +29,7 @@ H5P.ContentType = function (standalone, library) {
|
||||||
* @return {string} The full path to the file
|
* @return {string} The full path to the file
|
||||||
*/
|
*/
|
||||||
ContentType.prototype.getLibraryFilePath = function (filePath) {
|
ContentType.prototype.getLibraryFilePath = function (filePath) {
|
||||||
var libraryObject = H5P.libraryFromString(library.library);
|
return H5P.getLibraryPath(this.libraryInfo.versionedNameNoSpaces) + '/' + filePath;
|
||||||
return H5P.getLibraryPath(libraryObject.machineName + '-' + libraryObject.majorVersion + '.' + libraryObject.minorVersion) + '/' + filePath;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return ContentType;
|
return ContentType;
|
||||||
|
|
|
@ -727,7 +727,7 @@ H5P.newRunnable = function (library, contentId, $attachTo, skipResize, extras) {
|
||||||
// Makes all H5P libraries extend H5P.ContentType:
|
// Makes all H5P libraries extend H5P.ContentType:
|
||||||
var standalone = extras.standalone || false;
|
var standalone = extras.standalone || false;
|
||||||
// This order makes it possible for an H5P library to override H5P.ContentType functions!
|
// This order makes it possible for an H5P library to override H5P.ContentType functions!
|
||||||
constructor.prototype = H5P.jQuery.extend({}, H5P.ContentType(standalone, library).prototype, constructor.prototype);
|
constructor.prototype = H5P.jQuery.extend({}, H5P.ContentType(standalone).prototype, constructor.prototype);
|
||||||
|
|
||||||
var instance;
|
var instance;
|
||||||
// Some old library versions have their own custom third parameter.
|
// Some old library versions have their own custom third parameter.
|
||||||
|
|
Loading…
Reference in New Issue