modal-dialog

Set bootstrap modal body height by percentage

妖精的绣舞 提交于 2019-12-02 17:31:53
I am trying to make a modal with a body that will scroll when the content becomes too large. However, I want the modal to be responsive to the screen size. When I set the max-height to 40% it has no effect. However, if I set the max-height to 400px it works as expected, but is not responsive. I am sure I am just missing something simple, but I can't seem to get it to work. Here is an example Doesn't work: .modal-body { max-height:40%; overflow-y: auto; } Works: .modal-body { max-height:400px; overflow-y: auto; } This worked for me .modal-dialog, .modal-content { /* 80% of window height */

make bootstrap twitter dialog modal draggable

社会主义新天地 提交于 2019-12-02 17:25:42
I'm trying to make bootstrap twitter dialog modal draggable with this jquery plugin: http://threedubmedia.com/code/event/drag#demos but it doesn't work. var $div = $('html'); console.debug($('.drag')); $('#modalTest') .drag("start", function(ev, dd) { dd.limit = $div.offset(); dd.limit.bottom = dd.limit.top + $div.outerHeight() - $(this).outerHeight(); dd.limit.right = dd.limit.left + $div.outerWidth() - $(this).outerWidth(); }) .drag(function(ev, dd) { $(this).css({ top: Math.min(dd.limit.bottom, Math.max(dd.limit.top, dd.offsetY)) , left: Math.min(dd.limit.right, Math.max(dd.limit.left, dd

Open remote content in the Bootstrap modal window

拜拜、爱过 提交于 2019-12-02 17:13:09
All I need is a simple example in how to open a remote content into a Twitter Bootstrap modal window. I'm using Bootstrap v2.0.4 and I just can't get it to work. I can open regular modal windows, but I can't make it open a remote file inside it. merv First, remote data must fulfill the same origin policy. If you're not satisfying that, everything after this is going to fail (if you are trying to load external URL's, see Twitter Bootstrap external URL's are not working ). There are two ways to accomplish loading remote content into a modal with the Bootstrap data-api. Namely to either specify

Tips on NSApp’s ModalForWindow, NSAlert’s ModalForWindow, and ModalSession [closed]

荒凉一梦 提交于 2019-12-02 17:07:31
It took me quite a bit of experimentation to clear up some confusion over Objective-C’s “ModalForWindow” language and, subsequently, how to use a modal session. Maybe the following tips will save somebody some time: (In case you’re new to the concept: When a window, usually a panel, runs modal, it prevents some other part of the app from responding until it has been dismissed.) “ModalForWindow” means different things in different circumstances. If you are using loadNibNamed to display a panel defined by a xib and you want it to run modal, call this once it is displayed: // Make

iPhone Modal View Smaller that the screen

梦想的初衷 提交于 2019-12-02 16:52:21
I'm trying to do something that shouldn't be that complicated, but I can't figure it out. I have a UIViewController displaying a UITableView. I want to present a context menu when the user press on a row. I want this to be a semi-transparent view with labels and buttons. I could use an AlertView, but I want full control on the format of the labels and buttons and will like to use Interface Builder. So I created my small view 250x290, set the alpha to .75 and create a view controller with the outlets to handle the different user events. Now I want to present it. If I use

Rxjs subscribe method being ignored

梦想的初衷 提交于 2019-12-02 16:45:22
问题 BEFORE tagging it as a duplicate, note that None of these worked for me: question 1 / question 2 / question 3 So, after getting a reply to a previous question I started using rxjs following everything stated on the guide I was provided with However, I soon got stuck again for the last couple of hours because of the subscribe method not being triggered. I've coded my service like: import { Injectable } from '@angular/core'; import { Subject } from 'rxjs/Subject'; import {FormDTO} from "../dto

Popup/modal picker for a text field in iOS 7

泄露秘密 提交于 2019-12-02 15:32:59
I am having a lot of trouble figuring out how to implement a standard popup picker. Like many apps' registration screen when a user selects the birthday text field I'd like a popup picker to appear so that users can select their birthday, click done and the formatted date will be added to the text field. This doesn't seem like it should be all that hard, yet it seems there is no simple, clear, standard way of doing this in iOS 7. I've searched the internet and seen some saying to use modals, others say actionsheets, others say popups and still others say a separate view controller. Can anyone

How can I use UIModalTransitionStylePartialCurl on a UIView that does NOT take up the whole screen?

社会主义新天地 提交于 2019-12-02 15:12:18
In Apple's official Maps app for the iPhone, there is a small 'page curl' button in the lower-right corner. When you press it, the map itself peels back to reveal some options. I would like to duplicate this effect in my own app. I'm trying to use UIModalTransitionStylePartialCurl (Added in SDK 3.2). In terms of its layout, my app resembles Apple's official Maps app almost exactly. I can easily get the ENTIRE screen to peel back, revealing another view underneath, but I don't want this. I want ONLY the map view to peel back. In order to create this effect, you must have a UIViewController that

iOS - How to check if a modal view is present

空扰寡人 提交于 2019-12-02 14:27:20
Is there a way to check if a modal view is present? I'd like to run a method only if a modal view is present. Also, if I have multiple modal views, is there a way to check if a certain modal view is present. I use the following code to present and dismiss modal views: [self presentModalViewController:myModalView animated:YES]; [self dismissModalViewControllerAnimated:YES]; Thank you in advance! Cheers, Evan PS. My modal view has a view controller, but I'd like to check if the modal view is present from a separate class that is running asynchronously. Are you checking the presence of a modal

How to pass checkbox id to the modal box? [duplicate]

纵饮孤独 提交于 2019-12-02 13:33:14
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: How to checkbox id to the modal box? I have a table which each row have a checkbox and a button. whenever the button is pressed, a modal box will appear and at the same time the checkbox will get checked as well. The modal box will as ask user if want to delete particular record. If Yes, the form will be submitted. If No, the checkbox will be unchecked. I am facing issue with getting the checkbox unchecked.