redmine_extensions 0.0.36 → 0.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/redmine_extensions/redmine_extensions.js +9 -6
- data/app/assets/javascripts/redmine_extensions/redmine_extensions.js.orig +31 -13
- data/app/controllers/easy_settings_controller.rb +1 -1
- data/app/helpers/redmine_extensions/application_helper.rb +2 -2
- data/app/views/easy_entity_assignments/_query_index.html.erb +1 -1
- data/app/views/easy_entity_assignments/_query_index.html.erb.orig +16 -0
- data/app/views/easy_settings/edit.html.erb +1 -1
- data/config/routes.rb +7 -3
- data/lib/redmine_extensions/engine.rb +0 -9
- data/lib/redmine_extensions/version.rb +1 -1
- data/lib/redmine_extensions/version.rb.orig +7 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b7e8987102321dff2248fd2573be28b0c578fb4
|
4
|
+
data.tar.gz: 981153016e95e14037fde84cc6e3eff0a6207e0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1806d41f9c0eeb29ea3a0fe34eb1aa50d2132b472e63f3349301fc9b9d63c66ba098fe299d9516726548468f4b335ffb9672f6dea6a74718246d71723dbfaf3
|
7
|
+
data.tar.gz: d92366f7fc7925c02ccfaf2a922a933cd1b4a8c4b512057febd4ad75e31182859dafdcd6d2c787ea3eb81e3da787659d12ffaf22967f2831cf4db3a0b4da1d14
|
@@ -389,7 +389,7 @@ window.closeFlashMessage = (function($element){
|
|
389
389
|
select.append(option);
|
390
390
|
});
|
391
391
|
$container = $elem.closest('.easy-multiselect-tag-container');
|
392
|
-
$container.
|
392
|
+
$container.find(':input').prop('disabled', true);
|
393
393
|
$container.children().hide();
|
394
394
|
$container.append(select);
|
395
395
|
that.valueElement = select;
|
@@ -554,17 +554,20 @@ window.closeFlashMessage = (function($element){
|
|
554
554
|
|
555
555
|
setValue: function(values) {
|
556
556
|
var that = this;
|
557
|
-
if( typeof values
|
557
|
+
if( typeof values === 'undefined' || !values )
|
558
558
|
return false;
|
559
559
|
|
560
|
-
if( that.options.multiple ) {
|
561
|
-
that.valueElement.entityArray('clear');
|
562
|
-
}
|
563
560
|
if( this.options.preload ) {
|
564
561
|
this.load(function(){
|
565
|
-
that.
|
562
|
+
if( that.options.multiple ) {
|
563
|
+
that.valueElement.entityArray('clear');
|
564
|
+
}
|
565
|
+
that._setValues(values);
|
566
566
|
});
|
567
567
|
} else {
|
568
|
+
if( that.options.multiple ) {
|
569
|
+
that.valueElement.entityArray('clear');
|
570
|
+
}
|
568
571
|
that._setValues(values);
|
569
572
|
}
|
570
573
|
},
|
@@ -340,6 +340,8 @@ window.closeFlashMessage = (function($element){
|
|
340
340
|
this._initData(this.options.source);
|
341
341
|
} else if ( this.options.preload && this.options.load_immediately) {
|
342
342
|
this.load();
|
343
|
+
} else if ( this.selectedValues ) {
|
344
|
+
this.setValue( this.selectedValues );
|
343
345
|
}
|
344
346
|
},
|
345
347
|
|
@@ -387,7 +389,7 @@ window.closeFlashMessage = (function($element){
|
|
387
389
|
select.append(option);
|
388
390
|
});
|
389
391
|
$container = $elem.closest('.easy-multiselect-tag-container');
|
390
|
-
$container.
|
392
|
+
$container.find(':input').prop('disabled', true);
|
391
393
|
$container.children().hide();
|
392
394
|
$container.append(select);
|
393
395
|
that.valueElement = select;
|
@@ -494,7 +496,7 @@ window.closeFlashMessage = (function($element){
|
|
494
496
|
},
|
495
497
|
|
496
498
|
_initData: function(data) {
|
497
|
-
this.possibleValues = this._formatData(data)
|
499
|
+
this.possibleValues = this._formatData(data);
|
498
500
|
this.valuesLoaded = true;
|
499
501
|
|
500
502
|
this.selectedValues = this.selectedValues ? this.selectedValues : [];
|
@@ -552,7 +554,7 @@ window.closeFlashMessage = (function($element){
|
|
552
554
|
|
553
555
|
setValue: function(values) {
|
554
556
|
var that = this;
|
555
|
-
if( typeof values
|
557
|
+
if( typeof values === 'undefined' || !values )
|
556
558
|
return false;
|
557
559
|
|
558
560
|
if( that.options.multiple ) {
|
@@ -560,9 +562,21 @@ window.closeFlashMessage = (function($element){
|
|
560
562
|
}
|
561
563
|
if( this.options.preload ) {
|
562
564
|
this.load(function(){
|
565
|
+
<<<<<<< HEAD
|
563
566
|
that._setValues(values)
|
564
567
|
});
|
565
568
|
} else {
|
569
|
+
=======
|
570
|
+
if( that.options.multiple ) {
|
571
|
+
that.valueElement.entityArray('clear');
|
572
|
+
}
|
573
|
+
that._setValues(values);
|
574
|
+
});
|
575
|
+
} else {
|
576
|
+
if( that.options.multiple ) {
|
577
|
+
that.valueElement.entityArray('clear');
|
578
|
+
}
|
579
|
+
>>>>>>> stable
|
566
580
|
that._setValues(values);
|
567
581
|
}
|
568
582
|
},
|
@@ -599,21 +613,24 @@ window.closeFlashMessage = (function($element){
|
|
599
613
|
}
|
600
614
|
},
|
601
615
|
|
616
|
+
getValue: function(with_label) {
|
617
|
+
var result;
|
618
|
+
if ( this.options.multiple && !this.expanded ) {
|
602
619
|
<<<<<<< HEAD
|
603
|
-
|
604
|
-
if( this.options.multiple && !this.expanded ) {
|
605
|
-
return this.valueElement.entityArray('getValue'); // entityArray
|
620
|
+
result = this.valueElement.entityArray('getValue'); // entityArray
|
606
621
|
} else if ( this.options.multiple ) {
|
607
|
-
|
622
|
+
result = this.valueElement.val(); // select multiple=true
|
608
623
|
} else {
|
609
|
-
|
624
|
+
result = [this.valueElement.val()]; // hidden field
|
625
|
+
}
|
626
|
+
if( with_label ) {
|
627
|
+
result = this.possibleValues.filter(function(el) {
|
628
|
+
return result.indexOf( el.id ) >= 0;
|
629
|
+
});
|
610
630
|
=======
|
611
|
-
getValue: function(with_label) {
|
612
|
-
var result;
|
613
|
-
if ( this.options.multiple && !this.expanded ) {
|
614
631
|
result = this.valueElement.entityArray('getValue'); // entityArray
|
615
632
|
} else if ( this.options.multiple ) {
|
616
|
-
|
633
|
+
result = this.valueElement.val(); // select multiple=true
|
617
634
|
} else {
|
618
635
|
result = [this.valueElement.val()]; // hidden field
|
619
636
|
}
|
@@ -621,8 +638,9 @@ window.closeFlashMessage = (function($element){
|
|
621
638
|
result = this.possibleValues.filter(function(el) {
|
622
639
|
return result.indexOf( el.id ) >= 0;
|
623
640
|
});
|
624
|
-
>>>>>>>
|
641
|
+
>>>>>>> stable
|
625
642
|
}
|
643
|
+
return result;
|
626
644
|
}
|
627
645
|
|
628
646
|
});
|
@@ -25,7 +25,7 @@ class EasySettingsController < ApplicationController
|
|
25
25
|
Setting.send "plugin_#{@plugin.id}=", params[:settings] if params[:settings]
|
26
26
|
if @easy_settings.save
|
27
27
|
flash[:notice] = l(:notice_successful_update)
|
28
|
-
redirect_back_or_default
|
28
|
+
redirect_back_or_default edit_easy_setting_path(@easy_settings)
|
29
29
|
else
|
30
30
|
render :edit
|
31
31
|
end
|
@@ -164,7 +164,7 @@ module RedmineExtensions
|
|
164
164
|
end
|
165
165
|
|
166
166
|
def autocomplete_field_tag(name, jsonpath_or_array, selected_values, options = {})
|
167
|
-
options.reverse_merge!({select_first_value: false, show_toggle_button: false, load_immediately: false, preload: true})
|
167
|
+
options.reverse_merge!({select_first_value: false, show_toggle_button: false, load_immediately: false, preload: true, multiple: true})
|
168
168
|
options[:id] ||= sanitize_to_id(name)
|
169
169
|
|
170
170
|
selected_values ||= []
|
@@ -177,7 +177,7 @@ module RedmineExtensions
|
|
177
177
|
|
178
178
|
content_tag(:span, :class => 'easy-multiselect-tag-container') do
|
179
179
|
text_field_tag('', '', (options[:html_options] || {}).merge(id: options[:id])) +
|
180
|
-
javascript_tag("$('##{options[:id]}').easymultiselect({multiple:
|
180
|
+
javascript_tag("$('##{options[:id]}').easymultiselect({multiple: #{options[:multiple]}, rootElement: #{options[:rootElement].to_json}, inputName: '#{name}', preload: #{options[:preload]}, source: #{source}, selected: #{selected_values.to_json}, show_toggle_button: #{options[:show_toggle_button]}, select_first_value: #{options[:select_first_value]}, load_immediately: #{options[:load_immediately]}, autocomplete_options: #{(options[:jquery_auto_complete_options]||{}).to_json} });")
|
181
181
|
end
|
182
182
|
end
|
183
183
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% if display_style == :list %>
|
2
|
-
<%= render :partial => 'easy_queries/easy_query_entities_list', :locals => {:query => query, :entities =>
|
2
|
+
<%= render :partial => 'easy_queries/easy_query_entities_list', :locals => {:query => query, :entities => entities, :options => {:hascontextmenu => true, :disable_sort => true} } -%>
|
3
3
|
<% elsif display_style == :tile %>
|
4
4
|
<div class="easy-entity-cards-container">
|
5
5
|
<div class="splitcontent">
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<<<<<<< HEAD
|
2
|
+
<% query_outputs(query, entities: referenced_entities, options: { hascontextmenu: true, disable_sort: true }).each do |output| %>
|
3
|
+
<%= output.render_data %>
|
4
|
+
=======
|
5
|
+
<% if display_style == :list %>
|
6
|
+
<%= render :partial => 'easy_queries/easy_query_entities_list', :locals => {:query => query, :entities => entities, :options => {:hascontextmenu => true, :disable_sort => true} } -%>
|
7
|
+
<% elsif display_style == :tile %>
|
8
|
+
<div class="easy-entity-cards-container">
|
9
|
+
<div class="splitcontent">
|
10
|
+
<% entities.each do |referenced_entity| %>
|
11
|
+
<%# render_easy_entity_card(referenced_entity, entity, options.merge(:referenced_entities => referenced_entities)) %>
|
12
|
+
<% end %>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
>>>>>>> stable
|
16
|
+
<% end %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= form_for(
|
1
|
+
<%= form_for(@easy_settings, html: { class: 'form-box easy-setting-plugin-form' }) do |f| %>
|
2
2
|
<%= hidden_field_tag :back_url, params[:back_url] %>
|
3
3
|
|
4
4
|
<%= render "easy_settings/#{@easy_settings.plugin.id}", easy_settings: @easy_settings, settings: @settings, form: f %>
|
data/config/routes.rb
CHANGED
@@ -1,7 +1,11 @@
|
|
1
|
+
# Engine routes
|
1
2
|
RedmineExtensions::Engine.routes.draw do
|
2
|
-
|
3
3
|
resources :easy_settings, except: :destroy
|
4
|
-
|
5
4
|
end
|
6
5
|
|
7
|
-
|
6
|
+
# Redmine routes
|
7
|
+
Rails.application.routes.draw do
|
8
|
+
mount RedmineExtensions::Engine => '/redmine_extensions'
|
9
|
+
|
10
|
+
resources :easy_settings, except: :destroy
|
11
|
+
end
|
@@ -4,15 +4,6 @@ require 'redmine_extensions/redmine_patches/patches'
|
|
4
4
|
module RedmineExtensions
|
5
5
|
class Engine < ::Rails::Engine
|
6
6
|
|
7
|
-
def self.automount!(path = nil)
|
8
|
-
engine = self
|
9
|
-
path ||= engine.to_s.underscore.split('/').first
|
10
|
-
Rails.application.routes.draw do
|
11
|
-
mount engine => path
|
12
|
-
resources :easy_settings, only: [:edit]
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
7
|
config.generators do |g|
|
17
8
|
g.test_framework :rspec, :fixture => false
|
18
9
|
g.fixture_replacement :factory_girl, :dir => 'spec/factories'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redmine_extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.37
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Easy Software Ltd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -119,6 +119,7 @@ files:
|
|
119
119
|
- app/presenters/redmine_extensions/easy_setting_presenter.rb
|
120
120
|
- app/views/easy_entity_assignments/_assignments_container.html.erb
|
121
121
|
- app/views/easy_entity_assignments/_query_index.html.erb
|
122
|
+
- app/views/easy_entity_assignments/_query_index.html.erb.orig
|
122
123
|
- app/views/easy_queries/_entities.html.erb
|
123
124
|
- app/views/easy_queries/_index.html.erb
|
124
125
|
- app/views/easy_queries/_settings.html.erb
|
@@ -193,6 +194,7 @@ files:
|
|
193
194
|
- lib/redmine_extensions/redmine_patches/controllers/issues_controller_patch.rb
|
194
195
|
- lib/redmine_extensions/redmine_patches/patches.rb
|
195
196
|
- lib/redmine_extensions/version.rb
|
197
|
+
- lib/redmine_extensions/version.rb.orig
|
196
198
|
- lib/tasks/redmine_extensions_tasks.rake
|
197
199
|
- spec/factories/easy_queries.rb
|
198
200
|
- spec/factories/easy_settings.rb
|