fe 2.1.3 → 2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d33ad97dceb71023da5ccabf23d67181e5df82544a04bc5d572c34269e7e088
4
- data.tar.gz: 6b91ebbb978a6d40c9b3a788321385dd3dd2d8adc05c1160e21defc4493fa698
3
+ metadata.gz: c2c44e123b4011acc1a3bcec88de8e57c444b3bb29bdae0726b28ffce191535d
4
+ data.tar.gz: bb4223a3158cf7c0f71865c26d9ace3e8c1017342dc25443f04e15eaa6b3a874
5
5
  SHA512:
6
- metadata.gz: ef873fd17595ac279b6b5c4492fe336c8bc3dfa49ce6787e5c63ff6008edb66932b137fffd2163859a81578a7dc25ff4e46d9fdf7bf997a2d55864ff95728c47
7
- data.tar.gz: a273983c1efb0b042643b1063ee9e1c27d74de9d39b03d5156f27cd52050dec0668ccb771686c6166f9641274de4c28777ea5ec99c08672e15671170460aea71
6
+ metadata.gz: 7a1a1e827a8e35c8136e76b0831d611d0e680d6bd9ce2570b8559ba3b1ea00b4abc772bff3426b2a7d9f4606997ef99c506dcdab4f739ca24390465910e8bc66
7
+ data.tar.gz: 3eb967c51430ae55cb2ad680f41157b3aadc2a5c51ade7cf1678c14731d9b1500b9272c19e445db48b204fb9b19d8a4e7f1dc787f871f5e92f086a1b41e8fc18
@@ -1,40 +1,40 @@
1
1
  function setUpSortables() {
2
- $('[data-sortable]').sortable({axis:'y',
3
- items: '> li.sortable',
4
- dropOnEmpty:false,
5
- update: function(event, ui) {
6
- let sortable = this;
7
- $.ajax({data:$(this).sortable('serialize',{key:sortable.id + '[]'}),
8
- complete: function(request) {$(sortable).effect('highlight')},
9
- success:function(request){$('#errors').html(request)},
10
- type:'POST',
11
- url: $(sortable).attr('data-sortable-url')
12
- })
13
- },
14
- stop: function(event, ui) {
15
- let before_dropper = $('li.before-container[data-element_id="'+ui.item.data('element_id'));
16
- if (before_dropper.length > 0) {
17
- before_dropper.detach();
18
- before_dropper.insertBefore(ui.item);
19
- }
20
- let after_dropper = $('li.after-container[data-element_id="'+ui.item.data('element_id'));
21
- if (after_dropper.length > 0) {
22
- after_dropper.detach();
23
- after_dropper.insertAfter(ui.item);
24
- }
2
+ $('[data-sortable]').sortable({axis:'y',
3
+ items: '> li.sortable',
4
+ dropOnEmpty:false,
5
+ update: function(event, ui) {
6
+ let sortable = this;
7
+ $.ajax({data:$(this).sortable('serialize',{key:sortable.id + '[]'}),
8
+ complete: function(request) {$(sortable).effect('highlight')},
9
+ success:function(request){$('#errors').html(request)},
10
+ type:'POST',
11
+ url: $(sortable).attr('data-sortable-url')
12
+ })
13
+ },
14
+ stop: function(event, ui) {
15
+ let before_dropper = $('li.before-container[data-element_id="'+ui.item.data('element_id'));
16
+ if (before_dropper.length > 0) {
17
+ before_dropper.detach();
18
+ before_dropper.insertBefore(ui.item);
25
19
  }
26
- });
27
- $('[data-sortable][data-sortable-handle]').each(function() {
28
- handle = $(this).attr('data-sortable-handle');
29
- $(this).sortable("option", "handle", handle);
30
- });
20
+ let after_dropper = $('li.after-container[data-element_id="'+ui.item.data('element_id'));
21
+ if (after_dropper.length > 0) {
22
+ after_dropper.detach();
23
+ after_dropper.insertAfter(ui.item);
24
+ }
25
+ }
26
+ });
27
+ $('[data-sortable][data-sortable-handle]').each(function() {
28
+ handle = $(this).attr('data-sortable-handle');
29
+ $(this).sortable("option", "handle", handle);
30
+ });
31
31
 
32
- $('.droppable').droppable({
33
- activeClass: 'droppable-active',
32
+ $('.droppable').droppable({
33
+ activeClass: 'droppable-active',
34
34
  hoverClass: 'droppable-hover',
35
- drop: function( event, ui ) {
36
- $.post($(this).attr('data-url'), {draggable_element: ui.draggable.attr('id')}, function() {}, 'script')
37
- },
35
+ drop: function( event, ui ) {
36
+ $.post($(this).attr('data-url'), {draggable_element: ui.draggable.attr('id')}, function() {}, 'script')
37
+ },
38
38
  activate: function( event, ui ) {
39
39
  $draggable = ui.draggable;
40
40
  $container = $draggable.parents("li.element.container")
@@ -53,7 +53,7 @@ function setUpSortables() {
53
53
  $('li.around-container').removeClass('droppable-active');
54
54
  }
55
55
  }
56
- });
56
+ });
57
57
  }
58
58
 
59
59
  function setUpCalendars() {
@@ -67,27 +67,27 @@ function setUpCalendars() {
67
67
  }
68
68
 
69
69
  function setUpJsHelpers() {
70
- // ==================
71
- // Sortable
72
- setUpSortables();
73
- // ==================
70
+ // ==================
71
+ // Sortable
72
+ setUpSortables();
73
+ // ==================
74
74
 
75
- // ==================
76
- // Calendar
77
- setUpCalendars();
78
- // ==================
79
- <% unless Fe.bootstrap %>$(".tip[title], a[title]").tooltip()<% end %>
75
+ // ==================
76
+ // Calendar
77
+ setUpCalendars();
78
+ // ==================
79
+ <% unless Fe.bootstrap %>$(".tip[title], a[title]").tooltip()<% end %>
80
80
  }
81
81
 
82
82
  function fixGridColumnWidths() {
83
- $("table.grid").each(function(i, grid) {
83
+ $("table.grid").each(function(i, grid) {
84
84
  let num_columns = $(grid).find("th").length;
85
- if (num_columns > 0) {
85
+ if (num_columns > 0) {
86
86
  let width = (100 / num_columns) + "%";
87
- $(grid).find("> tbody > tr > th").css("width", width);
88
- $(grid).find("> tbody > tr > td").css("width", width);
89
- }
90
- });
87
+ $(grid).find("> tbody > tr > th").css("width", width);
88
+ $(grid).find("> tbody > tr > td").css("width", width);
89
+ }
90
+ });
91
91
  };
92
92
 
93
93
  function scrollTo(el) {
@@ -96,3 +96,11 @@ function scrollTo(el) {
96
96
  scrollTop: $(el).offset().top
97
97
  }, 1000);
98
98
  }
99
+
100
+ // jQuery 3 has removed $(document).on('ready', ...) in favor of $(document).ready(...). Manually call it from
101
+ // the new method here, so we can avoid changing over all the document ready's.
102
+ $(document).ready(function() {
103
+ if (typeof jQuery == 'function' && parseInt(jQuery.fn.jquery.split(".")[0]) >= 3) {
104
+ $(document).trigger("ready")
105
+ }
106
+ });
data/lib/fe/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Fe
2
- VERSION = "2.1.3"
2
+ VERSION = "2.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fe
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - CruGlobal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-26 00:00:00.000000000 Z
11
+ date: 2024-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails