diff options
-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; } } } |