bootstrap-modal

AngularJS $modalInstance - Can i do this in one controller?

[亡魂溺海] 提交于 2019-11-30 13:07:51
问题 I've spent some time having a play with the AngularJS Bootstrap popup, and for intents it's working great, but what i'd like to do is bind it, and it's dependant script to the same controller, what i can't get working is the close button now though. If i create a NEW controller, and inject $modalInstance it works great and i can wireup the close button without any issues at all, but i don't want a second controller, it seems to be over complication: i want all my controller logic in the

Modal width (increase)

亡梦爱人 提交于 2019-11-30 11:34:58
问题 I want a modal to be 80% or so of a screen width. modal-lg isn't large enough. This: .modal .modal-dialog { width: 80%; } Doesn't work with Bootstrap 4. 回答1: Bootstrap 3 You can create or just override default bootstrap modal-lg by doing below: .modal-lg { max-width: 80%; } If not working just add !important so it would look like below .modal-lg { max-width: 80% !important; } Now call the modal-lg . <div class="modal-dialog modal-lg" role="document"> <!-- some modal content ---> </div For

How to automatically close the bootstrap modal dialog after a minute

六眼飞鱼酱① 提交于 2019-11-30 07:31:53
I am using the bootstrap modal in one of my project. I'm using the timer functions for automatically showing the bootstrap modal. If the user doesn't close the bootstrap modal for a minute. Then its automatically needs to close the bootstrap modal. How to set the timer for closing the bootstrap modal automatically? Please kindly help me to solve this issue. Thanks in Advance :) var mins; var secs; function cd() { mins = 1 * m(""); secs = 0 + s(":"); // change seconds here (always add an additional second to your total) console.log(mins); console.log(secs); redo(); } function m(obj) { for(var i

Angular 2 - Open/Close default bootstrap modal

你。 提交于 2019-11-30 06:47:14
I do not want to use angular2-bootstrap or ng2-bs3-modal as suggested in the questions/answers Angular 2 Bootstrap Modal and Angular 2.0 and Modal Dialog Now. I know what opens and closes the bootstrap modal. The display is toggled between display: none; and display: block; An attribute toggles on the div between aria-hidden="true" and aria-hidden="false So, naturally I thought that if I bound to the aria-hidden attribute like so [aria-hidden]="true" , that I could manipulate it. Sadly though, I cannot bind to aria-hidden since it isn't a known property of div . (note, attr.aria-hidden doesn't

AngularJS passing data to bootstrap modal

一个人想着一个人 提交于 2019-11-30 06:23:18
问题 I think I'm missing something but cannot figure what. Basically I'm trying to pass an object to the modal like below, but instead of getting the passed object I gets null...so I think is a problem with the scope but I'm new in Angular and need some help. Controller app.controller("musicViewModel", function ($scope, $http, $location, $uibModal, $log) { $scope.selected = null; $scope.open = function (item) { $scope.selected = item; $log.info('Open' + $scope.selected); // get right passes object

Using *just* Bootstrap modal

梦想与她 提交于 2019-11-30 06:16:12
问题 I'm integrating my Modal from Bootstrap with another site that doesn't use it. I see that bootstrap lets you separate the Javascript for each component. But what about the CSS? If I link to bootstrap.css the whole site will change. I just want enough CSS for the Modal to work. (I tried going thru the CSS file and just guessing what I needed, but it didn't work). 回答1: Update as of Bootstrap v3.2.5 Thanks to @Gruber for confirmation as of v3.2.5. The link is still here , to customize the setup

Show bootbox alert in Typescript/Angular2? [closed]

无人久伴 提交于 2019-11-30 05:39:58
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I want to use Bootbox in my Angular2 project. I searched a lot but there is no any relevant solution for me. I also tried angular2-modal but there were many issues while using angular2-modal , please suggest any good doc/Examples/Demos for the same. 回答1: Step 1: Install bootbox via npm install bootbox --save

AngularJS $modalInstance - Can i do this in one controller?

北战南征 提交于 2019-11-30 05:28:04
I've spent some time having a play with the AngularJS Bootstrap popup, and for intents it's working great, but what i'd like to do is bind it, and it's dependant script to the same controller, what i can't get working is the close button now though. If i create a NEW controller, and inject $modalInstance it works great and i can wireup the close button without any issues at all, but i don't want a second controller, it seems to be over complication: i want all my controller logic in the formController really. Why would i actually want two controllers? Passing the scope between two controllers

Why I'm getting more than one on click event fire inside bootstrap modal

ぐ巨炮叔叔 提交于 2019-11-30 04:28:39
问题 I'm getting some problem here and need some help. I think this is easy but I just can't figure it out myself what's happening. Please see fiddle below: Fiddle When I only open the modal and clicks it for the first time. It works normally, but when I reopened it, there goes the problem. It fires the on click event more than once. HTML <button data-target="#mergeFieldsModal" data-toggle="modal" data-message-id="#message" class="btn btn-info">Open Modal</button> <div id="result"></div> <div id=

show modal after form submission until next page loads… does not work on safari?

荒凉一梦 提交于 2019-11-30 03:50:05
问题 I have a button like this <form action="/category" method='GET'> <button type="submit" class="btn btn-default render"> name </button> </form> and I have some javascript which starts a modal whenever the button gets clicked... this is just to let the user know that the next page is loading. <script type='text/javascript'> $(document).ready(function(){ $(".render").click(function(evt){ $('#render_page').modal('show'); }); }); </script> Here is the html for the modal <div class="modal fade" id=