-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change data-confirm dialog implementation to callback style. #3511
Conversation
i think this one can be very useful since we have default bootstrap 3 support, also can you include your guide in some of widgets guide? |
Have you tried this:
|
I've never thought such. I guessed that I think it's a design issue for users but it also relates to development stability. Though I like clean design passing an action as callback, but in this beta phase of dev, modification may be danger. |
I think it could be done in better way. But this is how I implemented it in my cms, so I wanted to share ;) |
any news on this one? Also i would like to see here something with ajax update or ajax submit form, can Yii2 provide it out of the box, so we will not be searching for some good solution? |
TODO: checking to use it with Ajax update. |
@tanakahisateru could be useful i think . Plus one that used here. |
@tanakahisateru Thanks. |
i was talking only about ajax saving for modals, so they will trigger ajax request and then replace content with the given one and so on . This could be very helpful |
* master: (1112 commits) Removed unused "use" statements Fixed array syntax Removed unused "use" statements Перевод runtime-handling-errors.md на русский язык Mark tests with problematic DBMS as skipped. Fixes yiisoft#3511: Dropped `yii.allowAction()` and modified `yii.confirm()` in `yii.js` to support callbacks Update runtime-url-handling.md Update runtime-url-handling.md Update runtime-url-handling.md Update runtime-url-handling.md Update runtime-url-handling.md Create runtime-url-handling.md Fixed test break. Fixes yiisoft#3410: yii.activeForm.js now supports adding/removing fields dynamically Fixes yiisoft#2914: `ActiveForm::fieldConfig` will be merged recursively with the `$options` parameter in `ActiveForm::field()` Fixes yiisoft#4936 [skip ci] Reverted/fixed some incorrect changes. missing "." sign Fixed formatting, initialized options array Fixed phpdoc ... Conflicts: framework/CHANGELOG.md framework/base/Formatter.php framework/i18n/Formatter.php tests/unit/framework/base/FormatterTest.php tests/unit/framework/i18n/FormatterTest.php
Sorry for my stupid question, I following Yii 2.0: Escape from Default's Yii2 Delete Confirm Box Article and the function is changed now in Dropped Is there someone here, can explain custom method to override a yii confirm method to integrated with bootbox.js ? |
Sorry in only Japanese, I wrote an article how to do it last night. |
thanks @tanakahisateru 👍 |
To create custom dialog for
yii.confirm
, current design is so inconvenient.JSe's standard
confirm()
function can block event handling until user input. But most of custom modal UI (for example using Bootbox.js http://bootboxjs.com/) can't control script processing. I suggest to change handlingdata-confirm
anddata-method
from return-style to callback-style.I've succeeded to create my dialog box using Bootstrap's Modal component by my callback version.