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
e355e0c7
Commit
e355e0c7
authored
8 years ago
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented lock/unlock for updating of panel of styles.
parent
cf899afd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
1 deletion
+27
-1
common/plugins.js
common/plugins.js
+11
-0
word/Editor/Document.js
word/Editor/Document.js
+16
-1
No files found.
common/plugins.js
View file @
e355e0c7
...
...
@@ -390,6 +390,16 @@
{
if
(
window
.
g_asc_plugins
.
api
.
asc_canPaste
())
{
var
editorId
=
window
.
g_asc_plugins
.
api
.
getEditorId
();
if
(
AscCommon
.
c_oEditorId
.
Word
===
editorId
||
AscCommon
.
c_oEditorId
.
Presentation
===
editorId
)
{
var
oLogicDocument
=
window
.
g_asc_plugins
.
api
.
WordControl
?
window
.
g_asc_plugins
.
api
.
WordControl
.
m_oLogicDocument
:
null
;
oLogicDocument
.
LockPanelStyles
();
}
var
_script
=
"
(function(){ var Api = window.g_asc_plugins.api;
\n
"
+
value
+
"
})();
"
;
eval
(
_script
);
...
...
@@ -422,6 +432,7 @@
}
delete
window
.
g_asc_plugins
.
images_rename
;
window
.
g_asc_plugins
.
api
.
asc_Recalculate
();
oLogicDocument
.
UnlockPanelStyles
(
true
);
});
}
else
if
(
AscCommon
.
c_oEditorId
.
Spreadsheet
===
editorId
)
...
...
This diff is collapsed.
Click to expand it.
word/Editor/Document.js
View file @
e355e0c7
...
...
@@ -1481,7 +1481,8 @@ function CDocument(DrawingDocument, isMainLogicDocument)
this
.
TrackRevisionsManager
=
new
CTrackRevisionsManager
(
this
);
// Контролируем изменения интерфейса
this
.
ChangedStyles
=
[];
// Объект с Id стилями, которые были изменены/удалены/добавлены
this
.
ChangedStyles
=
[];
// Объект с Id стилями, которые были изменены/удалены/добавлены
this
.
TurnOffPanelStyles
=
0
;
// == 0 - можно обновлять панельку со стилями, != 0 - нельзя обновлять
// Добавляем данный класс в таблицу Id (обязательно в конце конструктора)
this
.
TableId
.
Add
(
this
,
this
.
Id
);
...
...
@@ -10108,6 +10109,9 @@ CDocument.prototype.Add_ChangedStyle = function(arrStylesId)
};
CDocument
.
prototype
.
Document_UpdateStylesPanel
=
function
()
{
if
(
0
!==
this
.
TurnOffPanelStyles
)
return
;
var
bNeedUpdate
=
false
;
for
(
var
StyleId
in
this
.
ChangedStyles
)
{
...
...
@@ -10122,6 +10126,17 @@ CDocument.prototype.Document_UpdateStylesPanel = function()
editor
.
GenerateStyles
();
}
};
CDocument
.
prototype
.
LockPanelStyles
=
function
()
{
this
.
TurnOffPanelStyles
++
;
};
CDocument
.
prototype
.
UnlockPanelStyles
=
function
(
isUpdate
)
{
this
.
TurnOffPanelStyles
=
Math
.
max
(
0
,
this
.
TurnOffPanelStyles
-
1
);
if
(
true
===
isUpdate
)
this
.
Document_UpdateStylesPanel
();
};
CDocument
.
prototype
.
Get_AllParagraphs
=
function
(
Props
)
{
var
ParaArray
=
[];
...
...
This diff is collapsed.
Click to expand it.
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