Skip to content
This repository was archived by the owner on May 23, 2022. It is now read-only.

Commit 7fb31e8

Browse files
committed
Remove icheck + unnecessary js library + scss variable clean up + readme updated
1 parent e4364f1 commit 7fb31e8

File tree

4 files changed

+33
-88
lines changed

4 files changed

+33
-88
lines changed

README.md

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -39,38 +39,7 @@ Like we can't include custom js in a bundled theme with raild_admin for now, so,
3939
It will make the javascript menu works.
4040

4141
````javascript
42-
//= require icheck
43-
4442
$(document).on('ready pjax:success', function() {
45-
$('input').iCheck({
46-
checkboxClass: 'icheckbox_flat-grey selectable',
47-
radioClass: 'iradio_flat-grey'
48-
});
49-
50-
var checkBox = $('.table-striped > tbody > tr > td:first-child input[type="checkbox"]');
51-
var togglerCheck = $('th.shrink input[type="checkbox"]');
52-
53-
checkBox.on('ifChecked', function(e) {
54-
$(this).parent().parent().parent().addClass('row-highlight');
55-
});
56-
checkBox.on('ifUnchecked', function(e) {
57-
$(this).parent().parent().parent().removeClass('row-highlight');
58-
});
59-
60-
togglerCheck.on('ifChecked', function(e) {
61-
checkBox.iCheck('check');
62-
handleHighlight();
63-
});
64-
togglerCheck.on('ifUnchecked', function(e) {
65-
checkBox.iCheck('uncheck');
66-
$('.table-striped tbody tr').removeClass('row-highlight');
67-
});
68-
function handleHighlight() {
69-
$('.table-striped tbody td').has('div.checked').each(function(index, item) {
70-
$(item).parent().addClass('row-highlight');
71-
});
72-
}
73-
7443
handleActiveBase();
7544
function handleActiveBase() {
7645
$('.sub-menu').each(function () {
@@ -116,7 +85,6 @@ $(function () {
11685
});
11786
}
11887

119-
12088
$('.dropdown-header').bind('click', function () {
12189
$('.dropdown-header').removeClass('open');
12290
$(this).addClass('open');

rails_admin_rollincode.gemspec

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@ Gem::Specification.new do |s|
88
s.name = "rails_admin_rollincode"
99
s.version = RailsAdminRollincode::VERSION
1010
s.authors = ["KOVACS Nicolas"]
11-
s.email = ["perso.nkovacs@gmail.com"]
11+
s.email = ["pro.nicovak@gmail.com"]
1212
s.homepage = "https://github.com/rollincode/rails_admin_theme"
1313
s.summary = "Rails_Admin theme"
1414
s.description = "Rails_Admin theme"
1515
s.license = "MIT"
1616

1717
s.files = Dir["{lib,vendor}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"]
18-
s.add_dependency "icheck-rails", "~> 1.0.2.1"
19-
s.add_dependency "wysiwyg-rails", ">= 1.0.3"
2018
s.add_dependency 'rails', ['>= 4.0', '< 6']
2119
end

vendor/assets/stylesheets/rails_admin/themes/rollincode/theming.scss

Lines changed: 30 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,4 @@
11
@import url(https://fonts.googleapis.com/css?family=Raleway);
2-
@import "froala_editor.min";
3-
@import "froala_style.min";
4-
@import "plugins/char_counter.min";
5-
@import "plugins/code_view.min";
6-
@import "plugins/colors.min";
7-
@import "plugins/emoticons.min";
8-
@import "plugins/file.min";
9-
@import "plugins/fullscreen.min";
10-
@import "plugins/image.min";
11-
@import "plugins/image_manager.min";
12-
@import "plugins/line_breaker.min";
13-
@import "plugins/quick_insert.min";
14-
@import "plugins/table.min";
15-
@import "plugins/video.min";
16-
@import "font-awesome";
17-
@import "icheck/flat/all";
182

193
@mixin transition($time) {
204
-webkit-transition: all $time ease;
@@ -135,8 +119,8 @@ a.navbar-brand {
135119
background: $primary;
136120
border-color: darken($primary, 10%);
137121
&:hover, &:focus, &:target, &:active {
138-
background: $ternary;
139-
border-color: darken($ternary, 10%);
122+
background: $secondary;
123+
border-color: darken($secondary, 10%);
140124
color: $primary;
141125
}
142126
}
@@ -147,17 +131,17 @@ a.navbar-brand {
147131
}
148132

149133
.btn-primary {
150-
background: darken($ternary, 20%);
151-
border-color: darken($ternary, 20%);
134+
background: darken($secondary, 20%);
135+
border-color: darken($secondary, 20%);
152136
&:hover, &:focus, &:target, &:active {
153-
background: darken($ternary, 20%);
154-
border-color: darken($ternary, 20%);
137+
background: darken($secondary, 20%);
138+
border-color: darken($secondary, 20%);
155139
}
156140
}
157141

158142
.btn-primary.disabled {
159-
background: lighten($ternary, 20%);
160-
border-color: ligten($ternary, 20%);
143+
background: lighten($secondary, 20%);
144+
border-color: ligten($secondary, 20%);
161145
}
162146

163147
.alert {
@@ -184,7 +168,7 @@ a.navbar-brand {
184168
}
185169

186170
.navbar-default {
187-
background: darken($ternary, 20%);
171+
background: darken($secondary, 20%);
188172
border: 0;
189173
}
190174

@@ -199,17 +183,17 @@ a.navbar-brand {
199183
}
200184

201185
.dropdown-header:hover {
202-
background: $ternary;
186+
background: $secondary;
203187
}
204188

205189
.dropdown-header.active {
206-
background: $ternary;
190+
background: $secondary;
207191
}
208192

209193
a,
210194
.navbar-default .navbar-nav > li > a {
211195
&:hover {
212-
color: $ternary;
196+
color: $secondary;
213197
}
214198
color: white;
215199
}
@@ -222,17 +206,17 @@ a.navbar-brand {
222206
width: 100%;
223207
color: white !important;
224208
cursor: pointer !important;
225-
background: darken($ternary, 10%) !important;
209+
background: darken($secondary, 10%) !important;
226210
&:hover {
227-
background: darken($ternary, 10%) !important;
211+
background: darken($secondary, 10%) !important;
228212
color: white !important;
229213
}
230214
}
231215

232216
.page-header {
233217
margin-top: 0;
234218
h1 {
235-
background: $ternary;
219+
background: $secondary;
236220
padding: 10px 15px;
237221
color: white;
238222
border-radius: 2px;
@@ -246,7 +230,7 @@ a.navbar-brand {
246230
background: white;
247231
padding: 20px;
248232
a {
249-
color: $ternary;
233+
color: $secondary;
250234
}
251235
}
252236

@@ -256,7 +240,7 @@ a.navbar-brand {
256240

257241
.nav-pills > li > a:hover,
258242
.nav-pills > li > a:focus {
259-
color: $ternary !important;
243+
color: $secondary !important;
260244
}
261245

262246
.root_links {
@@ -266,7 +250,7 @@ a.navbar-brand {
266250
}
267251
color: white;
268252
&:hover {
269-
background: darken($ternary, 10%) !important;
253+
background: darken($secondary, 10%) !important;
270254
}
271255
a {
272256
&:hover {
@@ -293,14 +277,14 @@ a.navbar-brand {
293277
li a {
294278
color: #EEE;
295279
&:hover {
296-
color: $ternary !important;
280+
color: $secondary !important;
297281
}
298282
}
299283
li.active a {
300284
background: darken($primary, 10%);
301-
color: $ternary !important;
285+
color: $secondary !important;
302286
&:hover {
303-
color: $ternary !important;
287+
color: $secondary !important;
304288
}
305289
}
306290
}
@@ -319,16 +303,16 @@ h1,
319303
}
320304

321305
.fieldset a {
322-
color: $ternary !important;
306+
color: $secondary !important;
323307
}
324308

325309
.table-striped td:not(.image_field) a {
326310
text-decoration: none !important;
327311
padding: 8px 10px;
328312
border-radius: 2px;
329-
color: $ternary;
313+
color: $secondary;
330314
&:hover {
331-
background: $ternary;
315+
background: $secondary;
332316
color: $primary;
333317
}
334318
}
@@ -356,7 +340,7 @@ body.rails_admin .table td {
356340
}
357341

358342
.row-highlight td {
359-
background: rgba($ternary, .1) !important;
343+
background: rgba($secondary, .1) !important;
360344
}
361345

362346
.table-condensed > thead > tr > th, .table-condensed > thead > tr > td, .table-condensed > tbody > tr > th, .table-condensed > tbody > tr > td, .table-condensed > tfoot > tr > th, .table-condensed > tfoot > tr > td,
@@ -366,7 +350,7 @@ body.rails_admin .table td {
366350

367351
.table-striped {
368352
border: 1px solid #ddd;
369-
border-top: 4px solid $ternary;
353+
border-top: 4px solid $secondary;
370354
}
371355

372356
th.shrink {
@@ -435,7 +419,7 @@ td.carrierwave_type .img-thumbnail {
435419

436420
.sortable-container {
437421
width: 100%;
438-
background: lighten($ternary, 5%);
422+
background: lighten($secondary, 5%);
439423
margin-bottom: 15px;
440424
}
441425

@@ -445,16 +429,16 @@ td.carrierwave_type .img-thumbnail {
445429
}
446430

447431
.li_sortable_label {
448-
background: lighten($ternary, 5%);
432+
background: lighten($secondary, 5%);
449433
color: $primary;
450434
padding: 10px 15px;
451435
}
452436

453437
.ref_number {
454-
color: $ternary;
438+
color: $secondary;
455439
background: $primary;
456440
padding: 10px 15px;
457-
border-left: 2px solid darken($ternary, 20%);
441+
border-left: 2px solid darken($secondary, 20%);
458442
}
459443

460444
.ui-state-highlight {
@@ -505,7 +489,6 @@ td.carrierwave_type .img-thumbnail {
505489
#edit_page {
506490
.has_one_association_type {
507491
background: #F3F1F1;
508-
padding: 25px 15px;
509492
margin: 25px 15px!important;
510493
}
511494
}
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
$primary: #273135;
2-
$secondary: darken($primary, 10%);
3-
$light: #47566c;
4-
$ternary: #81C784;
5-
$rose: #e13278;
6-
$azul: #77DEE7;
2+
$secondary: #81C784;
73
$black: #1a1a1a;
8-
$background: #E9F0F5;
4+
$background: #E9F0F5;

0 commit comments

Comments
 (0)