Get new wrapper nonce API command to proper reload iframe content
This commit is contained in:
parent
0e84bf95da
commit
af4b4ae85c
2 changed files with 13 additions and 5 deletions
|
@ -545,12 +545,16 @@ class Wrapper
|
|||
return false
|
||||
@loading.printLine res
|
||||
@inner_loaded = false # Inner frame not loaded, just a 404 page displayed
|
||||
if reload
|
||||
src = $("iframe").attr("src")
|
||||
$("iframe").attr "src", ""
|
||||
$("iframe").attr "src", src
|
||||
if reload then @reloadIframe()
|
||||
return false
|
||||
|
||||
reloadIframe: =>
|
||||
src = $("iframe").attr("src")
|
||||
@ws.cmd "serverGetWrapperNonce", [], (wrapper_nonce) =>
|
||||
src = src.replace(/wrapper_nonce=[A-Za-z0-9]+/, "wrapper_nonce=" + wrapper_nonce)
|
||||
@log "Reloading iframe using url", src
|
||||
$("iframe").attr "src", src
|
||||
|
||||
log: (args...) ->
|
||||
console.log "[Wrapper]", args...
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue