Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging
commit
24572a40d2
|
@ -12,6 +12,7 @@ define(function() {
|
|||
* You can change their duration here (measured in milliseconds)
|
||||
*/
|
||||
config.notificationTimeout = 5000;
|
||||
config.disableUserlistNotifications = false;
|
||||
|
||||
config.enablePinning = true;
|
||||
|
||||
|
|
|
@ -391,8 +391,7 @@ define([
|
|||
// really basic operational transform
|
||||
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)
|
||||
// logLevel: 0,
|
||||
|
|
|
@ -685,7 +685,9 @@ define([
|
|||
});
|
||||
};
|
||||
|
||||
var ready = false;
|
||||
realtimeOptions.onReady = function (info) {
|
||||
if (ready) { return; }
|
||||
// create your patcher
|
||||
if (realtime !== info.realtime) {
|
||||
realtime = rt.realtime = info.realtime;
|
||||
|
@ -709,6 +711,7 @@ define([
|
|||
DeepProxy.checkLocalChange(proxy, onLocal);
|
||||
|
||||
initializing = false;
|
||||
ready = true;
|
||||
};
|
||||
|
||||
realtimeOptions.onAbort = function (info) {
|
||||
|
|
|
@ -886,6 +886,7 @@ define([
|
|||
// type : 1 (+1 user), 0 (rename existing user), -1 (-1 user)
|
||||
if (typeof name === "undefined") { return; }
|
||||
name = name || Messages.anonymous;
|
||||
if (Config.disableUserlistNotifications) { return; }
|
||||
switch(type) {
|
||||
case 1:
|
||||
Cryptpad.log(Messages._getKey("notifyJoined", [name]));
|
||||
|
|
|
@ -651,7 +651,7 @@ define([
|
|||
|
||||
if (editable === false) {
|
||||
// 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-lock').addClass('fa-lock').removeClass('fa-unlock')
|
||||
.attr('title', Messages.poll_locked)
|
||||
|
|
|
@ -208,6 +208,7 @@ define([
|
|||
});
|
||||
|
||||
var setEditable = function (bool) {
|
||||
APP.editable = bool;
|
||||
if (readOnly && bool) { return; }
|
||||
if (bool) { $controls.css('display', 'flex'); }
|
||||
else { $controls.hide(); }
|
||||
|
@ -237,17 +238,9 @@ define([
|
|||
APP.upload = function (title) {
|
||||
var canvas = $canvas[0];
|
||||
APP.canvas.deactivateAll().renderAll();
|
||||
var finish = function (thumb) {
|
||||
canvas.toBlob(function (blob) {
|
||||
blob.name = title;
|
||||
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);
|
||||
canvas.toBlob(function (blob) {
|
||||
blob.name = title;
|
||||
APP.FM.handleFile(blob);
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -287,6 +280,7 @@ define([
|
|||
})
|
||||
.on('dblclick', function (e) {
|
||||
e.preventDefault();
|
||||
if (!APP.editable) { return; }
|
||||
pickColor(Colors.rgb2hex($color.css('background-color')), function (c) {
|
||||
$color.css({
|
||||
'background-color': c,
|
||||
|
|
Loading…
Reference in New Issue