Commit d554c988 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

CDocInfo.get_IsNew/put_IsNew заменено на флаг в методе get_Options "IsEmpty"

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50909 954022d7-b5bf-4e40-9824-e11837661b57
parent 57b063db
......@@ -428,7 +428,6 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
this.documentOrigin = this.DocInfo["Origin"];
this.chartEditor = this.DocInfo["ChartEditor"];
this.documentOpenOptions = this.DocInfo["Options"];
this.documentIsNew = this.DocInfo["IsNew"];
var nIndex = -1;
if(this.documentTitle)
......@@ -912,7 +911,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
}
}
else {
if(this.documentIsNew)
if(this.documentOpenOptions && this.documentOpenOptions["IsEmpty"])
{
var sEmptyWorkbook = getEmptyWorkbook();
var v = {"id":this.documentId, "format": this.documentFormat, "vkey": this.documentVKey, "editorid": c_oEditorId.Speadsheet, "c":"create", "url": this.documentUrl, "title": this.documentTitle, "embeddedfonts": this.isUseEmbeddedCutFonts, "data": sEmptyWorkbook};
......
......@@ -485,8 +485,8 @@ prop:get_UserId
prop:put_UserId
prop:get_UserName
prop:put_UserName
prop:get_IsNew
prop:put_IsNew
prop:get_Options
prop:put_Options
---
var:CAscColorScheme
prop:get_colors
......@@ -1614,8 +1614,8 @@ CDocInfo.prototype['get_UserId'] = CDocInfo.prototype.get_UserId;
CDocInfo.prototype['put_UserId'] = CDocInfo.prototype.put_UserId;
CDocInfo.prototype['get_UserName'] = CDocInfo.prototype.get_UserName;
CDocInfo.prototype['put_UserName'] = CDocInfo.prototype.put_UserName;
CDocInfo.prototype['get_IsNew'] = CDocInfo.prototype.get_IsNew;
CDocInfo.prototype['put_IsNew'] = CDocInfo.prototype.put_IsNew;
CDocInfo.prototype['get_Options'] = CDocInfo.prototype.get_Options;
CDocInfo.prototype['put_Options'] = CDocInfo.prototype.put_Options;
window['CAscColorScheme'] = CAscColorScheme;
CAscColorScheme.prototype['get_colors'] = CAscColorScheme.prototype.get_colors;
CAscColorScheme.prototype['get_name'] = CAscColorScheme.prototype.get_name;
......
......@@ -38,8 +38,8 @@ function CDocInfo (obj){
if (typeof obj.UserName != 'undefined'){
this.UserName = obj.UserName;
}
if (typeof obj.IsNew != 'undefined'){
this.IsNew = obj.IsNew;
if (typeof obj.Options != 'undefined'){
this.Options = obj.Options;
}
if (obj.OfflineApp === true)
this.OfflineApp = true;
......@@ -52,7 +52,7 @@ function CDocInfo (obj){
this.VKey = null;
this.UserId = null;
this.UserName = null;
this.IsNew = null;
this.Options = null;
}
}
CDocInfo.prototype.get_Id = function(){return this.Id}
......@@ -71,8 +71,8 @@ CDocInfo.prototype.get_UserId = function(){return this.UserId;}
CDocInfo.prototype.put_UserId = function(v){this.UserId = v;}
CDocInfo.prototype.get_UserName = function(){return this.UserName;}
CDocInfo.prototype.put_UserName = function(v){this.UserName = v;}
CDocInfo.prototype.get_IsNew = function(){return this.IsNew;}
CDocInfo.prototype.put_IsNew = function(v){this.IsNew = v;}
CDocInfo.prototype.get_Options = function(){return this.Options;}
CDocInfo.prototype.put_Options = function(v){this.Options = v;}
// ---------------------------------------------------------------
function CAscColorScheme()
......
......@@ -26,8 +26,8 @@ prop:get_UserId
prop:put_UserId
prop:get_UserName
prop:put_UserName
prop:get_IsNew
prop:put_IsNew
prop:get_Options
prop:put_Options
---
var:CListType
prop:get_ListType
......@@ -1122,8 +1122,8 @@ CDocInfo.prototype['get_UserId'] = CDocInfo.prototype.get_UserId;
CDocInfo.prototype['put_UserId'] = CDocInfo.prototype.put_UserId;
CDocInfo.prototype['get_UserName'] = CDocInfo.prototype.get_UserName;
CDocInfo.prototype['put_UserName'] = CDocInfo.prototype.put_UserName;
CDocInfo.prototype['get_IsNew'] = CDocInfo.prototype.get_IsNew;
CDocInfo.prototype['put_IsNew'] = CDocInfo.prototype.put_IsNew;
CDocInfo.prototype['get_Options'] = CDocInfo.prototype.get_Options;
CDocInfo.prototype['put_Options'] = CDocInfo.prototype.put_Options;
window['CListType'] = CListType;
CListType.prototype['get_ListType'] = CListType.prototype.get_ListType;
CListType.prototype['get_ListSubType'] = CListType.prototype.get_ListSubType;
......
......@@ -51,8 +51,8 @@ function CDocInfo (obj){
if (typeof obj.UserName != 'undefined'){
this.UserName = obj.UserName;
}
if (typeof obj.IsNew != 'undefined'){
this.IsNew = obj.IsNew;
if (typeof obj.Options != 'undefined'){
this.Options = obj.Options;
}
if (obj.OfflineApp === true)
this.OfflineApp = true;
......@@ -65,7 +65,7 @@ function CDocInfo (obj){
this.VKey = null;
this.UserId = null;
this.UserName = null;
this.IsNew = null;
this.Options = null;
}
}
CDocInfo.prototype.get_Id = function(){return this.Id}
......@@ -84,8 +84,8 @@ CDocInfo.prototype.get_UserId = function(){return this.UserId;}
CDocInfo.prototype.put_UserId = function(v){this.UserId = v;}
CDocInfo.prototype.get_UserName = function(){return this.UserName;}
CDocInfo.prototype.put_UserName = function(v){this.UserName = v;}
CDocInfo.prototype.get_IsNew = function(){return this.IsNew;}
CDocInfo.prototype.put_IsNew = function(v){this.IsNew = v;}
CDocInfo.prototype.get_Options = function(){return this.Options;}
CDocInfo.prototype.put_Options = function(v){this.Options = v;}
function CListType(obj)
{
......@@ -916,7 +916,8 @@ asc_docs_api.prototype.LoadDocument = function(c_DocInfo)
}
if(documentId){
if(this.DocInfo.get_IsNew())
var oOpenOptions = this.DocInfo.get_Options();
if(oOpenOptions && oOpenOptions["IsEmpty"])
{
var rData = {"id":documentId, "format": documentFormat, "vkey": documentVKey, "editorid": c_oEditorId.Word, "c":"create", "url": documentUrl, "title": documentTitle, "embeddedfonts": this.isUseEmbeddedCutFonts, "data": g_sEmpty_bin};
sendCommand( oThis, function(){}, JSON.stringify(rData) );
......
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