aboutsummaryrefslogtreecommitdiff
path: root/js/src
diff options
context:
space:
mode:
Diffstat (limited to 'js/src')
-rw-r--r--js/src/dropdown.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/js/src/dropdown.js b/js/src/dropdown.js
index 18b051b89..45d061c93 100644
--- a/js/src/dropdown.js
+++ b/js/src/dropdown.js
@@ -55,6 +55,8 @@ const Dropdown = (($) => {
DISABLED : 'disabled',
SHOW : 'show',
DROPUP : 'dropup',
+ DROPRIGHT : 'dropright',
+ DROPLEFT : 'dropleft',
MENURIGHT : 'dropdown-menu-right',
MENULEFT : 'dropdown-menu-left'
}
@@ -71,7 +73,11 @@ const Dropdown = (($) => {
TOP : 'top-start',
TOPEND : 'top-end',
BOTTOM : 'bottom-start',
- BOTTOMEND : 'bottom-end'
+ BOTTOMEND : 'bottom-end',
+ RIGHT : 'right-start',
+ RIGHTEND : 'right-end',
+ LEFT : 'left-start',
+ LEFTEND : 'left-end'
}
const Default = {
@@ -227,7 +233,7 @@ const Dropdown = (($) => {
_getPlacement() {
const $parentDropdown = $(this._element).parent()
- let placement = AttachmentMap.BOTTOM
+ let placement = AttachmentMap.BOTTOM
// Handle dropup
if ($parentDropdown.hasClass(ClassName.DROPUP)) {
@@ -235,6 +241,10 @@ const Dropdown = (($) => {
if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
placement = AttachmentMap.TOPEND
}
+ } else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) {
+ placement = AttachmentMap.RIGHT
+ } else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) {
+ placement = AttachmentMap.LEFT
} else if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
placement = AttachmentMap.BOTTOMEND
}