rails_admin_json_editor 0.0.21 → 0.0.22

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
  SHA1:
3
- metadata.gz: 5d6b186a0c23dc9ca68b414a3e2ad48b8286afa0
4
- data.tar.gz: d570f7412b04dc32a90f2e89cd886719ade52e50
3
+ metadata.gz: 968f91b2616b5b8173d266e6cd6e234f6a70c26d
4
+ data.tar.gz: 6055ffcb8c8b200c33d69f1a65c697b26499a67f
5
5
  SHA512:
6
- metadata.gz: 7ae31b44d4c2e7b1007e94156ae594f723aa4b6bc7f9b9043e82b4ddb484107036f41444076bb209f0f1fdc49815c256e620ad44632f1c613e81673d178b7f0e
7
- data.tar.gz: 71e74ad76f7f3b079e5f24a472003ac0ea24f80043bd4af3bd00c324e852467766d9affe65611756f9b9db636fd1656736ab4b50902520b9fddc6950829fae2e
6
+ metadata.gz: cca48806246ba0c9f448692363aac96a26261e43031a99e98e509f0d4b6c99ecd11a2755e5e119a4c145d1cbfe10980531234eeae57f13aa427b66df7ab8cbf9
7
+ data.tar.gz: ad0f98bd509ea66418cf319cdfb278e18e94ce1df02a3117b393a4f7f4bcf5a1200bbb362854a6b7fa6c9765b05214910e46857e24e2636611d9cbdd9401dfa3
@@ -125,7 +125,6 @@ $(document).on('rails_admin.dom_ready', function() {
125
125
  properties: {}
126
126
  };
127
127
 
128
- console.log('enableGuids', enableGuids);
129
128
  if(enableGuids) {
130
129
  obj.guid = guid();
131
130
  }
@@ -135,7 +134,9 @@ $(document).on('rails_admin.dom_ready', function() {
135
134
  },
136
135
  computed: {
137
136
  result: function() {
138
- return { components: this.components };
137
+ var result = { components: this.components };
138
+ $(this.$el).trigger('json-editor:changed', result);
139
+ return result;
139
140
  }
140
141
  },
141
142
  components: components
@@ -30,9 +30,9 @@ body.rails_admin .form-horizontal.denser .json-editor {
30
30
 
31
31
  .guid {
32
32
  display: inline-block;
33
- background: #e9e9e9;
34
- padding: 0.2em 0.5em;
35
- margin-top: 5px;
36
- margin-bottom: 0;
33
+ font-size: 12px;
34
+ background: #F8F8F8;
35
+ padding: 0.1em 0.5em;
36
+ margin: 0 0 -2px 5px;
37
37
  }
38
38
  }
@@ -11,7 +11,8 @@
11
11
  <script type="text/x-template" id="template-fields-for-<%= model.name %>">
12
12
  <div class="component">
13
13
  <legend>
14
- <%= model.label %>
14
+ <span class="model-label"><%= model.label %></span>
15
+ <pre class="guid" v-text="component.guid"></pre>
15
16
 
16
17
  <div class="btn-group btn-group-sm pull-right">
17
18
  <% if field.orderable %>
@@ -37,13 +38,6 @@
37
38
  <div v-show="expanded">
38
39
  <%= content_tag :p, model.help, class: "help-block" unless model.help.nil? %>
39
40
 
40
- <div v-if="component.guid" class="control-group row">
41
- <label class="col-sm-2 control-label">Identifier</label>
42
- <div class="col-sm-10">
43
- <pre class="guid" v-text="component.model_name + ' | ' + component.guid"></pre>
44
- </div>
45
- </div>
46
-
47
41
  <% model.fields.each do |f| %>
48
42
  <div class="control-group row <%= f.css_class %>">
49
43
  <label class="col-sm-2 control-label"><%= f.label %></label>
@@ -1,3 +1,3 @@
1
1
  module RailsAdminJsonEditor
2
- VERSION = "0.0.21"
2
+ VERSION = "0.0.22"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_admin_json_editor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.21
4
+ version: 0.0.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jasper Haggenburg