thecore_ui_rails_admin 2.1.5 → 2.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/{rails_admin/custom/ui.js → thecore_ui_rails_admin/thecore_rails_admin.js} +3 -26
  3. data/app/assets/stylesheets/{animate.css → thecore_ui_rails_admin/animate.css} +0 -0
  4. data/app/assets/stylesheets/thecore_ui_rails_admin/apexcharts.scss +7 -0
  5. data/app/assets/stylesheets/thecore_ui_rails_admin/colors.scss +21 -0
  6. data/app/assets/stylesheets/thecore_ui_rails_admin/common.scss +43 -0
  7. data/app/assets/stylesheets/{devise.scss → thecore_ui_rails_admin/devise.scss} +19 -26
  8. data/app/assets/stylesheets/{rails_admin → thecore_ui_rails_admin}/flashing.scss +3 -3
  9. data/app/assets/stylesheets/{mixins.scss → thecore_ui_rails_admin/mixins.scss} +0 -0
  10. data/app/assets/stylesheets/{thecore_rails_admin.scss → thecore_ui_rails_admin/thecore.scss} +19 -7
  11. data/app/assets/stylesheets/thecore_ui_rails_admin/thecore_rails_admin.scss +290 -0
  12. data/app/assets/stylesheets/{rails_admin → thecore_ui_rails_admin}/togglable-sidebar.scss +5 -2
  13. data/app/helpers/devise_bootstrap_errors_helper.rb +20 -0
  14. data/app/helpers/thecore_helper.rb +54 -0
  15. data/app/views/layouts/rails_admin/_secondary_navigation.html.haml +1 -1
  16. data/app/views/layouts/rails_admin/_user_navigation.html.haml +2 -2
  17. data/app/views/layouts/rails_admin/application.html.haml +2 -2
  18. data/app/views/layouts/rails_admin/pjax.html.haml +4 -1
  19. data/app/views/rails_admin/main/_card.html.haml +2 -1
  20. data/app/views/rails_admin/main/dashboard.html.haml +22 -11
  21. data/app/views/rails_admin/main/index.html.haml +19 -20
  22. data/app/views/shared/_flash.html.erb +10 -0
  23. data/config/initializers/rails_admin.rb +32 -4
  24. data/config/initializers/thecore_concern.rb +6 -1
  25. data/config/initializers/thecore_ui_rails_admin_app_configs.rb +9 -4
  26. data/config/locales/it.index_cards.custom.yml +1 -1
  27. data/config/locales/thecore_settings.en.yml +31 -0
  28. data/config/locales/thecore_settings.it.yml +31 -0
  29. data/db/migrate/20161227101954_create_rails_admin_settings.rb +25 -0
  30. data/db/migrate/20161227101956_add_app_name.rb +5 -0
  31. data/lib/abilities/thecore_ui_rails_admin.rb +12 -0
  32. data/lib/concerns/rails_admin_requirements.rb +19 -0
  33. data/lib/concerns/thecore_ui_rails_admin_permission.rb +32 -0
  34. data/lib/concerns/thecore_ui_rails_admin_role.rb +36 -0
  35. data/lib/concerns/thecore_ui_rails_admin_user.rb +58 -77
  36. data/lib/thecore_ui_rails_admin.rb +11 -1
  37. data/lib/thecore_ui_rails_admin/engine.rb +0 -7
  38. data/lib/thecore_ui_rails_admin/version.rb +1 -1
  39. metadata +66 -11
  40. data/app/assets/javascripts/rails_admin/custom/timer.js +0 -135
  41. data/app/assets/stylesheets/rails_admin/theming.scss +0 -213
