有没有人遇到过这样的问题:应用程序中的链接完全适用于Linux浏览器而不适用于Windows浏览器?
我有一个模态,有两个按钮,一个是通向另一个页面,另一个是关闭模态。在Chromium的Linux环境中,新路由的按钮正在工作,但是当尝试在Windows上(在Internet Explorer或Firefox中)执行相同的操作时,它无法正常工作。单击按钮时没有任何反应。另一方面,关闭模态工作正常。
关于这个问题的任何想法?
更新
{% if not item.archived %}
<a href= "#archiveModal{{ item.id }}" data-toggle="modal" class="fa fa-folder" data-placement="top" title="Archive"></i></a>
<div id="archiveModal{{ item.id }}" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3 class="modal-title" id="myModalLabel">Are you sure?</h3>
</div>
<div class="modal-body">
<p>Do you really want to archive this document?</p>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal">
Go Back
</button>
<button type="button" class="btn btn btn-warning">
<a href="{{ path('documentBundle_document_archive', {'id':item.id}) }}" style="color: #FEFEFE">Yes</a>
</button>
</div>
</div>
</div>
</div>
{% else %}
...
{% endif %}
问题出现在&#34;是&#34;按钮(路径&#39; documentBundle_document_archive)此模式没有JavaScript,所以不幸的是我无法提供任何。
这是路径的行动:
/**
* @Route("/document/{id}/archive", name="documentBundle_document_archive" , requirements={"id" = "\d+"}, defaults={"id" = 0})
* @Method("GET")
* @Template()
*/
public function archiveAction(Request $request, $id) {
/*
* CHECK FOR PERMISSIONS
* TODO: Check if the acting user has all needed permissions to perform this action.
*/
if($this->get('security.authorization_checker')->isGranted('ROLE_DOCUMENT_EDIT')){
/*
* GET DOCUMENT FROM DB
*/
$em = $this->getDoctrine()->getManager();
$updated_document = $em->getRepository('DocumentBundle:Document')->find($id);
/*
* IF DOCUMENT IS NOT ARCHIVED
*/
if(!$updated_document->isArchived())
{
// TODO: Send email with activation link to verify the user's email address! TODO: Create Event
/*
* GET CURRENT USER
*/
$currentuser = $this->get('security.token_storage')->getToken()->getUser();
/*
* ARCHIVE DOCUMENT
*/
$updated_document->setArchived(true);
/*
* ADD AN APPROVAL COMMENT
*/
$comment = new \CommentBundle\Entity\Comment();
$comment->setComment('<strong>Document was archived.</strong>');
$comment->setDocument($updated_document);
$comment->setAuthor($currentuser);
/*
* PERSIST DATA
*/
$em->persist($updated_document);
$em->persist($comment);
$em->flush();
/*
* DISPLAY SUCCESS MESSAGE
*/
$this->addFlash(
'success',
'The document has been archived!'
);
return $this->redirectToRoute('documentBundle_document_list');
} else {
/*
* DISPLAY ERROR MESSAGE
*/
return $this->render('DocumentBundle:Action/Document:archived.html.twig', Array(
'success' => false,
'updated_document' => $updated_document,
'menu' => Array('top' => 'Document'),
));
}
} else
{
/*
* THROW ERROR
* If the acting user is not allowed to perform this action
*/
return $this->get('app.error_helper')->throwPermissionError();
}
}