comable-backend 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +97 -0
- data/app/assets/javascripts/comable/admin/application.coffee +76 -0
- data/app/assets/javascripts/comable/admin/categories.coffee +59 -0
- data/app/assets/javascripts/comable/admin/dashboard.coffee +32 -0
- data/app/assets/javascripts/comable/admin/dispatcher.coffee +21 -0
- data/app/assets/javascripts/comable/admin/orders.coffee +44 -0
- data/app/assets/javascripts/comable/admin/pages.coffee +69 -0
- data/app/assets/javascripts/comable/admin/products.coffee +21 -0
- data/app/assets/javascripts/comable/admin/search.coffee +35 -0
- data/app/assets/javascripts/comable/admin/themes.coffee +64 -0
- data/app/assets/stylesheets/comable/admin/_common.scss +153 -0
- data/app/assets/stylesheets/comable/admin/_dashboard.scss +81 -0
- data/app/assets/stylesheets/comable/admin/_errors.scss +18 -0
- data/app/assets/stylesheets/comable/admin/_flow.scss +149 -0
- data/app/assets/stylesheets/comable/admin/_mixins.scss +16 -0
- data/app/assets/stylesheets/comable/admin/_orders.scss +54 -0
- data/app/assets/stylesheets/comable/admin/_overrides.scss +4 -0
- data/app/assets/stylesheets/comable/admin/_pages.scss +30 -0
- data/app/assets/stylesheets/comable/admin/_products.scss +18 -0
- data/app/assets/stylesheets/comable/admin/_themes.scss +71 -0
- data/app/assets/stylesheets/comable/admin/_user_sessions.scss +57 -0
- data/app/assets/stylesheets/comable/admin/_variables.scss +38 -0
- data/app/assets/stylesheets/comable/admin/application.scss +26 -0
- data/app/assets/stylesheets/comable/admin/overrides/awesome_admin_layout.scss +25 -0
- data/app/assets/stylesheets/comable/admin/overrides/bootstrap.scss +81 -0
- data/app/assets/stylesheets/comable/admin/overrides/jstree.scss +71 -0
- data/app/assets/stylesheets/comable/admin/overrides/tagit.scss +22 -0
- data/app/controllers/comable/admin/application_controller.rb +58 -0
- data/app/controllers/comable/admin/categories_controller.rb +17 -0
- data/app/controllers/comable/admin/dashboard_controller.rb +19 -0
- data/app/controllers/comable/admin/orders_controller.rb +102 -0
- data/app/controllers/comable/admin/pages_controller.rb +72 -0
- data/app/controllers/comable/admin/payment_methods_controller.rb +59 -0
- data/app/controllers/comable/admin/products_controller.rb +82 -0
- data/app/controllers/comable/admin/shipment_methods_controller.rb +57 -0
- data/app/controllers/comable/admin/stocks_controller.rb +81 -0
- data/app/controllers/comable/admin/store_controller.rb +42 -0
- data/app/controllers/comable/admin/themes_controller.rb +101 -0
- data/app/controllers/comable/admin/trackers_controller.rb +58 -0
- data/app/controllers/comable/admin/user_sessions_controller.rb +8 -0
- data/app/controllers/comable/admin/users_controller.rb +47 -0
- data/app/helpers/comable/admin/application_helper.rb +53 -0
- data/app/helpers/comable/admin/orders_helper.rb +30 -0
- data/app/helpers/comable/admin/pages_helper.rb +6 -0
- data/app/helpers/comable/admin/products_helper.rb +6 -0
- data/app/helpers/comable/admin/shipment_methods_helper.rb +6 -0
- data/app/helpers/comable/admin/stores_helper.rb +6 -0
- data/app/helpers/comable/admin/themes_helper.rb +69 -0
- data/app/views/comable/admin/categories/index.slim +40 -0
- data/app/views/comable/admin/dashboard/_widget.slim +13 -0
- data/app/views/comable/admin/dashboard/show.slim +43 -0
- data/app/views/comable/admin/orders/_google_map.slim +39 -0
- data/app/views/comable/admin/orders/_payment_state.slim +40 -0
- data/app/views/comable/admin/orders/_shipment_state.slim +44 -0
- data/app/views/comable/admin/orders/edit.slim +170 -0
- data/app/views/comable/admin/orders/index.slim +95 -0
- data/app/views/comable/admin/orders/show.slim +177 -0
- data/app/views/comable/admin/pages/_form.slim +69 -0
- data/app/views/comable/admin/pages/edit.slim +31 -0
- data/app/views/comable/admin/pages/index.slim +55 -0
- data/app/views/comable/admin/pages/new.slim +16 -0
- data/app/views/comable/admin/payment_methods/_form.slim +35 -0
- data/app/views/comable/admin/payment_methods/edit.slim +27 -0
- data/app/views/comable/admin/payment_methods/index.slim +40 -0
- data/app/views/comable/admin/payment_methods/new.slim +16 -0
- data/app/views/comable/admin/products/_form.slim +137 -0
- data/app/views/comable/admin/products/edit.slim +41 -0
- data/app/views/comable/admin/products/index.slim +95 -0
- data/app/views/comable/admin/products/new.slim +16 -0
- data/app/views/comable/admin/shared/_advanced_search.slim +7 -0
- data/app/views/comable/admin/shared/_condition_fields.slim +15 -0
- data/app/views/comable/admin/shared/_footer.slim +8 -0
- data/app/views/comable/admin/shared/_grouping_fields.slim +8 -0
- data/app/views/comable/admin/shared/_image_fields.slim +15 -0
- data/app/views/comable/admin/shared/_notifier.slim +5 -0
- data/app/views/comable/admin/shared/_value_fields.slim +1 -0
- data/app/views/comable/admin/shared/export.xlsx.axlsx +17 -0
- data/app/views/comable/admin/shipment_methods/_form.slim +29 -0
- data/app/views/comable/admin/shipment_methods/edit.slim +27 -0
- data/app/views/comable/admin/shipment_methods/index.slim +37 -0
- data/app/views/comable/admin/shipment_methods/new.slim +16 -0
- data/app/views/comable/admin/stocks/_form.slim +34 -0
- data/app/views/comable/admin/stocks/edit.slim +37 -0
- data/app/views/comable/admin/stocks/index.slim +81 -0
- data/app/views/comable/admin/stocks/new.slim +18 -0
- data/app/views/comable/admin/store/_form.slim +32 -0
- data/app/views/comable/admin/store/edit.slim +12 -0
- data/app/views/comable/admin/themes/_editor.slim +8 -0
- data/app/views/comable/admin/themes/_form.slim +31 -0
- data/app/views/comable/admin/themes/edit.slim +35 -0
- data/app/views/comable/admin/themes/index.slim +37 -0
- data/app/views/comable/admin/themes/new.slim +16 -0
- data/app/views/comable/admin/themes/show_file.slim +93 -0
- data/app/views/comable/admin/trackers/_form.slim +109 -0
- data/app/views/comable/admin/trackers/edit.slim +27 -0
- data/app/views/comable/admin/trackers/index.slim +37 -0
- data/app/views/comable/admin/trackers/new.slim +16 -0
- data/app/views/comable/admin/user_sessions/new.slim +25 -0
- data/app/views/comable/admin/users/edit.slim +79 -0
- data/app/views/comable/admin/users/index.slim +71 -0
- data/app/views/comable/admin/users/show.slim +88 -0
- data/app/views/kaminari/comable_backend/_first_page.html.slim +2 -0
- data/app/views/kaminari/comable_backend/_gap.html.slim +2 -0
- data/app/views/kaminari/comable_backend/_last_page.html.slim +2 -0
- data/app/views/kaminari/comable_backend/_next_page.html.slim +2 -0
- data/app/views/kaminari/comable_backend/_page.html.slim +3 -0
- data/app/views/kaminari/comable_backend/_paginator.html.slim +15 -0
- data/app/views/kaminari/comable_backend/_prev_page.html.slim +2 -0
- data/app/views/layouts/comable/admin/application.slim +36 -0
- data/config/initializers/awesome_admin_layout.rb +110 -0
- data/config/routes.rb +63 -0
- data/lib/comable/backend.rb +1 -0
- data/lib/comable/backend/engine.rb +67 -0
- data/lib/tasks/comable_backend_tasks.rake +4 -0
- metadata +514 -0
@@ -0,0 +1,35 @@
|
|
1
|
+
class Search
|
2
|
+
constructor: (@templates = {}) ->
|
3
|
+
|
4
|
+
remove_fields: (button) ->
|
5
|
+
$(button).closest('.fields').remove()
|
6
|
+
|
7
|
+
add_fields: (button, type, content) ->
|
8
|
+
new_id = new Date().getTime()
|
9
|
+
regexp = new RegExp('new_' + type, 'g')
|
10
|
+
$(button).before(content.replace(regexp, new_id))
|
11
|
+
|
12
|
+
nest_fields: (button, type) ->
|
13
|
+
new_id = new Date().getTime()
|
14
|
+
id_regexp = new RegExp('new_' + type, 'g')
|
15
|
+
template = @templates[type]
|
16
|
+
object_name = $(button).closest('.fields').attr('data-object-name')
|
17
|
+
sanitized_object_name = object_name.replace(/\]\[|[^-a-zA-Z0-9:.]/g, '_').replace(/_$/, '')
|
18
|
+
template = template.replace(/new_object_name\[/g, object_name + "[")
|
19
|
+
template = template.replace(/new_object_name_/, sanitized_object_name + '_')
|
20
|
+
$(button).before(template.replace(id_regexp, new_id))
|
21
|
+
|
22
|
+
# ---
|
23
|
+
# main
|
24
|
+
# ---
|
25
|
+
search = new Search()
|
26
|
+
|
27
|
+
$(document).on('click', '.ransack.add_fields', ->
|
28
|
+
search.add_fields(this, $(this).data('fieldType'), $(this).data('content'))
|
29
|
+
false
|
30
|
+
)
|
31
|
+
|
32
|
+
$(document).on('click', '.ransack.remove_fields', ->
|
33
|
+
search.remove_fields(this)
|
34
|
+
false
|
35
|
+
)
|
@@ -0,0 +1,64 @@
|
|
1
|
+
can_use_comable_theme_editor = ->
|
2
|
+
return false unless $('#comable-theme-editor').length
|
3
|
+
return false unless $('#comable-theme-editor-form').length
|
4
|
+
true
|
5
|
+
|
6
|
+
can_use_comable_file_tree = ->
|
7
|
+
return false unless $('#comable-file-tree').length
|
8
|
+
true
|
9
|
+
|
10
|
+
comable_theme_editor_window = ->
|
11
|
+
editor_element = $('#comable-theme-editor').find('.comable-theme-editor-window').get(0)
|
12
|
+
ace.edit(editor_element)
|
13
|
+
|
14
|
+
initializa_comable_theme_editor = ->
|
15
|
+
editor = comable_theme_editor_window()
|
16
|
+
editor.setTheme('ace/theme/monokai')
|
17
|
+
editor.session.setMode('ace/mode/liquid')
|
18
|
+
$(window).bind('beforeunload', ->
|
19
|
+
window.beforeunload_message unless editor.session.getUndoManager().isClean()
|
20
|
+
)
|
21
|
+
$(document).on('page:before-change', ->
|
22
|
+
confirm(window.beforeunload_message) unless editor.session.getUndoManager().isClean()
|
23
|
+
)
|
24
|
+
|
25
|
+
add_comable_theme_editor_form_event = ->
|
26
|
+
$form = $('#comable-theme-editor-form')
|
27
|
+
$form.submit(->
|
28
|
+
editor = comable_theme_editor_window()
|
29
|
+
text = editor.getValue()
|
30
|
+
$(this).find('[name=code]').val(text)
|
31
|
+
)
|
32
|
+
|
33
|
+
add_comable_file_tree_event = ->
|
34
|
+
$comable_file_tree = $('#comable-file-tree')
|
35
|
+
$comable_file_tree.find('a').click((event) ->
|
36
|
+
event.preventDefault()
|
37
|
+
path = $(this).attr('href')
|
38
|
+
page_before_change = jQuery.Event('page:before-change')
|
39
|
+
$(document).trigger(page_before_change)
|
40
|
+
Turbolinks.visit(path) unless page_before_change.isDefaultPrevented()
|
41
|
+
)
|
42
|
+
|
43
|
+
resize_forms_height = ->
|
44
|
+
header_height = parseInt($('.comable-page-body').css('padding-top'))
|
45
|
+
footer_height = $('footer').outerHeight(true)
|
46
|
+
main_height = $(window).height() - header_height - footer_height
|
47
|
+
$comable_file_tree = $('#comable-file-tree')
|
48
|
+
$comable_file_tree.css('height', main_height + 'px') if $comable_file_tree.length
|
49
|
+
$comable_theme_editor = $('#comable-theme-editor')
|
50
|
+
$comable_theme_editor.css('height', main_height + 'px') if $comable_theme_editor.length
|
51
|
+
|
52
|
+
$(document).ready(->
|
53
|
+
if can_use_comable_theme_editor()
|
54
|
+
initializa_comable_theme_editor()
|
55
|
+
add_comable_theme_editor_form_event()
|
56
|
+
if can_use_comable_file_tree()
|
57
|
+
resize_forms_height()
|
58
|
+
add_comable_file_tree_event()
|
59
|
+
)
|
60
|
+
|
61
|
+
$(window).resize(->
|
62
|
+
return unless can_use_comable_file_tree()
|
63
|
+
resize_forms_height()
|
64
|
+
)
|
@@ -0,0 +1,153 @@
|
|
1
|
+
body {
|
2
|
+
font-size: 12px;
|
3
|
+
font-family: Verdana, '游ゴシック', YuGothic, 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
|
4
|
+
}
|
5
|
+
|
6
|
+
footer {
|
7
|
+
@extend .text-muted;
|
8
|
+
margin: 25px;
|
9
|
+
text-align: center;
|
10
|
+
|
11
|
+
& > ul > li + li:before {
|
12
|
+
content: '·';
|
13
|
+
padding-right: 10px;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
#wrapper {
|
18
|
+
display: table;
|
19
|
+
width: 100%;
|
20
|
+
height: 100%;
|
21
|
+
|
22
|
+
body.animated & {
|
23
|
+
@include transition(margin-left 600ms ease, opacity 600ms);
|
24
|
+
opacity: 0;
|
25
|
+
margin-left: -20px;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
.container {
|
30
|
+
margin-right: auto;
|
31
|
+
padding: 0;
|
32
|
+
overflow: hidden;
|
33
|
+
|
34
|
+
&.right {
|
35
|
+
display: table-cell;
|
36
|
+
vertical-align: top;
|
37
|
+
|
38
|
+
margin-left: 216px;
|
39
|
+
position: relative;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
.logo {
|
44
|
+
padding: 0 20px;
|
45
|
+
height: 64px;
|
46
|
+
line-height: 64px;
|
47
|
+
background-color: $comable-theme-bg;
|
48
|
+
|
49
|
+
a {
|
50
|
+
font-size: x-large;
|
51
|
+
text-decoration: none;
|
52
|
+
|
53
|
+
&:link,
|
54
|
+
&:visited,
|
55
|
+
&:hover,
|
56
|
+
&:active {
|
57
|
+
color: #fff;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
.comable-page-heading {
|
63
|
+
margin: 0 -15px 25px;
|
64
|
+
padding: 25px 30px;
|
65
|
+
border-bottom: 5px solid #eee;
|
66
|
+
|
67
|
+
& > .page-header {
|
68
|
+
margin-bottom: 0;
|
69
|
+
}
|
70
|
+
|
71
|
+
& > ul {
|
72
|
+
margin: 0;
|
73
|
+
padding: 0;
|
74
|
+
list-style: none;
|
75
|
+
|
76
|
+
& > li {
|
77
|
+
margin-left: 5px;
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
.comable-search {
|
83
|
+
margin: 0 30px 25px;
|
84
|
+
}
|
85
|
+
|
86
|
+
.comable-main-fixed-top {
|
87
|
+
padding-left: $awesome_admin_layout-navigation-width;
|
88
|
+
width: 100%;
|
89
|
+
background-color: #fff;
|
90
|
+
position: fixed;
|
91
|
+
left: 0;
|
92
|
+
z-index: 200;
|
93
|
+
|
94
|
+
& > .comable-page-heading {
|
95
|
+
margin: 0;
|
96
|
+
}
|
97
|
+
|
98
|
+
& + .comable-page-body {
|
99
|
+
// 89px = comable-page-heding-height
|
100
|
+
padding-top: 89px + 20px;
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
|
105
|
+
#comable-advanced-search {
|
106
|
+
margin-top: 10px;
|
107
|
+
|
108
|
+
fieldset > fieldset {
|
109
|
+
margin-bottom: 10px;
|
110
|
+
}
|
111
|
+
|
112
|
+
button.comable-remove-button {
|
113
|
+
@include appearance(none);
|
114
|
+
padding: 0;
|
115
|
+
cursor: pointer;
|
116
|
+
background: transparent;
|
117
|
+
border: 0;
|
118
|
+
height: $input-height-base;
|
119
|
+
outline: none;
|
120
|
+
}
|
121
|
+
|
122
|
+
.comable-remove-button {
|
123
|
+
@include text-shadow(0 1px 0 #fff);
|
124
|
+
@include opacity(0.2);
|
125
|
+
font-size: 16px;
|
126
|
+
font-weight: bold;
|
127
|
+
line-height: 1;
|
128
|
+
color: #000;
|
129
|
+
}
|
130
|
+
}
|
131
|
+
|
132
|
+
// for File Inputs
|
133
|
+
// refs: http://www.abeautifulsite.net/whipping-file-inputs-into-shape-with-bootstrap-3/
|
134
|
+
.btn-file {
|
135
|
+
position: relative;
|
136
|
+
overflow: hidden;
|
137
|
+
cursor: pointer;
|
138
|
+
}
|
139
|
+
|
140
|
+
.btn-file input[type=file] {
|
141
|
+
@include opacity(0);
|
142
|
+
position: absolute;
|
143
|
+
top: 0;
|
144
|
+
right: 0;
|
145
|
+
min-width: 100%;
|
146
|
+
min-height: 100%;
|
147
|
+
font-size: 100px;
|
148
|
+
text-align: right;
|
149
|
+
outline: none;
|
150
|
+
background: white;
|
151
|
+
cursor: inherit;
|
152
|
+
display: block;
|
153
|
+
}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
.widget {
|
2
|
+
border-radius: 3px;
|
3
|
+
margin-bottom: 20px;
|
4
|
+
color: #fff;
|
5
|
+
padding: 15px;
|
6
|
+
overflow: hidden;
|
7
|
+
|
8
|
+
&.widget-stats {
|
9
|
+
position: relative;
|
10
|
+
|
11
|
+
& > .stats-icon {
|
12
|
+
@include opacity(0.2);
|
13
|
+
font-size: 42px;
|
14
|
+
height: 56px;
|
15
|
+
width: 56px;
|
16
|
+
text-align: center;
|
17
|
+
line-height: 56px;
|
18
|
+
margin-left: 15px;
|
19
|
+
color: #fff;
|
20
|
+
position: absolute;
|
21
|
+
right: 15px;
|
22
|
+
top: 15px;
|
23
|
+
|
24
|
+
&.stats-icon-lg {
|
25
|
+
font-size: 52px;
|
26
|
+
top: 12px;
|
27
|
+
right: 21px;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
& > .stats-desc,
|
32
|
+
& > .stats-title {
|
33
|
+
color: #fff;
|
34
|
+
color: rgba(255, 255, 255, 0.6);
|
35
|
+
}
|
36
|
+
|
37
|
+
& > .stats-title {
|
38
|
+
margin: 2px 0 7px;
|
39
|
+
font-size: 12px;
|
40
|
+
line-height: 1.1;
|
41
|
+
position: relative;
|
42
|
+
}
|
43
|
+
|
44
|
+
& > .stats-number {
|
45
|
+
margin-bottom: 10px;
|
46
|
+
font-size: 24px;
|
47
|
+
font-weight: normal;
|
48
|
+
}
|
49
|
+
|
50
|
+
& > .stats-progress {
|
51
|
+
margin: 0 -15px 12px;
|
52
|
+
height: 2px;
|
53
|
+
background-color: rgba(0, 0, 0, 0.2);
|
54
|
+
|
55
|
+
& > .progress-bar {
|
56
|
+
@include box-shadow(none);
|
57
|
+
background-color: #fff;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
&.widget-bg-green {
|
63
|
+
background-color: #00acac !important;
|
64
|
+
}
|
65
|
+
|
66
|
+
&.widget-bg-blue {
|
67
|
+
background-color: #348fe2 !important;
|
68
|
+
}
|
69
|
+
|
70
|
+
&.widget-bg-black {
|
71
|
+
background-color: #272930 !important;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
.morris > .morris-hover {
|
76
|
+
@include border-radius($border-radius-base !important);
|
77
|
+
padding: 8px !important;
|
78
|
+
color: #ccc !important;
|
79
|
+
background-color: rgba(0, 0, 0, 0.75) !important;
|
80
|
+
border: none !important;
|
81
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
#errorExplanation {
|
2
|
+
@extend .alert;
|
3
|
+
@extend .alert-danger;
|
4
|
+
|
5
|
+
& > h2 {
|
6
|
+
margin-top: 0;
|
7
|
+
font-size: $font-size-h4;
|
8
|
+
font-weight: bold;
|
9
|
+
}
|
10
|
+
|
11
|
+
& > ul {
|
12
|
+
margin-top: 5px;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
.field_with_errors {
|
17
|
+
@extend .has-error;
|
18
|
+
}
|
@@ -0,0 +1,149 @@
|
|
1
|
+
// Variables
|
2
|
+
$comable-flow-border: #eee;
|
3
|
+
$comable-badge-size: 50px;
|
4
|
+
$comable-badge-default-color: $gray;
|
5
|
+
$comable-badge-default-bg: #fff;
|
6
|
+
$comable-badge-default-border: $btn-default-border;
|
7
|
+
$comable-badge-disable-color: #fff;
|
8
|
+
$comable-badge-disable-bg: #ddd;
|
9
|
+
$comable-badge-disable-border: $btn-default-border;
|
10
|
+
$comable-badge-primary-color: $btn-primary-color;
|
11
|
+
$comable-badge-primary-bg: $btn-primary-bg;
|
12
|
+
$comable-badge-primary-border: $btn-primary-border;
|
13
|
+
$comable-badge-success-color: $btn-success-color;
|
14
|
+
$comable-badge-success-bg: $btn-success-bg;
|
15
|
+
$comable-badge-success-border: $btn-success-border;
|
16
|
+
$comable-badge-warning-color: $btn-warning-color;
|
17
|
+
$comable-badge-warning-bg: $btn-warning-bg;
|
18
|
+
$comable-badge-warning-border: $btn-warning-border;
|
19
|
+
$comable-badge-danger-color: $btn-danger-color;
|
20
|
+
$comable-badge-danger-bg: $btn-danger-bg;
|
21
|
+
$comable-badge-danger-border: $btn-danger-border;
|
22
|
+
|
23
|
+
// Mixins
|
24
|
+
@mixin comable-badge($color, $background-color, $border-color) {
|
25
|
+
color: $color;
|
26
|
+
background-color: $background-color;
|
27
|
+
border-color: $border-color;
|
28
|
+
|
29
|
+
&:hover, &:focus {
|
30
|
+
color: $color;
|
31
|
+
}
|
32
|
+
|
33
|
+
@at-root a#{&}:hover, a#{&}:focus {
|
34
|
+
background-color: darken($background-color, 10%);
|
35
|
+
border-color: darken($border-color, 10%);
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
// Rules
|
40
|
+
.comable-flow {
|
41
|
+
list-style: none;
|
42
|
+
margin-bottom: 20px;
|
43
|
+
padding: 20px 0;
|
44
|
+
position: relative;
|
45
|
+
|
46
|
+
&:before {
|
47
|
+
content: ' ';
|
48
|
+
margin-top: -1.5px;
|
49
|
+
height: 3px;
|
50
|
+
background-color: $comable-flow-border;
|
51
|
+
position: absolute;
|
52
|
+
top: 50%;
|
53
|
+
left: 0;
|
54
|
+
right: 0;
|
55
|
+
}
|
56
|
+
|
57
|
+
li {
|
58
|
+
@include inline-block;
|
59
|
+
margin-right: $comable-badge-size + 50px;
|
60
|
+
position: relative;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
.comable-badge {
|
65
|
+
@include border-radius(50%);
|
66
|
+
margin-top: -($comable-badge-size / 2);
|
67
|
+
height: $comable-badge-size;
|
68
|
+
width: $comable-badge-size;
|
69
|
+
line-height: $comable-badge-size;
|
70
|
+
font-size: 1.4em;
|
71
|
+
text-align: center;
|
72
|
+
position: absolute;
|
73
|
+
left: 16px;
|
74
|
+
top: 50%;
|
75
|
+
z-index: 100;
|
76
|
+
border: 1px solid transparent;
|
77
|
+
|
78
|
+
&[disabled] {
|
79
|
+
@include opacity(0.65);
|
80
|
+
@include box-shadow(none);
|
81
|
+
cursor: not-allowed;
|
82
|
+
pointer-events: none;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
.comable-badge-default {
|
87
|
+
@include comable-badge(
|
88
|
+
$color: $comable-badge-default-color,
|
89
|
+
$background-color: $comable-badge-default-bg,
|
90
|
+
$border-color: $comable-badge-default-border
|
91
|
+
);
|
92
|
+
}
|
93
|
+
|
94
|
+
.comable-badge-disable {
|
95
|
+
@include comable-badge(
|
96
|
+
$color: $comable-badge-disable-color,
|
97
|
+
$background-color: $comable-badge-disable-bg,
|
98
|
+
$border-color: $comable-badge-default-border
|
99
|
+
);
|
100
|
+
}
|
101
|
+
|
102
|
+
.comable-badge-primary {
|
103
|
+
@include comable-badge(
|
104
|
+
$color: $comable-badge-primary-color,
|
105
|
+
$background-color: $comable-badge-primary-bg,
|
106
|
+
$border-color: $comable-badge-primary-border
|
107
|
+
);
|
108
|
+
}
|
109
|
+
|
110
|
+
.comable-badge-success {
|
111
|
+
@include comable-badge(
|
112
|
+
$color: $comable-badge-success-color,
|
113
|
+
$background-color: $comable-badge-success-bg,
|
114
|
+
$border-color: $comable-badge-success-border
|
115
|
+
);
|
116
|
+
}
|
117
|
+
|
118
|
+
.comable-badge-danger {
|
119
|
+
@include comable-badge(
|
120
|
+
$color: $comable-badge-danger-color,
|
121
|
+
$background-color: $comable-badge-danger-bg,
|
122
|
+
$border-color: $comable-badge-danger-border
|
123
|
+
);
|
124
|
+
}
|
125
|
+
|
126
|
+
.comable-badge-warning {
|
127
|
+
@include comable-badge(
|
128
|
+
$color: $comable-badge-warning-color,
|
129
|
+
$background-color: $comable-badge-warning-bg,
|
130
|
+
$border-color: $comable-badge-warning-border
|
131
|
+
);
|
132
|
+
}
|
133
|
+
|
134
|
+
.comable-flow-label {
|
135
|
+
display: table;
|
136
|
+
height: $comable-badge-size + 5px;
|
137
|
+
margin: 0 0 0 auto;
|
138
|
+
text-align: right;
|
139
|
+
}
|
140
|
+
|
141
|
+
.comable-flow-label-container {
|
142
|
+
display: table-cell;
|
143
|
+
vertical-align: middle;
|
144
|
+
|
145
|
+
*:last-child {
|
146
|
+
margin-bottom: 0;
|
147
|
+
padding-bottom: 0;
|
148
|
+
}
|
149
|
+
}
|