@@ -1,135 +0,0 @@
1
- (function (root, factory) {
2
- 'use strict'
3
- if (typeof define === 'function' && define.amd) define([], factory)
4
- else if (typeof exports === 'object') module.exports = factory()
5
- else root.Timer = factory()
6
- }(this, function () {
7
- 'use strict'
8
-
9
- var defaultOptions = {
10
- tick : 1,
11
- onstart : null,
12
- ontick : null,
13
- onpause : null,
14
- onstop : null,
15
- onend : null
16
- }
17
-
18
- var Timer = function (options) {
19
- if (!(this instanceof Timer)) return new Timer(options)
20
- this._ = {
21
- id : +new Date,
22
- options : {},
23
- duration : 0,
24
- status : 'initialized',
25
- start : 0,
26
- measures : []
27
- }
28
- for (var prop in defaultOptions) this._.options[prop] = defaultOptions[prop]
29
- this.options(options)
30
- }
31
-
32
- Timer.prototype.start = function (duration) {
33
- if (!+duration && !this._.duration) return this
34
- duration && (duration *= 1000)
35
- if (this._.timeout && this._.status === 'started') return this
36
- this._.duration = duration || this._.duration
37
- this._.timeout = setTimeout(end.bind(this), this._.duration)
38
- if (typeof this._.options.ontick === 'function')
39
- this._.interval = setInterval(function () {
40
- trigger.call(this, 'ontick', this.getDuration())
41
- }.bind(this), +this._.options.tick * 1000)
42
- this._.start = +new Date
43
- this._.status = 'started'
44
- trigger.call(this, 'onstart', this.getDuration())
45
- return this
46
- }
47
-
48
- Timer.prototype.pause = function () {
49
- if (this._.status !== 'started') return this
50
- this._.duration -= (+new Date - this._.start)
51
- clear.call(this, false)
52
- this._.status = 'paused'
53
- trigger.call(this, 'onpause')
54
- return this
55
- }
56
-
57
- Timer.prototype.stop = function () {
58
- if (!/started|paused/.test(this._.status)) return this
59
- clear.call(this, true)
60
- this._.status = 'stopped'
61
- trigger.call(this, 'onstop')
62
- return this
63
- }
64
-
65
- Timer.prototype.getDuration = function () {
66
- if (this._.status === 'started')
67
- return this._.duration - (+new Date - this._.start)
68
- if (this._.status === 'paused') return this._.duration
69
- return 0
70
- }
71
-
72
- Timer.prototype.getStatus = function () {
73
- return this._.status
74
- }
75
-
76
- Timer.prototype.options = function (option, value) {
77
- if (option && value) this._.options[option] = value
78
- if (!value && typeof option === 'object')
79
- for (var prop in option)
80
- if (this._.options.hasOwnProperty(prop))
81
- this._.options[prop] = option[prop]
82
- return this
83
- }
84
-
85
- Timer.prototype.on = function (option, value) {
86
- if (typeof option !== 'string' || typeof value !== 'function') return this
87
- if (!(/^on/).test(option))
88
- option = 'on' + option
89
- if (this._.options.hasOwnProperty(option))
90
- this._.options[option] = value
91
- return this
92
- }
93
-
94
- Timer.prototype.off = function (option) {
95
- if (typeof option !== 'string') return this
96
- option = option.toLowerCase()
97
- if (option === 'all') {
98
- this._.options = defaultOptions
99
- return this
100
- }
101
- if (!(/^on/).test(option)) option = 'on' + option
102
- if (this._.options.hasOwnProperty(option))
103
- this._.options[option] = defaultOptions[option]
104
- return this
105
- }
106
-
107
- Timer.prototype.measureStart = function (label) {
108
- this._.measures[label || ''] = +new Date
109
- return this
110
- }
111
-
112
- Timer.prototype.measureStop = function (label) {
113
- return +new Date - this._.measures[label || '']
114
- }
115
-
116
- function end () {
117
- clear.call(this)
118
- this._.status = 'stopped'
119
- trigger.call(this, 'onend')
120
- }
121
-
122
- function trigger (event) {
123
- var callback = this._.options[event],
124
- args = [].slice.call(arguments, 1)
125
- typeof callback === 'function' && callback.apply(this, args)
126
- }
127
-
128
- function clear (clearDuration) {
129
- clearTimeout(this._.timeout)
130
- clearInterval(this._.interval)
131
- if (clearDuration === true) this._.duration = 0
132
- }
133
-
134
- return Timer
135
- }))
@@ -1,213 +0,0 @@
1
- @import "togglable-sidebar";
2
- @import "flashing";
3
-
4
- $RAprimary: #1c2c41;
5
- $RAgreen: #37BC9B;
6
- $RAblue: #3BAFDA;
7
- $RAred: #E9573F;
8
- $RAyellow: #F6BB42;
9
-
10
- body {
11
- height: 100vh;
12
- // background: linear-gradient(-20deg, #09b7b9 30%, #1c51a4 100%);
13
- background-color: rgb(59, 78, 89);
14
- }
15
-
16
- .jumbotron {
17
- background-color: rgb(59, 78, 89);
18
- }
19
-
20
- .vertical-center {
21
- min-height: 100%;
22
- /* Fallback for browsers do NOT support vh unit */
23
- min-height: 100vh;
24
- /* These two lines are counted as one :-) */
25
- display: flex;
26
- align-items: center;
27
- }
28
-
29
- #up-arrow {
30
- bottom: -2em;
31
- margin-right: auto;
32
- margin-left: auto;
33
- opacity: 0.2;
34
- filter: alpha(opacity=20);
35
- /* For IE8 and earlier */
36
- }
37
-
38
- .fa-pencil:before,
39
- .icon-pencil:before {
40
- content: "\f044";
41
- }
42
-
43
- .page-header.dashboard {
44
- border-color: $RAprimary;
45
- }
46
-
47
- .breadcrumb {
48
- background: $RAblue;
49
- .false a, .false:before {
50
- color: darken($RAblue, 30%) !important;
51
- }
52
- .active, .active:before {
53
- color: #FFF;
54
- }
55
- }
56
-
57
- .table-striped {
58
- border-top-color: $RAblue;
59
- .links ul li {
60
- padding-right: 0;
61
- a {
62
- border-radius: 50%;
63
- }
64
- }
65
- }
66
-
67
- .content {
68
- margin: 0px 0 15px 0;
69
- padding: 8px;
70
- background: rgb(59, 78, 89);
71
- &.dashboard {
72
- background: rgb(59, 78, 89);
73
- }
74
- .page-header {
75
- display: none;
76
- }
77
- }
78
-
79
- a.delete {
80
- color: #FFF;
81
- }
82
-
83
- .box {
84
- padding: 15px;
85
- margin-bottom: 30px;
86
- border: 1px solid $RAprimary;
87
- position: relative;
88
- min-height: 170px;
89
- transition: all 0.3s ease;
90
- color: rgba(255,255,255,0.7);
91
- overflow: hidden;
92
- &:hover, &:focus {
93
- border-color: #FFF;
94
- .icon-bg {
95
- transform: scale(1.5) rotate(20deg);
96
- }
97
- }
98
- p {
99
- min-height: 30px;
100
- font-size: 15px;
101
- font-weight: 600;
102
- a.btn {
103
- border-radius: 3px;
104
- color: rgba(255,255,255,0.7) !important;
105
- display: inline-block;
106
- margin-bottom: 0;
107
- font-weight: normal;
108
- text-align: center;
109
- vertical-align: middle;
110
- cursor: pointer;
111
- background-color: rgba(0, 0, 0, 0.19);
112
- border: 1px solid transparent;
113
- white-space: nowrap;
114
- padding: 6px 12px;
115
- font-size: 14px;
116
- line-height: 1.42857143;
117
- border-radius: 4px;
118
- -webkit-user-select: none;
119
- -moz-user-select: none;
120
- -ms-user-select: none;
121
- user-select: none;
122
- }
123
- }
124
- strong {
125
- font-size: 36px;
126
- font-weight: 600;
127
- }
128
- .icon-bg {
129
- position: absolute;
130
- right: 0;
131
- bottom: 0;
132
- font-size: 100px;
133
- color: #000;
134
- opacity: 0.08;
135
- filter: alpha(opacity=8);
136
- transition: all 1s ease;
137
- }
138
- &.bg-info {
139
- background-color: $RAblue;
140
- }
141
- &.bg-success {
142
- background-color: $RAgreen;
143
- }
144
- &.bg-warning {
145
- background-color: $RAyellow;
146
- }
147
- &.bg-danger {
148
- background-color: $RAred;
149
- }
150
- }
151
-
152
- /* User sign in and sign forms. */
153
- .border-form-div {
154
- max-width: 300px;
155
- padding: 19px 29px 29px;
156
- margin: 0 auto 20px;
157
- background-color: #fff;
158
- border: 1px solid #e5e5e5;
159
- -webkit-border-radius: 5px;
160
- -moz-border-radius: 5px;
161
- border-radius: 5px;
162
- -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
163
- -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
164
- box-shadow: 0 1px 2px rgba(0,0,0,.05);
165
- }
166
- .border-form-div .form-signin-heading,
167
- .border-form-div .checkbox {
168
- margin-bottom: 10px;
169
- }
170
- .border-form-div input[type="text"],
171
- .border-form-div input[type="email"],
172
- .border-form-div input[type="password"] {
173
- font-size: 16px;
174
- height: auto;
175
- margin-bottom: 15px;
176
- padding: 7px 9px;
177
- }
178
-
179
- #sidebar-collapse {
180
- background-color: transparent;
181
- background-image: none;
182
- border: 1px solid transparent;
183
- color: #888;
184
- }
185
- #sidebar-collapse:focus {
186
- outline: 0;
187
- }
188
- #sidebar-collapse:hover {
189
- color: white;
190
- }
191
-
192
- .exit-button {
193
- padding-top: 9px;
194
- padding-bottom: 9px;
195
- margin-top: 8px;
196
- margin-bottom: 8px;
197
- margin-right: 7px;
198
- }
199
-
200
- #app-name {
201
- font-size: 2em;
202
- color: #888;
203
- font-family: 'Raleway', sans-serif;
204
- word-wrap: normal;
205
- }
206
- #app-name:hover {
207
- color: white;
208
- text-decoration: none;
209
- }
210
-
211
- body.rails_admin {
212
- padding-top: 0px;
213
- }