Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging
This commit is contained in:
commit
24572a40d2
6 changed files with 12 additions and 14 deletions
|
@ -12,6 +12,7 @@ define(function() {
|
||||||
* You can change their duration here (measured in milliseconds)
|
* You can change their duration here (measured in milliseconds)
|
||||||
*/
|
*/
|
||||||
config.notificationTimeout = 5000;
|
config.notificationTimeout = 5000;
|
||||||
|
config.disableUserlistNotifications = false;
|
||||||
|
|
||||||
config.enablePinning = true;
|
config.enablePinning = true;
|
||||||
|
|
||||||
|
|
|
@ -391,8 +391,7 @@ define([
|
||||||
// really basic operational transform
|
// really basic operational transform
|
||||||
transformFunction: options.transformFunction || JsonOT.validate,
|
transformFunction: options.transformFunction || JsonOT.validate,
|
||||||
|
|
||||||
// This one causes a big mess.
|
patchTransformer: options.patchTransformer || JsonOT.patchTransformer,
|
||||||
//patchTransformer: options.patchTransformer || JsonOT.patchTransformer,
|
|
||||||
|
|
||||||
// cryptpad debug logging (default is 1)
|
// cryptpad debug logging (default is 1)
|
||||||
// logLevel: 0,
|
// logLevel: 0,
|
||||||
|
|
|
@ -685,7 +685,9 @@ define([
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var ready = false;
|
||||||
realtimeOptions.onReady = function (info) {
|
realtimeOptions.onReady = function (info) {
|
||||||
|
if (ready) { return; }
|
||||||
// create your patcher
|
// create your patcher
|
||||||
if (realtime !== info.realtime) {
|
if (realtime !== info.realtime) {
|
||||||
realtime = rt.realtime = info.realtime;
|
realtime = rt.realtime = info.realtime;
|
||||||
|
@ -709,6 +711,7 @@ define([
|
||||||
DeepProxy.checkLocalChange(proxy, onLocal);
|
DeepProxy.checkLocalChange(proxy, onLocal);
|
||||||
|
|
||||||
initializing = false;
|
initializing = false;
|
||||||
|
ready = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
realtimeOptions.onAbort = function (info) {
|
realtimeOptions.onAbort = function (info) {
|
||||||
|
|
|
@ -886,6 +886,7 @@ define([
|
||||||
// type : 1 (+1 user), 0 (rename existing user), -1 (-1 user)
|
// type : 1 (+1 user), 0 (rename existing user), -1 (-1 user)
|
||||||
if (typeof name === "undefined") { return; }
|
if (typeof name === "undefined") { return; }
|
||||||
name = name || Messages.anonymous;
|
name = name || Messages.anonymous;
|
||||||
|
if (Config.disableUserlistNotifications) { return; }
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case 1:
|
case 1:
|
||||||
Cryptpad.log(Messages._getKey("notifyJoined", [name]));
|
Cryptpad.log(Messages._getKey("notifyJoined", [name]));
|
||||||
|
|
|
@ -651,7 +651,7 @@ define([
|
||||||
|
|
||||||
if (editable === false) {
|
if (editable === false) {
|
||||||
// disable all the things
|
// disable all the things
|
||||||
$('.icp-app-poll-realtime input, .cp-app-poll-realtime button, .cp-app-poll-upper button, .cp-app-poll-realtime textarea').attr('disabled', true);
|
$('.cp-app-poll-realtime input, .cp-app-poll-realtime button, .cp-app-poll-upper button, .cp-app-poll-realtime textarea').attr('disabled', true);
|
||||||
$('span.cp-app-poll-table-edit, span.cp-app-poll-table-remove').hide();
|
$('span.cp-app-poll-table-edit, span.cp-app-poll-table-remove').hide();
|
||||||
$('span.cp-app-poll-table-lock').addClass('fa-lock').removeClass('fa-unlock')
|
$('span.cp-app-poll-table-lock').addClass('fa-lock').removeClass('fa-unlock')
|
||||||
.attr('title', Messages.poll_locked)
|
.attr('title', Messages.poll_locked)
|
||||||
|
|
|
@ -208,6 +208,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var setEditable = function (bool) {
|
var setEditable = function (bool) {
|
||||||
|
APP.editable = bool;
|
||||||
if (readOnly && bool) { return; }
|
if (readOnly && bool) { return; }
|
||||||
if (bool) { $controls.css('display', 'flex'); }
|
if (bool) { $controls.css('display', 'flex'); }
|
||||||
else { $controls.hide(); }
|
else { $controls.hide(); }
|
||||||
|
@ -237,17 +238,9 @@ define([
|
||||||
APP.upload = function (title) {
|
APP.upload = function (title) {
|
||||||
var canvas = $canvas[0];
|
var canvas = $canvas[0];
|
||||||
APP.canvas.deactivateAll().renderAll();
|
APP.canvas.deactivateAll().renderAll();
|
||||||
var finish = function (thumb) {
|
canvas.toBlob(function (blob) {
|
||||||
canvas.toBlob(function (blob) {
|
blob.name = title;
|
||||||
blob.name = title;
|
APP.FM.handleFile(blob);
|
||||||
APP.FM.handleFile(blob, void 0, thumb);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
Thumb.fromCanvas(canvas, function (e, blob) {
|
|
||||||
// carry on even if you can't get a thumbnail
|
|
||||||
if (e) { console.error(e); }
|
|
||||||
finish(blob);
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -287,6 +280,7 @@ define([
|
||||||
})
|
})
|
||||||
.on('dblclick', function (e) {
|
.on('dblclick', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
if (!APP.editable) { return; }
|
||||||
pickColor(Colors.rgb2hex($color.css('background-color')), function (c) {
|
pickColor(Colors.rgb2hex($color.css('background-color')), function (c) {
|
||||||
$color.css({
|
$color.css({
|
||||||
'background-color': c,
|
'background-color': c,
|
||||||
|
|
Loading…
Reference in a new issue