Commit 592c0ac9 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

_onEndPermissions переопределяем в base

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66455 954022d7-b5bf-4e40-9824-e11837661b57
parent a0a3c7d0
......@@ -74,4 +74,12 @@ function CheckUserInLicense(customerId, userId, userFirstName, userLastName, oLi
baseEditorsApi.prototype._onCheckLicenseEnd = function(err, res) {
this.licenseResult = {err: err, res: res};
this._onEndPermissions();
};
baseEditorsApi.prototype._onEndPermissions = function() {
if (null !== this.licenseResult && this.isOnFirstConnectEnd) {
var oResult = new window['Asc'].asc_CAscEditorPermissions();
oResult.asc_setCanLicense(g_oLicenseResult.Success === this.licenseResult.res);
oResult.asc_setCanBranding(g_oLicenseResult.Error !== this.licenseResult.res); // Для тех, у кого есть лицензия, branding доступен
this.sendEvent('asc_onGetEditorPermissions', oResult);
}
};
\ No newline at end of file
......@@ -34,14 +34,6 @@
}
this._coAuthoringInit();
};
asc['spreadsheet_api'].prototype._onEndPermissions = function() {
if (null !== this.licenseResult && this.isOnFirstConnectEnd) {
var oResult = new asc.asc_CAscEditorPermissions();
oResult.asc_setCanLicense(g_oLicenseResult.Success === this.licenseResult.res);
oResult.asc_setCanBranding(g_oLicenseResult.Error !== this.licenseResult.res); // Для тех, у кого есть лицензия, branding доступен
this.handlers.trigger('asc_onGetEditorPermissions', oResult);
}
};
prot = asc['spreadsheet_api'].prototype;
prot['asc_getEditorPermissions'] = prot.asc_getEditorPermissions;
......
......@@ -17,12 +17,4 @@ asc_docs_api.prototype.asc_getEditorPermissions = function(licenseUrl, customerI
this._onCheckLicenseEnd(true, g_oLicenseResult.Error);
}
this._coAuthoringInit();
};
asc_docs_api.prototype._onEndPermissions = function() {
if (null !== this.licenseResult && this.isOnFirstConnectEnd) {
var oResult = new window['Asc'].asc_CAscEditorPermissions();
oResult.asc_setCanLicense(g_oLicenseResult.Success === this.licenseResult.res);
oResult.asc_setCanBranding(g_oLicenseResult.Error !== this.licenseResult.res); // Для тех, у кого есть лицензия, branding доступен
this.asc_fireCallback('asc_onGetEditorPermissions', oResult);
}
};
\ No newline at end of file
......@@ -18,12 +18,4 @@ asc_docs_api.prototype.asc_getEditorPermissions = function(licenseUrl, customerI
this._onCheckLicenseEnd(true, g_oLicenseResult.Error);
}
this._coAuthoringInit();
};
asc_docs_api.prototype._onEndPermissions = function() {
if (null !== this.licenseResult && this.isOnFirstConnectEnd) {
var oResult = new window['Asc'].asc_CAscEditorPermissions();
oResult.asc_setCanLicense(g_oLicenseResult.Success === this.licenseResult.res);
oResult.asc_setCanBranding(g_oLicenseResult.Error !== this.licenseResult.res); // Для тех, у кого есть лицензия, branding доступен
this.asc_fireCallback('asc_onGetEditorPermissions', oResult);
}
};
\ 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