Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging

This commit is contained in:
yflory
2017-06-22 15:52:31 +02:00
44 changed files with 1095 additions and 1458 deletions

View File

@@ -83,6 +83,7 @@ define([
common.fetch = Util.fetch;
common.throttle = Util.throttle;
common.createRandomInteger = Util.createRandomInteger;
common.getAppType = Util.getAppType;
// import hash utilities for export
var createRandomHash = common.createRandomHash = Hash.createRandomHash;
@@ -906,18 +907,12 @@ 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 = common.prepareFeedback = function (key) {
if (typeof(key) !== 'string') { return $.noop; }
var type = common.getAppType();
return function () {
feedback(key.toUpperCase() + getAppSuffix());
feedback((key + (type? '_' + type: '')).toUpperCase());
};
};