Commit e280f49a authored by Oleg Korshul's avatar Oleg Korshul Committed by Alexander.Trofimov

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

parent 4678d097
...@@ -386,6 +386,7 @@ function CDocMeta() ...@@ -386,6 +386,7 @@ function CDocMeta()
}; };
this.pagestreams = []; this.pagestreams = [];
this.waitSelectAll = false;
} }
CDocMeta.prototype = CDocMeta.prototype =
...@@ -3154,6 +3155,32 @@ CDocMeta.prototype = ...@@ -3154,6 +3155,32 @@ CDocMeta.prototype =
{ {
bRetValue = true; 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; var sel = this.Selection;
sel.Page1 = 0; sel.Page1 = 0;
...@@ -3179,24 +3206,16 @@ CDocMeta.prototype = ...@@ -3179,24 +3206,16 @@ CDocMeta.prototype =
this.OnUpdateSelection(); this.OnUpdateSelection();
} }
} }
} },
else if ( e.KeyCode == 67 && true === e.CtrlKey ) // Ctrl + C + ...
{ selectAllCheckStart : function()
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 this.waitSelectAll = false;
bRetValue = true; return true;
} },
return bRetValue; selectAllCheckEnd : function()
{
}, },
StartSearch : function(text) StartSearch : function(text)
......
...@@ -40,7 +40,7 @@ CDocMeta.prototype.Load = function(url, doc_bin_base64) ...@@ -40,7 +40,7 @@ CDocMeta.prototype.Load = function(url, doc_bin_base64)
this.Drawings.splice(0, this.Drawings.length); 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; var oThis = this;
setInterval(function() {oThis.NativeDrawTimer();}, 40); setInterval(function() {oThis.NativeDrawTimer();}, 40);
...@@ -82,6 +82,11 @@ CDocMeta.prototype.NativeDrawTimer = function() ...@@ -82,6 +82,11 @@ CDocMeta.prototype.NativeDrawTimer = function()
this.CountWords = _ret[_current++]; this.CountWords = _ret[_current++];
this.CountSpaces = _ret[_current++]; this.CountSpaces = _ret[_current++];
this.CountSymbols = _ret[_current++]; this.CountSymbols = _ret[_current++];
if (_page == (this.PagesCount - 1))
{
this.selectAllCheckEnd();
}
} }
}; };
...@@ -129,3 +134,25 @@ CDocMeta.prototype.OnImageLoad = function(obj) ...@@ -129,3 +134,25 @@ CDocMeta.prototype.OnImageLoad = function(obj)
}; };
img.src = _url; 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