diff options
author | n-peugnet <n.peugnet@free.fr> | 2019-10-20 21:01:42 +0200 |
---|---|---|
committer | n-peugnet <n.peugnet@free.fr> | 2019-10-21 19:00:46 +0200 |
commit | acbc10ed0afb0a0130499fad79e742ce7453b8e2 (patch) | |
tree | 007ad73437446a4652aba42ca2eaf82cdb3d7273 | |
parent | 61c4ebe782cd742f84f16af9966d3ed91bd6cec6 (diff) | |
download | wcms-acbc10ed0afb0a0130499fad79e742ce7453b8e2.tar.gz wcms-acbc10ed0afb0a0130499fad79e742ce7453b8e2.zip |
add display shortcut with ctrl + d
-rw-r--r-- | app/view/templates/edittopbar.php | 3 | ||||
-rw-r--r-- | assets/js/edit.js | 12 |
2 files changed, 12 insertions, 3 deletions
diff --git a/app/view/templates/edittopbar.php b/app/view/templates/edittopbar.php index 6f4db36..ec1a875 100644 --- a/app/view/templates/edittopbar.php +++ b/app/view/templates/edittopbar.php @@ -17,7 +17,8 @@ - <a href="<?= $this->upage('pageread/', $page->id()) ?>" target="_blank" ><img src="<?= Model::iconpath() ?>read.png" class="icon"> + <a href="<?= $this->upage('pageread/', $page->id()) ?>" target="_blank" id="display"> + <img src="<?= Model::iconpath() ?>read.png" class="icon"> <span class="hidephone">display</span> </a> <span id="headid"><?= $page->id() ?></span> diff --git a/assets/js/edit.js b/assets/js/edit.js index 567d1f3..efd29d6 100644 --- a/assets/js/edit.js +++ b/assets/js/edit.js @@ -27,10 +27,18 @@ function keyboardHandler(e) { switch (e.key) { // ctrl + s case 's': - e.preventDefault(); submitHandler(form); - return false; + break; + // ctrl + d + case 'd': + url = document.getElementById('update').getAttribute('href'); + window.open(url); + break; + default: + return true; } + e.preventDefault(); + return false; } } } |