8000 change indent level · udacity/activeadmin_json_editor@ccbc2ff · GitHub
[go: up one dir, main page]

8000 Skip to content

Commit ccbc2ff

Browse files
committed
change indent level
1 parent 90d4596 commit ccbc2ff

File tree

2 files changed

+32
-33
lines changed

2 files changed

+32
-33
lines changed

app/assets/javascripts/active_admin/hstore_editor.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
//= require jsoneditor/asset/jsonlint/jsonlint.js
33

44
;(function(window, $) {
5-
$(function() {
6-
/* multipart/form-data*/
7-
$('form').attr('enctype', 'application/json');
5+
$(function() {
6+
/* multipart/form-data*/
7+
$('form').attr('enctype', 'application/json');
88

9-
$('div.jsoneditor-wrap').each(function(i,wrap){
10-
var container = $(wrap)[0];
11-
var textarea = $($(wrap).find('textarea'));
12-
var editor;
13-
var options = {
14-
mode: 'tree',
15-
change: function(ev){
16-
textarea.text(JSON.stringify(editor.get()));
17-
}
18-
};
19-
editor = new JSONEditor(container, options,JSON.parse(textarea.val()));
20-
});
21-
})
9+
$('div.jsoneditor-wrap').each(function(i,wrap){
10+
var container = $(wrap)[0];
11+
var textarea = $($(wrap).find('textarea'));
12+
var editor;
13+
var options = {
14+
mode: 'tree',
15+
change: function(ev){
16+
textarea.text(JSON.stringify(editor.get()));
17+
}
18+
};
19+
editor = new JSONEditor(container, options,JSON.parse(textarea.val()));
20+
});
21+
})
2222
})(window, jQuery)

app/assets/stylesheets/active_admin/hstore_editor.css

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,43 @@
33
*/
44

55
.jsoneditor-wrap textarea {
6-
display: none;
6+
display: none;
77
}
88

99
.jsoneditor table {
10-
width: auto;
11-
margin-bottom: auto;
10+
width: auto;
11+
margin-bottom: auto;
1212
}
1313

1414

1515
.jsoneditor {
16-
background-color: white;
17-
width: auto;
18-
height: 300px;
19-
border-color: rgb(201, 208, 214);
20-
border-radius: 3px;
21-
border-width: 1px;
22-
16+
background-color: white;
17+
width: auto;
18+
height: 300px;
19+
border-color: rgb(201, 208, 214);
20+
border-radius: 3px;
21+
border-width: 1px;
2322
}
2423

2524
.jsoneditor .menu {
26-
background-image: -webkit-linear-gradient(top, rgb(253, 253, 253), rgb(244, 244, 244));
27-
border-bottom-color: rgb(201, 208, 214);
25+
background-image: -webkit-linear-gradient(top, rgb(253, 253, 253), rgb(244, 244, 244));
26+
border-bottom-color: rgb(201, 208, 214);
2827
}
2928

3029
.jsoneditor .menu a {
31-
color: rgb(201, 208, 214);
30+
color: rgb(201, 208, 214);
3231
}
3332

3433
.jsoneditor .menu button {
35-
border-color: rgb(201, 208, 214);
36-
background-color: white;
37-
color: white;
34+
border-color: rgb(201, 208, 214);
35+
background-color: white;
36+
color: white;
3837
}
3938

4039
.jsoneditor .menu button:disabled {
4140
background-color: #f4f4f4;
4241
}
4342

4443
.jsoneditor .search .frame {
45-
border-color: rgb(201, 208, 214);
44+
border-color: rgb(201, 208, 214);
4645
}

0 commit comments

Comments
 (0)
0