abstracted 0.0.6 → 0.0.14
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/Gemfile +1 -1
- data/Gemfile.lock +11 -8
- data/app/assets/javascripts/abstract_resources.js +29 -25
- data/app/assets/javascripts/crud.js.coffee +174 -29
- data/app/assets/javascripts/initializers.js.coffee +403 -58
- data/app/assets/javascripts/pagescrolling.js.coffee +92 -0
- data/app/assets/stylesheets/abstract_resources.css +5 -0
- data/app/assets/stylesheets/scaffold.css +4 -2
- data/app/assets/stylesheets/selectize.css.scss +0 -0
- data/app/controllers/abstract_resources_controller.rb +473 -134
- data/app/controllers/application_controller.rb +22 -7
- data/app/helpers/abstract_resources_helper.rb +515 -9
- data/app/helpers/fab_button_helper.rb +82 -0
- data/app/models/abstract_resource.rb +141 -89
- data/app/models/ancestry_abstract_resource.rb +27 -0
- data/app/models/concerns/roleable.rb +1 -1
- data/app/policies/abstract_resource_policy.rb +25 -0
- data/app/views/abstract_resources/_title.html.haml +2 -0
- data/app/views/abstract_resources/activate.html.haml +5 -0
- data/app/views/abstract_resources/attach.html.haml +6 -0
- data/app/views/abstract_resources/deactivate.html.haml +5 -0
- data/app/views/abstract_resources/defer.html.haml +5 -0
- data/app/views/abstract_resources/destroy.js.haml +2 -1
- data/app/views/abstract_resources/detach.html.haml +5 -0
- data/app/views/abstract_resources/edit.html.haml +4 -9
- data/app/views/abstract_resources/error.html.haml +2 -0
- data/app/views/abstract_resources/error.js.haml +2 -0
- data/app/views/abstract_resources/index.html.haml +27 -0
- data/app/views/abstract_resources/index.js.haml +2 -0
- data/app/views/abstract_resources/new.html.haml +4 -10
- data/app/views/abstract_resources/prefer.html.haml +5 -0
- data/app/views/abstract_resources/print.html.haml +2 -0
- data/app/views/abstract_resources/print.js.haml +2 -0
- data/app/views/abstract_resources/show.html.haml +5 -11
- data/app/views/layouts/_messages.html.haml +1 -0
- data/app/views/layouts/_navigation.html.haml +13 -0
- data/bower.json +34 -0
- data/config/initializers/exception.rb +19 -0
- data/config/initializers/pundit.rb +22 -0
- data/config/routes.rb +24 -0
- data/lib/abstracted.rb +3 -0
- data/lib/abstracted/version.rb +1 -1
- data/lib/abstracted_responder.rb +1 -0
- data/lib/exceptions.rb +61 -0
- data/vendor/assets/components/jquery/.bower.json +38 -0
- data/vendor/assets/components/jquery/MIT-LICENSE.txt +21 -0
- data/vendor/assets/components/jquery/bower.json +28 -0
- data/vendor/assets/components/jquery/dist/jquery.js +9210 -0
- data/vendor/assets/components/jquery/dist/jquery.min.js +5 -0
- data/vendor/assets/components/jquery/dist/jquery.min.map +1 -0
- data/vendor/assets/components/jquery/src/ajax.js +786 -0
- data/vendor/assets/components/jquery/src/ajax/jsonp.js +89 -0
- data/vendor/assets/components/jquery/src/ajax/load.js +75 -0
- data/vendor/assets/components/jquery/src/ajax/parseJSON.js +13 -0
- data/vendor/assets/components/jquery/src/ajax/parseXML.js +28 -0
- data/vendor/assets/components/jquery/src/ajax/script.js +64 -0
- data/vendor/assets/components/jquery/src/ajax/var/nonce.js +5 -0
- data/vendor/assets/components/jquery/src/ajax/var/rquery.js +3 -0
- data/vendor/assets/components/jquery/src/ajax/xhr.js +136 -0
- data/vendor/assets/components/jquery/src/attributes.js +11 -0
- data/vendor/assets/components/jquery/src/attributes/attr.js +141 -0
- data/vendor/assets/components/jquery/src/attributes/classes.js +158 -0
- data/vendor/assets/components/jquery/src/attributes/prop.js +94 -0
- data/vendor/assets/components/jquery/src/attributes/support.js +35 -0
- data/vendor/assets/components/jquery/src/attributes/val.js +161 -0
- data/vendor/assets/components/jquery/src/callbacks.js +205 -0
- data/vendor/assets/components/jquery/src/core.js +502 -0
- data/vendor/assets/components/jquery/src/core/access.js +60 -0
- data/vendor/assets/components/jquery/src/core/init.js +123 -0
- data/vendor/assets/components/jquery/src/core/parseHTML.js +39 -0
- data/vendor/assets/components/jquery/src/core/ready.js +97 -0
- data/vendor/assets/components/jquery/src/core/var/rsingleTag.js +4 -0
- data/vendor/assets/components/jquery/src/css.js +450 -0
- data/vendor/assets/components/jquery/src/css/addGetHookIf.js +22 -0
- data/vendor/assets/components/jquery/src/css/curCSS.js +57 -0
- data/vendor/assets/components/jquery/src/css/defaultDisplay.js +70 -0
- data/vendor/assets/components/jquery/src/css/hiddenVisibleSelectors.js +15 -0
- data/vendor/assets/components/jquery/src/css/support.js +96 -0
- data/vendor/assets/components/jquery/src/css/swap.js +28 -0
- data/vendor/assets/components/jquery/src/css/var/cssExpand.js +3 -0
- data/vendor/assets/components/jquery/src/css/var/getStyles.js +12 -0
- data/vendor/assets/components/jquery/src/css/var/isHidden.js +13 -0
- data/vendor/assets/components/jquery/src/css/var/rmargin.js +3 -0
- data/vendor/assets/components/jquery/src/css/var/rnumnonpx.js +5 -0
- data/vendor/assets/components/jquery/src/data.js +178 -0
- data/vendor/assets/components/jquery/src/data/Data.js +181 -0
- data/vendor/assets/components/jquery/src/data/accepts.js +20 -0
- data/vendor/assets/components/jquery/src/data/var/data_priv.js +5 -0
- data/vendor/assets/components/jquery/src/data/var/data_user.js +5 -0
- data/vendor/assets/components/jquery/src/deferred.js +149 -0
- data/vendor/assets/components/jquery/src/deprecated.js +13 -0
- data/vendor/assets/components/jquery/src/dimensions.js +50 -0
- data/vendor/assets/components/jquery/src/effects.js +648 -0
- data/vendor/assets/components/jquery/src/effects/Tween.js +114 -0
- data/vendor/assets/components/jquery/src/effects/animatedSelector.js +13 -0
- data/vendor/assets/components/jquery/src/event.js +868 -0
- data/vendor/assets/components/jquery/src/event/ajax.js +13 -0
- data/vendor/assets/components/jquery/src/event/alias.js +39 -0
- data/vendor/assets/components/jquery/src/event/support.js +9 -0
- data/vendor/assets/components/jquery/src/exports/amd.js +24 -0
- data/vendor/assets/components/jquery/src/exports/global.js +32 -0
- data/vendor/assets/components/jquery/src/intro.js +44 -0
- data/vendor/assets/components/jquery/src/jquery.js +37 -0
- data/vendor/assets/components/jquery/src/manipulation.js +580 -0
- data/vendor/assets/components/jquery/src/manipulation/_evalUrl.js +18 -0
- data/vendor/assets/components/jquery/src/manipulation/support.js +32 -0
- data/vendor/assets/components/jquery/src/manipulation/var/rcheckableType.js +3 -0
- data/vendor/assets/components/jquery/src/offset.js +207 -0
- data/vendor/assets/components/jquery/src/outro.js +1 -0
- data/vendor/assets/components/jquery/src/queue.js +142 -0
- data/vendor/assets/components/jquery/src/queue/delay.js +22 -0
- data/vendor/assets/components/jquery/src/selector-native.js +172 -0
- data/vendor/assets/components/jquery/src/selector-sizzle.js +14 -0
- data/vendor/assets/components/jquery/src/selector.js +1 -0
- data/vendor/assets/components/jquery/src/serialize.js +111 -0
- data/vendor/assets/components/jquery/src/sizzle/dist/sizzle.js +2067 -0
- data/vendor/assets/components/jquery/src/sizzle/dist/sizzle.min.js +3 -0
- data/vendor/assets/components/jquery/src/sizzle/dist/sizzle.min.map +1 -0
- data/vendor/assets/components/jquery/src/traversing.js +199 -0
- data/vendor/assets/components/jquery/src/traversing/findFilter.js +100 -0
- data/vendor/assets/components/jquery/src/traversing/var/rneedsContext.js +6 -0
- data/vendor/assets/components/jquery/src/var/arr.js +3 -0
- data/vendor/assets/components/jquery/src/var/class2type.js +4 -0
- data/vendor/assets/components/jquery/src/var/concat.js +5 -0
- data/vendor/assets/components/jquery/src/var/hasOwn.js +5 -0
- data/vendor/assets/components/jquery/src/var/indexOf.js +5 -0
- data/vendor/assets/components/jquery/src/var/pnum.js +3 -0
- data/vendor/assets/components/jquery/src/var/push.js +5 -0
- data/vendor/assets/components/jquery/src/var/rnotwhite.js +3 -0
- data/vendor/assets/components/jquery/src/var/slice.js +5 -0
- data/vendor/assets/components/jquery/src/var/strundefined.js +3 -0
- data/vendor/assets/components/jquery/src/var/support.js +4 -0
- data/vendor/assets/components/jquery/src/var/toString.js +5 -0
- data/vendor/assets/components/jquery/src/wrap.js +79 -0
- data/vendor/assets/components/microplugin/.bower.json +38 -0
- data/vendor/assets/components/microplugin/.gitignore +2 -0
- data/vendor/assets/components/microplugin/.npmignore +3 -0
- data/vendor/assets/components/microplugin/README.md +115 -0
- data/vendor/assets/components/microplugin/bower.json +22 -0
- data/vendor/assets/components/microplugin/package.json +15 -0
- data/vendor/assets/components/microplugin/src/microplugin.js +135 -0
- data/vendor/assets/components/selectize/.bower.json +60 -0
- data/vendor/assets/components/selectize/.gitignore +5 -0
- data/vendor/assets/components/selectize/LICENSE +202 -0
- data/vendor/assets/components/selectize/README.md +105 -0
- data/vendor/assets/components/selectize/bower.json +40 -0
- data/vendor/assets/components/selectize/dist/css/selectize.bootstrap2.css +487 -0
- data/vendor/assets/components/selectize/dist/css/selectize.bootstrap3.css +401 -0
- data/vendor/assets/components/selectize/dist/css/selectize.css +317 -0
- data/vendor/assets/components/selectize/dist/css/selectize.default.css +387 -0
- data/vendor/assets/components/selectize/dist/css/selectize.legacy.css +364 -0
- data/vendor/assets/components/selectize/dist/js/selectize.js +3058 -0
- data/vendor/assets/components/selectize/dist/js/selectize.min.js +3 -0
- data/vendor/assets/components/selectize/dist/js/standalone/selectize.js +3667 -0
- data/vendor/assets/components/selectize/dist/js/standalone/selectize.min.js +3 -0
- data/vendor/assets/components/selectize/dist/less/plugins/drag_drop.less +16 -0
- data/vendor/assets/components/selectize/dist/less/plugins/dropdown_header.less +20 -0
- data/vendor/assets/components/selectize/dist/less/plugins/optgroup_columns.less +17 -0
- data/vendor/assets/components/selectize/dist/less/plugins/remove_button.less +37 -0
- data/vendor/assets/components/selectize/dist/less/selectize.bootstrap2.less +161 -0
- data/vendor/assets/components/selectize/dist/less/selectize.bootstrap3.less +150 -0
- data/vendor/assets/components/selectize/dist/less/selectize.default.less +84 -0
- data/vendor/assets/components/selectize/dist/less/selectize.legacy.less +75 -0
- data/vendor/assets/components/selectize/dist/less/selectize.less +295 -0
- data/vendor/assets/components/selectize/karma.conf.js +107 -0
- data/vendor/assets/components/sifter/.bower.json +44 -0
- data/vendor/assets/components/sifter/.gitignore +3 -0
- data/vendor/assets/components/sifter/.npmignore +4 -0
- data/vendor/assets/components/sifter/README.md +149 -0
- data/vendor/assets/components/sifter/bower.json +23 -0
- data/vendor/assets/components/sifter/package.json +48 -0
- data/vendor/assets/components/sifter/sifter.js +471 -0
- data/vendor/assets/components/sifter/sifter.min.js +2 -0
- data/vendor/assets/components/sweetalert/.bower.json +36 -0
- data/vendor/assets/components/sweetalert/.editorconfig +11 -0
- data/vendor/assets/components/sweetalert/.gitignore +5 -0
- data/vendor/assets/components/sweetalert/.jshintrc +11 -0
- data/vendor/assets/components/sweetalert/.travis.yml +6 -0
- data/vendor/assets/components/sweetalert/LICENSE +22 -0
- data/vendor/assets/components/sweetalert/README.md +157 -0
- data/vendor/assets/components/sweetalert/bower.json +25 -0
- data/vendor/assets/components/sweetalert/dev/gulpfile-wrap-template.js +18 -0
- data/vendor/assets/components/sweetalert/dev/ie9.css +23 -0
- data/vendor/assets/components/sweetalert/dev/loader-animation.css +209 -0
- data/vendor/assets/components/sweetalert/dev/modules/default-params.js +26 -0
- data/vendor/assets/components/sweetalert/dev/modules/handle-click.js +128 -0
- data/vendor/assets/components/sweetalert/dev/modules/handle-dom.js +161 -0
- data/vendor/assets/components/sweetalert/dev/modules/handle-key.js +73 -0
- data/vendor/assets/components/sweetalert/dev/modules/handle-swal-dom.js +148 -0
- data/vendor/assets/components/sweetalert/dev/modules/injected-html.js +69 -0
- data/vendor/assets/components/sweetalert/dev/modules/set-params.js +221 -0
- data/vendor/assets/components/sweetalert/dev/modules/utils.js +71 -0
- data/vendor/assets/components/sweetalert/dev/sweetalert.es6.js +311 -0
- data/vendor/assets/components/sweetalert/dev/sweetalert.scss +648 -0
- data/vendor/assets/components/sweetalert/dist/sweetalert-dev.js +1281 -0
- data/vendor/assets/components/sweetalert/dist/sweetalert.css +932 -0
- data/vendor/assets/components/sweetalert/dist/sweetalert.min.js +1 -0
- data/vendor/assets/components/sweetalert/example/example.css +442 -0
- data/vendor/assets/components/sweetalert/example/example.scss +580 -0
- data/vendor/assets/components/sweetalert/example/images/logo_big.png +0 -0
- data/vendor/assets/components/sweetalert/example/images/logo_big@2x.png +0 -0
- data/vendor/assets/components/sweetalert/example/images/logo_small.png +0 -0
- data/vendor/assets/components/sweetalert/example/images/logo_small@2x.png +0 -0
- data/vendor/assets/components/sweetalert/example/images/te-logo-small.svg +12 -0
- data/vendor/assets/components/sweetalert/example/images/thumbs-up.jpg +0 -0
- data/vendor/assets/components/sweetalert/example/images/vs_icon.png +0 -0
- data/vendor/assets/components/sweetalert/example/images/vs_icon@2x.png +0 -0
- data/vendor/assets/components/sweetalert/gulpfile.js +97 -0
- data/vendor/assets/components/sweetalert/index.html +584 -0
- data/vendor/assets/components/sweetalert/package.json +45 -0
- data/vendor/assets/components/sweetalert/sweetalert.gif +0 -0
- data/vendor/assets/components/sweetalert/test/index.html +20 -0
- data/vendor/assets/components/sweetalert/test/tests.js +143 -0
- data/vendor/assets/components/sweetalert/themes/facebook/facebook.css +111 -0
- data/vendor/assets/components/sweetalert/themes/facebook/facebook.scss +146 -0
- data/vendor/assets/components/sweetalert/themes/google/google.css +115 -0
- data/vendor/assets/components/sweetalert/themes/google/google.scss +148 -0
- data/vendor/assets/components/sweetalert/themes/twitter/twitter.css +140 -0
- data/vendor/assets/components/sweetalert/themes/twitter/twitter.scss +177 -0
- metadata +214 -5
- data/abstracted-0.0.4.gem +0 -0
- data/abstracted.gemspec +0 -51
- data/app/views/abstract_resources/index.html.erb +0 -1
@@ -0,0 +1,648 @@
|
|
1
|
+
// SweetAlert
|
2
|
+
// 2014-2015 (c) - Tristan Edwards
|
3
|
+
// github.com/t4t5/sweetalert
|
4
|
+
|
5
|
+
|
6
|
+
body.stop-scrolling {
|
7
|
+
height: 100%;
|
8
|
+
overflow: hidden;
|
9
|
+
}
|
10
|
+
|
11
|
+
.sweet-overlay {
|
12
|
+
background-color: rgb(0, 0, 0); /* IE8 */
|
13
|
+
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; /* IE8 */
|
14
|
+
background-color: rgba(black, 0.4);
|
15
|
+
|
16
|
+
position: fixed;
|
17
|
+
left: 0;
|
18
|
+
right: 0;
|
19
|
+
top: 0;
|
20
|
+
bottom: 0;
|
21
|
+
|
22
|
+
display: none;
|
23
|
+
z-index: 10000;
|
24
|
+
}
|
25
|
+
|
26
|
+
.sweet-alert {
|
27
|
+
$width: 478px;
|
28
|
+
$padding: 17px;
|
29
|
+
|
30
|
+
background-color: white;
|
31
|
+
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
32
|
+
width: $width;
|
33
|
+
padding: $padding;
|
34
|
+
border-radius: 5px;
|
35
|
+
text-align: center;
|
36
|
+
|
37
|
+
position: fixed;
|
38
|
+
left: 50%;
|
39
|
+
top: 50%;
|
40
|
+
margin-left: -($width/2 + $padding);
|
41
|
+
margin-top: -200px;
|
42
|
+
|
43
|
+
overflow: hidden;
|
44
|
+
display: none;
|
45
|
+
z-index: 99999;
|
46
|
+
|
47
|
+
@media all and (max-width: 540px) {
|
48
|
+
width: auto;
|
49
|
+
margin-left: 0;
|
50
|
+
margin-right: 0;
|
51
|
+
|
52
|
+
left: 15px;
|
53
|
+
right: 15px;
|
54
|
+
}
|
55
|
+
|
56
|
+
h2 {
|
57
|
+
color: #575757;
|
58
|
+
font-size: 30px;
|
59
|
+
text-align: center;
|
60
|
+
font-weight: 600;
|
61
|
+
text-transform: none;
|
62
|
+
position: relative;
|
63
|
+
margin: 25px 0;
|
64
|
+
padding: 0;
|
65
|
+
line-height: 40px;
|
66
|
+
display: block;
|
67
|
+
}
|
68
|
+
|
69
|
+
p {
|
70
|
+
color: #797979;
|
71
|
+
font-size: 16px;
|
72
|
+
text-align: center;
|
73
|
+
font-weight: 300;
|
74
|
+
position: relative;
|
75
|
+
text-align: inherit;
|
76
|
+
float: none;
|
77
|
+
margin: 0;
|
78
|
+
padding: 0;
|
79
|
+
line-height: normal;
|
80
|
+
}
|
81
|
+
|
82
|
+
fieldset {
|
83
|
+
border: none;
|
84
|
+
position: relative;
|
85
|
+
}
|
86
|
+
|
87
|
+
.sa-error-container {
|
88
|
+
background-color: #f1f1f1;
|
89
|
+
margin-left: -17px;
|
90
|
+
margin-right: -17px;
|
91
|
+
overflow: hidden;
|
92
|
+
padding: 0 10px;
|
93
|
+
max-height: 0;
|
94
|
+
webkit-transition: padding 0.15s, max-height 0.15s;
|
95
|
+
transition: padding 0.15s, max-height 0.15s;
|
96
|
+
&.show {
|
97
|
+
padding: 10px 0;
|
98
|
+
max-height: 100px;
|
99
|
+
webkit-transition: padding 0.2s, max-height 0.2s;
|
100
|
+
transition: padding 0.25s, max-height 0.25s;
|
101
|
+
}
|
102
|
+
|
103
|
+
.icon {
|
104
|
+
display: inline-block;
|
105
|
+
width: 24px;
|
106
|
+
height: 24px;
|
107
|
+
border-radius: 50%;
|
108
|
+
background-color: rgb(234, 125, 125);
|
109
|
+
color: white;
|
110
|
+
line-height: 24px;
|
111
|
+
text-align: center;
|
112
|
+
margin-right: 3px;
|
113
|
+
}
|
114
|
+
p {
|
115
|
+
display: inline-block;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
.sa-input-error {
|
120
|
+
position: absolute;
|
121
|
+
top: 29px;
|
122
|
+
right: 26px;
|
123
|
+
width: 20px;
|
124
|
+
height: 20px;
|
125
|
+
opacity: 0;
|
126
|
+
-webkit-transform: scale(0.5);
|
127
|
+
transform: scale(0.5);
|
128
|
+
-webkit-transform-origin: 50% 50%;
|
129
|
+
transform-origin: 50% 50%;
|
130
|
+
-webkit-transition: all 0.1s;
|
131
|
+
transition: all 0.1s;
|
132
|
+
&::before, &::after {
|
133
|
+
content: "";
|
134
|
+
width: 20px;
|
135
|
+
height: 6px;
|
136
|
+
background-color: #f06e57;
|
137
|
+
border-radius: 3px;
|
138
|
+
position: absolute;
|
139
|
+
top: 50%;
|
140
|
+
margin-top: -4px;
|
141
|
+
left: 50%;
|
142
|
+
margin-left: -9px;
|
143
|
+
}
|
144
|
+
&::before {
|
145
|
+
-webkit-transform: rotate(-45deg);
|
146
|
+
transform: rotate(-45deg);
|
147
|
+
}
|
148
|
+
&::after {
|
149
|
+
-webkit-transform: rotate(45deg);
|
150
|
+
transform: rotate(45deg);
|
151
|
+
}
|
152
|
+
&.show {
|
153
|
+
opacity: 1;
|
154
|
+
-webkit-transform: scale(1);
|
155
|
+
transform: scale(1);
|
156
|
+
}
|
157
|
+
}
|
158
|
+
|
159
|
+
input {
|
160
|
+
width: 100%;
|
161
|
+
box-sizing: border-box;
|
162
|
+
border-radius: 3px;
|
163
|
+
border: 1px solid rgb(215, 215, 215);
|
164
|
+
height: 43px;
|
165
|
+
margin-top: 10px;
|
166
|
+
margin-bottom: 17px;
|
167
|
+
font-size: 18px;
|
168
|
+
box-shadow: inset 0px 1px 1px rgba(black, 0.06);
|
169
|
+
padding: 0 12px;
|
170
|
+
display: none;
|
171
|
+
-webkit-transition: all 0.3s;
|
172
|
+
transition: all 0.3s;
|
173
|
+
&:focus {
|
174
|
+
outline: none;
|
175
|
+
box-shadow: 0px 0px 3px rgb(196, 230, 245);
|
176
|
+
border: 1px solid rgb(180, 219, 237);
|
177
|
+
&::-moz-placeholder {
|
178
|
+
transition: opacity 0.3s 0.03s ease;
|
179
|
+
opacity: 0.5;
|
180
|
+
}
|
181
|
+
&:-ms-input-placeholder {
|
182
|
+
transition: opacity 0.3s 0.03s ease;
|
183
|
+
opacity: 0.5;
|
184
|
+
}
|
185
|
+
&::-webkit-input-placeholder {
|
186
|
+
transition: opacity 0.3s 0.03s ease;
|
187
|
+
opacity: 0.5;
|
188
|
+
}
|
189
|
+
}
|
190
|
+
&::-moz-placeholder {
|
191
|
+
color: lighten(#575757, 40);
|
192
|
+
}
|
193
|
+
&:-ms-input-placeholder {
|
194
|
+
color: lighten(#575757, 40);
|
195
|
+
}
|
196
|
+
&::-webkit-input-placeholder {
|
197
|
+
color: lighten(#575757, 40);
|
198
|
+
}
|
199
|
+
}
|
200
|
+
&.show-input input {
|
201
|
+
display: block;
|
202
|
+
}
|
203
|
+
|
204
|
+
.sa-confirm-button-container {
|
205
|
+
display: inline-block;
|
206
|
+
position: relative;
|
207
|
+
}
|
208
|
+
|
209
|
+
.la-ball-fall {
|
210
|
+
position: absolute;
|
211
|
+
left: 50%;
|
212
|
+
top: 50%;
|
213
|
+
margin-left: -27px;
|
214
|
+
margin-top: 4px;
|
215
|
+
opacity: 0;
|
216
|
+
visibility: hidden;
|
217
|
+
}
|
218
|
+
|
219
|
+
button {
|
220
|
+
$btnBlue: #8CD4F5;
|
221
|
+
$btnGray: #C1C1C1;
|
222
|
+
|
223
|
+
background-color: $btnBlue;
|
224
|
+
color: white;
|
225
|
+
border: none;
|
226
|
+
box-shadow: none;
|
227
|
+
font-size: 17px;
|
228
|
+
font-weight: 500;
|
229
|
+
-webkit-border-radius: 4px;
|
230
|
+
border-radius: 5px;
|
231
|
+
padding: 10px 32px;
|
232
|
+
margin: 26px 5px 0 5px;
|
233
|
+
cursor: pointer;
|
234
|
+
&:focus {
|
235
|
+
outline: none;
|
236
|
+
box-shadow: 0 0 2px rgba(128, 179, 235, 0.5), inset 0 0 0 1px rgba(0, 0, 0, 0.05);
|
237
|
+
}
|
238
|
+
&:hover {
|
239
|
+
background-color: darken($btnBlue, 3%);
|
240
|
+
}
|
241
|
+
&:active {
|
242
|
+
background-color: darken($btnBlue, 10%);
|
243
|
+
}
|
244
|
+
&.cancel {
|
245
|
+
background-color: $btnGray;
|
246
|
+
&:hover {
|
247
|
+
background-color: darken($btnGray, 3%);
|
248
|
+
}
|
249
|
+
&:active {
|
250
|
+
background-color: darken($btnGray, 10%);
|
251
|
+
}
|
252
|
+
// Cancel button should keep the same style
|
253
|
+
&:focus {
|
254
|
+
box-shadow: rgba(197, 205, 211, 0.8) 0px 0px 2px, rgba(0, 0, 0, 0.0470588) 0px 0px 0px 1px inset !important;
|
255
|
+
}
|
256
|
+
}
|
257
|
+
|
258
|
+
&[disabled] {
|
259
|
+
opacity: .6;
|
260
|
+
cursor: default;
|
261
|
+
}
|
262
|
+
|
263
|
+
&.confirm[disabled] {
|
264
|
+
color: transparent;
|
265
|
+
~ .la-ball-fall {
|
266
|
+
opacity: 1;
|
267
|
+
visibility: visible;
|
268
|
+
transition-delay: 0s;
|
269
|
+
}
|
270
|
+
}
|
271
|
+
|
272
|
+
// Removes selection outline in Firefox
|
273
|
+
&::-moz-focus-inner {
|
274
|
+
border: 0;
|
275
|
+
}
|
276
|
+
}
|
277
|
+
|
278
|
+
// Only show focus-style when there is multiple choice of actions
|
279
|
+
&[data-has-cancel-button=false] button {
|
280
|
+
box-shadow: none !important;
|
281
|
+
}
|
282
|
+
|
283
|
+
&[data-has-confirm-button=false][data-has-cancel-button=false] {
|
284
|
+
padding-bottom: 40px;
|
285
|
+
}
|
286
|
+
|
287
|
+
.sa-icon {
|
288
|
+
$red: #F27474;
|
289
|
+
$orange: #F8BB86;
|
290
|
+
$blue: #C9DAE1;
|
291
|
+
$green: #A5DC86;
|
292
|
+
|
293
|
+
width: 80px;
|
294
|
+
height: 80px;
|
295
|
+
border: 4px solid gray;
|
296
|
+
-webkit-border-radius: 40px;
|
297
|
+
border-radius: 40px;
|
298
|
+
border-radius: 50%;
|
299
|
+
margin: 20px auto;
|
300
|
+
padding: 0;
|
301
|
+
position: relative;
|
302
|
+
box-sizing: content-box;
|
303
|
+
|
304
|
+
&.sa-error {
|
305
|
+
border-color: $red;
|
306
|
+
|
307
|
+
.sa-x-mark {
|
308
|
+
position: relative;
|
309
|
+
display: block;
|
310
|
+
}
|
311
|
+
|
312
|
+
.sa-line {
|
313
|
+
position: absolute;
|
314
|
+
height: 5px;
|
315
|
+
width: 47px;
|
316
|
+
background-color: $red;
|
317
|
+
display: block;
|
318
|
+
top: 37px;
|
319
|
+
border-radius: 2px;
|
320
|
+
|
321
|
+
&.sa-left {
|
322
|
+
-webkit-transform: rotate(45deg);
|
323
|
+
transform: rotate(45deg);
|
324
|
+
left: 17px;
|
325
|
+
}
|
326
|
+
&.sa-right {
|
327
|
+
-webkit-transform: rotate(-45deg);
|
328
|
+
transform: rotate(-45deg);
|
329
|
+
right: 16px;
|
330
|
+
}
|
331
|
+
}
|
332
|
+
}
|
333
|
+
&.sa-warning {
|
334
|
+
border-color: $orange;
|
335
|
+
|
336
|
+
.sa-body { // Exclamation mark body
|
337
|
+
position: absolute;
|
338
|
+
width: 5px;
|
339
|
+
height: 47px;
|
340
|
+
left: 50%;
|
341
|
+
top: 10px;
|
342
|
+
-webkit-border-radius: 2px;
|
343
|
+
border-radius: 2px;
|
344
|
+
margin-left: -2px;
|
345
|
+
background-color: $orange;
|
346
|
+
}
|
347
|
+
.sa-dot { // Exclamation mark dot
|
348
|
+
position: absolute;
|
349
|
+
width: 7px;
|
350
|
+
height: 7px;
|
351
|
+
-webkit-border-radius: 50%;
|
352
|
+
border-radius: 50%;
|
353
|
+
margin-left: -3px;
|
354
|
+
left: 50%;
|
355
|
+
bottom: 10px;
|
356
|
+
background-color: $orange;
|
357
|
+
}
|
358
|
+
}
|
359
|
+
&.sa-info {
|
360
|
+
border-color: $blue;
|
361
|
+
|
362
|
+
&::before { // i-letter body
|
363
|
+
content: "";
|
364
|
+
position: absolute;
|
365
|
+
width: 5px;
|
366
|
+
height: 29px;
|
367
|
+
left: 50%;
|
368
|
+
bottom: 17px;
|
369
|
+
border-radius: 2px;
|
370
|
+
margin-left: -2px;
|
371
|
+
background-color: $blue;
|
372
|
+
}
|
373
|
+
&::after { // i-letter dot
|
374
|
+
content: "";
|
375
|
+
position: absolute;
|
376
|
+
width: 7px;
|
377
|
+
height: 7px;
|
378
|
+
border-radius: 50%;
|
379
|
+
margin-left: -3px;
|
380
|
+
top: 19px;
|
381
|
+
background-color: $blue;
|
382
|
+
}
|
383
|
+
}
|
384
|
+
&.sa-success {
|
385
|
+
border-color: $green;
|
386
|
+
|
387
|
+
&::before, &::after { // Emulate moving circular line
|
388
|
+
content: '';
|
389
|
+
-webkit-border-radius: 40px;
|
390
|
+
border-radius: 40px;
|
391
|
+
border-radius: 50%;
|
392
|
+
position: absolute;
|
393
|
+
width: 60px;
|
394
|
+
height: 120px;
|
395
|
+
background: white;
|
396
|
+
-webkit-transform: rotate(45deg);
|
397
|
+
transform: rotate(45deg);
|
398
|
+
}
|
399
|
+
&::before {
|
400
|
+
-webkit-border-radius: 120px 0 0 120px;
|
401
|
+
border-radius: 120px 0 0 120px;
|
402
|
+
top: -7px;
|
403
|
+
left: -33px;
|
404
|
+
|
405
|
+
-webkit-transform: rotate(-45deg);
|
406
|
+
transform: rotate(-45deg);
|
407
|
+
-webkit-transform-origin: 60px 60px;
|
408
|
+
transform-origin: 60px 60px;
|
409
|
+
}
|
410
|
+
&::after {
|
411
|
+
-webkit-border-radius: 0 120px 120px 0;
|
412
|
+
border-radius: 0 120px 120px 0;
|
413
|
+
top: -11px;
|
414
|
+
left: 30px;
|
415
|
+
|
416
|
+
-webkit-transform: rotate(-45deg);
|
417
|
+
transform: rotate(-45deg);
|
418
|
+
-webkit-transform-origin: 0px 60px;
|
419
|
+
transform-origin: 0px 60px;
|
420
|
+
}
|
421
|
+
|
422
|
+
.sa-placeholder { // Ring
|
423
|
+
width: 80px;
|
424
|
+
height: 80px;
|
425
|
+
border: 4px solid rgba($green, 0.2);
|
426
|
+
-webkit-border-radius: 40px;
|
427
|
+
border-radius: 40px;
|
428
|
+
border-radius: 50%;
|
429
|
+
box-sizing: content-box;
|
430
|
+
|
431
|
+
position: absolute;
|
432
|
+
left: -4px;
|
433
|
+
top: -4px;
|
434
|
+
z-index: 2;
|
435
|
+
}
|
436
|
+
|
437
|
+
.sa-fix { // Hide corners left from animation
|
438
|
+
width: 5px;
|
439
|
+
height: 90px;
|
440
|
+
background-color: white;
|
441
|
+
|
442
|
+
position: absolute;
|
443
|
+
left: 28px;
|
444
|
+
top: 8px;
|
445
|
+
z-index: 1;
|
446
|
+
|
447
|
+
-webkit-transform: rotate(-45deg);
|
448
|
+
transform: rotate(-45deg);
|
449
|
+
}
|
450
|
+
|
451
|
+
.sa-line {
|
452
|
+
height: 5px;
|
453
|
+
background-color: $green;
|
454
|
+
display: block;
|
455
|
+
border-radius: 2px;
|
456
|
+
|
457
|
+
position: absolute;
|
458
|
+
z-index: 2;
|
459
|
+
|
460
|
+
&.sa-tip {
|
461
|
+
width: 25px;
|
462
|
+
|
463
|
+
left: 14px;
|
464
|
+
top: 46px;
|
465
|
+
|
466
|
+
-webkit-transform: rotate(45deg);
|
467
|
+
transform: rotate(45deg);
|
468
|
+
}
|
469
|
+
&.sa-long {
|
470
|
+
width: 47px;
|
471
|
+
|
472
|
+
right: 8px;
|
473
|
+
top: 38px;
|
474
|
+
|
475
|
+
-webkit-transform: rotate(-45deg);
|
476
|
+
transform: rotate(-45deg);
|
477
|
+
}
|
478
|
+
}
|
479
|
+
}
|
480
|
+
&.sa-custom {
|
481
|
+
background-size: contain;
|
482
|
+
border-radius: 0;
|
483
|
+
border: none;
|
484
|
+
background-position: center center;
|
485
|
+
background-repeat: no-repeat;
|
486
|
+
}
|
487
|
+
}
|
488
|
+
|
489
|
+
}
|
490
|
+
|
491
|
+
/*
|
492
|
+
* Animations
|
493
|
+
*/
|
494
|
+
|
495
|
+
@mixin keyframes($animation-name) {
|
496
|
+
@-webkit-keyframes #{$animation-name} {
|
497
|
+
@content;
|
498
|
+
}
|
499
|
+
@keyframes #{$animation-name} {
|
500
|
+
@content;
|
501
|
+
}
|
502
|
+
}
|
503
|
+
@mixin animation($str) {
|
504
|
+
-webkit-animation: #{$str};
|
505
|
+
animation: #{$str};
|
506
|
+
}
|
507
|
+
|
508
|
+
|
509
|
+
// Modal animation
|
510
|
+
|
511
|
+
@include keyframes(showSweetAlert) {
|
512
|
+
0% { transform: scale(0.7); -webkit-transform: scale(0.7); }
|
513
|
+
45% { transform: scale(1.05); -webkit-transform: scale(1.05); }
|
514
|
+
80% { transform: scale(0.95); -webkit-transform: scale(0.95); }
|
515
|
+
100% { transform: scale(1); -webkit-transform: scale(1); }
|
516
|
+
}
|
517
|
+
@include keyframes(hideSweetAlert) {
|
518
|
+
0% { transform: scale(1); -webkit-transform: scale(1); }
|
519
|
+
100% { transform: scale(0.5); -webkit-transform: scale(0.5); }
|
520
|
+
}
|
521
|
+
|
522
|
+
@include keyframes(slideFromTop) {
|
523
|
+
0% { top: 0%; }
|
524
|
+
100% { top: 50%; }
|
525
|
+
}
|
526
|
+
@include keyframes(slideToTop) {
|
527
|
+
0% { top: 50%; }
|
528
|
+
100% { top: 0%; }
|
529
|
+
}
|
530
|
+
|
531
|
+
@include keyframes(slideFromBottom) {
|
532
|
+
0% { top: 70%; }
|
533
|
+
100% { top: 50%; }
|
534
|
+
}
|
535
|
+
@include keyframes(slideToBottom) {
|
536
|
+
0% { top: 50%; }
|
537
|
+
100% { top: 70%; }
|
538
|
+
}
|
539
|
+
|
540
|
+
.showSweetAlert {
|
541
|
+
&[data-animation=pop] {
|
542
|
+
@include animation('showSweetAlert 0.3s');
|
543
|
+
}
|
544
|
+
&[data-animation=none] {
|
545
|
+
@include animation('none');
|
546
|
+
}
|
547
|
+
&[data-animation=slide-from-top] {
|
548
|
+
@include animation('slideFromTop 0.3s');
|
549
|
+
}
|
550
|
+
&[data-animation=slide-from-bottom] {
|
551
|
+
@include animation('slideFromBottom 0.3s');
|
552
|
+
}
|
553
|
+
}
|
554
|
+
|
555
|
+
.hideSweetAlert {
|
556
|
+
&[data-animation=pop] {
|
557
|
+
@include animation('hideSweetAlert 0.2s');
|
558
|
+
}
|
559
|
+
&[data-animation=none] {
|
560
|
+
@include animation('none');
|
561
|
+
}
|
562
|
+
&[data-animation=slide-from-top] {
|
563
|
+
@include animation('slideToTop 0.4s');
|
564
|
+
}
|
565
|
+
&[data-animation=slide-from-bottom] {
|
566
|
+
@include animation('slideToBottom 0.3s');
|
567
|
+
}
|
568
|
+
}
|
569
|
+
|
570
|
+
|
571
|
+
|
572
|
+
// Success icon animation
|
573
|
+
|
574
|
+
@include keyframes(animateSuccessTip) {
|
575
|
+
0% { width: 0; left: 1px; top: 19px; }
|
576
|
+
54% { width: 0; left: 1px; top: 19px; }
|
577
|
+
70% { width: 50px; left: -8px; top: 37px; }
|
578
|
+
84% { width: 17px; left: 21px; top: 48px; }
|
579
|
+
100% { width: 25px; left: 14px; top: 45px; }
|
580
|
+
}
|
581
|
+
@include keyframes(animateSuccessLong) {
|
582
|
+
0% { width: 0; right: 46px; top: 54px; }
|
583
|
+
65% { width: 0; right: 46px; top: 54px; }
|
584
|
+
84% { width: 55px; right: 0px; top: 35px; }
|
585
|
+
100% { width: 47px; right: 8px; top: 38px; }
|
586
|
+
}
|
587
|
+
@include keyframes(rotatePlaceholder) {
|
588
|
+
0% { transform: rotate(-45deg); -webkit-transform: rotate(-45deg); }
|
589
|
+
5% { transform: rotate(-45deg); -webkit-transform: rotate(-45deg); }
|
590
|
+
12% { transform: rotate(-405deg); -webkit-transform: rotate(-405deg); }
|
591
|
+
100% { transform: rotate(-405deg); -webkit-transform: rotate(-405deg); }
|
592
|
+
}
|
593
|
+
|
594
|
+
.animateSuccessTip {
|
595
|
+
@include animation('animateSuccessTip 0.75s');
|
596
|
+
}
|
597
|
+
.animateSuccessLong {
|
598
|
+
@include animation('animateSuccessLong 0.75s');
|
599
|
+
}
|
600
|
+
.sa-icon.sa-success.animate::after {
|
601
|
+
@include animation('rotatePlaceholder 4.25s ease-in');
|
602
|
+
}
|
603
|
+
|
604
|
+
|
605
|
+
// Error icon animation
|
606
|
+
|
607
|
+
@include keyframes(animateErrorIcon) {
|
608
|
+
0% { transform: rotateX(100deg); -webkit-transform: rotateX(100deg); opacity: 0; }
|
609
|
+
100% { transform: rotateX(0deg); -webkit-transform: rotateX(0deg); opacity: 1; }
|
610
|
+
}
|
611
|
+
.animateErrorIcon {
|
612
|
+
@include animation('animateErrorIcon 0.5s');
|
613
|
+
}
|
614
|
+
@include keyframes(animateXMark) {
|
615
|
+
0% { transform: scale(0.4); -webkit-transform: scale(0.4); margin-top: 26px; opacity: 0; }
|
616
|
+
50% { transform: scale(0.4); -webkit-transform: scale(0.4); margin-top: 26px; opacity: 0; }
|
617
|
+
80% { transform: scale(1.15); -webkit-transform: scale(1.15); margin-top: -6px; }
|
618
|
+
100% { transform: scale(1); -webkit-transform: scale(1); margin-top: 0; opacity: 1; }
|
619
|
+
}
|
620
|
+
.animateXMark {
|
621
|
+
@include animation('animateXMark 0.5s');
|
622
|
+
}
|
623
|
+
|
624
|
+
@include keyframes(pulseWarning) {
|
625
|
+
0% { border-color: #F8D486; }
|
626
|
+
100% { border-color: #F8BB86; }
|
627
|
+
}
|
628
|
+
.pulseWarning {
|
629
|
+
@include animation('pulseWarning 0.75s infinite alternate');
|
630
|
+
}
|
631
|
+
|
632
|
+
@include keyframes(pulseWarningIns) {
|
633
|
+
0% { background-color: #F8D486; }
|
634
|
+
100% { background-color: #F8BB86; }
|
635
|
+
}
|
636
|
+
.pulseWarningIns {
|
637
|
+
@include animation('pulseWarningIns 0.75s infinite alternate');
|
638
|
+
}
|
639
|
+
|
640
|
+
@include keyframes(rotate-loading) {
|
641
|
+
0% {
|
642
|
+
transform: rotate(0deg);
|
643
|
+
}
|
644
|
+
|
645
|
+
100% {
|
646
|
+
transform: rotate(360deg);
|
647
|
+
}
|
648
|
+
}
|