hydra-editor 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.md +3 -0
- data/app/assets/javascripts/hydra-editor/manage_repeating_fields.js +12 -8
- data/lib/hydra_editor/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04c5fb944277294ad7c68f7c47000c80618df2e5
|
4
|
+
data.tar.gz: fdd50431f94480d6b0478bb8baf61023a7008607
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41c5f95fb5063b9a9bf5104f687e922dbecb503401446d40a828c3463edb8728d464c58066e56a8b42f4bb723c698b2718b6064d31ec79c69d26783579f3973d
|
7
|
+
data.tar.gz: 4a689b42e096053eb2a4897c0c826206b1cda8deb3c3d8b5829ce4547f6346a5d29342d9c346d29e8f08a8cc83b16ba93f40677ae53371d45d1112ec7c5a2ceb
|
data/History.md
CHANGED
@@ -40,10 +40,10 @@ var HydraEditor = (function($) {
|
|
40
40
|
_attachEvents: function() {
|
41
41
|
var _this = this;
|
42
42
|
this.element.on('click', '.remove', function (e) {
|
43
|
-
_this.
|
43
|
+
_this.removeFromList(e);
|
44
44
|
});
|
45
45
|
this.element.on('click', '.add', function (e) {
|
46
|
-
_this.
|
46
|
+
_this.addToList(e);
|
47
47
|
});
|
48
48
|
},
|
49
49
|
|
@@ -52,19 +52,23 @@ var HydraEditor = (function($) {
|
|
52
52
|
this.element.bind('managed_field:remove', this.options.remove);
|
53
53
|
},
|
54
54
|
|
55
|
-
|
55
|
+
addToList: function( event ) {
|
56
56
|
event.preventDefault();
|
57
57
|
var $activeField = $(event.target).parents(this.fieldWrapperClass)
|
58
58
|
|
59
|
-
if ($activeField
|
59
|
+
if (this.inputIsEmpty($activeField)) {
|
60
60
|
this.displayEmptyWarning();
|
61
61
|
} else {
|
62
|
-
|
63
|
-
|
64
|
-
|
62
|
+
var $listing = $(this.listClass, this.element);
|
63
|
+
this.clearEmptyWarning();
|
64
|
+
$listing.append(this._newField($activeField));
|
65
65
|
}
|
66
66
|
},
|
67
67
|
|
68
|
+
inputIsEmpty: function($activeField) {
|
69
|
+
return $activeField.children('input.multi-text-field').val() === '';
|
70
|
+
},
|
71
|
+
|
68
72
|
_newField: function ($activeField) {
|
69
73
|
var $newField = this.createNewField($activeField);
|
70
74
|
// _changeControlsToRemove must come after createNewField
|
@@ -101,7 +105,7 @@ var HydraEditor = (function($) {
|
|
101
105
|
$listing.append($warningMessage);
|
102
106
|
},
|
103
107
|
|
104
|
-
|
108
|
+
removeFromList: function( event ) {
|
105
109
|
event.preventDefault();
|
106
110
|
|
107
111
|
var field = $(event.target).parents(this.fieldWrapperClass)
|
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: 1.0.
|
4
|
+
version: 1.0.2
|
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: 2015-
|
12
|
+
date: 2015-03-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -237,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
237
237
|
version: '0'
|
238
238
|
requirements: []
|
239
239
|
rubyforge_project:
|
240
|
-
rubygems_version: 2.
|
240
|
+
rubygems_version: 2.4.5
|
241
241
|
signing_key:
|
242
242
|
specification_version: 4
|
243
243
|
summary: A basic metadata editor for hydra-head
|