ep_adminpads2
Advanced tools
Comparing version 0.0.7 to 2.0.0
11
index.js
@@ -92,3 +92,3 @@ const eejs = require('ep_etherpad-lite/node/eejs'); | ||
exports.registerRoute = async function (hook_name, args) { | ||
exports.registerRoute = function (hook_name, args, cb) { | ||
args.app.get('/admin/pads', function (req, res) { | ||
@@ -100,2 +100,3 @@ let render_args = { | ||
}); | ||
return cb(); | ||
}; | ||
@@ -130,7 +131,8 @@ | ||
exports.updatePads = async function (hook_name, args) { | ||
exports.updatePads = function (hook_name, args, cb) { | ||
io.emit('progress', {progress: 1}); | ||
return cb(); | ||
}; | ||
exports.eejsBlock_adminMenu = async function (hook_name, args) { | ||
exports.eejsBlock_adminMenu = function (hook_name, args, cb) { | ||
let hasAdminUrlPrefix = args.content.indexOf('<a href="admin/') !== -1, | ||
@@ -140,3 +142,4 @@ hasOneDirDown = args.content.indexOf('<a href="../') !== -1, | ||
urlPrefix = hasAdminUrlPrefix ? 'admin/' : hasTwoDirDown ? '../../' : hasOneDirDown ? '../' : ''; | ||
args.content = args.content + '<li><a href="' + urlPrefix + 'pads">Manage pads</a></li>'; | ||
args.content = args.content + '<li><a href="' + urlPrefix + 'pads" data-l10n-id="ep_adminpads2_manage-pads">Manage pads</a></li>'; | ||
return cb(); | ||
}; |
{ | ||
"name": "ep_adminpads2", | ||
"version": "0.0.7", | ||
"version": "2.0.0", | ||
"description": "Etherpad plugin to list and delete pads in /admin.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/rhansen/ep_adminpads2", |
@@ -90,3 +90,3 @@ exports.documentReady = function(hooks, context, cb) { | ||
var padID = row.find('.padname').text(); | ||
if (confirm('Do you really want to delete the pad ' + padID + '?')) { | ||
if (confirm(_('ep_adminpads2_confirm', {padID: padID}) || `Do you really want to delete the pad ${padID}?`)) { | ||
doUpdate = true; | ||
@@ -123,3 +123,3 @@ socket.emit('delete', padID); | ||
var message = 'Unknown status'; | ||
var message = _('ep_adminpads2_unknown-status') || 'Unknown status'; | ||
if (data.message) { | ||
@@ -178,3 +178,9 @@ message = '<span class="status">' + data.message.toString() + '</span>'; | ||
} else { | ||
resultList.append('<tr><td colspan="4" class="no - results">No results</td></tr>'); | ||
const noResults = _('ep_adminpads2_no-results') || 'No results'; | ||
resultList.append( | ||
$('<tr>').append( | ||
$('<td>') | ||
.attr('colspan', '4') | ||
.addClass('no - results') | ||
.text(noResults))); | ||
} | ||
@@ -181,0 +187,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
40890
11
336
0