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
31684a28
Commit
31684a28
authored
Jun 28, 2016
by
Oleg Korshul
Committed by
GitHub
Jun 28, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #28 from ONLYOFFICE/release/v4.0
start plugin with vareiations
parents
7c325d63
d0e86538
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
5 deletions
+27
-5
common/plugins.js
common/plugins.js
+27
-5
No files found.
common/plugins.js
View file @
31684a28
...
@@ -79,6 +79,7 @@
...
@@ -79,6 +79,7 @@
{
{
this
.
plugins
=
[];
this
.
plugins
=
[];
this
.
current
=
null
;
this
.
current
=
null
;
this
.
currentVariation
=
0
;
this
.
path
=
"
../../../../sdkjs-plugins/
"
;
this
.
path
=
"
../../../../sdkjs-plugins/
"
;
this
.
api
=
null
;
this
.
api
=
null
;
...
@@ -124,6 +125,8 @@
...
@@ -124,6 +125,8 @@
if
(
this
.
current
==
null
)
if
(
this
.
current
==
null
)
return
false
;
return
false
;
this
.
currentVariation
=
Math
.
min
(
variation
,
this
.
current
.
variations
.
length
-
1
);
this
.
startData
=
(
data
==
null
||
data
==
""
)
?
new
CPluginData
()
:
data
;
this
.
startData
=
(
data
==
null
||
data
==
""
)
?
new
CPluginData
()
:
data
;
this
.
startData
.
setAttribute
(
"
guid
"
,
guid
)
this
.
startData
.
setAttribute
(
"
guid
"
,
guid
)
this
.
correctData
(
this
.
startData
);
this
.
correctData
(
this
.
startData
);
...
@@ -171,9 +174,9 @@
...
@@ -171,9 +174,9 @@
if
(
this
.
startData
.
getAttribute
(
"
resize
"
)
===
true
)
if
(
this
.
startData
.
getAttribute
(
"
resize
"
)
===
true
)
this
.
startLongAction
();
this
.
startLongAction
();
if
(
this
.
current
.
variations
[
0
].
isVisual
&&
this
.
startData
.
getAttribute
(
"
resize
"
)
!==
true
)
if
(
this
.
current
.
variations
[
this
.
currentVariation
].
isVisual
&&
this
.
startData
.
getAttribute
(
"
resize
"
)
!==
true
)
{
{
this
.
api
.
asc_fireCallback
(
"
asc_onPluginShow
"
,
this
.
current
);
this
.
api
.
asc_fireCallback
(
"
asc_onPluginShow
"
,
this
.
current
,
this
.
currentVariation
);
}
}
else
else
{
{
...
@@ -181,7 +184,7 @@
...
@@ -181,7 +184,7 @@
ifr
.
name
=
"
plugin_iframe
"
;
ifr
.
name
=
"
plugin_iframe
"
;
ifr
.
id
=
"
plugin_iframe
"
;
ifr
.
id
=
"
plugin_iframe
"
;
var
_add
=
this
.
current
.
baseUrl
==
""
?
this
.
path
:
this
.
current
.
baseUrl
;
var
_add
=
this
.
current
.
baseUrl
==
""
?
this
.
path
:
this
.
current
.
baseUrl
;
ifr
.
src
=
_add
+
this
.
current
.
variations
[
0
].
url
;
ifr
.
src
=
_add
+
this
.
current
.
variations
[
this
.
currentVariation
].
url
;
ifr
.
style
.
position
=
'
absolute
'
;
ifr
.
style
.
position
=
'
absolute
'
;
ifr
.
style
.
top
=
'
-100px
'
;
ifr
.
style
.
top
=
'
-100px
'
;
ifr
.
style
.
left
=
'
0px
'
;
ifr
.
style
.
left
=
'
0px
'
;
...
@@ -219,7 +222,7 @@
...
@@ -219,7 +222,7 @@
init
:
function
()
init
:
function
()
{
{
switch
(
this
.
current
.
variations
[
0
].
initDataType
)
switch
(
this
.
current
.
variations
[
this
.
currentVariation
].
initDataType
)
{
{
case
Asc
.
EPluginDataType
.
text
:
case
Asc
.
EPluginDataType
.
text
:
{
{
...
@@ -460,6 +463,25 @@ function TEST_PLUGINS()
...
@@ -460,6 +463,25 @@ function TEST_PLUGINS()
buttons
:
[
{
text
:
"
Ok
"
,
primary
:
true
},
buttons
:
[
{
text
:
"
Ok
"
,
primary
:
true
},
{
text
:
"
Cancel
"
,
primary
:
false
}
]
{
text
:
"
Cancel
"
,
primary
:
false
}
]
},
{
description
:
"
about
"
,
url
:
"
chess/index_about.html
"
,
icons
:
[
"
chess/icon.png
"
,
"
chess/icon@2x.png
"
],
isViewer
:
true
,
EditorsSupport
:
[
"
word
"
,
"
cell
"
,
"
slide
"
],
isVisual
:
true
,
isModal
:
true
,
isInsideMode
:
false
,
initDataType
:
"
none
"
,
initData
:
""
,
isUpdateOleOnResize
:
false
,
buttons
:
[
{
"
text
"
:
"
Ok
"
,
"
primary
"
:
true
}
]
}
}
]
]
},
},
...
@@ -669,7 +691,7 @@ function TEST_PLUGINS()
...
@@ -669,7 +691,7 @@ function TEST_PLUGINS()
"
isVisual
"
:
true
,
"
isVisual
"
:
true
,
"
isModal
"
:
false
,
"
isModal
"
:
false
,
"
isInsideMode
"
:
fals
e
,
"
isInsideMode
"
:
tru
e
,
"
initDataType
"
:
"
none
"
,
"
initDataType
"
:
"
none
"
,
"
initData
"
:
""
,
"
initData
"
:
""
,
...
...
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