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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 531fbb4921ea1c69da23ed89880617df5280a8528c32c0ff7b4ed44a2da216f1
|
4
|
+
data.tar.gz: 123bb9f3fcf8329abe3997754180c2f511e65bf2d2b70305f69c7f0f564b8e49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4f7e2af6c9e1993baa425f151cc8fd20b036b513e1b489af15c3c11104ee345e33f478ff5693cfbfa9be32315e9dc50d4ea57905a550483593a6d3d43edd9b8
|
7
|
+
data.tar.gz: 1a90fea9860483d1401af1c086b43eb697fd36dff0f91736459a62c7541438805987d8d08e898f60b135071755a0cb8a5341722b3cd9d46239306fd2516b054f
|
@@ -1,40 +1,40 @@
|
|
1
1
|
function setUpSortables() {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
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
|
-
|
28
|
-
|
29
|
-
|
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
|
-
|
33
|
-
|
32
|
+
$('.droppable').droppable({
|
33
|
+
activeClass: 'droppable-active',
|
34
34
|
hoverClass: 'droppable-hover',
|
35
|
-
|
36
|
-
|
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
|
-
|
72
|
-
|
73
|
-
|
70
|
+
// ==================
|
71
|
+
// Sortable
|
72
|
+
setUpSortables();
|
73
|
+
// ==================
|
74
74
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
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
|
-
|
83
|
+
$("table.grid").each(function(i, grid) {
|
84
84
|
let num_columns = $(grid).find("th").length;
|
85
|
-
|
85
|
+
if (num_columns > 0) {
|
86
86
|
let width = (100 / num_columns) + "%";
|
87
|
-
|
88
|
-
|
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/app/models/fe/question.rb
CHANGED
data/lib/fe/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2024-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|