Also delete cookies from main domain instead of just current subdomain (#1726)
* Update main.js * fix folders in filelist * Update treeview.jet.html
Cette révision appartient à :
Parent
6a03a75d6b
révision
fdd86d6a9e
2 fichiers modifiés avec 15 ajouts et 2 suppressions
|
@ -309,6 +309,19 @@ function deleteCookie(cookieName) {
|
|||
document.cookie = cookieName + "=;path=/;expires=Thu, 01 Jan 1970 00:00:00 UTC;"
|
||||
document.cookie = cookieName + "=;expires=Thu, 01 Jan 1970 00:00:00 UTC;domain=" + window.location.host
|
||||
document.cookie = cookieName + "=;expires=Thu, 01 Jan 1970 00:00:00 UTC;domain=" + domain
|
||||
|
||||
//Also need to delete from current hostname without subdomain, which is what this accomplish
|
||||
var hostName = window.location.host
|
||||
var lastDotIndex = hostName.lastIndexOf(".")
|
||||
var secondLast = -1
|
||||
|
||||
for(var index = 0; index < lastDotIndex; index++) {
|
||||
if(hostName[index] == '.')
|
||||
secondLast = index
|
||||
}
|
||||
hostName = hostName.substr(secondLast == -1 ? 0 : secondLast)
|
||||
|
||||
document.cookie = cookieName + "=;expires=Thu, 01 Jan 1970 00:00:00 UTC;domain=" + hostName
|
||||
}
|
||||
|
||||
// @license-end
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
{{ if isset(treeviewData)}}
|
||||
{{ range index, folder := treeviewData.Folder.Folders }}
|
||||
{{ folderId := treeviewData.IdentifierChain+"_"+index }}
|
||||
<tr class="tr-filelist tr-folder>
|
||||
<tr class="tr-filelist tr-folder">
|
||||
<td style="padding-left: {{ treeviewData.NestLevel * 2.5 }}%;"><label for="contents_{{folderId}}">{{folder.FolderName}}</label></td>
|
||||
<td>{{ fileSize(folder.TotalSize(), T) }}</td>
|
||||
<td>{{ fileSize(folder.TotalSize(), T, true) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
|
Référencer dans un nouveau ticket