zuora_connect_ui 0.1.6 → 0.1.7
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c08838df29b6d1a55de752eb6d9ddb56dfa2452e
|
4
|
+
data.tar.gz: dc9171a065f43b45fa33a51a496df17b819a506d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88f0bd784ccae55212cf27234e0640bdccc0c515e8b9ce43d77efbb453c871127d88a1ecb42f16625d249c6fe4db90b5ea55d48ace1e097ae7f1f712c7ddefaf
|
7
|
+
data.tar.gz: a3cd751d7ac9bf73d72fba8521cd3f4abe779915bdd467d1ef716797591df8efebff1b261e26db7eaeeb42a08dfce71836fb7350131cea2a6a034b487d78297c
|
data/README.md
CHANGED
@@ -6,6 +6,14 @@ Add this line to your application's Gemfile:
|
|
6
6
|
|
7
7
|
```ruby
|
8
8
|
gem 'zuora_connect_ui'
|
9
|
+
|
10
|
+
# Peek
|
11
|
+
gem 'peek'
|
12
|
+
gem 'peek-git'
|
13
|
+
gem 'peek-pg'
|
14
|
+
gem 'peek-performance_bar'
|
15
|
+
gem 'peek-redis'
|
16
|
+
gem 'peek-resque'
|
9
17
|
```
|
10
18
|
|
11
19
|
And then execute:
|
@@ -58,6 +66,28 @@ Add to `app/assets/javascripts/application.js`
|
|
58
66
|
|
59
67
|
Any scripts you create for your app should be imported below this
|
60
68
|
|
69
|
+
### Peek
|
70
|
+
|
71
|
+
Add the peek initializer in `config/initializers/peek.rb`:
|
72
|
+
```ruby
|
73
|
+
# List of Peek Views shown in the container
|
74
|
+
require 'peek'
|
75
|
+
Peek.into Peek::Views::Git if Rails.env == 'development'
|
76
|
+
Peek.into Peek::Views::PerformanceBar
|
77
|
+
Peek.into Peek::Views::PG
|
78
|
+
Peek.into Peek::Views::Redis
|
79
|
+
Peek.into Peek::Views::Resque
|
80
|
+
Peek.into Peek::Views::Connect
|
81
|
+
|
82
|
+
Peek::Railtie.configure do
|
83
|
+
config.peek.adapter = :redis
|
84
|
+
end
|
85
|
+
```
|
86
|
+
and the peek route in `config/routes.rb`
|
87
|
+
```ruby
|
88
|
+
mount Peek::Railtie => '/peek'
|
89
|
+
```
|
90
|
+
|
61
91
|
## Layout
|
62
92
|
|
63
93
|
### Admin Button
|
@@ -220,6 +250,19 @@ Label does not need the `for` html attribute, however the `div.radio` is require
|
|
220
250
|
<%= f.label :Start_Date, class: "zuo-floating-label floating" %>
|
221
251
|
<span class="input-group-addon z-icon-calendar"></span>
|
222
252
|
</div>
|
253
|
+
|
254
|
+
...
|
255
|
+
|
256
|
+
<% content_for :scripts do %>
|
257
|
+
$('.zuo-datepicker.date').datepicker({
|
258
|
+
autoclose: true,
|
259
|
+
format: 'yyyy-mm-dd',
|
260
|
+
templates: {
|
261
|
+
leftArrow: '<span class="z-icon-arrow-left"></span>',
|
262
|
+
rightArrow: '<span class="z-icon-arrow-right"></span>'
|
263
|
+
}
|
264
|
+
});
|
265
|
+
<% end >
|
223
266
|
```
|
224
267
|
|
225
268
|
|
@@ -67,10 +67,11 @@
|
|
67
67
|
}
|
68
68
|
}
|
69
69
|
|
70
|
-
textarea {
|
70
|
+
textarea.zuo-textbox {
|
71
71
|
box-sizing: content-box;
|
72
72
|
max-width: 100%;
|
73
73
|
min-height: 2.5rem;
|
74
|
+
border: 1px solid #e9ebee;
|
74
75
|
}
|
75
76
|
|
76
77
|
input[type="file"] {
|
@@ -97,7 +98,7 @@ input[type="file"] {
|
|
97
98
|
transition: border-color 0.2s;
|
98
99
|
padding: 0rem 0rem .375rem 0rem;
|
99
100
|
|
100
|
-
&:focus {
|
101
|
+
&:not([readonly]):focus {
|
101
102
|
border-color: $support-1;
|
102
103
|
}
|
103
104
|
|
@@ -127,7 +128,7 @@ select + .select2-container--open + .zuo-floating-label {
|
|
127
128
|
top: -2.6875rem;
|
128
129
|
}
|
129
130
|
|
130
|
-
.zuo-textbox:focus + .zuo-floating-label,
|
131
|
+
.zuo-textbox:not([readonly]):focus + .zuo-floating-label,
|
131
132
|
select + .select2-container--open + .zuo-floating-label {
|
132
133
|
color: $support-1;
|
133
134
|
}
|
@@ -144,7 +145,7 @@ select + .select2-container--open + .zuo-floating-label {
|
|
144
145
|
border-radius: .25rem;
|
145
146
|
padding: .5rem 0;
|
146
147
|
|
147
|
-
.select2-results__option {
|
148
|
+
.select2-results__option[role="treeitem"] {
|
148
149
|
padding: .25rem .75rem;
|
149
150
|
}
|
150
151
|
|
@@ -153,10 +154,20 @@ select + .select2-container--open + .zuo-floating-label {
|
|
153
154
|
color: $neutral-4;
|
154
155
|
}
|
155
156
|
|
157
|
+
.select2-results__options--nested {
|
158
|
+
padding-left: 1rem;
|
159
|
+
padding-right: 1rem;
|
160
|
+
}
|
161
|
+
|
156
162
|
.select2-results__option--highlighted[aria-selected="false"] {
|
157
163
|
background-color: $neutral-3;
|
158
164
|
color: $neutral-1;
|
159
165
|
}
|
166
|
+
|
167
|
+
.select2-results__group {
|
168
|
+
font-size: inherit;
|
169
|
+
color: $primary;
|
170
|
+
}
|
160
171
|
}
|
161
172
|
|
162
173
|
.select2-dropdown--below {
|
@@ -33,4 +33,19 @@ module DatatableHelper
|
|
33
33
|
}.merge(request.query_parameters), formats: [:html]
|
34
34
|
)
|
35
35
|
end
|
36
|
+
|
37
|
+
def return_cookie_filters(cookie_key, filter_key, values: nil, defaults: nil, type: nil)
|
38
|
+
raise "Error" if values.nil? && type != "boolean"
|
39
|
+
values = ["false"] if type == "boolean"
|
40
|
+
values = values.map {|v| v[1].to_s} if type == "select" || values[0].class == Array
|
41
|
+
defaults ||= [] if type == "select"
|
42
|
+
if !cookies[cookie_key].blank?
|
43
|
+
json = JSON.parse(cookies[cookie_key])
|
44
|
+
if !json[filter_key].blank?
|
45
|
+
checked_envs ||= json[filter_key] if type == "boolean" || type == "select"
|
46
|
+
checked_envs ||= values.map {|v| json[filter_key].include?(v) ? v : nil }.compact
|
47
|
+
end
|
48
|
+
end
|
49
|
+
checked_envs ||= defaults.nil? ? (type == "checkbox" ? values : nil) : defaults
|
50
|
+
end
|
36
51
|
end
|
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.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Connect Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bootstrap-sass
|