|
@@ -1,56 +1,101 @@
|
|
|
- <div class="modal modal-slide-in sidebar-todo-modal fade modal_page" id="modal_page1">
|
|
|
- <div class="modal-dialog sidebar-lg">
|
|
|
- <div class="modal-content p-0">
|
|
|
- <div class="modal-header align-items-center mb-1">
|
|
|
- <h5 class="modal-title change-password-title" id="modal_page_title"></h5>
|
|
|
- <div class="todo-item-action d-flex align-items-center justify-content-between ms-auto">
|
|
|
- <i data-feather="x" class="cursor-pointer" data-bs-dismiss="modal" stroke-width="3"></i>
|
|
|
+<div class="modal fade" id="modal_page" aria-hidden="true" aria-labelledby="exampleModalLabel" tabindex="-1">
|
|
|
+ <div class="modal-dialog modal-lg">
|
|
|
+ <!-- Modal content-->
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title" id="exampleModalLabel"></h5>
|
|
|
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="modal-body flex-grow-1 pb-sm-0 pb-3" id="modal_page_body">
|
|
|
- </div>
|
|
|
+ <div class="modal-body"></div>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
-</div>
|
|
|
+</div>
|
|
|
+
|
|
|
|
|
|
+
|
|
|
+<script>
|
|
|
+//Start of jquery
|
|
|
+function wait_me(selector, config=null){
|
|
|
|
|
|
-{{-- <div class="apply-modal modal_page mt-2">
|
|
|
- <div class="apply-modal-content apply-animate-top apply-card-4 mb-4">
|
|
|
- <header class="container apply-teal mb-3 mt-4">
|
|
|
- <span class="w3-button w3-display-topright">×</span>
|
|
|
- <h5 class="mt-3 p-3" style="font-weight: bold;" id="modal_page_title"></h5>
|
|
|
- </header>
|
|
|
- <div id="modal_page_body">
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-</div> --}}
|
|
|
+ if(config){
|
|
|
|
|
|
+ selector.waitMe(config);
|
|
|
|
|
|
-@push('js')
|
|
|
-<script type="text/javascript">
|
|
|
-//Start of jquery
|
|
|
-$(function(){
|
|
|
+ }else{
|
|
|
|
|
|
- $('.open_modal_page').on('click', function(){
|
|
|
- let url=$(this).data('url');
|
|
|
-
|
|
|
- let title=$(this).data('title');
|
|
|
+ selector.waitMe({
|
|
|
+ effect: 'facebook',
|
|
|
+ //color: '#000',
|
|
|
+ text: 'Please! Wait ...'
|
|
|
+ });
|
|
|
|
|
|
- if(!title) title='Modal Form';
|
|
|
+ }
|
|
|
|
|
|
- $('#modal_page_title').html(title);
|
|
|
- $('.modal_page').modal({show:true});
|
|
|
+}
|
|
|
|
|
|
- $('#modal_page_body').load(url, null, function(){
|
|
|
- $('.tooltips').tooltip();
|
|
|
- });
|
|
|
+$(function(){
|
|
|
+
|
|
|
+ $('#modal_page').on('submit', '.ajax-form', function(event){
|
|
|
|
|
|
- });
|
|
|
+ event.preventDefault();
|
|
|
+ ajax_form(this, function(form){
|
|
|
+
|
|
|
+ var replace_content=$(form).find('input[name=replace_content]').val();
|
|
|
+
|
|
|
+ if(replace_content){
|
|
|
+
|
|
|
+ url=$(form).find("input[name='replace_content']").data('replace');
|
|
|
+
|
|
|
+ $(replace_content).waitMe({
|
|
|
+ effect: 'facebook',
|
|
|
+ text: 'Please! Wait ...'
|
|
|
+ });
|
|
|
+
|
|
|
+ $(replace_content).load(url, null, function(){
|
|
|
+
|
|
|
+ $(replace_content).waitMe('hide');
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#modal_page').modal('hide');
|
|
|
+
|
|
|
+ }else window.location.reload();
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ });
|
|
|
+ $(document).on('click', '.open_modal_page', function(){
|
|
|
+ let url=$(this).data('url');
|
|
|
+ let title=$(this).data('title');
|
|
|
+ if(!title) title='Modal Form';
|
|
|
+ $('.modal-title').html(title);
|
|
|
+ //$('#modal_page').modal({show:true});
|
|
|
+
|
|
|
+ let open_modal = new bootstrap.Modal('#modal_page', {
|
|
|
+ keyboard: false
|
|
|
+ });
|
|
|
+
|
|
|
+ open_modal.show();
|
|
|
+ $('.modal-body').load(url, null, function(){
|
|
|
+ $('.tooltips').tooltip();
|
|
|
+ });
|
|
|
+
|
|
|
+ });
|
|
|
|
|
|
$('.tooltips').tooltip();
|
|
|
+
|
|
|
+ $('#modal_page').on('show.bs.modal', function(e){
|
|
|
+ $('.modal-body').html("<h1 class='text-center mt-3'><i class='fa fa-refresh fa-spin fa-2x'></i></h1>");
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#modal_page').on('hidden.bs.modal', function (e){
|
|
|
+ $('.modal-body').empty();
|
|
|
+ });
|
|
|
+
|
|
|
|
|
|
|
|
|
});
|
|
|
//End of jquery
|
|
|
</script>
|
|
|
-@endpush
|
|
|
+
|