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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 937d5d243e43f7d09a1d11db2a8fb5b7201484dc
4
- data.tar.gz: fc0ed270797f455ebaddbc14f6ea74d1d56eb43f
3
+ metadata.gz: c7ec4763f7c0ff9e5ce0744bcd8579020ed89b32
4
+ data.tar.gz: 45d4f87a91b17c299097c1f6aa5a9732507f30cc
5
5
  SHA512:
6
- metadata.gz: 77fc48be16fbba575c32f035af43aa4d0ec3e595f29b30364b62c3565dc4c600f5d809b839c62a779a5cb2cfa577f496205ebb2bb3d49bbc4ee06f4b72dd6c45
7
- data.tar.gz: f45297ba257bd057cb6ad5073998fcd58bf3f99048a364b6d78967846d03c9d04d47af85407209b3df976168c706dc20fa2b8bd8c6146e679dfaf82154a54b62
6
+ metadata.gz: a604d13c92a5a5e47ff93d7aeb3867c503c1743beb55059502cbc4fd28a2ddadac9e6cc7745e950249aace899dab2ed8e86d7ced27d5682bd2aade9f7c6e6ca3
7
+ data.tar.gz: d26992ff800bf72702248dd3d3afb416ee15a5432091ed38befa56196a436b75901fc04a328dc742450261d1e59dba55552e33c8a32e985e6834fada408c79dc
@@ -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-2018 RedmineUP
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
 
@@ -125,6 +125,7 @@ module RedmineCrm
125
125
  end
126
126
 
127
127
  def dump_to_draft
128
+ instance_values.default = nil
128
129
  Marshal.dump(instance_values)
129
130
  end
130
131
 
@@ -13,6 +13,10 @@ module RedmineCrm
13
13
  before_filter(*filters, &block)
14
14
  end
15
15
 
16
+ def after_action(*filters, &block)
17
+ after_filter(*filters, &block)
18
+ end
19
+
16
20
  def skip_before_action(*filters, &block)
17
21
  skip_before_filter(*filters, &block)
18
22
  end
@@ -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": item.is_done, "subject": item.subject}}
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?(:custom_fields)
102
- input.custom_fields[field_name]
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
 
@@ -1,3 +1,3 @@
1
1
  module RedmineCrm
2
- VERSION = '0.0.41'
2
+ VERSION = '0.0.43'
3
3
  end
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', '~> 0.4.0'
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 + '&nbsp;' + 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).select2(buildSelect2Options(options));
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).select2(buildSelect2Options(options));
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
 
@@ -355,6 +355,7 @@
355
355
  border: 0px !important;
356
356
  height: inherit !important;
357
357
  padding: 0px !important;
358
+ width: 2em !important;
358
359
  }
359
360
 
360
361
  .filter .select2-container--default .select2-selection--multiple .select2-selection__choice {
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.41
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: 2018-10-23 00:00:00.000000000 Z
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.4.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.4.0
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pg
71
71
  requirement: !ruby/object:Gem::Requirement