para 0.11.4 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/para/admin/main.scss +31 -0
- data/app/assets/stylesheets/para/admin/src/_affix.scss +7 -0
- data/app/assets/stylesheets/para/admin/src/_alert.scss +35 -0
- data/app/assets/stylesheets/para/admin/src/_base.scss +63 -0
- data/app/assets/stylesheets/para/admin/src/_bootstrap-variables.scss +766 -379
- data/app/assets/stylesheets/para/admin/src/_breadcrumb.scss +37 -0
- data/app/assets/stylesheets/para/admin/src/_buttons.scss +128 -0
- data/app/assets/stylesheets/para/admin/src/_checkable.scss +106 -0
- data/app/assets/stylesheets/para/admin/src/_common.scss +250 -0
- data/app/assets/stylesheets/para/admin/src/_dropdown.scss +52 -0
- data/app/assets/stylesheets/para/admin/src/_form.scss +359 -0
- data/app/assets/stylesheets/para/admin/src/_list.scss +96 -0
- data/app/assets/stylesheets/para/admin/src/_mixins.scss +109 -0
- data/app/assets/stylesheets/para/admin/src/_multi-select.scss +110 -0
- data/app/assets/stylesheets/para/admin/src/_navigation.scss +210 -0
- data/app/assets/stylesheets/para/admin/src/_navtabs.scss +68 -0
- data/app/assets/stylesheets/para/admin/src/_nested-many.scss +87 -0
- data/app/assets/stylesheets/para/admin/src/_nested_one.scss +26 -0
- data/app/assets/stylesheets/para/admin/src/_orderable.scss +48 -0
- data/app/assets/stylesheets/para/admin/src/_page-loading.scss +40 -0
- data/app/assets/stylesheets/para/admin/src/_pagination.scss +39 -0
- data/app/assets/stylesheets/para/admin/src/_panel.scss +61 -0
- data/app/assets/stylesheets/para/admin/src/_responsive.scss +133 -0
- data/app/assets/stylesheets/para/admin/src/_sorting.scss +43 -0
- data/app/assets/stylesheets/para/admin/src/_statcard.scss +46 -0
- data/app/assets/stylesheets/para/admin/src/_table.scss +36 -0
- data/app/assets/stylesheets/para/admin/src/_tree.scss +60 -0
- data/app/assets/stylesheets/para/admin/src/{_variables.sass → _variables.scss} +7 -7
- data/app/assets/stylesheets/para/admin/src/{_well.sass → _well.scss} +5 -4
- data/app/assets/stylesheets/para/admin.scss +15 -0
- data/app/assets/stylesheets/para/index.scss +1 -0
- data/app/assets/stylesheets/para/lib/datetimepicker.scss +15 -0
- data/app/assets/stylesheets/para/lib/fuelux.scss +46 -0
- data/app/assets/stylesheets/para/lib/jasny-bootstrap.scss +100 -0
- data/app/assets/stylesheets/para/lib/selectize.scss +129 -0
- data/app/assets/stylesheets/para/lib/slider.scss +14 -0
- data/app/controllers/para/admin/crud_resources_controller.rb +16 -9
- data/app/controllers/para/admin/imports_controller.rb +9 -9
- data/app/controllers/para/admin/jobs_controller.rb +7 -1
- data/app/controllers/para/admin/resources_controller.rb +17 -18
- data/app/controllers/para/admin/settings_component_controller.rb +2 -2
- data/app/helpers/para/admin/base_helper.rb +36 -25
- data/app/helpers/para/admin/page_helper.rb +8 -9
- data/app/helpers/para/flash_helper.rb +7 -28
- data/app/helpers/para/model_helper.rb +5 -8
- data/app/helpers/para/tree_helper.rb +4 -4
- data/app/javascripts/para/admin/async-progress.js +58 -0
- data/app/javascripts/para/admin/filters-form.js +12 -0
- data/app/javascripts/para/admin/job-tracker.js +33 -0
- data/app/javascripts/para/admin/table.js +58 -0
- data/app/javascripts/para/admin/tabs.js +110 -0
- data/app/javascripts/para/admin/theme_actions.js +39 -0
- data/app/javascripts/para/admin/tree.js +124 -0
- data/app/javascripts/para/application.js +2 -0
- data/app/javascripts/para/controllers/application.js +17 -0
- data/app/javascripts/para/controllers/index.js +10 -0
- data/app/javascripts/para/controllers/para_admin_flash_message_controller.js +48 -0
- data/app/javascripts/para/controllers/para_admin_modal_controller.js +43 -0
- data/app/javascripts/para/controllers/selectize_field_controller.js +142 -0
- data/app/javascripts/para/index.js +31 -0
- data/app/javascripts/para/inputs/material-input.js +7 -0
- data/app/javascripts/para/inputs/multi-select-input.js +343 -0
- data/app/javascripts/para/inputs/nested_many.js +151 -0
- data/app/javascripts/para/lib/fetch.js +41 -0
- data/app/javascripts/para/lib/page-loading.js +42 -0
- data/app/javascripts/para/simple_form_extension/colorpicker.js +30 -0
- data/app/javascripts/para/simple_form_extension/datetimepicker.js +115 -0
- data/app/javascripts/para/simple_form_extension/fileinput.js +57 -0
- data/app/javascripts/para/simple_form_extension/index.js +12 -0
- data/app/javascripts/para/simple_form_extension/selectize.js +160 -0
- data/app/javascripts/para/simple_form_extension/simple_form_extension_initialization.js +62 -0
- data/app/javascripts/para/simple_form_extension/slider.js +43 -0
- data/app/javascripts/para/simple_form_extension/spinbox.js +35 -0
- data/app/javascripts/para/vendor/bootstrap-colorpicker.js +1025 -0
- data/app/javascripts/para/vendor/bootstrap-slider.js +1610 -0
- data/app/javascripts/para/vendor/cocoon.js +150 -0
- data/app/javascripts/para/vendor/jquery.datetimepicker.js +2156 -0
- data/app/javascripts/para/vendor/jquery.js +3 -0
- data/app/javascripts/para/vendor/spinbox.js +438 -0
- data/app/javascripts/para/vendor/vertebra.js +224 -0
- data/app/views/admin/para/exporter/bases/_completed.html.haml +1 -1
- data/app/views/layouts/para/admin.html.haml +4 -2
- data/app/views/para/admin/imports/new.html.haml +12 -11
- data/app/views/para/admin/jobs/_completed.html.haml +1 -1
- data/app/views/para/admin/jobs/_failed.html.haml +1 -1
- data/app/views/para/admin/jobs/_job.html.haml +11 -0
- data/app/views/para/admin/jobs/show.html.haml +1 -10
- data/app/views/para/admin/resources/_add_button.html.haml +1 -1
- data/app/views/para/admin/resources/_exports_menu.html.haml +2 -2
- data/app/views/para/admin/resources/_filters.html.haml +1 -1
- data/app/views/para/admin/resources/_imports_menu.html.haml +2 -2
- data/app/views/para/admin/resources/_list.html.haml +27 -26
- data/app/views/para/admin/resources/_navigation.html.haml +10 -11
- data/app/views/para/admin/resources/_subclassable_add_button.html.haml +1 -1
- data/app/views/para/admin/shared/_flash.html.haml +18 -0
- data/app/views/para/admin/shared/_header.html.haml +1 -1
- data/app/views/para/form/_tabs.html.haml +1 -1
- data/app/views/para/inputs/_nested_many.html.haml +3 -3
- data/app/views/para/inputs/nested_many/_add.html.haml +1 -1
- data/app/views/para/inputs/nested_many/_add_with_subclasses.html.haml +2 -2
- data/app/views/para/inputs/nested_many/_container.html.haml +1 -1
- data/config/locales/fr.yml +1 -0
- data/lib/generators/para/install/install_generator.rb +10 -14
- data/lib/para/attribute_field/base.rb +3 -0
- data/lib/para/attribute_field/wysiwyg_editor.rb +15 -0
- data/lib/para/attribute_field.rb +1 -1
- data/lib/para/components_configuration.rb +1 -1
- data/lib/para/engine.rb +20 -22
- data/lib/para/ext/turbo_stream.rb +13 -0
- data/lib/para/ext.rb +1 -1
- data/lib/para/form_builder/containers.rb +33 -22
- data/lib/para/form_builder/nested_form.rb +6 -5
- data/lib/para/inputs/nested_many_input.rb +5 -0
- data/lib/para/markup/modal.rb +30 -15
- data/lib/para/markup/resources_buttons.rb +15 -11
- data/lib/para/model_field_parsers/wysiwyg_editor.rb +19 -0
- data/lib/para/model_field_parsers.rb +1 -1
- data/lib/para/version.rb +1 -1
- data/lib/para.rb +2 -8
- data/lib/simple_form_extension/components/icons.rb +13 -0
- data/lib/simple_form_extension/components/popovers.rb +46 -0
- data/lib/simple_form_extension/components.rb +8 -0
- data/lib/simple_form_extension/ext/form_builder.rb +20 -0
- data/lib/simple_form_extension/file_concern.rb +74 -0
- data/lib/simple_form_extension/inputs/boolean_input.rb +16 -0
- data/lib/simple_form_extension/inputs/collection_check_boxes_input.rb +15 -0
- data/lib/simple_form_extension/inputs/collection_radio_buttons_input.rb +15 -0
- data/lib/simple_form_extension/inputs/color_input.rb +37 -0
- data/lib/simple_form_extension/inputs/date_time_input.rb +48 -0
- data/lib/simple_form_extension/inputs/file_input.rb +41 -0
- data/lib/simple_form_extension/inputs/image_input.rb +110 -0
- data/lib/simple_form_extension/inputs/numeric_input.rb +27 -0
- data/lib/simple_form_extension/inputs/selectize_input.rb +210 -0
- data/lib/simple_form_extension/inputs/slider_input.rb +30 -0
- data/lib/simple_form_extension/inputs.rb +16 -0
- data/lib/simple_form_extension/railtie.rb +21 -0
- data/lib/simple_form_extension/resource_name_helper.rb +9 -0
- data/lib/simple_form_extension/translations.rb +7 -0
- data/lib/simple_form_extension/version.rb +3 -0
- data/lib/simple_form_extension.rb +30 -0
- data/vendor/assets/images/simple_form_extension/bootstrap-colorpicker/alpha-horizontal.png +0 -0
- data/vendor/assets/images/simple_form_extension/bootstrap-colorpicker/alpha.png +0 -0
- data/vendor/assets/images/simple_form_extension/bootstrap-colorpicker/hue-horizontal.png +0 -0
- data/vendor/assets/images/simple_form_extension/bootstrap-colorpicker/hue.png +0 -0
- data/vendor/assets/images/simple_form_extension/bootstrap-colorpicker/saturation.png +0 -0
- data/vendor/assets/stylesheets/bootstrap-colorpicker.scss +227 -0
- data/vendor/assets/stylesheets/bootstrap-slider.scss +246 -0
- data/vendor/assets/stylesheets/bootstrap.scss +6032 -0
- data/vendor/assets/stylesheets/jquery.datetimepicker.scss +568 -0
- metadata +120 -188
- data/app/assets/javascripts/admin/app.coffee +0 -1
- data/app/assets/javascripts/para/admin/async-progress.coffee +0 -29
- data/app/assets/javascripts/para/admin/filters-form.coffee +0 -11
- data/app/assets/javascripts/para/admin/job-tracker.coffee +0 -39
- data/app/assets/javascripts/para/admin/table.coffee +0 -44
- data/app/assets/javascripts/para/admin/tabs.coffee +0 -63
- data/app/assets/javascripts/para/admin/theme_actions.coffee +0 -25
- data/app/assets/javascripts/para/admin/tree.coffee +0 -105
- data/app/assets/javascripts/para/admin.coffee +0 -22
- data/app/assets/javascripts/para/application.js +0 -13
- data/app/assets/javascripts/para/inputs/material-input.coffee +0 -4
- data/app/assets/javascripts/para/inputs/multi-select-input.coffee +0 -174
- data/app/assets/javascripts/para/inputs/nested_many.coffee +0 -108
- data/app/assets/javascripts/para/lib/ajax.coffee +0 -11
- data/app/assets/javascripts/para/lib/remote-file-forms.coffee +0 -59
- data/app/assets/javascripts/para/lib/turbolinks-forms.coffee +0 -23
- data/app/assets/javascripts/para/lib/turbolinks-loading.coffee +0 -25
- data/app/assets/javascripts/para/lib/turbolinks-reloader.coffee +0 -19
- data/app/assets/stylesheets/para/admin/main.sass +0 -33
- data/app/assets/stylesheets/para/admin/src/_affix.sass +0 -4
- data/app/assets/stylesheets/para/admin/src/_alert.sass +0 -17
- data/app/assets/stylesheets/para/admin/src/_base.sass +0 -54
- data/app/assets/stylesheets/para/admin/src/_breadcrumb.sass +0 -32
- data/app/assets/stylesheets/para/admin/src/_buttons.sass +0 -107
- data/app/assets/stylesheets/para/admin/src/_checkable.sass +0 -94
- data/app/assets/stylesheets/para/admin/src/_common.sass +0 -202
- data/app/assets/stylesheets/para/admin/src/_dropdown.sass +0 -40
- data/app/assets/stylesheets/para/admin/src/_form.sass +0 -299
- data/app/assets/stylesheets/para/admin/src/_list.sass +0 -89
- data/app/assets/stylesheets/para/admin/src/_mixins.sass +0 -113
- data/app/assets/stylesheets/para/admin/src/_multi-select.sass +0 -91
- data/app/assets/stylesheets/para/admin/src/_navigation.sass +0 -171
- data/app/assets/stylesheets/para/admin/src/_navtabs.sass +0 -58
- data/app/assets/stylesheets/para/admin/src/_nested-many.sass +0 -75
- data/app/assets/stylesheets/para/admin/src/_nested_one.sass +0 -22
- data/app/assets/stylesheets/para/admin/src/_orderable.sass +0 -44
- data/app/assets/stylesheets/para/admin/src/_page-loading.sass +0 -39
- data/app/assets/stylesheets/para/admin/src/_pagination.sass +0 -34
- data/app/assets/stylesheets/para/admin/src/_panel.sass +0 -55
- data/app/assets/stylesheets/para/admin/src/_responsive.sass +0 -117
- data/app/assets/stylesheets/para/admin/src/_sorting.sass +0 -36
- data/app/assets/stylesheets/para/admin/src/_statcard.sass +0 -41
- data/app/assets/stylesheets/para/admin/src/_table.sass +0 -33
- data/app/assets/stylesheets/para/admin/src/_tree.sass +0 -52
- data/app/assets/stylesheets/para/admin.sass +0 -12
- data/app/assets/stylesheets/para/lib/compass/_support.scss +0 -447
- data/app/assets/stylesheets/para/lib/compass/css3/_box-shadow.scss +0 -88
- data/app/assets/stylesheets/para/lib/compass/css3/_images.scss +0 -152
- data/app/assets/stylesheets/para/lib/compass/css3/_inline-block.scss +0 -31
- data/app/assets/stylesheets/para/lib/compass/css3/_text-shadow.scss +0 -82
- data/app/assets/stylesheets/para/lib/compass/css3/_transform.scss +0 -590
- data/app/assets/stylesheets/para/lib/compass/css3/_transition.scss +0 -190
- data/app/assets/stylesheets/para/lib/compass/css3/_user-interface.scss +0 -71
- data/app/assets/stylesheets/para/lib/compass/utilities/general/_hacks.scss +0 -65
- data/app/assets/stylesheets/para/lib/datetimepicker.sass +0 -15
- data/app/assets/stylesheets/para/lib/fuelux.sass +0 -40
- data/app/assets/stylesheets/para/lib/jasny-bootstrap.sass +0 -97
- data/app/assets/stylesheets/para/lib/redactor.sass +0 -86
- data/app/assets/stylesheets/para/lib/selectize.sass +0 -111
- data/app/assets/stylesheets/para/lib/slider.sass +0 -12
- data/app/assets/stylesheets/para/plugins-includes.sass.erb +0 -1
- data/lib/para/attribute_field/redactor.rb +0 -22
- data/lib/para/ext/request_iframe_xhr.rb +0 -17
- data/lib/para/iframe_transport/middleware.rb +0 -58
- data/lib/para/iframe_transport.rb +0 -7
- data/lib/para/model_field_parsers/redactor.rb +0 -19
- data/vendor/assets/javascripts/jquery.iframe-transport.js +0 -260
- data/vendor/assets/javascripts/jquery.remote-modal-form.coffee +0 -145
- /data/app/assets/stylesheets/admin/{app.sass → app.scss} +0 -0
- /data/app/{assets/javascripts → javascripts}/para/plugins-includes.js.erb +0 -0
- /data/{vendor/assets/javascripts → app/javascripts/para/vendor}/Sortable.js +0 -0
- /data/{vendor/assets/javascripts → app/javascripts/para/vendor}/jasny-bootstrap.js +0 -0
- /data/{vendor/assets/javascripts → app/javascripts/para/vendor}/jquery.scrollto.js +0 -0
- /data/{vendor/assets/javascripts → app/javascripts/para/vendor}/jquery.sortable.js +0 -0
- /data/vendor/assets/stylesheets/{animate.css → animate.scss} +0 -0
- /data/vendor/assets/stylesheets/{hint.css → hint.scss} +0 -0
- /data/vendor/assets/stylesheets/{jasny-bootstrap.css → jasny-bootstrap.scss} +0 -0
@@ -0,0 +1,43 @@
|
|
1
|
+
//
|
2
|
+
// Sorting
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
//== Main style
|
6
|
+
//
|
7
|
+
//##
|
8
|
+
|
9
|
+
.sort_link,
|
10
|
+
.sort_link_asc,
|
11
|
+
.sort_link_desc {
|
12
|
+
position: relative;
|
13
|
+
cursor: pointer;
|
14
|
+
&:hover {
|
15
|
+
text-decoration: none;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
.sort_link:before,
|
19
|
+
.sort_link.asc:before,
|
20
|
+
.sort_link.desc:before {
|
21
|
+
position: absolute;
|
22
|
+
bottom: 7px;
|
23
|
+
right: -15px;
|
24
|
+
font-family: "Font Awesome 6 Free";
|
25
|
+
opacity: .9;
|
26
|
+
width: 10px;
|
27
|
+
height: 10px;
|
28
|
+
display: block;
|
29
|
+
}
|
30
|
+
.sort_link:before {
|
31
|
+
content: "\f0dc";
|
32
|
+
opacity: .3;
|
33
|
+
}
|
34
|
+
.sort_link.asc:before {
|
35
|
+
content: "\f0d7";
|
36
|
+
}
|
37
|
+
.sort_link.desc:before {
|
38
|
+
content: "\f0d8";
|
39
|
+
}
|
40
|
+
.sort_link.asc.disabled:before,
|
41
|
+
.sort_link.desc.disabled:before {
|
42
|
+
opacity: .1;
|
43
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
//
|
2
|
+
// Statcard
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
//== Main style
|
6
|
+
//
|
7
|
+
//##
|
8
|
+
|
9
|
+
.statcard {
|
10
|
+
position: relative;
|
11
|
+
display: block;
|
12
|
+
padding: 15px;
|
13
|
+
background-color: #fff;
|
14
|
+
border-radius: $border-radius-small;
|
15
|
+
@include clearfix;
|
16
|
+
@include default-transition;
|
17
|
+
@include material-box-shadow-soft;
|
18
|
+
&:hover,
|
19
|
+
&:focus {
|
20
|
+
@include material-box-shadow-soft(2);
|
21
|
+
text-decoration: none;
|
22
|
+
}
|
23
|
+
&.statcard-icon {
|
24
|
+
.icon-rounded {
|
25
|
+
float: left;
|
26
|
+
}
|
27
|
+
.startcard-body {
|
28
|
+
padding-left: 15px;
|
29
|
+
float: left;
|
30
|
+
/** truncat title if is to long **/
|
31
|
+
width: calc(100% - 60px);
|
32
|
+
.statcard-title {
|
33
|
+
width: 100%;
|
34
|
+
white-space: nowrap;
|
35
|
+
overflow: hidden;
|
36
|
+
text-overflow: ellipsis;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
41
|
+
.statcard-title {
|
42
|
+
color: $text-color;
|
43
|
+
font-size: $font-size-base;
|
44
|
+
font-weight: 500;
|
45
|
+
margin: 0;
|
46
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
//
|
2
|
+
// Table
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
// Main style
|
6
|
+
//
|
7
|
+
//##
|
8
|
+
|
9
|
+
.table {
|
10
|
+
margin-bottom: 0;
|
11
|
+
}
|
12
|
+
.table > thead > tr > th {
|
13
|
+
font-weight: 300;
|
14
|
+
}
|
15
|
+
.table > tbody > tr > td {
|
16
|
+
vertical-align: middle;
|
17
|
+
.label {
|
18
|
+
display: inline-block;
|
19
|
+
margin-bottom: 4px;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
.table > thead > tr > th {
|
23
|
+
border-bottom: 1px solid #A6AFBB;
|
24
|
+
}
|
25
|
+
//** Actions with 3 btn at least
|
26
|
+
.table-row-actions {
|
27
|
+
min-width: 180px;
|
28
|
+
text-align: right;
|
29
|
+
.btn {
|
30
|
+
margin: 0 3px;
|
31
|
+
}
|
32
|
+
//** img dont destroy the table and don't create horizontal scroll
|
33
|
+
}
|
34
|
+
.table > tbody > tr > td > img.max-width {
|
35
|
+
max-width: 250px;
|
36
|
+
}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
//
|
2
|
+
// Tree
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
//== Main style
|
6
|
+
//
|
7
|
+
//##
|
8
|
+
|
9
|
+
.root-tree {
|
10
|
+
padding-left: 0;
|
11
|
+
.tree {
|
12
|
+
padding-left: 40px;
|
13
|
+
|
14
|
+
.sortable-dragging {
|
15
|
+
.placeholder,
|
16
|
+
.btn-group {
|
17
|
+
display: none;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
.sortable-placeholder {
|
22
|
+
height: 30px;
|
23
|
+
margin: 10px 0px 20px 0;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
.node {
|
27
|
+
border-left: 4px solid $gray-light;
|
28
|
+
padding-bottom: 5px;
|
29
|
+
margin-top: 15px;
|
30
|
+
.node-row {
|
31
|
+
@include default-transition;
|
32
|
+
border-bottom: 1px dashed $gray-light;
|
33
|
+
padding: 5px;
|
34
|
+
&:first-child {
|
35
|
+
border-top: 1px dashed $gray-light;
|
36
|
+
}
|
37
|
+
&:hover {
|
38
|
+
background-color: $gray-lighter;
|
39
|
+
}
|
40
|
+
.btn {
|
41
|
+
margin: 0 3px;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
.handle {
|
45
|
+
font-size: 14px;
|
46
|
+
margin: 4px 14px 0 5px;
|
47
|
+
}
|
48
|
+
.node-name {
|
49
|
+
margin-top: 4px;
|
50
|
+
display: inline-block;
|
51
|
+
}
|
52
|
+
.placeholder {
|
53
|
+
border: dashed 1px $gray;
|
54
|
+
height: 30px;
|
55
|
+
margin-top: 5px;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
.tree {
|
59
|
+
list-style: none;
|
60
|
+
}
|
@@ -6,7 +6,7 @@
|
|
6
6
|
//
|
7
7
|
//##
|
8
8
|
|
9
|
-
@import "
|
9
|
+
@import "./bootstrap-variables";
|
10
10
|
|
11
11
|
//== Specific variables
|
12
12
|
//
|
@@ -14,15 +14,15 @@
|
|
14
14
|
|
15
15
|
//** Colors
|
16
16
|
|
17
|
-
$blue-darker: #3F4352
|
18
|
-
$purple: #AB8CE4
|
17
|
+
$blue-darker: #3F4352;
|
18
|
+
$purple: #AB8CE4;
|
19
19
|
|
20
20
|
//** padding & margin spacer
|
21
21
|
|
22
|
-
$spacer: 10px
|
23
|
-
$spacer-y: $spacer
|
24
|
-
$spacer-x: $spacer
|
22
|
+
$spacer: 10px;
|
23
|
+
$spacer-y: $spacer;
|
24
|
+
$spacer-x: $spacer;
|
25
25
|
|
26
26
|
//** Left menu
|
27
27
|
|
28
|
-
$left-menu-width-open:
|
28
|
+
$left-menu-width-open: 220px;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
@import "../../../../vendor/assets/stylesheets/animate";
|
2
|
+
@import "../../../../vendor/assets/stylesheets/hint";
|
3
|
+
@import "../../../../vendor/assets/stylesheets/jasny-bootstrap";
|
4
|
+
@import "../../../../vendor/assets/stylesheets/bootstrap-slider";
|
5
|
+
@import "../../../../vendor/assets/stylesheets/bootstrap-colorpicker";
|
6
|
+
@import "../../../../vendor/assets/stylesheets/jquery.datetimepicker";
|
7
|
+
@import "../../../../vendor/assets/stylesheets/bootstrap";
|
8
|
+
@import "./admin/src/variables";
|
9
|
+
@import "./admin/src/mixins";
|
10
|
+
@import "./lib/datetimepicker";
|
11
|
+
@import "./lib/fuelux";
|
12
|
+
@import "./lib/jasny-bootstrap";
|
13
|
+
@import "./lib/selectize";
|
14
|
+
@import "./lib/slider";
|
15
|
+
@import "./admin/main";
|
@@ -0,0 +1 @@
|
|
1
|
+
@import "./admin";
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/* Bootstrap Datetimepiker */
|
2
|
+
.xdsoft_datetimepicker {
|
3
|
+
.xdsoft_calendar td.xdsoft_default,
|
4
|
+
.xdsoft_calendar td.xdsoft_current,
|
5
|
+
.xdsoft_timepicker .xdsoft_time_box > div > div.xdsoft_current,
|
6
|
+
.xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current {
|
7
|
+
background: $brand-primary;
|
8
|
+
box-shadow: darken($brand-primary, 10%) 0px 1px 3px 0px inset;
|
9
|
+
}
|
10
|
+
.xdsoft_calendar td:hover,
|
11
|
+
.xdsoft_timepicker .xdsoft_time_box > div > div:hover,
|
12
|
+
.xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover {
|
13
|
+
background: $brand-success !important;
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
input[type=number]::-webkit-inner-spin-button,
|
2
|
+
input[type=number]::-webkit-outer-spin-button {
|
3
|
+
-webkit-appearance: none;
|
4
|
+
margin: 0;
|
5
|
+
}
|
6
|
+
.spinner,
|
7
|
+
.spinbox {
|
8
|
+
.spinbox-buttons,
|
9
|
+
.spinner-buttons {
|
10
|
+
height: 100%;
|
11
|
+
}
|
12
|
+
.btn {
|
13
|
+
position: relative;
|
14
|
+
height: 50%;
|
15
|
+
padding: 3px 9px 4px 9px;
|
16
|
+
line-height: 0px;
|
17
|
+
font-size: 10px;
|
18
|
+
top: 0px;
|
19
|
+
margin-left: -1px !important;
|
20
|
+
border-color: $input-border;
|
21
|
+
box-shadow: none;
|
22
|
+
z-index: 2;
|
23
|
+
.fa {
|
24
|
+
font-size: 1em;
|
25
|
+
margin-right: 0;
|
26
|
+
line-height: 9px;
|
27
|
+
}
|
28
|
+
&.disabled {
|
29
|
+
cursor: not-allowed;
|
30
|
+
}
|
31
|
+
&:hover,
|
32
|
+
&:focus {
|
33
|
+
box-shadow: none;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
.spinner-up,
|
37
|
+
.spinbox-up {
|
38
|
+
border-top-left-radius: 0 !important;
|
39
|
+
border-top-right-radius: $input-border-radius !important;
|
40
|
+
}
|
41
|
+
.spinner-down,
|
42
|
+
.spinbox-down {
|
43
|
+
border-bottom-left-radius: 0 !important;
|
44
|
+
padding: 3px 9px 3px 9px;
|
45
|
+
}
|
46
|
+
}
|
@@ -0,0 +1,100 @@
|
|
1
|
+
//== Jasny Bootstrap
|
2
|
+
//
|
3
|
+
//## Fileupload overrides
|
4
|
+
|
5
|
+
.fileinput {
|
6
|
+
margin-bottom: 0;
|
7
|
+
display: block;
|
8
|
+
&.fileinput-new {
|
9
|
+
.fileinput-placeholder {
|
10
|
+
display: block;
|
11
|
+
}
|
12
|
+
}
|
13
|
+
&.fileinput-exists {
|
14
|
+
.fileinput-placeholder {
|
15
|
+
display: none;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
.uneditable-input {
|
19
|
+
background-color: $input-bg-disabled;
|
20
|
+
}
|
21
|
+
//** Override btn color for feeting to the design
|
22
|
+
.btn-file {
|
23
|
+
color: #fff;
|
24
|
+
background-color: $btn-primary-bg;
|
25
|
+
border-color: $btn-primary-border;
|
26
|
+
@include material-box-shadow-soft(1);
|
27
|
+
@include default-transition;
|
28
|
+
&:hover,
|
29
|
+
&:focus,
|
30
|
+
&:active,
|
31
|
+
&:active:hover,
|
32
|
+
&:active:focus,
|
33
|
+
&.active {
|
34
|
+
background-color: $btn-primary-bg !important;
|
35
|
+
border-color: $btn-primary-border !important;
|
36
|
+
color: #fff;
|
37
|
+
}
|
38
|
+
&:active,
|
39
|
+
&.active {
|
40
|
+
@include material-box-shadow-soft(2);
|
41
|
+
}
|
42
|
+
}
|
43
|
+
.btn-danger {
|
44
|
+
@include material-box-shadow-soft(1);
|
45
|
+
@include default-transition;
|
46
|
+
&:hover,
|
47
|
+
&:focus,
|
48
|
+
&:active,
|
49
|
+
&:active:hover,
|
50
|
+
&:active:focus,
|
51
|
+
&.active {
|
52
|
+
background-color: $btn-danger-bg !important;
|
53
|
+
border-color: $btn-danger-border !important;
|
54
|
+
color: #fff;
|
55
|
+
}
|
56
|
+
&:active,
|
57
|
+
&.active {
|
58
|
+
@include material-box-shadow-soft(2);
|
59
|
+
}
|
60
|
+
&.fileinput-exists {
|
61
|
+
margin-left: 10px;
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
|
+
.fileinput-new.input-group .btn-file,
|
66
|
+
.fileinput.input-group .btn-file {
|
67
|
+
border-top-right-radius: $border-radius-base;
|
68
|
+
border-bottom-right-radius: $border-radius-base;
|
69
|
+
border-color: $input-border;
|
70
|
+
}
|
71
|
+
.fileinput.input-group .input-group-btn {
|
72
|
+
.form-control.file {
|
73
|
+
padding: 0 !important;
|
74
|
+
position: absolute;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
.fileinput {
|
78
|
+
.input-group-btn > .btn:hover,
|
79
|
+
.input-group-btn > .btn:focus,
|
80
|
+
.input-group-btn > .btn:active {
|
81
|
+
z-index: 0;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
.fileinput-preview.thumbnail {
|
85
|
+
width: auto;
|
86
|
+
height: auto;
|
87
|
+
min-width: 80px;
|
88
|
+
min-height: 80px;
|
89
|
+
max-height: 500px;
|
90
|
+
margin-bottom: 0;
|
91
|
+
margin-top: 10px;
|
92
|
+
background-color: $gray-light;
|
93
|
+
border: none;
|
94
|
+
|
95
|
+
.empty-thumbnail {
|
96
|
+
width: 72px;
|
97
|
+
height: 72px;
|
98
|
+
background-color: $gray-light;
|
99
|
+
}
|
100
|
+
}
|
@@ -0,0 +1,129 @@
|
|
1
|
+
//
|
2
|
+
// Selectize
|
3
|
+
// --------------------------------------------------
|
4
|
+
@import "@selectize/selectize/dist/css/selectize";
|
5
|
+
@import "@selectize/selectize/dist/css/selectize.bootstrap3";
|
6
|
+
|
7
|
+
//== Selectize
|
8
|
+
//
|
9
|
+
//## Override default style
|
10
|
+
|
11
|
+
//** Debug ghost margin bottom
|
12
|
+
.selectize-control,
|
13
|
+
.selectize-control.form-control {
|
14
|
+
line-height: 0;
|
15
|
+
}
|
16
|
+
//** Single
|
17
|
+
.selectize-control {
|
18
|
+
&.single {
|
19
|
+
.selectize-input {
|
20
|
+
padding-right: 30px;
|
21
|
+
//** Caret by para
|
22
|
+
&:after {
|
23
|
+
@extend .fa;
|
24
|
+
@extend .fa-angle-down;
|
25
|
+
|
26
|
+
right: 12px;
|
27
|
+
border: none;
|
28
|
+
margin-top: -6px;
|
29
|
+
color: $gray;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
.selectize-input,
|
35
|
+
.selectize-input.full {
|
36
|
+
border-color: $input-border;
|
37
|
+
border-radius: $input-border-radius;
|
38
|
+
|
39
|
+
&.focus {
|
40
|
+
border-color: $input-border-focus;
|
41
|
+
}
|
42
|
+
|
43
|
+
&.dropdown-active {
|
44
|
+
border-radius: $input-border-radius;
|
45
|
+
&:after {
|
46
|
+
border: none;
|
47
|
+
transform: rotate(180deg);
|
48
|
+
margin-top: -6px;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
input {
|
53
|
+
text-overflow: ellipsis;
|
54
|
+
width: 100% !important;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
.selectize-control.single .selectize-input {
|
58
|
+
&.dropdown-active {
|
59
|
+
&:after {
|
60
|
+
margin-top: -6px;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
.selectize-dropdown,
|
65
|
+
.selectize-input,
|
66
|
+
.selectize-input input {
|
67
|
+
color: $input-color;
|
68
|
+
}
|
69
|
+
.selectize-input,
|
70
|
+
.selectize-control.single .selectize-input.input-active {
|
71
|
+
background: $input-bg;
|
72
|
+
}
|
73
|
+
.selectize-input,
|
74
|
+
.selectize-input.full,
|
75
|
+
.selectize-input.not-full {
|
76
|
+
background: $input-bg;
|
77
|
+
}
|
78
|
+
.selectize-input.not-full input {
|
79
|
+
::placeholder {
|
80
|
+
color: $input-color-placeholder;
|
81
|
+
font-size: 0.9em;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
.selectize-dropdown {
|
85
|
+
[data-selectable] {
|
86
|
+
background-color: $dropdown-bg;
|
87
|
+
color: $dropdown-link-color;
|
88
|
+
}
|
89
|
+
.active {
|
90
|
+
background-color: $gray-lighter;
|
91
|
+
color: $dropdown-link-hover-color;
|
92
|
+
}
|
93
|
+
.selected {
|
94
|
+
background-color: $dropdown-link-active-bg;
|
95
|
+
color: $dropdown-link-active-color;
|
96
|
+
}
|
97
|
+
}
|
98
|
+
.selectize-control.multi .selectize-input > div {
|
99
|
+
background-color: $gray-light;
|
100
|
+
border-radius: 2px;
|
101
|
+
color: $text-color;
|
102
|
+
&:hover,
|
103
|
+
&:focus,
|
104
|
+
&.active {
|
105
|
+
background-color: $navbar-default-bg;
|
106
|
+
color: $gray-lighter;
|
107
|
+
}
|
108
|
+
.remove {
|
109
|
+
&:hover {
|
110
|
+
background-color: $blue-darker;
|
111
|
+
}
|
112
|
+
//== Selectize Dropdown
|
113
|
+
//
|
114
|
+
//## Override z-index because of Fixed actions container
|
115
|
+
}
|
116
|
+
}
|
117
|
+
.selectize-dropdown,
|
118
|
+
.selectize-dropdown.form-control {
|
119
|
+
@include material-box-shadow-soft(2);
|
120
|
+
border: none;
|
121
|
+
margin: 8px 0 0 0;
|
122
|
+
z-index: $zindex-navbar-fixed + 20;
|
123
|
+
}
|
124
|
+
.selectize-dropdown {
|
125
|
+
[data-selectable] {
|
126
|
+
font-weight: 300;
|
127
|
+
padding: 8px 12px;
|
128
|
+
}
|
129
|
+
}
|
@@ -1,12 +1,13 @@
|
|
1
|
-
require_dependency
|
1
|
+
require_dependency 'para/application_controller'
|
2
2
|
|
3
3
|
module Para
|
4
4
|
module Admin
|
5
5
|
class CrudResourcesController < Para::Admin::ResourcesController
|
6
6
|
include Para::SearchHelper
|
7
|
+
include Para::TagHelper
|
7
8
|
|
8
9
|
before_action :load_and_authorize_crud_resource
|
9
|
-
before_action :add_breadcrumbs, only: [
|
10
|
+
before_action :add_breadcrumbs, only: %i[show index edit new]
|
10
11
|
|
11
12
|
# Include after resource loading to allow the concern to use the resource
|
12
13
|
# in before_action hooks
|
@@ -21,10 +22,14 @@ module Para
|
|
21
22
|
|
22
23
|
# Sort collection for orderable and trees
|
23
24
|
@resources = if @resources.respond_to?(:ordered)
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
@resources.ordered
|
26
|
+
else
|
27
|
+
@resources.order(created_at: :desc)
|
28
|
+
end
|
29
|
+
|
30
|
+
return unless turbo_frame_request?
|
31
|
+
|
32
|
+
listing_for(@resources)
|
28
33
|
end
|
29
34
|
|
30
35
|
def clone
|
@@ -44,10 +49,10 @@ module Para
|
|
44
49
|
end
|
45
50
|
|
46
51
|
flash_message(:success, new_resource)
|
47
|
-
redirect_to @component.relation_path(new_resource, action: :edit)
|
52
|
+
redirect_to @component.relation_path(new_resource, action: :edit), status: 303
|
48
53
|
else
|
49
54
|
flash_message(:error, new_resource)
|
50
|
-
render after_form_submit_path
|
55
|
+
render after_form_submit_path, status: 422
|
51
56
|
end
|
52
57
|
end
|
53
58
|
|
@@ -68,7 +73,7 @@ module Para
|
|
68
73
|
def load_and_authorize_crud_resource
|
69
74
|
loader = self.class.cancan_resource_class.new(
|
70
75
|
self, resource_name, parent: false, class: resource_model.name,
|
71
|
-
|
76
|
+
find_by: :id, bypass_params_assignation: true
|
72
77
|
)
|
73
78
|
|
74
79
|
loader.load_and_authorize_resource
|
@@ -80,11 +85,13 @@ module Para
|
|
80
85
|
|
81
86
|
def attach_resource_to_component
|
82
87
|
return unless resource.persisted? && @component.namespaced?
|
88
|
+
|
83
89
|
@component.add_resource(resource)
|
84
90
|
end
|
85
91
|
|
86
92
|
def remove_resource_from_component
|
87
93
|
return unless @component.namespaced?
|
94
|
+
|
88
95
|
@component.remove_resource(resource)
|
89
96
|
end
|
90
97
|
|
@@ -18,7 +18,7 @@ module Para
|
|
18
18
|
|
19
19
|
track_job(job)
|
20
20
|
else
|
21
|
-
render 'new'
|
21
|
+
render 'new', status: 422
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
@@ -31,18 +31,18 @@ module Para
|
|
31
31
|
importer.name == importer_name
|
32
32
|
end
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
34
|
+
return if @importer
|
35
|
+
|
36
|
+
raise "Requested importer (#{importer_name}) not found for " +
|
37
|
+
":#{@component.identifier} component."
|
38
38
|
end
|
39
39
|
|
40
40
|
def file_params
|
41
41
|
@file_params ||= if params[:file]
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
42
|
+
params.require(:file).permit(:attachment)
|
43
|
+
else
|
44
|
+
{}
|
45
|
+
end
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
@@ -30,6 +30,8 @@ module Para
|
|
30
30
|
class JobsController < Para::Admin::ComponentController
|
31
31
|
include Para::Admin::ResourceControllerConcerns
|
32
32
|
|
33
|
+
helper_method :job_additional_attributes
|
34
|
+
|
33
35
|
def show
|
34
36
|
@status = ActiveJob::Status.get(params[:id])
|
35
37
|
|
@@ -59,7 +61,11 @@ module Para
|
|
59
61
|
@job = job
|
60
62
|
@status = ActiveJob::Status.get(@job)
|
61
63
|
|
62
|
-
|
64
|
+
redirect_to action: :show, id: @job.job_id, status: 303
|
65
|
+
end
|
66
|
+
|
67
|
+
def job_additional_attributes
|
68
|
+
{}
|
63
69
|
end
|
64
70
|
end
|
65
71
|
end
|