Don't wait for document ready for setting requesttoken
This commit is contained in:
parent
8380e6f658
commit
6324daecc0
|
@ -31,14 +31,10 @@
|
||||||
?>
|
?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function() {
|
requesttoken = '<?php echo $_['requesttoken']; ?>';
|
||||||
requesttoken = '<?php echo $_['requesttoken']; ?>';
|
OC.EventSource.requesttoken=requesttoken;
|
||||||
OC.EventSource.requesttoken=requesttoken;
|
$(document).bind('ajaxSend', function(elm, xhr, s){
|
||||||
$(document).bind('ajaxSend', function(elm, xhr, s){
|
xhr.setRequestHeader('requesttoken', requesttoken);
|
||||||
if(requesttoken) {
|
|
||||||
xhr.setRequestHeader('requesttoken', requesttoken);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
Loading…
Reference in New Issue