modal-dialog

TinyMCE API v4 windowManager.open - What widgets can I configure for the body option?

非 Y 不嫁゛ 提交于 2019-11-29 19:06:05
I would like to fill the body of a modal dialog with custom HTML, generated by Javascript. The documentation for this method is mostly empty. I have only found examples for loading an external file or adding a textbox . Is there a documentation for the available types? More specifically, is there a type to add general markup to the body of a dialog from a Javascript variable? After I beautified the minified version of tinymce, i found that these may be some of the body types for windowManager.open. I'm not sure how to use them all, as all this info was gathered through trial and fail. Since

How to jump to top of browser page

浪尽此生 提交于 2019-11-29 18:43:14
I'm writing a modal popup and I need the browser to jump to the top of the screen when the open modal button is pressed. Is there a way to scroll the browser to the top using jQuery? Nick Craver You can set the scrollTop , like this: $('html,body').scrollTop(0); Or if you want a little animation instead of a snap to the top: $('html, body').animate({ scrollTop: 0 }, 'fast'); Ionuț Staicu Without animation, you can use plain JS: scroll(0,0) With animation, check Nick's answer . If you're using jQuery UI dialog, you could just style the modal to appear with the position fixed in the window so it

How can I unfocus the modal trigger button after closing the modal in bootstrap

坚强是说给别人听的谎言 提交于 2019-11-29 18:24:17
问题 I can't seem to blur the button after closing the modal. $('#exampleModal').on('hidden.bs.modal', function(e){ $('button').blur(); }); I've tried the above and it still doesn't seem to blur it. I've tried almost everything. The only solution is to set a timeout and blur it after the model finishes the hidden transition. Any better solution? 回答1: The focus back to the trigger element is set within the modal plugin using a .one() binding, which unfortunately cannot be unbound. The good news is

bound event handler not firing modal dialog button click

戏子无情 提交于 2019-11-29 17:59:12
I have a scenario that to me sounds just like this SO post and others who have asked similar....only I'm not understanding what others have gotten from these post as my implementation is partially failing. Basically I have a page with a button for adding a new record. Click add button and a modal dialog opens. The modal dialog is a different view than the parent page with of course the fields needed for creating the record. Clicking save (remember save is a button on the modal I want my save event to fire but it never does...nor do I get any errors reported in dev tools or fiddler. Here is the

Add content of showModalDialog() to the clipboard Google Script

霸气de小男生 提交于 2019-11-29 17:44:20
I have formatted data being added to a Modal Dialog when I click a button I want to the content of the showModalDialog() to be automatically added to the clipboard when I click the button as well The modal is being generated with the below code, and temp is the output I want added to the clipboard //Output to Html var htmlOutput = HtmlService .createHtmlOutput(temp) .setSandboxMode(HtmlService.SandboxMode.IFRAME) .setWidth(600) .setHeight(500); SpreadsheetApp.getUi().showModalDialog(htmlOutput, 'Filter OptionList Maker'); Edit; Ok, I guess maybe the Modal Dialog might be beside-the-point and

Show modal dialog with 'x' without using jqueryui

…衆ロ難τιáo~ 提交于 2019-11-29 17:29:54
looking for a very simple implementation of modal dialog box without using jquery UI. just for example <div class="modal" id="something" style="display: none;"> <div class "titlebar"> <h4>title</hr> <a href="#" >xx</a> </div> <div class=content></div> <div class=footer></div> </div> When user click on the button I want to show dialog and close when user pres 'xx'. I saw some example but it has many extras. I am looking for somethig like click of button show dialog it shoud stay there till user clicks on 'x' no jqueryui. any simple example will be great. I think you're looking for something

Angular UI Bootstrap Modal Dialog Close Event

谁都会走 提交于 2019-11-29 17:26:54
问题 How do I detect when an Angular UI Bootstrap modal dialog is closed? I need to know when the dialog closes so I can broadcast a loginCancelled event using the angular-http-auth library to prevent my Angular UI from hanging, especially after closing the modal via clicking on the backdrop. 回答1: This works for clicking on the backdrop and pressing the esc key if you are opting in on that. var modalInstance = $modal.open({ templateUrl: '/app/yourtemplate.html', controller: ModalInstanceCtrl,

Angular 2 modals shared between components

假装没事ソ 提交于 2019-11-29 17:01:32
I have a typical Angular 2 app with many components. I installed this modal component: https://github.com/pleerock/ng2-modal . Is there a way to share the same modals between more components? I explain better. I would like the same modal should open on click of different buttons inside different components. Is it possible? I tried this kind of approach https://plnkr.co/edit/RgI1e9PobC7FloLHpEFD?p=preview but it's not the right way, because it always adds content to the modal. I post it here below my app.ts file: 21/12/2016 update Following @echonax suggestion, I updated my plunk: //our root

modal view controller not calling presenting view controller's dismissModalViewControllerAnimated: method

烈酒焚心 提交于 2019-11-29 16:48:19
In my modal view controller I have a button handling method that includes [self dismissModalViewControllerAnimated: YES]; In the presenting view controller I override dismissModalViewControllerAnimated: as follows: -(void) dismissModalViewControllerAnimated: (BOOL)animated { NSLog(@"dismiss"); [super dismissModalViewControllerAnimated: animated]; } When the button is touched, the button handling method gets called, but the dismissModalViewControllerAnimated: override does not seem to get called: the NSLog(@"dismiss"); statement isn't called, and a breakpoint inside the method doesn't get hit.

Why does modal-form disappear completely when minimized?

守給你的承諾、 提交于 2019-11-29 16:42:01
I'm trying to have the owner-form minimize when the modal-form is minimized. But when I minimize the modal-form – it disappears completely. (- I can click on the owner-form.) How do I solve this? I have: public partial class Form1 : Form { Form2 frm2 = new Form2(); public Form1() { InitializeComponent(); frm2.Owner = this; } private void button1_Click(object sender, EventArgs e) { frm2.ShowDialog(); } } And: class Form2 : Form { Form1 frm1; FormWindowState ws = new FormWindowState(); public Form2() { SizeChanged += new EventHandler(Form2_SizeChanged); } void Form2_SizeChanged(object sender,