diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2019-10-18 15:50:34 +0200 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2019-10-18 15:50:34 +0200 |
commit | 0968351067f99e8afc882d4237902642e608e6f5 (patch) | |
tree | 202d554dcc6135a88c11bee78660c53a47df2931 /assets | |
parent | 917a3971302791d9df67c047c4e663c9fb04f0c4 (diff) | |
download | wcms-0968351067f99e8afc882d4237902642e608e6f5.tar.gz wcms-0968351067f99e8afc882d4237902642e608e6f5.zip |
Big naming Clean-up Art -> Page
Diffstat (limited to 'assets')
-rw-r--r-- | assets/js/edit.js | 6 | ||||
-rw-r--r-- | assets/js/worker.js | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/assets/js/edit.js b/assets/js/edit.js index b4c173f..b0f8915 100644 --- a/assets/js/edit.js +++ b/assets/js/edit.js @@ -1,6 +1,6 @@ let form; let unsavedChanges = false; -const arturl = basepath + artid; +const pageurl = basepath + pageid; const myWorker = new Worker(jspath + 'worker.js'); window.onload = () => { @@ -17,7 +17,7 @@ window.onload = () => { myWorker.postMessage({ type: 'init', - arturl: arturl, + pageurl: pageurl, }); myWorker.postMessage({ type: 'stillEditing' }); }; @@ -63,7 +63,7 @@ function submitHandler(e) { */ function confirmExit(e) { if (unsavedChanges) { - const url = arturl + '/removeeditby'; + const url = pageurl + '/removeeditby'; console.log('send quit editing') fetch(url, { method: 'POST' }) .then(handleErrors) diff --git a/assets/js/worker.js b/assets/js/worker.js index 846acba..d60fdf1 100644 --- a/assets/js/worker.js +++ b/assets/js/worker.js @@ -1,9 +1,9 @@ -let arturl; +let pageurl; onmessage = function (e) { switch (e.data.type) { case 'init': - arturl = e.data.arturl; + pageurl = e.data.pageurl; break; case 'stillEditing': stillEditing(); @@ -16,7 +16,7 @@ onmessage = function (e) { function stillEditing() { console.log('send still editing'); - const url = arturl + '/editby'; + const url = pageurl + '/editby'; const req = new XMLHttpRequest(); req.open('POST', url, false); req.send(null); @@ -27,7 +27,7 @@ function stillEditing() { function quitEditing() { console.log('send quit editing'); - const url = arturl + '/removeeditby'; + const url = pageurl + '/removeeditby'; const req = new XMLHttpRequest(); req.open('POST', url, false); req.send(null); |