From d8d7fdabdd0666b484ac3460db33acdd7050c7ec Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Wed, 26 Aug 2015 15:58:49 +0200 Subject: [PATCH] Replaced nbsp. --- js/h5p-content-upgrade-process.js | 6 +++--- js/h5p-content-upgrade-worker.js | 4 ++-- js/h5p-content-upgrade.js | 8 ++++---- js/h5p-event-dispatcher.js | 6 +++--- js/h5p-resizer.js | 6 +++--- js/h5p-version.js | 2 +- js/h5p.js | 20 ++++++++++---------- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/js/h5p-content-upgrade-process.js b/js/h5p-content-upgrade-process.js index 94a6809..8edc28d 100644 --- a/js/h5p-content-upgrade-process.js +++ b/js/h5p-content-upgrade-process.js @@ -1,7 +1,7 @@ /*jshint -W083 */ var H5PUpgrades = H5PUpgrades || {}; -H5P.ContentUpgradeProcess = (function (Version) { +H5P.ContentUpgradeProcess = (function (Version) { /** * @class @@ -25,7 +25,7 @@ H5P.ContentUpgradeProcess = (function (Version) { } self.loadLibrary = loadLibrary; - self.upgrade(name, oldVersion, newVersion, params, function (err, result) { + self.upgrade(name, oldVersion, newVersion, params, function (err, result) { if (err) { return done(err); } @@ -200,7 +200,7 @@ H5P.ContentUpgradeProcess = (function (Version) { } next(err); }); - + }, function (err) { done(err, params); }); diff --git a/js/h5p-content-upgrade-worker.js b/js/h5p-content-upgrade-worker.js index 4cd0047..26ad038 100644 --- a/js/h5p-content-upgrade-worker.js +++ b/js/h5p-content-upgrade-worker.js @@ -7,9 +7,9 @@ var libraryLoadedCallback; * Register message handlers */ var messageHandlers = { - newJob: function (job) { + newJob: function (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? postMessage({ action: 'loadLibrary', diff --git a/js/h5p-content-upgrade.js b/js/h5p-content-upgrade.js index cd50b86..9c1e4ce 100644 --- a/js/h5p-content-upgrade.js +++ b/js/h5p-content-upgrade.js @@ -115,7 +115,7 @@ // Register message handlers var messageHandlers = { - done: function (result) { + done: function (result) { self.workDone(result.id, result.params, this); }, error: function (error) { @@ -124,7 +124,7 @@ // Stop everything self.terminate(); }, - loadLibrary: function (details) { + loadLibrary: function (details) { var worker = this; self.loadLibrary(details.name, new Version(details.version), function (err, library) { if (err) { @@ -258,8 +258,8 @@ }); } else { - 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) { + 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) { if (library.upgradesScript) { self.loadScript(library.upgradesScript, function (err) { if (err) { diff --git a/js/h5p-event-dispatcher.js b/js/h5p-event-dispatcher.js index 0fb9acb..8369bd2 100644 --- a/js/h5p-event-dispatcher.js +++ b/js/h5p-event-dispatcher.js @@ -7,7 +7,7 @@ var H5P = H5P || {}; * @param {string} type * @param {*} data * @param {Object} [extras] - * @param {boolean} [extras.bubbles]  + * @param {boolean} [extras.bubbles] * @param {boolean} [extras.external] */ H5P.Event = function(type, data, extras) { @@ -194,7 +194,7 @@ H5P.EventDispatcher = (function () { * @private * @param {string} Event type */ - var call = function (type, event) { + var call = function (type, event) { if (triggers[type] === undefined) { return; } @@ -216,7 +216,7 @@ H5P.EventDispatcher = (function () { * Custom event data(used when event type as string is used as first * argument). * @param {Object} [extras] - * @param {boolean} [extras.bubbles]  + * @param {boolean} [extras.bubbles] * @param {boolean} [extras.external] */ this.trigger = function (event, eventData, extras) { diff --git a/js/h5p-resizer.js b/js/h5p-resizer.js index bbfb009..a1cf418 100644 --- a/js/h5p-resizer.js +++ b/js/h5p-resizer.js @@ -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 */ - var escape = function (event) { + var escape = function (event) { if (event.keyCode === 27) { exitFullScreen(); } diff --git a/js/h5p-version.js b/js/h5p-version.js index 78275b1..605bc04 100644 --- a/js/h5p-version.js +++ b/js/h5p-version.js @@ -1,4 +1,4 @@ -H5P.Version = (function () { +H5P.Version = (function () { /** * Make it easy to keep track of version details. * diff --git a/js/h5p.js b/js/h5p.js index 0d1ff2f..abc7a35 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -111,7 +111,7 @@ H5P.init = function (target) { params: JSON.parse(contentData.jsonContent) }; - H5P.getUserData(contentId, 'state', function (err, previousState) { + H5P.getUserData(contentId, 'state', function (err, previousState) { if (previousState) { library.userDatas = { state: previousState @@ -206,7 +206,7 @@ H5P.init = function (target) { instance.getCurrentState instanceof Function || typeof instance.getCurrentState === 'function')) { - var saveTimer, save = function () { + var saveTimer, save = function () { var state = instance.getCurrentState(); if (state !== undefined) { H5P.setUserData(contentId, 'state', state, {deleteOnChange: true}); @@ -381,7 +381,7 @@ H5P.getHeadTags = function (contentId) { * * @type {Communicator} */ -H5P.communicator = (function () { +H5P.communicator = (function () { /** * @class * @private @@ -420,7 +420,7 @@ H5P.communicator = (function () { * @param {string} action * @param {Object} [data] payload */ - self.send = function (action, data) { + self.send = function (action, data) { if (data === undefined) { data = {}; } @@ -893,7 +893,7 @@ H5P.Dialog = function (name, title, content, $element) { * Identifies the H5P content * @returns {string} Copyright information. */ -H5P.getCopyrights = function (instance, parameters, contentId) { +H5P.getCopyrights = function (instance, parameters, contentId) { var copyrights; if (instance.getCopyrights !== undefined) { @@ -1010,7 +1010,7 @@ H5P.openEmbedDialog = function ($element, embedCode, resizeCode, size) { } 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))); }; @@ -1028,7 +1028,7 @@ H5P.openEmbedDialog = function ($element, embedCode, resizeCode, size) { positionInner(); // Expand advanced embed - var expand = function () { + var expand = function () { var $expander = H5P.jQuery(this); var $content = $expander.next(); if ($content.is(':visible')) { @@ -1729,7 +1729,7 @@ H5P.createTitle = function (rawTitle, maxLength) { options.type = 'GET'; } if (done !== undefined) { - options.error = function (xhr, error) { + options.error = function (xhr, error) { done(error); }; options.success = function (response) { @@ -1782,7 +1782,7 @@ H5P.createTitle = function (rawTitle, maxLength) { } } else { - contentUserDataAjax(contentId, dataId, subContentId, function (err, data) { + contentUserDataAjax(contentId, dataId, subContentId, function (err, data) { if (err || data === undefined) { done(err, data); return; // Error or no data @@ -1934,7 +1934,7 @@ H5P.createTitle = function (rawTitle, maxLength) { // Relay events to top window. if (H5P.isFramed && H5P.externalEmbed === false) { - H5P.externalDispatcher.on('*', function (event) { + H5P.externalDispatcher.on('*', function (event) { window.top.H5P.externalDispatcher.trigger.call(this, event); }); }