diff --git a/customize.dist/ckeditor-config.js b/customize.dist/ckeditor-config.js index 45e3bd5f5..51f003a87 100644 --- a/customize.dist/ckeditor-config.js +++ b/customize.dist/ckeditor-config.js @@ -10,7 +10,19 @@ CKEDITOR.editorConfig = function( config ) { // document itself and causes problems when it's sent across the wire and reflected back config.removePlugins= 'resize'; config.extraPlugins= 'autolink,colorbutton,colordialog,font,indentblock,justify'; - config.toolbarGroups= [{"name":"clipboard","groups":["clipboard","undo"]},{"name":"editing","groups":["find","selection"]},{"name":"links"},{"name":"insert"},{"name":"forms"},{"name":"tools"},{"name":"document","groups":["mode","document","doctools"]},{"name":"others"},{"name":"basicstyles","groups":["basicstyles","cleanup"]},{"name":"paragraph","groups":["list","indent","blocks","align","bidi"]},{"name":"styles"},{"name":"colors"}]; + config.toolbarGroups= [ + // {"name":"clipboard","groups":["clipboard","undo"]}, + //{"name":"editing","groups":["find","selection"]}, + {"name":"links"}, + {"name":"insert"}, + {"name":"forms"}, + {"name":"tools"}, + {"name":"document","groups":["mode","document","doctools"]}, + {"name":"others"}, + {"name":"basicstyles","groups":["basicstyles","cleanup"]}, + {"name":"paragraph","groups":["list","indent","blocks","align","bidi"]}, + {"name":"styles"}, + {"name":"colors"}]; config.font_defaultLabel = 'Arial'; config.fontSize_defaultLabel = '16'; diff --git a/server.js b/server.js index 289184d8a..ec89ef2af 100644 --- a/server.js +++ b/server.js @@ -138,7 +138,13 @@ app.get('/api/config', function(req, res){ var httpServer = httpsOpts ? Https.createServer(httpsOpts, app) : Http.createServer(app); httpServer.listen(config.httpPort,config.httpAddress,function(){ - console.log('[%s] listening on port %s', new Date().toISOString(), config.httpPort); + var host = config.httpAddress; + var hostName = !host.indexOf(':') ? '[' + host + ']' : host; + + var port = config.httpPort; + var ps = port === 80? '': ':' + port; + + console.log('\n[%s] server available http://%s%s', new Date().toISOString(), hostName, ps); }); var wsConfig = { server: httpServer }; diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index b1406a4f2..44520c807 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -149,7 +149,6 @@ define([ } var href = '/common/feedback.html?' + action + '=' + (+new Date()); - console.log('[feedback] %s', href); $.ajax({ type: "HEAD", url: href, @@ -885,6 +884,21 @@ define([ common.getPinnedUsage(todo); }; + var getAppSuffix = function () { + var parts = window.location.pathname.split('/') + .filter(function (x) { return x; }); + + if (!parts[0]) { return ''; } + return '_' + parts[0].toUpperCase(); + }; + + var prepareFeedback = function (key) { + if (typeof(key) !== 'string') { return $.noop; } + return function () { + feedback(key.toUpperCase() + getAppSuffix()); + }; + }; + common.createButton = function (type, rightside, data, callback) { var button; var size = "17px"; @@ -894,7 +908,7 @@ define([ title: Messages.exportButtonTitle, }).append($('', {'class':'fa fa-download', style: 'font:'+size+' FontAwesome'})); if (callback) { - button.click(callback); + button.click(prepareFeedback(type)).click(callback); } break; case 'import': @@ -902,7 +916,9 @@ define([ title: Messages.importButtonTitle, }).append($('', {'class':'fa fa-upload', style: 'font:'+size+' FontAwesome'})); if (callback) { - button.click(UI.importContent('text/plain', function (content, file) { + button + .click(prepareFeedback(type)) + .click(UI.importContent('text/plain', function (content, file) { callback(content, file); })); } @@ -913,7 +929,8 @@ define([ title: Messages.saveTemplateButton, }).append($('', {'class':'fa fa-bookmark', style: 'font:'+size+' FontAwesome'})); if (data.rt && data.Crypt) { - button.click(function () { + button + .click(function () { var title = data.getTitle() || document.title; var todo = function (val) { if (typeof(val) !== "string") { return; } @@ -971,7 +988,9 @@ define([ } }); if (callback) { - button.click(function() { + button + .click(prepareFeedback(type)) + .click(function() { var href = window.location.href; var msg = isLoggedIn() ? Messages.forgetPrompt : Messages.fm_removePermanentlyDialog; common.confirm(msg, function (yes) { @@ -1027,7 +1046,9 @@ define([ style: 'font:'+size+' FontAwesome' }); if (data.histConfig) { - button.click(function () { + button + .click(prepareFeedback(type)) + .click(function () { common.getHistory(data.histConfig); }); } @@ -1036,7 +1057,8 @@ define([ button = $('