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

pull/1/head
ansuz 5 years ago
commit b134799449

@ -15913,7 +15913,7 @@ CParagraphContentWithContentBase.prototype.protected_GetRangesCount=function(Lin
CParagraphContentWithContentBase.prototype.protected_AddRange=function(LineIndex,RangeIndex){if(this.Lines[0]>=LineIndex+1){var RangeOffset=this.protected_GetRangeOffset(LineIndex,0)+RangeIndex*2;this.Lines.splice(RangeOffset,this.Lines.length-RangeOffset);if(this.Lines[0]!==LineIndex+1&&0===RangeIndex)this.Lines.splice(LineIndex+1,this.Lines[0]-LineIndex);else if(this.Lines[0]!==LineIndex+1&&0!==RangeIndex){this.Lines.splice(LineIndex+2,this.Lines[0]-LineIndex-1);this.Lines[0]=LineIndex+1}}if(0===
RangeIndex)if(this.Lines[0]!==LineIndex+1){var OffsetValue=this.Lines.length-LineIndex-1;this.Lines.splice(LineIndex+1,0,OffsetValue);this.Lines[0]=LineIndex+1}var RangeOffset=1+this.Lines[0]+this.Lines[LineIndex+1]+RangeIndex*2;this.Lines[RangeOffset+0]=0;this.Lines[RangeOffset+1]=0;if(0!==LineIndex||0!==RangeIndex)return this.Lines[RangeOffset-1];else return 0};
CParagraphContentWithContentBase.prototype.protected_FillRange=function(LineIndex,RangeIndex,StartPos,EndPos){var RangeOffset=this.protected_GetRangeOffset(LineIndex,RangeIndex);this.Lines[RangeOffset+0]=StartPos;this.Lines[RangeOffset+1]=EndPos};CParagraphContentWithContentBase.prototype.protected_FillRangeEndPos=function(LineIndex,RangeIndex,EndPos){var RangeOffset=this.protected_GetRangeOffset(LineIndex,RangeIndex);this.Lines[RangeOffset+1]=EndPos};
CParagraphContentWithContentBase.prototype.private_UpdateSpellChecking=function(){if(this.Paragraph){this.Paragraph.SpellChecker.ClearPausedEngine();this.Paragraph.RecalcInfo.Set_Type_0_Spell(pararecalc_0_Spell_All)}};CParagraphContentWithContentBase.prototype.Is_UseInDocument=function(Id){if(this.Paragraph){for(var i=0;i<this.Content.length;++i)if(this.Content[i].Get_Id&&this.Content[i].Get_Id()===Id)break;if(i<this.Content.length)return this.Paragraph.Is_UseInDocument(this.Get_Id())}return false};
CParagraphContentWithContentBase.prototype.private_UpdateSpellChecking=function(){if(this.Paragraph&&this.Paragraph.SpellChecker){this.Paragraph.SpellChecker.ClearPausedEngine();this.Paragraph.RecalcInfo.Set_Type_0_Spell(pararecalc_0_Spell_All)}};CParagraphContentWithContentBase.prototype.Is_UseInDocument=function(Id){if(this.Paragraph){for(var i=0;i<this.Content.length;++i)if(this.Content[i].Get_Id&&this.Content[i].Get_Id()===Id)break;if(i<this.Content.length)return this.Paragraph.Is_UseInDocument(this.Get_Id())}return false};
CParagraphContentWithContentBase.prototype.protected_GetPrevRangeEndPos=function(LineIndex,RangeIndex){var RangeCount=this.protected_GetRangesCount(LineIndex-1);var RangeOffset=this.protected_GetRangeOffset(LineIndex-1,RangeCount-1);return LineIndex==0&&RangeIndex==0?0:this.Lines[RangeOffset+1]};
CParagraphContentWithContentBase.prototype.private_UpdateTrackRevisions=function(){if(this.Paragraph&&this.Paragraph.LogicDocument&&this.Paragraph.LogicDocument.GetTrackRevisionsManager){var RevisionsManager=this.Paragraph.LogicDocument.GetTrackRevisionsManager();RevisionsManager.CheckElement(this.Paragraph)}};CParagraphContentWithContentBase.prototype.CanSplit=function(){return true};CParagraphContentWithContentBase.prototype.PreDelete=function(){};
CParagraphContentWithContentBase.prototype.private_UpdateDocumentOutline=function(){if(this.Paragraph)this.Paragraph.UpdateDocumentOutline()};CParagraphContentWithContentBase.prototype.IsSolid=function(){return false};

@ -15729,7 +15729,7 @@ CParagraphContentWithContentBase.prototype.protected_GetRangesCount=function(Lin
CParagraphContentWithContentBase.prototype.protected_AddRange=function(LineIndex,RangeIndex){if(this.Lines[0]>=LineIndex+1){var RangeOffset=this.protected_GetRangeOffset(LineIndex,0)+RangeIndex*2;this.Lines.splice(RangeOffset,this.Lines.length-RangeOffset);if(this.Lines[0]!==LineIndex+1&&0===RangeIndex)this.Lines.splice(LineIndex+1,this.Lines[0]-LineIndex);else if(this.Lines[0]!==LineIndex+1&&0!==RangeIndex){this.Lines.splice(LineIndex+2,this.Lines[0]-LineIndex-1);this.Lines[0]=LineIndex+1}}if(0===
RangeIndex)if(this.Lines[0]!==LineIndex+1){var OffsetValue=this.Lines.length-LineIndex-1;this.Lines.splice(LineIndex+1,0,OffsetValue);this.Lines[0]=LineIndex+1}var RangeOffset=1+this.Lines[0]+this.Lines[LineIndex+1]+RangeIndex*2;this.Lines[RangeOffset+0]=0;this.Lines[RangeOffset+1]=0;if(0!==LineIndex||0!==RangeIndex)return this.Lines[RangeOffset-1];else return 0};
CParagraphContentWithContentBase.prototype.protected_FillRange=function(LineIndex,RangeIndex,StartPos,EndPos){var RangeOffset=this.protected_GetRangeOffset(LineIndex,RangeIndex);this.Lines[RangeOffset+0]=StartPos;this.Lines[RangeOffset+1]=EndPos};CParagraphContentWithContentBase.prototype.protected_FillRangeEndPos=function(LineIndex,RangeIndex,EndPos){var RangeOffset=this.protected_GetRangeOffset(LineIndex,RangeIndex);this.Lines[RangeOffset+1]=EndPos};
CParagraphContentWithContentBase.prototype.private_UpdateSpellChecking=function(){if(this.Paragraph){this.Paragraph.SpellChecker.ClearPausedEngine();this.Paragraph.RecalcInfo.Set_Type_0_Spell(pararecalc_0_Spell_All)}};CParagraphContentWithContentBase.prototype.Is_UseInDocument=function(Id){if(this.Paragraph){for(var i=0;i<this.Content.length;++i)if(this.Content[i].Get_Id&&this.Content[i].Get_Id()===Id)break;if(i<this.Content.length)return this.Paragraph.Is_UseInDocument(this.Get_Id())}return false};
CParagraphContentWithContentBase.prototype.private_UpdateSpellChecking=function(){if(this.Paragraph&&this.Paragraph.SpellChecker){this.Paragraph.SpellChecker.ClearPausedEngine();this.Paragraph.RecalcInfo.Set_Type_0_Spell(pararecalc_0_Spell_All)}};CParagraphContentWithContentBase.prototype.Is_UseInDocument=function(Id){if(this.Paragraph){for(var i=0;i<this.Content.length;++i)if(this.Content[i].Get_Id&&this.Content[i].Get_Id()===Id)break;if(i<this.Content.length)return this.Paragraph.Is_UseInDocument(this.Get_Id())}return false};
CParagraphContentWithContentBase.prototype.protected_GetPrevRangeEndPos=function(LineIndex,RangeIndex){var RangeCount=this.protected_GetRangesCount(LineIndex-1);var RangeOffset=this.protected_GetRangeOffset(LineIndex-1,RangeCount-1);return LineIndex==0&&RangeIndex==0?0:this.Lines[RangeOffset+1]};
CParagraphContentWithContentBase.prototype.private_UpdateTrackRevisions=function(){if(this.Paragraph&&this.Paragraph.LogicDocument&&this.Paragraph.LogicDocument.GetTrackRevisionsManager){var RevisionsManager=this.Paragraph.LogicDocument.GetTrackRevisionsManager();RevisionsManager.CheckElement(this.Paragraph)}};CParagraphContentWithContentBase.prototype.CanSplit=function(){return true};CParagraphContentWithContentBase.prototype.PreDelete=function(){};
CParagraphContentWithContentBase.prototype.private_UpdateDocumentOutline=function(){if(this.Paragraph)this.Paragraph.UpdateDocumentOutline()};CParagraphContentWithContentBase.prototype.IsSolid=function(){return false};

@ -11268,7 +11268,7 @@ CParagraphContentWithContentBase.prototype.protected_GetRangesCount=function(Lin
CParagraphContentWithContentBase.prototype.protected_AddRange=function(LineIndex,RangeIndex){if(this.Lines[0]>=LineIndex+1){var RangeOffset=this.protected_GetRangeOffset(LineIndex,0)+RangeIndex*2;this.Lines.splice(RangeOffset,this.Lines.length-RangeOffset);if(this.Lines[0]!==LineIndex+1&&0===RangeIndex)this.Lines.splice(LineIndex+1,this.Lines[0]-LineIndex);else if(this.Lines[0]!==LineIndex+1&&0!==RangeIndex){this.Lines.splice(LineIndex+2,this.Lines[0]-LineIndex-1);this.Lines[0]=LineIndex+1}}if(0===
RangeIndex)if(this.Lines[0]!==LineIndex+1){var OffsetValue=this.Lines.length-LineIndex-1;this.Lines.splice(LineIndex+1,0,OffsetValue);this.Lines[0]=LineIndex+1}var RangeOffset=1+this.Lines[0]+this.Lines[LineIndex+1]+RangeIndex*2;this.Lines[RangeOffset+0]=0;this.Lines[RangeOffset+1]=0;if(0!==LineIndex||0!==RangeIndex)return this.Lines[RangeOffset-1];else return 0};
CParagraphContentWithContentBase.prototype.protected_FillRange=function(LineIndex,RangeIndex,StartPos,EndPos){var RangeOffset=this.protected_GetRangeOffset(LineIndex,RangeIndex);this.Lines[RangeOffset+0]=StartPos;this.Lines[RangeOffset+1]=EndPos};CParagraphContentWithContentBase.prototype.protected_FillRangeEndPos=function(LineIndex,RangeIndex,EndPos){var RangeOffset=this.protected_GetRangeOffset(LineIndex,RangeIndex);this.Lines[RangeOffset+1]=EndPos};
CParagraphContentWithContentBase.prototype.private_UpdateSpellChecking=function(){if(this.Paragraph){this.Paragraph.SpellChecker.ClearPausedEngine();this.Paragraph.RecalcInfo.Set_Type_0_Spell(pararecalc_0_Spell_All)}};CParagraphContentWithContentBase.prototype.Is_UseInDocument=function(Id){if(this.Paragraph){for(var i=0;i<this.Content.length;++i)if(this.Content[i].Get_Id&&this.Content[i].Get_Id()===Id)break;if(i<this.Content.length)return this.Paragraph.Is_UseInDocument(this.Get_Id())}return false};
CParagraphContentWithContentBase.prototype.private_UpdateSpellChecking=function(){if(this.Paragraph&&this.Paragraph.SpellChecker){this.Paragraph.SpellChecker.ClearPausedEngine();this.Paragraph.RecalcInfo.Set_Type_0_Spell(pararecalc_0_Spell_All)}};CParagraphContentWithContentBase.prototype.Is_UseInDocument=function(Id){if(this.Paragraph){for(var i=0;i<this.Content.length;++i)if(this.Content[i].Get_Id&&this.Content[i].Get_Id()===Id)break;if(i<this.Content.length)return this.Paragraph.Is_UseInDocument(this.Get_Id())}return false};
CParagraphContentWithContentBase.prototype.protected_GetPrevRangeEndPos=function(LineIndex,RangeIndex){var RangeCount=this.protected_GetRangesCount(LineIndex-1);var RangeOffset=this.protected_GetRangeOffset(LineIndex-1,RangeCount-1);return LineIndex==0&&RangeIndex==0?0:this.Lines[RangeOffset+1]};
CParagraphContentWithContentBase.prototype.private_UpdateTrackRevisions=function(){if(this.Paragraph&&this.Paragraph.LogicDocument&&this.Paragraph.LogicDocument.GetTrackRevisionsManager){var RevisionsManager=this.Paragraph.LogicDocument.GetTrackRevisionsManager();RevisionsManager.CheckElement(this.Paragraph)}};CParagraphContentWithContentBase.prototype.CanSplit=function(){return true};CParagraphContentWithContentBase.prototype.PreDelete=function(){};
CParagraphContentWithContentBase.prototype.private_UpdateDocumentOutline=function(){if(this.Paragraph)this.Paragraph.UpdateDocumentOutline()};CParagraphContentWithContentBase.prototype.IsSolid=function(){return false};

@ -457,9 +457,9 @@ define([
APP.editor.save();
};
Messages.profile_copyKey = "Copy edPublic key"; // XXX
var addPublicKey = function ($container) {
if (!APP.readOnly) { return; }
if (!Messages.profile_copyKey) { return; } // XXX
var $div = $(h('div.cp-sidebarlayout-element')).appendTo($container);
APP.$edPublic = $('<button>', {
@ -473,6 +473,7 @@ define([
};
var setPublicKeyButton = function (data) {
if (!data.edPublic || APP.getEdPublic || !APP.readOnly) { return; }
if (!Messages.profile_copyKey) { return; } // XXX
APP.$edPublic.show();
APP.getEdPublic = function () {
var metadataMgr = APP.common.getMetadataMgr();

Loading…
Cancel
Save