Added info message when there's no installed libraries.

namespaces
Frode Petterson 2014-09-23 11:35:21 +02:00
parent 7cb2ebe17c
commit 38c98202f4
1 changed files with 2 additions and 3 deletions

View File

@ -23,9 +23,9 @@ var H5PLibraryList= H5PLibraryList || {};
* @param {object} libraries List of libraries and headers * @param {object} libraries List of libraries and headers
*/ */
H5PLibraryList.createLibraryList = function (libraries) { H5PLibraryList.createLibraryList = function (libraries) {
var t = H5PIntegration.i18n.H5P;
if(libraries.listData === undefined || libraries.listData.length === 0) { if(libraries.listData === undefined || libraries.listData.length === 0) {
return; return $('<div>' + t.NA + '</div>');
} }
// Create table // Create table
@ -33,7 +33,6 @@ var H5PLibraryList= H5PLibraryList || {};
$table.addClass('libraries'); $table.addClass('libraries');
// Add libraries // Add libraries
var t = H5PIntegration.i18n.H5P;
$.each (libraries.listData, function (index, library) { $.each (libraries.listData, function (index, library) {
var $libraryRow = H5PUtils.createTableRow([ var $libraryRow = H5PUtils.createTableRow([
library.title, library.title,