Coder Social home page Coder Social logo

Comments (20)

obsidianart avatar obsidianart commented on August 22, 2024 3

+1 It would be great to specify the labels as an option. Yes and No don't give any feedforward to the user and are usually considered bad UX, I prefer to inform the user to the exact meaning of pressing the buttons (like the button down here say "comment" instead of "send")

from angular-dialog-service.

niemyjski avatar niemyjski commented on August 22, 2024

Seems like you would also want to specify cancel instead of no as well.

from angular-dialog-service.

m-e-conroy avatar m-e-conroy commented on August 22, 2024

Right now those buttons can only be set globally using the $translateProvider and setting the property DIALOGS_OK or DIALOGS_NO

Unfortunately this doesn't give you the option to change it on a per modal display basis. The service was designed to handle the most common modals I had been replicating time and again in my applications. The confirmation dialog/modal was meant to answer a question in the affirmative or not, I didn't really see at the time a need to handle button text on a per modal basis. I'll look into possibly giving one the ability to do this.

For now you can use the create custom modal dialog to handle such cases, or another developer notified me (issue #59) that they recently found a way to use Angular.$decorate to extend / change the operation of some of the dialog services.

from angular-dialog-service.

m-e-conroy avatar m-e-conroy commented on August 22, 2024

Just to let you know, i pushed up a new version 5.2.0 that makes the inclusion of Angular-Translate optional.

from angular-dialog-service.

m-e-conroy avatar m-e-conroy commented on August 22, 2024

I was thinking that if you do try the angular.$decorate route, which will enable you to change the internals of the confirmCtrl to allow a button text to be passed with the data parameteryou'll probably also need to change the template by using $templateCache in your module and overwriting the /dialogs/confirm.html template to allow for the button text to be interpolated.

from angular-dialog-service.

niemyjski avatar niemyjski commented on August 22, 2024

Sweet!, I'll pull it down. I'm running into some crazy ng-animate issues when I'm running 1.3 and trying to close a dialog

from angular-dialog-service.

niemyjski avatar niemyjski commented on August 22, 2024

Yeah, right now I just created a custom one because I want to add a few things like optional header / button styles as well as being able to have a button indicator based on the state of a promise.

from angular-dialog-service.

niemyjski avatar niemyjski commented on August 22, 2024

I'll take a look into that tho :)

from angular-dialog-service.

m-e-conroy avatar m-e-conroy commented on August 22, 2024

I haven't tested it with Angular 1.3 yet, someone else said they were having similar troubles. Not sure if its my service or Angular-Bootstrap that is the culprit yet. Testing it against 1.3 was my next todo.

from angular-dialog-service.

niemyjski avatar niemyjski commented on August 22, 2024

Do you have a sample of not including the translation stuff? I just looked over your commits and it looks like everything still has a dependency on it.

from angular-dialog-service.

m-e-conroy avatar m-e-conroy commented on August 22, 2024

There should be an index2.html file in the example folder. I still need to
update the readme with the changes.
On Sep 24, 2014 2:03 PM, "Blake Niemyjski" [email protected] wrote:

Do you have a sample of not including the translation stuff? I just looked
over your commits and it looks like everything still has a dependency on it.


Reply to this email directly or view it on GitHub
#66 (comment)
.

from angular-dialog-service.

m-e-conroy avatar m-e-conroy commented on August 22, 2024

@niemyjski If you don't include the Angular-Translate script, the dialogs service will substitute an internal "translate" module. It doesn't really do translation it just mimics Angular-Translate's methods to provide defaults without the external default file. I did this so if someone did include Angular-Translate (perhaps at a later date) all they'd need to do is just include the script and it would picked up by the dialogs service with no need to change anything else.

from angular-dialog-service.

dlwhiteman avatar dlwhiteman commented on August 22, 2024

A big +1 to obsidianart's comment

from angular-dialog-service.

kanodoe avatar kanodoe commented on August 22, 2024

+1 too

from angular-dialog-service.

bensan avatar bensan commented on August 22, 2024

If anyone has an example of how to use decorators to change the labels on a per modal basis, I would appreciate if you would share it.

from angular-dialog-service.

guikubivan avatar guikubivan commented on August 22, 2024

Any idea if this coming within the next month or so?

from angular-dialog-service.

niemyjski avatar niemyjski commented on August 22, 2024

@guikubivan if you want to submit a pull request for this that would be a huge help.

from angular-dialog-service.

woodgoblin avatar woodgoblin commented on August 22, 2024

Are there any options to do it without overwriting template as for now?

from angular-dialog-service.

PetrosKalafatidis avatar PetrosKalafatidis commented on August 22, 2024

@niemyjski @m-e-conroy Does the custom text button works ?
I can see that the latest release is 5.3.0, How can I use version 5.3.1 ?

from angular-dialog-service.

niemyjski avatar niemyjski commented on August 22, 2024

I have yet to push out a release, I was wanting to merge in some of the other pr's first. Would you mind reviewing them and leave any comments on them so we can have a bigger release

from angular-dialog-service.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.