explicitly handling empty remaining hours since IE does not support :empty pseudo class

pull/6827/head
Gregor Schmidt 14 years ago
parent afb24da649
commit 15051714cf
  1. 4
      app/views/rb_tasks/_task.html.erb
  2. 6
      assets/javascripts/app/task.js
  3. 2
      assets/stylesheets/taskboard.css

@ -8,12 +8,12 @@
<div class="t"><%= assignee_name_or_empty(task) %></div>
<div class="v"><%= assignee_id_or_empty(task) %></div>
</div>
<div class="remaining_hours editable" fieldname="remaining_hours"><%= remaining_hours(task) %></div>
<div class="remaining_hours editable<%= ' empty' if remaining_hours(task).blank? %>" fieldname="remaining_hours"><%= remaining_hours(task) %></div>
<div class="indicator"> </div>
<div class="meta">
<div class="story_id"><%= task.parent_id %></div>
<div class="status_id"><%= task.status_id %></div>
<div class="previous"><%= task.right_sibling.blank? ? '' : task.right_sibling.id %></div>
<%= render :partial => "shared/model_errors", :object => task.errors %>
<%= render :partial => "shared/model_errors", :object => task.errors %>
</div>
</div>

@ -75,6 +75,12 @@ RB.Task = (function ($) {
this.$.children('.remaining_hours.editor').val('');
this.$.children('.remaining_hours.editable').text('');
}
},
refreshed : function () {
var remainingHours = this.$.children('.remaining_hours.editable');
remainingHours.toggleClass('empty', remainingHours.is(':empty'));
}
});
}(jQuery));

@ -204,7 +204,7 @@ See RB.Taskboard.initialize()
#rb .issue .blocks {
display:none;
}
#rb .issue .remaining_hours.editable:empty {
#rb .issue .remaining_hours.editable.empty {
display:none;
}
#rb .issue .indicator {

Loading…
Cancel
Save