thecore_ui_rails_admin 2.1.9 → 2.1.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1a6756ba49af59b55c1fa566eca295c98e52c7580f184e1d45ae0c25a7bd75f4
4
- data.tar.gz: ecbfb2985e40f30bb57c3c3a81469cc1d3147c9fdac68d999005dfc162899229
3
+ metadata.gz: fbf77f646c8577cab06d80ade8004c78b1455be56867e5ae56dfcdc949e35b8b
4
+ data.tar.gz: 433db917ac25f7ad766b8a848dd27adaeda8ab29a3a0551a5eff19e0f57e83b7
5
5
  SHA512:
6
- metadata.gz: e638884d96e59d9d809885cd9a2a7e6a6ecb1cf4cef6a8bb93a17428f1492bd271e71b253a251b53b7c191aa128796fd602b67f7059b48432a832548e979ec97
7
- data.tar.gz: 2b248f371c27d01b9189f654351c15a2475383effa6ad47fc6c4c91a177c7c304bb2eb41c95479d25be66406bfa59fb1aab4bbab74b09145a94342fd549d2152
6
+ metadata.gz: dc9d7a25a6c563bf3a3c76a90bc035706ea21f0988927e4f109ba0341330bb83b8fb4984f32b429122012ba597a33417e0008342b14e3ad138ad9725f63fa2e4
7
+ data.tar.gz: 6555e2fbe16a900fc73fbc5d9c3a26677c17366199a66fd5e73fab44c21e67606ab157f733eb2d9846884bc7dc73a11a5dec7f94ef1972c96e1d019cf34dec4d
@@ -0,0 +1,233 @@
1
+ $(document).on 'rails_admin.dom_ready', (e, content) ->
2
+ content = if content then content else $('form')
3
+
4
+ if content.length # don't waste time otherwise
5
+
6
+ # colorpicker
7
+
8
+ content.find('[data-color]').each ->
9
+ that = this
10
+ $(this).ColorPicker
11
+ color: $(that).val()
12
+ onShow: (el) ->
13
+ $(el).fadeIn(500)
14
+ false
15
+ onHide: (el) ->
16
+ $(el).fadeOut(500)
17
+ false
18
+ onChange: (hsb, hex, rgb) ->
19
+ $(that).val(hex)
20
+ $(that).css('backgroundColor', '#' + hex)
21
+
22
+ # datetime picker
23
+ $.fn.datetimepicker.defaults.icons =
24
+ time: 'fa fa-clock'
25
+ date: 'fa fa-calendar'
26
+ up: 'fa fa-chevron-up'
27
+ down: 'fa fa-chevron-down'
28
+ previous: 'fa fa-angle-double-left'
29
+ next: 'fa fa-angle-double-right'
30
+ today: 'fa fa-dot-circle'
31
+ clear: 'fa fa-trash'
32
+ close: 'fa fa-times'
33
+
34
+ content.find('[data-datetimepicker]').each ->
35
+ options = $(this).data('options')
36
+ $.extend(options, {locale: RailsAdmin.I18n.locale})
37
+ $(this).datetimepicker options
38
+
39
+ # enumeration
40
+
41
+ content.find('[data-enumeration]').each ->
42
+ if $(this).is('[multiple]')
43
+ $(this).filteringMultiselect $(this).data('options')
44
+ else
45
+ $(this).filteringSelect $(this).data('options')
46
+
47
+ # fileupload
48
+
49
+ content.find('[data-fileupload]').each ->
50
+ input = this
51
+ $(this).on 'click', ".delete input[type='checkbox']", ->
52
+ $(input).children('.toggle').toggle('slow')
53
+
54
+ # fileupload-preview
55
+
56
+ content.find('[data-fileupload]').change ->
57
+ input = this
58
+ image_container = $("#" + input.id).parent().children(".preview")
59
+ unless image_container.length
60
+ image_container = $("#" + input.id).parent().prepend($('<img />').addClass('preview').addClass('img-thumbnail')).find('img.preview')
61
+ image_container.parent().find('img:not(.preview)').hide()
62
+ ext = $("#" + input.id).val().split('.').pop().toLowerCase()
63
+ if input.files and input.files[0] and $.inArray(ext, ['gif', 'png', 'jpg', 'jpeg', 'bmp']) != -1
64
+ reader = new FileReader()
65
+ reader.onload = (e) ->
66
+ image_container.attr "src", e.target.result
67
+ reader.readAsDataURL input.files[0]
68
+ image_container.show()
69
+ else
70
+ image_container.hide()
71
+
72
+ # filtering-multiselect
73
+
74
+ content.find('[data-filteringmultiselect]').each ->
75
+ $(this).filteringMultiselect $(this).data('options')
76
+ if $(this).parents("#modal").length # hide link if we already are inside a dialog (endless issues on nested dialogs with JS)
77
+ $(this).siblings('.btn').remove()
78
+ else
79
+ $(this).parents('.control-group').first().remoteForm()
80
+
81
+ # filtering-select
82
+
83
+ content.find('[data-filteringselect]').each ->
84
+ $(this).filteringSelect $(this).data('options')
85
+ if $(this).parents("#modal").length # hide link if we already are inside a dialog (endless issues on nested dialogs with JS)
86
+ $(this).siblings('.btn').remove()
87
+ else
88
+ $(this).parents('.control-group').first().remoteForm()
89
+
90
+ # nested-many
91
+
92
+ content.find('[data-nestedmany]').each ->
93
+ field = $(this).parents('.control-group').first()
94
+ nav = field.find('> .controls > .nav')
95
+ tab_content = field.find('> .tab-content')
96
+ toggler = field.find('> .controls > .btn-group > .toggler')
97
+ # add each nested field to a tab-pane and reference it in the nav
98
+ tab_content.children('.fields:not(.tab-pane)').addClass('tab-pane').each ->
99
+ $(this).attr('id', 'unique-id-' + (new Date().getTime()) + Math.floor(Math.random() * 100000)) # some elements are created on the same ms
100
+ nav.append('<li><a data-toggle="tab" href="#' + this.id + '">' + $(this).children('.object-infos').data('object-label') + '</a></li>')
101
+ # only if no tab is set to active
102
+ if nav.find("> li.active").length == 0
103
+ # init first tab, toggler and tab_content/tabs visibility
104
+ nav.find("> li > a[data-toggle='tab']:first").tab('show')
105
+ if nav.children().length == 0
106
+ nav.hide()
107
+ tab_content.hide()
108
+ toggler.addClass('disabled').removeClass('active').children('i').addClass('icon-chevron-right')
109
+ else
110
+ if toggler.hasClass('active')
111
+ nav.show()
112
+ tab_content.show()
113
+ toggler.children('i').addClass('icon-chevron-down')
114
+ else
115
+ nav.hide()
116
+ tab_content.hide()
117
+ toggler.children('i').addClass('icon-chevron-right')
118
+
119
+ # nested-one
120
+
121
+ content.find('[data-nestedone]').each ->
122
+ field = $(this).parents('.control-group').first()
123
+ nav = field.find("> .controls > .nav")
124
+ tab_content = field.find("> .tab-content")
125
+ toggler = field.find('> .controls > .btn-group > .toggler')
126
+ tab_content.children(".fields:not(.tab-pane)").addClass('tab-pane active').each ->
127
+ # Convert the "add nested field" button to just showing the title of the new model
128
+ field.find('> .controls .add_nested_fields').removeClass('add_nested_fields').html($(this).children('.object-infos').data('object-label'))
129
+ nav.append('<li><a data-toggle="tab" href="#' + this.id + '">' + $(this).children('.object-infos').data('object-label') + '</a></li>')
130
+ first_tab = nav.find("> li > a[data-toggle='tab']:first")
131
+ first_tab.tab('show')
132
+ field.find("> .controls > [data-target]:first").html('<i class="icon-white"></i> ' + first_tab.html())
133
+ nav.hide()
134
+ if nav.children().length == 0
135
+ nav.hide()
136
+ tab_content.hide()
137
+ toggler.addClass('disabled').removeClass('active').children('i').addClass('icon-chevron-right')
138
+ else
139
+ if toggler.hasClass('active')
140
+ toggler.children('i').addClass('icon-chevron-down')
141
+ tab_content.show()
142
+ else
143
+ toggler.children('i').addClass('icon-chevron-right')
144
+ tab_content.hide()
145
+
146
+ # polymorphic-association
147
+
148
+ content.find('[data-polymorphic]').each ->
149
+ type_select = $(this)
150
+ field = type_select.parents('.control-group').first()
151
+ object_select = field.find('select').last()
152
+ urls = type_select.data('urls')
153
+ type_select.on 'change', (e) ->
154
+ if $(this).val() is ''
155
+ object_select.html('<option value=""></option>')
156
+ else
157
+ $.ajax
158
+ url: urls[type_select.val()]
159
+ data:
160
+ compact: true
161
+ all: true
162
+ beforeSend: (xhr) ->
163
+ xhr.setRequestHeader("Accept", "application/json")
164
+ success: (data, status, xhr) ->
165
+ html = $('<option></option>')
166
+ $(data).each (i, el) ->
167
+ option = $('<option></option>')
168
+ option.attr('value', el.id)
169
+ option.text(el.label)
170
+ html = html.add(option)
171
+ object_select.html(html)
172
+
173
+ # ckeditor
174
+
175
+ goCkeditors = ->
176
+ content.find('[data-richtext=ckeditor]').not('.ckeditored').each (index, domEle) ->
177
+ try
178
+ if instance = window.CKEDITOR.instances[this.id]
179
+ instance.destroy(true)
180
+ window.CKEDITOR.replace(this, $(this).data('options'))
181
+ $(this).addClass('ckeditored')
182
+
183
+ $editors = content.find('[data-richtext=ckeditor]').not('.ckeditored')
184
+ if $editors.length
185
+ if not window.CKEDITOR
186
+ options = $editors.first().data('options')
187
+ window.CKEDITOR_BASEPATH = options['base_location']
188
+ $.getScript options['jspath'], (script, textStatus, jqXHR) =>
189
+ goCkeditors()
190
+ else
191
+ goCkeditors()
192
+
193
+ #codemirror
194
+
195
+ goCodeMirrors = (array) =>
196
+ array.each (index, domEle) ->
197
+ options = $(this).data('options')
198
+ textarea = this
199
+ $.getScript options['locations']['mode'], (script, textStatus, jqXHR) ->
200
+ $('head').append('<link href="' + options['locations']['theme'] + '" rel="stylesheet" media="all" type="text\/css">')
201
+ CodeMirror.fromTextArea(textarea, options['options'])
202
+ $(textarea).addClass('codemirrored')
203
+
204
+ array = content.find('[data-richtext=codemirror]').not('.codemirrored')
205
+ if array.length
206
+ @array = array
207
+ if not window.CodeMirror
208
+ options = $(array[0]).data('options')
209
+ $('head').append('<link href="' + options['csspath'] + '" rel="stylesheet" media="all" type="text\/css">')
210
+ $.getScript options['jspath'], (script, textStatus, jqXHR) =>
211
+ goCodeMirrors(@array)
212
+ else
213
+ goCodeMirrors(@array)
214
+
215
+ # bootstrap_wysihtml5
216
+
217
+ goBootstrapWysihtml5s = (array, config_options) =>
218
+ array.each ->
219
+ $(@).addClass('bootstrap-wysihtml5ed')
220
+ $(@).closest('.controls').addClass('well')
221
+ $(@).wysihtml5(config_options)
222
+
223
+ array = content.find('[data-richtext=bootstrap-wysihtml5]').not('.bootstrap-wysihtml5ed')
224
+ if array.length
225
+ @array = array
226
+ options = $(array[0]).data('options')
227
+ config_options = $.parseJSON(options['config_options'])
228
+ if not window.wysihtml5
229
+ $('head').append('<link href="' + options['csspath'] + '" rel="stylesheet" media="all" type="text\/css">')
230
+ $.getScript options['jspath'], (script, textStatus, jqXHR) =>
231
+ goBootstrapWysihtml5s(@array, config_options)
232
+ else
233
+ goBootstrapWysihtml5s(@array, config_options)
@@ -1,5 +1,6 @@
1
- //= require timer
2
- //= require_tree .
1
+ //= require thecore_ui_commons/thecore
2
+ //= require rails_admin/rails_admin
3
+ //= require selectize
3
4
 
