iqvoc_compound_forms 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -2,21 +2,21 @@
|
|
2
2
|
/*global jQuery, IQVOC */
|
3
3
|
|
4
4
|
jQuery(document).ready(function($) {
|
5
|
-
|
5
|
+
"use strict";
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
7
|
+
$("input[type=button].add-compound-form").live("click", function(ev) {
|
8
|
+
var original = $(this).closest(".compound-form");
|
9
|
+
var clone = original.clone();
|
10
|
+
var container = $("div.entity_select", clone);
|
11
|
+
var el = $("input.entity_select", clone).
|
12
|
+
attr("data-entities", "").val("").insertBefore(container);
|
13
|
+
container.remove();
|
14
|
+
clone.insertAfter(original);
|
15
|
+
new IQVOC.EntitySelector(el[0]);
|
16
|
+
});
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
$("input[type=button].rm-compound-form").click(function(ev) {
|
19
|
+
// Remove the <li> that contains the widget
|
20
|
+
$(this).parent().remove();
|
21
|
+
});
|
22
22
|
});
|
@@ -1,17 +1,17 @@
|
|
1
|
-
<
|
1
|
+
<div class="compound-form">
|
2
2
|
<% items = Iqvoc::XLLabel.base_class.editor_selectable.
|
3
3
|
by_origin(compound_form.compound_form_contents.
|
4
4
|
map { |cfc| cfc.label.origin }) %>
|
5
5
|
<% fieldname = "label[inline_compound_form_origins][]" %>
|
6
6
|
<%= f.input fieldname, :label => t('txt.common.type_to_search') do %>
|
7
|
-
<%=
|
7
|
+
<%= text_field_tag fieldname, items.join(Iqvoc::InlineDataHelper::Joiner),
|
8
8
|
:class => "entity_select",
|
9
9
|
:"data-query-url" => labels_path(:format => :json),
|
10
10
|
:"data-entity-uri" => label_path("{id}"),
|
11
11
|
:"data-entities" => (not compound_form) ? nil : items.
|
12
12
|
map { |l| label_widget_data(l) }.to_json %>
|
13
|
-
<% end %>
|
14
13
|
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
<input type="button" class="btn add-compound-form" value="<%= t("txt.common.add_note") %>">
|
15
|
+
<input type="button" class="btn rm-compound-form" value="<%= t("txt.common.delete") %>">
|
16
|
+
<% end %>
|
17
|
+
</div>
|
@@ -1,4 +1,4 @@
|
|
1
1
|
<% label.compound_forms.build if label.compound_forms.empty? %>
|
2
2
|
<% label.compound_forms.each do |compound_form| %>
|
3
|
-
<%= render 'partials/compound_form/compound_form', :label => label, :compound_form => compound_form, :klass => klass %>
|
3
|
+
<%= render 'partials/compound_form/compound_form', :label => label, :compound_form => compound_form, :klass => klass, :f => f %>
|
4
4
|
<% end %>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iqvoc_compound_forms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,11 +11,11 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-
|
14
|
+
date: 2012-06-26 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
18
|
-
requirement: &
|
18
|
+
requirement: &70255045901600 !ruby/object:Gem::Requirement
|
19
19
|
none: false
|
20
20
|
requirements:
|
21
21
|
- - ~>
|
@@ -23,10 +23,10 @@ dependencies:
|
|
23
23
|
version: 3.2.1
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
|
-
version_requirements: *
|
26
|
+
version_requirements: *70255045901600
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: iqvoc
|
29
|
-
requirement: &
|
29
|
+
requirement: &70255045900000 !ruby/object:Gem::Requirement
|
30
30
|
none: false
|
31
31
|
requirements:
|
32
32
|
- - ~>
|
@@ -34,10 +34,10 @@ dependencies:
|
|
34
34
|
version: 4.0.0
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
|
-
version_requirements: *
|
37
|
+
version_requirements: *70255045900000
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: iqvoc_skosxl
|
40
|
-
requirement: &
|
40
|
+
requirement: &70255045892560 !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
43
|
- - ~>
|
@@ -45,7 +45,7 @@ dependencies:
|
|
45
45
|
version: 2.0.0
|
46
46
|
type: :runtime
|
47
47
|
prerelease: false
|
48
|
-
version_requirements: *
|
48
|
+
version_requirements: *70255045892560
|
49
49
|
description: ''
|
50
50
|
email:
|
51
51
|
- robert.glaser@innoq.com
|