From 1f78b40b55d9370e795ef3a04345e3db9ea6dcc2 Mon Sep 17 00:00:00 2001 From: codingjoe Date: Tue, 18 Sep 2012 12:58:40 +0300 Subject: [PATCH 1/7] Fixes a null pointer issue. The input never got created, therefor you'd get a null pointer exception in line 5 which is now line 6. $('') is not just slower but doesn't allow any attributes. This should be faster and work just fine in any browser. --- assets/javascripts/libs/jquery.jeditable.ptext.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/javascripts/libs/jquery.jeditable.ptext.js b/assets/javascripts/libs/jquery.jeditable.ptext.js index 2715e77..31beb42 100644 --- a/assets/javascripts/libs/jquery.jeditable.ptext.js +++ b/assets/javascripts/libs/jquery.jeditable.ptext.js @@ -1,7 +1,8 @@ $.editable.addInputType('ptext', { element : function(settings, original) { - var input = $(''); + var input = $(document.createElement('input')); + input.attr('type','text'); if (settings.width != 'none') { input.attr('width', settings.width); } if (settings.height != 'none') { input.attr('height', settings.height); } input.attr('autocomplete','off'); From d0ac4c7ec4d0dc48a26b2baf0257c99a90daf26b Mon Sep 17 00:00:00 2001 From: Johannes Hoppe Date: Wed, 19 Sep 2012 13:50:17 +0300 Subject: [PATCH 2/7] Deletes call to a not existing method of input. It deletes the textPlaceholder() call. Input (jQuery Object) does not have this method. Besides that there is no reference on what this method does anyways. This should work just fine. --- assets/javascripts/libs/jquery.jeditable.ptext.js | 1 - 1 file changed, 1 deletion(-) diff --git a/assets/javascripts/libs/jquery.jeditable.ptext.js b/assets/javascripts/libs/jquery.jeditable.ptext.js index 2715e77..404476e 100644 --- a/assets/javascripts/libs/jquery.jeditable.ptext.js +++ b/assets/javascripts/libs/jquery.jeditable.ptext.js @@ -7,7 +7,6 @@ $.editable.addInputType('ptext', { input.attr('autocomplete','off'); input.attr('placeholder', settings.placeholder); $(this).append(input); - input.textPlaceholder(); return input; } }); From e77fd061dcc74c1430460cfaa9c1b4c9d15b57e8 Mon Sep 17 00:00:00 2001 From: Johannes Hoppe Date: Wed, 19 Sep 2012 13:56:27 +0300 Subject: [PATCH 3/7] Removes call to not existing method of input. This removes the call to textPlaceholer() on input (jQuery Document). There is no method textPlaceholder() and I can't find any reference for it. It seems to have no function but ends up to generate an exception. --- assets/javascripts/libs/jquery.jeditable.ptext.js | 1 - 1 file changed, 1 deletion(-) diff --git a/assets/javascripts/libs/jquery.jeditable.ptext.js b/assets/javascripts/libs/jquery.jeditable.ptext.js index 31beb42..5e262fc 100644 --- a/assets/javascripts/libs/jquery.jeditable.ptext.js +++ b/assets/javascripts/libs/jquery.jeditable.ptext.js @@ -8,7 +8,6 @@ $.editable.addInputType('ptext', { input.attr('autocomplete','off'); input.attr('placeholder', settings.placeholder); $(this).append(input); - input.textPlaceholder(); return input; } }); From 66f88bc7305e997e2c73065922044265920780e3 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 25 Sep 2012 23:49:20 +0200 Subject: [PATCH 4/7] Add CSS to hide and change color for specific tracker --- app/views/adsprints/_task.html.erb | 4 ++-- app/views/adtasks/_task.html.erb | 4 ++-- assets/stylesheets/sprints.css | 18 +++++++++++++++++- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/app/views/adsprints/_task.html.erb b/app/views/adsprints/_task.html.erb index 955101b..5840346 100644 --- a/app/views/adsprints/_task.html.erb +++ b/app/views/adsprints/_task.html.erb @@ -1,7 +1,7 @@ -
+
#<%= link_to task.id, :controller => 'issues', :action => 'show', :id => task %>
<%=h task.subject %>
<%=h task.estimated_hours || l(:label_sprints_placeholder_estimated) %>
<%=h task.assigned_to %>
-
\ No newline at end of file +
diff --git a/app/views/adtasks/_task.html.erb b/app/views/adtasks/_task.html.erb index 04bb66e..a25639b 100644 --- a/app/views/adtasks/_task.html.erb +++ b/app/views/adtasks/_task.html.erb @@ -1,4 +1,4 @@ -
+
#<%= link_to task.id, :controller => 'issues', :action => 'show', :id => task %>
<%=h task.subject %>
@@ -21,4 +21,4 @@
h
<%=h task.spent || '0' %>
-
\ No newline at end of file + diff --git a/assets/stylesheets/sprints.css b/assets/stylesheets/sprints.css index e4cb91d..f47a142 100644 --- a/assets/stylesheets/sprints.css +++ b/assets/stylesheets/sprints.css @@ -80,6 +80,22 @@ -webkit-box-shadow: 0 0 4px #1f6993; } + +.task_list .sc_task_hide +{ + display:None; +} + +.task_list .sc_task.sc_task_tracker_UserStorie +{ + border-color: #276DFA; + box-shadow: 0 0 4px #276DFA; + -moz-box-shadow: 0 0 4px #276DFA; + -ms-box-shadow: 0 0 4px #276DFA; + -o-box-shadow: 0 0 4px #276DFA; + -webkit-box-shadow: 0 0 4px #276DFA; +} + .task_list { margin: 0; @@ -210,4 +226,4 @@ .time_list { margin-right: 5px; -} \ No newline at end of file +} From 9c047c5089e6130398677b634debb41db715e2b2 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 26 Sep 2012 20:11:57 +0200 Subject: [PATCH 5/7] Fix bug on UserStorie --- app/views/adsprints/_task.html.erb | 2 +- app/views/adtasks/_task.html.erb | 2 +- assets/stylesheets/sprints.css | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/adsprints/_task.html.erb b/app/views/adsprints/_task.html.erb index 5840346..c33662d 100644 --- a/app/views/adsprints/_task.html.erb +++ b/app/views/adsprints/_task.html.erb @@ -1,4 +1,4 @@ -
+
#<%= link_to task.id, :controller => 'issues', :action => 'show', :id => task %>
<%=h task.subject %>
diff --git a/app/views/adtasks/_task.html.erb b/app/views/adtasks/_task.html.erb index a25639b..c35f614 100644 --- a/app/views/adtasks/_task.html.erb +++ b/app/views/adtasks/_task.html.erb @@ -1,4 +1,4 @@ -
+
#<%= link_to task.id, :controller => 'issues', :action => 'show', :id => task %>
<%=h task.subject %>
diff --git a/assets/stylesheets/sprints.css b/assets/stylesheets/sprints.css index f47a142..ff5287f 100644 --- a/assets/stylesheets/sprints.css +++ b/assets/stylesheets/sprints.css @@ -89,6 +89,7 @@ .task_list .sc_task.sc_task_tracker_UserStorie { border-color: #276DFA; + background: rgba(39, 109, 250, 0.3); box-shadow: 0 0 4px #276DFA; -moz-box-shadow: 0 0 4px #276DFA; -ms-box-shadow: 0 0 4px #276DFA; From c67f43e51141e2944e5495d27b6911433e47c32b Mon Sep 17 00:00:00 2001 From: Christian Werner Date: Mon, 8 Oct 2012 14:52:00 +0200 Subject: [PATCH 6/7] update Burndown --- assets/javascripts/burndown.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/burndown.js b/assets/javascripts/burndown.js index 9d03f1f..c451987 100644 --- a/assets/javascripts/burndown.js +++ b/assets/javascripts/burndown.js @@ -66,7 +66,8 @@ var Burndown = function ($) else { // rest of work = ((100 - done_ratio) * estimate) / 100 - sum += ((100 - task.done_ratio) * (task.estimated_hours || 0)) / 100; + console.log(task.sprints_tasks.done_ratio); + sum += ((100 - task.sprints_tasks.done_ratio) * (task.sprints_tasks.estimated_hours || 0)) / 100; } } // add new point to series @@ -209,4 +210,4 @@ var Burndown = function ($) }); return obj; -}(jQuery); \ No newline at end of file +}(jQuery); From 2ef86aedfa5ed4cb9318c51054eb88673ab3e794 Mon Sep 17 00:00:00 2001 From: Joe Korzeniewski Date: Fri, 15 Feb 2013 19:12:36 -0500 Subject: [PATCH 7/7] Changed symbols in Setting.plugin_AgileDwarf hash selectors to strings --- app/controllers/adsprints_controller.rb | 4 ++-- app/controllers/adtaskinl_controller.rb | 6 +++--- app/controllers/adtasks_controller.rb | 7 +++---- app/views/shared/_settings.html.erb | 20 ++++++++++---------- 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/app/controllers/adsprints_controller.rb b/app/controllers/adsprints_controller.rb index 20a0dec..073edad 100644 --- a/app/controllers/adsprints_controller.rb +++ b/app/controllers/adsprints_controller.rb @@ -11,7 +11,7 @@ def list @project.assignable_users.each{|u| @assignables[u.id] = u.firstname + ' ' + u.lastname} @project_id = @project.id @plugin_path = File.join(Redmine::Utils.relative_url_root, 'plugin_assets', 'AgileDwarf') - @closed_status = Setting.plugin_AgileDwarf[:stclosed].to_i + @closed_status = Setting.plugin_AgileDwarf["stclosed"].to_i end private @@ -20,4 +20,4 @@ def find_project # @project variable must be set before calling the authorize filter @project = Project.find(params[:project_id]) end -end \ No newline at end of file +end diff --git a/app/controllers/adtaskinl_controller.rb b/app/controllers/adtaskinl_controller.rb index bd1dc8a..71b7bfa 100644 --- a/app/controllers/adtaskinl_controller.rb +++ b/app/controllers/adtaskinl_controller.rb @@ -23,7 +23,7 @@ def update def create attribs = params.select{|k,v| k != 'id' and SprintsTasks.column_names.include? k } attribs = Hash[*attribs.flatten] - attribs['tracker_id'] = attribs['tracker_id'] || Setting.plugin_AgileDwarf[:tracker] + attribs['tracker_id'] = attribs['tracker_id'] || Setting.plugin_AgileDwarf['tracker'] attribs['author_id'] = User.current.id task = SprintsTasks.new(attribs) begin @@ -50,7 +50,7 @@ def tooltip end def spent - spenttime = TimeEntry.new({:hours => params[:hours], :activity_id => Setting.plugin_AgileDwarf[:activity], :user => User.current, :project => @project, :spent_on => Date.today, + spenttime = TimeEntry.new({:hours => params[:hours], :activity_id => Setting.plugin_AgileDwarf["activity"], :user => User.current, :project => @project, :spent_on => Date.today, :issue_id => params[:id]}) begin spenttime.save! @@ -97,4 +97,4 @@ def find_project # @project variable must be set before calling the authorize filter @project = Project.find(params[:project_id]) end -end \ No newline at end of file +end diff --git a/app/controllers/adtasks_controller.rb b/app/controllers/adtasks_controller.rb index 3293b11..f95811c 100644 --- a/app/controllers/adtasks_controller.rb +++ b/app/controllers/adtasks_controller.rb @@ -25,11 +25,10 @@ def list user = nil if @user == 'all' @plugin_path = File.join(Redmine::Utils.relative_url_root, 'plugin_assets', 'AgileDwarf') - status_ids = [] - colcount = Setting.plugin_AgileDwarf[:stcolumncount].to_i + colcount = Setting.plugin_AgileDwarf['stcolumncount'].to_i for i in 1 .. colcount - status_ids << Setting.plugin_AgileDwarf[('stcolumn' + i.to_s).to_sym].to_i + status_ids << Setting.plugin_AgileDwarf[('stcolumn' + i.to_s)].to_i end @statuses = {} IssueStatus.find_all_by_id(status_ids).each {|x| @statuses[x.id] = x.name} @@ -45,4 +44,4 @@ def find_project # @project variable must be set before calling the authorize filter @project = Project.find(params[:project_id]) end -end \ No newline at end of file +end diff --git a/app/views/shared/_settings.html.erb b/app/views/shared/_settings.html.erb index c441f10..554e876 100644 --- a/app/views/shared/_settings.html.erb +++ b/app/views/shared/_settings.html.erb @@ -3,47 +3,47 @@

<%= content_tag(:label, l(:label_settings_tracker)) %> - <%= select_tag("settings[tracker]", options_from_collection_for_select(Tracker.all, :id, :name, Setting.plugin_AgileDwarf[:tracker].to_i)) %> + <%= select_tag("settings[tracker]", options_from_collection_for_select(Tracker.all, :id, :name, Setting.plugin_AgileDwarf['tracker'].to_i)) %>

<%= content_tag(:label, l(:label_settings_activity)) %> - <%= select_tag("settings[activity]", options_from_collection_for_select(TimeEntryActivity.all, :id, :name, Setting.plugin_AgileDwarf[:activity].to_i)) %> + <%= select_tag("settings[activity]", options_from_collection_for_select(TimeEntryActivity.all, :id, :name, Setting.plugin_AgileDwarf['activity'].to_i)) %>

<%= content_tag(:label, l(:label_settings_closedstatus)) %> - <%= select_tag("settings[stclosed]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf[:stclosed].to_i)) %> + <%= select_tag("settings[stclosed]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf['stclosed'].to_i)) %>

<%= content_tag(:label, l(:label_settings_columncount)) %> - <%= select_tag("settings[stcolumncount]", options_for_select([2, 3, 4, 5], Setting.plugin_AgileDwarf[:stcolumncount].to_i)) %> + <%= select_tag("settings[stcolumncount]", options_for_select([2, 3, 4, 5], Setting.plugin_AgileDwarf['stcolumncount'].to_i)) %>

<%= content_tag(:label, l(:label_settings_column1status)) %> - <%= select_tag("settings[stcolumn1]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf[:stcolumn1].to_i)) %> + <%= select_tag("settings[stcolumn1]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf['stcolumn1'].to_i)) %>

<%= content_tag(:label, l(:label_settings_column2status)) %> - <%= select_tag("settings[stcolumn2]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf[:stcolumn2].to_i)) %> + <%= select_tag("settings[stcolumn2]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf['stcolumn2'].to_i)) %>

<%= content_tag(:label, l(:label_settings_column3status)) %> - <%= select_tag("settings[stcolumn3]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf[:stcolumn3].to_i)) %> + <%= select_tag("settings[stcolumn3]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf['stcolumn3'].to_i)) %>

<%= content_tag(:label, l(:label_settings_column4status)) %> - <%= select_tag("settings[stcolumn4]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf[:stcolumn4].to_i)) %> + <%= select_tag("settings[stcolumn4]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf['stcolumn4'].to_i)) %>

<%= content_tag(:label, l(:label_settings_column5status)) %> - <%= select_tag("settings[stcolumn5]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf[:stcolumn5].to_i)) %> + <%= select_tag("settings[stcolumn5]", options_from_collection_for_select(IssueStatus.all, :id, :name, Setting.plugin_AgileDwarf['stcolumn5'].to_i)) %>

-
\ No newline at end of file +