diff --git a/README.md b/README.md index 5bdbee3..1e54b0a 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ GitHub Burndown Chart as a service. Public repos are free, for private access au - [ ] Check that we have not run out of requests to make - [ ] Show loading sign on top of [browser window](https://github.com/buunguyen/topbar) which is unobtrusive enough we can show it immediately. - [ ] show a countdown clock towards the end of the milestone or show overdue +- [x] format milestone titles prepending "Milestone" word if appropriate - [x] Variable document.title on different pages - [x] be able to go back to homepage - [x] deal with no due date milestones - always on track diff --git a/public/js/app.bundle.js b/public/js/app.bundle.js index bef08a3..eba7514 100644 --- a/public/js/app.bundle.js +++ b/public/js/app.bundle.js @@ -40755,7 +40755,7 @@ if (typeof exports === 'object') { // showChart.mustache root.require.register('burnchart/src/templates/pages/showChart.js', function(exports, require, module) { - module.exports = ["
","
","

{{ milestone.title }}

"," {{{ format.due(milestone.due_on) }}}","

{{{ format.markdown(milestone.description) }}}

","
","
","","
","
","
","
","
"].join("\n"); + module.exports = ["
","
","

{{ format.title(milestone.title) }}

"," {{{ format.due(milestone.due_on) }}}","

{{{ format.markdown(milestone.description) }}}

","
","
","","
","
","
","
","
"].join("\n"); }); // projects.mustache @@ -40811,6 +40811,13 @@ if (typeof exports === 'object') { }, 'markdown': function(markup) { return marked(markup); + }, + 'title': function(text) { + if (text.toLowerCase().indexOf('milestone') > -1) { + return text; + } else { + return ['Milestone', text].join(' '); + } } }; diff --git a/public/js/app.js b/public/js/app.js index 391ac7f..2298c1b 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -789,7 +789,7 @@ // showChart.mustache root.require.register('burnchart/src/templates/pages/showChart.js', function(exports, require, module) { - module.exports = ["
","
","

{{ milestone.title }}

"," {{{ format.due(milestone.due_on) }}}","

{{{ format.markdown(milestone.description) }}}

","
","
","","
","
","
","
","
"].join("\n"); + module.exports = ["
","
","

{{ format.title(milestone.title) }}

"," {{{ format.due(milestone.due_on) }}}","

{{{ format.markdown(milestone.description) }}}

","
","
","","
","
","
","
","
"].join("\n"); }); // projects.mustache @@ -845,6 +845,13 @@ }, 'markdown': function(markup) { return marked(markup); + }, + 'title': function(text) { + if (text.toLowerCase().indexOf('milestone') > -1) { + return text; + } else { + return ['Milestone', text].join(' '); + } } }; diff --git a/src/templates/pages/showChart.mustache b/src/templates/pages/showChart.mustache index 5a7de97..3e5f164 100644 --- a/src/templates/pages/showChart.mustache +++ b/src/templates/pages/showChart.mustache @@ -1,6 +1,6 @@
-

{{ milestone.title }}

+

{{ format.title(milestone.title) }}

{{{ format.due(milestone.due_on) }}}

{{{ format.markdown(milestone.description) }}}

diff --git a/src/utils/format.coffee b/src/utils/format.coffee index 14eb0bd..24c23dd 100644 --- a/src/utils/format.coffee +++ b/src/utils/format.coffee @@ -37,4 +37,11 @@ module.exports = # Markdown formatting. 'markdown': (markup) -> - marked markup \ No newline at end of file + marked markup + + # Format milestone title. + 'title': (text) -> + if text.toLowerCase().indexOf('milestone') > -1 + text + else + [ 'Milestone', text ].join(' ') \ No newline at end of file