modal-dialog

Show input dialog in WinForms

我与影子孤独终老i 提交于 2019-12-05 15:36:05
I'd like to show an input modal in my WinForm application. I have looked around the web, but haven't found a good pattern for doing this. I understand I'd have to create another Form, and use the ShowDialog method. You are correct. Note that modal dialogs are not automatically disposed when closed (unlike non-modal dialogs), so you want a pattern like: using (FrmModal myForm = new FrmModal()) { DialogResult dr = myForm.ShowDialog(); if (dr == DialogResult.OK) { // ... } else { // ... } } In the new form itself (which I have called FrmModal), set the DialogResult property in your button event

Primefaces dialog is rendering twice

不想你离开。 提交于 2019-12-05 13:28:42
I've created an ui:component to use like a popup, so I can create a lot of popups using the standard of this template. The component is just a popup with two buttons (cancel and submit) and a content that can be overriden, like you can see here: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http:/

Dojo Dijit Dialog relative position. is it possible?

对着背影说爱祢 提交于 2019-12-05 12:32:51
I want to position Dojo's Dijit Dialog relative to one of my html element. is it Possible? If yes. How? currently it always shows dialog in middle of viewport. Can any one help me regarding the matter? Thanks. amar4kintu Another way that I do this (not great because I override a private method but it gives me the flexibility I want): var d = new Dialog({ title:"Your Dialog", _position:function(){ if(this.refNode){ p = Geo.position(this.refNode); Style.set(this.domNode,{left:p.x + "px", top:p.y + "px"}); } }, showAround:function(node){ this.refNode = node; this.show(); } }); d.showAround(dojo

Opening AngularJS modal causes page to shift if scrollbar exists

人走茶凉 提交于 2019-12-05 12:20:56
I am creating an AngularJS modal that pops up when I hover over a menu element. The problem I have is when the current page has a scrollbar the modal causes the scrollbar for the main page to disappear, which then causes the background behind the modal to shift to the right, and when the modal closes the body shifts to the left. When the modal opens it adds the class "modal-open" to the body. I can add the "modal-body" to my css file for the page, and define it as such: .modal-open{ margin-right:15px; } Which fixes the problem, but only for pages with a scrollbar. If the page does not have a

modal image popups

早过忘川 提交于 2019-12-05 12:15:33
I have seen a few sites that have a thumbnail and when you click it, it enlarges the image in a modal like popup. Can anyone tell me how this is done? Thanks! It is done with lightbox . There are several other scripts that do this, for example a jquery plugin . Jquery is an easy way to implement a modal popup. It is usually done using one of the many plugins. piroBox FancyBox prettyPhoto nyroModal thickbox The list goes on and on. You can view the top 23 here you should also be able to do it with ajax in .net. Here is a dialog box sample, you may be able to modify for your usage. http://www

Prevent bootstrap-3 modal from closing when the form has changes

Deadly 提交于 2019-12-05 12:05:29
I'm trying to prevent the bootstrap-3 modal from closing without warning when there are changes made to the form inside the modal. However when I listen to the events fired by the modal and return false it will prevent the modal from closing ever. Here's my code: $(function() { $('body').live('shown.bs.modal', '#quickbutton-create', function () { $(this).find('#quickbutton-create form').monitor(); }); $('body').live('hide.bs.modal', '#quickbutton-create', function () { if ($(this).find('#quickbutton-create form').monitor('has_changed')) { if (!confirm('Are you sure?')) { return false; } } });

How to display a partial view as a popup/modal on button click using bootstrap or jquery?

▼魔方 西西 提交于 2019-12-05 11:56:23
I realize that this could be repetitive question but I failed to find an answer so putting a new question. I am pretty new to web development and trying to hard to get this trivial scenario work: I want to display some information to the user when he clicks on a button. The information should be presented like a popup: it would close only when user clicks on close( X ) on top right or ok button at bottom. I have tried implementing this using different ways I came across on various SO answers but nothing seems to work for me. Following code snippet that displays a static modal works: <button

Close Modal using CSS only

房东的猫 提交于 2019-12-05 10:30:37
I need to close my modal just by using css like this: http://jsfiddle.net/raving/1mhsynmw/ However, I can't get it to work. My modal below. function alert(msg) { document.getElementById("alert").innerHTML = '<div class="modal-overlay"><div class="modal"><div class="modal-container"><h3>' + msg + '</h3><p>' + msg + '</p></div><p class="modal-footer"><a href="javascript:" id="ok">OK</a></p></div>'; } alert("This is some text to show you this modal. This is some text to show you this modal. This is some text to show you this modal. This is some text to show you this modal."); body { font-family

How can restrict the tab key press only within the modal popup when its open?

放肆的年华 提交于 2019-12-05 09:54:53
I have a modal popup opened. I have accessibility requirement. So added ARIA related labels. But when i click tab key continuously focus going to the page behind the actual page. Added role="dialog" in html file But when modal opened i want only the focus navigate within the modal popup. Working on Angular4, HTML5 project. Better if we find a solution within HTML file itself . I mean without added any javascript/jQuery related stuffs to prevent this You are asking about focus trap , it's nicely demonstrated in this demo: http://davidtheclark.github.io/focus-trap/demo/ Adding role="dialog" will

iPhone login screen problem

爷,独闯天下 提交于 2019-12-05 09:34:38
问题 I have a large application. It has a lot of tables and navigation between them. I started a project as a 'NavigationBasedProject' (xcode template). But now I need to add login at the start of the application. So here what I did so far: In 'didFinishLaunchingWithOptions' I added: loginViewController = [[LoginViewController alloc]init]; [loginViewController.view setFrame:CGRectMake(0, 0, 320, 480)]; [self.window.rootViewController presentModalViewController:loginViewController animated:NO];