mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-05 04:03:45 +08:00
Added use of constants in JS [SCI-530]
This commit is contained in:
parent
37cff75013
commit
c6fb57318f
2 changed files with 4 additions and 2 deletions
|
@ -182,7 +182,7 @@ var Comments = (function() {
|
|||
var parentTopPos = $el.offset().top;
|
||||
if (leftPos + menu.width() > $(window).width()) {
|
||||
menu.offset({ left: leftPos - menu.width(),
|
||||
top: (parentTopPos + 20)});
|
||||
top: (parentTopPos + <%= DROPDOWN_TOP_OFFSET %>)});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -208,7 +208,7 @@ var Comments = (function() {
|
|||
var $el = $(el);
|
||||
var offset = useParentOffset ? $el.offset().top : $el.position().top;
|
||||
$el.find('.dropdown-menu-fixed')
|
||||
.offset({ top: (offset + 20) });
|
||||
.offset({ top: (offset + <%= DROPDOWN_TOP_OFFSET %>) });
|
||||
});
|
||||
}
|
||||
|
|
@ -40,6 +40,8 @@ FILE_MAX_SIZE = 50
|
|||
AVATAR_MAX_SIZE = 0.2
|
||||
# Max characters for text in dropdown list
|
||||
DROPDOWN_TEXT_MAX_LENGTH = 15
|
||||
# Dropdown top offset from the parent
|
||||
DROPDOWN_TOP_OFFSET = 20
|
||||
|
||||
SEARCH_LIMIT = 20
|
||||
|
||||
|
|
Loading…
Reference in a new issue