Display bootstrap modal dialog on top of child popup window - javascript

I'm modifying Moodle LMS to include some user alerts during their chat sessions if some problems have been identified. Chat module in Moodle appears as a popup window displayed on top of Moodle index page.
Since I can't modify Moodle core code, I'm able to embed some custom javascript code in the Moodle index page, but not in the chat child popup window. This custom javascript code displays bootstrap Modal dialog with notification for the user, but the problem is that this modal dialog is covered by the child popup, so user doesn't see the message.
Ideal scenario would be if modal dialog appears on top of child popup window. However, if that's not possible another solution might be if somehow I can return focus to parent window so user is still able to see notification in modal dialog before he returns to the chat window.
I hope someone has some idea how to make this work.

Related

Display popup with links that when clicked target self

I am making a dashboard with widgets. I want to be able to have a user click somewhere on the widget and a popup to appear (results in the popup will be available reports generated using a SQL query).
When the popup shows choices (different reports) I want user to be able to click on one of the links to the report and the report to become the content (fill) the widget (target="_self").
I have put an iframe inside the widgets to separate the popup content from the page itself.
I explored jQuery, JavaScript, and Bootstrap Modals thus far with some success, but the main issue I am having is targeting self, or parent, to get the link to close the popup/modal and fill the widget the popup originated from.
I cannot use server side technologies like PHP, etc. It needs to be client side.
The old school way used to be javascript:passBack:
Customer 1<br />
That (passBack) is not working anymore...

Re-usable custom directive for modal window in angularjs

I have four menu bar tabs in my application. Each tab has settings icon where user can click on it and a modal window opens and user can perform delete/save/cancel operations on that Tab. For this, I want to create a re-usable modal window. This window will have unique information about each menu Tab. Can somebody help to create a custom directive-modal window when the user clicks on settings icon.
Thanks
If you are open to using bootstrap, I recommend using ui.bootstrap.modal from the bootstrap angular directives for all your modal popup needs.
It's an easy way to handle everything related with modal windows. The actual content of the modal window may be in a separate template, or displayed using a custom directive which can be passed with the options to $modal.open().

Calling a JavaScript function on a CKeditor dialog instead of a popup window

I currently have a custom dialog within the link plugin that launches a popup with all the internal pages on my CMS for the user to pick and it inputs the url into the box
{type:'button',id:'browseInternal',label:i.browseWebsite,filebrowser:{action:'Browse',url:'/admin/pages/links'}}
However, I now use a popup modal window all over my system and would like the same modal style window to be used here. Any ideas on how I can implement it? I dont want to launch a popup window but instead the button needs to call this function
loadPopup( '/admin/pages/links', '', 'destination' );
After gathering my thoughts and a little more help from Google I eventially found the right page on the CKeditor docs see here

close pop up window and redirect to parent window in struts2

I have pop up window , in which to upload an excel file of adding new users.
After clicking the button and successfully added the users into DB, I want to close the pop up window and refresh the parent window to see the updates. In Parent Window, it shows the list of users.
How can I handle all of these events and steps in Struts2 and javascript?
function callAddUsers() {
document.frmUpload.action = "addUsers.action";
document.frmUpload.submit();
}
I want to display some messages of how many users added in parent window too. How can I pass all those info by action?
Now the problem is when I successfully uploaded and added users, the popup window displays the list of users and I have two window opened.
Thanks.
Simple solution.
just window.close(); the popup window and target="main" , in here just target name of the parent window. all works perfectly :)

Display 2 modal windows with jQuery

I want to display 2 modal windows containing HTML content with jQuery.
But second modal window must be within the first.
So, here is main page, when I click link it opens first modal window, and then when I click a link in this modal window in opens second modal window.
I tried to do this with qTip, but I can't make second modal window.
I will be appreciate if somebody tells me how can I realize this. Thanks.
To me this sounds like an ui failure - modals within modals are not healthy for a user interface, and thus modal frameworks rarely support it.
If i was you I'd find another design rather than solve this problem programatically
I'd recommend the jQuery UI Modal Dialog, it should allow having two dialogs open at the same time.
qTip allows to open modal in modal.
Something is going wrong with your code.
Post it here and i can give you a solution!

Categories

Resources