modal-dialog

how to add close button to modal view corner which is presented in UIModalPresentationPageSheet?

自作多情 提交于 2019-11-30 21:55:15
I want to add a floating close (x) button at the corner of an UIModalPresentationPageSheet View. The effect is like below: But adding it to the parent view makes it appear behind the Page Sheet (and also impossible to tap) and adding it to the Page Sheet will make part of it hidden, since it's out of the view area. Is there any better solution? Any suggestions are appreciated. You can try and add it to the the topmost application window: add.modalPresentationStyle = UIModalPresentationPageSheet; [self presentViewController:add animated:YES completion:^{ [[[[UIApplication sharedApplication]

Durandal 2.0 custom dialog

耗尽温柔 提交于 2019-11-30 21:50:26
I wish to make a Durandal custom dialog that adds a window frame with title and footer around an existing composable viewmodel. I have made a customModal.html template <div class="messageBox"> <div class="modal-header"> <h3 data-bind="text: title"></h3> </div> <div class="modal-body"> <!--ko compose: { model: model, template: view }--> <!--/ko--> </div> <div class="modal-footer" data-bind="foreach: options"> <button class="btn" data-bind="click: function () { $parent.selectOption($data); }, text: $data, css: { 'btn-primary': $index() == 0, autofocus: $index() == 0 }"></button> </div> </div> As

Open modal with # in url

孤者浪人 提交于 2019-11-30 21:03:38
Im sorry for this probably dumm question, but I want to simply open modals with # in the url. So if i call www.domain.com/#modal1 it will open the page with the modal poped-up already. Oh Im using jquery. Thank you! Many application frameworks (I'm partial to backbone ) use some kind of router to accomplish this, but you could fake your own by checking window.hash and running an appropriate function: function popModal() { // code to pop up modal dialog } var hash = window.location.hash; if (hash.substring(1) == 'modal1') { popModal(); } ​​ Thanks for answer, This is my implementation: function

Show bootbox alert in Typescript/Angular2? [closed]

假如想象 提交于 2019-11-30 20:54:38
I want to use Bootbox in my Angular2 project. I searched a lot but there is no any relevant solution for me. I also tried angular2-modal but there were many issues while using angular2-modal , please suggest any good doc/Examples/Demos for the same. vikas Step 1: Install bootbox via npm install bootbox --save Step 2: If you are using systemjs then include bootbox like: <script src="node_modules/bootbox/bootbox.js"></script> Step 3: Just put declare var bootbox:any; after import all libreries and before component decorator in your component ts file and then use normaly like bootbox.alert("Hello

UWP ContentDialog Invocation

别来无恙 提交于 2019-11-30 20:40:08
I am using UWP and Template 10 to build a GUI app by following MVVM pattern. As a part of application I need to invoke a content dialog by pressing button on Main Page. So separate ContentDialog was created in standalone .xaml file for that purpose: <ContentDialog x:Class="UWP1.Views.Speech" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:UWP1.Views" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" Title=

Test modal dialog with Qt Test

淺唱寂寞╮ 提交于 2019-11-30 20:20:32
I am trying to write a unit test for a GUI application using the QTestLib. The problem is that one of the slots creates a modal dialog using exec() and I found no possibility to interact with the dialog. The slots which creates the dialog is connected to a QAction. So the first problem is that the test blocks when I trigger the QAction in the test since this results in the call to exec() . Therefore, I tried creating a QThread that performs the interaction. However, this did not help. Things I already tried (all performed from within the "interaction helper" thread): Send key clicks using

Cocoa: how to run a modal window while performing a background task?

风流意气都作罢 提交于 2019-11-30 19:50:20
问题 I've tried calling modalSession=[NSApp beginModalSessionForWindow:conversionWindow]; [NSApp runModalForWindow:conversionWindow]; in order to get a modal conversionWindow that prevents the user to interact with the rest of the application, but this also seems to block code execution. What I mean is that the code that comes after the code shown above isn't executed at all. How can I fix this? I'm sure this is possible because many applications show some progress while performing some big task,

When is modal UI acceptable?

ε祈祈猫儿з 提交于 2019-11-30 19:02:51
By and large, modal interfaces suck big rocks. On the other hand, I can't think of a better way to handle File Open... , or Print... and this, I think, is because they are occasional actions, infrequent and momentous, and they are atomic in nature; you either finish specifying all your print options and go through with it, or you cancel the whole show. Let's put together a little style-guide. Suggest any use-cases in which a dialog is the preferred presentation and why it is preferred. Can the dialog be non-modal? If it is, how do you mark transactional boundaries, since Cancel ceases to have

jQuery modal dialog box isn't submitting my form

耗尽温柔 提交于 2019-11-30 18:53:20
I am using a jQuery Modal Dialog box to ask the user if they wish to submit the form or not. However after the user clicks Dialog's Submit button, the form is not submitting. If I then click the forms submit button again, it submits. I am guessing this is a scope issue, I have seen some other posts about it but as yet have spent many hours with no luck. Any ideas on how to solve this? Javascript $(document).ready(function(){ var submitForm = $('#myform'); submit = false; $("#confirm").dialog({ resizable: false, height: 140, modal: true, autoOpen: false, buttons: { 'Submit': function() { $(this

how to develop yes no confirmation using jquery

我们两清 提交于 2019-11-30 18:40:22
How to develop confirmation dialog with yes no button using jquery or any other method ? I need that confirmation when I click on submit button. Use the native browser confirm dialog. if(confirm("Are you sure?")) { //Ok button pressed... } else { //Cancel button pressed... } I have a solution, it is working for me. $.alerts.okButton = ' Yes '; $.alerts.cancelButton = ' No '; jConfirm('Are you sure??', '', function(r) { if (r == true) { //Ok button pressed... } } This will give you both a native JS and jQuery version: function confirm_action( strMessage ) { strMessage = (typeof strMessage !==