From bfa69a3dc33d62a5f8f1a975b7c8d1f876886346 Mon Sep 17 00:00:00 2001 From: zadam Date: Fri, 3 Jul 2020 22:27:45 +0200 Subject: [PATCH] closing of attr detail --- package-lock.json | 120 +++++++++--------- package.json | 4 +- src/public/app/widgets/attribute_detail.js | 24 +++- src/public/app/widgets/collapsible_widget.js | 4 +- src/public/app/widgets/flex_container.js | 4 +- src/public/app/widgets/global_menu.js | 2 - src/public/app/widgets/history_navigation.js | 4 +- .../mobile_widgets/close_detail_button.js | 4 +- .../mobile_widgets/mobile_detail_menu.js | 4 +- src/public/app/widgets/note_actions.js | 4 +- src/public/app/widgets/note_attributes.js | 6 - src/public/app/widgets/note_detail.js | 2 - src/public/app/widgets/note_paths.js | 2 - src/public/app/widgets/note_title.js | 2 - src/public/app/widgets/note_tree.js | 2 - src/public/app/widgets/note_type.js | 4 +- src/public/app/widgets/promoted_attributes.js | 2 - src/public/app/widgets/run_script_buttons.js | 4 +- src/public/app/widgets/search_box.js | 4 +- src/public/app/widgets/search_results.js | 2 - src/public/app/widgets/side_pane_toggles.js | 2 - src/public/app/widgets/tab_row.js | 2 - src/public/app/widgets/title_bar_buttons.js | 2 - src/public/app/widgets/type_widgets/book.js | 2 - .../app/widgets/type_widgets/deleted.js | 4 +- .../app/widgets/type_widgets/editable_code.js | 2 - .../app/widgets/type_widgets/editable_text.js | 2 - src/public/app/widgets/type_widgets/empty.js | 4 +- src/public/app/widgets/type_widgets/file.js | 2 - src/public/app/widgets/type_widgets/image.js | 2 - .../widgets/type_widgets/protected_session.js | 4 +- .../widgets/type_widgets/read_only_code.js | 2 - .../widgets/type_widgets/read_only_text.js | 2 - .../app/widgets/type_widgets/relation_map.js | 4 +- src/public/app/widgets/type_widgets/render.js | 4 +- src/public/app/widgets/type_widgets/search.js | 4 +- 36 files changed, 95 insertions(+), 153 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0b70e986b..076adf23e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1058,14 +1058,6 @@ "requires": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" - }, - "dependencies": { - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true - } } }, "ajv": { @@ -1877,20 +1869,6 @@ "minipass": "^3.0.0" } }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, "minipass": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", @@ -2249,6 +2227,12 @@ } } }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -2588,9 +2572,9 @@ } }, "dayjs": { - "version": "1.8.28", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.8.28.tgz", - "integrity": "sha512-ccnYgKC0/hPSGXxj7Ju6AV/BP4HUkXC2u15mikXT5mX9YorEaoi1bEKOmAqdkJHN4EEkmAf97SpH66Try5Mbeg==" + "version": "1.8.29", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.8.29.tgz", + "integrity": "sha512-Vm6teig8ZWK7rH/lxzVGxZJCljPdmUr6q/3f4fr5F0VWNGVkZEjZOQJsAN8hUHUqn+NK4XHNEpJZS1MwLyDcLw==" }, "debug": { "version": "4.1.1", @@ -2857,9 +2841,9 @@ } }, "electron": { - "version": "10.0.0-beta.4", - "resolved": "https://registry.npmjs.org/electron/-/electron-10.0.0-beta.4.tgz", - "integrity": "sha512-/Jp9i0yiuM/WUdiKFjf7+5gZQJITGhijl++Zp31m94MY+QNMLEnFhaKLSqzrmPA2FPrXn2KlUPNpQs+4Wjcvpg==", + "version": "10.0.0-beta.8", + "resolved": "https://registry.npmjs.org/electron/-/electron-10.0.0-beta.8.tgz", + "integrity": "sha512-LTGVPTwBZkKNMNO8RP6ibBdAOyfnc8MFOS8ULYIavsPWMVDR4FwJJoq08++MnbYxV79/6P5SvPy1BCnSpetmTQ==", "dev": true, "requires": { "@electron/get": "^1.0.1", @@ -4221,6 +4205,20 @@ "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, "glob-to-regexp": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", @@ -4557,6 +4555,12 @@ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + }, "infer-owner": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", @@ -4801,30 +4805,13 @@ "dev": true }, "jest-worker": { - "version": "26.0.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.0.0.tgz", - "integrity": "sha512-pPaYa2+JnwmiZjK9x7p9BoZht+47ecFCDFA/CJxspHzeDvQcfVBLWzCiWyo+EGrSiQMWZtCFo9iSvMZnAAo8vw==", + "version": "26.1.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.1.0.tgz", + "integrity": "sha512-Z9P5pZ6UC+kakMbNJn+tA2RdVdNX5WH1x+5UCBZ9MxIK24pjYtFt96fK+UwBTrjLYm232g1xz0L3eTh51OW+yQ==", "dev": true, "requires": { "merge-stream": "^2.0.0", "supports-color": "^7.0.0" - }, - "dependencies": { - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "jimp": { @@ -5388,6 +5375,12 @@ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -7392,6 +7385,15 @@ "peek-readable": "^3.1.0" } }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, "symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", @@ -7531,20 +7533,12 @@ "commander": "^2.20.0", "source-map": "~0.6.1", "source-map-support": "~0.5.12" - }, - "dependencies": { - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - } } }, "terser-webpack-plugin": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-3.0.5.tgz", - "integrity": "sha512-pyHUyfQUZB3ciYL81GgXzDh8Qb3fGED77xDjZVSFYSN1cQnWgC51OMPKj7vBWVZx0GGuYhpa9+Vz2KxkzXWhBA==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-3.0.6.tgz", + "integrity": "sha512-z3HLOOPUHkCNGkeEHqqiMAIy1pjpHwS1o+i6Zn0Ws3EAvHJj46737efNNEvJ0Vx9BdDQM83d56qySDJOSORA0A==", "dev": true, "requires": { "cacache": "^15.0.4", @@ -7554,7 +7548,7 @@ "schema-utils": "^2.6.6", "serialize-javascript": "^4.0.0", "source-map": "^0.6.1", - "terser": "^4.6.13", + "terser": "^4.8.0", "webpack-sources": "^1.4.3" }, "dependencies": { @@ -8033,9 +8027,9 @@ "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==" }, "webpack": { - "version": "5.0.0-beta.18", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.0.0-beta.18.tgz", - "integrity": "sha512-v+kyUEA1sQnSP6gcchyEY/Jufb1XEbniCmA7uXvWXWFPQnN51ChW8liF0FgUre8yYI5jRqVsNHFw3H9rGCB8qw==", + "version": "5.0.0-beta.20", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.0.0-beta.20.tgz", + "integrity": "sha512-bIUAephArRkyWBzhLJ7OD5ys+jTNgANuJJy4+qhAWd5De4T0l/qKrVYdXZCbAj3PXUdxyEL5KsJHPQHacyfBGQ==", "dev": true, "requires": { "@types/estree": "0.0.42", diff --git a/package.json b/package.json index de501adee..4ba1a0426 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ }, "devDependencies": { "cross-env": "^7.0.2", - "electron": "10.0.0-beta.4", + "electron": "10.0.0-beta.8", "electron-builder": "22.7.0", "electron-packager": "15.0.0", "electron-rebuild": "1.11.0", @@ -84,7 +84,7 @@ "jasmine": "^3.5.0", "jsdoc": "3.6.4", "lorem-ipsum": "2.0.3", - "webpack": "5.0.0-beta.18", + "webpack": "5.0.0-beta.20", "webpack-cli": "4.0.0-beta.8" }, "optionalDependencies": { diff --git a/src/public/app/widgets/attribute_detail.js b/src/public/app/widgets/attribute_detail.js index 1366bcae4..8e3bc2d4e 100644 --- a/src/public/app/widgets/attribute_detail.js +++ b/src/public/app/widgets/attribute_detail.js @@ -37,9 +37,18 @@ const TPL = ` .attr-edit td input { width: 100%; } + + .close-attr-detail-button { + font-size: x-large; + cursor: pointer; + } -
Label detail
+
+
Label detail
+ + +
@@ -91,8 +100,17 @@ export default class AttributeDetailWidget extends BasicWidget { this.$attrEditName = this.$widget.find('.attr-edit-name'); this.$attrEditValue = this.$widget.find('.attr-edit-value'); this.$attrEditInheritable = this.$widget.find('.attr-edit-inheritable'); + this.$closeAttrDetailButton = this.$widget.find('.close-attr-detail-button'); - return this.$widget; + this.$closeAttrDetailButton.on('click', () => this.hide()); + + $(window).on('mouseup', e => { + console.log("click", e.target); + + if (!$(e.target).closest(this.$widget[0]).length) { + this.hide(); + } + }); } async showAttributeDetail(attr, x, y) { @@ -140,7 +158,7 @@ export default class AttributeDetailWidget extends BasicWidget { this.$relatedNotesMoreNotes.hide(); } - this.$attrEditName.val(attr.name); + this.$attrEditName.val(attr.name).focus(); this.$attrEditValue.val(attr.value); this.$widget.css("left", x - this.$widget.width() / 2); diff --git a/src/public/app/widgets/collapsible_widget.js b/src/public/app/widgets/collapsible_widget.js index 62e1905a9..c74ff143f 100644 --- a/src/public/app/widgets/collapsible_widget.js +++ b/src/public/app/widgets/collapsible_widget.js @@ -70,8 +70,6 @@ export default class CollapsibleWidget extends TabAwareWidget { this.initialized = this.doRenderBody(); this.decorateWidget(); - - return this.$widget; } saveCollapsed(collapse) { @@ -99,4 +97,4 @@ export default class CollapsibleWidget extends TabAwareWidget { isExpanded() { return this.$bodyWrapper.hasClass("show"); } -} \ No newline at end of file +} diff --git a/src/public/app/widgets/flex_container.js b/src/public/app/widgets/flex_container.js index 311071201..d2e90842d 100644 --- a/src/public/app/widgets/flex_container.js +++ b/src/public/app/widgets/flex_container.js @@ -40,7 +40,5 @@ export default class FlexContainer extends BasicWidget { for (const widget of this.children) { this.$widget.append(widget.render()); } - - return this.$widget; } -} \ No newline at end of file +} diff --git a/src/public/app/widgets/global_menu.js b/src/public/app/widgets/global_menu.js index 509bac94e..bc4ea2056 100644 --- a/src/public/app/widgets/global_menu.js +++ b/src/public/app/widgets/global_menu.js @@ -113,7 +113,5 @@ export default class GlobalMenuWidget extends BasicWidget { this.$widget.find(".logout-button").toggle(!utils.isElectron()); this.$widget.find(".open-dev-tools-button").toggle(utils.isElectron()); - - return this.$widget; } } diff --git a/src/public/app/widgets/history_navigation.js b/src/public/app/widgets/history_navigation.js index b8dc0e9d6..a6ab87792 100644 --- a/src/public/app/widgets/history_navigation.js +++ b/src/public/app/widgets/history_navigation.js @@ -51,8 +51,6 @@ export default class HistoryNavigationWidget extends BasicWidget { else { this.$widget = $("
"); } - - return this.$widget; } async showContextMenu(e) { @@ -101,4 +99,4 @@ export default class HistoryNavigationWidget extends BasicWidget { activeNoteChangedEvent() { this.refresh(); } -} \ No newline at end of file +} diff --git a/src/public/app/widgets/mobile_widgets/close_detail_button.js b/src/public/app/widgets/mobile_widgets/close_detail_button.js index 8d3bbe00e..038a606b2 100644 --- a/src/public/app/widgets/mobile_widgets/close_detail_button.js +++ b/src/public/app/widgets/mobile_widgets/close_detail_button.js @@ -10,9 +10,7 @@ class CloseDetailButtonWidget extends BasicWidget { this.$widget = $(TPL); this.$widget.on('click', () => this.triggerCommand('setActiveScreen', {screen:'tree'})); - - return this.$widget; } } -export default CloseDetailButtonWidget; \ No newline at end of file +export default CloseDetailButtonWidget; diff --git a/src/public/app/widgets/mobile_widgets/mobile_detail_menu.js b/src/public/app/widgets/mobile_widgets/mobile_detail_menu.js index 82d8d51fb..6eacc4330 100644 --- a/src/public/app/widgets/mobile_widgets/mobile_detail_menu.js +++ b/src/public/app/widgets/mobile_widgets/mobile_detail_menu.js @@ -38,9 +38,7 @@ class MobileDetailMenuWidget extends BasicWidget { } }); }); - - return this.$widget; } } -export default MobileDetailMenuWidget; \ No newline at end of file +export default MobileDetailMenuWidget; diff --git a/src/public/app/widgets/note_actions.js b/src/public/app/widgets/note_actions.js index 0bf2a9cdb..f53f24a00 100644 --- a/src/public/app/widgets/note_actions.js +++ b/src/public/app/widgets/note_actions.js @@ -113,8 +113,6 @@ export default class NoteActionsWidget extends TabAwareWidget { this.$unprotectButton = this.$widget.find(".unprotect-button"); this.$unprotectButton.on('click', () => protectedSessionService.protectNote(this.noteId, false, false)); - - return this.$widget; } refreshWithNote(note) { @@ -140,4 +138,4 @@ export default class NoteActionsWidget extends TabAwareWidget { this.refresh(); } } -} \ No newline at end of file +} diff --git a/src/public/app/widgets/note_attributes.js b/src/public/app/widgets/note_attributes.js index 34cc83b92..81bff329b 100644 --- a/src/public/app/widgets/note_attributes.js +++ b/src/public/app/widgets/note_attributes.js @@ -234,12 +234,6 @@ export default class NoteAttributesWidget extends TabAwareWidget { this.attributeDetailWidget.hide(); }); - this.$editor.on('blur', () => { - this.save(); - - this.attributeDetailWidget.hide(); - }); - this.$widget.append(this.attributeDetailWidget.render()); } diff --git a/src/public/app/widgets/note_detail.js b/src/public/app/widgets/note_detail.js index d7ebe0ebd..82cb6cca2 100644 --- a/src/public/app/widgets/note_detail.js +++ b/src/public/app/widgets/note_detail.js @@ -100,8 +100,6 @@ export default class NoteDetailWidget extends TabAwareWidget { replaceUnderscoresWithSpaces: true }); }); - - return this.$widget; } async refresh() { diff --git a/src/public/app/widgets/note_paths.js b/src/public/app/widgets/note_paths.js index 0a44b5de1..5c480efc8 100644 --- a/src/public/app/widgets/note_paths.js +++ b/src/public/app/widgets/note_paths.js @@ -57,8 +57,6 @@ export default class NotePathsWidget extends TabAwareWidget { this.$notePathList = this.$dropdown.find(".note-path-list"); this.$dropdown.on('show.bs.dropdown', () => this.renderDropdown()); - - return this.$widget; } async refreshWithNote(note, notePath) { diff --git a/src/public/app/widgets/note_title.js b/src/public/app/widgets/note_title.js index ae5ac4202..145417dde 100644 --- a/src/public/app/widgets/note_title.js +++ b/src/public/app/widgets/note_title.js @@ -48,8 +48,6 @@ export default class NoteTitleWidget extends TabAwareWidget { utils.bindElShortcut(this.$noteTitle, 'return', () => { this.triggerCommand('focusOnAttributes', {tabId: this.tabContext.tabId}); }); - - return this.$widget; } async refreshWithNote(note) { diff --git a/src/public/app/widgets/note_tree.js b/src/public/app/widgets/note_tree.js index 270fac24e..7582f0e95 100644 --- a/src/public/app/widgets/note_tree.js +++ b/src/public/app/widgets/note_tree.js @@ -250,8 +250,6 @@ export default class NoteTreeWidget extends TabAwareWidget { this.initialized = this.initFancyTree(); this.setupNoteTitleTooltip(); - - return this.$widget; } setupNoteTitleTooltip() { diff --git a/src/public/app/widgets/note_type.js b/src/public/app/widgets/note_type.js index d33e26d17..679d6362e 100644 --- a/src/public/app/widgets/note_type.js +++ b/src/public/app/widgets/note_type.js @@ -40,8 +40,6 @@ export default class NoteTypeWidget extends TabAwareWidget { this.$noteTypeDropdown = this.$widget.find(".note-type-dropdown"); this.$noteTypeButton = this.$widget.find(".note-type-button"); this.$noteTypeDesc = this.$widget.find(".note-type-desc"); - - return this.$widget; } async refreshWithNote(note) { @@ -147,4 +145,4 @@ export default class NoteTypeWidget extends TabAwareWidget { this.refresh(); } } -} \ No newline at end of file +} diff --git a/src/public/app/widgets/promoted_attributes.js b/src/public/app/widgets/promoted_attributes.js index 440112632..e6db996dc 100644 --- a/src/public/app/widgets/promoted_attributes.js +++ b/src/public/app/widgets/promoted_attributes.js @@ -32,8 +32,6 @@ export default class PromotedAttributesWidget extends TabAwareWidget { this.$widget = $(TPL); this.$container = this.$widget.find(".promoted-attributes"); - - return this.$widget; } async refreshWithNote(note) { diff --git a/src/public/app/widgets/run_script_buttons.js b/src/public/app/widgets/run_script_buttons.js index f090e6fb1..c7d752736 100644 --- a/src/public/app/widgets/run_script_buttons.js +++ b/src/public/app/widgets/run_script_buttons.js @@ -17,8 +17,6 @@ export default class RunScriptButtonsWidget extends TabAwareWidget { this.$renderButton = this.$widget.find('.render-button'); this.$executeScriptButton = this.$widget.find('.execute-script-button'); - - return this.$widget; } refreshWithNote(note) { @@ -31,4 +29,4 @@ export default class RunScriptButtonsWidget extends TabAwareWidget { this.refresh(); } } -} \ No newline at end of file +} diff --git a/src/public/app/widgets/search_box.js b/src/public/app/widgets/search_box.js index f0f729dfb..2f4cb8cc5 100644 --- a/src/public/app/widgets/search_box.js +++ b/src/public/app/widgets/search_box.js @@ -71,8 +71,6 @@ export default class SearchBoxWidget extends BasicWidget { this.$saveSearchButton.on('click', () => this.saveSearch()); this.$closeSearchButton.on('click', () => this.hideSearch()); - - return this.$widget; } doSearch(searchText) { @@ -174,4 +172,4 @@ export default class SearchBoxWidget extends BasicWidget { this.$searchInput.val(`@in=${noteId} @text*=*`); } -} \ No newline at end of file +} diff --git a/src/public/app/widgets/search_results.js b/src/public/app/widgets/search_results.js index 2bf539e15..08b0e6f76 100644 --- a/src/public/app/widgets/search_results.js +++ b/src/public/app/widgets/search_results.js @@ -35,8 +35,6 @@ export default class SearchResultsWidget extends BasicWidget { this.$searchResultsInner = this.$widget.find(".search-results-list"); this.toggleInt(false); - - return this.$widget; } searchResultsEvent({results}) { diff --git a/src/public/app/widgets/side_pane_toggles.js b/src/public/app/widgets/side_pane_toggles.js index 43ba442f2..5554d4d85 100644 --- a/src/public/app/widgets/side_pane_toggles.js +++ b/src/public/app/widgets/side_pane_toggles.js @@ -43,8 +43,6 @@ export default class SidePaneToggles extends BasicWidget { this.$widget.find(".show-left-pane-button").on('click', () => this.toggleAndSave('left', true)); this.$widget.find(".hide-left-pane-button").on('click', () => this.toggleAndSave('left', false)); - - return this.$widget; } toggleSidebar(side, show) { diff --git a/src/public/app/widgets/tab_row.js b/src/public/app/widgets/tab_row.js index ba8ee27fc..2336717eb 100644 --- a/src/public/app/widgets/tab_row.js +++ b/src/public/app/widgets/tab_row.js @@ -267,8 +267,6 @@ export default class TabRowWidget extends BasicWidget { } }); }); - - return this.$widget; } setupStyle() { diff --git a/src/public/app/widgets/title_bar_buttons.js b/src/public/app/widgets/title_bar_buttons.js index 6be2e2dae..3d443d7e0 100644 --- a/src/public/app/widgets/title_bar_buttons.js +++ b/src/public/app/widgets/title_bar_buttons.js @@ -63,7 +63,5 @@ export default class TitleBarButtonsWidget extends BasicWidget { const {remote} = utils.dynamicRequire('electron'); remote.BrowserWindow.getFocusedWindow().close(); }); - - return this.$widget; } } diff --git a/src/public/app/widgets/type_widgets/book.js b/src/public/app/widgets/type_widgets/book.js index a4876ca55..451a44083 100644 --- a/src/public/app/widgets/type_widgets/book.js +++ b/src/public/app/widgets/type_widgets/book.js @@ -170,8 +170,6 @@ export default class BookTypeWidget extends TypeWidget { $card.find('.note-book-children-content').empty(); }); - - return this.$widget; } async expandCard($card) { diff --git a/src/public/app/widgets/type_widgets/deleted.js b/src/public/app/widgets/type_widgets/deleted.js index cbf4cb903..56e7d0f21 100644 --- a/src/public/app/widgets/type_widgets/deleted.js +++ b/src/public/app/widgets/type_widgets/deleted.js @@ -14,7 +14,5 @@ export default class DeletedTypeWidget extends TypeWidget { doRender() { this.$widget = $(TPL); - - return this.$widget; } -} \ No newline at end of file +} diff --git a/src/public/app/widgets/type_widgets/editable_code.js b/src/public/app/widgets/type_widgets/editable_code.js index b3d7efd4b..88d20f535 100644 --- a/src/public/app/widgets/type_widgets/editable_code.js +++ b/src/public/app/widgets/type_widgets/editable_code.js @@ -82,8 +82,6 @@ export default class EditableCodeTypeWidget extends TypeWidget { this.$sqlConsoleExecuteButton.on('click', () => this.execute()); this.initialized = this.initEditor(); - - return this.$widget; } async initEditor() { diff --git a/src/public/app/widgets/type_widgets/editable_text.js b/src/public/app/widgets/type_widgets/editable_text.js index e413b8e2c..89d2239ef 100644 --- a/src/public/app/widgets/type_widgets/editable_text.js +++ b/src/public/app/widgets/type_widgets/editable_text.js @@ -88,8 +88,6 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget { keyboardActionService.setupActionsForElement('text-detail', this.$widget, this); super.doRender(); - - return this.$widget; } async initEditor() { diff --git a/src/public/app/widgets/type_widgets/empty.js b/src/public/app/widgets/type_widgets/empty.js index d5ebda060..4ca8f5a6b 100644 --- a/src/public/app/widgets/type_widgets/empty.js +++ b/src/public/app/widgets/type_widgets/empty.js @@ -31,11 +31,9 @@ export default class EmptyTypeWidget extends TypeWidget { }); noteAutocompleteService.showRecentNotes(this.$autoComplete); - - return this.$widget; } doRefresh(note) { this.$autoComplete.trigger('focus'); } -} \ No newline at end of file +} diff --git a/src/public/app/widgets/type_widgets/file.js b/src/public/app/widgets/type_widgets/file.js index 08045c49c..dfa84ce29 100644 --- a/src/public/app/widgets/type_widgets/file.js +++ b/src/public/app/widgets/type_widgets/file.js @@ -116,8 +116,6 @@ export default class FileTypeWidget extends TypeWidget { toastService.showError("Upload of a new file revision failed."); } }); - - return this.$widget; } async doRefresh(note) { diff --git a/src/public/app/widgets/type_widgets/image.js b/src/public/app/widgets/type_widgets/image.js index 8bed7be4e..a0baf4117 100644 --- a/src/public/app/widgets/type_widgets/image.js +++ b/src/public/app/widgets/type_widgets/image.js @@ -119,8 +119,6 @@ class ImageTypeWidget extends TypeWidget { toastService.showError("Upload of a new image revision failed: " + result.message); } }); - - return this.$widget; } async doRefresh(note) { diff --git a/src/public/app/widgets/type_widgets/protected_session.js b/src/public/app/widgets/type_widgets/protected_session.js index 487933ec3..70617406d 100644 --- a/src/public/app/widgets/type_widgets/protected_session.js +++ b/src/public/app/widgets/type_widgets/protected_session.js @@ -36,7 +36,5 @@ export default class ProtectedSessionTypeWidget extends TypeWidget { return false; }); - - return this.$widget; } -} \ No newline at end of file +} diff --git a/src/public/app/widgets/type_widgets/read_only_code.js b/src/public/app/widgets/type_widgets/read_only_code.js index e8cf37a01..1ed5c5740 100644 --- a/src/public/app/widgets/type_widgets/read_only_code.js +++ b/src/public/app/widgets/type_widgets/read_only_code.js @@ -32,8 +32,6 @@ export default class ReadOnlyCodeTypeWidget extends TypeWidget { this.triggerEvent('codePreviewDisabled', {tabContext: this.tabContext}); }); - - return this.$widget; } async doRefresh(note) { diff --git a/src/public/app/widgets/type_widgets/read_only_text.js b/src/public/app/widgets/type_widgets/read_only_text.js index 4d4c384fc..ffedbaba0 100644 --- a/src/public/app/widgets/type_widgets/read_only_text.js +++ b/src/public/app/widgets/type_widgets/read_only_text.js @@ -52,8 +52,6 @@ export default class ReadOnlyTextTypeWidget extends AbstractTextTypeWidget { }); super.doRender(); - - return this.$widget; } cleanup() { diff --git a/src/public/app/widgets/type_widgets/relation_map.js b/src/public/app/widgets/type_widgets/relation_map.js index 4d70946dc..0c01e1e43 100644 --- a/src/public/app/widgets/type_widgets/relation_map.js +++ b/src/public/app/widgets/type_widgets/relation_map.js @@ -182,8 +182,6 @@ export default class RelationMapTypeWidget extends TypeWidget { jsPlumb.ready(res); }); - - return this.$widget; } async contextMenuHandler(command, originalTarget) { @@ -632,4 +630,4 @@ export default class RelationMapTypeWidget extends TypeWidget { getContent() { return JSON.stringify(this.mapData); } -} \ No newline at end of file +} diff --git a/src/public/app/widgets/type_widgets/render.js b/src/public/app/widgets/type_widgets/render.js index 111d2dba2..58bb6532c 100644 --- a/src/public/app/widgets/type_widgets/render.js +++ b/src/public/app/widgets/type_widgets/render.js @@ -25,8 +25,6 @@ export default class RenderTypeWidget extends TypeWidget { this.$widget = $(TPL); this.$noteDetailRenderHelp = this.$widget.find('.note-detail-render-help'); this.$noteDetailRenderContent = this.$widget.find('.note-detail-render-content'); - - return this.$widget; } async doRefresh(note) { @@ -49,4 +47,4 @@ export default class RenderTypeWidget extends TypeWidget { this.refresh(); } } -} \ No newline at end of file +} diff --git a/src/public/app/widgets/type_widgets/search.js b/src/public/app/widgets/type_widgets/search.js index 8b2f0ad94..81993b25b 100644 --- a/src/public/app/widgets/type_widgets/search.js +++ b/src/public/app/widgets/type_widgets/search.js @@ -20,8 +20,6 @@ export default class SearchTypeWidget extends TypeWidget { this.$searchString = this.$widget.find(".search-string"); this.$component = this.$widget.find('.note-detail-search'); this.$help = this.$widget.find(".note-detail-search-help"); - - return this.$widget; } async doRefresh(note) { @@ -48,4 +46,4 @@ export default class SearchTypeWidget extends TypeWidget { searchString: this.$searchString.val() }); } -} \ No newline at end of file +}