diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 25b1a320f..1204e3e27 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -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) { diff --git a/www/common/onlyoffice/v2a/sdkjs/cell/sdk-all.js b/www/common/onlyoffice/v2a/sdkjs/cell/sdk-all.js index 41d630c03..793e7b1ef 100644 --- a/www/common/onlyoffice/v2a/sdkjs/cell/sdk-all.js +++ b/www/common/onlyoffice/v2a/sdkjs/cell/sdk-all.js @@ -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=0){if(borderIndex>0){if(!style.borders)style.borders={};var xfModified=style.borders[borderIndex];