ember-addons / bootstrap-for-ember

Bootstrap for Ember.js
http://ember-addons.github.io/bootstrap-for-ember
Apache License 2.0
704 stars 103 forks source link

Before you could not add text to progessbars. With this minor fix you ca... #121

Open toovy opened 10 years ago

toovy commented 10 years ago

Use the block helpers of bs-progress and bs-progressbar to create progress bars with custom text.

asaf commented 10 years ago

@toovy Why not just replace the Complete text to a property ?

toovy commented 10 years ago

@asaf the span.sr-only is only detected by screen readers afaik. That would not solve the problem. As seen here http://getbootstrap.com/components/#progress you can add text directly under the div.progress-bar. Furthermore the problem is that you might want to add even more dynamic segments to the output. See this example:

{{#unless is_amount_open}}
    {{#bs-progress}}
        {{#bs-progressbar type="success" progress=progress}}
            {{format_fn amount_as_currency}}{{currency}} {{progress}}%
        {{/bs-progressbar}}
    {{/bs-progress}}
{{/unless}}
asaf commented 10 years ago

@toovy Fair enough, I am not committing yet because the documentation needs to get updated first,

If you have time then feel free to add this code sample into the docs or I'll do it later,

Thanks!

toovy commented 10 years ago

@asaf I've added a small chapter, hope that it is ok.