Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
fa40c6ca
Commit
fa40c6ca
authored
Jun 29, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add light support
parent
70c46c57
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
43 deletions
+47
-43
common/Private/license.js
common/Private/license.js
+7
-4
common/apiCommon.js
common/apiCommon.js
+40
-39
No files found.
common/Private/license.js
View file @
fa40c6ca
...
@@ -113,13 +113,16 @@ AscCommon.baseEditorsApi.prototype._onCheckLicenseEnd = function(err, res) {
...
@@ -113,13 +113,16 @@ AscCommon.baseEditorsApi.prototype._onCheckLicenseEnd = function(err, res) {
this
.
licenseResult
=
{
err
:
err
,
res
:
res
};
this
.
licenseResult
=
{
err
:
err
,
res
:
res
};
this
.
_onEndPermissions
();
this
.
_onEndPermissions
();
};
};
AscCommon
.
baseEditorsApi
.
prototype
.
_onEndPermissions
=
function
()
{
AscCommon
.
baseEditorsApi
.
prototype
.
_onEndPermissions
=
function
()
{
if
(
this
.
isOnFirstConnectEnd
&&
this
.
isOnLoadLicense
)
{
if
(
this
.
isOnFirstConnectEnd
&&
this
.
isOnLoadLicense
)
{
var
oResult
=
new
AscCommon
.
asc_CAscEditorPermissions
();
var
oResult
=
new
AscCommon
.
asc_CAscEditorPermissions
();
if
(
null
!==
this
.
licenseResult
)
{
if
(
null
!==
this
.
licenseResult
)
{
oResult
.
asc_setCanLicense
(
g_oLicenseResult
.
Success
===
this
.
licenseResult
);
var
type
=
this
.
licenseResult
[
'
type
'
];
oResult
.
asc_setCanBranding
(
g_oLicenseResult
.
Error
!==
this
.
licenseResult
);
// Для тех, у кого есть лицензия, branding доступен
oResult
.
asc_setCanLicense
(
g_oLicenseResult
.
Success
===
type
);
oResult
.
asc_setCanBranding
(
g_oLicenseResult
.
Error
!==
type
);
// Для тех, у кого есть лицензия, branding доступен
oResult
.
asc_setCanBranding
(
g_oLicenseResult
.
Error
!==
type
);
// Для тех, у кого есть лицензия, branding доступен
oResult
.
asc_setIsLight
(
this
.
licenseResult
[
'
light
'
]);
}
}
this
.
sendEvent
(
'
asc_onGetEditorPermissions
'
,
oResult
);
this
.
sendEvent
(
'
asc_onGetEditorPermissions
'
,
oResult
);
}
}
};
};
\ No newline at end of file
common/apiCommon.js
View file @
fa40c6ca
...
@@ -106,36 +106,36 @@
...
@@ -106,36 +106,36 @@
return
ret
;
return
ret
;
}
}
/**
/**
* Класс asc_CAscEditorPermissions для прав редакторов
* Класс asc_CAscEditorPermissions для прав редакторов
* -----------------------------------------------------------------------------
* -----------------------------------------------------------------------------
*
*
* @constructor
* @constructor
* @memberOf Asc
* @memberOf Asc
*/
*/
function
asc_CAscEditorPermissions
(
settings
)
{
function
asc_CAscEditorPermissions
(
settings
)
{
this
.
canCoAuthoring
=
tru
e
;
this
.
canLicense
=
fals
e
;
this
.
canReaderMode
=
tru
e
;
this
.
isLight
=
fals
e
;
this
.
canBranding
=
fals
e
;
this
.
canCoAuthoring
=
tru
e
;
this
.
isAutosaveEnabl
e
=
true
;
this
.
canReaderMod
e
=
true
;
this
.
AutosaveMinInterval
=
300
;
this
.
canBranding
=
false
;
this
.
isAnalyticsEnable
=
fals
e
;
this
.
isAutosaveEnable
=
tru
e
;
return
this
;
this
.
AutosaveMinInterval
=
300
;
}
this
.
isAnalyticsEnable
=
false
;
asc_CAscEditorPermissions
.
prototype
=
{
return
this
;
constructor
:
asc_CAscEditorPermissions
,
}
asc_getCanLicense
:
function
(){
return
this
.
canLicense
;
},
asc_CAscEditorPermissions
.
prototype
.
asc_getCanLicense
=
function
(){
return
this
.
canLicense
;
};
asc_CAscEditorPermissions
.
prototype
.
asc_getCanCoAuthoring
=
function
(){
return
this
.
canCoAuthoring
;
};
asc_getCanCoAuthoring
:
function
(){
return
this
.
canCoAuthoring
;
},
asc_CAscEditorPermissions
.
prototype
.
asc_getCanReaderMode
=
function
(){
return
this
.
canReaderMode
;
};
asc_getCanReaderMode
:
function
(){
return
this
.
canReaderMode
;
},
asc_CAscEditorPermissions
.
prototype
.
asc_getCanBranding
=
function
(){
return
this
.
canBranding
;
};
asc_getCanBranding
:
function
(){
return
this
.
canBranding
;
},
asc_CAscEditorPermissions
.
prototype
.
asc_getIsAutosaveEnable
=
function
(){
return
this
.
isAutosaveEnable
;
};
asc_getIsAutosaveEnable
:
function
(){
return
this
.
isAutosaveEnable
;
},
asc_CAscEditorPermissions
.
prototype
.
asc_getAutosaveMinInterval
=
function
(){
return
this
.
AutosaveMinInterval
;
};
asc_getAutosaveMinInterval
:
function
(){
return
this
.
AutosaveMinInterval
;
},
asc_CAscEditorPermissions
.
prototype
.
asc_getIsAnalyticsEnable
=
function
(){
return
this
.
isAnalyticsEnable
;
};
asc_getIsAnalyticsEnable
:
function
(){
return
this
.
isAnalyticsEnable
;
},
asc_CAscEditorPermissions
.
prototype
.
asc_getIsLight
=
function
(){
return
this
.
isLight
;
};
asc_setCanLicense
:
function
(
v
){
this
.
canLicense
=
v
;
},
asc_CAscEditorPermissions
.
prototype
.
asc_setCanLicense
=
function
(
v
){
this
.
canLicense
=
v
;
};
asc_setCanBranding
:
function
(
v
){
this
.
canBranding
=
v
;
}
asc_CAscEditorPermissions
.
prototype
.
asc_setCanBranding
=
function
(
v
){
this
.
canBranding
=
v
;
};
};
asc_CAscEditorPermissions
.
prototype
.
asc_setIsLight
=
function
(
v
){
this
.
isLight
=
v
;
};
/** @constructor */
/** @constructor */
function
asc_ValAxisSettings
()
function
asc_ValAxisSettings
()
...
@@ -2297,15 +2297,16 @@
...
@@ -2297,15 +2297,16 @@
window
[
"
AscCommon
"
].
CreateAscColorCustom
=
CreateAscColorCustom
;
window
[
"
AscCommon
"
].
CreateAscColorCustom
=
CreateAscColorCustom
;
window
[
"
AscCommon
"
].
CreateAscColor
=
CreateAscColor
;
window
[
"
AscCommon
"
].
CreateAscColor
=
CreateAscColor
;
window
[
"
AscCommon
"
].
asc_CAscEditorPermissions
=
asc_CAscEditorPermissions
;
window
[
"
AscCommon
"
].
asc_CAscEditorPermissions
=
asc_CAscEditorPermissions
;
prot
=
asc_CAscEditorPermissions
.
prototype
;
prot
=
asc_CAscEditorPermissions
.
prototype
;
prot
[
"
asc_getCanLicense
"
]
=
prot
.
asc_getCanLicense
;
prot
[
"
asc_getCanLicense
"
]
=
prot
.
asc_getCanLicense
;
prot
[
"
asc_getCanCoAuthoring
"
]
=
prot
.
asc_getCanCoAuthoring
;
prot
[
"
asc_getCanCoAuthoring
"
]
=
prot
.
asc_getCanCoAuthoring
;
prot
[
"
asc_getCanReaderMode
"
]
=
prot
.
asc_getCanReaderMode
;
prot
[
"
asc_getCanReaderMode
"
]
=
prot
.
asc_getCanReaderMode
;
prot
[
"
asc_getCanBranding
"
]
=
prot
.
asc_getCanBranding
;
prot
[
"
asc_getCanBranding
"
]
=
prot
.
asc_getCanBranding
;
prot
[
"
asc_getIsAutosaveEnable
"
]
=
prot
.
asc_getIsAutosaveEnable
;
prot
[
"
asc_getIsAutosaveEnable
"
]
=
prot
.
asc_getIsAutosaveEnable
;
prot
[
"
asc_getAutosaveMinInterval
"
]
=
prot
.
asc_getAutosaveMinInterval
;
prot
[
"
asc_getAutosaveMinInterval
"
]
=
prot
.
asc_getAutosaveMinInterval
;
prot
[
"
asc_getIsAnalyticsEnable
"
]
=
prot
.
asc_getIsAnalyticsEnable
;
prot
[
"
asc_getIsAnalyticsEnable
"
]
=
prot
.
asc_getIsAnalyticsEnable
;
prot
[
"
asc_getIsLight
"
]
=
prot
.
asc_getIsLight
;
window
[
"
AscCommon
"
].
asc_ValAxisSettings
=
asc_ValAxisSettings
;
window
[
"
AscCommon
"
].
asc_ValAxisSettings
=
asc_ValAxisSettings
;
prot
=
asc_ValAxisSettings
.
prototype
;
prot
=
asc_ValAxisSettings
.
prototype
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment