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
72f281ab
Commit
72f281ab
authored
Aug 03, 2016
by
Maxim Kadushkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactoring of ComboBoxFonts
parent
d1ea727e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
apps/common/main/lib/component/ComboBox.js
apps/common/main/lib/component/ComboBox.js
+3
-2
apps/common/main/lib/component/ComboBoxFonts.js
apps/common/main/lib/component/ComboBoxFonts.js
+7
-2
No files found.
apps/common/main/lib/component/ComboBox.js
View file @
72f281ab
...
...
@@ -188,12 +188,13 @@ define([
Common
.
NotificationCenter
.
on
(
'
menumanager:hideall
'
,
_
.
bind
(
me
.
closeMenu
,
me
));
this
.
scroller
=
new
Common
.
UI
.
Scroller
({
this
.
scroller
=
new
Common
.
UI
.
Scroller
(
_
.
extend
({
el
:
$
(
'
.dropdown-menu
'
,
me
.
cmpEl
),
minScrollbarLength
:
40
,
scrollYMarginOffset
:
30
,
includePadding
:
true
});
}
,
this
.
options
.
scroller
)
);
// set default selection
this
.
setDefaultSelection
();
...
...
apps/common/main/lib/component/ComboBoxFonts.js
View file @
72f281ab
...
...
@@ -86,10 +86,13 @@ define([
initialize
:
function
(
options
)
{
Common
.
UI
.
ComboBox
.
prototype
.
initialize
.
call
(
this
,
_
.
extend
(
options
,
{
displayField
:
'
name
'
,
scroller
:
{
alwaysVisibleY
:
true
,
onChange
:
this
.
updateVisibleFontsTiles
.
bind
(
this
)
}
}));
this
.
recent
=
_
.
isNumber
(
options
.
recent
)
?
options
.
recent
:
3
;
this
.
bindUpdateVisibleFontsTiles
=
_
.
bind
(
this
.
updateVisibleFontsTiles
,
this
);
Common
.
NotificationCenter
.
on
(
'
fonts:change
'
,
_
.
bind
(
this
.
onApiChangeFont
,
this
));
Common
.
NotificationCenter
.
on
(
'
fonts:load
'
,
_
.
bind
(
this
.
fillFonts
,
this
));
...
...
@@ -109,7 +112,9 @@ define([
this
.
_input
.
on
(
'
keyup
'
,
_
.
bind
(
this
.
onInputKeyUp
,
this
));
this
.
_input
.
on
(
'
keydown
'
,
_
.
bind
(
this
.
onInputKeyDown
,
this
));
this
.
scroller
.
update
({
alwaysVisibleY
:
true
,
onChange
:
this
.
bindUpdateVisibleFontsTiles
});
setTimeout
(
function
(
me
){
me
.
scroller
.
update
();
},
30
,
this
);
return
this
;
},
...
...
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