Every line of 'open bootstrap modal using javascript' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
201 _showModal() { 202 const modalElement = this.shadowRoot.querySelector('.modal'); 203 modalElement.style.setProperty('--bs-modal-display', 'block'); 204 window.getComputedStyle(modalElement).display; 205 modalElement.style.opacity = '1'; 206 }
29 function showModalAlert(titleText, messageText, okButtonText, bootstrapContextualColor) { 30 const modal = bootbox.dialog({ 31 title: titleText, 32 message: messageText, 33 show: false, 34 buttons: { 35 okay: { 36 label: okButtonText || DEFAULT_OK_TEXT, 37 className: `modal-btn-ok btn-${bootstrapContextualColor || BootstrapContextualColors.DEFAULT}`, 38 }, 39 }, 40 }); 41 applyStyleToModal(modal, bootstrapContextualColor); 42 43 modal.modal('show'); 44 }
14 function open(title, ev, content) { 15 var alert = $mdDialog.alert() 16 .clickOutsideToClose(true) 17 .title(title) 18 .ok($filter('translate')('Confirm')) 19 .targetEvent(ev); 20 if (content) { 21 alert.htmlContent(content); 22 } 23 var dialog = $mdDialog.show(alert); 24 return dialog; 25 }
7 export function openModal(title, content) { 8 return { 9 type: 'MODAL_OPENED', 10 title, 11 content, 12 }; 13 }
43 function openModal() { 44 $('.login.ui.modal') 45 .modal({ 46 detachable: false, 47 closable: false, 48 transition: 'vertical flip' 49 }) 50 .modal('show') 51 ; 52 }
53 closeModal(){ 54 this.props.closeModal() 55 }
208 _handleModalClick() { 209 if(this.opened) { 210 this.close(); 211 } 212 }
121 open(): void { 122 if (this._open === true) { 123 return; 124 } 125 this._open = true; 126 this._openChanged.emit(true); 127 }
25 open() { 26 this.modalRef && this.modalRef.classList.add('modal-custom-show'); 27 }
378 openModal(url, width = 200, height = 200) { 379 let webPreferences = { 380 zoomFactor: 1.0 381 }; 382 let options = { 383 width: width, 384 height: height, 385 resizable: false, 386 title: "Image", 387 webPreferences: webPreferences 388 }; 389 let win = new this.BrowserWindow(options); 390 win.on('closed', () => { 391 win = null; 392 }); 393 let fileUrl = `file://${dirname}/modal.html?url=${url}&width=${width}&height=${height}`; 394 win.loadURL(fileUrl); 395 win.show(); 396 }