Commit 757dd29b authored by Alexander.Trofimov's avatar Alexander.Trofimov

asc_setDocInfo to baseEditorsApi

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66388 954022d7-b5bf-4e40-9824-e11837661b57
parent ccef0fac
......@@ -86,6 +86,34 @@ baseEditorsApi.prototype.asc_GetFontThumbnailsPath = function() {
baseEditorsApi.prototype.asc_getDocumentName = function() {
return this.documentTitle;
};
baseEditorsApi.prototype.asc_setDocInfo = function(oDocInfo) {
if (oDocInfo) {
this.DocInfo = oDocInfo;
}
if (this.DocInfo) {
this.documentId = this.DocInfo.get_Id();
this.documentUserId = this.DocInfo.get_UserId();
this.documentUrl = this.DocInfo.get_Url();
this.documentTitle = this.DocInfo.get_Title();
this.documentFormat = this.DocInfo.get_Format();
this.documentCallbackUrl = this.DocInfo.get_CallbackUrl();
this.documentVKey = this.DocInfo.get_VKey();
var sProtocol = window.location.protocol;
this.documentOrigin = ((sProtocol && '' !== sProtocol) ? sProtocol + '//' : '') + window.location.host;
this.documentOpenOptions = this.DocInfo.asc_getOptions();
this.chartEditor = this.DocInfo.asc_getChartEditor();
this.User = new Asc.asc_CUser();
this.User.asc_setId(this.DocInfo.get_UserId());
this.User.asc_setUserName(this.DocInfo.get_UserName());
}
if (undefined !== window["AscDesktopEditor"]) {
window["AscDesktopEditor"]["SetDocumentName"](this.documentTitle);
}
};
// Events
baseEditorsApi.prototype.sendEvent = function() {
};
......
......@@ -313,32 +313,6 @@ var editor;
t._loadFonts(fonts, callback);
});
};
spreadsheet_api.prototype.asc_setDocInfo = function(c_DocInfo) {
if (c_DocInfo) {
this.DocInfo = c_DocInfo;
}
if (this.DocInfo) {
this.documentId = this.DocInfo.asc_getId();
this.documentUserId = this.DocInfo.asc_getUserId();
this.documentUrl = this.DocInfo.asc_getUrl();
this.documentTitle = this.DocInfo.asc_getTitle();
this.documentFormat = this.DocInfo.asc_getFormat();
this.documentVKey = this.DocInfo.asc_getVKey();
this.chartEditor = this.DocInfo.asc_getChartEditor();
this.documentOpenOptions = this.DocInfo.asc_getOptions();
this.documentCallbackUrl = this.DocInfo.asc_getCallbackUrl();
// Выставляем пользователя
this.User = new asc.asc_CUser();
this.User.asc_setId(this.DocInfo.asc_getUserId());
this.User.asc_setUserName(this.DocInfo.asc_getUserName());
}
if (undefined !== window["AscDesktopEditor"]) {
window["AscDesktopEditor"]["SetDocumentName"](this.documentTitle);
}
};
spreadsheet_api.prototype.asc_getLocaleExample = function(val, number, date) {
var res = '';
var cultureInfo = g_aCultureInfos[val];
......
......@@ -630,32 +630,6 @@ asc_docs_api.prototype._onEndPermissions = function() {
this.asc_fireCallback('asc_onGetEditorPermissions', new window['Asc'].asc_CAscEditorPermissions());
}
};
asc_docs_api.prototype.asc_setDocInfo = function(c_DocInfo) {
if (c_DocInfo) {
this.DocInfo = c_DocInfo;
}
if (this.DocInfo) {
this.documentId = this.DocInfo.get_Id();
this.documentUserId = this.DocInfo.get_UserId();
this.documentUrl = this.DocInfo.get_Url();
this.documentTitle = this.DocInfo.get_Title();
this.documentFormat = this.DocInfo.get_Format();
this.documentCallbackUrl = this.DocInfo.get_CallbackUrl();
this.documentVKey = this.DocInfo.get_VKey();
var sProtocol = window.location.protocol;
this.documentOrigin = ((sProtocol && '' !== sProtocol) ? sProtocol + '//' : '') + window.location.host;
this.User = new Asc.asc_CUser();
this.User.asc_setId(this.DocInfo.get_UserId());
this.User.asc_setUserName(this.DocInfo.get_UserName());
}
if (undefined !== window["AscDesktopEditor"]) {
window["AscDesktopEditor"]["SetDocumentName"](this.documentTitle);
}
};
asc_docs_api.prototype.asc_setLocale = function(val) {
};
asc_docs_api.prototype.LoadDocument = function() {
......
......@@ -561,32 +561,6 @@ asc_docs_api.prototype._onEndPermissions = function() {
this.asc_fireCallback('asc_onGetEditorPermissions', new window['Asc'].asc_CAscEditorPermissions());
}
};
asc_docs_api.prototype.asc_setDocInfo = function(c_DocInfo) {
if (c_DocInfo) {
this.DocInfo = c_DocInfo;
}
if (this.DocInfo) {
this.documentId = this.DocInfo.get_Id();
this.documentUserId = this.DocInfo.get_UserId();
this.documentUrl = this.DocInfo.get_Url();
this.documentTitle = this.DocInfo.get_Title();
this.documentFormat = this.DocInfo.get_Format();
this.documentCallbackUrl = this.DocInfo.get_CallbackUrl();
this.documentVKey = this.DocInfo.get_VKey();
var sProtocol = window.location.protocol;
this.documentOrigin = ((sProtocol && '' !== sProtocol) ? sProtocol + '//' : '') + window.location.host;
this.User = new Asc.asc_CUser();
this.User.asc_setId(this.DocInfo.get_UserId());
this.User.asc_setUserName(this.DocInfo.get_UserName());
}
if (undefined !== window["AscDesktopEditor"]) {
window["AscDesktopEditor"]["SetDocumentName"](this.documentTitle);
}
};
asc_docs_api.prototype.asc_setLocale = function(val)
{
this.InterfaceLocale = val;
......
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