tolaria 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +66 -0
- data/.yardopts +4 -0
- data/CNAME +1 -0
- data/CONTRIBUTING.md +32 -0
- data/Gemfile +2 -0
- data/LICENSE.md +9 -0
- data/README.md +538 -0
- data/Rakefile +52 -0
- data/app/assets/fonts/admin/fontawesome.eot +0 -0
- data/app/assets/fonts/admin/fontawesome.svg +565 -0
- data/app/assets/fonts/admin/fontawesome.ttf +0 -0
- data/app/assets/fonts/admin/fontawesome.woff +0 -0
- data/app/assets/fonts/admin/fontawesome.woff2 +0 -0
- data/app/assets/images/admin/columbia_banner.png +0 -0
- data/app/assets/images/admin/favicon.ico +0 -0
- data/app/assets/images/admin/noise.png +0 -0
- data/app/assets/images/admin/select_arrows.svg +1 -0
- data/app/assets/javascripts/admin/admin.js +4 -0
- data/app/assets/javascripts/admin/base.js +12 -0
- data/app/assets/javascripts/admin/lib/backbone.js +1888 -0
- data/app/assets/javascripts/admin/lib/jquery.chosen.js +1272 -0
- data/app/assets/javascripts/admin/lib/jquery.js +10361 -0
- data/app/assets/javascripts/admin/lib/jquery.selection.js +352 -0
- data/app/assets/javascripts/admin/lib/moment.js +3103 -0
- data/app/assets/javascripts/admin/lib/no.js +6 -0
- data/app/assets/javascripts/admin/lib/underscore.js +1570 -0
- data/app/assets/javascripts/admin/models/composer_buttons.js +45 -0
- data/app/assets/javascripts/admin/models/rails_meta.js +4 -0
- data/app/assets/javascripts/admin/views/field_with_errors.js +19 -0
- data/app/assets/javascripts/admin/views/fields/attachment_field.js +32 -0
- data/app/assets/javascripts/admin/views/fields/has_many.js +64 -0
- data/app/assets/javascripts/admin/views/fields/image_association_select.js +31 -0
- data/app/assets/javascripts/admin/views/fields/markdown_composer.js +167 -0
- data/app/assets/javascripts/admin/views/fields/searchable_select.js +70 -0
- data/app/assets/javascripts/admin/views/fields/slug_field.js +38 -0
- data/app/assets/javascripts/admin/views/fields/swatch_field.js +55 -0
- data/app/assets/javascripts/admin/views/fields/timestamp_field.js +80 -0
- data/app/assets/javascripts/admin/views/flash_message.js +18 -0
- data/app/assets/javascripts/admin/views/form_orchestrator.js +41 -0
- data/app/assets/javascripts/admin/views/navigation.js +20 -0
- data/app/assets/javascripts/admin/views/resource_form.js +18 -0
- data/app/assets/javascripts/admin/views/search_form.js +20 -0
- data/app/assets/javascripts/admin/views/sessions.js +109 -0
- data/app/assets/javascripts/admin/views/virtual_form.js +47 -0
- data/app/assets/stylesheets/admin/_base.scss +5 -0
- data/app/assets/stylesheets/admin/_reset.scss +149 -0
- data/app/assets/stylesheets/admin/_root.scss +63 -0
- data/app/assets/stylesheets/admin/admin.scss +4 -0
- data/app/assets/stylesheets/admin/components/_blank_slate.scss +44 -0
- data/app/assets/stylesheets/admin/components/_buttons.scss +82 -0
- data/app/assets/stylesheets/admin/components/_flash_message.scss +64 -0
- data/app/assets/stylesheets/admin/components/_footer.scss +9 -0
- data/app/assets/stylesheets/admin/components/_header.scss +107 -0
- data/app/assets/stylesheets/admin/components/_index_table.scss +120 -0
- data/app/assets/stylesheets/admin/components/_main.scss +68 -0
- data/app/assets/stylesheets/admin/components/_markdown_body.scss +109 -0
- data/app/assets/stylesheets/admin/components/_navigation.scss +110 -0
- data/app/assets/stylesheets/admin/components/_pagination.scss +36 -0
- data/app/assets/stylesheets/admin/components/_pill.scss +11 -0
- data/app/assets/stylesheets/admin/components/_resource_form.scss +222 -0
- data/app/assets/stylesheets/admin/components/_search_form.scss +36 -0
- data/app/assets/stylesheets/admin/components/_sessions.scss +152 -0
- data/app/assets/stylesheets/admin/components/_show_table.scss +67 -0
- data/app/assets/stylesheets/admin/components/forms/_attachment_field.scss +59 -0
- data/app/assets/stylesheets/admin/components/forms/_chosen.scss +478 -0
- data/app/assets/stylesheets/admin/components/forms/_image_association_select.scss +20 -0
- data/app/assets/stylesheets/admin/components/forms/_markdown_composer.scss +149 -0
- data/app/assets/stylesheets/admin/components/forms/_nested_fields.scss +63 -0
- data/app/assets/stylesheets/admin/components/forms/_searchable_select.scss +8 -0
- data/app/assets/stylesheets/admin/components/forms/_slug_field.scss +20 -0
- data/app/assets/stylesheets/admin/components/forms/_swatch_field.scss +47 -0
- data/app/assets/stylesheets/admin/components/forms/_timestamp_field.scss +15 -0
- data/app/assets/stylesheets/admin/components/help_link.scss +6 -0
- data/app/assets/stylesheets/admin/mixins/_clearfix.scss +18 -0
- data/app/assets/stylesheets/admin/mixins/_min_max_width.scss +11 -0
- data/app/assets/stylesheets/admin/mixins/_rgbb.scss +7 -0
- data/app/assets/stylesheets/admin/mixins/_visuallyhidden.scss +33 -0
- data/app/assets/stylesheets/admin/settings/_animations.scss +21 -0
- data/app/assets/stylesheets/admin/settings/_breakpoints.scss +2 -0
- data/app/assets/stylesheets/admin/settings/_colors.scss +32 -0
- data/app/assets/stylesheets/admin/settings/_fonts.scss +31 -0
- data/app/assets/stylesheets/admin/settings/_icons.scss +1658 -0
- data/app/controllers/admin/admin_controller.rb +21 -0
- data/app/controllers/admin/sessions_controller.rb +112 -0
- data/app/controllers/tolaria/resource_controller.rb +132 -0
- data/app/controllers/tolaria/tolaria_controller.rb +40 -0
- data/app/helpers/admin/table_helper.rb +175 -0
- data/app/helpers/admin/view_helper.rb +76 -0
- data/app/mailers/passcode_mailer.rb +11 -0
- data/app/models/administrator.rb +146 -0
- data/app/views/admin/administrators/_form.html.erb +16 -0
- data/app/views/admin/administrators/_index.html.erb +20 -0
- data/app/views/admin/administrators/_search.html.erb +5 -0
- data/app/views/admin/administrators/_show.html.erb +14 -0
- data/app/views/admin/help/help_link.html.erb +16 -0
- data/app/views/admin/session/form.html.erb +52 -0
- data/app/views/admin/shared/_flash_messages.html.erb +42 -0
- data/app/views/admin/shared/_footer.html.erb +8 -0
- data/app/views/admin/shared/_head.html.erb +11 -0
- data/app/views/admin/shared/_header.html.erb +43 -0
- data/app/views/admin/shared/_navigation.html.erb +47 -0
- data/app/views/admin/shared/_skiplinks.html.erb +0 -0
- data/app/views/admin/shared/forms/_attachment_field.html.erb +17 -0
- data/app/views/admin/shared/forms/_has_many.html.erb +14 -0
- data/app/views/admin/shared/forms/_has_many_header.html.erb +19 -0
- data/app/views/admin/shared/forms/_image_association_select.html.erb +6 -0
- data/app/views/admin/shared/forms/_image_field.html.erb +19 -0
- data/app/views/admin/shared/forms/_markdown_composer.html.erb +29 -0
- data/app/views/admin/shared/forms/_searchable_select.html.erb +3 -0
- data/app/views/admin/shared/forms/_slug_field.html.erb +9 -0
- data/app/views/admin/shared/forms/_swatch_field.html.erb +4 -0
- data/app/views/admin/shared/forms/_timestamp_field.html.erb +19 -0
- data/app/views/admin/tolaria_resource/_form_buttons.html.erb +10 -0
- data/app/views/admin/tolaria_resource/_index_table.html.erb +73 -0
- data/app/views/admin/tolaria_resource/_search_form.html.erb +32 -0
- data/app/views/admin/tolaria_resource/_show_buttons.html.erb +13 -0
- data/app/views/admin/tolaria_resource/edit.html.erb +34 -0
- data/app/views/admin/tolaria_resource/index.html.erb +36 -0
- data/app/views/admin/tolaria_resource/new.html.erb +1 -0
- data/app/views/admin/tolaria_resource/show.html.erb +52 -0
- data/app/views/kaminari/admin/_first_page.html.erb +9 -0
- data/app/views/kaminari/admin/_last_page.html.erb +9 -0
- data/app/views/kaminari/admin/_next_page.html.erb +9 -0
- data/app/views/kaminari/admin/_page.html.erb +17 -0
- data/app/views/kaminari/admin/_paginator.html.erb +21 -0
- data/app/views/kaminari/admin/_prev_page.html.erb +9 -0
- data/app/views/layouts/admin/admin.html.erb +21 -0
- data/app/views/layouts/admin/sessions.html.erb +12 -0
- data/app/views/passcode_mailer/passcode.text.erb +5 -0
- data/lib/generators/tolaria/install/install_generator.rb +21 -0
- data/lib/generators/tolaria/install/templates/administrators_migration.rb +31 -0
- data/lib/generators/tolaria/install/templates/tolaria_initializer.rb +93 -0
- data/lib/tasks/admin.rake +32 -0
- data/lib/tolaria.rb +27 -0
- data/lib/tolaria/active_record.rb +55 -0
- data/lib/tolaria/admin.rb +4 -0
- data/lib/tolaria/categories.rb +21 -0
- data/lib/tolaria/config.rb +40 -0
- data/lib/tolaria/default_config.rb +74 -0
- data/lib/tolaria/engine.rb +23 -0
- data/lib/tolaria/form_buildable.rb +203 -0
- data/lib/tolaria/help_links.rb +78 -0
- data/lib/tolaria/introspection.rb +13 -0
- data/lib/tolaria/manage.rb +57 -0
- data/lib/tolaria/managed_class.rb +90 -0
- data/lib/tolaria/markdown.rb +28 -0
- data/lib/tolaria/random_tokens.rb +16 -0
- data/lib/tolaria/reload.rb +21 -0
- data/lib/tolaria/routes.rb +33 -0
- data/lib/tolaria/version.rb +13 -0
- data/test/demo/Rakefile +4 -0
- data/test/demo/app/assets/javascripts/application.js +1 -0
- data/test/demo/app/assets/stylesheets/application.scss +1 -0
- data/test/demo/app/controllers/application_controller.rb +5 -0
- data/test/demo/app/controllers/concerns/.keep +0 -0
- data/test/demo/app/controllers/homepage_controller.rb +4 -0
- data/test/demo/app/helpers/application_helper.rb +2 -0
- data/test/demo/app/mailers/.keep +0 -0
- data/test/demo/app/models/.keep +0 -0
- data/test/demo/app/models/blog_post.rb +43 -0
- data/test/demo/app/models/footnote.rb +5 -0
- data/test/demo/app/models/image.rb +19 -0
- data/test/demo/app/models/legal_page.rb +24 -0
- data/test/demo/app/models/miscellany.rb +12 -0
- data/test/demo/app/models/topic.rb +22 -0
- data/test/demo/app/models/video.rb +16 -0
- data/test/demo/app/views/admin/blog_posts/_form.html.erb +48 -0
- data/test/demo/app/views/admin/blog_posts/_search.html.erb +5 -0
- data/test/demo/app/views/admin/help/markdown-help.md +95 -0
- data/test/demo/app/views/admin/images/_form.html.erb +26 -0
- data/test/demo/app/views/admin/legal_pages/_form.html.erb +15 -0
- data/test/demo/app/views/admin/topics/_form.html.erb +3 -0
- data/test/demo/app/views/admin/videos/_form.html.erb +11 -0
- data/test/demo/app/views/homepage/homepage.html.erb +3 -0
- data/test/demo/app/views/layouts/application.html.erb +14 -0
- data/test/demo/bin/bundle +3 -0
- data/test/demo/bin/rails +4 -0
- data/test/demo/bin/rake +4 -0
- data/test/demo/bin/setup +29 -0
- data/test/demo/config.ru +4 -0
- data/test/demo/config/application.rb +26 -0
- data/test/demo/config/boot.rb +4 -0
- data/test/demo/config/database.yml +18 -0
- data/test/demo/config/environment.rb +3 -0
- data/test/demo/config/environments/development.rb +43 -0
- data/test/demo/config/environments/test.rb +44 -0
- data/test/demo/config/initializers/assets.rb +11 -0
- data/test/demo/config/initializers/cookies_serializer.rb +2 -0
- data/test/demo/config/initializers/filter_parameter_logging.rb +3 -0
- data/test/demo/config/initializers/inflections.rb +17 -0
- data/test/demo/config/initializers/markdown.rb +44 -0
- data/test/demo/config/initializers/secret_token.rb +2 -0
- data/test/demo/config/initializers/session_store.rb +2 -0
- data/test/demo/config/initializers/tolaria.rb +17 -0
- data/test/demo/config/initializers/wrap_parameters.rb +14 -0
- data/test/demo/config/routes.rb +4 -0
- data/test/demo/db/migrate/20150601202901_create_administrators.rb +31 -0
- data/test/demo/db/migrate/20150603204006_add_testing_models.rb +27 -0
- data/test/demo/db/migrate/20150609232013_create_footnotes.rb +10 -0
- data/test/demo/db/migrate/20150610135235_create_additional_demo_objects.rb +50 -0
- data/test/demo/db/schema.rb +112 -0
- data/test/demo/log/.keep +0 -0
- data/test/demo/public/404.html +67 -0
- data/test/demo/public/422.html +67 -0
- data/test/demo/public/500.html +66 -0
- data/test/demo/public/favicon.ico +0 -0
- data/test/integration/help_link_test.rb +73 -0
- data/test/integration/interface_test.rb +63 -0
- data/test/integration/router_test.rb +73 -0
- data/test/integration/session_test.rb +88 -0
- data/test/test_helper.rb +58 -0
- data/test/unit/configuration_test.rb +21 -0
- data/test/unit/managed_classes_test.rb +54 -0
- data/test/unit/markdown_test.rb +12 -0
- data/test/unit/menu_test.rb +32 -0
- data/test/unit/random_tokens_test.rb +13 -0
- data/tolaria.gemspec +35 -0
- metadata +499 -0
@@ -0,0 +1,36 @@
|
|
1
|
+
.search-form {
|
2
|
+
|
3
|
+
@include clearfix;
|
4
|
+
position: relative;
|
5
|
+
background: black(0.02);
|
6
|
+
padding: 25px 15px 25px 15px;
|
7
|
+
border-bottom: 1px solid $cGrey;
|
8
|
+
width: 100%;
|
9
|
+
float: right;
|
10
|
+
|
11
|
+
label {
|
12
|
+
@include min-width($bpFull) {
|
13
|
+
text-align: right;
|
14
|
+
padding-right: 15px;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
& > input,
|
19
|
+
& > select,
|
20
|
+
& > div:not(&-controlls) {
|
21
|
+
margin-bottom: 15px;
|
22
|
+
}
|
23
|
+
|
24
|
+
&-controlls {
|
25
|
+
@include clearfix;
|
26
|
+
clear: both;
|
27
|
+
display: block;
|
28
|
+
text-align: left;
|
29
|
+
margin: 5px 0 0 0;
|
30
|
+
@include min-width($bpFull) {
|
31
|
+
float: right;
|
32
|
+
width: 80%;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
}
|
@@ -0,0 +1,152 @@
|
|
1
|
+
$cSessionPlaceholder: #888;
|
2
|
+
|
3
|
+
.admin-session {
|
4
|
+
background-image:
|
5
|
+
asset-data-url("admin/noise.png"),
|
6
|
+
linear-gradient(to bottom, darken(#373D4A, 10), #573C5E);
|
7
|
+
background-repeat: repeat;
|
8
|
+
height: 100%;
|
9
|
+
}
|
10
|
+
|
11
|
+
.session-form {
|
12
|
+
|
13
|
+
display: block;
|
14
|
+
margin: 15% auto 0 auto;
|
15
|
+
width: 100%;
|
16
|
+
max-width: 350px;
|
17
|
+
|
18
|
+
input[type=text],
|
19
|
+
input[type=email] {
|
20
|
+
background: #E7E6E8;
|
21
|
+
border-radius: 2px;
|
22
|
+
border-width: 2px;
|
23
|
+
box-shadow: 0px 1px 0px black(0.5);
|
24
|
+
border: 2px solid transparent;
|
25
|
+
color: $cPlum;
|
26
|
+
transition: border-color 100ms linear;
|
27
|
+
display: block;
|
28
|
+
font-size: 18px;
|
29
|
+
padding: 10px 12px;
|
30
|
+
text-align: center;
|
31
|
+
width: 100%;
|
32
|
+
&:focus, &:active {
|
33
|
+
border-color: darken($cSapphire, 10);
|
34
|
+
border-bottom-color: $cSapphire;
|
35
|
+
border-right-color: $cSapphire;
|
36
|
+
background: #fff;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
|
41
|
+
&-checkbox-group {
|
42
|
+
|
43
|
+
@include clearfix;
|
44
|
+
display: block;
|
45
|
+
width: 100%;
|
46
|
+
margin: 20px auto 20px auto;
|
47
|
+
text-align: center;
|
48
|
+
line-height: 32px;
|
49
|
+
|
50
|
+
input[type=checkbox] {
|
51
|
+
-webkit-appearance: none;
|
52
|
+
width: 32px;
|
53
|
+
height: 32px;
|
54
|
+
border-radius: 4px;
|
55
|
+
display: inline-block;
|
56
|
+
background: transparent;
|
57
|
+
font-size: 20px;
|
58
|
+
border: 2px solid transparentize($cWhite, 0.5);
|
59
|
+
&:after {
|
60
|
+
color: transparent;
|
61
|
+
content: "\2714\FE0E";
|
62
|
+
display: block;
|
63
|
+
font-family: $fHelvetica;
|
64
|
+
font-size: 20px;
|
65
|
+
height: 30px;
|
66
|
+
line-height: 30px;
|
67
|
+
text-align: center;
|
68
|
+
width: 30px;
|
69
|
+
}
|
70
|
+
&:checked {
|
71
|
+
border-color: $cWhite;
|
72
|
+
}
|
73
|
+
&:checked:after {
|
74
|
+
color: $cWhite;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
label {
|
79
|
+
color: $cWhite;
|
80
|
+
display: inline-block;
|
81
|
+
margin: 0 0 0 8px;
|
82
|
+
font-size: 18px;
|
83
|
+
font-weight: normal;
|
84
|
+
}
|
85
|
+
|
86
|
+
}
|
87
|
+
|
88
|
+
h1 {
|
89
|
+
color: $cWhite;
|
90
|
+
font-size: 28px;
|
91
|
+
font-weight: 200;
|
92
|
+
text-align: center;
|
93
|
+
margin: 0 0 25px 0;
|
94
|
+
line-height: 1.1;
|
95
|
+
}
|
96
|
+
|
97
|
+
input::-webkit-input-placeholder {color: $cSessionPlaceholder}
|
98
|
+
input:-moz-placeholder {color: $cSessionPlaceholder}
|
99
|
+
input::-moz-placeholder {color: $cSessionPlaceholder}
|
100
|
+
input:-ms-input-placeholder {color: $cSessionPlaceholder}
|
101
|
+
|
102
|
+
.session-button {
|
103
|
+
font-size: 18px;
|
104
|
+
transition: background-color 100ms linear;
|
105
|
+
display: block;
|
106
|
+
color: $cWhite;
|
107
|
+
border: 2px solid white;
|
108
|
+
background: none;
|
109
|
+
padding: 10px 0;
|
110
|
+
border-radius: 2px;
|
111
|
+
box-shadow: 0px 1px 0px black(0.5);
|
112
|
+
width: 100%;
|
113
|
+
margin: 20px auto 20px auto;
|
114
|
+
&:hover, &:focus, &:active {
|
115
|
+
background: white(0.10);
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
.session-spinner {
|
120
|
+
-webkit-animation: fa-spin 300ms infinite linear;
|
121
|
+
animation: fa-spin 300ms infinite linear;
|
122
|
+
border-radius: 100%;
|
123
|
+
border-top: 2px solid $cWhite;
|
124
|
+
display: block;
|
125
|
+
height: 46px;
|
126
|
+
margin: 15px auto 0 auto;
|
127
|
+
width: 46px;
|
128
|
+
}
|
129
|
+
|
130
|
+
&-resend {
|
131
|
+
text-align: center;
|
132
|
+
margin: 60px 0 0 0;
|
133
|
+
button {
|
134
|
+
background: none;
|
135
|
+
color: $cWhite;
|
136
|
+
display: inline-block;
|
137
|
+
color: transparentize($cWhite, 0.5);
|
138
|
+
font-size: 12px;
|
139
|
+
&:hover, &:active {
|
140
|
+
color: $cWhite;
|
141
|
+
}
|
142
|
+
}
|
143
|
+
}
|
144
|
+
|
145
|
+
&-feedback {
|
146
|
+
color: $cWhite;
|
147
|
+
text-align: center;
|
148
|
+
margin: 25px 0 25px 0;
|
149
|
+
line-height: 1.3;
|
150
|
+
}
|
151
|
+
|
152
|
+
}
|
@@ -0,0 +1,67 @@
|
|
1
|
+
.show-table {
|
2
|
+
|
3
|
+
background: $cEggshell;
|
4
|
+
border-left: 1px solid $cGrey;
|
5
|
+
border-right: 1px solid $cGrey;
|
6
|
+
font-size: 15px;
|
7
|
+
text-align: left;
|
8
|
+
width: 100%;
|
9
|
+
|
10
|
+
thead tr {
|
11
|
+
border-bottom: 1px solid $cGrey;
|
12
|
+
display: none;
|
13
|
+
@include min-width($bpFull) {
|
14
|
+
display: table-row;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
tbody tr {
|
19
|
+
border-bottom: 1px solid $cGrey;
|
20
|
+
@include min-width($bpFull) {
|
21
|
+
border-bottom-style: dashed;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
th {
|
26
|
+
color: $cPlum;
|
27
|
+
font-size: 12px;
|
28
|
+
font-weight: bold;
|
29
|
+
padding: 10px 8px 10px 8px;
|
30
|
+
text-transform: uppercase;
|
31
|
+
vertical-align: middle;
|
32
|
+
}
|
33
|
+
|
34
|
+
td {
|
35
|
+
|
36
|
+
display: block;
|
37
|
+
padding: 10px 8px 10px 8px;
|
38
|
+
position: relative;
|
39
|
+
vertical-align: middle;
|
40
|
+
width: 100%;
|
41
|
+
|
42
|
+
img {
|
43
|
+
max-width: 100%;
|
44
|
+
}
|
45
|
+
|
46
|
+
@include min-width($bpFull) {
|
47
|
+
display: table-cell;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
.show-td-field {
|
52
|
+
border-bottom: 1px solid $cGrey;
|
53
|
+
vertical-align: top;
|
54
|
+
span {
|
55
|
+
color: black(0.5);
|
56
|
+
font-size: 12px;
|
57
|
+
font-weight: bold;
|
58
|
+
text-transform: uppercase;
|
59
|
+
line-height: 16px;
|
60
|
+
}
|
61
|
+
@include min-width($bpFull) {
|
62
|
+
border-bottom: 0;
|
63
|
+
width: 18%;
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
67
|
+
}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
.attachment-field {
|
2
|
+
|
3
|
+
input[type=file] {
|
4
|
+
display: none;
|
5
|
+
}
|
6
|
+
|
7
|
+
&-preview {
|
8
|
+
background-size: cover;
|
9
|
+
background-position: center center;
|
10
|
+
border-radius: 3px;
|
11
|
+
border: 1px dashed $cGrey;
|
12
|
+
display: block;
|
13
|
+
float: left;
|
14
|
+
height: 42px;
|
15
|
+
margin: 0 10px 0 0;
|
16
|
+
transition: border-color 100ms linear;
|
17
|
+
width: 42px;
|
18
|
+
&.-present {
|
19
|
+
border: 1px solid $cPlum;
|
20
|
+
border-radius: 2px;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
&-label {
|
25
|
+
font-weight: bold;
|
26
|
+
}
|
27
|
+
|
28
|
+
.icon {
|
29
|
+
color: $cGrey;
|
30
|
+
display: block;
|
31
|
+
float: left;
|
32
|
+
font-size: 36px;
|
33
|
+
height: 42px;
|
34
|
+
line-height: 42px;
|
35
|
+
margin: 0 10px 0 0;
|
36
|
+
width: 42px;
|
37
|
+
}
|
38
|
+
|
39
|
+
&.-ready .icon {
|
40
|
+
color: $cSapphire;
|
41
|
+
}
|
42
|
+
|
43
|
+
.button {
|
44
|
+
border: 1px solid $cGrey;
|
45
|
+
color: $cSlate;
|
46
|
+
height: auto;
|
47
|
+
line-height: 42px;
|
48
|
+
min-width: 260px;
|
49
|
+
text-align: left;
|
50
|
+
width: auto;
|
51
|
+
padding-top: 6px;
|
52
|
+
padding-bottom: 6px;
|
53
|
+
&:hover, &:active {
|
54
|
+
border-color: $cPlum;
|
55
|
+
color: $cPlum;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
}
|
@@ -0,0 +1,478 @@
|
|
1
|
+
// MODIFIED FROM
|
2
|
+
// Chosen, a Select Box Enhancer for jQuery and Prototype
|
3
|
+
// by Patrick Filler for Harvest, http://getharvest.com
|
4
|
+
|
5
|
+
// ---------------------------------------------------------------------------
|
6
|
+
// Base
|
7
|
+
// ---------------------------------------------------------------------------
|
8
|
+
|
9
|
+
.chosen-container {
|
10
|
+
position: relative;
|
11
|
+
display: inline-block;
|
12
|
+
vertical-align: middle;
|
13
|
+
zoom: 1;
|
14
|
+
*display: inline;
|
15
|
+
-webkit-user-select: none;
|
16
|
+
-moz-user-select: none;
|
17
|
+
user-select: none;
|
18
|
+
border-radius: 2px;
|
19
|
+
}
|
20
|
+
|
21
|
+
.chosen-container * {
|
22
|
+
-webkit-box-sizing: border-box;
|
23
|
+
-moz-box-sizing: border-box;
|
24
|
+
box-sizing: border-box;
|
25
|
+
}
|
26
|
+
|
27
|
+
.chosen-container .chosen-drop {
|
28
|
+
position: absolute;
|
29
|
+
top: 100%;
|
30
|
+
left: -9999px;
|
31
|
+
z-index: 1010;
|
32
|
+
width: 100%;
|
33
|
+
border: 1px solid #aaa;
|
34
|
+
border-top: 0;
|
35
|
+
background: #fff;
|
36
|
+
box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
|
37
|
+
}
|
38
|
+
|
39
|
+
.chosen-container.chosen-with-drop .chosen-drop {
|
40
|
+
left: 0;
|
41
|
+
}
|
42
|
+
|
43
|
+
.chosen-container a {
|
44
|
+
cursor: pointer;
|
45
|
+
}
|
46
|
+
|
47
|
+
.chosen-container .search-choice .group-name, .chosen-container .chosen-single .group-name {
|
48
|
+
margin-right: 4px;
|
49
|
+
overflow: hidden;
|
50
|
+
white-space: nowrap;
|
51
|
+
text-overflow: ellipsis;
|
52
|
+
font-weight: normal;
|
53
|
+
color: #999999;
|
54
|
+
}
|
55
|
+
|
56
|
+
.chosen-container .search-choice .group-name:after, .chosen-container .chosen-single .group-name:after {
|
57
|
+
content: ":";
|
58
|
+
padding-left: 2px;
|
59
|
+
vertical-align: top;
|
60
|
+
}
|
61
|
+
|
62
|
+
// ---------------------------------------------------------------------------
|
63
|
+
// Single Chosen
|
64
|
+
// ---------------------------------------------------------------------------
|
65
|
+
|
66
|
+
.chosen-container-single .chosen-single {
|
67
|
+
position: relative;
|
68
|
+
display: block;
|
69
|
+
overflow: hidden;
|
70
|
+
padding: 8px 10px;
|
71
|
+
font-size: 16px;
|
72
|
+
line-height: 1.25;
|
73
|
+
border: 1px solid $cTaupe;
|
74
|
+
border-radius: 2px;
|
75
|
+
background-color: #fff;
|
76
|
+
background-image: image-url("admin/select_arrows.svg");
|
77
|
+
background-position: right 10px center;
|
78
|
+
background-repeat: no-repeat;
|
79
|
+
background-size: 10px 10px;
|
80
|
+
color: #444;
|
81
|
+
text-decoration: none;
|
82
|
+
white-space: nowrap;
|
83
|
+
}
|
84
|
+
|
85
|
+
.chosen-container-single .chosen-default {
|
86
|
+
color: #999;
|
87
|
+
}
|
88
|
+
|
89
|
+
.chosen-container-single .chosen-single span {
|
90
|
+
display: block;
|
91
|
+
overflow: hidden;
|
92
|
+
margin-right: 26px;
|
93
|
+
text-overflow: ellipsis;
|
94
|
+
white-space: nowrap;
|
95
|
+
}
|
96
|
+
|
97
|
+
.chosen-container-single .chosen-single-with-deselect span {
|
98
|
+
margin-right: 38px;
|
99
|
+
}
|
100
|
+
|
101
|
+
.chosen-container-single .chosen-single abbr {
|
102
|
+
position: absolute;
|
103
|
+
top: 6px;
|
104
|
+
right: 26px;
|
105
|
+
display: block;
|
106
|
+
width: 12px;
|
107
|
+
height: 12px;
|
108
|
+
background: url('chosen-sprite.png') -42px 1px no-repeat;
|
109
|
+
font-size: 1px;
|
110
|
+
}
|
111
|
+
|
112
|
+
.chosen-container-single .chosen-single abbr:hover {
|
113
|
+
background-position: -42px -10px;
|
114
|
+
}
|
115
|
+
|
116
|
+
.chosen-container-single.chosen-disabled .chosen-single abbr:hover {
|
117
|
+
background-position: -42px -10px;
|
118
|
+
}
|
119
|
+
|
120
|
+
.chosen-container-single .chosen-single div {
|
121
|
+
position: absolute;
|
122
|
+
top: 0;
|
123
|
+
right: 0;
|
124
|
+
display: block;
|
125
|
+
width: 18px;
|
126
|
+
height: 100%;
|
127
|
+
}
|
128
|
+
|
129
|
+
.chosen-container-single .chosen-single div b {
|
130
|
+
display: block;
|
131
|
+
width: 100%;
|
132
|
+
height: 100%;
|
133
|
+
}
|
134
|
+
|
135
|
+
.chosen-container-single .chosen-search {
|
136
|
+
position: relative;
|
137
|
+
z-index: 1010;
|
138
|
+
margin: 0;
|
139
|
+
padding: 3px 4px;
|
140
|
+
white-space: nowrap;
|
141
|
+
float: none !important;
|
142
|
+
}
|
143
|
+
|
144
|
+
.chosen-container-single .chosen-search input[type="text"] {
|
145
|
+
margin: 1px 0;
|
146
|
+
padding: 8px 10px;
|
147
|
+
width: 100%;
|
148
|
+
height: auto;
|
149
|
+
outline: 0;
|
150
|
+
border: 1px solid #aaa;
|
151
|
+
font-size: 1em;
|
152
|
+
line-height: normal;
|
153
|
+
border-radius: 2px;
|
154
|
+
float: none !important;
|
155
|
+
}
|
156
|
+
|
157
|
+
.chosen-container-single .chosen-drop {
|
158
|
+
margin-top: -1px;
|
159
|
+
background-clip: padding-box;
|
160
|
+
}
|
161
|
+
|
162
|
+
.chosen-container-single.chosen-container-single-nosearch .chosen-search {
|
163
|
+
position: absolute;
|
164
|
+
left: -9999px;
|
165
|
+
}
|
166
|
+
|
167
|
+
// ---------------------------------------------------------------------------
|
168
|
+
// Results
|
169
|
+
// ---------------------------------------------------------------------------
|
170
|
+
|
171
|
+
.chosen-container .chosen-results {
|
172
|
+
color: #444;
|
173
|
+
position: relative;
|
174
|
+
overflow-x: hidden;
|
175
|
+
overflow-y: auto;
|
176
|
+
margin: 0 4px 4px 0;
|
177
|
+
padding: 0 0 0 4px;
|
178
|
+
max-height: 240px;
|
179
|
+
-webkit-overflow-scrolling: touch;
|
180
|
+
}
|
181
|
+
|
182
|
+
.chosen-container .chosen-results li {
|
183
|
+
display: none;
|
184
|
+
margin: 0;
|
185
|
+
padding: 8px 8px;
|
186
|
+
list-style: none;
|
187
|
+
line-height: 15px;
|
188
|
+
word-wrap: break-word;
|
189
|
+
-webkit-touch-callout: none;
|
190
|
+
}
|
191
|
+
|
192
|
+
.chosen-container .chosen-results li.active-result {
|
193
|
+
display: list-item;
|
194
|
+
cursor: pointer;
|
195
|
+
}
|
196
|
+
|
197
|
+
.chosen-container .chosen-results li.disabled-result {
|
198
|
+
display: list-item;
|
199
|
+
color: #ccc;
|
200
|
+
cursor: default;
|
201
|
+
}
|
202
|
+
|
203
|
+
.chosen-container .chosen-results li.highlighted {
|
204
|
+
background-color: $cButtonPrimary;
|
205
|
+
color: #fff;
|
206
|
+
}
|
207
|
+
|
208
|
+
.chosen-container .chosen-results li.no-results {
|
209
|
+
color: #777;
|
210
|
+
display: list-item;
|
211
|
+
background: #f4f4f4;
|
212
|
+
}
|
213
|
+
|
214
|
+
.chosen-container .chosen-results li.group-result {
|
215
|
+
display: list-item;
|
216
|
+
font-weight: bold;
|
217
|
+
cursor: default;
|
218
|
+
}
|
219
|
+
|
220
|
+
.chosen-container .chosen-results li.group-option {
|
221
|
+
padding-left: 15px;
|
222
|
+
}
|
223
|
+
|
224
|
+
.chosen-container .chosen-results li em {
|
225
|
+
font-style: normal;
|
226
|
+
text-decoration: underline;
|
227
|
+
}
|
228
|
+
|
229
|
+
// ---------------------------------------------------------------------------
|
230
|
+
// Multi Chosen
|
231
|
+
// ---------------------------------------------------------------------------
|
232
|
+
|
233
|
+
.chosen-container-multi .chosen-choices {
|
234
|
+
background-color: #fff;
|
235
|
+
background-image: image-url("admin/select_arrows.svg");
|
236
|
+
background-position: right 10px center;
|
237
|
+
background-repeat: no-repeat;
|
238
|
+
background-size: 10px 10px;
|
239
|
+
border-radius: 2px;
|
240
|
+
border: 1px solid $cTaupe;
|
241
|
+
cursor: text;
|
242
|
+
font-size: 16px;
|
243
|
+
height: 1%;
|
244
|
+
height: auto !important;
|
245
|
+
line-height: 1.25;
|
246
|
+
margin: 0;
|
247
|
+
overflow: hidden;
|
248
|
+
padding: 3px 20px 2px 7px;
|
249
|
+
position: relative;
|
250
|
+
width: 100%;
|
251
|
+
}
|
252
|
+
|
253
|
+
.chosen-container-multi .chosen-choices li {
|
254
|
+
float: left;
|
255
|
+
list-style: none;
|
256
|
+
}
|
257
|
+
|
258
|
+
.chosen-container-multi .chosen-choices li.search-field {
|
259
|
+
margin: 0;
|
260
|
+
padding: 0;
|
261
|
+
white-space: nowrap;
|
262
|
+
}
|
263
|
+
|
264
|
+
.chosen-container-multi .chosen-choices li.search-field input[type="text"] {
|
265
|
+
margin: 1px 0;
|
266
|
+
padding: 0;
|
267
|
+
height: 32px;
|
268
|
+
line-height: 32px;
|
269
|
+
outline: 0;
|
270
|
+
border: 0 !important;
|
271
|
+
background: transparent !important;
|
272
|
+
box-shadow: none;
|
273
|
+
color: #999;
|
274
|
+
font-size: 100%;
|
275
|
+
font-family: sans-serif;
|
276
|
+
line-height: normal;
|
277
|
+
border-radius: 0;
|
278
|
+
}
|
279
|
+
|
280
|
+
.chosen-container-multi .chosen-choices li.search-choice {
|
281
|
+
position: relative;
|
282
|
+
margin: 3px 5px 3px 0;
|
283
|
+
padding: 5px 24px 5px 8px;
|
284
|
+
border: 1px solid #aaa;
|
285
|
+
max-width: 100%;
|
286
|
+
border-radius: 2px;
|
287
|
+
background-color: #fcfcfc;
|
288
|
+
background-size: 100% 19px;
|
289
|
+
color: #333;
|
290
|
+
line-height: 16px;
|
291
|
+
cursor: default;
|
292
|
+
}
|
293
|
+
|
294
|
+
.chosen-container-multi .chosen-choices li.search-choice span {
|
295
|
+
word-wrap: break-word;
|
296
|
+
}
|
297
|
+
|
298
|
+
.chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
|
299
|
+
color: $cPlum;
|
300
|
+
display: block;
|
301
|
+
font-size: 12px;
|
302
|
+
height: 14px;
|
303
|
+
margin: 0;
|
304
|
+
position: absolute;
|
305
|
+
right: 5px;
|
306
|
+
text-align: center;
|
307
|
+
top: 6px;
|
308
|
+
width: 14px;
|
309
|
+
&:after {
|
310
|
+
display: inline;
|
311
|
+
content: "✖";
|
312
|
+
}
|
313
|
+
}
|
314
|
+
|
315
|
+
.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
|
316
|
+
background-position: -42px -10px;
|
317
|
+
}
|
318
|
+
|
319
|
+
.chosen-container-multi .chosen-choices li.search-choice-disabled {
|
320
|
+
background-color: #e4e4e4;
|
321
|
+
border: 1px solid #ccc;
|
322
|
+
color: #666;
|
323
|
+
padding-right: 5px;
|
324
|
+
}
|
325
|
+
|
326
|
+
.chosen-container-multi .chosen-choices li.search-choice-focus {
|
327
|
+
background: #d4d4d4;
|
328
|
+
}
|
329
|
+
|
330
|
+
.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
|
331
|
+
background-position: -42px -10px;
|
332
|
+
}
|
333
|
+
|
334
|
+
.chosen-container-multi .chosen-results {
|
335
|
+
margin: 0;
|
336
|
+
padding: 0;
|
337
|
+
}
|
338
|
+
|
339
|
+
.chosen-container-multi .chosen-drop .result-selected {
|
340
|
+
display: list-item;
|
341
|
+
color: #ccc;
|
342
|
+
cursor: default;
|
343
|
+
}
|
344
|
+
|
345
|
+
// ---------------------------------------------------------------------------
|
346
|
+
// Active
|
347
|
+
// ---------------------------------------------------------------------------
|
348
|
+
|
349
|
+
.chosen-container-active .chosen-single {
|
350
|
+
border: 1px solid darken($cSapphire, 10);
|
351
|
+
border-bottom-color: $cSapphire;
|
352
|
+
border-right-color: $cSapphire;
|
353
|
+
}
|
354
|
+
|
355
|
+
.chosen-container-active.chosen-with-drop .chosen-single {
|
356
|
+
border: 1px solid #aaa;
|
357
|
+
border-bottom-right-radius: 0;
|
358
|
+
border-bottom-left-radius: 0;
|
359
|
+
}
|
360
|
+
|
361
|
+
.chosen-container-active.chosen-with-drop .chosen-single div {
|
362
|
+
border-left: none;
|
363
|
+
background: transparent;
|
364
|
+
}
|
365
|
+
|
366
|
+
.chosen-container-active.chosen-with-drop .chosen-single div b {
|
367
|
+
background-position: -18px 2px;
|
368
|
+
}
|
369
|
+
|
370
|
+
.chosen-container-active .chosen-choices {
|
371
|
+
border: 1px solid darken($cSapphire, 10);
|
372
|
+
border-bottom-color: $cSapphire;
|
373
|
+
border-right-color: $cSapphire;
|
374
|
+
}
|
375
|
+
|
376
|
+
.chosen-container-active .chosen-choices li.search-field input[type="text"] {
|
377
|
+
color: #222 !important;
|
378
|
+
}
|
379
|
+
|
380
|
+
// ---------------------------------------------------------------------------
|
381
|
+
// Disabled Support
|
382
|
+
// ---------------------------------------------------------------------------
|
383
|
+
|
384
|
+
.chosen-disabled {
|
385
|
+
opacity: 0.5 !important;
|
386
|
+
cursor: default;
|
387
|
+
}
|
388
|
+
|
389
|
+
.chosen-disabled .chosen-single {
|
390
|
+
cursor: default;
|
391
|
+
}
|
392
|
+
|
393
|
+
.chosen-disabled .chosen-choices .search-choice .search-choice-close {
|
394
|
+
cursor: default;
|
395
|
+
}
|
396
|
+
|
397
|
+
// ---------------------------------------------------------------------------
|
398
|
+
// Right to Left
|
399
|
+
// ---------------------------------------------------------------------------
|
400
|
+
|
401
|
+
.chosen-rtl {
|
402
|
+
text-align: right;
|
403
|
+
}
|
404
|
+
|
405
|
+
.chosen-rtl .chosen-single {
|
406
|
+
overflow: visible;
|
407
|
+
padding: 0 8px 0 0;
|
408
|
+
}
|
409
|
+
|
410
|
+
.chosen-rtl .chosen-single span {
|
411
|
+
margin-right: 0;
|
412
|
+
margin-left: 26px;
|
413
|
+
direction: rtl;
|
414
|
+
}
|
415
|
+
|
416
|
+
.chosen-rtl .chosen-single-with-deselect span {
|
417
|
+
margin-left: 38px;
|
418
|
+
}
|
419
|
+
|
420
|
+
.chosen-rtl .chosen-single div {
|
421
|
+
right: auto;
|
422
|
+
left: 3px;
|
423
|
+
}
|
424
|
+
|
425
|
+
.chosen-rtl .chosen-single abbr {
|
426
|
+
right: auto;
|
427
|
+
left: 26px;
|
428
|
+
}
|
429
|
+
|
430
|
+
.chosen-rtl .chosen-choices li {
|
431
|
+
float: right;
|
432
|
+
}
|
433
|
+
|
434
|
+
.chosen-rtl .chosen-choices li.search-field input[type="text"] {
|
435
|
+
direction: rtl;
|
436
|
+
}
|
437
|
+
|
438
|
+
.chosen-rtl .chosen-choices li.search-choice {
|
439
|
+
margin: 3px 5px 3px 0;
|
440
|
+
padding: 3px 5px 3px 19px;
|
441
|
+
}
|
442
|
+
|
443
|
+
.chosen-rtl .chosen-choices li.search-choice .search-choice-close {
|
444
|
+
right: auto;
|
445
|
+
left: 4px;
|
446
|
+
}
|
447
|
+
|
448
|
+
.chosen-rtl.chosen-container-single-nosearch .chosen-search,
|
449
|
+
.chosen-rtl .chosen-drop {
|
450
|
+
left: 9999px;
|
451
|
+
}
|
452
|
+
|
453
|
+
.chosen-rtl.chosen-container-single .chosen-results {
|
454
|
+
margin: 0 0 4px 4px;
|
455
|
+
padding: 0 4px 0 0;
|
456
|
+
}
|
457
|
+
|
458
|
+
.chosen-rtl .chosen-results li.group-option {
|
459
|
+
padding-right: 15px;
|
460
|
+
padding-left: 0;
|
461
|
+
}
|
462
|
+
|
463
|
+
.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
|
464
|
+
border-right: none;
|
465
|
+
}
|
466
|
+
|
467
|
+
.chosen-rtl .chosen-search input[type="text"] {
|
468
|
+
padding: 4px 5px 4px 20px;
|
469
|
+
direction: rtl;
|
470
|
+
}
|
471
|
+
|
472
|
+
.chosen-rtl.chosen-container-single .chosen-single div b {
|
473
|
+
background-position: 6px 2px;
|
474
|
+
}
|
475
|
+
|
476
|
+
.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
|
477
|
+
background-position: -12px 2px;
|
478
|
+
}
|