Open modal popup in another modal popup - twitter-bootstrap-3

I want to open modal popup within another popup.
Is it possible in Yii2.0?
I have one modal popup window, there is one link inside, after clicking on that link i want to open one small popup without closing parent window.
<?= Html::a('Click here to skip it', ['customer/loststicker']) ?>

The more correct formulation should be "Is it possible with Bootstrap 3?" since Yii2 is integrated with Bootstrap 3 and provide widgets for most of js components including Modal.
At first check official Bootstrap 3 documentation about modal:
Overlapping modals not supported
Be sure not to open a modal while another is still visible. Showing more than one modal at a time requires custom code.
So you need custom solution to implement this.
I think there are two main possible variations:
Close first modal, open second; when closing second, open first again. If the size of the second window is the same as first or more than first, visually you can't tell that first window is closed (don't sure about the animations though).
First modal stays opened when second appears.
If you do some research here you find few similar questions:
Bootstrap: Open Another Modal in Modal
Bootstrap 3 - open modal from another modal
Bootstrap modal: close current, open new
So for your case i think using Stackable will be more suitable.

Related

Set focus to child window in PyGtk

I am writing a simple application in python using PyGObject and glade. The application has a main window and a functional window (Generate logs, also a Window object) which opens up on clicking a menu item.
The Generate logs window is supposed to:
Show options to generate log for a particular date
Be minimizable and should close automatically when the task is complete (OR)
Be able to be closed manually if the user wishes so
The problem is, once I show up the Generate logs window, I am directly able to select the main window as well. Then, I can go to the menu and bring up as many Generate logs windows as I want.
I have tried several options (Is Focus, setting up main window as Transient parent etc) but nothing worked. How can I fix this?
First you say PyGTK, then you say PyGObject, this are 2 different things. I'm going to answer for PyGTK (my sources are from GTK+ 2 docs) since it's in the title and maybe people looking for that will end up here. But never fear, because for this question, the answer is practically (I think exactly) the same for both.
What I understand is that you want you "Generate log" window to be modal. That means other windows can't be used while your modal window is up, just like a Dialog window. Also you should set the main window to be the parent of your modal window, since this helps the OS Window Manager i.e. keep the dialog on top of the main window.
Yo can do both of this things directly from Glade (if you've created both windows in the same project, not always the case) selecting the Modal atribute to True and the Transient for Window attribute to your main window, in the General Properties section of your Generate log window.
Also you can do it programmatically using the set_modal() and the set_transient_for(parent_window) method of your child window.
Let's say your parent window is called main_window and the child window is generate_log_window, then you can do it like this:
generate_log_window.set_modal(gtk.TRUE)
generate_log_window.set_transient_for(main_window)
If you want it to show center top of your main window, do this
generate_log_window.set_position(gtk.WIN_POS_CENTER_ON_PARENT)
To your second point, the ability to minimize can be set from Glade.
Sources:
GTK+ 2 GtkWindow reference set_modal
GTK+ 2 GtkWindow reference set_transient_for
PyGTK FAQ: How do I get my windows to show up where I want
PyGTK FAQ: How do I make a dialog block the whole application, so the user is forced to answer it?
create several windows (see your other post).
Upload them in init
Show them with "signals" in glade using "show" and "hide"
class GUIxxxx
#...
def action1(self, widget, data=None):
self.window1.show()
def action2(self, widget, data=None):
# do something here
self.window1.hide()

Magnific-popup - Source (not showing up again) after closing Popup

I'm trying to implement the Magnific-popup on a website. Source is a jquery ( html articles with a header paragraphs...) object loaded as inline type. The shown source is on the same page as the popup. To this point it is working fine, popup is working, content is loaded.
Now I'm unsure whether this is standard behaviour or not: In the background the shown article is hidden, while the rest of the articles are still there. When closing the popup, the shown article stays hidden.
tl;dr: Magnific-popup hides the source of the opened information, not making it visible again after closing the popup.
Am I doing anything wrong or is it just the expected behaviour of Magnific-popup?
Any hints/solutions appreciated.
its general behavior.
when you close the popup once, it adds class "popup-hide" to hide the popup content, though which may not be applied by you in its html
i hope you are referring to something like this : http://www.hoopsvilla.com/2014/04/2014-nba-playoffs-bracket-tree-updated-scores-stats-schedule.html (when you click the trigger (the team logo), the inline-content gets hidden once the popup is closed.)
i'll try to get more (solution) on this later.. :)

simplemodal close function

I love the osx version of the simple modal. However, I would like to do some data editing in the opened modal box.
Now when the user clicked outside of the modal, it'll close. So if the user accidentally clicked the outside of the modal, their information will be lost.
How do I disable closing when click outside of the modal? thanks!
Go to Line 28 of the file "osx.js" that is included in Simple Modal OSX Style Dialog. Change overlayClose: true to overlayClose: false.

Uploadify - file select dialog goes behind the popup window

I am using uploadify in a child window. that is if i click on a image it will open a new window using javascript.. inside the child popup window, i am having the uploadify.
everything works fine. but when clicking Browser Files flash button, the file select dialog goes behind the child window. anybody please help to focus the file select dialog to the current popup window.
Do you have a link so we can test this? It seems like a problem on how your computer is rendering dialogs.
I believe the browser can't control whether the dialog will be created on top of all windows or behind all windows.

Dojo dialog nesting

can a dojo dialog bring up another dojo dialog?
dojo 1.3 only supports one modal dialog at a time, so while, yes, one dialog can open another, closing the second destroys the modality of the first.
This happens because dojo.Dialog uses a single global underlay object that provides screen between the dialog and anything else on the page. You can make it work if you're wiling to create your own underlay for each dialog and manage the z-indexes yourself.
I understand this will be rectified in 1.4.
Yes, a dialog can open another dialog, but then you'd have two dialogs displayed -- they aren't modal between each other.
Since this is not the behavior I desire I've worked around this by creating my own handler -- it first checks for an open dialog, and if it finds one, closes it (and places it on a stack) before opening a new dialog. When it closes one it looks at the stack and re-opens dialogs lower on the stack.
Multiple dialogs can be opened prior to Dojo 1.4, but there are problems with accessibility in that case (tabIndex is handled wrong) - so if you need your app to be accessible and support mutliple dialogs., you need to upgrade to Dojo 1.4 when it comes out.
yes you are able to do it in dojo 1.6 and all above versions