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

This commit is contained in:
yflory 2020-05-15 17:55:58 +02:00
commit f4daddd6b1
5 changed files with 38 additions and 5 deletions

View File

@ -80,6 +80,40 @@ define([
});
};
common.getTeamsId = function () {
postMessage("GET", {
key: ['teams'],
}, function (obj) {
if (obj.error) { return; }
Object.keys(obj || {}).forEach(function (id) {
console.log(obj[id].metadata.name, ':', id);
});
});
};
common.fixFork = function (teamId) {
var i = 0;
var send = function () {
if (i >= 110) {
postMessage("SET", {
teamId: teamId,
key: ['fixFork'],
}, function () {});
return;
}
postMessage("SET", {
teamId: teamId,
key: ['fixFork'],
value: i
}, function () {
i++;
setTimeout(send, 500);
});
};
send();
};
// RESTRICTED
// Settings only
common.resetDrive = function (cb) {

View File

@ -281,8 +281,6 @@ define([
// so that the messages we send to the realtime channel are
// loadable by users joining after the checkpoint
var fixSheets = function () {
var hasDrawings = checkDrawings();
if (hasDrawings) { return; }
try {
var editor = getEditor();
// if we are not in the sheet app

View File

@ -11901,7 +11901,7 @@ var newXf=xfs.getOperationCache(prop,hash);if(newXf)oItemWithXfs.setStyleInterna
xfs=this._initXf(oItemWithXfs);var xfsOperationCache=xfs;var newXf=xfs.getOperationCache(prop,val);if(newXf)oItemWithXfs.setStyleInternal(newXf);else{xfs=this._initXfAlign(xfs);setFunc.call(xfs.align,val);xfs.align=g_StyleCache.addAlign(xfs.align);xfs=g_StyleCache.addXf(xfs);xfsOperationCache.setOperationCache(prop,val,xfs);oItemWithXfs.setStyleInternal(xfs)}return oRes}};function StyleCache(){this.fonts={count:0,vals:{}};this.fills={count:0,vals:{}};this.borders={count:0,vals:{}};this.nums={count:0,
vals:{}};this.aligns={count:0,vals:{}};this.xfs={list:[],vals:{}};this.firstXf=new CellXfs;this.firstFont=null;this.firstFill=null;this.firstBorder=null}StyleCache.prototype.addFont=function(newFont){return this._add(this.fonts,newFont)};StyleCache.prototype.addFill=function(newFill,forceAdd){return this._add(this.fills,newFill,forceAdd)};StyleCache.prototype.addBorder=function(newBorder,forceAdd){return this._add(this.borders,newBorder,forceAdd)};StyleCache.prototype.addNum=function(newNum){return this._add(this.nums,
newNum)};StyleCache.prototype.addAlign=function(newAlign){return this._add(this.aligns,newAlign)};StyleCache.prototype.addXf=function(newXf,forceAdd){if(newXf){if(newXf.font)newXf.font=this.addFont(newXf.font);if(newXf.fill)newXf.fill=this.addFill(newXf.fill);if(newXf.border)newXf.border=this.addBorder(newXf.border);if(newXf.num)newXf.num=this.addNum(newXf.num);if(newXf.align)newXf.align=this.addAlign(newXf.align)}return this._add(this.xfs,newXf,forceAdd)};StyleCache.prototype.getXf=function(index){return 1<=
index&&index<=this.xfs.list.length?this.xfs.list[index-1]:null};StyleCache.prototype.getXfCount=function(){return this.xfs.list.length};StyleCache.prototype._add=function(container,newVal,forceAdd){if(newVal&&undefined===newVal.getIndexNumber()){var hash=newVal.getHash();var res=container.vals[hash];if(!res||forceAdd){if(container.list)newVal.setIndexNumber(container.list.push(newVal));else newVal.setIndexNumber(container.count++);if(!res)container.vals[hash]=newVal;res=newVal}return res}else return newVal};
index&&index<=this.xfs.list.length?this.xfs.list[index-1]:null};StyleCache.prototype.getXfCount=function(){return this.xfs.list.length};StyleCache.prototype._add=function(container,newVal,forceAdd){if(newVal&&newVal.getIndexNumber&&undefined===newVal.getIndexNumber()){var hash=newVal.getHash();var res=container.vals[hash];if(!res||forceAdd){if(container.list)newVal.setIndexNumber(container.list.push(newVal));else newVal.setIndexNumber(container.count++);if(!res)container.vals[hash]=newVal;res=newVal}return res}else return newVal};
var g_StyleCache=new StyleCache;function SheetMergedStyles(){this.stylesTablePivot=[];this.stylesConditional=[]}SheetMergedStyles.prototype.setTablePivotStyle=function(range,xf,stripe){this.stylesTablePivot.push({xf:xf,range:range,stripe:stripe,borders:undefined})};SheetMergedStyles.prototype.clearTablePivotStyle=function(range){for(var i=this.stylesTablePivot.length-1;i>=0;--i){var style=this.stylesTablePivot[i];if(style.range.isIntersect(range))this.stylesTablePivot.splice(i,1)}};SheetMergedStyles.prototype.setConditionalStyle=
function(multiplyRange,formula){this.stylesConditional.push({multiplyRange:multiplyRange,formula:formula})};SheetMergedStyles.prototype.clearConditionalStyle=function(multiplyRange){for(var i=this.stylesConditional.length-1;i>=0;--i){var style=this.stylesConditional[i];if(style.multiplyRange.isIntersect(multiplyRange))this.stylesConditional.splice(i,1)}};SheetMergedStyles.prototype.getStyle=function(hiddenManager,row,col,opt_ws){var res={table:[],conditional:[]};if(opt_ws)opt_ws._updateConditionalFormatting();
for(var i=0;i<this.stylesConditional.length;++i){var style=this.stylesConditional[i];if(style.multiplyRange.contains(col,row)){var xf=style.formula(row,col);if(xf)res.conditional.push(xf)}}for(var i=0;i<this.stylesTablePivot.length;++i){var style=this.stylesTablePivot[i];var borderIndex;var xf=style.xf;if(style.range.contains(col,row)&&(borderIndex=this._getBorderIndex(hiddenManager,style.range,style.stripe,row,col,xf))>=0){if(borderIndex>0){if(!style.borders)style.borders={};var xfModified=style.borders[borderIndex];

View File

@ -1366,5 +1366,6 @@
"settings_padNotifCheckbox": "Kommentar-Benachrichtigungen deaktivieren",
"comments_edited": "Bearbeitet",
"unknownPad": "Unbekanntes Pad",
"comments_error": "An dieser Stelle kann kein Kommentar hinzugefügt werden"
"comments_error": "An dieser Stelle kann kein Kommentar hinzugefügt werden",
"fm_sort": "Sortieren"
}

View File

@ -347,7 +347,7 @@
"fm_info_root": "Créez ici autant de dossiers que vous le souhaitez pour trier vos fichiers.",
"fm_info_unsorted": "Contient tous les pads que vous avez ouvert et qui ne sont pas triés dans \"Documents\" ou déplacés vers la \"Corbeille\".",
"fm_info_template": "Contient tous les fichiers que vous avez sauvés en tant que modèle afin de les réutiliser lors de la création d'un nouveau pad.",
"fm_info_recent": "Ces pads on été récemment ouverts ou modifiés par vous ou vos collaborateurs.",
"fm_info_recent": "Ces pads ont été récemment ouverts ou modifiés par vous ou vos collaborateurs.",
"fm_info_trash": "Vider la corbeille permet de libérer de l'espace dans votre CryptDrive.",
"fm_info_allFiles": "Contient tous les fichiers de \"Documents\", \"Fichiers non triés\" et \"Corbeille\". Vous ne pouvez pas supprimer ou déplacer des fichiers depuis cet endroit.",
"fm_info_anonymous": "Vous n'êtes pas connecté, ces pads seront donc supprimés après 3 mois d'inactivité (<a href=\"https://blog.cryptpad.fr/2017/05/17/You-gotta-log-in/\" target=\"_blank\">découvrez pourquoi</a>). Ils sont stockés dans votre navigateur donc nettoyer votre historique peut les faire disparaître.<br><a href=\"/register/\">Inscrivez-vous</a> ou <a href=\"/login/\">connectez-vous</a> pour les maintenir en vie.<br>",