Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Feature/classic design #251

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ gem 'rails-i18n'
gem 'configuration'
gem 'rails-observers', '~> 0.1.2'
gem 'jquery-ui-rails'
gem 'font-awesome-rails'
gem 'pg'

group :production do
Expand Down
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ GEM
factory_girl (~> 4.4.0)
railties (>= 3.0.0)
ffi (1.9.3)
font-awesome-rails (4.1.0.0)
railties (>= 3.2, < 5.0)
fssm (0.2.10)
hike (1.2.3)
i18n (0.6.11)
Expand Down Expand Up @@ -222,6 +224,7 @@ DEPENDENCIES
devise (~> 3.2.4)
ejs
factory_girl_rails
font-awesome-rails
jasmine (~> 1.3.2)
jbuilder (~> 1.2)
jquery-rails
Expand Down
57 changes: 49 additions & 8 deletions app/assets/javascripts/templates/story.jst.ejs
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<% if (story.estimable()) { %>
<div class="state-actions">
<div class="state-actions estimates">
<form>
<% _.each(story.point_values(), function(value) { %>
<input type="button" class="estimate" value="<%= value %>"/>
<span class="estimate input" data-value="<%= value %>">
<% if (value == 0) { %>[]<% } else { %>
<% _.times(value, function() { %>|<% }) %>
<% } %>
</span>
<% }); %>
</form>
</div>
Expand All @@ -20,16 +24,53 @@
<a class="icon icons-throbber" title="<%= I18n.t('saving') %>"></a>
<% } %>
<span class="popover-activate">
<span class="icon icons-<%= story.get('story_type') %> story_type" title="<%= story.story_type %>: <%= story.id %>">


<% if (story.get('story_type') == 'feature') { %>
<span class="fa-icon-overlay">
<i class="fa fa-star"></i>
<i class="fa fa-star-o"></i>
</span>
<% } %>
<% if (story.get('story_type') == 'chore') { %>
<i class="fa fa-cog"></i>
<% } %>
<% if (story.get('story_type') == 'bug') { %>
<i class="fa fa-bug"></i>
<% } %>

<!-- TODO make it accessible
<%= story.story_type %>
</span>

<% if (story.estimated()) { %>
<span class="estimate estimate_<%= story.get('estimate') %>">
<%= story.get('estimate') %>
</span>
<% } %>
-->

<% if (story.estimated()) { %>
<span class="estimate estimate_<%= story.get('estimate') %>">
<%= story.get('estimate') %>
</span>
<span class="estimate estimate_<%= story.get('estimate') %>">
<% if (story.get("estimate") == 1) { %> | <% } %>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use Array(story.get("estimate") + 1).join('|')?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use '|' * story.get("estimate")? :)
Please note that I am no longer using fulcrum, so feel free to fork the fork and modify it as you wish.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it's not ERB ;)
To where you moving? Taiga?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My own project management tool that I am building for a customer.
http://cl.ly/image/3m2Q2c1R1u2W
http://cl.ly/image/3H3D320G2r1H
http://cl.ly/image/1s352t401Q0g

<% if (story.get("estimate") == 2) { %> || <% } %>
<% if (story.get("estimate") == 3) { %> ||| <% } %>
<% if (story.get("estimate") == 4) { %> |||| <% } %>
<% if (story.get("estimate") == 5) { %> ||||| <% } %>
<% if (story.get("estimate") == 6) { %> |||||| <% } %>
<% if (story.get("estimate") == 7) { %> ||||||| <% } %>
<% if (story.get("estimate") == 8) { %> |||||||| <% } %>
<% if (story.get("estimate") == 9) { %> ||||||||| <% } %>
<% if (story.get("estimate") == 10) { %> |||||||||| <% } %>
<% if (story.get("estimate") == 11) { %> ||||||||||| <% } %>
<% if (story.get("estimate") == 12) { %> |||||||||||| <% } %>
</span>
<% } %>

<% if (story.hasDetails()) { %>
<span class="icon icons-details"></span>
<span class="fa-icon-overlay">
<i class="fa fa-comment"></i>
<i class="fa fa-comment-o"></i>
</span>
<% } %>
</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Fulcrum.ColumnVisibilityButtonView = Backbone.View.extend({

initialize: function() {
_.bindAll(this, 'setClassName');
this.$el.attr('class','hide_'+this.options.columnView.id);
this.$el.attr('class','hide_'+this.options.columnView.id+" btn btn-default");
this.options.columnView.bind('visibilityChanged', this.setClassName);
},

Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/views/project_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Fulcrum.ProjectView = Backbone.View.extend({
},

scaleToViewport: function() {
var storyTableTop = $('table.stories tbody').offset().top;
var storyTableTop = $('table.stories tbody').offset().top + 20;
// Extra for the bottom padding and the
var extra = 100;
var height = $(window).height() - (storyTableTop + extra);
Expand Down
8 changes: 5 additions & 3 deletions app/assets/javascripts/views/story_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Fulcrum.StoryView = Fulcrum.FormView.extend({
"click #submit": "saveEdit",
"click #cancel": "cancelEdit",
"click .transition": "transition",
"click input.estimate": "estimate",
"click .estimate": "estimate",
"click #destroy": "clear",
"click #edit-description": "editDescription",
"sortupdate": "sortUpdate"
Expand Down Expand Up @@ -148,7 +148,7 @@ Fulcrum.StoryView = Fulcrum.FormView.extend({
estimate: function(ev) {
this.saveInProgress = true;
this.render();
this.model.set({estimate: ev.target.value});
this.model.set({estimate: ev.target.attributes['data-value'].value});

var that = this;
this.model.save(null, {
Expand Down Expand Up @@ -188,7 +188,9 @@ Fulcrum.StoryView = Fulcrum.FormView.extend({
return false;
}
// Should expand if the click wasn't on one of the buttons.
return !$(e.target).is('input');
if ($(e.target).is('input')) return false
if ($(e.target).is('.input')) return false
return true;
},

cancelEdit: function() {
Expand Down
1 change: 1 addition & 0 deletions app/assets/stylesheets/application.css.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import 'jquery_gritter';
@import 'jquery_tagit';
@import "font-awesome";
@import 'popover';
@import 'screen';
Loading