@finqu/cool 1.2.24 → 1.2.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/js/cool.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Cool UI v1.2.22 (https://finqu.fi)
2
+ * Cool UI v1.2.26 (https://finqu.fi)
3
3
  * Copyright 2011-2020 Finqu Oy
4
4
  * Licensed under the ISC license - (http://opensource.org/licenses/ISC)
5
5
  */
@@ -3309,7 +3309,7 @@
3309
3309
 
3310
3310
  if (typeof this.content === 'function') {
3311
3311
  var menuRight = this.opts.align === 'end' ? ' dropdown-menu-right' : '';
3312
- this.$dropdown = $("\n <div class=\"dropdown-menu" + menuRight + "\" id=\"" + this.id + "\">\n " + this.content + "\n </div>\n ");
3312
+ this.$dropdown = $("\n <div class=\"dropdown-menu" + menuRight + "\" id=\"" + this.id + "\">\n " + this.content() + "\n </div>\n ");
3313
3313
  $.when(this.$el.after(this.$dropdown)).then(function () {
3314
3314
  _this3.$scrollableContent = _this3.$dropdown.find('.dropdown-scrollable-content') ? _this3.$dropdown.find('.dropdown-scrollable-content') : false;
3315
3315
  _this3.$dropdown.hasClass('dropdown-menu-right') ? _this3.align = 'end' : _this3.align = 'start';
@@ -4268,13 +4268,21 @@
4268
4268
  ;
4269
4269
 
4270
4270
  _proto.moveToList = function moveToList(el) {
4271
- $(el).insertBefore(this.$dropdownContainer);
4271
+ var $el = $(el);
4272
+ $el.removeClass('dropdown-item');
4273
+ $el.insertBefore(this.$dropdownContainer);
4272
4274
  this.checkForChanges();
4273
4275
  } // Move to dropdown
4274
4276
  ;
4275
4277
 
4276
4278
  _proto.moveToDropdown = function moveToDropdown(el) {
4277
- $(el).appendTo(this.$dropdownList);
4279
+ var $el = $(el);
4280
+
4281
+ if (!$el.hasClass('dropdown-item')) {
4282
+ $el.addClass('dropdown-item');
4283
+ }
4284
+
4285
+ $el.appendTo(this.$dropdownList);
4278
4286
  this.checkForChanges();
4279
4287
  } // Overflow status
4280
4288
  ;