redmine_crm 0.0.42 → 0.0.43
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bitbucket-pipelines.yml +2 -0
- data/doc/CHANGELOG +8 -1
- data/lib/redmine_crm/acts_as_draftable/rcrm_acts_as_draftable.rb +1 -0
- data/lib/redmine_crm/compatibility/application_controller_patch.rb +4 -0
- data/lib/redmine_crm/liquid/filters/base.rb +9 -2
- data/lib/redmine_crm/version.rb +1 -1
- data/redmine_crm.gemspec +1 -1
- data/vendor/assets/javascripts/select2_helpers.js +20 -2
- data/vendor/assets/stylesheets/select2.css +1 -0
- metadata +20 -32
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c7ec4763f7c0ff9e5ce0744bcd8579020ed89b32
|
4
|
+
data.tar.gz: 45d4f87a91b17c299097c1f6aa5a9732507f30cc
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a604d13c92a5a5e47ff93d7aeb3867c503c1743beb55059502cbc4fd28a2ddadac9e6cc7745e950249aace899dab2ed8e86d7ced27d5682bd2aade9f7c6e6ca3
|
7
|
+
data.tar.gz: d26992ff800bf72702248dd3d3afb416ee15a5432091ed38befa56196a436b75901fc04a328dc742450261d1e59dba55552e33c8a32e985e6834fada408c79dc
|
data/bitbucket-pipelines.yml
CHANGED
@@ -10,6 +10,8 @@ pipelines:
|
|
10
10
|
name: New ruby
|
11
11
|
image: ruby:2.4.1
|
12
12
|
script:
|
13
|
+
- sed -i "s/'sqlite3'/'sqlite3', '~> 1.3.6'/g" redmine_crm.gemspec
|
14
|
+
- sed -i "s/'mysql2'/'mysql2', '~> 0.4.0'/g" redmine_crm.gemspec
|
13
15
|
- bundle install
|
14
16
|
- bundle exec rake test DB=sqlite
|
15
17
|
- bundle exec rake test DB=postgresql
|
data/doc/CHANGELOG
CHANGED
@@ -1,8 +1,15 @@
|
|
1
1
|
== Redmine CRM gem changelog
|
2
2
|
|
3
3
|
Redmine crm gem - general functions for plugins (tags, vote, viewing, currency)
|
4
|
-
Copyright (C) 2011-
|
4
|
+
Copyright (C) 2011-2019 RedmineUP
|
5
5
|
https://www.redmineup.com/
|
6
|
+
|
7
|
+
== 2019-05-07 v0.0.43
|
8
|
+
|
9
|
+
* custom_field and custom_fields methods added from Reporter plugin
|
10
|
+
* Added support for multi email contacts select
|
11
|
+
* Fixed Safari select2 bug with moving screen
|
12
|
+
* Fixed after_action method compatibility
|
6
13
|
|
7
14
|
== 2018-10-24 v0.0.42
|
8
15
|
|
@@ -98,8 +98,15 @@ module RedmineCrm
|
|
98
98
|
end
|
99
99
|
|
100
100
|
def custom_field(input, field_name)
|
101
|
-
if input.respond_to?(:
|
102
|
-
input.
|
101
|
+
if input.respond_to?(:custom_field_values)
|
102
|
+
custom_value = input.custom_field_values.detect { |cfv| cfv.custom_field.name == field_name }
|
103
|
+
custom_value.custom_field.format.formatted_custom_value(nil, custom_value)
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
def custom_fields(input)
|
108
|
+
if input.respond_to?(:custom_field_values)
|
109
|
+
input.custom_field_values.map { |cfv| cfv.custom_field.name }
|
103
110
|
end
|
104
111
|
end
|
105
112
|
|
data/lib/redmine_crm/version.rb
CHANGED
data/redmine_crm.gemspec
CHANGED
@@ -22,6 +22,6 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_runtime_dependency 'liquid', '< 2.6.4'
|
23
23
|
|
24
24
|
spec.add_development_dependency 'sqlite3'
|
25
|
-
spec.add_development_dependency 'mysql2'
|
25
|
+
spec.add_development_dependency 'mysql2'
|
26
26
|
spec.add_development_dependency 'pg'
|
27
27
|
end
|
@@ -95,18 +95,36 @@ function formatStateWithAvatar(opt) {
|
|
95
95
|
return $('<span>' + opt.avatar + ' ' + opt.text + '</span>');
|
96
96
|
};
|
97
97
|
|
98
|
+
function formatStateWithMultiaddress(opt) {
|
99
|
+
return $('<span class="select2-contact">' + opt.avatar + '<p class="select2-contact__name">' + opt.text + '</p><p class="select2-contact__email">' + opt.email + '</p></span>');
|
100
|
+
}
|
101
|
+
|
98
102
|
|
99
103
|
function transformToSelect2(field, options) {
|
100
104
|
if (rowHasSelect2(field)) { return }
|
101
105
|
|
102
106
|
findInRowBy(field, '.toggle-multiselect').hide();
|
103
|
-
findSelectTagInRowBy(field)
|
107
|
+
var selectField = findSelectTagInRowBy(field);
|
108
|
+
selectField.select2(buildSelect2Options(options));
|
109
|
+
|
110
|
+
var select2Instance = selectField.data('select2');
|
111
|
+
select2Instance.on('results:message', function(params){
|
112
|
+
this.dropdown._resizeDropdown();
|
113
|
+
this.dropdown._positionDropdown();
|
114
|
+
});
|
104
115
|
};
|
105
116
|
|
106
117
|
|
107
118
|
function select2Tag(id, options) {
|
108
119
|
$(function () {
|
109
|
-
$('select#' + id)
|
120
|
+
var selectField = $('select#' + id);
|
121
|
+
selectField.select2(buildSelect2Options(options));
|
122
|
+
|
123
|
+
var select2Instance = selectField.data('select2');
|
124
|
+
select2Instance.on('results:message', function(params){
|
125
|
+
this.dropdown._resizeDropdown();
|
126
|
+
this.dropdown._positionDropdown();
|
127
|
+
});
|
110
128
|
});
|
111
129
|
};
|
112
130
|
|
metadata
CHANGED
@@ -1,94 +1,83 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redmine_crm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.43
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- RedmineUP
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2019-05-07 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rails
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: liquid
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- - <
|
31
|
+
- - "<"
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: 2.6.4
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- - <
|
38
|
+
- - "<"
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: 2.6.4
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: sqlite3
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - ">="
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - ">="
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: mysql2
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - ">="
|
68
60
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0
|
61
|
+
version: '0'
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - ">="
|
76
67
|
- !ruby/object:Gem::Version
|
77
|
-
version: 0
|
68
|
+
version: '0'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: pg
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - ">="
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: '0'
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - ">="
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: '0'
|
94
83
|
description: Common libraries for RedmineUP plugins (www.redmineup.com) for Redmine.
|
@@ -99,7 +88,7 @@ executables: []
|
|
99
88
|
extensions: []
|
100
89
|
extra_rdoc_files: []
|
101
90
|
files:
|
102
|
-
- .gitignore
|
91
|
+
- ".gitignore"
|
103
92
|
- Gemfile
|
104
93
|
- README.md
|
105
94
|
- Rakefile
|
@@ -191,27 +180,26 @@ files:
|
|
191
180
|
homepage: ''
|
192
181
|
licenses:
|
193
182
|
- GPL2
|
183
|
+
metadata: {}
|
194
184
|
post_install_message:
|
195
185
|
rdoc_options: []
|
196
186
|
require_paths:
|
197
187
|
- lib
|
198
188
|
required_ruby_version: !ruby/object:Gem::Requirement
|
199
|
-
none: false
|
200
189
|
requirements:
|
201
|
-
- -
|
190
|
+
- - ">="
|
202
191
|
- !ruby/object:Gem::Version
|
203
192
|
version: '0'
|
204
193
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
205
|
-
none: false
|
206
194
|
requirements:
|
207
|
-
- -
|
195
|
+
- - ">="
|
208
196
|
- !ruby/object:Gem::Version
|
209
197
|
version: '0'
|
210
198
|
requirements: []
|
211
199
|
rubyforge_project:
|
212
|
-
rubygems_version:
|
200
|
+
rubygems_version: 2.4.5.2
|
213
201
|
signing_key:
|
214
|
-
specification_version:
|
202
|
+
specification_version: 4
|
215
203
|
summary: Common libraries for RedmineUP plugins for Redmine
|
216
204
|
test_files:
|
217
205
|
- test/acts_as_draftable/draft_test.rb
|