hydra-editor 3.1.2 → 3.2.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4aa69941a7e31ef9744093bfd27511b7cae32770
|
4
|
+
data.tar.gz: 5ec7cc51c46426adeb05be9bee851d41f592c453
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: baba03f40ad042eb73ed87e5b8d0a2e813df19fa7737dc8821d165caf0ab44a90624c4b7155001ac04478ea6a74809aa9ef703426ffbab9f957404552cd8600a
|
7
|
+
data.tar.gz: e9c030943c4e947df8af4a9761a94958ad85caafdb3309bf76d083dcb7f05f95b337be56cdc3e2878dbb188d754045070ec8ed30f6dfcbcc898367f3190b4379
|
@@ -122,7 +122,7 @@ export class FieldManager {
|
|
122
122
|
|
123
123
|
getFieldLabel($element, options) {
|
124
124
|
var label = '';
|
125
|
-
var $label = $element.find("label");
|
125
|
+
var $label = $element.find("label").first();
|
126
126
|
|
127
127
|
if ($label.size && options.labelControls) {
|
128
128
|
var label = $label.data('label') || $.trim($label.contents().filter(function() { return this.nodeType === 3; }).text());
|
@@ -32,6 +32,13 @@ module Hydra
|
|
32
32
|
include ActiveModelPresenter
|
33
33
|
included do
|
34
34
|
class_attribute :_terms, instance_accessor: false
|
35
|
+
|
36
|
+
# You may want to set your own field_metadata_service that can
|
37
|
+
# answer the questions about a fields cardinality regardless of the
|
38
|
+
# cardinality of the model
|
39
|
+
class_attribute :field_metadata_service
|
40
|
+
# This default service just give us the cardiality defined in the model.
|
41
|
+
self.field_metadata_service = HydraEditor::FieldMetadataService
|
35
42
|
end
|
36
43
|
|
37
44
|
def terms
|
@@ -42,14 +49,14 @@ module Hydra
|
|
42
49
|
# If the field is a property, delegate to the property.
|
43
50
|
# Otherwise return false
|
44
51
|
def multiple?(field)
|
45
|
-
|
52
|
+
field_metadata_service.multiple?(model.class, field)
|
46
53
|
end
|
47
54
|
|
48
55
|
module ClassMethods
|
49
56
|
# @deprecated Because if we use an instance method, there will be no need to set self.model_class in most instances. Note, there is a class method multiple? on the form.
|
50
57
|
def multiple?(field)
|
51
58
|
Deprecation.warn(ClassMethods, 'The class method multiple? has been deprecated. Use the instance method instead. This will be removed in version 2.0')
|
52
|
-
|
59
|
+
field_metadata_service.multiple?(model_class, field)
|
53
60
|
end
|
54
61
|
|
55
62
|
def unique?(field)
|
data/lib/hydra_editor/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hydra-editor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-04-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -93,14 +93,14 @@ dependencies:
|
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.
|
96
|
+
version: '0.1'
|
97
97
|
type: :runtime
|
98
98
|
prerelease: false
|
99
99
|
version_requirements: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
103
|
+
version: '0.1'
|
104
104
|
- !ruby/object:Gem::Dependency
|
105
105
|
name: sqlite3
|
106
106
|
requirement: !ruby/object:Gem::Requirement
|
@@ -299,7 +299,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
299
299
|
version: '0'
|
300
300
|
requirements: []
|
301
301
|
rubyforge_project:
|
302
|
-
rubygems_version: 2.6.
|
302
|
+
rubygems_version: 2.6.10
|
303
303
|
signing_key:
|
304
304
|
specification_version: 4
|
305
305
|
summary: A basic metadata editor for hydra-head
|