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

Hide X/close button option on Dialogs #3886

Closed
bradorego opened this Issue Mar 23, 2012 · 3 comments

Comments

Projects
None yet
6 participants
@bradorego

bradorego commented Mar 23, 2012

In a move toward a configurable "modal" native jqm dialog, there should be some way to hide the "X" button that appears on dialogs. I've hacked something together in my app to delete the button and to catch back-button events on specific pages, but I feel like this could be configurable (e.g. $.mobile.dialog.options.addBackBtn = false [default true]).

If we wanted to go a step further and make "modal" dialogs, we could do the back-button catch thing as well, and have that configurable as well (e.g. $.mobile.dialog.options.modal = true [default false]).

I'd love to get involved with jQM development, so if we think this is something that would be widely used, if someone could point me in the direction of working on jQM, I'd be more than happy to supply/refine my hack and start fixing other bugs :D

  • Brad
@toddparker

This comment has been minimized.

Show comment
Hide comment
@toddparker

toddparker Mar 23, 2012

Contributor

I agree that this would be a good option to add for 1.2 and I think that option name seems in line with what we're doing on pages. We'd appreciate the help, so please feel free to submit a PR with this new option and we'll give it a look for 1.2.

As far as true modals go, we have popups slated for 1.2 what do what I think you're asking for. Check out the popup branch to preview where we are with that feature.

If you have time to help out, starting by submitting PRs for bugs would be very helpful. If you can keep fixes as small as possible add unit tests, that is appreciated. If you have q's, the team is on #jquermobile-dev on freenode IRC.

Contributor

toddparker commented Mar 23, 2012

I agree that this would be a good option to add for 1.2 and I think that option name seems in line with what we're doing on pages. We'd appreciate the help, so please feel free to submit a PR with this new option and we'll give it a look for 1.2.

As far as true modals go, we have popups slated for 1.2 what do what I think you're asking for. Check out the popup branch to preview where we are with that feature.

If you have time to help out, starting by submitting PRs for bugs would be very helpful. If you can keep fixes as small as possible add unit tests, that is appreciated. If you have q's, the team is on #jquermobile-dev on freenode IRC.

@ebaranov

This comment has been minimized.

Show comment
Hide comment
@ebaranov

ebaranov May 10, 2012

Contributor

I implemented ability to remove Close button for each dialog, but I didn't implement ability to prevent the click on button Back or Forward, because I think we should do it after the issue #3654 will solved. Also, I think we should have ability for understanding how the history traversing event was invoked, eg. by clicking on browser button Back or Forward (or Back button on mobile devices), programatically by window.history.back() or by data-rel="back".

As far the fix 07d73e8, for now we can remove Close button for each dialogs using the example of code below:

$(document).ready(function() {
    $.mobile.dialog.prototype.options.hideCloseBtn = true;
});
Contributor

ebaranov commented May 10, 2012

I implemented ability to remove Close button for each dialog, but I didn't implement ability to prevent the click on button Back or Forward, because I think we should do it after the issue #3654 will solved. Also, I think we should have ability for understanding how the history traversing event was invoked, eg. by clicking on browser button Back or Forward (or Back button on mobile devices), programatically by window.history.back() or by data-rel="back".

As far the fix 07d73e8, for now we can remove Close button for each dialogs using the example of code below:

$(document).ready(function() {
    $.mobile.dialog.prototype.options.hideCloseBtn = true;
});
@jaspermdegroot

This comment has been minimized.

Show comment
Hide comment
@jaspermdegroot

jaspermdegroot Oct 3, 2012

Member

We are planning on adding an option data-closebtn=”left/right/none” for dialogs in 1.3.

#2257 has been closed as duplicate. It was a request for an option to set the position (left/right) for the close button.

Member

jaspermdegroot commented Oct 3, 2012

We are planning on adding an option data-closebtn=”left/right/none” for dialogs in 1.3.

#2257 has been closed as duplicate. It was a request for an option to set the position (left/right) for the close button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment