Skip to content
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

Second modal does not work as expected #26

Open
kukrik opened this issue Mar 13, 2016 · 4 comments
Open

Second modal does not work as expected #26

kukrik opened this issue Mar 13, 2016 · 4 comments

Comments

@kukrik
Copy link
Member

kukrik commented Mar 13, 2016

To me this error displayed:

Error in PHP Script /qcubed-shannon-alpha/vendor/qcubed/plugin/bootstrap/examples/modal.php
QAction::RenderActions(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "QDialog_ButtonEvent" of the object you are trying to operate on was loaded before unserialize() gets called or provide a __autoload() function to load the class definition

Error Type: E_NOTICE

Source File: /Users/.../.../.../qcubed-shannon-alpha/vendor/qcubed/framework/includes/base_controls/_actions.inc.php Line: 46

@spekary, any thoughts?

@spekary
Copy link
Member

spekary commented Mar 13, 2016

Update to the latest v3 code. I recently added Dialog_ButtonEvent to the qcubed.inc.php file.

@kukrik
Copy link
Member Author

kukrik commented Mar 14, 2016

Yes, it works now. Thanks!

Little concern that the button "Watch Out" does not work as expected. I added screenhots:

screen shot 2016-03-14 at 2 12 47

Any thoughts?

EDIT: I shall make clear here. This line

$this->modal2->AddButton('Watch Out', 'wo', false, false, "Are you sure?", ['class'=>Bs\Bootstrap::ButtonWarning]);

does not work as expected

@kukrik
Copy link
Member Author

kukrik commented Apr 1, 2016

A big step forward! As you can see screenshots of the small obstacle must be overcome.

screen shot 2016-04-02 at 0 26 56

I studied a little bit and I think that before the event to confirm whether the first active modal remove or hide or close.

I think about it, but can not think of (qc.bs.modal.js lines 196-215)...

 _buttonClick: function(event) {
            var objButton = event.data;
            var self = objButton.instance;

            if (objButton.confirm) { //This place should tell him that before the other active modal to clean up!
                self.confirm(objButton.confirm, function () {
                    self._recordButtonClick(event);
                });
            } else {
                self._recordButtonClick(event);
            }
        },
        _recordButtonClick: function(event) {
            var objButton = event.data;
            var self = objButton.instance;
            var controlId = self.element.attr('id');

            qcubed.recordControlModification(controlId, "_ClickedButton", objButton.id);
            self.element.trigger("QDialog_Button", objButton.id);
        },

@spekary, I think you can understand it quickly...

@kukrik
Copy link
Member Author

kukrik commented May 11, 2016

@spekary! Specifier question - whether the last screenshot is normal and corresponds to you idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants