workarea-admin 3.5.2 → 3.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/workarea/admin/base/_forms.scss +3 -5
- data/app/assets/stylesheets/workarea/admin/components/_button.scss +0 -6
- data/app/assets/stylesheets/workarea/admin/components/_workflow_bar.scss +0 -6
- data/app/helpers/workarea/admin/buttons_helper.rb +14 -0
- data/app/views/workarea/admin/dashboards/index.html.haml +12 -2
- data/app/views/workarea/admin/style_guides/components/_button.html.haml +12 -0
- data/test/helpers/workarea/admin/buttons_helper_test.rb +38 -0
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1558c260ab12c9d4240000e2a7df00313dd818985de7d71131d83abc449af35
|
4
|
+
data.tar.gz: 6adde7ce114066200bf246547febd3c86d8d0b1ecb5d1c565e656aad613c6126
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec05e38635c7685c4041a73f22b41624b0e7e05027e9c611b1cbdfeae9187d5716b70b2c34f5d9f2ffd7413a2d4fefa0c48c592fd85223f3d02a224c53a52d54
|
7
|
+
data.tar.gz: e5aa47646c9600073fe5e531dbfef0a5517033167f2919f7046fa504007118fc1f2a278cbf5f21cfc07af0c40a574f4b6be3ddba016ec8c77ee1003c4d489f39
|
@@ -4,8 +4,7 @@
|
|
4
4
|
|
5
5
|
$forms-color: $off-black !default;
|
6
6
|
$forms-bg-color: $white !default;
|
7
|
-
$forms-disabled-
|
8
|
-
$forms-disabled-bg-color: $light-gray !default;
|
7
|
+
$forms-disabled-opacity: 0.5 !default;
|
9
8
|
$forms-placeholder-color: $dark-gray !default;
|
10
9
|
|
11
10
|
|
@@ -65,10 +64,9 @@ textarea {
|
|
65
64
|
button,
|
66
65
|
input, textarea,
|
67
66
|
select, optgroup, option {
|
68
|
-
&[disabled], &[readonly] /* [1] */
|
67
|
+
&[disabled], &[readonly], /* [1] */
|
69
68
|
fieldset[disabled] & { /* [2] */
|
70
|
-
|
71
|
-
background-color: $forms-disabled-bg-color;
|
69
|
+
opacity: $forms-disabled-opacity;
|
72
70
|
cursor: not-allowed;
|
73
71
|
}
|
74
72
|
}
|
@@ -5,7 +5,6 @@
|
|
5
5
|
$button-color: $white !default;
|
6
6
|
$button-bg-color: $blue !default;
|
7
7
|
$button-hover-bg-color: $bright-blue !default;
|
8
|
-
$button-disabled-opacity: 0.5 !default;
|
9
8
|
|
10
9
|
$button-font-size: 16px !default;
|
11
10
|
$button-small-font-size: 14px !default;
|
@@ -42,11 +41,6 @@ $button-destroy-hover-bg-color: $bright-red !default;
|
|
42
41
|
background-color: $button-hover-bg-color;
|
43
42
|
}
|
44
43
|
|
45
|
-
&[disabled] {
|
46
|
-
opacity: $button-disabled-opacity;
|
47
|
-
cursor: not-allowed;
|
48
|
-
}
|
49
|
-
|
50
44
|
.card__button & {
|
51
45
|
@include center;
|
52
46
|
}
|
@@ -6,7 +6,6 @@ $workflow-bar-bg-color: $white !default;
|
|
6
6
|
|
7
7
|
$workflow-bar-button-color: $blue !default;
|
8
8
|
$workflow-bar-button-bg-color: $white !default;
|
9
|
-
$workflow-bar-button-disabled-opacity: 0.5 !default;
|
10
9
|
$workflow-bar-button-border-color: $shadow-color !default;
|
11
10
|
|
12
11
|
$workflow-bar-button-create-color: $white !default;
|
@@ -74,11 +73,6 @@ $workflow-bar-button-confirm-delete-hover-bg-color: $bright-red !default;
|
|
74
73
|
&:hover {
|
75
74
|
text-decoration: none;
|
76
75
|
}
|
77
|
-
|
78
|
-
&[disabled] {
|
79
|
-
opacity: $workflow-bar-button-disabled-opacity;
|
80
|
-
cursor: not-allowed;
|
81
|
-
}
|
82
76
|
}
|
83
77
|
|
84
78
|
.workflow-bar__button--left-divide {
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Workarea
|
2
|
+
module Admin
|
3
|
+
module ButtonsHelper
|
4
|
+
def button_tag(*args)
|
5
|
+
options = args.reverse.detect { |a| a.is_a?(Hash) }
|
6
|
+
options ||= args.append({}).last
|
7
|
+
|
8
|
+
options[:data] ||= {}
|
9
|
+
options[:data][:disable] = true unless options[:data].key?(:disable)
|
10
|
+
super(*args)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -168,8 +168,18 @@
|
|
168
168
|
%p= t('workarea.admin.dashboards.index.no_activity_as_of', time: local_time(Time.current)).html_safe
|
169
169
|
- else
|
170
170
|
- @activity.days.each_with_index do |(day, entries), index|
|
171
|
-
-
|
172
|
-
|
171
|
+
.activity-group
|
172
|
+
.grid
|
173
|
+
.grid__cell.grid__cell--20
|
174
|
+
.date-marker
|
175
|
+
- if day == Date.today
|
176
|
+
.date-marker__annotation= t('workarea.admin.timeline.today')
|
177
|
+
.date-marker__month= local_time(day, format: '%b')
|
178
|
+
.date-marker__day= local_time(day, format: '%e')
|
179
|
+
.grid__cell.grid__cell--80
|
180
|
+
.activity-group__activities
|
181
|
+
- entries.take(15).each do |entry|
|
182
|
+
= render_activity_entry(entry)
|
173
183
|
|
174
184
|
- unless @activity.entries.blank?
|
175
185
|
.section
|
@@ -25,6 +25,10 @@
|
|
25
25
|
= link_to '#' do
|
26
26
|
%span.button Span Button
|
27
27
|
|
28
|
+
%p should support disabled state:
|
29
|
+
.style-guide__example-block
|
30
|
+
= button_tag 'Button', class: 'button', type: 'button', disabled: true
|
31
|
+
|
28
32
|
|
29
33
|
#button--small.style-guide__subsection
|
30
34
|
|
@@ -43,6 +47,10 @@
|
|
43
47
|
.style-guide__example-block
|
44
48
|
= button_tag 'Button Element', class: 'button button--create'
|
45
49
|
|
50
|
+
%p should support disabled state:
|
51
|
+
.style-guide__example-block
|
52
|
+
= button_tag 'Button Element', class: 'button button--create', disabled: true
|
53
|
+
|
46
54
|
|
47
55
|
#button--destroy.style-guide__subsection
|
48
56
|
|
@@ -51,3 +59,7 @@
|
|
51
59
|
%p should change the color of a button:
|
52
60
|
.style-guide__example-block
|
53
61
|
= button_tag 'Button Element', class: 'button button--destroy'
|
62
|
+
|
63
|
+
%p should support disabled state:
|
64
|
+
.style-guide__example-block
|
65
|
+
= button_tag 'Button Element', class: 'button button--destroy', disabled: true
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Workarea
|
4
|
+
module Admin
|
5
|
+
class ButtonsHelperTest < ViewTest
|
6
|
+
def test_button_tag
|
7
|
+
result = button_tag('Content', { data: { foo: 'bar' } })
|
8
|
+
assert_match('Content', result)
|
9
|
+
assert_match('data-foo="bar"', result)
|
10
|
+
assert_match('data-disable="true"', result)
|
11
|
+
|
12
|
+
result = button_tag({ data: { foo: 'bar' } })
|
13
|
+
assert_match('data-foo="bar"', result)
|
14
|
+
assert_match('data-disable="true"', result)
|
15
|
+
|
16
|
+
result = button_tag({ data: { foo: 'bar', disable: false } })
|
17
|
+
assert_match('data-foo="bar"', result)
|
18
|
+
refute_match('data-disable="true"', result)
|
19
|
+
|
20
|
+
result = button_tag('Content')
|
21
|
+
assert_match('Content', result)
|
22
|
+
assert_match('data-disable="true"', result)
|
23
|
+
|
24
|
+
result = button_tag
|
25
|
+
assert_match('data-disable="true"', result)
|
26
|
+
|
27
|
+
result = button_tag({ data: { foo: 'bar' } }) { 'Content' }
|
28
|
+
assert_match('Content', result)
|
29
|
+
assert_match('data-foo="bar"', result)
|
30
|
+
assert_match('data-disable="true"', result)
|
31
|
+
|
32
|
+
result = button_tag { 'Content' }
|
33
|
+
assert_match('Content', result)
|
34
|
+
assert_match('data-disable="true"', result)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: workarea-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Crouse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: workarea-core
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.5.
|
19
|
+
version: 3.5.3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.5.
|
26
|
+
version: 3.5.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: workarea-storefront
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.5.
|
33
|
+
version: 3.5.3
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 3.5.
|
40
|
+
version: 3.5.3
|
41
41
|
description: Provides site administration functionality for the Workarea Commerce
|
42
42
|
Platform.
|
43
43
|
email:
|
@@ -508,6 +508,7 @@ files:
|
|
508
508
|
- app/helpers/workarea/admin/application_helper.rb
|
509
509
|
- app/helpers/workarea/admin/bookmarks_helper.rb
|
510
510
|
- app/helpers/workarea/admin/bulk_actions_helper.rb
|
511
|
+
- app/helpers/workarea/admin/buttons_helper.rb
|
511
512
|
- app/helpers/workarea/admin/changesets_helper.rb
|
512
513
|
- app/helpers/workarea/admin/configurations_helper.rb
|
513
514
|
- app/helpers/workarea/admin/content_block_icon_helper.rb
|
@@ -1286,6 +1287,7 @@ files:
|
|
1286
1287
|
- test/dummy/script/rails
|
1287
1288
|
- test/dummy/tmp/screenshots/.keep
|
1288
1289
|
- test/helpers/workarea/admin/application_helper_test.rb
|
1290
|
+
- test/helpers/workarea/admin/buttons_helper_test.rb
|
1289
1291
|
- test/helpers/workarea/admin/facets_helper_test.rb
|
1290
1292
|
- test/helpers/workarea/admin/icons_helper_test.rb
|
1291
1293
|
- test/helpers/workarea/admin/imports_helper_test.rb
|