Commit 81a0a945c484815f27e2fbd8bab47e8cbfc6adcc
1 parent
2584aae7
Exists in
master
and in
5 other branches
resolvendo problemas de layout com o crud de link #453
Showing
5 changed files
with
7 additions
and
17 deletions
Show diff stats
courses/static/js/modal_category.js
... | ... | @@ -4,6 +4,7 @@ var Submite = { |
4 | 4 | $.post(url,dados, function(data){ |
5 | 5 | $(id_li_link).remove(); |
6 | 6 | $("#modal_remove_cat").empty(); |
7 | + $('body').removeClass('modal-open'); | |
7 | 8 | $(id_li_link).remove(); |
8 | 9 | $(".modal-backdrop.in").remove(); |
9 | 10 | alertify.success("Category removed successfully!"); |
... | ... | @@ -14,17 +15,3 @@ var Submite = { |
14 | 15 | }); |
15 | 16 | } |
16 | 17 | } |
17 | - | |
18 | -// var modal = { | |
19 | -// get: function (url, id_modal, id_div_modal){ | |
20 | -// $.get(url, function(data){ | |
21 | -// if($(id_modal).length){ | |
22 | -// $(id_div_modal).empty(); | |
23 | -// $(id_div_modal).append(data); | |
24 | -// } else { | |
25 | -// $(id_div_modal).append(data); | |
26 | -// } | |
27 | -// $(id_modal).modal('show'); | |
28 | -// }); | |
29 | -// } | |
30 | -// }; | ... | ... |
links/templates/links/create_link.html
... | ... | @@ -46,6 +46,7 @@ |
46 | 46 | <script type="text/javascript"> |
47 | 47 | $("#form-link").submit(function(event) { |
48 | 48 | $("#createLinksModal").modal("hide"); |
49 | + $('body').removeClass('modal-open'); | |
49 | 50 | var data = new FormData($('#form-link').get(0)); |
50 | 51 | $.ajax({ |
51 | 52 | url: "{% url 'course:links:create_link' topic.slug %}", | ... | ... |
links/templates/links/delete_link.html
... | ... | @@ -41,6 +41,8 @@ |
41 | 41 | $("#form-delete-link").submit(function(event) { |
42 | 42 | var data = new FormData($('#form-delete-link').get(0)); |
43 | 43 | $('#linkDeleteModal').modal('hide'); |
44 | + $('body').removeClass('modal-open'); | |
45 | + $("div.modal-backdrop.fade.in").remove(); | |
44 | 46 | $.ajax({ |
45 | 47 | url: "{% url 'course:links:delete_link' link.slug %}", |
46 | 48 | type: $("#form-delete-link").attr('method'), |
... | ... | @@ -56,7 +58,6 @@ |
56 | 58 | alertify.success(" {% trans 'Link successfully deleted!' %} "); |
57 | 59 | }, |
58 | 60 | error: function(data){ |
59 | - $("div.modal-backdrop.fade.in").remove(); | |
60 | 61 | $('#requisicoes_ajax').empty(); |
61 | 62 | $('#requisicoes_ajax').append(data.responseText); |
62 | 63 | $('#linkDeleteModal').modal('show'); | ... | ... |
links/templates/links/update_link.html
... | ... | @@ -51,6 +51,7 @@ |
51 | 51 | <script type="text/javascript"> |
52 | 52 | $("#form-update-link").submit(function(event) { |
53 | 53 | $('#linksModalEdit').modal('hide'); |
54 | + $('body').removeClass('modal-open'); | |
54 | 55 | var data = new FormData($('#form-update-link').get(0)); |
55 | 56 | $.ajax({ |
56 | 57 | url: "{% url 'course:links:update_link' link.slug %}", | ... | ... |
links/templates/links/view_link.html
1 | 1 | {% load static i18n list_topic_foruns permission_tags %} |
2 | 2 | <!--MODAL VIEW LINK--> |
3 | -<div class="modal fade" data-backdrop="false" id="viewLinkModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | |
3 | +<div class="modal fade" id="viewLinkModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | |
4 | 4 | <div class="modal-dialog" role="document"> |
5 | 5 | <div class="modal-content"> |
6 | 6 | <div class="modal-header"> |
... | ... | @@ -24,5 +24,5 @@ |
24 | 24 | </div> |
25 | 25 | <!-- EndModal --> |
26 | 26 | <script type="text/javascript"> |
27 | -$('.modal-backdrop').remove(); | |
27 | +// $('.modal-backdrop').remove(); | |
28 | 28 | </script> | ... | ... |