Replaced nbsp.

editor-padding
Frode Petterson 2015-08-26 15:58:49 +02:00
parent 1298643ab1
commit d8d7fdabdd
7 changed files with 26 additions and 26 deletions

View File

@ -1,7 +1,7 @@
/*jshint -W083 */ /*jshint -W083 */
var H5PUpgrades = H5PUpgrades || {}; var H5PUpgrades = H5PUpgrades || {};
H5P.ContentUpgradeProcess = (function (Version) { H5P.ContentUpgradeProcess = (function (Version) {
/** /**
* @class * @class
@ -25,7 +25,7 @@ H5P.ContentUpgradeProcess = (function (Version) {
} }
self.loadLibrary = loadLibrary; self.loadLibrary = loadLibrary;
self.upgrade(name, oldVersion, newVersion, params, function (err, result) { self.upgrade(name, oldVersion, newVersion, params, function (err, result) {
if (err) { if (err) {
return done(err); return done(err);
} }
@ -200,7 +200,7 @@ H5P.ContentUpgradeProcess = (function (Version) {
} }
next(err); next(err);
}); });
}, function (err) { }, function (err) {
done(err, params); done(err, params);
}); });

View File

@ -7,9 +7,9 @@ var libraryLoadedCallback;
* Register message handlers * Register message handlers
*/ */
var messageHandlers = { var messageHandlers = {
newJob: function (job) { newJob: function (job) {
// Start new job // Start new job
new H5P.ContentUpgradeProcess(job.name, new H5P.Version(job.oldVersion), new H5P.Version(job.newVersion), job.params, job.id, function loadLibrary(name, version, next) { new H5P.ContentUpgradeProcess(job.name, new H5P.Version(job.oldVersion), new H5P.Version(job.newVersion), job.params, job.id, function loadLibrary(name, version, next) {
// TODO: Cache? // TODO: Cache?
postMessage({ postMessage({
action: 'loadLibrary', action: 'loadLibrary',

View File

@ -115,7 +115,7 @@
// Register message handlers // Register message handlers
var messageHandlers = { var messageHandlers = {
done: function (result) { done: function (result) {
self.workDone(result.id, result.params, this); self.workDone(result.id, result.params, this);
}, },
error: function (error) { error: function (error) {
@ -124,7 +124,7 @@
// Stop everything // Stop everything
self.terminate(); self.terminate();
}, },
loadLibrary: function (details) { loadLibrary: function (details) {
var worker = this; var worker = this;
self.loadLibrary(details.name, new Version(details.version), function (err, library) { self.loadLibrary(details.name, new Version(details.version), function (err, library) {
if (err) { if (err) {
@ -258,8 +258,8 @@
}); });
} }
else { else {
new H5P.ContentUpgradeProcess(info.library.name, new Version(info.library.version), self.version, self.parameters[id], id, function loadLibrary(name, version, next) { new H5P.ContentUpgradeProcess(info.library.name, new Version(info.library.version), self.version, self.parameters[id], id, function loadLibrary(name, version, next) {
self.loadLibrary(name, version, function (err, library) { self.loadLibrary(name, version, function (err, library) {
if (library.upgradesScript) { if (library.upgradesScript) {
self.loadScript(library.upgradesScript, function (err) { self.loadScript(library.upgradesScript, function (err) {
if (err) { if (err) {

View File

@ -7,7 +7,7 @@ var H5P = H5P || {};
* @param {string} type * @param {string} type
* @param {*} data * @param {*} data
* @param {Object} [extras] * @param {Object} [extras]
* @param {boolean} [extras.bubbles]  * @param {boolean} [extras.bubbles]
* @param {boolean} [extras.external] * @param {boolean} [extras.external]
*/ */
H5P.Event = function(type, data, extras) { H5P.Event = function(type, data, extras) {
@ -194,7 +194,7 @@ H5P.EventDispatcher = (function () {
* @private * @private
* @param {string} Event type * @param {string} Event type
*/ */
var call = function (type, event) { var call = function (type, event) {
if (triggers[type] === undefined) { if (triggers[type] === undefined) {
return; return;
} }
@ -216,7 +216,7 @@ H5P.EventDispatcher = (function () {
* Custom event data(used when event type as string is used as first * Custom event data(used when event type as string is used as first
* argument). * argument).
* @param {Object} [extras] * @param {Object} [extras]
* @param {boolean} [extras.bubbles]  * @param {boolean} [extras.bubbles]
* @param {boolean} [extras.external] * @param {boolean} [extras.external]
*/ */
this.trigger = function (event, eventData, extras) { this.trigger = function (event, eventData, extras) {

View File

@ -74,11 +74,11 @@
}; };
/** /**
* Keyup event handler. Exits full screen on escape. * Keyup event handler. Exits full screen on escape.asdasd a
* *
* @param {Event} event * @param {Event} event
*/ */
var escape = function (event) { var escape = function (event) {
if (event.keyCode === 27) { if (event.keyCode === 27) {
exitFullScreen(); exitFullScreen();
} }

View File

@ -1,4 +1,4 @@
H5P.Version = (function () { H5P.Version = (function () {
/** /**
* Make it easy to keep track of version details. * Make it easy to keep track of version details.
* *

View File

@ -111,7 +111,7 @@ H5P.init = function (target) {
params: JSON.parse(contentData.jsonContent) params: JSON.parse(contentData.jsonContent)
}; };
H5P.getUserData(contentId, 'state', function (err, previousState) { H5P.getUserData(contentId, 'state', function (err, previousState) {
if (previousState) { if (previousState) {
library.userDatas = { library.userDatas = {
state: previousState state: previousState
@ -206,7 +206,7 @@ H5P.init = function (target) {
instance.getCurrentState instanceof Function || instance.getCurrentState instanceof Function ||
typeof instance.getCurrentState === 'function')) { typeof instance.getCurrentState === 'function')) {
var saveTimer, save = function () { var saveTimer, save = function () {
var state = instance.getCurrentState(); var state = instance.getCurrentState();
if (state !== undefined) { if (state !== undefined) {
H5P.setUserData(contentId, 'state', state, {deleteOnChange: true}); H5P.setUserData(contentId, 'state', state, {deleteOnChange: true});
@ -381,7 +381,7 @@ H5P.getHeadTags = function (contentId) {
* *
* @type {Communicator} * @type {Communicator}
*/ */
H5P.communicator = (function () { H5P.communicator = (function () {
/** /**
* @class * @class
* @private * @private
@ -420,7 +420,7 @@ H5P.communicator = (function () {
* @param {string} action * @param {string} action
* @param {Object} [data] payload * @param {Object} [data] payload
*/ */
self.send = function (action, data) { self.send = function (action, data) {
if (data === undefined) { if (data === undefined) {
data = {}; data = {};
} }
@ -893,7 +893,7 @@ H5P.Dialog = function (name, title, content, $element) {
* Identifies the H5P content * Identifies the H5P content
* @returns {string} Copyright information. * @returns {string} Copyright information.
*/ */
H5P.getCopyrights = function (instance, parameters, contentId) { H5P.getCopyrights = function (instance, parameters, contentId) {
var copyrights; var copyrights;
if (instance.getCopyrights !== undefined) { if (instance.getCopyrights !== undefined) {
@ -1010,7 +1010,7 @@ H5P.openEmbedDialog = function ($element, embedCode, resizeCode, size) {
} }
return Math.ceil(num); return Math.ceil(num);
}; };
var updateEmbed = function () { var updateEmbed = function () {
$dialog.find('.h5p-embed-code-container:first').val(fullEmbedCode.replace(':w', getNum($w, size.width)).replace(':h', getNum($h, size.height))); $dialog.find('.h5p-embed-code-container:first').val(fullEmbedCode.replace(':w', getNum($w, size.width)).replace(':h', getNum($h, size.height)));
}; };
@ -1028,7 +1028,7 @@ H5P.openEmbedDialog = function ($element, embedCode, resizeCode, size) {
positionInner(); positionInner();
// Expand advanced embed // Expand advanced embed
var expand = function () { var expand = function () {
var $expander = H5P.jQuery(this); var $expander = H5P.jQuery(this);
var $content = $expander.next(); var $content = $expander.next();
if ($content.is(':visible')) { if ($content.is(':visible')) {
@ -1729,7 +1729,7 @@ H5P.createTitle = function (rawTitle, maxLength) {
options.type = 'GET'; options.type = 'GET';
} }
if (done !== undefined) { if (done !== undefined) {
options.error = function (xhr, error) { options.error = function (xhr, error) {
done(error); done(error);
}; };
options.success = function (response) { options.success = function (response) {
@ -1782,7 +1782,7 @@ H5P.createTitle = function (rawTitle, maxLength) {
} }
} }
else { else {
contentUserDataAjax(contentId, dataId, subContentId, function (err, data) { contentUserDataAjax(contentId, dataId, subContentId, function (err, data) {
if (err || data === undefined) { if (err || data === undefined) {
done(err, data); done(err, data);
return; // Error or no data return; // Error or no data
@ -1934,7 +1934,7 @@ H5P.createTitle = function (rawTitle, maxLength) {
// Relay events to top window. // Relay events to top window.
if (H5P.isFramed && H5P.externalEmbed === false) { if (H5P.isFramed && H5P.externalEmbed === false) {
H5P.externalDispatcher.on('*', function (event) { H5P.externalDispatcher.on('*', function (event) {
window.top.H5P.externalDispatcher.trigger.call(this, event); window.top.H5P.externalDispatcher.trigger.call(this, event);
}); });
} }