bootbox

Bootbox ASP MVC Razor partial view?

守給你的承諾、 提交于 2020-01-25 18:01:49
问题 I am using bootbox widget to display bootstrap modal. http://bootboxjs.com/examples.html What i need is to load Razor partial view in bootbox modal This works ok $(".permissions-popup").click(function () { bootbox.dialog({ title: "Icons description.", message: '<div class="alert">Hello</div>', buttons: { main: { label: "Close", className: "btn-primary", callback: function () { } } }, className: "modal-large" } ); }); But when i try something like this $(".permissions-popup").click(function ()

Bootbox ASP MVC Razor partial view?

北城余情 提交于 2020-01-25 18:01:35
问题 I am using bootbox widget to display bootstrap modal. http://bootboxjs.com/examples.html What i need is to load Razor partial view in bootbox modal This works ok $(".permissions-popup").click(function () { bootbox.dialog({ title: "Icons description.", message: '<div class="alert">Hello</div>', buttons: { main: { label: "Close", className: "btn-primary", callback: function () { } } }, className: "modal-large" } ); }); But when i try something like this $(".permissions-popup").click(function ()

Bootbox ASP MVC Razor partial view?

夙愿已清 提交于 2020-01-25 18:01:06
问题 I am using bootbox widget to display bootstrap modal. http://bootboxjs.com/examples.html What i need is to load Razor partial view in bootbox modal This works ok $(".permissions-popup").click(function () { bootbox.dialog({ title: "Icons description.", message: '<div class="alert">Hello</div>', buttons: { main: { label: "Close", className: "btn-primary", callback: function () { } } }, className: "modal-large" } ); }); But when i try something like this $(".permissions-popup").click(function ()

X-editable with confirmation prompt using bootbox.js

可紊 提交于 2020-01-17 03:44:31
问题 I'm trying to add a confirm prompt into x-editable plugin. If I add using a normal javascript, it works. However, if I try to implement bootbox plugin, it fails. Below is an example of using a normal javascript that works. if(!confirm("Are you sure you wish to proceed?")){ $('#name2').editable('toggle'); return "invalid"; } But if I add bootbox plugin like the example below, it fails to work. It actually change the value before the confirmation. bootbox.confirm("Are you sure you want to

Bootbox, two modal windows - one above another

随声附和 提交于 2020-01-04 13:48:57
问题 I have two bootbox modal windows - parent and child. If user enters wrong data and try to save the parent modal window, the child window appears. The problem is - when the child window appears, it's still possible to click on the parent modal window buttons. How can I fix it? The parent window controls must be disabled when the child modal opened. Thanks a lot, Michael 回答1: Nice! Thanks a lot! But solution is more simple.. I changed the z-index of the above window. Example: z-index of the

Bootbox, two modal windows - one above another

半城伤御伤魂 提交于 2020-01-04 13:48:09
问题 I have two bootbox modal windows - parent and child. If user enters wrong data and try to save the parent modal window, the child window appears. The problem is - when the child window appears, it's still possible to click on the parent modal window buttons. How can I fix it? The parent window controls must be disabled when the child modal opened. Thanks a lot, Michael 回答1: Nice! Thanks a lot! But solution is more simple.. I changed the z-index of the above window. Example: z-index of the

How to select a button inside a form tag with javascript?

杀马特。学长 韩版系。学妹 提交于 2019-12-25 16:47:54
问题 I am trying to make a confirmation message popup when submitting a form using the bootbox plugin. The problem is that I don't know how to select the button inside the form tag. In the example below the confirmation message does work for the button outside the form tag but not for the one inside. How do I select this button wrapped inside the form tag? <div class="bs-example"> <div class="col-md-4 col-md-offset-4"> <form action="#" method="POST"> <div class="form-group"> <input type="username"

Bootbox not is not showing pop up modal

喜你入骨 提交于 2019-12-25 03:22:23
问题 I have downloaded bootbox.js in my project and implemented this code to show the pop up modal dialog but nothing errors or success result is printed in my console.I am getting confusing where the error is generated. Js file $('switch input[type="checkbox"]').on('change',function(){ var checkbox=$(this); var checked=checkbox.prop('checked'); var dMsg=(checked)? 'You want to activate the product': 'You want to deactivate the product'; var value=checkbox.prop('value'); bootbox.confirm({ size:

Can't get ui-grid to work in bootbox custom dialog

可紊 提交于 2019-12-24 13:37:21
问题 I'm using AngularJS, UI-Grid (http://ui-grid.info/), and Bootbox for a project. What I'd like to do is have the user click a button on the screen, and bring up a dialog box where they select an item from a UI-Grid table. I put together the simplest example I could make: http://plnkr.co/edit/YvsiAQhUrNqnSse1O0oh?p=preview In this, I generate the dialog box HTML like this: var tplCrop = '<div ng-controller="MyTableDialogCtrl">{{ someText }}' + '<div ui-grid="gridOptions" ui-grid-pagination

Bootbox.prompt() set focus on text field

巧了我就是萌 提交于 2019-12-24 02:17:29
问题 I can't seem to set the focus on Bootbox's textfield automatically. here's my code: function setCode(myCode){ bootbox.confirm("Enter your PIN: <input id='pin_code' type='password' name='pin_code'></input>", function(result) { if(result) console.log($("#pin_code").val()); }); $("#pin_code").focus(); }; Perhaps something about bootbox's code is getting in the way? 回答1: You can register a shown event handler that sets the focus (as suggested by @Shiny). However, as of Bootstrap 3 and Bootbox v4