Comments (20)
+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.
Seems like you would also want to specify cancel instead of no as well.
from angular-dialog-service.
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.
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.
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.
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.
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.
I'll take a look into that tho :)
from angular-dialog-service.
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.
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.
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.
@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.
A big +1 to obsidianart's comment
from angular-dialog-service.
+1 too
from angular-dialog-service.
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.
Any idea if this coming within the next month or so?
from angular-dialog-service.
@guikubivan if you want to submit a pull request for this that would be a huge help.
from angular-dialog-service.
Are there any options to do it without overwriting template as for now?
from angular-dialog-service.
@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.
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)
- Upgrade to angular-bootstrap ~1.0? HOT 6
- Call dialog from a bootstrap modal dialog - Position HOT 7
- the translation for chinese does not work. HOT 1
- Look into using the multi-transclusion feature in angular 1.5
- How to add buttons to error dialog?
- is it possible to change the url when a modal opens
- Remove bootstrap bower dependency
- More accessibility support HOT 5
- Disabling the X button for the dialogs HOT 2
- Error: $injector:modulerr Module Error HOT 5
- Confirm Dialog Doesn't work with ui.bootstrap v1.3.3 HOT 1
- how can i close dialog from service? HOT 1
- Dialog appearing behind bootstrap modal window. HOT 1
- Angular functions not work on modal HOT 1
- How to add class to modal-dialog?
- Angular bootstrap modal
- Setting default options for all dialogs HOT 1
- Support component param from angular bootstrap dialog HOT 4
- Font Awesome 5
- Options is not fitting in the input size
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-dialog-service.