summaryrefslogtreecommitdiff
path: root/assets/js/src/App.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/src/App.js')
-rw-r--r--assets/js/src/App.js37
1 files changed, 0 insertions, 37 deletions
diff --git a/assets/js/src/App.js b/assets/js/src/App.js
index d4950fb3..9aa97061 100644
--- a/assets/js/src/App.js
+++ b/assets/js/src/App.js
@@ -23,52 +23,15 @@ Kanboard.App.prototype.execute = function() {
if (typeof controller.focus === "function") {
controller.focus();
}
-
- if (typeof controller.keyboardShortcuts === "function") {
- controller.keyboardShortcuts();
- }
}
}
this.focus();
- this.keyboardShortcuts();
this.datePicker();
this.autoComplete();
this.tagAutoComplete();
};
-Kanboard.App.prototype.keyboardShortcuts = function() {
- var self = this;
-
- // Submit form
- Mousetrap.bindGlobal("mod+enter", function() {
- var forms = $("form");
-
- if (forms.length == 1) {
- forms.submit();
- } else if (forms.length > 1) {
- if (document.activeElement.tagName === 'INPUT' || document.activeElement.tagName === 'TEXTAREA') {
- $(document.activeElement).parents("form").submit();
- } else if (self.get("Popover").isOpen()) {
- $("#popover-container form").submit();
- }
- }
- });
-
- // Close popover and dropdown
- Mousetrap.bindGlobal("esc", function() {
- if (! document.getElementById('suggest-menu')) {
- self.get("Popover").close();
- self.get("Dropdown").close();
- }
- });
-
- // Show keyboard shortcut
- Mousetrap.bind("?", function() {
- self.get("Popover").open($("body").data("keyboard-shortcut-url"));
- });
-};
-
Kanboard.App.prototype.focus = function() {
// Auto-select input fields
$(document).on('focus', '.auto-select', function() {