Commit be17ea77 authored by Alexey.Musinov's avatar Alexey.Musinov

mobile min srcipt building

parent fdace1b6
...@@ -3769,13 +3769,13 @@ function OfflineEditor () { ...@@ -3769,13 +3769,13 @@ function OfflineEditor () {
_api = new window["Asc"]["spreadsheet_api"]({}); _api = new window["Asc"]["spreadsheet_api"]({});
var userInfo = new Asc.asc_CUserInfo(); var userInfo = new Asc.asc_CUserInfo();
userInfo.asc_putId(this.initSettings.userId); userInfo.asc_putId(this.initSettings["userId"]);
userInfo.asc_putFullName(this.initSettings.fullName); userInfo.asc_putFullName(this.initSettings["fullName"]);
userInfo.asc_putFirstName(this.initSettings.firstName); userInfo.asc_putFirstName(this.initSettings["firstName"]);
userInfo.asc_putLastName(this.initSettings.lastName); userInfo.asc_putLastName(this.initSettings["lastName"]);
var docInfo = new Asc.asc_CDocInfo(); var docInfo = new Asc.asc_CDocInfo();
docInfo.put_Id(this.initSettings.documentId); docInfo.put_Id(this.initSettings["documentId"]);
docInfo.put_UserInfo(userInfo); docInfo.put_UserInfo(userInfo);
_api.asc_setDocInfo(docInfo); _api.asc_setDocInfo(docInfo);
...@@ -3784,7 +3784,7 @@ function OfflineEditor () { ...@@ -3784,7 +3784,7 @@ function OfflineEditor () {
this.registerEventsHandlers(); this.registerEventsHandlers();
if (this.initSettings.iscoauthoring) { if (this.initSettings["iscoauthoring"]) {
_api.asc_setAutoSaveGap(1); _api.asc_setAutoSaveGap(1);
_api._coAuthoringInit(); _api._coAuthoringInit();
_api.asc_SetFastCollaborative(true); _api.asc_SetFastCollaborative(true);
...@@ -3817,21 +3817,21 @@ function OfflineEditor () { ...@@ -3817,21 +3817,21 @@ function OfflineEditor () {
var t = this; var t = this;
_api.asc_registerCallback('asc_onCanUndoChanged', function (bCanUndo) { _api.asc_registerCallback("asc_onCanUndoChanged", function (bCanUndo) {
var stream = global_memory_stream_menu; var stream = global_memory_stream_menu;
stream["ClearNoAttack"](); stream["ClearNoAttack"]();
stream["WriteBool"](bCanUndo); stream["WriteBool"](bCanUndo);
window["native"]["OnCallMenuEvent"](60, stream); // ASC_MENU_EVENT_TYPE_CAN_UNDO window["native"]["OnCallMenuEvent"](60, stream); // ASC_MENU_EVENT_TYPE_CAN_UNDO
}); });
_api.asc_registerCallback('asc_onCanRedoChanged', function (bCanRedo) { _api.asc_registerCallback("asc_onCanRedoChanged", function (bCanRedo) {
var stream = global_memory_stream_menu; var stream = global_memory_stream_menu;
stream["ClearNoAttack"](); stream["ClearNoAttack"]();
stream["WriteBool"](bCanRedo); stream["WriteBool"](bCanRedo);
window["native"]["OnCallMenuEvent"](61, stream); // ASC_MENU_EVENT_TYPE_CAN_REDO window["native"]["OnCallMenuEvent"](61, stream); // ASC_MENU_EVENT_TYPE_CAN_REDO
}); });
_api.asc_registerCallback('asc_onDocumentModifiedChanged', function(change) { _api.asc_registerCallback("asc_onDocumentModifiedChanged", function(change) {
var stream = global_memory_stream_menu; var stream = global_memory_stream_menu;
stream["ClearNoAttack"](); stream["ClearNoAttack"]();
stream["WriteBool"](change); stream["WriteBool"](change);
...@@ -3842,7 +3842,7 @@ function OfflineEditor () { ...@@ -3842,7 +3842,7 @@ function OfflineEditor () {
t.asc_WriteAllWorksheets(true, true); t.asc_WriteAllWorksheets(true, true);
}); });
_api.asc_registerCallback('asc_onRenameCellTextEnd', function(found, replaced) { _api.asc_registerCallback("asc_onRenameCellTextEnd", function(found, replaced) {
var stream = global_memory_stream_menu; var stream = global_memory_stream_menu;
stream["ClearNoAttack"](); stream["ClearNoAttack"]();
stream["WriteLong"](found); stream["WriteLong"](found);
...@@ -3850,7 +3850,7 @@ function OfflineEditor () { ...@@ -3850,7 +3850,7 @@ function OfflineEditor () {
window["native"]["OnCallMenuEvent"](63, stream); // ASC_MENU_EVENT_TYPE_SEARCH_REPLACETEXT window["native"]["OnCallMenuEvent"](63, stream); // ASC_MENU_EVENT_TYPE_SEARCH_REPLACETEXT
}); });
_api.asc_registerCallback('asc_onSelectionChanged', function(cellInfo) { _api.asc_registerCallback("asc_onSelectionChanged", function(cellInfo) {
var stream = global_memory_stream_menu; var stream = global_memory_stream_menu;
stream["ClearNoAttack"](); stream["ClearNoAttack"]();
asc_WriteCCelInfo(cellInfo, stream); asc_WriteCCelInfo(cellInfo, stream);
...@@ -3858,95 +3858,95 @@ function OfflineEditor () { ...@@ -3858,95 +3858,95 @@ function OfflineEditor () {
t.onSelectionChanged(cellInfo); t.onSelectionChanged(cellInfo);
}); });
_api.asc_registerCallback('asc_onSelectionNameChanged', function(name) { _api.asc_registerCallback("asc_onSelectionNameChanged", function(name) {
var stream = global_memory_stream_menu; var stream = global_memory_stream_menu;
stream["ClearNoAttack"](); stream["ClearNoAttack"]();
stream['WriteString2'](name); stream["WriteString2"](name);
window["native"]["OnCallMenuEvent"](2310, stream); // ASC_SPREADSHEETS_EVENT_TYPE_EDITOR_SELECTION_NAME_CHANGED window["native"]["OnCallMenuEvent"](2310, stream); // ASC_SPREADSHEETS_EVENT_TYPE_EDITOR_SELECTION_NAME_CHANGED
}); });
_api.asc_registerCallback('asc_onEditorSelectionChanged', function(font) { _api.asc_registerCallback("asc_onEditorSelectionChanged", function(font) {
var stream = global_memory_stream_menu; var stream = global_memory_stream_menu;
stream["ClearNoAttack"](); stream["ClearNoAttack"]();
asc_WriteCFont(-1, font, stream); asc_WriteCFont(-1, font, stream);
window["native"]["OnCallMenuEvent"](2403, stream); // ASC_SPREADSHEETS_EVENT_TYPE_EDITOR_SELECTION_CHANGED window["native"]["OnCallMenuEvent"](2403, stream); // ASC_SPREADSHEETS_EVENT_TYPE_EDITOR_SELECTION_CHANGED
}); });
_api.asc_registerCallback('asc_onSendThemeColorSchemes', function(schemes) { _api.asc_registerCallback("asc_onSendThemeColorSchemes", function(schemes) {
var stream = global_memory_stream_menu; var stream = global_memory_stream_menu;
stream["ClearNoAttack"](); stream["ClearNoAttack"]();
asc_WriteColorSchemes(schemes, stream); asc_WriteColorSchemes(schemes, stream);
window["native"]["OnCallMenuEvent"](2404, stream); // ASC_SPREADSHEETS_EVENT_TYPE_COLOR_SCHEMES window["native"]["OnCallMenuEvent"](2404, stream); // ASC_SPREADSHEETS_EVENT_TYPE_COLOR_SCHEMES
}); });
_api.asc_registerCallback('asc_onInitTablePictures', function () { _api.asc_registerCallback("asc_onInitTablePictures", function () {
var stream = global_memory_stream_menu; var stream = global_memory_stream_menu;
stream["ClearNoAttack"](); stream["ClearNoAttack"]();
window["native"]["OnCallMenuEvent"](12, stream); // ASC_MENU_EVENT_TYPE_TABLE_STYLES window["native"]["OnCallMenuEvent"](12, stream); // ASC_MENU_EVENT_TYPE_TABLE_STYLES
}); });
_api.asc_registerCallback('asc_onInitEditorStyles', function () { _api.asc_registerCallback("asc_onInitEditorStyles", function () {
var stream = global_memory_stream_menu; var stream = global_memory_stream_menu;
stream["ClearNoAttack"](); stream["ClearNoAttack"]();
window["native"]["OnCallMenuEvent"](2405, stream); // ASC_SPREADSHEETS_EVENT_TYPE_TABLE_STYLES window["native"]["OnCallMenuEvent"](2405, stream); // ASC_SPREADSHEETS_EVENT_TYPE_TABLE_STYLES
}); });
_api.asc_registerCallback('asc_onError', function(id, level, errData) { _api.asc_registerCallback("asc_onError", function(id, level, errData) {
var stream = global_memory_stream_menu; var stream = global_memory_stream_menu;
stream["ClearNoAttack"](); stream["ClearNoAttack"]();
stream['WriteLong'](id); stream["WriteLong"](id);
stream['WriteLong'](level); stream["WriteLong"](level);
window["native"]["OnCallMenuEvent"](500, stream); // ASC_MENU_EVENT_TYPE_ON_ERROR window["native"]["OnCallMenuEvent"](500, stream); // ASC_MENU_EVENT_TYPE_ON_ERROR
}); });
_api.asc_registerCallback('asc_onEditCell', function(state) { _api.asc_registerCallback("asc_onEditCell", function(state) {
var stream = global_memory_stream_menu; var stream = global_memory_stream_menu;
stream["ClearNoAttack"](); stream["ClearNoAttack"]();
stream['WriteLong'](state); stream["WriteLong"](state);
window["native"]["OnCallMenuEvent"](2600, stream); // ASC_SPREADSHEETS_EVENT_TYPE_ON_EDIT_CELL window["native"]["OnCallMenuEvent"](2600, stream); // ASC_SPREADSHEETS_EVENT_TYPE_ON_EDIT_CELL
}); });
_api.asc_registerCallback('asc_onSetAFDialog', function(state) { _api.asc_registerCallback("asc_onSetAFDialog", function(state) {
var stream = global_memory_stream_menu; var stream = global_memory_stream_menu;
stream["ClearNoAttack"](); stream["ClearNoAttack"]();
asc_WriteAutoFiltersOptions(state, stream); asc_WriteAutoFiltersOptions(state, stream);
window["native"]["OnCallMenuEvent"](3060, stream); // ASC_SPREADSHEETS_EVENT_TYPE_FILTER_DIALOG window["native"]["OnCallMenuEvent"](3060, stream); // ASC_SPREADSHEETS_EVENT_TYPE_FILTER_DIALOG
}); });
_api.asc_registerCallback('asc_onAuthParticipantsChanged', function(users) { _api.asc_registerCallback("asc_onAuthParticipantsChanged", function(users) {
var stream = global_memory_stream_menu; var stream = global_memory_stream_menu;
stream["ClearNoAttack"](); stream["ClearNoAttack"]();
asc_WriteUsers(users, stream); asc_WriteUsers(users, stream);
window["native"]["OnCallMenuEvent"](2416, stream); // ASC_MENU_EVENT_TYPE_AUTH_PARTICIPANTS_CHANGED window["native"]["OnCallMenuEvent"](2416, stream); // ASC_MENU_EVENT_TYPE_AUTH_PARTICIPANTS_CHANGED
}); });
_api.asc_registerCallback('asc_onParticipantsChanged', function(users) { _api.asc_registerCallback("asc_onParticipantsChanged", function(users) {
var stream = global_memory_stream_menu; var stream = global_memory_stream_menu;
stream["ClearNoAttack"](); stream["ClearNoAttack"]();
asc_WriteUsers(users, stream); asc_WriteUsers(users, stream);
window["native"]["OnCallMenuEvent"](2416, stream); // ASC_MENU_EVENT_TYPE_AUTH_PARTICIPANTS_CHANGED window["native"]["OnCallMenuEvent"](2416, stream); // ASC_MENU_EVENT_TYPE_AUTH_PARTICIPANTS_CHANGED
}); });
_api.asc_registerCallback('asc_onSheetsChanged', function () { _api.asc_registerCallback("asc_onSheetsChanged", function () {
t.asc_WriteAllWorksheets(true, true); t.asc_WriteAllWorksheets(true, true);
}); });
_api.asc_registerCallback('asc_onGetEditorPermissions', function(state) { _api.asc_registerCallback("asc_onGetEditorPermissions", function(state) {
var rData = { var rData = {
"c" : 'open', "c" : "open",
"id" : t.initSettings.documentId, "id" : t.initSettings["documentId"],
"userid" : t.initSettings.userId, "userid" : t.initSettings["userId"],
"format" : "xlsx", "format" : "xlsx",
"vkey" : undefined, "vkey" : undefined,
"url" : this.documentUrl, "url" : this.documentUrl,
"title" : this.documentTitle, "title" : this.documentTitle,
"embeddedfonts" : false}; "embeddedfonts" : false};
_api.CoAuthoringApi.auth(t.initSettings.viewmode, rData); _api.CoAuthoringApi.auth(t.initSettings["viewmode"], rData);
}); });
_api.asc_registerCallback('asc_onDocumentUpdateVersion', function(callback) { _api.asc_registerCallback("asc_onDocumentUpdateVersion", function(callback) {
var me = this; var me = this;
me.needToUpdateVersion = true; me.needToUpdateVersion = true;
if (callback) callback.call(me); if (callback) callback.call(me);
...@@ -4064,7 +4064,7 @@ function OfflineEditor () { ...@@ -4064,7 +4064,7 @@ function OfflineEditor () {
_stream["ClearNoAttack"](); _stream["ClearNoAttack"]();
_stream["WriteByte"](0); _stream["WriteByte"](0);
_stream['WriteString2'](_api.asc_getActiveWorksheetId(i)); _stream["WriteString2"](_api.asc_getActiveWorksheetId(i));
for (var i = 0; i < _api.asc_getWorksheetsCount(); ++i) { for (var i = 0; i < _api.asc_getWorksheetsCount(); ++i) {
...@@ -4076,14 +4076,14 @@ function OfflineEditor () { ...@@ -4076,14 +4076,14 @@ function OfflineEditor () {
_stream["WriteByte"](2); _stream["WriteByte"](2);
} }
_stream["WriteLong"](i); _stream["WriteLong"](i);
_stream['WriteString2'](_api.asc_getWorksheetId(i)); _stream["WriteString2"](_api.asc_getWorksheetId(i));
_stream["WriteString2"](_api.asc_getWorksheetName(i)); _stream["WriteString2"](_api.asc_getWorksheetName(i));
_stream['WriteBool'](_api.asc_isWorksheetHidden(i)); _stream["WriteBool"](_api.asc_isWorksheetHidden(i));
_stream['WriteBool'](_api.asc_isWorkbookLocked(i)); _stream["WriteBool"](_api.asc_isWorkbookLocked(i));
_stream['WriteBool'](_api.asc_isWorksheetLockedOrDeleted(i)); _stream["WriteBool"](_api.asc_isWorksheetLockedOrDeleted(i));
_stream['WriteBool'](viewSettings.asc_getShowGridLines()); _stream["WriteBool"](viewSettings.asc_getShowGridLines());
_stream['WriteBool'](viewSettings.asc_getShowRowColHeaders()); _stream["WriteBool"](viewSettings.asc_getShowRowColHeaders());
_stream['WriteBool'](viewSettings.asc_getIsFreezePane()); _stream["WriteBool"](viewSettings.asc_getIsFreezePane());
if (_api.asc_getWorksheetTabColor(i)) if (_api.asc_getWorksheetTabColor(i))
asc_menu_WriteColor(0, _api.asc_getWorksheetTabColor(i), _stream); asc_menu_WriteColor(0, _api.asc_getWorksheetTabColor(i), _stream);
...@@ -4108,14 +4108,14 @@ function OfflineEditor () { ...@@ -4108,14 +4108,14 @@ function OfflineEditor () {
_stream["WriteByte"](2); _stream["WriteByte"](2);
} }
_stream["WriteLong"](i); _stream["WriteLong"](i);
_stream['WriteString2'](_api.asc_getWorksheetId(i)); _stream["WriteString2"](_api.asc_getWorksheetId(i));
_stream["WriteString2"](_api.asc_getWorksheetName(i)); _stream["WriteString2"](_api.asc_getWorksheetName(i));
_stream['WriteBool'](_api.asc_isWorksheetHidden(i)); _stream["WriteBool"](_api.asc_isWorksheetHidden(i));
_stream['WriteBool'](_api.asc_isWorkbookLocked(i)); _stream["WriteBool"](_api.asc_isWorkbookLocked(i));
_stream['WriteBool'](_api.asc_isWorksheetLockedOrDeleted(i)); _stream["WriteBool"](_api.asc_isWorksheetLockedOrDeleted(i));
_stream['WriteBool'](viewSettings.asc_getShowGridLines()); _stream["WriteBool"](viewSettings.asc_getShowGridLines());
_stream['WriteBool'](viewSettings.asc_getShowRowColHeaders()); _stream["WriteBool"](viewSettings.asc_getShowRowColHeaders());
_stream['WriteBool'](viewSettings.asc_getIsFreezePane()); _stream["WriteBool"](viewSettings.asc_getIsFreezePane());
if (_api.asc_getWorksheetTabColor(i)) { if (_api.asc_getWorksheetTabColor(i)) {
asc_menu_WriteColor(0, _api.asc_getWorksheetTabColor(i), _stream); asc_menu_WriteColor(0, _api.asc_getWorksheetTabColor(i), _stream);
...@@ -4657,7 +4657,6 @@ function OfflineEditor () { ...@@ -4657,7 +4657,6 @@ function OfflineEditor () {
this.styleThumbnailWidthWithRetina = this.styleThumbnailWidth; this.styleThumbnailWidthWithRetina = this.styleThumbnailWidth;
this.styleThumbnailHeightWithRetina = this.styleThumbnailHeight; this.styleThumbnailHeightWithRetina = this.styleThumbnailHeight;
window["native"]["SetStylesType"](0); window["native"]["SetStylesType"](0);
this.generateDefaultStyles(cellStylesAll, fmgrGraphics, oFont, stringRenderer); this.generateDefaultStyles(cellStylesAll, fmgrGraphics, oFont, stringRenderer);
...@@ -5317,15 +5316,15 @@ window["native"]["offline_mouse_down"] = function(x, y, pin, isViewerMode, isFor ...@@ -5317,15 +5316,15 @@ window["native"]["offline_mouse_down"] = function(x, y, pin, isViewerMode, isFor
var e = {isLocked:true, Button:0, ClickCount:1, shiftKey:false, metaKey:false, ctrlKey:false}; var e = {isLocked:true, Button:0, ClickCount:1, shiftKey:false, metaKey:false, ctrlKey:false};
if (1 === select.pin) { if (1 === select["pin"]) {
wb._onGraphicObjectMouseDown(e, select.beginX, select.beginY); wb._onGraphicObjectMouseDown(e, select["beginX"], select["beginY"]);
wb._onGraphicObjectMouseUp(e, select.endX, select.endY); wb._onGraphicObjectMouseUp(e, select["endX"], select["endY"]);
e.shiftKey = true; e.shiftKey = true;
} }
if (-1 === select.pin) { if (-1 === select["pin"]) {
wb._onGraphicObjectMouseDown(e, select.endX, select.endY); wb._onGraphicObjectMouseDown(e, select["endX"], select["endY"]);
wb._onGraphicObjectMouseUp(e, select.beginX, select.beginY); wb._onGraphicObjectMouseUp(e, select["beginX"], select["beginY"]);
e.shiftKey = true; e.shiftKey = true;
} }
...@@ -5467,7 +5466,7 @@ window["native"]["offline_mouse_move"] = function(x, y, isViewerMode, isRangeRes ...@@ -5467,7 +5466,7 @@ window["native"]["offline_mouse_move"] = function(x, y, isViewerMode, isRangeRes
var e = {isLocked: true, Button: 0, ClickCount: 1, shiftKey: false, metaKey: false, ctrlKey: false}; var e = {isLocked: true, Button: 0, ClickCount: 1, shiftKey: false, metaKey: false, ctrlKey: false};
if (textPin && 0 == textPin.pin) { if (textPin && 0 == textPin["pin"]) {
wb._onGraphicObjectMouseDown(e, x, y); wb._onGraphicObjectMouseDown(e, x, y);
wb._onGraphicObjectMouseUp(e, x, y); wb._onGraphicObjectMouseUp(e, x, y);
} else { } else {
...@@ -6461,40 +6460,6 @@ window["native"]["offline_apply_event"] = function(type,params) { ...@@ -6461,40 +6460,6 @@ window["native"]["offline_apply_event"] = function(type,params) {
_imagePr.ImageUrl = undefined; _imagePr.ImageUrl = undefined;
// var Page_Width = 210;
// var Page_Height = 297;
//
// var X_Left_Margin = 30; // 3 cm
// var X_Right_Margin = 15; // 1.5 cm
// var Y_Bottom_Margin = 20; // 2 cm
// var Y_Top_Margin = 20; // 2 cm
//
// //var _section_select = this.WordControl.m_oLogicDocument.Get_PageSizesByDrawingObjects();
// var _page_width = Page_Width;
// var _page_height = Page_Height;
// var _page_x_left_margin = X_Left_Margin;
// var _page_y_top_margin = Y_Top_Margin;
// var _page_x_right_margin = X_Right_Margin;
// var _page_y_bottom_margin = Y_Bottom_Margin;
// if (_section_select)
// {
// if (_section_select.W)
// _page_width = _section_select.W;
//
// if (_section_select.H)
// _page_height = _section_select.H;
// }
// var __w = Math.max(1, _page_width - (_page_x_left_margin + _page_x_right_margin));
// var __h = Math.max(1, _page_height - (_page_y_top_margin + _page_y_bottom_margin));
//
// var wI = (undefined !== _w) ? Math.max(_w * 25.4 / 96.0, 1) : 1;
//var hI = (undefined !== _h) ? Math.max(_h * 25.4 / 96.0, 1) : 1;
// wI = Math.max(5, Math.min(wI, _w));
//hI = Math.max(5, Math.min(hI, _h));
_imagePr.Width = _w; _imagePr.Width = _w;
_imagePr.Height = _h; _imagePr.Height = _h;
} }
...@@ -7312,7 +7277,7 @@ window["native"]["offline_apply_event"] = function(type,params) { ...@@ -7312,7 +7277,7 @@ window["native"]["offline_apply_event"] = function(type,params) {
var dataObject = JSON.parse(params); var dataObject = JSON.parse(params);
//console.log("JS - " + dataObject['type']); // console.log("JS - " + dataObject['type']);
switch (dataObject['type']) { switch (dataObject['type']) {
case 'auth' : case 'auth' :
......
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