Commit bf630fec authored by Ivan.Shulga's avatar Ivan.Shulga Committed by Alexander.Trofimov

spell checker

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47211 954022d7-b5bf-4e40-9824-e11837661b57
parent 0fd1ed09
var g_sMainServiceLocalUrl = "/AsyncHandlers/CanvasService.ashx";var g_sResourceServiceLocalUrl = "/AsyncHandlers/ResourceService.ashx?path=";var g_sUploadServiceLocalUrl = "/AsyncHandlers/UploadService.ashx"; var c_oEditorId = { Word : 0, Speadsheet : 1, Presentation : 2} var PostMessageType = { UploadImage : 0} var c_oAscServerError = { NoError : 0, Unknown : -1, ReadRequestStream : -3, TaskQueue : -20, TaskResult : -40, Storage : -60, StorageFileNoFound : -61, StorageRead : -62, StorageWrite : -63, StorageRemoveDir : -64, StorageCreateDir : -65, StorageGetInfo : -66, Convert : -80, ConvertDownload : -81, ConvertUnknownFormat : -82, ConvertTimeout : -83, ConvertReadFile : -84, Upload : -100, UploadContentLength : -101, UploadExtension : -102, UploadCountFiles : -103, VKey : -120, VKeyEncrypt : -121, VKeyKeyExpire : -122, VKeyUserCountExceed : -123}
\ No newline at end of file
var g_sMainServiceLocalUrl = "/AsyncHandlers/CanvasService.ashx";var g_sResourceServiceLocalUrl = "/AsyncHandlers/ResourceService.ashx?path=";var g_sUploadServiceLocalUrl = "/AsyncHandlers/UploadService.ashx";var g_sSpellCheckServiceLocalUrl = "/AsyncHandlers/SpellChecker.ashx"; var c_oEditorId = { Word : 0, Speadsheet : 1, Presentation : 2} var PostMessageType = { UploadImage : 0} var c_oAscServerError = { NoError : 0, Unknown : -1, ReadRequestStream : -3, TaskQueue : -20, TaskResult : -40, Storage : -60, StorageFileNoFound : -61, StorageRead : -62, StorageWrite : -63, StorageRemoveDir : -64, StorageCreateDir : -65, StorageGetInfo : -66, Convert : -80, ConvertDownload : -81, ConvertUnknownFormat : -82, ConvertTimeout : -83, ConvertReadFile : -84, Upload : -100, UploadContentLength : -101, UploadExtension : -102, UploadCountFiles : -103, VKey : -120, VKeyEncrypt : -121, VKeyKeyExpire : -122, VKeyUserCountExceed : -123}
\ No newline at end of file
......
......@@ -6060,6 +6060,41 @@ var cCharDelimiter = String.fromCharCode(5);
function getURLParameter(name) {
return (RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1];
};
function spellCheck (editor, fCallback, rdata){
asc_ajax({
type: 'POST',
url: g_sSpellCheckServiceLocalUrl,
data: rdata,
error: function(jqXHR, textStatus, errorThrown){
editor.asc_fireCallback("asc_onError",c_oAscError.ID.Unknown,c_oAscError.Level.Critical);
if(fCallback)
fCallback();
},
success: function(msg){
var incomeObject = JSON.parse(msg);
switch(incomeObject.type){
case "spell":
if(fCallback)
fCallback(incomeObject);
break;
case "synonym":
if(fCallback)
fCallback(incomeObject);
break;
case "suggest":
if(fCallback)
fCallback(incomeObject);
break;
case "err":
editor.asc_fireCallback("asc_onError", _mapAscServerErrorToAscError(parseInt(incomeObject.data)), c_oAscError.Level.Critical);
if(fCallback)
fCallback(incomeObject);
break;
}
}
})
};
function sendCommand(editor, fCallback, rdata){
asc_ajax({
type: 'POST',
......
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