Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/dist/dropdown.js')
-rw-r--r--js/dist/dropdown.js28
1 files changed, 11 insertions, 17 deletions
diff --git a/js/dist/dropdown.js b/js/dist/dropdown.js
index 39096759c6..9e53c88290 100644
--- a/js/dist/dropdown.js
+++ b/js/dist/dropdown.js
@@ -78,23 +78,21 @@ var Dropdown = function () {
};
var Default = {
- placement: AttachmentMap.BOTTOM,
offset: 0,
flip: true
};
var DefaultType = {
- placement: 'string',
offset: '(number|string)',
flip: 'boolean'
+ };
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- };
var Dropdown = function () {
function Dropdown(element, config) {
_classCallCheck(this, Dropdown);
@@ -201,11 +199,6 @@ var Dropdown = function () {
}, {
key: '_getConfig',
value: function _getConfig(config) {
- var elementData = $(this._element).data();
- if (typeof elementData.placement !== 'undefined') {
- elementData.placement = AttachmentMap[elementData.placement.toUpperCase()];
- }
-
config = $.extend({}, this.constructor.Default, $(this._element).data(), config);
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
@@ -225,10 +218,10 @@ var Dropdown = function () {
key: '_getPlacement',
value: function _getPlacement() {
var $parentDropdown = $(this._element).parent();
- var placement = this._config.placement;
+ var placement = AttachmentMap.BOTTOM;
// Handle dropup
- if ($parentDropdown.hasClass(ClassName.DROPUP) || this._config.placement === AttachmentMap.TOP) {
+ if ($parentDropdown.hasClass(ClassName.DROPUP)) {
placement = AttachmentMap.TOP;
if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
placement = AttachmentMap.TOPEND;
@@ -256,9 +249,10 @@ var Dropdown = function () {
enabled: this._config.flip
}
}
+ };
- // Disable Popper.js for Dropdown in Navbar
- };if (this._inNavbar) {
+ // Disable Popper.js for Dropdown in Navbar
+ if (this._inNavbar) {
popperConfig.modifiers.applyStyle = {
enabled: !this._inNavbar
};