Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
web-apps
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
web-apps
Commits
3e82cb1a
Commit
3e82cb1a
authored
Aug 04, 2016
by
Maxim Kadushkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delayed load for the menu of some buttons
parent
e719bb3f
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
310 additions
and
242 deletions
+310
-242
apps/common/main/lib/component/Button.js
apps/common/main/lib/component/Button.js
+8
-1
apps/documenteditor/main/app/controller/Main.js
apps/documenteditor/main/app/controller/Main.js
+1
-1
apps/documenteditor/main/app/controller/Toolbar.js
apps/documenteditor/main/app/controller/Toolbar.js
+6
-1
apps/documenteditor/main/app/view/Toolbar.js
apps/documenteditor/main/app/view/Toolbar.js
+295
-239
No files found.
apps/common/main/lib/component/Button.js
View file @
3e82cb1a
...
...
@@ -218,7 +218,7 @@ define([
style
:
me
.
style
}));
if
(
me
.
menu
&&
_
.
isFunction
(
me
.
menu
.
render
))
if
(
me
.
menu
&&
_
.
is
Object
(
me
.
menu
)
&&
_
.
is
Function
(
me
.
menu
.
render
))
me
.
menu
.
render
(
me
.
cmpEl
);
parentEl
.
html
(
me
.
cmpEl
);
...
...
@@ -491,6 +491,13 @@ define([
}
}
}
,
setMenu
:
function
(
m
)
{
if
(
m
&&
_
.
isObject
(
m
)
&&
_
.
isFunction
(
m
.
render
)){
this
.
menu
=
m
;
this
.
menu
.
render
(
this
.
cmpEl
);
}
}
});
});
apps/documenteditor/main/app/controller/Main.js
View file @
3e82cb1a
...
...
@@ -850,7 +850,7 @@ define([
if
(
window
.
styles_loaded
)
{
clearInterval
(
timer_sl
);
toolbarController
.
getView
(
'
Toolbar
'
).
createDelayedElements
();
toolbarController
.
createDelayedElements
();
documentHolderController
.
getView
(
'
DocumentHolder
'
).
createDelayedElements
();
me
.
loadLanguages
();
...
...
apps/documenteditor/main/app/controller/Toolbar.js
View file @
3e82cb1a
...
...
@@ -166,7 +166,7 @@ define([
// Create toolbar view
this
.
toolbar
=
this
.
createView
(
'
Toolbar
'
);
this
.
toolbar
.
on
(
'
render:after
'
,
_
.
bind
(
this
.
onToolbarAfterRender
,
this
));
//
this.toolbar.on('render:after', _.bind(this.onToolbarAfterRender, this));
},
onToolbarAfterRender
:
function
(
toolbar
)
{
...
...
@@ -2627,6 +2627,11 @@ define([
me
.
_mailMergeDlg
.
show
();
},
createDelayedElements
:
function
()
{
this
.
toolbar
.
createDelayedElements
();
this
.
onToolbarAfterRender
(
this
.
toolbar
);
},
textEmptyImgUrl
:
'
You need to specify image URL.
'
,
textWarning
:
'
Warning
'
,
textFontSizeErr
:
'
The entered value is incorrect.<br>Please enter a numeric value between 1 and 100
'
,
...
...
apps/documenteditor/main/app/view/Toolbar.js
View file @
3e82cb1a
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