modal-dialog

Cannot close ng-bootstrap Modal

早过忘川 提交于 2019-12-09 03:18:35
问题 So I have a NgbModal with a form in it, and what I want to achieve is closing it on successful submit. This is my ModalComponent: @Component({ selector: 'create-update-transaction', templateUrl: './CreateOrUpdateTransaction.html', providers: [AccountTransactionsService] }) export class CreateOrUpdateTransactionComponent { closeResult: string; modalRef: NgbModalRef; @Input() transaction: Transaction = new Transaction(); @Output() onSubmit: EventEmitter<void> = new EventEmitter<void>();

Is it possible to use “rows” and “spans” inside modals in Twitter Bootstrap?

眉间皱痕 提交于 2019-12-09 03:06:47
问题 I'm trying to use the modals within Twitter Bootstrap to implement a contact form. Ideally I would like the first two fieldsets to align next to each other and the third fieldset (containing a textarea and a submit button) to occupy the full width of the modal. I have tried to use rows and spans to make them play nicely but am not sure on the way to go about this. It seems like there isn't a total of span12 to start with. Has anyone else achieved anything similar? 回答1: Yes, just put it inside

Best practice for calling the NgbModal open method

天涯浪子 提交于 2019-12-09 02:56:13
问题 Toying around with the NgbModal and want to trigger the open method -> open(content: string | TemplateRef<any>, options: NgbModalOptions) <- from somewhere else than the template code. In my case case I want to pass a string as a parameter when running the method in the .ts file of my component. When running the method via a button in the html file like so: <button (click)="open(content)">Launch demo modal</button> , the code works great, of course with all the code from within the <template>

How to display fancybox title only on image hover

落花浮王杯 提交于 2019-12-09 01:45:02
问题 I'm using the Fancybox plugin for an image gallery, and I want to display the image titles only when the user hovers over the image. I cannot figure out what part of the code to modify in order to accomplish this. I've tried editing the CSS by adding a :hover state to the following: .fancybox-title-over-wrap { } and I've even tried playing with the CSS visibility settings here: .fancybox-opened .fancybox-title { } However, I've had no luck. Must I change something within the actual JS file?

AngularJS - Go to previous/next modal

扶醉桌前 提交于 2019-12-08 17:22:46
问题 I am building an application with angular where I have a list of items (using ng-repeat), and by clicking on each item I can open a modal in order to see a more detailed description. Right now in order to switch to another modal I have to close the previous one, go to the list, and click to open another modal. I would like to go directly to the previous/next modal when clicking the previous/next button. I have made an example of what I want to achieve. Here is the html: <div ng-app="myApp" ng

I have event duplication after action was moved in store object

六月ゝ 毕业季﹏ 提交于 2019-12-08 15:41:07
问题 In my laravel 5.8 / vue 2.5.17 / vuex^3.1.0 I have a problem that with dialog opened I have event duplication. I have an event for item deletion : In my vue file: ... mounted() { bus.$on('dialog_confirmed', (paramsArray) => { if (paramsArray.key == this.deleteFromUserListsKey(paramsArray.user_list_id)) { this.runDeleteFromUserLists(paramsArray.user_list_id, paramsArray.index); } }) bus.$on('onUserListDeleteSuccess', (response) => { this.is_page_updating = false this.showPopupMessage("User

Refresh parent page after closing modal

♀尐吖头ヾ 提交于 2019-12-08 15:29:28
问题 When a user opens this modal, they can see their shopping cart information and delete items(other jquery) on the modal. But how could I refresh the parent page after a user closes up the modal? I read several posts but did not find any useful information for my situation. I know I need to use something like window.location.reload(true); Where should I put that in the code? $(function(){ $('#main').off('click.login').on('click.login',function(){ $('body').loadmodal({ id:'cart', title:'Shopping

Angular UI Bootstrap Modal - how to prevent user interaction

戏子无情 提交于 2019-12-08 14:32:23
问题 In my current usecase, I am trying to use angular-ui modal window to show the progress of calculations that we do in a background process which we disable on completion. All works well. I just want to disable user from clicking any of element in background. Any idea how can we do this? 回答1: You can pass the following options, when opening a modal window, to prevent users from closing the window: backdrop: 'static' - top prevent users from closing a modal on backdrop click keyboard: false - so

Sometimes GTK modal dialogs are not modal — bug or feature?

心已入冬 提交于 2019-12-08 14:26:07
问题 When I create a custom dialog in GTK ( both, GTK2 or GTK3 ) and set it to be modal, all input to other windows of my application is ignored. This works nearly always, but it fails under certain conditions. When I add a ScrolledWindow containing a TreeView to my dialog, it still works as supposed. But if I fill the TreeView with entries until the ScrolledWindow starts to display its scroll bars --- the modality is suddenly lost and I can click on my other windows! Here is the most basic

Calling method is coming back undefined

我是研究僧i 提交于 2019-12-08 13:54:04
问题 var ModalEffects = function(){ function init() { var overlay = document.querySelector( '.md-overlay' ); [].slice.call( document.querySelectorAll( '.md-trigger' ) ).forEach( function( el, i ) { var modal = document.querySelector( '#' + el.getAttribute( 'data-modal' ) ), close = modal.querySelector( '.md-close' ); function removeModal( hasPerspective ) { classie.remove( modal, 'md-show' ); if( hasPerspective ) { classie.remove( document.documentElement, 'md-perspective' ); } } function