问题描述
我正在尝试在正在进行的项目中设置Bootstrap 5,现在将ZeptoJS用于AJAX和某些DOM控制。
我的主要问题是这个,此代码在BS4上能正常工作:
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/E-wave112/myadmissionportalsite2.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g.,'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
它是我在项目上使用的任何形式的通用模态响应者。但是我无法在BS5上调用该模式。
IE:如果我正在发送电子邮件,则电子邮件已发送,页面上会按预期重新加载,但是没有状态/响应模态的信号。
有时我需要使用其他一些模式来打开和关闭它,所有这些模式都遵循相同的结构,对我来说就像一个魅力。
欢迎任何帮助!
编辑
我能够使它像这样工作,但是看起来不正确:
$(document).on('submit','.form-response',function(e)
{
e.preventDefault();
// -------------------------
var dataForm = $(this).serialize();
// -------------------------
$.ajax({
type: 'post',url: $(this).attr('action'),data: dataForm,beforeSend: function()
{
$('.form-contact').find(':input',':textarea',':button').prop('disabled',true);
// -------------------------
if(!$('.modal-response').length)
{
$('body').append('<div class="modal fade modal-response" tabindex="-1"><div class="modal-dialog modal-dialog-centered"><div class="modal-content"><div class="modal-body"><div class="media align-items-center"><div class="media-icon"></div><div class="media-body ml-2"></div></div></div></div></div></div>');
}
// -------------------------
$('.modal-body .media-icon').html('<i class="fas fa-spinner fa-spin fa-fw fa-2x text-blue"></i>');
$('.modal-body .media-body').html('Processando...');
// -------------------------
$('.modal-response').modal('show');
},success: function(response)
{
$('.modal-body .media-icon').html('<i class="fas fa-check-circle fa-fw fa-2x text-success"></i>');
$('.modal-body .media-body').html(response);
// -------------------------
setTimeout(function(){window.location.reload(true);},3000);
},error: function(data)
{
$('.form-contact').find(':input',false);
// -------------------------
$('.modal-body .media-icon').html('<i class="fas fa-exclamation-circle fa-fw fa-2x text-danger"></i>');
// -------------------------
if(data.responseText !== '')
{$('.modal-body .media-body').html(data.responseText);}
else
{$('.modal-body .media-body').html('Houve um erro desconhecido');}
}
})
});
有什么建议吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)