nice-elements 1.10.13 → 1.10.14

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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.10.14 (24.10.2024)
4
+
5
+ - fixed tooltip content compile,
6
+ - added nice tooltip disable prop
7
+
3
8
  ## v1.10.13 (24.10.2024)
4
9
 
5
10
  - worked on nice tooltip,
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ![Nice elements](https://github.com/Klemen1337/angularjs-nice-elements/raw/master/demo/assets/logo.png)
2
2
 
3
- # Nice elements v1.10.13
3
+ # Nice elements v1.10.14
4
4
 
5
5
  Nice elements is an AngularJS v1.5.8 module that contains nice form elements like inputs, choice fields, search, toggle, dropdown, etc.
6
6
 
package/bower.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nice-elements",
3
- "version": "1.10.13",
3
+ "version": "1.10.14",
4
4
  "authors": ["Klemen Kastelic <klemen@olaii.com>"],
5
5
  "description": "Nice elements",
6
6
  "keywords": [],
package/dist/nice.js CHANGED
@@ -5599,7 +5599,7 @@ angular.module('niceElements')
5599
5599
  .directive('niceTooltip', function () {
5600
5600
  return {
5601
5601
  restrict: 'A',
5602
- controller: function ($scope, $element, $attrs) {
5602
+ controller: function ($scope, $element, $attrs, $compile) {
5603
5603
  const id = Math.random().toString(36).substring(7);
5604
5604
  const showEvents = ['mouseenter', 'focus'];
5605
5605
  const hideEvents = ['mouseleave', 'blur'];
@@ -5612,9 +5612,8 @@ angular.module('niceElements')
5612
5612
  tooltipWindow.id = 'nice-tooltip-window-' + id;
5613
5613
 
5614
5614
  // Popper body
5615
- const tooltipWindowBody = document.createElement('div');
5616
- tooltipWindowBody.innerHTML = $attrs.niceTooltip;
5617
- tooltipWindow.append(tooltipWindowBody);
5615
+ const content = $compile("<div class='nice-tooltip-body'>" + $attrs.niceTooltip + "</div>")($scope);
5616
+ tooltipWindow.append(content[0]);
5618
5617
 
5619
5618
  // Popper arrow
5620
5619
  const tooltipWindowArrow = document.createElement('div');
@@ -5647,6 +5646,7 @@ angular.module('niceElements')
5647
5646
  });
5648
5647
 
5649
5648
  function show() {
5649
+ if ($attrs.niceTooltipDisabled == true || $attrs.niceTooltipDisabled == "true") return;
5650
5650
  tooltipWindow.setAttribute('data-show', '');
5651
5651
  popper.update();
5652
5652
  }
@@ -6036,7 +6036,7 @@ angular.module('niceElements')
6036
6036
  .service('NiceService', function ($rootScope) {
6037
6037
  var service = {
6038
6038
  name: "Nice elements",
6039
- version: "1.10.12",
6039
+ version: "1.10.13",
6040
6040
  getHeader: function () {
6041
6041
  return {};
6042
6042
  },