bootstrap-modal

Protractor test a bootstrap modal - not angular page - timeout

北城余情 提交于 2019-12-01 08:38:46
I'm trying to UI test a bootstrap modal which has not used an angular plugin, it is a vanilla bootstrap modal. I get this error: Failed: Timed out waiting for asynchronous Angular tasks to finish after 11 seconds. This may be because the current page is not an Angular application. Please see the FAQ for more details: https://github.com/angular/protractor/blob/master/docs/timeouts.md#waiting-for-angular While waiting for element with locator - Locator: By(css selector, h2.modal-title)✗ Is there a workaround for this or is it not possible to test a vanilla bootstrap modal with protractor? Here

pass value to bootstrap modal form with django

匆匆过客 提交于 2019-12-01 01:43:33
When I use bootstrap modal for my form its only show first value. here my template.html {% for company in companys %} <tr> <td>{{ company.name }}</td> <td>{{ company.desc }}</td> <td align="center"> <button type="button" class="btn btn-warning margin-bottom" data-toggle="modal" data-target="#modal-default2"> delete </button> <div class="modal fade" id="modal-default2"> <div class="modal-dialog"> <form method="post" action="{% url 'system:company_delete' pk=company.pk %}"> {% csrf_token %} <div class="modal-content"> <div class="modal-body"> <input type="text" name="name" maxlength="100"

AngularJS Modal not showing up when templateUrl changes

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 01:36:41
So far, what I have is straight off the Angular UI example: Controller: var ModalDemoCtrl = function ($scope, $modal) { $scope.open = function () { var modalInstance = $modal.open({ templateUrl: 'myModalContent.html', controller: ModalInstanceCtrl }); }; }; var ModalInstanceCtrl = function ($scope, $modalInstance) { $scope.close = function () { $modalInstance.dismiss('cancel'); }; }; And this section, which is just in sitting in the .html for the whole page this modal is on. Html: <script type="text/ng-template" id="myModalContent.html"> <div class="modal-header"> <h3 class="modal-title">I'm a

pass value to bootstrap modal form with django

青春壹個敷衍的年華 提交于 2019-11-30 21:02:09
问题 When I use bootstrap modal for my form its only show first value. here my template.html {% for company in companys %} <tr> <td>{{ company.name }}</td> <td>{{ company.desc }}</td> <td align="center"> <button type="button" class="btn btn-warning margin-bottom" data-toggle="modal" data-target="#modal-default2"> delete </button> <div class="modal fade" id="modal-default2"> <div class="modal-dialog"> <form method="post" action="{% url 'system:company_delete' pk=company.pk %}"> {% csrf_token %}

Fullcalendar (Arshaw) - Adding an event with modal window

给你一囗甜甜゛ 提交于 2019-11-30 20:58:32
问题 I am working on arshaw calendar and I am really new to this. I want to be able to add event VIA modal window. Here are the screenshots of what I'm trying to do: In the image above, is my (Arshaw)Fullcalendar. The second image shows that when the user clicked on the calendar, say at 6am, the modal pops up and the user will now be able to add the event via modal. Here is my code: Javascript: //arshaw calendars $(document).ready(function () { // page is now ready, initialize the calendar... $('

Show bootbox alert in Typescript/Angular2? [closed]

假如想象 提交于 2019-11-30 20:54:38
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. vikas Step 1: Install bootbox via npm install bootbox --save Step 2: If you are using systemjs then include bootbox like: <script src="node_modules/bootbox/bootbox.js"></script> Step 3: Just put declare var bootbox:any; after import all libreries and before component decorator in your component ts file and then use normaly like bootbox.alert("Hello

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

余生长醉 提交于 2019-11-30 20:25:19
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="mergeFieldsModal" class="modal fade"> <div class="modal-dialog"> <div class="modal-content"> <div class

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

空扰寡人 提交于 2019-11-30 19:27:37
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="render_page" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="form

Bootstrap 3.0.0 modal events not firing

梦想与她 提交于 2019-11-30 17:14:07
I can't seem to get modal events working at all using Bootstrap 3. I want to perform an action when my modal closes, but nothing's happening. Here's my stripped back HTML: <button type="button" data-toggle="modal" data-target="#imageUpload">Launch modal</button> <div class="modal fade" id="imageUpload" tabindex="-1"> <div class="modal-dialog"> <div class="modal-content"> Upload form here </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> and my JS: $(function(){ $('#imageUpload').modal({ show: false }); $('#imageUpload').on('hidden', function () { window.alert('hidden event fired!');

Bootstrap 3.0.0 modal events not firing

☆樱花仙子☆ 提交于 2019-11-30 16:30:43
问题 I can't seem to get modal events working at all using Bootstrap 3. I want to perform an action when my modal closes, but nothing's happening. Here's my stripped back HTML: <button type="button" data-toggle="modal" data-target="#imageUpload">Launch modal</button> <div class="modal fade" id="imageUpload" tabindex="-1"> <div class="modal-dialog"> <div class="modal-content"> Upload form here </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> and my JS: $(function(){ $('#imageUpload')