cm-admin 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/assets/stylesheets/cm_admin/components/_accordion.scss +8 -0
- data/app/assets/stylesheets/cm_admin/components/_alerts.scss +8 -60
- data/app/assets/stylesheets/cm_admin/components/index.scss +9 -8
- data/lib/cm_admin/version.rb +1 -1
- data/lib/cm_admin/view_helpers/field_display_helper.rb +4 -2
- data/lib/cm_admin/view_helpers/form_field_helper.rb +2 -2
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 761f5d07363458ff70baaaf931e973f5b0b6dca0be30786ebb5ade83bb5b6934
|
4
|
+
data.tar.gz: 07b19cdc0bb2d6fa6f8a87199751c0d5be4e3a0bf6da11faf7ee7e8643d5836e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 741d8416b844f57064606e4d7616805ab7670000dfde9a21d6b21184b55a6cf5538bd85d403e711b65d14c1118c2cf1e68daaff66f261832d57653b16111c7bb
|
7
|
+
data.tar.gz: c48c03392357838aa183e10583ea6f57c7962dea1c5a05e71e66af5da2054cdef9f8fe70d8b3a01c9688a074a76a3c8573e43291d0159d10548905b8513e6fab
|
data/Gemfile.lock
CHANGED
@@ -1,5 +1,12 @@
|
|
1
|
-
@import "../helpers/index
|
1
|
+
@import "../helpers/index";
|
2
|
+
@import "../dependency/bootstrap/scss/bootstrap";
|
2
3
|
|
4
|
+
// New alert styles
|
5
|
+
.cm-admin .alert {
|
6
|
+
@extend .alert-dismissible, .d-flex, .align-items-center;
|
7
|
+
}
|
8
|
+
|
9
|
+
//Old alert styles
|
3
10
|
.flag-alert {
|
4
11
|
max-width: 752px;
|
5
12
|
padding: 24px;
|
@@ -40,62 +47,3 @@
|
|
40
47
|
}
|
41
48
|
}
|
42
49
|
}
|
43
|
-
|
44
|
-
.toast-alert {
|
45
|
-
display: flex;
|
46
|
-
align-items: center;
|
47
|
-
max-width: 225px;
|
48
|
-
padding: 8px 16px;
|
49
|
-
border-radius: $radius-4;
|
50
|
-
&.informative {
|
51
|
-
background: $blue-light-clr;
|
52
|
-
}
|
53
|
-
&.successful {
|
54
|
-
background: $green-light-clr;
|
55
|
-
}
|
56
|
-
&.warning {
|
57
|
-
background: $yellow-light-clr;
|
58
|
-
}
|
59
|
-
&.error {
|
60
|
-
background: $red-light-clr;
|
61
|
-
}
|
62
|
-
.toast-info {
|
63
|
-
@include font($size: $t4-text, $color: $primary-text-clr);
|
64
|
-
line-height: 22px;
|
65
|
-
margin: 0;
|
66
|
-
}
|
67
|
-
.toast-close {
|
68
|
-
@include font($size: $t4-text, $color: $ink-lighter-clr);
|
69
|
-
margin-left: 24px;
|
70
|
-
cursor: pointer;
|
71
|
-
}
|
72
|
-
}
|
73
|
-
|
74
|
-
.inline-alert {
|
75
|
-
@include font($size: $t4-text, $color: $primary-text-clr);
|
76
|
-
line-height: 22px;
|
77
|
-
span {
|
78
|
-
margin-right: 4px;
|
79
|
-
}
|
80
|
-
&.informative {
|
81
|
-
span {
|
82
|
-
color: $blue-regular-clr;
|
83
|
-
}
|
84
|
-
}
|
85
|
-
&.successful {
|
86
|
-
span {
|
87
|
-
color: $green-regular-clr;
|
88
|
-
}
|
89
|
-
}
|
90
|
-
&.warning {
|
91
|
-
span {
|
92
|
-
color: $yellow-regular-clr;
|
93
|
-
}
|
94
|
-
}
|
95
|
-
&.error {
|
96
|
-
color: $red-regular-clr;
|
97
|
-
span {
|
98
|
-
color: $red-regular-clr;
|
99
|
-
}
|
100
|
-
}
|
101
|
-
}
|
@@ -1,8 +1,9 @@
|
|
1
|
-
@import
|
2
|
-
@import
|
3
|
-
@import
|
4
|
-
@import
|
5
|
-
@import
|
6
|
-
@import
|
7
|
-
@import
|
8
|
-
@import
|
1
|
+
@import "./alerts";
|
2
|
+
@import "./buttons";
|
3
|
+
@import "./input";
|
4
|
+
@import "./status-tag";
|
5
|
+
@import "./dropdown-popup";
|
6
|
+
@import "./range";
|
7
|
+
@import "./modal";
|
8
|
+
@import "./drawer";
|
9
|
+
@import "./accordion";
|
data/lib/cm_admin/version.rb
CHANGED
@@ -111,8 +111,10 @@ module CmAdmin
|
|
111
111
|
end
|
112
112
|
elsif has_many_image_attached?(ar_object, field)
|
113
113
|
ar_object.send(field.field_name).map do |asset|
|
114
|
-
content_tag
|
115
|
-
asset
|
114
|
+
content_tag(:div) do
|
115
|
+
content_tag :a, href: rails_blob_path(asset, disposition: "attachment") do
|
116
|
+
asset.filename.to_s
|
117
|
+
end
|
116
118
|
end
|
117
119
|
end.join("\n").html_safe
|
118
120
|
end
|
@@ -90,14 +90,14 @@ module CmAdmin
|
|
90
90
|
|
91
91
|
def cm_single_file_upload_field(form_obj, cm_field, _value, required_class, _target_action)
|
92
92
|
content_tag(:div) do
|
93
|
-
concat form_obj.file_field cm_field.field_name, class: "form-control #{required_class}"
|
93
|
+
concat form_obj.file_field cm_field.field_name, class: "form-control #{required_class}", disabled: cm_field.disabled
|
94
94
|
concat attachment_list(form_obj, cm_field, _value, required_class, _target_action)
|
95
95
|
end
|
96
96
|
end
|
97
97
|
|
98
98
|
def cm_multi_file_upload_field(form_obj, cm_field, _value, required_class, _target_action)
|
99
99
|
content_tag(:div) do
|
100
|
-
concat form_obj.file_field cm_field.field_name, multiple: true, class: "form-control #{required_class}"
|
100
|
+
concat form_obj.file_field cm_field.field_name, multiple: true, class: "form-control #{required_class}", disabled: cm_field.disabled
|
101
101
|
concat attachment_list(form_obj, cm_field, _value, required_class, _target_action)
|
102
102
|
end
|
103
103
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cm-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sajinmp
|
@@ -213,6 +213,7 @@ files:
|
|
213
213
|
- app/assets/stylesheets/cm_admin/base/table.scss
|
214
214
|
- app/assets/stylesheets/cm_admin/base/tabs.scss
|
215
215
|
- app/assets/stylesheets/cm_admin/cm_admin.css.scss
|
216
|
+
- app/assets/stylesheets/cm_admin/components/_accordion.scss
|
216
217
|
- app/assets/stylesheets/cm_admin/components/_alerts.scss
|
217
218
|
- app/assets/stylesheets/cm_admin/components/_buttons.scss
|
218
219
|
- app/assets/stylesheets/cm_admin/components/_drawer.scss
|