fe 2.1.3 → 2.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d33ad97dceb71023da5ccabf23d67181e5df82544a04bc5d572c34269e7e088
4
- data.tar.gz: 6b91ebbb978a6d40c9b3a788321385dd3dd2d8adc05c1160e21defc4493fa698
3
+ metadata.gz: 531fbb4921ea1c69da23ed89880617df5280a8528c32c0ff7b4ed44a2da216f1
4
+ data.tar.gz: 123bb9f3fcf8329abe3997754180c2f511e65bf2d2b70305f69c7f0f564b8e49
5
5
  SHA512:
6
- metadata.gz: ef873fd17595ac279b6b5c4492fe336c8bc3dfa49ce6787e5c63ff6008edb66932b137fffd2163859a81578a7dc25ff4e46d9fdf7bf997a2d55864ff95728c47
7
- data.tar.gz: a273983c1efb0b042643b1063ee9e1c27d74de9d39b03d5156f27cd52050dec0668ccb771686c6166f9641274de4c28777ea5ec99c08672e15671170460aea71
6
+ metadata.gz: e4f7e2af6c9e1993baa425f151cc8fd20b036b513e1b489af15c3c11104ee345e33f478ff5693cfbfa9be32315e9dc50d4ea57905a550483593a6d3d43edd9b8
7
+ data.tar.gz: 1a90fea9860483d1401af1c086b43eb697fd36dff0f91736459a62c7541438805987d8d08e898f60b135071755a0cb8a5341722b3cd9d46239306fd2516b054f
@@ -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
+ });
@@ -1,6 +1,6 @@
1
1
  class Fe::Admin::EmailTemplatesController < ApplicationController
2
2
  before_action :check_valid_user
3
- layout 'fe/fe.admin'
3
+ layout 'fe/fe_admin'
4
4
 
5
5
  def index
6
6
  @email_templates = Fe::EmailTemplate.order('name')
@@ -98,7 +98,7 @@ module Fe
98
98
  # Relationship & Country & Email Address
99
99
  return false
100
100
  else
101
- return answer_sheet.frozen? && !presenter.reference? &&
101
+ return answer_sheet.frozen? && !presenter&.reference? &&
102
102
  !@answer_sheet.try(:reference?)
103
103
  end
104
104
  end
data/lib/fe/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Fe
2
- VERSION = "2.1.3"
2
+ VERSION = "2.1.5"
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.5
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-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails