Update JSDoc

JI-92-path-fix moodle-1.0-rc.8
Frode Petterson 2017-02-07 13:48:42 +01:00
parent ea3b86dcfe
commit bb71ea20a3
3 changed files with 28 additions and 9 deletions

View File

@ -1,9 +1,19 @@
/**
* @class
* @augments H5P.EventDispatcher
* @param {Object} displayOptions
* @param {boolean} displayOptions.export Triggers the display of the 'Download' button
* @param {boolean} displayOptions.copyright Triggers the display of the 'Copyright' button
* @param {boolean} displayOptions.embed Triggers the display of the 'Embed' button
* @param {boolean} displayOptions.icon Triggers the display of the 'H5P icon' link
*/
H5P.ActionBar = (function ($, EventDispatcher) {
"use strict";
function ActionBar(displayOptions) {
EventDispatcher.call(this);
/** @alias H5P.ActionBar# */
var self = this;
var hasActions = false;
@ -66,7 +76,6 @@ H5P.ActionBar = (function ($, EventDispatcher) {
/**
* Returns a reference to the dom element
*
* @method getDOMElement
* @return {H5P.jQuery}
*/
self.getDOMElement = function () {
@ -76,7 +85,6 @@ H5P.ActionBar = (function ($, EventDispatcher) {
/**
* Does the actionbar contain actions?
*
* @method hasActions
* @return {Boolean}
*/
self.hasActions = function () {

View File

@ -3,10 +3,17 @@
*
* Functions here may be overridable by the libraries. In special cases,
* it is also possible to override H5P.ContentType on a global level.
* */
*
* NOTE that this doesn't actually 'extend' the event dispatcher but instead
* it creates a single instance which all content types shares as their base
* prototype. (in some cases this may be the root of strange event behavior)
*
* @class
* @augments H5P.EventDispatcher
*/
H5P.ContentType = function (isRootLibrary, library) {
function ContentType() {};
function ContentType() {}
// Inherit from EventDispatcher.
ContentType.prototype = new H5P.EventDispatcher();
@ -15,7 +22,6 @@ H5P.ContentType = function (isRootLibrary, library) {
* Is library standalone or not? Not beeing standalone, means it is
* included in another library
*
* @method isStandalone
* @return {Boolean}
*/
ContentType.prototype.isRoot = function () {
@ -24,7 +30,6 @@ H5P.ContentType = function (isRootLibrary, library) {
/**
* Returns the file path of a file in the current library
* @method getLibraryFilePath
* @param {string} filePath The path to the file relative to the library folder
* @return {string} The full path to the file
*/

View File

@ -438,7 +438,6 @@ H5P.communicator = (function () {
/**
* Enter semi fullscreen for the given H5P instance
*
* @method semiFullScreen
* @param {H5P.jQuery} $element Content container.
* @param {Object} instance
* @param {function} exitCallback Callback function called when user exits fullscreen.
@ -896,6 +895,7 @@ H5P.t = function (key, vars, ns) {
* Which DOM element the dialog should be inserted after.
*/
H5P.Dialog = function (name, title, content, $element) {
/** @alias H5P.Dialog# */
var self = this;
var $dialog = H5P.jQuery('<div class="h5p-popup-dialog h5p-' + name + '-dialog">\
<div class="h5p-inner">\
@ -924,7 +924,10 @@ H5P.Dialog = function (name, title, content, $element) {
.end()
.end();
this.open = function () {
/**
* Opens the dialog.
*/
self.open = function () {
setTimeout(function () {
$dialog.addClass('h5p-open'); // Fade in
// Triggering an event, in case something has to be done after dialog has been opened.
@ -932,7 +935,10 @@ H5P.Dialog = function (name, title, content, $element) {
}, 1);
};
this.close = function () {
/**
* Closes the dialog.
*/
self.close = function () {
$dialog.removeClass('h5p-open'); // Fade out
setTimeout(function () {
$dialog.remove();