Commit 1a426a64 authored by Oleg Korshul's avatar Oleg Korshul

новая схема в десктопе. Полностью рабочая версия

parent 311ddc2c
......@@ -410,6 +410,7 @@ function CDocMeta()
};
this.pagestreams = [];
this.waitSelectAll = false;
}
CDocMeta.prototype =
......@@ -3178,6 +3179,32 @@ CDocMeta.prototype =
{
bRetValue = true;
if (this.selectAllCheckStart())
{
this.selectAll();
}
}
else if ( e.KeyCode == 67 && true === e.CtrlKey ) // Ctrl + C + ...
{
AscCommon.Editor_Copy(editor);
//íå âîçâðàùàåì true ÷òîáû íå áûëî preventDefault
}
else if ( e.KeyCode == 80 && true === e.CtrlKey ) // Ctrl + P + ...
{
editor.onPrint();
bRetValue = true;
}
else if ( e.KeyCode == 83 && true === e.CtrlKey ) // Ctrl + S + ...
{
// nothing
bRetValue = true;
}
return bRetValue;
},
selectAll : function()
{
var sel = this.Selection;
sel.Page1 = 0;
......@@ -3203,24 +3230,16 @@ CDocMeta.prototype =
this.OnUpdateSelection();
}
}
}
else if ( e.KeyCode == 67 && true === e.CtrlKey ) // Ctrl + C + ...
{
AscCommon.Editor_Copy(editor);
//íå âîçâðàùàåì true ÷òîáû íå áûëî preventDefault
}
else if ( e.KeyCode == 80 && true === e.CtrlKey ) // Ctrl + P + ...
{
editor.onPrint();
bRetValue = true;
}
else if ( e.KeyCode == 83 && true === e.CtrlKey ) // Ctrl + S + ...
},
selectAllCheckStart : function()
{
// nothing
bRetValue = true;
}
this.waitSelectAll = false;
return true;
},
return bRetValue;
selectAllCheckEnd : function()
{
},
StartSearch : function(text)
......
......@@ -64,7 +64,7 @@ CDocMeta.prototype.Load = function(url, doc_bin_base64)
this.Drawings.splice(0, this.Drawings.length);
}
window.g_font_loader.LoadEmbeddedFonts("fonts/", this.Fonts);
AscCommon.g_font_loader.LoadEmbeddedFonts("fonts/", this.Fonts);
var oThis = this;
setInterval(function() {oThis.NativeDrawTimer();}, 40);
......@@ -106,6 +106,11 @@ CDocMeta.prototype.NativeDrawTimer = function()
this.CountWords = _ret[_current++];
this.CountSpaces = _ret[_current++];
this.CountSymbols = _ret[_current++];
if (_page == (this.PagesCount - 1))
{
this.selectAllCheckEnd();
}
}
};
......@@ -153,3 +158,25 @@ CDocMeta.prototype.OnImageLoad = function(obj)
};
img.src = _url;
};
CDocMeta.prototype.selectAllCheckStart = function()
{
if (this.pagestreams[this.PagesCount - 1] !== undefined)
{
this.waitSelectAll = false;
return true;
}
this.waitSelectAll = true;
editor.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.SlowOperation);
};
CDocMeta.prototype.selectAllCheckEnd = function()
{
if (this.waitSelectAll)
{
this.waitSelectAll = false;
editor.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.SlowOperation);
this.selectAll();
}
};
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment