Merge branch '2.1' of git@github.com:relaxdiego/redmine_backlogs into 2.1

pull/6827/head
friflaj 15 years ago
commit f921807105
  1. 6
      app/helpers/stories_helper.rb
  2. 2
      app/views/backlogs/burndown.html.erb
  3. 2
      app/views/backlogs/index.html.erb
  4. 4
      app/views/stories/_story.html.erb
  5. 4
      assets/javascripts/backlog.js
  6. 4
      assets/javascripts/story.js
  7. 2
      assets/stylesheets/common.css
  8. 3
      assets/stylesheets/story.css

@ -14,7 +14,7 @@ module StoriesHelper
end
def mark_if_closed(story)
!story.new_record? && story.issue.status.is_closed? ? "closed" : ""
!story.new_record? && story.status.is_closed? ? "closed" : ""
end
def story_points_or_empty(story)
@ -25,6 +25,10 @@ module StoriesHelper
story.new_record? ? "" : story.id
end
def issue_link_or_empty(story)
story.new_record? ? "" : link_to(story.id, {:controller => "issues", :action => "show", :id => story}, {:target => "_blank"})
end
def status_id_or_default(story)
story.new_record? ? IssueStatus.find(:first, :order => "position ASC").id : story.status.id
end

@ -23,7 +23,7 @@
<%= series.to_s %> = [ <%= @burndown[:series][series][:series].collect {|d| "#{d}"}.join(',') %>];
<% end %>
xticks = [ <%= @burndown[:dates].each_with_index.collect {|d,i| "[#{i+1}, '#{escape_javascript(::I18n.t('date.abbr_day_names')[d.wday % 7])}']"}.join(',') %> ];
xticks = [ <%= @burndown[:dates].enum_with_index.collect {|d,i| "[#{i+1}, '#{escape_javascript(::I18n.t('date.abbr_day_names')[d.wday % 7])}']"}.join(',') %> ];
datasets = [ <%= dataseries.collect{|series| series.to_s}.join(',') %> ];
series = [
<% dataseries.each_with_index do |series, i| %>

@ -22,7 +22,7 @@
</select>
<select class="tracker_id template" id="tracker_id_options">
<%- @project.trackers.each do |tracker| %>
<%- Tracker.find_all_by_id(Setting.plugin_redmine_backlogs[:story_trackers]).each do |tracker| %>
<option value="<%= tracker.id %>"><%= tracker.name %></option>
<%- end %>
</select>

@ -1,7 +1,7 @@
<li class="story" id="<%= story_html_id_or_empty(story) %>">
<li class="story <%= mark_if_closed(story) %>" id="<%= story_html_id_or_empty(story) %>">
<input type="checkbox" class="checkbox"/>
<div class="spinner"> </div>
<div class="id"><%= record_id_or_empty(story) %></div>
<div class="id"><%= issue_link_or_empty(story) %></div>
<div class="tracker_id editable" fieldtype="select" fieldname="tracker_id">
<div class="t"><%= tracker_name_or_empty(story) %></div>
<div class="v"><%= tracker_id_or_empty(story) %></div>

@ -24,8 +24,6 @@ RB.Backlog = Object.create(RB.Model, {
update: this.dragComplete
});
list.disableSelection();
// Observe menu items
j.find('.new_story').bind('mouseup', this.handleMenuClick);
@ -182,7 +180,7 @@ RB.Backlog = Object.create(RB.Model, {
async: false,
data: "s=s", // I don't quite understand why the server balks without any data supplied
url: RB.urlFor['new_story'],
complete: function(xhr, textStatus){ $(xhr.responseText).appendTo("#content").wrap("<div id='story_template'/>") }
complete: function(xhr, textStatus){ $(xhr.responseText).removeClass("story").appendTo("#content").wrap("<div id='story_template'/>") } // removeClass() ensures that $(".story") will not include this node
});
},

@ -9,6 +9,8 @@ RB.Story = Object.create(RB.Model, {
this.$ = j = $(el);
this.el = el;
j.addClass("story"); // If node is based on #story_template, it doesn't have the story class yet
// Associate this object with the element for later retrieval
j.data('this', this);
@ -71,7 +73,7 @@ RB.Story = Object.create(RB.Model, {
},
getID: function(){
return this.$.children('.id').text();
return this.$.children('.id').children().first().text();
},
getPoints: function(){

@ -4,6 +4,7 @@ body{
background-repeat:repeat-x;
font-family:Verdana, Arial, sans-serif;
font-size:12px;
width:1120px;
}
a{
color:#CC0000;
@ -43,6 +44,7 @@ a:hover{
#content {
clear:both;
float:left;
width:1120px;
}
/* MISC */

@ -90,6 +90,9 @@
.story.subject_over_sixty div.subject{
width:333px;
}
.story .elipses{
display:none;
}
.story.subject_over_sixty .elipses{
display:block;
left:409px;

Loading…
Cancel
Save