4
5
  $(document).on('ready pjax:success', function(e) {
5
6
  handleActiveBase();
@@ -0,0 +1,7 @@
1
+ .apexcharts-menu-item {
2
+ color: black
3
+ }
4
+ .apexcharts-tooltip {
5
+ background: #f3f3f3;
6
+ color: orange;
7
+ }
@@ -0,0 +1,21 @@
1
+ $primary: #1f4068 !default;
2
+
3
+ $background: lighten($primary, 51%) !default;
4
+ $shadows: darken($primary, 10%) !default;
5
+
6
+ $text: $primary !default;
7
+ $text-highlight: lighten($text, 35%) !default;
8
+
9
+ $link: $text !default;
10
+ $link-highlight: lighten($link, 10%) !default;
11
+
12
+ $element: $primary !default;
13
+ $element-text: lighten($element, 40%) !default;
14
+ $element-text-highlight: lighten($element-text, 10%) !default;
15
+ $element-border: darken($element, 10%) !default;
16
+
17
+ $neutral: #706f6f !default;
18
+ $success: #37BC9B !default;
19
+ $info: #3BAFDA !default;
20
+ $danger: #E9573F !default;
21
+ $warning: #F6BB42 !default;
@@ -1,11 +1,12 @@
1
1
  body {
2
2
  height: 100vh;
3
3
  // background: linear-gradient(-20deg, #09b7b9 30%, #1c51a4 100%);
4
- background-color: rgb(59, 78, 89);
4
+ background-color: $background;
5
5
  }
6
6
 
7
7
  .jumbotron {
8
- background-color: rgb(59, 78, 89);
8
+ background-color: $background;
9
+ color: $text;
9
10
  }
10
11
 
11
12
  .vertical-center {
@@ -29,4 +30,14 @@ body {
29
30
  .fa-pencil:before,
30
31
  .icon-pencil:before {
31
32
  content: "\f044";
32
- }
33
+ }
34
+
35
+ #new_user div.checkbox:hover {
36
+ color: $text-highlight
37
+ }
38
+
39
+ #new_user div.actions input.btn {
40
+ width: 100%;
41
+ background-color: $element;
42
+ border-color: $element-border;
43
+ }
@@ -1,10 +1,3 @@
1
- $primary: #1c2c41;
2
- $secondary: #304158;
3
- $light: #47566c;
4
- $blue: #0C457D;
5
- $grey: #706f6f;
6
- $tertiary: #81C784;
7
-
8
1
  .devise {
9
2
  font-family: 'Raleway', sans-serif;
10
3
  height: 100vh;
@@ -19,11 +12,11 @@
19
12
  }
20
13
 
21
14
  .bckg-dark {
22
- // background: linear-gradient(-20deg, #09b7b9 30%, #1c51a4 100%);
23
- background-color: rgb(59, 78, 89);
15
+ background-color:$background;
24
16
  }
25
17
 
26
18
  .bckg-login {
19
+ background-color:$background;
27
20
  }
28
21
 
29
22
  .logo {
@@ -38,11 +31,11 @@
38
31
  }
39
32
 
40
33
  .bckg-dark-light {
41
- background: $secondary;
34
+ background: $text;
42
35
  }
43
36
 
44
37
  .bckg-blue {
45
- background: $blue;
38
+ background: $info;
46
39
  }
47
40
 
48
41
  .centered {
@@ -54,7 +47,7 @@
54
47
 
55
48
  .login-form-user {
56
49
  width: 25%;
57
- color: #fff;
50
+ color: $text-highlight;
58
51
  margin: 0 auto;
59
52
  margin-bottom: 25px;
60
53
 
@@ -65,7 +58,7 @@
65
58
  }
66
59
 
67
60
  .lost_id {
68
- color: #fff;
61
+ color: $text-highlight;
69
62
  margin-bottom: 15px;
70
63
  display: block;
71
64
  font-size: .9em;
@@ -111,16 +104,16 @@
111
104
  border: 0;
112
105
  }
113
106
  input[type="submit"] {
114
- background: $grey;
107
+ background: $neutral;
115
108
  border: 0;
116
109
  border-radius: 0;
117
110
  cursor: pointer;
118
111
  float: right;
119
- color: white;
112
+ color:$text-highlight;
120
113
  width:100%;
121
114
  }
122
115
  h2 {
123
- background: $grey;
116
+ background: $neutral;
124
117
  display: block;
125
118
  padding: 10px 15px;
126
119
  text-align: left;
@@ -129,15 +122,15 @@
129
122
  }
130
123
 
131
124
  .login-form {
132
- color: #fff;
125
+ color:$text-highlight;
133
126
  width: 30%;
134
127
 
135
128
  .links-form {
136
129
  a {
137
- color: $light;
130
+ color:$text-highlight;
138
131
  text-decoration: none;
139
132
  &:hover {
140
- color: $light;
133
+ color: $text-highlight;
141
134
  }
142
135
  }
143
136
  }
@@ -174,8 +167,8 @@
174
167
 
175
168
  input[type="submit"] {
176
169
  cursor: pointer;
177
- background: $tertiary;
178
- color: #fff;
170
+ background: $element-border;
171
+ color:$text-highlight;
179
172
  border-radius: 3px;
180
173
  border: 0;
181
174
  display: block;
@@ -184,15 +177,15 @@
184
177
  margin-top: 55px;
185
178
  width: 100%;
186
179
  &:hover {
187
- background: darken($tertiary, 5%);
180
+ background: darken($element-border, 5%);
188
181
  }
189
182
  }
190
183
 
191
184
  input[type="text"], input[type="email"], input[type="password"] {
192
185
  background-color: transparent;
193
186
  border: 0;
194
- border-bottom: 1px solid $light;
195
- color: #fff;
187
+ border-bottom: 1px solid $text-highlight;
188
+ color:$text-highlight;
196
189
  margin-top: 15px;
197
190
  padding-bottom: 15px;
198
191
  }
@@ -200,8 +193,8 @@
200
193
  .input-group-addon {
201
194
  background-color: transparent;
202
195
  border: 0;
203
- border-bottom: 1px solid $light;
204
- color: #fff;
196
+ border-bottom: 1px solid $text-highlight;
197
+ color:$text-highlight;
205
198
  margin-top: 15px;
206
199
  padding-bottom: 15px;
207
200
  padding-top: 12px;
@@ -11,18 +11,18 @@
11
11
 
12
12
  @-webkit-keyframes flash {
13
13
  0% { background-color: none; }
14
- 50% { background-color: #fbf8b2; }
14
+ 50% { background-color: $text-highlight; }
15
15
  100% { background-color: none; }
16
16
  }
17
17
 
18
18
  @-moz-keyframes flash {
19
19
  0% { background-color: none; }
20
- 50% { background-color: #fbf8b2; }
20
+ 50% { background-color: $text-highlight; }
21
21
  100% { background-color: none; }
22
22
  }
23
23
 
24
24
  @-ms-keyframes flash {
25
25
  0% { background-color: none; }
26
- 50% { background-color: #fbf8b2; }
26
+ 50% { background-color: $text-highlight; }
27
27
  100% { background-color: none; }
28
28
  }
@@ -11,18 +11,34 @@
11
11
  * file per style scope.
12
12
  *
13
13
  *= required _colors
14
-
14
+ *= require thecore_ui_commons/thecore
15
+ *= require rails_admin/rails_admin
16
+ *= require rails_admin_selectize/index
15
17
  *= require_self
16
18
  */
19
+ @import 'colors_override';
20
+ @import 'colors';
17
21
  @import "jquery-ui";
18
22
  @import "jquery-ui/dialog";
19
23
  @import 'bootstrap-sprockets';
20
24
  @import 'bootstrap';
21
25
  @import 'common';
26
+ @import "flashing";
22
27
  @import 'devise';
23
28
  @import 'animate';
24
29
  @import 'mixins';
30
+ @import 'apexcharts';
31
+ @import 'thecore_ui_commons/thecore';
32
+ @import "togglable-sidebar";
25
33
 
26
- #new_user div.actions input.btn.btn-warning {
27
- width: 100%;
34
+ .btn {
35
+ background-color: $element;
36
+ color: $element-text;
37
+ border-color: $element-border;
38
+ }
39
+
40
+ .btn:hover,
41
+ #new_user div.actions input.btn:hover {
42
+ color: $element-text-highlight;
43
+ background-color: $shadows;
28
44
  }
@@ -11,37 +11,122 @@
11
11
  * file per style scope.
12
12
  *
13
13
  *= required _colors
14
-
14
+ *= require thecore_ui_commons/thecore
15
+ *= require rails_admin/rails_admin
16
+ *= require rails_admin_selectize/index
15
17
  *= require_self
16
18
  */
17
- @import 'thecore';
18
- @import 'thecore_ui_commons/thecore';
19
- @import "togglable-sidebar";
20
- @import "flashing";
21
- @import 'common';
22
-
23
- $RAprimary: #1c2c41;
24
- $RAgreen: #37BC9B;
25
- $RAblue: #3BAFDA;
26
- $RAred: #E9573F;
27
- $RAyellow: #F6BB42;
19
+ @import "thecore";
28
20
 
29
- .page-header.dashboard {
30
- border-color: $RAprimary;
21
+ #filters > li > a:nth-child(1):hover, .dropdown-menu > li > a:nth-child(1):hover {
22
+ border-radius: 0;
23
+ }
24
+
25
+ span.label.label-info.form-label {
26
+ background-color: $primary;
27
+ }
28
+
29
+ .sidebar-nav li a {
30
+ color: $element-text;
31
+ }
32
+ #sidebar-wrapper .sidebar-nav {
33
+ background-color: $shadows !important;
34
+ color: $element-text;
35
+ &:hover {
36
+ color: $element-text-highlight !important;
37
+ }
38
+ .dropdown-header {
39
+ color: $element-text;
40
+ }
41
+ .sub-menu-container {
42
+ background-color: darken($shadows, 10%) !important;
43
+ }
44
+ .sub-menu-container .sub-menu a:hover {
45
+ color: $element-text-highlight !important;
46
+ }
47
+ .dropdown-header:hover, .dropdown-header.active, .dropdown-header.active .sub-menu-container .submenu:hover, .sub-menu.sub-menu-null a:hover {
48
+ background-color: $element;
49
+ color: $element-text-highlight !important;
50
+ }
51
+ }
52
+
53
+ #app-name {
54
+ color: $primary !important;
55
+ }
56
+
57
+ #sidebar-collapse {
58
+ color: $shadows !important;
31
59
  }
32
60
 
33
61
  .breadcrumb {
34
- background: $RAblue;
62
+ background: $element;
35
63
  .false a, .false:before {
36
- color: darken($RAblue, 30%) !important;
64
+ color: darken($element, 30%) !important;
37
65
  }
38
66
  .active, .active:before {
39
- color: #FFF;
67
+ color: $text-highlight;
40
68
  }
41
69
  }
42
70
 
71
+ #list .form-inline {
72
+ margin-bottom: 2em;
73
+ }
74
+
75
+ p.boolean_type a.label-success,
76
+ p.boolean_type a.label-danger {
77
+ background: none;
78
+ font-size: 1.5em;
79
+ &:hover {
80
+ background: none;
81
+ }
82
+ }
83
+
84
+ body.rails_admin .nav.nav-tabs {
85
+ margin-bottom: 0;
86
+ }
87
+
88
+ #bulk_form .panel:nth-of-type(1) {
89
+ border-top-right-radius: 0;
90
+ border-top-left-radius: 0;
91
+ }
92
+
93
+ #scope_selector li, #action-menu li {
94
+ border-top-left-radius: 0.5em;
95
+ border-top-right-radius: 0.5em;
96
+ &.selected {
97
+ background-color: #fff;
98
+ color: $text !important;
99
+ a {
100
+ color: $text !important;
101
+ }
102
+ }
103
+
104
+ a:hover {
105
+ border-top-left-radius: 0.5em;
106
+ border-top-right-radius: 0.5em;
107
+ background-color: rgba($element, .5);
108
+ color: $element-text-highlight !important;
109
+ }
110
+ }
111
+
112
+ .well {
113
+ background-color: darken($background, 2%);
114
+ border-color: darken($background, 2%);
115
+ }
116
+
117
+ .content a, a {
118
+ color: $link;
119
+ text-decoration: none;
120
+ &:hover {
121
+ color: $link-highlight; }
122
+ }
123
+
124
+ .page-header.dashboard {
125
+ border-color: $background;
126
+ }
127
+
43
128
  .table-striped {
44
- border-top-color: $RAblue;
129
+ border-top-color: $info;
45
130
  .links ul li {
46
131
  padding-right: 0;
47
132
  a {
@@ -53,9 +138,9 @@ $RAyellow: #F6BB42;
53
138
  .content {
54
139
  margin: 0px 0 15px 0;
55
140
  padding: 8px;
56
- background: rgb(59, 78, 89);
141
+ background: $background;
57
142
  &.dashboard {
58
- background: rgb(59, 78, 89);
143
+ background: $background;
59
144
  }
60
145
  .page-header {
61
146
  display: none;
@@ -63,20 +148,23 @@ $RAyellow: #F6BB42;
63
148
  }
64
149
 
65
150
  a.delete {
66
- color: #FFF;
151
+ color: $text-highlight;
67
152
  }
68
153
 
69
154
  .box {
155
+ border-radius: 1em;
156
+ display: block;
70
157
  padding: 15px;
71
158
  margin-bottom: 30px;
72
- border: 1px solid $RAprimary;
159
+ border: 1px solid $element-border;
73
160
  position: relative;
74
- min-height: 170px;
161
+ min-height: 15em;
75
162
  transition: all 0.3s ease;
76
- color: rgba(255,255,255,0.7);
163
+ background-color: lighten($element, 25%);
164
+ color: $element-text;
77
165
  overflow: hidden;
78
166
  &:hover, &:focus {
79
- border-color: #FFF;
167
+ border-color: $shadows;
80
168
  .icon-bg {
81
169
  transform: scale(1.5) rotate(20deg);
82
170
  }
@@ -87,14 +175,14 @@ a.delete {
87
175
  font-weight: 600;
88
176
  a.btn {
89
177
  border-radius: 3px;
90
- color: rgba(255,255,255,0.7) !important;
178
+ color: rgba($text-highlight,0.7) !important;
91
179
  display: inline-block;
92
180
  margin-bottom: 0;
93
181
  font-weight: normal;
94
182
  text-align: center;
95
183
  vertical-align: middle;
96
184
  cursor: pointer;
97
- background-color: rgba(0, 0, 0, 0.19);
185
+ background-color: rgba($shadows, 0.19);
98
186
  border: 1px solid transparent;
99
187
  white-space: nowrap;
100
188
  padding: 6px 12px;
@@ -107,31 +195,41 @@ a.delete {
107
195
  user-select: none;
108
196
  }
109
197
  }
110
- strong {
111
- font-size: 36px;
198
+ strong.count {
199
+ font-size: 10em;
112
200
  font-weight: 600;
113
201
  }
202
+ p.model,
203
+ strong.count {
204
+ color: $element-text;
205
+ &:hover {
206
+ color: $element-text-highlight;
207
+ }
208
+ }
114
209
  .icon-bg {
115
210
  position: absolute;
116
211
  right: 0;
117
212
  bottom: 0;
118
- font-size: 100px;
119
- color: #000;
120
- opacity: 0.08;
121
- filter: alpha(opacity=8);
213
+ font-size: 15em;
214
+ color: $element-text;
215
+ opacity: 0.20;
216
+ filter: alpha(opacity=20);
122
217
  transition: all 1s ease;
123
218
  }
124
219
  &.bg-info {
125
- background-color: $RAblue;
220
+ background-color: $info;
126
221
  }
127
222
  &.bg-success {
128
- background-color: $RAgreen;
223
+ background-color: $success;
129
224
  }
130
225
  &.bg-warning {
131
- background-color: $RAyellow;
226
+ background-color: $warning;
132
227
  }
133
228
  &.bg-danger {
134
- background-color: $RAred;
229
+ background-color: $danger;
230
+ }
231
+ &.bg-clear {
232
+ background-color: $neutral;
135
233
  }
136
234
  }
137
235
 
@@ -140,14 +238,14 @@ a.delete {
140
238
  max-width: 300px;
141
239
  padding: 19px 29px 29px;
142
240
  margin: 0 auto 20px;
143
- background-color: #fff;
144
- border: 1px solid #e5e5e5;
241
+ background-color: $text-highlight;
242
+ border: 1px solid $element-border;
145
243
  -webkit-border-radius: 5px;
146
244
  -moz-border-radius: 5px;
147
245
  border-radius: 5px;
148
- -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
149
- -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
150
- box-shadow: 0 1px 2px rgba(0,0,0,.05);
246
+ -webkit-box-shadow: 0 1px 2px rgba($shadows,.05);
247
+ -moz-box-shadow: 0 1px 2px rgba($shadows,.05);
248
+ box-shadow: 0 1px 2px rgba($shadows,.05);
151
249
  }
152
250
  .border-form-div .form-signin-heading,
153
251
  .border-form-div .checkbox {
@@ -166,13 +264,13 @@ a.delete {
166
264
  background-color: transparent;
167
265
  background-image: none;
168
266
  border: 1px solid transparent;
169
- color: #888;
267
+ color: $neutral;
170
268
  }
171
269
  #sidebar-collapse:focus {
172
270
  outline: 0;
173
271
  }
174
272
  #sidebar-collapse:hover {
175
- color: white;
273
+ color:$text-highlight;
176
274
  }
177
275
 
178
276
  .exit-button {
@@ -185,15 +283,16 @@ a.delete {
185
283
 
186
284
  #app-name {
187
285
  font-size: 2em;
188
- color: #888;
286
+ color: $neutral;
189
287
  font-family: 'Raleway', sans-serif;
190
288
  word-wrap: normal;
191
289
  }
192
290
  #app-name:hover {
193
- color: white;
291
+ color: $text-highlight;
194
292
  text-decoration: none;
195
293
  }
196
294
 
197
295
  body.rails_admin {
198
296
  padding-top: 0px;
199
- }
297
+ background-color: $background;
298
+ }
@@ -32,13 +32,12 @@
32
32
  width: 100%;
33
33
  position: absolute;
34
34
  padding: 15px;
35
- background-color: rgb(59,78,89);
35
+ background-color: $background;
36
36
  min-height: 100vh;
37
37
  }
38
38
  #wrapper.toggled #page-content-wrapper {
39
39
  position: absolute;
40
40
  margin-right: -250px;
41
- background-color: rgb(59,78,89);
42
41
  }
43
42
  /* Sidebar Styles */
44
43
 
@@ -11,8 +11,6 @@
11
11
  div.sub-menu-container li.sub-menu a.pjax { padding-left: 0px }
12
12
  div#wrapper div#sidebar-wrapper { overflow: hidden }
13
13
 
14
- = stylesheet_link_tag "rails_admin/rails_admin.css", media: :all
15
- = javascript_include_tag "rails_admin/rails_admin.js"
16
14
  -# Getting all the assets needed by thecore_rails_admin from all the gems
17
15
  = get_asset_tags_for("thecore_rails_admin")
18
16
 
@@ -16,10 +16,13 @@
16
16
  - if @abstract_model
17
17
  = breadcrumb
18
18
  .well.well-sm
19
- %ul.nav.nav-pills
19
+ %ul.nav.nav-pills#action-menu
20
20
  = menu_for((@abstract_model ? (@object.try(:persisted?) ? :member : :collection) : :root), @abstract_model, @object)
21
21
  = content_for :contextual_tabs
22
22
  .well.well-sm
23
23
  = yield
24
24
  - else
25
25
  = yield
26
+
27
+ %script
28
+ $('.dropdown-toggle').dropdown()
@@ -1,4 +1,4 @@
1
- %div.panel.panel-success
1
+ %div.panel
2
2
  %div.panel-heading
3
3
  %ul.inline.list-inline.pull-right
4
4
  = menu_for :member, @abstract_model, object, true
@@ -6,6 +6,7 @@
6
6
  = check_box_tag "bulk_ids[]", object.id, false, id: "bulk_ids_#{object.id}"
7
7
  %a{:"data-toggle" => "collapse", href: "#object-id-#{object.id}"}
8
8
  = (object.resume rescue false || object.display_name rescue false || object.title rescue false || object.name rescue false || object.code rescue false)
9
+ %b.caret
9
10
  %div{id: "object-id-#{object.id}", class: "panel-collapse collapse"}
10
11
  %div.panel-body
11
12
  - properties.map{ |property| property.bind(:object, object) }.each do |property|
@@ -1,22 +1,33 @@
1
1
  = breadcrumb
2
- - @list_bg = ['info', 'success', 'danger', 'success', 'info', 'warning', 'danger', 'info', 'success']
2
+ - charts_high = []
3
+ - charts_medium = []
4
+ - self.methods.each do |m|
5
+ - charts_high << m if m.start_with? "charts_high_"
6
+ - charts_medium << m if m.start_with? "charts_medium_"
7
+
8
+ - charts_high.in_groups_of(2, false).each_with_index do |group, i|
9
+ .row
10
+ - group.each do |item|
11
+ .col-sm-6
12
+ .box= self.send(item)
13
+
14
+ - charts_medium.in_groups_of(3, false).each_with_index do |group, i|
15
+ .row
16
+ - group.each do |item|
17
+ .col-sm-4
18
+ .box= self.send(item)
19
+
3
20
  - if @abstract_models
4
21
  .row
5
- - index = 0
6
22
  - @abstract_models.each do |abstract_model|
7
23
  - index_path = index_path(model_name: abstract_model.to_param)
8
- - if authorized?(:index, abstract_model) && !index_path.include?("ckeditor")
9
- - if index == @list_bg.length
10
- - index = 0
11
- - row_class = "box bg-#{ @list_bg[index].to_s } #{"link" if index_path} #{abstract_model.param_key}_links #{abstract_model.config.label_plural}"
24
+ - if authorized?(:index, abstract_model)
12
25
  .col-sm-4
13
- .box{class: row_class, :"data-link" => index_path}
26
+ %a.box.pjax{href: index_path}
14
27
  %i{class: "icon-bg #{abstract_model.config.navigation_icon.present? ? abstract_model.config.navigation_icon : 'file' }"}
15
28
  .text-center
16
- %p= capitalize_first_letter(abstract_model.config.label_plural)
17
- %strong= @count[abstract_model.model.name].to_s
18
- %p= link_to content_tag("i", "", class: "fa fa-list-ul"), index_path, class: 'btn btn-black pjax'
19
- - index += 1
29
+ %p.model= capitalize_first_letter(abstract_model.config.label_plural)
30
+ %strong.count= @count[abstract_model.model.name].to_s
20
31
 
21
32
  - if @auditing_adapter && authorized?(:history_index)
22
33
  #block-tables.block
@@ -24,10 +24,10 @@
24
24
  = bulk_menu
25
25
  - if filterable_fields.present?
26
26
  %li.dropdown{style: 'float:right'}
27
- %a.dropdown-toggle{href: '#', :'data-toggle' => "dropdown"}
27
+ %a.dropdown-toggle#filters-menu{ :'data-toggle' => "dropdown", :'aria-haspopup'=>"true", :'aria-expanded'=>"true"}
28
28
  = t('admin.misc.add_filter')
29
29
  %b.caret
30
- %ul.dropdown-menu#filters{style: 'left:auto; right:0;'}
30
+ %ul.dropdown-menu#filters{style: 'left:auto; right:0;', :'aria-labelledby'=>"filters-menu"}
31
31
  - filterable_fields.each do |field|
32
32
  - field_options = case field.type
33
33
  - when :enum
@@ -44,27 +44,26 @@
44
44
 
45
45
  #list
46
46
  = form_tag(index_path(params.except(*%w[page f query])), method: :get, class: "pjax-form form-inline") do
47
- .well
48
- %span#filters_box{data: {options: ordered_filter_options.to_json}}
49
- %hr.filters_box{style: "display:#{ordered_filters.empty? ? 'none' : 'block'}"}
50
- .input-group
51
- %input.form-control.input-small{name: "query", type: "search", value: query, placeholder: t("admin.misc.filter")}
52
- %span.input-group-btn
53
- %button.btn.btn-primary{type: 'submit', :'data-disable-with' => '<i class="icon-white icon-refresh"></i> '.html_safe + t('admin.misc.refresh')}
54
- %i.icon-white.icon-refresh
55
- = t('admin.misc.refresh')
56
- %button#remove_filter.btn.btn-info{title: "Reset filters"}
57
- %i.icon-white.icon-remove
58
- - if export_action
59
- %span{style: 'float:right'}= link_to wording_for(:link, export_action), export_path(params.except('set').except('page')), class: 'btn btn-info'
47
+ %span#filters_box{data: {options: ordered_filter_options.to_json}}
48
+ %hr.filters_box{style: "display:#{ordered_filters.empty? ? 'none' : 'block'}"}
49
+ .input-group
50
+ %input.form-control.input-small{name: "query", type: "search", value: query, placeholder: t("admin.misc.filter")}
51
+ %span.input-group-btn
52
+ %button.btn.btn-primary{type: 'submit', :'data-disable-with' => '<i class="icon-white icon-refresh"></i> '.html_safe + t('admin.misc.refresh')}
53
+ %i.icon-white.icon-refresh
54
+ = t('admin.misc.refresh')
55
+ %button#remove_filter.btn.btn-info{title: "Reset filters"}
56
+ %i.icon-white.icon-remove
57
+ - if export_action
58
+ %span{style: 'float:right'}= link_to wording_for(:link, export_action), export_path(params.except('set').except('page')), class: 'btn btn-info'
60
59
 
61
60
  - unless @model_config.list.scopes.empty?
62
- %ul.nav.nav-tabs#scope_selector
63
- - @model_config.list.scopes.each_with_index do |scope, index|
61
+ %ul.nav.nav-tabs.nav-justified#scope_selector
62
+ - @model_config.list.scopes.each do |scope|
64
63
  - scope = '_all' if scope.nil?
65
- %li{class: "#{'active' if scope.to_s == params[:scope] || (params[:scope].blank? && index == 0)}"}
66
- %a{href: index_path(params.merge(scope: scope, page: nil)), class: 'pjax'}= I18n.t("admin.scopes.#{@abstract_model.to_param}.#{scope}", default: I18n.t("admin.scopes.#{scope}", default: scope.to_s.titleize))
67
-
64
+ %li{ class: "#{ scope.to_s == params[:scope] || (params[:scope].nil? && scope == "_all") ? "selected" : "inactive"}"}
65
+ %a.nav-link{href: index_path(params.merge(scope: scope, page: nil)), class: 'pjax'}= I18n.t("admin.scopes.#{@abstract_model.to_param}.#{scope}", default: I18n.t("admin.scopes.#{scope}", default: scope.to_s.titleize))
66
+
68
67
  = form_tag bulk_action_path(model_name: @abstract_model.to_param), method: :post, id: "bulk_form", class: ["form", frozen_columns ? 'ra-sidescroll' : nil], data: (frozen_columns ? {ra_sidescroll: frozen_columns} : {}) do
69
68
  = hidden_field_tag :bulk_action
70
69
  - if description.present?
@@ -1,9 +1,9 @@
1
1
  require 'rails_admin'
2
2
 
3
3
  RailsAdmin.config do |config|
4
- # config.main_app_name = Proc.new { |controller|
5
- # [(Settings.app_name rescue (ENV["APP_NAME"] || "TheCore App")), "#{controller.params[:action].try(:titleize)} (#{Time.zone.now.to_s(:time)})"]
6
- # }
4
+ # Link for background Job
5
+ (config.navigation_static_links ||= {}).merge! "Background Monitor" => "#{ENV['RAILS_RELATIVE_URL_ROOT']}/app/sidekiq"
6
+
7
7
  ### Popular gems integration
8
8
  config.model "RoleUser" do
9
9
  visible false
@@ -14,7 +14,7 @@ it:
14
14
  scopes: ⋔
15
15
  add_filter: ⋔
16
16
  add_new: ⋔
17
- refresh: ""
17
+ refresh: Apply Filters
18
18
  bulk_menu_title: ☰✔
19
19
  select:
20
20
  toggle: ☑
@@ -1,3 +1,3 @@
1
1
  module ThecoreUiRailsAdmin
2
- VERSION = '2.1.9'
2
+ VERSION = '2.1.14'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_ui_rails_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.9
4
+ version: 2.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-19 00:00:00.000000000 Z
11
+ date: 2020-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thecore_ui_commons
@@ -190,9 +190,11 @@ files:
190
190
  - README.md
191
191
  - Rakefile
192
192
  - app/assets/config/thecore_ui_rails_admin_manifest.js
193
- - app/assets/javascripts/thecore_ui_rails_admin/thecore.js
193
+ - app/assets/javascripts/rails_admin/ra.widgets.coffee
194
194
  - app/assets/javascripts/thecore_ui_rails_admin/thecore_rails_admin.js
195
195
  - app/assets/stylesheets/thecore_ui_rails_admin/animate.css
196
+ - app/assets/stylesheets/thecore_ui_rails_admin/apexcharts.scss
197
+ - app/assets/stylesheets/thecore_ui_rails_admin/colors.scss
196
198
  - app/assets/stylesheets/thecore_ui_rails_admin/common.scss
197
199
  - app/assets/stylesheets/thecore_ui_rails_admin/devise.scss
198
200
  - app/assets/stylesheets/thecore_ui_rails_admin/flashing.scss