naming conflict

This commit is contained in:
Radek Stepan 2014-10-13 19:40:22 -07:00
parent 7bddd337fe
commit f252d012ca
6 changed files with 36 additions and 34 deletions

View File

@ -2,6 +2,8 @@
##Release: MVP
- [ ] visiting a project page (from chart) should query for all milestones and issues sans what we've got
###GitHub
- [ ] sort milestones on index and project page based on priority (most delayed first)
@ -30,8 +32,7 @@
###Bugs
- [ ] `localStorage` is getting reset
- [ ] a bit of a freeze when fetching `mbostock/d3`
- [ ] `rails/rails/24` has issues in two clusters as if merged from two milestones
###Docs
@ -50,6 +51,7 @@
- [ ] make async pages transition so that there is no "jumping" on the page
- [ ] index page alert tooltip
- [ ] app icon like http://thenounproject.com/term/fire/50966/
- [ ] make it easy to go back to project page from a chart page, show it in the header
###Misc

View File

@ -39601,8 +39601,8 @@ Router.prototype.mount = function(routes, path) {
});
// line.coffee
root.require.register('burnchart/src/modules/line.js', function(exports, require, module) {
// lines.coffee
root.require.register('burnchart/src/modules/lines.js', function(exports, require, module) {
var config,
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
@ -39610,7 +39610,7 @@ Router.prototype.mount = function(routes, path) {
config = require('../models/config');
module.exports = {
actual: function(collection, created_at, total) {
actual: function(issues, created_at, total) {
var head, max, min, range, rest;
head = [
{
@ -39620,7 +39620,7 @@ Router.prototype.mount = function(routes, path) {
];
min = +Infinity;
max = -Infinity;
rest = _.map(collection, function(issue) {
rest = _.map(issues, function(issue) {
var closed_at, size;
size = issue.size, closed_at = issue.closed_at;
if (size < min) {
@ -40014,21 +40014,21 @@ Router.prototype.mount = function(routes, path) {
// chart.coffee
root.require.register('burnchart/src/views/chart.js', function(exports, require, module) {
var line;
var lines;
line = require('../modules/line');
lines = require('../modules/lines');
module.exports = Ractive.extend({
'name': 'views/chart',
'template': require('../templates/chart'),
oncomplete: function() {
var actual, height, ideal, issues, m, mAxis, margin, milestone, svg, tooltip, total, trend, width, x, xAxis, y, yAxis, _ref;
var actual, height, ideal, issues, line, m, mAxis, margin, milestone, svg, tooltip, total, trend, width, x, xAxis, y, yAxis, _ref;
milestone = this.data.milestone;
issues = milestone.issues;
total = issues.open.size + issues.closed.size;
actual = line.actual(issues.closed.list, milestone.created_at, total);
ideal = line.ideal(milestone.created_at, milestone.due_on, total);
trend = line.trend(actual, milestone.created_at, milestone.due_on);
actual = lines.actual(issues.closed.list, milestone.created_at, total);
ideal = lines.ideal(milestone.created_at, milestone.due_on, total);
trend = lines.trend(actual, milestone.created_at, milestone.due_on);
_ref = this.el.getBoundingClientRect(), height = _ref.height, width = _ref.width;
margin = {
'top': 30,
@ -40388,7 +40388,7 @@ Router.prototype.mount = function(routes, path) {
obj = _.find(project.milestones, {
'number': milestone
});
if (obj) {
if (obj != null) {
return this.set({
'milestone': obj,
'ready': true

View File

@ -553,8 +553,8 @@
});
// line.coffee
root.require.register('burnchart/src/modules/line.js', function(exports, require, module) {
// lines.coffee
root.require.register('burnchart/src/modules/lines.js', function(exports, require, module) {
var config,
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
@ -562,7 +562,7 @@
config = require('../models/config');
module.exports = {
actual: function(collection, created_at, total) {
actual: function(issues, created_at, total) {
var head, max, min, range, rest;
head = [
{
@ -572,7 +572,7 @@
];
min = +Infinity;
max = -Infinity;
rest = _.map(collection, function(issue) {
rest = _.map(issues, function(issue) {
var closed_at, size;
size = issue.size, closed_at = issue.closed_at;
if (size < min) {
@ -966,21 +966,21 @@
// chart.coffee
root.require.register('burnchart/src/views/chart.js', function(exports, require, module) {
var line;
var lines;
line = require('../modules/line');
lines = require('../modules/lines');
module.exports = Ractive.extend({
'name': 'views/chart',
'template': require('../templates/chart'),
oncomplete: function() {
var actual, height, ideal, issues, m, mAxis, margin, milestone, svg, tooltip, total, trend, width, x, xAxis, y, yAxis, _ref;
var actual, height, ideal, issues, line, m, mAxis, margin, milestone, svg, tooltip, total, trend, width, x, xAxis, y, yAxis, _ref;
milestone = this.data.milestone;
issues = milestone.issues;
total = issues.open.size + issues.closed.size;
actual = line.actual(issues.closed.list, milestone.created_at, total);
ideal = line.ideal(milestone.created_at, milestone.due_on, total);
trend = line.trend(actual, milestone.created_at, milestone.due_on);
actual = lines.actual(issues.closed.list, milestone.created_at, total);
ideal = lines.ideal(milestone.created_at, milestone.due_on, total);
trend = lines.trend(actual, milestone.created_at, milestone.due_on);
_ref = this.el.getBoundingClientRect(), height = _ref.height, width = _ref.width;
margin = {
'top': 30,
@ -1340,7 +1340,7 @@
obj = _.find(project.milestones, {
'number': milestone
});
if (obj) {
if (obj != null) {
return this.set({
'milestone': obj,
'ready': true

View File

@ -3,10 +3,10 @@ config = require '../models/config'
module.exports =
# A graph of closed issues.
# `collection`: issues
# `issues`: issues list
# `created_at`: milestone start date
# `total`: total number of points (open & closed issues)
actual: (collection, created_at, total) ->
actual: (issues, created_at, total) ->
head = [ {
'date': new Date created_at
'points': total
@ -15,7 +15,7 @@ module.exports =
min = +Infinity ; max = -Infinity
# Generate the actual closes.
rest = _.map collection, (issue) ->
rest = _.map issues, (issue) ->
{ size, closed_at } = issue
# Determine the range.
min = size if size < min

View File

@ -1,4 +1,4 @@
line = require '../modules/line'
lines = require '../modules/lines'
module.exports = Ractive.extend
@ -13,13 +13,13 @@ module.exports = Ractive.extend
total = issues.open.size + issues.closed.size
# Actual, ideal & trend lines.
actual = line.actual issues.closed.list, milestone.created_at, total
ideal = line.ideal milestone.created_at, milestone.due_on, total
trend = line.trend actual, milestone.created_at, milestone.due_on
actual = lines.actual issues.closed.list, milestone.created_at, total
ideal = lines.ideal milestone.created_at, milestone.due_on, total
trend = lines.trend actual, milestone.created_at, milestone.due_on
# Get available space.
{ height, width } = @el.getBoundingClientRect()
margin = { 'top': 30, 'right': 30, 'bottom': 40, 'left': 50 }
width -= margin.left + margin.right
height -= margin.top + margin.bottom

View File

@ -34,7 +34,7 @@ module.exports = Ractive.extend
# Do we have this milestone already?
obj = _.find project.milestones, { 'number': milestone }
return @set { 'milestone': obj, 'ready': yes } if obj
return @set { 'milestone': obj, 'ready': yes } if obj?
# We are loading the milestones then.
done = do system.async