swop 0.1.0 → 1.0.0
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 +4 -4
- data/README.md +47 -9
- data/app/assets/images/swop/favicon.ico +0 -0
- data/app/assets/stylesheets/rails_admin/application.scss.erb +11 -34
- data/app/assets/stylesheets/{rails_admin/custom/base/base.scss → swop/swop-base/swop-base.scss} +1 -1
- data/app/assets/stylesheets/swop/swop-base/swop-typography.scss +11 -0
- data/app/assets/stylesheets/swop/swop-colors/swop-colors.scss +2 -0
- data/app/assets/stylesheets/swop/swop-core/swop-bootstrap-variables.scss +172 -0
- data/app/assets/stylesheets/{rails_admin/custom/base/mixins.scss → swop/swop-core/swop-mixins.scss} +0 -16
- data/app/assets/stylesheets/swop/swop-core/swop-variables.scss +34 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-base/swop-base.scss +3 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-base/swop-main.scss +25 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-base/swop-typography.scss +4 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-colors/swop-amethyst.scss +29 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-colors/swop-dark.scss +29 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-colors/swop-forest.scss +29 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-colors/swop-light.scss +29 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-colors/swop-royal.scss +29 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-components/swop-alerts.scss +12 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-components/swop-badges.scss +31 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-components/swop-buttons.scss +133 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-components/swop-dropdowns.scss +26 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-components/swop-filters.scss +57 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-components/swop-forms.scss +158 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-components/swop-images.scss +31 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-components/swop-input-groups.scss +18 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-components/swop-loading.scss +14 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-components/swop-navbar.scss +15 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-components/swop-navs.scss +77 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-components/swop-offcanvas.scss +64 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-components/swop-pagination.scss +21 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-components/swop-progress.scss +3 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-components/swop-sidebars.scss +49 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-components/swop-tables.scss +82 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-components/swop-tiles.scss +20 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-core/swop-bootstrap-variables.scss +149 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-core/swop-variables.scss +41 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-layouts/swop-containers.scss +24 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-layouts/swop-header.scss +15 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-simple-amethyst.scss +35 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-simple-base.scss +3 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-simple-components.scss +17 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-simple-dark.scss +35 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-simple-forest.scss +35 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-simple-layouts.scss +2 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-simple-light.scss +35 -0
- data/app/assets/stylesheets/swop/swop-themes/swop-simple/swop-simple-royal.scss +35 -0
- data/app/assets/stylesheets/swop/swop.scss +8 -0
- data/app/views/kaminari/ra-twitter-bootstrap/_next_page.html.erb +7 -0
- data/app/views/kaminari/ra-twitter-bootstrap/_prev_page.html.erb +5 -0
- data/app/views/kaminari/ra-twitter-bootstrap/default/_next_page.html.erb +9 -0
- data/app/views/kaminari/ra-twitter-bootstrap/default/_prev_page.html.erb +9 -0
- data/app/views/kaminari/ra-twitter-bootstrap/swop-simple/_next_page.html.erb +9 -0
- data/app/views/kaminari/ra-twitter-bootstrap/swop-simple/_prev_page.html.erb +9 -0
- data/app/views/layouts/rails_admin/_head.html.erb +5 -0
- data/app/views/layouts/rails_admin/_sidebar_navigation.html.erb +5 -1
- data/app/views/layouts/rails_admin/application.html.erb +5 -24
- data/app/views/layouts/rails_admin/content.html.erb +4 -56
- data/app/views/layouts/rails_admin/default/_application.html.erb +27 -0
- data/app/views/layouts/rails_admin/default/_content.html.erb +22 -0
- data/app/views/layouts/rails_admin/default/_head.html.erb +32 -0
- data/app/views/layouts/rails_admin/default/_sidebar_navigation.html.erb +5 -0
- data/app/views/layouts/rails_admin/swop-simple/_application.html.erb +17 -0
- data/app/views/layouts/rails_admin/swop-simple/_content.html.erb +41 -0
- data/app/views/layouts/rails_admin/swop-simple/_head.html.erb +42 -0
- data/app/views/layouts/rails_admin/swop-simple/_sidebar_navigation.html.erb +12 -0
- data/app/views/rails_admin/main/_delete_notice.html.erb +7 -0
- data/app/views/rails_admin/main/default/_delete.html.erb +21 -0
- data/app/views/rails_admin/main/default/_delete_notice.html.erb +34 -0
- data/app/views/rails_admin/main/default/_edit.html.erb +3 -0
- data/app/views/rails_admin/main/default/_export.html.erb +149 -0
- data/app/views/rails_admin/main/default/_history.html.erb +80 -0
- data/app/views/rails_admin/main/default/_index.html.erb +184 -0
- data/app/views/rails_admin/main/default/_new.html.erb +3 -0
- data/app/views/rails_admin/main/default/_show.html.erb +30 -0
- data/app/views/rails_admin/main/delete.html.erb +5 -19
- data/app/views/rails_admin/main/edit.html.erb +5 -5
- data/app/views/rails_admin/main/export.html.erb +5 -128
- data/app/views/rails_admin/main/history.html.erb +5 -0
- data/app/views/rails_admin/main/index.html.erb +4 -169
- data/app/views/rails_admin/main/new.html.erb +5 -5
- data/app/views/rails_admin/main/show.html.erb +5 -28
- data/app/views/rails_admin/main/swop-simple/_delete.html.erb +11 -0
- data/app/views/rails_admin/main/swop-simple/_delete_notice.html.erb +23 -0
- data/app/views/rails_admin/main/swop-simple/_edit.html.erb +3 -0
- data/app/views/rails_admin/main/swop-simple/_export.html.erb +90 -0
- data/app/views/rails_admin/main/swop-simple/_history.html.erb +80 -0
- data/app/views/rails_admin/main/swop-simple/_index.html.erb +169 -0
- data/app/views/rails_admin/main/swop-simple/_new.html.erb +3 -0
- data/app/views/rails_admin/main/swop-simple/_show.html.erb +18 -0
- data/lib/swop/engine.rb +8 -3
- data/lib/swop/railtie.rb +7 -0
- data/lib/swop/version.rb +1 -1
- data/lib/swop.rb +20 -1
- metadata +101 -84
- data/CHANGELOG.md +0 -5
- data/CODE_OF_CONDUCT.md +0 -132
- data/LICENSE +0 -201
- data/Rakefile +0 -4
- data/app/assets/javascripts/rails_admin/application.js.erb +0 -32
- data/app/assets/javascripts/rails_admin/custom/filtering-select.js +0 -304
- data/app/assets/javascripts/rails_admin/custom/sidescroll.js +0 -20
- data/app/assets/javascripts/rails_admin/custom/ui.js +0 -11
- data/app/assets/stylesheets/rails_admin/custom/base/bootstrap-variables.scss +0 -196
- data/app/assets/stylesheets/rails_admin/custom/base/typography.scss +0 -16
- data/app/assets/stylesheets/rails_admin/custom/base/variables.scss +0 -86
- data/app/assets/stylesheets/rails_admin/custom/components/breadcrumbs.scss +0 -18
- data/app/assets/stylesheets/rails_admin/custom/components/buttons.scss +0 -55
- data/app/assets/stylesheets/rails_admin/custom/components/dropdowns.scss +0 -40
- data/app/assets/stylesheets/rails_admin/custom/components/filtering-select.scss +0 -43
- data/app/assets/stylesheets/rails_admin/custom/components/forms.scss +0 -25
- data/app/assets/stylesheets/rails_admin/custom/components/images.scss +0 -21
- data/app/assets/stylesheets/rails_admin/custom/components/navbar.scss +0 -18
- data/app/assets/stylesheets/rails_admin/custom/components/navs.scss +0 -28
- data/app/assets/stylesheets/rails_admin/custom/components/offcanvas.scss +0 -18
- data/app/assets/stylesheets/rails_admin/custom/components/progress.scss +0 -11
- data/app/assets/stylesheets/rails_admin/custom/components/sidebar.scss +0 -115
- data/app/assets/stylesheets/rails_admin/custom/components/table.scss +0 -59
- data/app/assets/stylesheets/rails_admin/custom/components/tiles.scss +0 -20
- data/app/assets/stylesheets/rails_admin/custom/layouts/body.scss +0 -10
- data/app/assets/stylesheets/rails_admin/custom/layouts/containers.scss +0 -31
- data/app/helpers/rails_admin/application_helper.rb +0 -270
- data/app/views/layouts/rails_admin/custom/_nav.html.erb +0 -10
- data/app/views/rails_admin/main/_submit_buttons.html.erb +0 -25
- data/app/views/rails_admin/main/dashboard.html.erb +0 -70
- data/sig/swop.rbs +0 -4
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
import jQuery from "jquery";
|
|
2
|
-
import "jquery-ui/ui/widget.js";
|
|
3
|
-
import "jquery-ui/ui/widgets/autocomplete.js";
|
|
4
|
-
import I18n from "./i18n";
|
|
5
|
-
|
|
6
|
-
(function ($) {
|
|
7
|
-
"use strict";
|
|
8
|
-
|
|
9
|
-
$.widget("ra.filteringSelect", $.ra.abstractSelect, {
|
|
10
|
-
options: {
|
|
11
|
-
minLength: 0,
|
|
12
|
-
searchDelay: 200,
|
|
13
|
-
remote_source: null,
|
|
14
|
-
source: null,
|
|
15
|
-
xhr: false,
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
button: null,
|
|
19
|
-
input: null,
|
|
20
|
-
select: null,
|
|
21
|
-
filtering_select: null,
|
|
22
|
-
|
|
23
|
-
_create: function () {
|
|
24
|
-
this.filtering_select = this.element.siblings(
|
|
25
|
-
'[data-input-for="' + this.element.attr("id") + '"]'
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
// When using the browser back and forward buttons, it is possible that
|
|
29
|
-
// the autocomplete field will be cached which causes duplicate fields
|
|
30
|
-
// to be generated.
|
|
31
|
-
if (this.filtering_select.length > 0) {
|
|
32
|
-
this.input = this.filtering_select.children("input");
|
|
33
|
-
this.button = this.filtering_select.children(".input-group-btn");
|
|
34
|
-
} else {
|
|
35
|
-
this.element.hide();
|
|
36
|
-
this.filtering_select = this._inputGroup(this.element.attr("id"));
|
|
37
|
-
this.input = this._inputField();
|
|
38
|
-
this.button = this._buttonField();
|
|
39
|
-
}
|
|
40
|
-
this.clearOption = $('<span></span>').append(
|
|
41
|
-
'<i class="fas fa-times me-2"></i> ' +
|
|
42
|
-
$('<span></span>').text(I18n.t("clear")).html()
|
|
43
|
-
);
|
|
44
|
-
this.noObjectsPlaceholder = $('<option disabled="disabled" />').text(
|
|
45
|
-
I18n.t("no_objects")
|
|
46
|
-
);
|
|
47
|
-
|
|
48
|
-
this._setOptionsSource();
|
|
49
|
-
this._initAutocomplete();
|
|
50
|
-
this._initKeyEvent();
|
|
51
|
-
this._overloadRenderItem();
|
|
52
|
-
this._autocompleteDropdownEvent(this.button);
|
|
53
|
-
|
|
54
|
-
return this.filtering_select
|
|
55
|
-
.append(this.input)
|
|
56
|
-
.append(this.button)
|
|
57
|
-
.insertAfter(this.element);
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
_getResultSet: function (request, data, xhr) {
|
|
61
|
-
var matcher = new RegExp(
|
|
62
|
-
$.ui.autocomplete.escapeRegex(request.term),
|
|
63
|
-
"i"
|
|
64
|
-
);
|
|
65
|
-
|
|
66
|
-
var spannedContent = function (content) {
|
|
67
|
-
return $("<span>").text(content).html();
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
var highlighter = function (label, word) {
|
|
71
|
-
if (word.length) {
|
|
72
|
-
return $.map(label.split(word), function (el) {
|
|
73
|
-
return spannedContent(el);
|
|
74
|
-
}).join($("<strong>").text(word)[0].outerHTML);
|
|
75
|
-
} else {
|
|
76
|
-
return spannedContent(label);
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
var matches = $.map(data, function (el) {
|
|
81
|
-
var id = el.id || el.value;
|
|
82
|
-
var value = el.label || el.id;
|
|
83
|
-
// match regexp only for local requests, remote ones are already
|
|
84
|
-
// filtered, and label may not contain filtered term.
|
|
85
|
-
if (id && (xhr || matcher.test(el.label))) {
|
|
86
|
-
return {
|
|
87
|
-
html: highlighter(value, request.term),
|
|
88
|
-
value: value,
|
|
89
|
-
id: id,
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
if (request.term.length === 0 && !this.input.attr("required")) {
|
|
95
|
-
return [{ html: this.clearOption, value: null, id: null }].concat(
|
|
96
|
-
matches
|
|
97
|
-
);
|
|
98
|
-
} else if (matches.length === 0) {
|
|
99
|
-
return [{ html: this.noObjectsPlaceholder, value: null, id: null }];
|
|
100
|
-
} else {
|
|
101
|
-
return matches;
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
_getSourceFunction: function (source) {
|
|
106
|
-
var self = this;
|
|
107
|
-
var requestIndex = 0;
|
|
108
|
-
|
|
109
|
-
if ($.isArray(source)) {
|
|
110
|
-
return function (request, response) {
|
|
111
|
-
response(self._getResultSet(request, source, false));
|
|
112
|
-
};
|
|
113
|
-
} else if (typeof source === "string") {
|
|
114
|
-
return function (request, response) {
|
|
115
|
-
if (this.xhr) {
|
|
116
|
-
this.xhr.abort();
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
this.xhr = $.ajax({
|
|
120
|
-
url: source,
|
|
121
|
-
data: self.options.createQuery(request.term),
|
|
122
|
-
dataType: "json",
|
|
123
|
-
autocompleteRequest: ++requestIndex,
|
|
124
|
-
success: function (data, status) {
|
|
125
|
-
if (this.autocompleteRequest === requestIndex) {
|
|
126
|
-
response(self._getResultSet(request, data, true));
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
error: function () {
|
|
130
|
-
if (this.autocompleteRequest === requestIndex) {
|
|
131
|
-
response([]);
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
});
|
|
135
|
-
};
|
|
136
|
-
} else {
|
|
137
|
-
return source;
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
|
|
141
|
-
_setOptionsSource: function () {
|
|
142
|
-
if (this.options.xhr) {
|
|
143
|
-
this.options.source = this.options.remote_source;
|
|
144
|
-
} else {
|
|
145
|
-
this.options.source = this.element
|
|
146
|
-
.children("option")
|
|
147
|
-
.map(function () {
|
|
148
|
-
return { label: $(this).text(), value: this.value };
|
|
149
|
-
})
|
|
150
|
-
.toArray();
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
|
|
154
|
-
_buttonField: function () {
|
|
155
|
-
return $(
|
|
156
|
-
'<div class="input-group-btn btn btn-white dropdown-toggle">' +
|
|
157
|
-
"</div>"
|
|
158
|
-
);
|
|
159
|
-
},
|
|
160
|
-
|
|
161
|
-
_autocompleteDropdownEvent: function (element) {
|
|
162
|
-
var self = this;
|
|
163
|
-
|
|
164
|
-
return element.click(function () {
|
|
165
|
-
// close if already visible
|
|
166
|
-
if (self.input.autocomplete("widget").is(":visible")) {
|
|
167
|
-
self.input.autocomplete("close");
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
// pass empty string as value to search for, displaying all results
|
|
172
|
-
self.input.autocomplete("search", "");
|
|
173
|
-
self.input.focus();
|
|
174
|
-
});
|
|
175
|
-
},
|
|
176
|
-
|
|
177
|
-
_inputField: function () {
|
|
178
|
-
var input;
|
|
179
|
-
var selected = this.element.children(":selected");
|
|
180
|
-
var value = selected.val() ? selected.text() : "";
|
|
181
|
-
|
|
182
|
-
input = $('<input type="text">')
|
|
183
|
-
.val(value)
|
|
184
|
-
.addClass("form-control ra-filtering-select-input")
|
|
185
|
-
.attr("style", this.element.attr("style"))
|
|
186
|
-
.show();
|
|
187
|
-
|
|
188
|
-
if (this.element.attr("placeholder")) {
|
|
189
|
-
input.attr("placeholder", this.element.attr("placeholder"));
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
if (this.element.attr("required")) {
|
|
193
|
-
input.attr("required", this.element.attr("required"));
|
|
194
|
-
this.element.attr("required", false);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
return input;
|
|
198
|
-
},
|
|
199
|
-
|
|
200
|
-
_inputGroup: function (inputFor) {
|
|
201
|
-
return $("<div>")
|
|
202
|
-
.addClass("input-group filtering-select")
|
|
203
|
-
.attr("data-input-for", inputFor);
|
|
204
|
-
},
|
|
205
|
-
|
|
206
|
-
_initAutocomplete: function () {
|
|
207
|
-
var self = this;
|
|
208
|
-
|
|
209
|
-
return this.input.autocomplete({
|
|
210
|
-
delay: this.options.searchDelay,
|
|
211
|
-
minLength: this.options.minLength,
|
|
212
|
-
source: this._getSourceFunction(this.options.source),
|
|
213
|
-
select: function (event, ui) {
|
|
214
|
-
var option = self.element.find(
|
|
215
|
-
`option[value="${CSS.escape(ui.item.id)}"]`
|
|
216
|
-
);
|
|
217
|
-
self.element.find("option[selected]").attr("selected", false);
|
|
218
|
-
if (option.length > 0) {
|
|
219
|
-
option.attr("selected", "selected");
|
|
220
|
-
} else {
|
|
221
|
-
option = $("<option>")
|
|
222
|
-
.attr("value", ui.item.id)
|
|
223
|
-
.attr("selected", true)
|
|
224
|
-
.text(ui.item.value);
|
|
225
|
-
self.element.append(option);
|
|
226
|
-
}
|
|
227
|
-
self.element.trigger("change", ui.item.id);
|
|
228
|
-
self._trigger("selected", event, {
|
|
229
|
-
item: option,
|
|
230
|
-
});
|
|
231
|
-
$(self.element.parents(".controls")[0])
|
|
232
|
-
.find(".update")
|
|
233
|
-
.removeClass("disabled");
|
|
234
|
-
},
|
|
235
|
-
change: function (event, ui) {
|
|
236
|
-
if (ui.item) {
|
|
237
|
-
return;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
var matcher = new RegExp(
|
|
241
|
-
"^" + $.ui.autocomplete.escapeRegex($(this).val()) + "$",
|
|
242
|
-
"i"
|
|
243
|
-
);
|
|
244
|
-
var valid = false;
|
|
245
|
-
|
|
246
|
-
self.element.children("option").each(function () {
|
|
247
|
-
if ($(this).text().match(matcher)) {
|
|
248
|
-
valid = true;
|
|
249
|
-
return false;
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
|
-
|
|
253
|
-
if (valid || $(this).val() !== "") {
|
|
254
|
-
return;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
// remove invalid value, as it didn't match anything
|
|
258
|
-
$(this).val(null);
|
|
259
|
-
self.element.html(
|
|
260
|
-
$('<option value="" selected="selected"></option>')
|
|
261
|
-
);
|
|
262
|
-
self.input.data("ui-autocomplete").term = "";
|
|
263
|
-
$(self.element.parents(".controls")[0])
|
|
264
|
-
.find(".update")
|
|
265
|
-
.addClass("disabled");
|
|
266
|
-
return false;
|
|
267
|
-
},
|
|
268
|
-
});
|
|
269
|
-
},
|
|
270
|
-
|
|
271
|
-
_initKeyEvent: function () {
|
|
272
|
-
var self = this;
|
|
273
|
-
|
|
274
|
-
return this.input.keyup(function () {
|
|
275
|
-
if ($(this).val().length) {
|
|
276
|
-
return;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
/* Clear select options and trigger change if selected item is deleted */
|
|
280
|
-
return self.element
|
|
281
|
-
.html($('<option value="" selected="selected"></option>'))
|
|
282
|
-
.trigger("change");
|
|
283
|
-
});
|
|
284
|
-
},
|
|
285
|
-
|
|
286
|
-
_overloadRenderItem: function () {
|
|
287
|
-
this.input.data("ui-autocomplete")._renderItem = function (ul, item) {
|
|
288
|
-
return $("<li></li>")
|
|
289
|
-
.data("ui-autocomplete-item", item)
|
|
290
|
-
.append($("<a></a>").html(item.html || item.id))
|
|
291
|
-
.appendTo(ul);
|
|
292
|
-
};
|
|
293
|
-
},
|
|
294
|
-
|
|
295
|
-
destroy: function () {
|
|
296
|
-
this.input.remove();
|
|
297
|
-
this.button.remove();
|
|
298
|
-
this.element.html($('<option value="" selected="selected"></option>'));
|
|
299
|
-
this.element.show();
|
|
300
|
-
this.filtering_select.remove();
|
|
301
|
-
$.Widget.prototype.destroy.call(this);
|
|
302
|
-
},
|
|
303
|
-
});
|
|
304
|
-
})(jQuery);
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
{
|
|
4
|
-
document.addEventListener("rails_admin.dom_ready", () => {
|
|
5
|
-
const scroller = document.getElementById("sidescroll");
|
|
6
|
-
if (!scroller) {
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
scroller.querySelectorAll("tr").forEach((tr, index) => {
|
|
11
|
-
let firstPosition;
|
|
12
|
-
tr.querySelectorAll("th.sticky, td.sticky").forEach((td, idx) => {
|
|
13
|
-
if (idx === 0) {
|
|
14
|
-
firstPosition = td.offsetLeft;
|
|
15
|
-
}
|
|
16
|
-
td.style.left = `${td.offsetLeft + -12 - firstPosition}px`;
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import jQuery from "jquery";
|
|
2
|
-
import "jquery-ui/ui/effect.js";
|
|
3
|
-
|
|
4
|
-
(function ($) {
|
|
5
|
-
|
|
6
|
-
$(document).on("change", "#reverse-selection", function () {
|
|
7
|
-
const isChecked = $(this).is(":checked"); // true if checked, false if unchecked
|
|
8
|
-
$(this).closest(".checkbox").next(".control-group").find(".controls input:checkbox").prop("checked", isChecked);
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
})(jQuery);
|
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
// Color system
|
|
2
|
-
$white: $white;
|
|
3
|
-
$black: $black;
|
|
4
|
-
|
|
5
|
-
$primary: $primary-color;
|
|
6
|
-
$secondary: $secondary-color;
|
|
7
|
-
$success: $success-color;
|
|
8
|
-
$info: $info-color;
|
|
9
|
-
$warning: $warning-color;
|
|
10
|
-
$danger: $danger-color;
|
|
11
|
-
$light: $light-color;
|
|
12
|
-
$dark: $dark-color;
|
|
13
|
-
|
|
14
|
-
// Spacing
|
|
15
|
-
$spacer: $spacer;
|
|
16
|
-
$spacers: (
|
|
17
|
-
0: 0,
|
|
18
|
-
1: $spacer-1,
|
|
19
|
-
2: $spacer-2,
|
|
20
|
-
3: $spacer-3,
|
|
21
|
-
4: $spacer-4,
|
|
22
|
-
5: $spacer-5,
|
|
23
|
-
6: $spacer-6,
|
|
24
|
-
7: $spacer-7,
|
|
25
|
-
8: $spacer-8,
|
|
26
|
-
9: $spacer-9,
|
|
27
|
-
10: $spacer-10,
|
|
28
|
-
11: $spacer-11
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
// Body
|
|
32
|
-
$body-color: $text-color;
|
|
33
|
-
$body-bg: $light-color;
|
|
34
|
-
|
|
35
|
-
$body-secondary-color: $text-secondary-color;
|
|
36
|
-
$text-muted: $text-secondary-color;
|
|
37
|
-
|
|
38
|
-
// Links
|
|
39
|
-
$link-decoration: none;
|
|
40
|
-
|
|
41
|
-
// Paragraphs
|
|
42
|
-
$paragraph-margin-bottom: $spacer-3;
|
|
43
|
-
|
|
44
|
-
// Grid columns
|
|
45
|
-
$grid-columns: 24;
|
|
46
|
-
$grid-gutter-width: $spacer-6;
|
|
47
|
-
|
|
48
|
-
// Components
|
|
49
|
-
$border-width: $border-width;
|
|
50
|
-
$border-color: $border-color;
|
|
51
|
-
|
|
52
|
-
$border-radius: $md-border-radius;
|
|
53
|
-
$border-radius-sm: $sm-border-radius;
|
|
54
|
-
$border-radius-lg: $lg-border-radius;
|
|
55
|
-
|
|
56
|
-
$box-shadow: $md-box-shadow;
|
|
57
|
-
$box-shadow-lg: $lg-box-shadow;
|
|
58
|
-
|
|
59
|
-
$transition-base: $md-transition;
|
|
60
|
-
|
|
61
|
-
// Typography
|
|
62
|
-
$font-family-sans-serif: $body-family;
|
|
63
|
-
|
|
64
|
-
$font-size-base: $base-font-size;
|
|
65
|
-
$font-size-sm: $sm-font-size;
|
|
66
|
-
$font-size-lg: $lg-font-size;
|
|
67
|
-
|
|
68
|
-
$font-weight-normal: $fw-normal;
|
|
69
|
-
$font-weight-medium: $fw-medium;
|
|
70
|
-
$font-weight-semibold: $fw-semibold;
|
|
71
|
-
$font-weight-bold: $fw-bold;
|
|
72
|
-
|
|
73
|
-
$font-weight-base: $fw-medium;
|
|
74
|
-
|
|
75
|
-
$line-height-base: 1.625;
|
|
76
|
-
|
|
77
|
-
$h1-font-size: $h1-font-size;
|
|
78
|
-
$h2-font-size: $h2-font-size;
|
|
79
|
-
$h3-font-size: $h3-font-size;
|
|
80
|
-
$h4-font-size: $h4-font-size;
|
|
81
|
-
$h5-font-size: $h5-font-size;
|
|
82
|
-
$h6-font-size: $h6-font-size;
|
|
83
|
-
|
|
84
|
-
$headings-margin-bottom: $spacer-2;
|
|
85
|
-
$headings-font-family: $headings-family;
|
|
86
|
-
$headings-font-weight: $fw-extrabold;
|
|
87
|
-
$headings-color: $dark-color;
|
|
88
|
-
|
|
89
|
-
$lead-font-size: $lg-font-size;
|
|
90
|
-
$lead-font-weight: $fw-medium;
|
|
91
|
-
|
|
92
|
-
$hr-margin-y: 0;
|
|
93
|
-
$hr-color: $border-color;
|
|
94
|
-
|
|
95
|
-
$hr-border-color: $border-color;
|
|
96
|
-
$hr-border-width: $border-width;
|
|
97
|
-
$hr-opacity: 1;
|
|
98
|
-
|
|
99
|
-
// Buttons + Forms
|
|
100
|
-
$input-btn-padding-y: $spacer * 1.75; // 7px
|
|
101
|
-
$input-btn-padding-x: $spacer * 3.5; // 14px
|
|
102
|
-
|
|
103
|
-
$input-btn-padding-y-sm: $spacer * 1.5; // 6px
|
|
104
|
-
$input-btn-padding-x-sm: $spacer * 3; // 12px
|
|
105
|
-
|
|
106
|
-
$input-btn-padding-y-lg: $spacer * 2; // 8px
|
|
107
|
-
$input-btn-padding-x-lg: $spacer * 4; // 16px
|
|
108
|
-
|
|
109
|
-
// Buttons
|
|
110
|
-
$btn-padding-x: $spacer * 4; // 16px
|
|
111
|
-
|
|
112
|
-
$btn-padding-x-sm: $spacer * 3.5; // 14px
|
|
113
|
-
|
|
114
|
-
$btn-padding-x-lg: $spacer * 5; // 20px
|
|
115
|
-
|
|
116
|
-
$btn-font-weight: $fw-bold;
|
|
117
|
-
|
|
118
|
-
$btn-border-radius: $spacer * 2.5; // 10px
|
|
119
|
-
$btn-border-radius-sm: $spacer * 2; // 8px
|
|
120
|
-
$btn-border-radius-lg: $spacer * 3; // 12px
|
|
121
|
-
|
|
122
|
-
// Forms
|
|
123
|
-
$form-text-margin-top: $spacer-1;
|
|
124
|
-
$form-text-font-size: $sm-font-size;
|
|
125
|
-
$form-text-color: $text-secondary-color;
|
|
126
|
-
|
|
127
|
-
$form-label-margin-bottom: $spacer-1;
|
|
128
|
-
$form-label-font-size: $sm-font-size;
|
|
129
|
-
$form-label-font-weight: $fw-semibold;
|
|
130
|
-
$form-label-color: $dark-color;
|
|
131
|
-
|
|
132
|
-
$input-bg: $white;
|
|
133
|
-
$input-disabled-color: $text-secondary-color;
|
|
134
|
-
$input-disabled-bg: $light-color;
|
|
135
|
-
$input-disabled-border-color: $light-color;
|
|
136
|
-
|
|
137
|
-
$input-border-color: $border-color;
|
|
138
|
-
|
|
139
|
-
$form-check-padding-start: $spacer-7;
|
|
140
|
-
$form-check-margin-bottom: 0;
|
|
141
|
-
$form-check-label-color: $form-label-color;
|
|
142
|
-
|
|
143
|
-
$form-check-input-border: $border-width solid $border-color;
|
|
144
|
-
|
|
145
|
-
$form-switch-color: $border-color;
|
|
146
|
-
$form-switch-padding-start: 0;
|
|
147
|
-
|
|
148
|
-
// Navbar
|
|
149
|
-
$navbar-toggler-padding-y: $spacer-1;
|
|
150
|
-
$navbar-toggler-padding-x: $spacer-1;
|
|
151
|
-
$navbar-toggler-font-size: 0;
|
|
152
|
-
|
|
153
|
-
// Dropdowns
|
|
154
|
-
$dropdown-min-width: rem(175px);
|
|
155
|
-
$dropdown-padding-x: 0;
|
|
156
|
-
$dropdown-padding-y: $spacer-2;
|
|
157
|
-
$dropdown-spacer: $spacer-2;
|
|
158
|
-
$dropdown-font-size: $sm-font-size;
|
|
159
|
-
$dropdown-border-width: 0;
|
|
160
|
-
$dropdown-divider-margin-y: $spacer-4;
|
|
161
|
-
|
|
162
|
-
$dropdown-link-hover-color: $dark-color;
|
|
163
|
-
$dropdown-link-hover-bg: rgba($dark-color, 0.05);
|
|
164
|
-
|
|
165
|
-
$dropdown-link-active-color: $dark-color;
|
|
166
|
-
$dropdown-link-active-bg: rgba($dark-color, 0.05);
|
|
167
|
-
|
|
168
|
-
$dropdown-link-disabled-color: $text-secondary-color;
|
|
169
|
-
|
|
170
|
-
$dropdown-item-padding-y: $spacer * 1.75; // 7px
|
|
171
|
-
$dropdown-item-padding-x: $spacer-4;
|
|
172
|
-
|
|
173
|
-
$dropdown-header-color: $text-secondary-color;
|
|
174
|
-
$dropdown-header-padding-x: $dropdown-item-padding-x;
|
|
175
|
-
$dropdown-header-padding-y: $dropdown-padding-y;
|
|
176
|
-
$dropdown-header-padding: $dropdown-header-padding-y $dropdown-header-padding-x;
|
|
177
|
-
|
|
178
|
-
// Progress bars
|
|
179
|
-
$progress-height: rem(16px);
|
|
180
|
-
$progress-font-size: $xs-font-size;
|
|
181
|
-
$progress-bg: $border-color;
|
|
182
|
-
$progress-border-radius: $lg-border-radius;
|
|
183
|
-
|
|
184
|
-
// Badges
|
|
185
|
-
$badge-font-size: $xs-font-size;
|
|
186
|
-
$badge-padding-y: $spacer-1;
|
|
187
|
-
$badge-padding-x: $spacer-2;
|
|
188
|
-
$badge-border-radius: $sm-border-radius;
|
|
189
|
-
|
|
190
|
-
// Offcanvas
|
|
191
|
-
$offcanvas-padding-y: $spacer-4;
|
|
192
|
-
$offcanvas-padding-x: $spacer-3;
|
|
193
|
-
$offcanvas-horizontal-width: rem(299px);
|
|
194
|
-
$offcanvas-border-width: 0;
|
|
195
|
-
$offcanvas-bg-color: transparent;
|
|
196
|
-
$offcanvas-box-shadow: none;
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
// Colors
|
|
2
|
-
$white: #fff;
|
|
3
|
-
$black: #000;
|
|
4
|
-
|
|
5
|
-
$azure: #245ae4; // Private – Primary color
|
|
6
|
-
$jnquil: #ffd334; // Private – Secondary color
|
|
7
|
-
$lime-green: #00c648; // Private – Success color
|
|
8
|
-
$amethyst: #b652e4; // Private – Info color
|
|
9
|
-
$princeton-orange: #fc9e34; // Private – Warning color
|
|
10
|
-
$vermilion: #e4150a; // Private – Danger color
|
|
11
|
-
$ghost-white: #f3f6ff; // Private – Light color
|
|
12
|
-
$eerie-black: #20284e; // Private – Dark color
|
|
13
|
-
|
|
14
|
-
$dim-gray: #606884; // Private – Text color
|
|
15
|
-
$taupe-gray: #8C8ea2; // Private – Text secondary color
|
|
16
|
-
|
|
17
|
-
$platinum: #ecf0fa; // Private – Border color
|
|
18
|
-
|
|
19
|
-
$primary-color: $azure;
|
|
20
|
-
$secondary-color: $jnquil;
|
|
21
|
-
$success-color: $lime-green;
|
|
22
|
-
$info-color: $amethyst;
|
|
23
|
-
$warning-color: $princeton-orange;
|
|
24
|
-
$danger-color: $vermilion;
|
|
25
|
-
$light-color: $ghost-white;
|
|
26
|
-
$dark-color: $eerie-black;
|
|
27
|
-
|
|
28
|
-
$text-color: $dim-gray;
|
|
29
|
-
$text-secondary-color: $taupe-gray;
|
|
30
|
-
|
|
31
|
-
$primary-gradient: linear-gradient(125deg, lighten($primary-color, 2.5%) 0%, darken($primary-color, 2.5%) 100%);
|
|
32
|
-
|
|
33
|
-
// Spacing
|
|
34
|
-
$spacer: rem(4px);
|
|
35
|
-
$spacer-1: $spacer; // 4px
|
|
36
|
-
$spacer-2: $spacer * 2; // 8px
|
|
37
|
-
$spacer-3: $spacer * 3; // 12px
|
|
38
|
-
$spacer-4: $spacer * 4; // 16px
|
|
39
|
-
$spacer-5: $spacer * 5; // 20px
|
|
40
|
-
$spacer-6: $spacer * 6; // 24px
|
|
41
|
-
$spacer-7: $spacer * 7; // 28px
|
|
42
|
-
$spacer-8: $spacer * 8; // 32px
|
|
43
|
-
$spacer-9: $spacer * 10; // 40px
|
|
44
|
-
$spacer-10: $spacer * 12; // 48px
|
|
45
|
-
$spacer-11: $spacer * 14; // 56px
|
|
46
|
-
|
|
47
|
-
// Components
|
|
48
|
-
$border-width: rem(1px);
|
|
49
|
-
$border-color: $platinum;
|
|
50
|
-
|
|
51
|
-
$base-border-radius: rem(4px);
|
|
52
|
-
$md-border-radius: $base-border-radius * 2; // 8px
|
|
53
|
-
$sm-border-radius: $base-border-radius; // 4px
|
|
54
|
-
$lg-border-radius: $base-border-radius * 3; // 12px
|
|
55
|
-
$xl-border-radius: $base-border-radius * 5; // 16px
|
|
56
|
-
|
|
57
|
-
$md-box-shadow: 0 0 rem(16px 12px) rgba(darken($primary-color, 5%), 0.025);
|
|
58
|
-
$lg-box-shadow: 0 0 rem(24px 16px) rgba(darken($primary-color, 5%), 0.05);
|
|
59
|
-
|
|
60
|
-
// Typography
|
|
61
|
-
$body-family: "Mulish", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
62
|
-
|
|
63
|
-
$base-font-size: rem(16px);
|
|
64
|
-
|
|
65
|
-
$md-font-size: $base-font-size; // 16px
|
|
66
|
-
$xs-font-size: $base-font-size * 0.786625; // 12.586px
|
|
67
|
-
$sm-font-size: $base-font-size * 0.8869375; // 14.191px
|
|
68
|
-
$lg-font-size: $base-font-size * 1.1275; // 18.04px
|
|
69
|
-
|
|
70
|
-
$fw-normal: 400;
|
|
71
|
-
$fw-medium: 500;
|
|
72
|
-
$fw-semibold: 600;
|
|
73
|
-
$fw-bold: 700;
|
|
74
|
-
$fw-extrabold: 800;
|
|
75
|
-
|
|
76
|
-
$h1-font-size: $base-font-size * 2.0544375; // 32.871px
|
|
77
|
-
$h2-font-size: $base-font-size * 1.822125; // 29.154px
|
|
78
|
-
$h3-font-size: $base-font-size * 1.6160625; // 25.857px
|
|
79
|
-
$h4-font-size: $base-font-size * 1.4333125; // 22.933px
|
|
80
|
-
$h5-font-size: $base-font-size * 1.27125; // 20.34px
|
|
81
|
-
$h6-font-size: $base-font-size * 1.1275; // 18.04px
|
|
82
|
-
|
|
83
|
-
$headings-family: "Mulish", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
84
|
-
|
|
85
|
-
// Other
|
|
86
|
-
$md-transition: all 0.275s cubic-bezier(0.1, 0, 0.1, 1);
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
.breadcrumb {
|
|
2
|
-
font-size: $sm-font-size;
|
|
3
|
-
font-weight: $fw-semibold;
|
|
4
|
-
line-height: 1;
|
|
5
|
-
margin-bottom: $spacer-2;
|
|
6
|
-
|
|
7
|
-
&-item {
|
|
8
|
-
align-items: baseline;
|
|
9
|
-
display: flex;
|
|
10
|
-
|
|
11
|
-
& + .breadcrumb-item::before {
|
|
12
|
-
@extend .fa-sm;
|
|
13
|
-
@extend .fa-solid;
|
|
14
|
-
color: $primary-color;
|
|
15
|
-
content: "\f105";
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
.btn {
|
|
2
|
-
letter-spacing: -0.01em;
|
|
3
|
-
transition: $md-transition;
|
|
4
|
-
|
|
5
|
-
&-square {
|
|
6
|
-
padding: 0;
|
|
7
|
-
|
|
8
|
-
&.btn-sm {
|
|
9
|
-
height: rem(36px);
|
|
10
|
-
width: rem(36px);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
&-dropdown {
|
|
15
|
-
transition: none;
|
|
16
|
-
color: $text-secondary-color;
|
|
17
|
-
|
|
18
|
-
&:hover,
|
|
19
|
-
&.show {
|
|
20
|
-
background: linear-gradient($white, $white) padding-box, linear-gradient(darken($border-color, 3%), darken($border-color, 5%)) border-box;
|
|
21
|
-
box-shadow: 0 rem(1px 2px 0px) rgba($dark-color, 0.0875);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&-white {
|
|
26
|
-
background: linear-gradient($white, $white) padding-box, linear-gradient(darken($border-color, 1%), darken($border-color, 1.75%)) border-box;
|
|
27
|
-
box-shadow: 0 rem(2px 3px -1px) rgba($dark-color, 0.075);
|
|
28
|
-
|
|
29
|
-
@include button-variant(
|
|
30
|
-
$background: $white,
|
|
31
|
-
$border: darken($border-color, 3.25%),
|
|
32
|
-
$color: $dark-color,
|
|
33
|
-
$hover-background: $white,
|
|
34
|
-
$hover-border: transparent,
|
|
35
|
-
$hover-color: $dark-color,
|
|
36
|
-
$active-background: $white,
|
|
37
|
-
$active-border:transparent,
|
|
38
|
-
$active-color: $dark-color,
|
|
39
|
-
$disabled-background: $white,
|
|
40
|
-
$disabled-border: lighten($border-color, 3.25%),
|
|
41
|
-
$disabled-color: $text-secondary-color
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
&:hover {
|
|
45
|
-
background: linear-gradient($white, $white) padding-box, linear-gradient(darken($border-color, 3%), darken($border-color, 5%)) border-box;
|
|
46
|
-
box-shadow: 0 rem(1px 2px 0px) rgba($dark-color, 0.0875);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.input-group & {
|
|
50
|
-
background-color: $white;
|
|
51
|
-
border-color: $border-color;
|
|
52
|
-
box-shadow: none;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|