@finqu/cool 1.1.3 → 1.1.4

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Cool UI collapse.js v1.1.2 (https://finqu.fi)
2
+ * Cool UI collapse.js v1.1.3 (https://finqu.fi)
3
3
  * Copyright 2011-2019 Finqu Oy
4
4
  * Licensed under the ISC license - (http://opensource.org/licenses/ISC)
5
5
  */
package/js/dist/common.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Cool UI common.js v1.1.2 (https://finqu.fi)
2
+ * Cool UI common.js v1.1.3 (https://finqu.fi)
3
3
  * Copyright 2011-2019 Finqu Oy
4
4
  * Licensed under the ISC license - (http://opensource.org/licenses/ISC)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Cool UI dropdown.js v1.1.2 (https://finqu.fi)
2
+ * Cool UI dropdown.js v1.1.3 (https://finqu.fi)
3
3
  * Copyright 2011-2019 Finqu Oy
4
4
  * Licensed under the ISC license - (http://opensource.org/licenses/ISC)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Cool UI popover.js v1.1.2 (https://finqu.fi)
2
+ * Cool UI popover.js v1.1.3 (https://finqu.fi)
3
3
  * Copyright 2011-2019 Finqu Oy
4
4
  * Licensed under the ISC license - (http://opensource.org/licenses/ISC)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Cool UI sectiontabs.js v1.1.2 (https://finqu.fi)
2
+ * Cool UI sectiontabs.js v1.1.3 (https://finqu.fi)
3
3
  * Copyright 2011-2019 Finqu Oy
4
4
  * Licensed under the ISC license - (http://opensource.org/licenses/ISC)
5
5
  */
package/js/dist/select.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Cool UI select.js v1.1.2 (https://finqu.fi)
2
+ * Cool UI select.js v1.1.3 (https://finqu.fi)
3
3
  * Copyright 2011-2019 Finqu Oy
4
4
  * Licensed under the ISC license - (http://opensource.org/licenses/ISC)
5
5
  */
@@ -1663,12 +1663,14 @@
1663
1663
  url: searchUrl
1664
1664
  }).done(function (data) {
1665
1665
  let items = data.map(function (item) {
1666
+ let label = '';
1667
+
1666
1668
  if (item.name) {
1667
- let label = item.name;
1669
+ label = item.name;
1668
1670
  } else if (item.label) {
1669
- let label = item.label;
1671
+ label = item.label;
1670
1672
  } else if (item.value) {
1671
- let label = item.value;
1673
+ label = item.value;
1672
1674
  }
1673
1675
 
1674
1676
  return {
@@ -1761,10 +1763,10 @@
1761
1763
  });
1762
1764
  items = items.filter(function (item) {
1763
1765
  return !(self.data[self.name].indexOf(item.id) > -1);
1764
- }); // Remove 0 id from results
1766
+ }); // Remove id with value 0 from results
1765
1767
 
1766
1768
  items = items.filter(function (item) {
1767
- return [0].indexOf(item.id) > -1;
1769
+ return item.id > 0;
1768
1770
  });
1769
1771
  let result = $(self._renderItemList(items));
1770
1772
  $.when(self.$scrollableContent.append(result)).then(function () {
@@ -1884,18 +1886,18 @@
1884
1886
  }
1885
1887
 
1886
1888
  _renderItemList(items) {
1887
- let html = '';
1889
+ let result = '';
1888
1890
 
1889
1891
  for (let i = 0; i < items.length; ++i) {
1890
- html += `
1892
+ result += `
1891
1893
 
1892
1894
  <div class="select-item">
1893
1895
 
1894
1896
  <div class="select-item-${this.type}">
1895
1897
 
1896
- <div class="styled-${this.type}">">
1898
+ <div class="styled-${this.type}">
1897
1899
 
1898
- <input type="${this.type}">" id="select-${this.name}-${items[i].id}" value="${items[i].id}">
1900
+ <input type="${this.type}" id="select-${this.name}-${items[i].id}" value="${items[i].id}">
1899
1901
 
1900
1902
  <label for="select-${this.name}-${items[i].id}">
1901
1903
 
@@ -1905,7 +1907,7 @@
1905
1907
  </svg>
1906
1908
  </span>
1907
1909
 
1908
- <span class="${this.type}">-label" data-label>
1910
+ <span class="${this.type}-label" data-label>
1909
1911
  ${items[i].label}
1910
1912
  </span>
1911
1913
 
@@ -1919,6 +1921,8 @@
1919
1921
 
1920
1922
  `;
1921
1923
  }
1924
+
1925
+ return result;
1922
1926
  }
1923
1927
 
1924
1928
  _renderSearch() {