redmine_crm 0.0.41 → 0.0.43
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bitbucket-pipelines.yml +12 -1
- data/doc/CHANGELOG +19 -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/drops/issues_drop.rb +1 -1
- 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/test/test_helper.rb +1 -1
- data/vendor/assets/javascripts/select2_helpers.js +20 -2
- data/vendor/assets/stylesheets/select2.css +1 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7ec4763f7c0ff9e5ce0744bcd8579020ed89b32
|
4
|
+
data.tar.gz: 45d4f87a91b17c299097c1f6aa5a9732507f30cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a604d13c92a5a5e47ff93d7aeb3867c503c1743beb55059502cbc4fd28a2ddadac9e6cc7745e950249aace899dab2ed8e86d7ced27d5682bd2aade9f7c6e6ca3
|
7
|
+
data.tar.gz: d26992ff800bf72702248dd3d3afb416ee15a5432091ed38befa56196a436b75901fc04a328dc742450261d1e59dba55552e33c8a32e985e6834fada408c79dc
|
data/bitbucket-pipelines.yml
CHANGED
@@ -3,12 +3,15 @@
|
|
3
3
|
# Only use spaces to indent your .yml configuration.
|
4
4
|
# -----
|
5
5
|
# You can specify a custom docker image from Docker Hub as your build environment.
|
6
|
-
image: ruby:2.3.0
|
7
6
|
|
8
7
|
pipelines:
|
9
8
|
default:
|
10
9
|
- step:
|
10
|
+
name: New ruby
|
11
|
+
image: ruby:2.4.1
|
11
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
|
12
15
|
- bundle install
|
13
16
|
- bundle exec rake test DB=sqlite
|
14
17
|
- bundle exec rake test DB=postgresql
|
@@ -16,6 +19,14 @@ pipelines:
|
|
16
19
|
services:
|
17
20
|
- mysql
|
18
21
|
- postgres
|
22
|
+
- step:
|
23
|
+
name: Old ruby
|
24
|
+
image: ruby:1.9.3
|
25
|
+
script:
|
26
|
+
- bundle install
|
27
|
+
- bundle exec rake test DB=mysql
|
28
|
+
services:
|
29
|
+
- mysql
|
19
30
|
|
20
31
|
definitions:
|
21
32
|
services:
|
data/doc/CHANGELOG
CHANGED
@@ -1,8 +1,26 @@
|
|
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
|
13
|
+
|
14
|
+
== 2018-10-24 v0.0.42
|
15
|
+
|
16
|
+
* Hotfix for ruby 1.9.3 hashes support
|
17
|
+
* Added ci image for ruby 1.9.3
|
18
|
+
|
19
|
+
== 2018-10-23 v0.0.41
|
20
|
+
|
21
|
+
* New fields for IssueDrop: tags, checklists, story_points, color, day_in_state
|
22
|
+
* New Liquid filters for managing colors: darken_color, lighten_color, contrasting_text_color, hex_color, convert_to_brightness_value
|
23
|
+
* Fixes for Drops to use nil delegates
|
6
24
|
|
7
25
|
== 2018-09-28 v0.0.40
|
8
26
|
|
@@ -132,7 +132,7 @@ module RedmineCrm
|
|
132
132
|
end
|
133
133
|
|
134
134
|
def checklists
|
135
|
-
@issue.respond_to?(:checklists) && @issue.checklists.map{|item| {"id_done"
|
135
|
+
@issue.respond_to?(:checklists) && @issue.checklists.map{|item| {"id_done" => item.is_done, "subject" => item.subject}}
|
136
136
|
end
|
137
137
|
|
138
138
|
def custom_field_values
|
@@ -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
|
data/test/test_helper.rb
CHANGED
@@ -14,7 +14,7 @@ class ActiveSupport::TestCase #:nodoc:
|
|
14
14
|
|
15
15
|
self.fixture_path = File.dirname(__FILE__) + '/fixtures/'
|
16
16
|
|
17
|
-
self.use_transactional_tests = true
|
17
|
+
self.use_transactional_tests = true if RUBY_VERSION > '1.9.3'
|
18
18
|
self.use_instantiated_fixtures = false
|
19
19
|
set_fixture_class :tags => RedmineCrm::ActsAsTaggable::Tag
|
20
20
|
set_fixture_class :taggings => RedmineCrm::ActsAsTaggable::Tagging
|
@@ -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,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redmine_crm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.43
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RedmineUP
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -56,16 +56,16 @@ dependencies:
|
|
56
56
|
name: mysql2
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0
|
61
|
+
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: pg
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|