zuora_connect_ui 0.6.0 → 0.6.1
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/app/assets/javascripts/zuora_connect_ui/datatable.js +4 -5
- data/app/assets/javascripts/zuora_connect_ui/fetch.js +30 -0
- data/app/assets/javascripts/zuora_connect_ui/imports/no-jquery-ui.js +41 -0
- data/app/assets/javascripts/zuora_connect_ui/input.js +5 -0
- data/app/assets/javascripts/zuora_connect_ui/noty.js +6 -0
- data/app/assets/javascripts/zuora_connect_ui.js +2 -0
- data/app/assets/stylesheets/zuora_connect_ui/tabs.scss +23 -0
- data/app/helpers/zuora_connect_ui/application_helper.rb +1 -1
- data/app/views/partials/_filters.html.erb +0 -2
- data/lib/zuora_connect_ui/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d5154e20c98548a177ed1ab5a6cd77a5e1c503c9158e7fa0f88e2c971417a23
|
4
|
+
data.tar.gz: 179cf221e9c45c6cb4b0067d117bc29f7f029e95a658248780ec71ed0f83c853
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c51b53abf156f6b084f0a481345e15b73373c0f1db3ef0e3736187adb5d6234bb85b9deba7feeed7ae97f792876331c885d0c9fb47f968b7193886ba130b8c27
|
7
|
+
data.tar.gz: 28cbe2dc5370d849dfed26ff19fe7dd3741e0a6ae67b25bd8ac0eb677277f624239438d8924c0f3fe3e60a964f2d8d0384ad254ad2cd6f1ce467ecd3c847207f
|
@@ -15,7 +15,7 @@ const zStorage = (function() {
|
|
15
15
|
|
16
16
|
function logWarning(error) {
|
17
17
|
if (warning) return;
|
18
|
-
console.warn(
|
18
|
+
console.warn("Table State cannot be saved in Safari");
|
19
19
|
warning = true;
|
20
20
|
}
|
21
21
|
|
@@ -155,9 +155,8 @@ function initTableSize(api, tableName, size) {
|
|
155
155
|
.append([10, 25, 50, 100].map(v => `<option value="${v}">${v}</option>`))
|
156
156
|
.val(size)
|
157
157
|
.select2({
|
158
|
+
theme: "default",
|
158
159
|
minimumResultsForSearch: Infinity,
|
159
|
-
dropdownAutoWidth: true,
|
160
|
-
width: "100%"
|
161
160
|
})
|
162
161
|
.on("change", function(e) {
|
163
162
|
api.page.len(+$(this).val()).draw(false);
|
@@ -184,8 +183,8 @@ function initSearch(api, tableName) {
|
|
184
183
|
let timer;
|
185
184
|
$(`#${tableName}_content input[name="table[search]"]`).keydown(function(e) {
|
186
185
|
if (e.keyCode == 13) {
|
187
|
-
|
188
|
-
|
186
|
+
e.preventDefault();
|
187
|
+
return false;
|
189
188
|
}
|
190
189
|
clearTimeout(timer);
|
191
190
|
if ($(this).val()) {
|
@@ -0,0 +1,30 @@
|
|
1
|
+
const checkStatus = response => {
|
2
|
+
if (!response.ok) throw response;
|
3
|
+
return response.json();
|
4
|
+
};
|
5
|
+
|
6
|
+
const catchErrors = response =>
|
7
|
+
response.json
|
8
|
+
? response
|
9
|
+
.json()
|
10
|
+
.then(json => {
|
11
|
+
console.log(json);
|
12
|
+
|
13
|
+
noty({
|
14
|
+
text: json.message,
|
15
|
+
type: "error"
|
16
|
+
});
|
17
|
+
|
18
|
+
if (json.message === "Invalid Authenticity Token. Reloading.... ")
|
19
|
+
location.reload();
|
20
|
+
})
|
21
|
+
.catch(error => {
|
22
|
+
noty({
|
23
|
+
text: `${response.status} - ${response.statusText}`,
|
24
|
+
type: "error"
|
25
|
+
});
|
26
|
+
})
|
27
|
+
: noty({
|
28
|
+
text: "Unknown Error",
|
29
|
+
type: "error"
|
30
|
+
});
|
@@ -0,0 +1,41 @@
|
|
1
|
+
// JQuery UI
|
2
|
+
//= require jquery-ui/widgets/sortable
|
3
|
+
//
|
4
|
+
// Bootstrap
|
5
|
+
//
|
6
|
+
//= require bootstrap-sprockets
|
7
|
+
//
|
8
|
+
// bootstrap-Datepicker
|
9
|
+
//= require js/bootstrap-datepicker.min
|
10
|
+
//= require locales/bootstrap-datepicker.it.min
|
11
|
+
//= require locales/bootstrap-datepicker.ja.min
|
12
|
+
//= require locales/bootstrap-datepicker.zh-CN.min
|
13
|
+
//
|
14
|
+
// Select2
|
15
|
+
//
|
16
|
+
//= require select2-full
|
17
|
+
//= require select2_locale_en
|
18
|
+
//= require select2_locale_fr
|
19
|
+
//= require select2_locale_zh-CN
|
20
|
+
//
|
21
|
+
// Datatables
|
22
|
+
//
|
23
|
+
//= require dataTables/jquery.dataTables
|
24
|
+
//= require dataTables/bootstrap/3/jquery.dataTables.bootstrap
|
25
|
+
//= require dataTables/extras/dataTables.responsive
|
26
|
+
//= require dataTables/extras/dataTables.colReorder
|
27
|
+
//= require dataTables/extras/dataTables.select
|
28
|
+
//
|
29
|
+
// contextMenu
|
30
|
+
//= require js/jquery.contextMenu.min.js
|
31
|
+
//
|
32
|
+
// IndexedDB Promise Wrapper
|
33
|
+
//= require js/idb-keyval-iife
|
34
|
+
//
|
35
|
+
//= require ../app
|
36
|
+
//= require ../datatable
|
37
|
+
//= require ../fetch
|
38
|
+
//= require ../input
|
39
|
+
//= require ../iframe
|
40
|
+
//= require ../noty
|
41
|
+
//= require ../tabs
|
@@ -19,3 +19,8 @@ $(document).on('show', '.zuo-datepicker', function(e) {
|
|
19
19
|
$(document).on('hide', '.zuo-datepicker', function(e) {
|
20
20
|
$(this).children('.zuo-floating-label').toggleClass('floating', !!e.date);
|
21
21
|
});
|
22
|
+
|
23
|
+
$.fn.select2.defaults.set("theme", "bootstrap");
|
24
|
+
$.fn.select2.defaults.set("dropdownAutoWidth", true);
|
25
|
+
$.fn.select2.defaults.set("width", "100%");
|
26
|
+
$.fn.select2.defaults.set("placeholder", "");
|
@@ -36,6 +36,8 @@
|
|
36
36
|
//
|
37
37
|
//= require zuora_connect_ui/app
|
38
38
|
//= require zuora_connect_ui/datatable
|
39
|
+
//= require zuora_connect_ui/fetch
|
39
40
|
//= require zuora_connect_ui/input
|
40
41
|
//= require zuora_connect_ui/iframe
|
42
|
+
//= require zuora_connect_ui/noty
|
41
43
|
//= require zuora_connect_ui/tabs
|
@@ -37,3 +37,26 @@ ul.tab-header {
|
|
37
37
|
}
|
38
38
|
}
|
39
39
|
}
|
40
|
+
|
41
|
+
.zuo-loading {
|
42
|
+
position: relative;
|
43
|
+
> :not(.zuo-loading-overlay) {
|
44
|
+
opacity: 0.15;
|
45
|
+
}
|
46
|
+
|
47
|
+
.zuo-loading-overlay {
|
48
|
+
display: flex;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
.zuo-loading-overlay {
|
53
|
+
display: none;
|
54
|
+
position: absolute;
|
55
|
+
width: 100%;
|
56
|
+
height: 100%;
|
57
|
+
z-index: 1000;
|
58
|
+
|
59
|
+
> anj-spinner {
|
60
|
+
margin: auto;
|
61
|
+
}
|
62
|
+
}
|
@@ -16,7 +16,7 @@ module ZuoraConnectUi
|
|
16
16
|
end
|
17
17
|
|
18
18
|
JAVASCRIPT_INCLUDE = %w[
|
19
|
-
https://cdn.zuora.com/anjuna/1.0.0-alpha.
|
19
|
+
https://cdn.zuora.com/anjuna/1.0.0-alpha.14/core/anjuna-core.js
|
20
20
|
].map { |link| '<script src="' + link + '"></script>' }.join("\n").html_safe
|
21
21
|
end
|
22
22
|
end
|
@@ -23,10 +23,8 @@
|
|
23
23
|
<%= select_tag(filter_name, option_tags, options = {:prompt => prompt}) %>
|
24
24
|
<% content_for :scripts do %>
|
25
25
|
$('#<%= table_name %>_content select[name="<%= filter_name %>"]').select2({
|
26
|
-
theme: "bootstrap",
|
27
26
|
minimumResultsForSearch: <%= table_filter.key?("searchable") && table_filter["searchable"] ? 0 : -1 %>,
|
28
27
|
width: '<%= table_filter.fetch('width', '100%') %>',
|
29
|
-
dropdownAutoWidth: true,
|
30
28
|
placeholder: '<%= table_filter.fetch('placeholder', '') %>',
|
31
29
|
allowClear: <%= table_filter.fetch('allow-clear', true) %>
|
32
30
|
});
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zuora_connect_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Connect Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bootstrap-sass
|
@@ -134,8 +134,11 @@ files:
|
|
134
134
|
- app/assets/javascripts/zuora_connect_ui.js
|
135
135
|
- app/assets/javascripts/zuora_connect_ui/app.js.erb
|
136
136
|
- app/assets/javascripts/zuora_connect_ui/datatable.js
|
137
|
+
- app/assets/javascripts/zuora_connect_ui/fetch.js
|
137
138
|
- app/assets/javascripts/zuora_connect_ui/iframe.js
|
139
|
+
- app/assets/javascripts/zuora_connect_ui/imports/no-jquery-ui.js
|
138
140
|
- app/assets/javascripts/zuora_connect_ui/input.js
|
141
|
+
- app/assets/javascripts/zuora_connect_ui/noty.js
|
139
142
|
- app/assets/javascripts/zuora_connect_ui/tabs.js
|
140
143
|
- app/assets/stylesheets/_zuora_connect_ui.scss
|
141
144
|
- app/assets/stylesheets/zuora_connect_ui/anjuna.scss
|