mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	closing of attr detail
This commit is contained in:
		
							
								
								
									
										120
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										120
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -1058,14 +1058,6 @@ | |||||||
|       "requires": { |       "requires": { | ||||||
|         "clean-stack": "^2.0.0", |         "clean-stack": "^2.0.0", | ||||||
|         "indent-string": "^4.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": { |     "ajv": { | ||||||
| @@ -1877,20 +1869,6 @@ | |||||||
|             "minipass": "^3.0.0" |             "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": { |         "minipass": { | ||||||
|           "version": "3.1.3", |           "version": "3.1.3", | ||||||
|           "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", |           "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": { |     "commondir": { | ||||||
|       "version": "1.0.1", |       "version": "1.0.1", | ||||||
|       "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", |       "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", | ||||||
| @@ -2588,9 +2572,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "dayjs": { |     "dayjs": { | ||||||
|       "version": "1.8.28", |       "version": "1.8.29", | ||||||
|       "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.8.28.tgz", |       "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.8.29.tgz", | ||||||
|       "integrity": "sha512-ccnYgKC0/hPSGXxj7Ju6AV/BP4HUkXC2u15mikXT5mX9YorEaoi1bEKOmAqdkJHN4EEkmAf97SpH66Try5Mbeg==" |       "integrity": "sha512-Vm6teig8ZWK7rH/lxzVGxZJCljPdmUr6q/3f4fr5F0VWNGVkZEjZOQJsAN8hUHUqn+NK4XHNEpJZS1MwLyDcLw==" | ||||||
|     }, |     }, | ||||||
|     "debug": { |     "debug": { | ||||||
|       "version": "4.1.1", |       "version": "4.1.1", | ||||||
| @@ -2857,9 +2841,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "electron": { |     "electron": { | ||||||
|       "version": "10.0.0-beta.4", |       "version": "10.0.0-beta.8", | ||||||
|       "resolved": "https://registry.npmjs.org/electron/-/electron-10.0.0-beta.4.tgz", |       "resolved": "https://registry.npmjs.org/electron/-/electron-10.0.0-beta.8.tgz", | ||||||
|       "integrity": "sha512-/Jp9i0yiuM/WUdiKFjf7+5gZQJITGhijl++Zp31m94MY+QNMLEnFhaKLSqzrmPA2FPrXn2KlUPNpQs+4Wjcvpg==", |       "integrity": "sha512-LTGVPTwBZkKNMNO8RP6ibBdAOyfnc8MFOS8ULYIavsPWMVDR4FwJJoq08++MnbYxV79/6P5SvPy1BCnSpetmTQ==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "requires": { |       "requires": { | ||||||
|         "@electron/get": "^1.0.1", |         "@electron/get": "^1.0.1", | ||||||
| @@ -4221,6 +4205,20 @@ | |||||||
|       "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", |       "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", | ||||||
|       "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" |       "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": { |     "glob-to-regexp": { | ||||||
|       "version": "0.4.1", |       "version": "0.4.1", | ||||||
|       "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", |       "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", |       "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", | ||||||
|       "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" |       "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": { |     "infer-owner": { | ||||||
|       "version": "1.0.4", |       "version": "1.0.4", | ||||||
|       "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", |       "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", | ||||||
| @@ -4801,30 +4805,13 @@ | |||||||
|       "dev": true |       "dev": true | ||||||
|     }, |     }, | ||||||
|     "jest-worker": { |     "jest-worker": { | ||||||
|       "version": "26.0.0", |       "version": "26.1.0", | ||||||
|       "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.0.0.tgz", |       "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.1.0.tgz", | ||||||
|       "integrity": "sha512-pPaYa2+JnwmiZjK9x7p9BoZht+47ecFCDFA/CJxspHzeDvQcfVBLWzCiWyo+EGrSiQMWZtCFo9iSvMZnAAo8vw==", |       "integrity": "sha512-Z9P5pZ6UC+kakMbNJn+tA2RdVdNX5WH1x+5UCBZ9MxIK24pjYtFt96fK+UwBTrjLYm232g1xz0L3eTh51OW+yQ==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "requires": { |       "requires": { | ||||||
|         "merge-stream": "^2.0.0", |         "merge-stream": "^2.0.0", | ||||||
|         "supports-color": "^7.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": { |     "jimp": { | ||||||
| @@ -5388,6 +5375,12 @@ | |||||||
|       "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", |       "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", | ||||||
|       "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" |       "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": { |     "methods": { | ||||||
|       "version": "1.1.2", |       "version": "1.1.2", | ||||||
|       "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", |       "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", | ||||||
| @@ -7392,6 +7385,15 @@ | |||||||
|         "peek-readable": "^3.1.0" |         "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": { |     "symbol-tree": { | ||||||
|       "version": "3.2.4", |       "version": "3.2.4", | ||||||
|       "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", |       "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", | ||||||
| @@ -7531,20 +7533,12 @@ | |||||||
|         "commander": "^2.20.0", |         "commander": "^2.20.0", | ||||||
|         "source-map": "~0.6.1", |         "source-map": "~0.6.1", | ||||||
|         "source-map-support": "~0.5.12" |         "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": { |     "terser-webpack-plugin": { | ||||||
|       "version": "3.0.5", |       "version": "3.0.6", | ||||||
|       "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-3.0.5.tgz", |       "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-3.0.6.tgz", | ||||||
|       "integrity": "sha512-pyHUyfQUZB3ciYL81GgXzDh8Qb3fGED77xDjZVSFYSN1cQnWgC51OMPKj7vBWVZx0GGuYhpa9+Vz2KxkzXWhBA==", |       "integrity": "sha512-z3HLOOPUHkCNGkeEHqqiMAIy1pjpHwS1o+i6Zn0Ws3EAvHJj46737efNNEvJ0Vx9BdDQM83d56qySDJOSORA0A==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "requires": { |       "requires": { | ||||||
|         "cacache": "^15.0.4", |         "cacache": "^15.0.4", | ||||||
| @@ -7554,7 +7548,7 @@ | |||||||
|         "schema-utils": "^2.6.6", |         "schema-utils": "^2.6.6", | ||||||
|         "serialize-javascript": "^4.0.0", |         "serialize-javascript": "^4.0.0", | ||||||
|         "source-map": "^0.6.1", |         "source-map": "^0.6.1", | ||||||
|         "terser": "^4.6.13", |         "terser": "^4.8.0", | ||||||
|         "webpack-sources": "^1.4.3" |         "webpack-sources": "^1.4.3" | ||||||
|       }, |       }, | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
| @@ -8033,9 +8027,9 @@ | |||||||
|       "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==" |       "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==" | ||||||
|     }, |     }, | ||||||
|     "webpack": { |     "webpack": { | ||||||
|       "version": "5.0.0-beta.18", |       "version": "5.0.0-beta.20", | ||||||
|       "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.0.0-beta.18.tgz", |       "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.0.0-beta.20.tgz", | ||||||
|       "integrity": "sha512-v+kyUEA1sQnSP6gcchyEY/Jufb1XEbniCmA7uXvWXWFPQnN51ChW8liF0FgUre8yYI5jRqVsNHFw3H9rGCB8qw==", |       "integrity": "sha512-bIUAephArRkyWBzhLJ7OD5ys+jTNgANuJJy4+qhAWd5De4T0l/qKrVYdXZCbAj3PXUdxyEL5KsJHPQHacyfBGQ==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "requires": { |       "requires": { | ||||||
|         "@types/estree": "0.0.42", |         "@types/estree": "0.0.42", | ||||||
|   | |||||||
| @@ -76,7 +76,7 @@ | |||||||
|   }, |   }, | ||||||
|   "devDependencies": { |   "devDependencies": { | ||||||
|     "cross-env": "^7.0.2", |     "cross-env": "^7.0.2", | ||||||
|     "electron": "10.0.0-beta.4", |     "electron": "10.0.0-beta.8", | ||||||
|     "electron-builder": "22.7.0", |     "electron-builder": "22.7.0", | ||||||
|     "electron-packager": "15.0.0", |     "electron-packager": "15.0.0", | ||||||
|     "electron-rebuild": "1.11.0", |     "electron-rebuild": "1.11.0", | ||||||
| @@ -84,7 +84,7 @@ | |||||||
|     "jasmine": "^3.5.0", |     "jasmine": "^3.5.0", | ||||||
|     "jsdoc": "3.6.4", |     "jsdoc": "3.6.4", | ||||||
|     "lorem-ipsum": "2.0.3", |     "lorem-ipsum": "2.0.3", | ||||||
|     "webpack": "5.0.0-beta.18", |     "webpack": "5.0.0-beta.20", | ||||||
|     "webpack-cli": "4.0.0-beta.8" |     "webpack-cli": "4.0.0-beta.8" | ||||||
|   }, |   }, | ||||||
|   "optionalDependencies": { |   "optionalDependencies": { | ||||||
|   | |||||||
| @@ -37,9 +37,18 @@ const TPL = ` | |||||||
|         .attr-edit td input { |         .attr-edit td input { | ||||||
|             width: 100%; |             width: 100%; | ||||||
|         } |         } | ||||||
|  |          | ||||||
|  |         .close-attr-detail-button { | ||||||
|  |             font-size: x-large; | ||||||
|  |             cursor: pointer; | ||||||
|  |         } | ||||||
|     </style> |     </style> | ||||||
|  |  | ||||||
|     <h5>Label detail</h5> |     <div style="display: flex; justify-content: space-between;"> | ||||||
|  |         <h5>Label detail</h5> | ||||||
|  |          | ||||||
|  |         <span class="bx bx-x close-attr-detail-button"></span> | ||||||
|  |     </div> | ||||||
|  |  | ||||||
|     <table class="attr-edit"> |     <table class="attr-edit"> | ||||||
|         <tr> |         <tr> | ||||||
| @@ -91,8 +100,17 @@ export default class AttributeDetailWidget extends BasicWidget { | |||||||
|         this.$attrEditName = this.$widget.find('.attr-edit-name'); |         this.$attrEditName = this.$widget.find('.attr-edit-name'); | ||||||
|         this.$attrEditValue = this.$widget.find('.attr-edit-value'); |         this.$attrEditValue = this.$widget.find('.attr-edit-value'); | ||||||
|         this.$attrEditInheritable = this.$widget.find('.attr-edit-inheritable'); |         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) { |     async showAttributeDetail(attr, x, y) { | ||||||
| @@ -140,7 +158,7 @@ export default class AttributeDetailWidget extends BasicWidget { | |||||||
|             this.$relatedNotesMoreNotes.hide(); |             this.$relatedNotesMoreNotes.hide(); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         this.$attrEditName.val(attr.name); |         this.$attrEditName.val(attr.name).focus(); | ||||||
|         this.$attrEditValue.val(attr.value); |         this.$attrEditValue.val(attr.value); | ||||||
|  |  | ||||||
|         this.$widget.css("left", x - this.$widget.width() / 2); |         this.$widget.css("left", x - this.$widget.width() / 2); | ||||||
|   | |||||||
| @@ -70,8 +70,6 @@ export default class CollapsibleWidget extends TabAwareWidget { | |||||||
|         this.initialized = this.doRenderBody(); |         this.initialized = this.doRenderBody(); | ||||||
|  |  | ||||||
|         this.decorateWidget(); |         this.decorateWidget(); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     saveCollapsed(collapse) { |     saveCollapsed(collapse) { | ||||||
| @@ -99,4 +97,4 @@ export default class CollapsibleWidget extends TabAwareWidget { | |||||||
|     isExpanded() { |     isExpanded() { | ||||||
|         return this.$bodyWrapper.hasClass("show"); |         return this.$bodyWrapper.hasClass("show"); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -40,7 +40,5 @@ export default class FlexContainer extends BasicWidget { | |||||||
|         for (const widget of this.children) { |         for (const widget of this.children) { | ||||||
|             this.$widget.append(widget.render()); |             this.$widget.append(widget.render()); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -113,7 +113,5 @@ export default class GlobalMenuWidget extends BasicWidget { | |||||||
|         this.$widget.find(".logout-button").toggle(!utils.isElectron()); |         this.$widget.find(".logout-button").toggle(!utils.isElectron()); | ||||||
|  |  | ||||||
|         this.$widget.find(".open-dev-tools-button").toggle(utils.isElectron()); |         this.$widget.find(".open-dev-tools-button").toggle(utils.isElectron()); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -51,8 +51,6 @@ export default class HistoryNavigationWidget extends BasicWidget { | |||||||
|         else { |         else { | ||||||
|             this.$widget = $("<div>"); |             this.$widget = $("<div>"); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     async showContextMenu(e) { |     async showContextMenu(e) { | ||||||
| @@ -101,4 +99,4 @@ export default class HistoryNavigationWidget extends BasicWidget { | |||||||
|     activeNoteChangedEvent() { |     activeNoteChangedEvent() { | ||||||
|         this.refresh(); |         this.refresh(); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -10,9 +10,7 @@ class CloseDetailButtonWidget extends BasicWidget { | |||||||
|         this.$widget = $(TPL); |         this.$widget = $(TPL); | ||||||
|  |  | ||||||
|         this.$widget.on('click', () => this.triggerCommand('setActiveScreen', {screen:'tree'})); |         this.$widget.on('click', () => this.triggerCommand('setActiveScreen', {screen:'tree'})); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
| export default CloseDetailButtonWidget; | export default CloseDetailButtonWidget; | ||||||
|   | |||||||
| @@ -38,9 +38,7 @@ class MobileDetailMenuWidget extends BasicWidget { | |||||||
|                 } |                 } | ||||||
|             }); |             }); | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
| export default MobileDetailMenuWidget; | export default MobileDetailMenuWidget; | ||||||
|   | |||||||
| @@ -113,8 +113,6 @@ export default class NoteActionsWidget extends TabAwareWidget { | |||||||
|  |  | ||||||
|         this.$unprotectButton = this.$widget.find(".unprotect-button"); |         this.$unprotectButton = this.$widget.find(".unprotect-button"); | ||||||
|         this.$unprotectButton.on('click', () => protectedSessionService.protectNote(this.noteId, false, false)); |         this.$unprotectButton.on('click', () => protectedSessionService.protectNote(this.noteId, false, false)); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     refreshWithNote(note) { |     refreshWithNote(note) { | ||||||
| @@ -140,4 +138,4 @@ export default class NoteActionsWidget extends TabAwareWidget { | |||||||
|             this.refresh(); |             this.refresh(); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -234,12 +234,6 @@ export default class NoteAttributesWidget extends TabAwareWidget { | |||||||
|             this.attributeDetailWidget.hide(); |             this.attributeDetailWidget.hide(); | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|         this.$editor.on('blur', () => { |  | ||||||
|             this.save(); |  | ||||||
|  |  | ||||||
|             this.attributeDetailWidget.hide(); |  | ||||||
|         }); |  | ||||||
|  |  | ||||||
|         this.$widget.append(this.attributeDetailWidget.render()); |         this.$widget.append(this.attributeDetailWidget.render()); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -100,8 +100,6 @@ export default class NoteDetailWidget extends TabAwareWidget { | |||||||
|                 replaceUnderscoresWithSpaces: true |                 replaceUnderscoresWithSpaces: true | ||||||
|             }); |             }); | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     async refresh() { |     async refresh() { | ||||||
|   | |||||||
| @@ -57,8 +57,6 @@ export default class NotePathsWidget extends TabAwareWidget { | |||||||
|         this.$notePathList = this.$dropdown.find(".note-path-list"); |         this.$notePathList = this.$dropdown.find(".note-path-list"); | ||||||
|  |  | ||||||
|         this.$dropdown.on('show.bs.dropdown', () => this.renderDropdown()); |         this.$dropdown.on('show.bs.dropdown', () => this.renderDropdown()); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     async refreshWithNote(note, notePath) { |     async refreshWithNote(note, notePath) { | ||||||
|   | |||||||
| @@ -48,8 +48,6 @@ export default class NoteTitleWidget extends TabAwareWidget { | |||||||
|         utils.bindElShortcut(this.$noteTitle, 'return', () => { |         utils.bindElShortcut(this.$noteTitle, 'return', () => { | ||||||
|             this.triggerCommand('focusOnAttributes', {tabId: this.tabContext.tabId}); |             this.triggerCommand('focusOnAttributes', {tabId: this.tabContext.tabId}); | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     async refreshWithNote(note) { |     async refreshWithNote(note) { | ||||||
|   | |||||||
| @@ -250,8 +250,6 @@ export default class NoteTreeWidget extends TabAwareWidget { | |||||||
|         this.initialized = this.initFancyTree(); |         this.initialized = this.initFancyTree(); | ||||||
|  |  | ||||||
|         this.setupNoteTitleTooltip(); |         this.setupNoteTitleTooltip(); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     setupNoteTitleTooltip() { |     setupNoteTitleTooltip() { | ||||||
|   | |||||||
| @@ -40,8 +40,6 @@ export default class NoteTypeWidget extends TabAwareWidget { | |||||||
|         this.$noteTypeDropdown = this.$widget.find(".note-type-dropdown"); |         this.$noteTypeDropdown = this.$widget.find(".note-type-dropdown"); | ||||||
|         this.$noteTypeButton = this.$widget.find(".note-type-button"); |         this.$noteTypeButton = this.$widget.find(".note-type-button"); | ||||||
|         this.$noteTypeDesc = this.$widget.find(".note-type-desc"); |         this.$noteTypeDesc = this.$widget.find(".note-type-desc"); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     async refreshWithNote(note) { |     async refreshWithNote(note) { | ||||||
| @@ -147,4 +145,4 @@ export default class NoteTypeWidget extends TabAwareWidget { | |||||||
|             this.refresh(); |             this.refresh(); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -32,8 +32,6 @@ export default class PromotedAttributesWidget extends TabAwareWidget { | |||||||
|         this.$widget = $(TPL); |         this.$widget = $(TPL); | ||||||
|  |  | ||||||
|         this.$container = this.$widget.find(".promoted-attributes"); |         this.$container = this.$widget.find(".promoted-attributes"); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     async refreshWithNote(note) { |     async refreshWithNote(note) { | ||||||
|   | |||||||
| @@ -17,8 +17,6 @@ export default class RunScriptButtonsWidget extends TabAwareWidget { | |||||||
|  |  | ||||||
|         this.$renderButton = this.$widget.find('.render-button'); |         this.$renderButton = this.$widget.find('.render-button'); | ||||||
|         this.$executeScriptButton = this.$widget.find('.execute-script-button'); |         this.$executeScriptButton = this.$widget.find('.execute-script-button'); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     refreshWithNote(note) { |     refreshWithNote(note) { | ||||||
| @@ -31,4 +29,4 @@ export default class RunScriptButtonsWidget extends TabAwareWidget { | |||||||
|             this.refresh(); |             this.refresh(); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -71,8 +71,6 @@ export default class SearchBoxWidget extends BasicWidget { | |||||||
|         this.$saveSearchButton.on('click', () => this.saveSearch()); |         this.$saveSearchButton.on('click', () => this.saveSearch()); | ||||||
|  |  | ||||||
|         this.$closeSearchButton.on('click', () => this.hideSearch()); |         this.$closeSearchButton.on('click', () => this.hideSearch()); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     doSearch(searchText) { |     doSearch(searchText) { | ||||||
| @@ -174,4 +172,4 @@ export default class SearchBoxWidget extends BasicWidget { | |||||||
|  |  | ||||||
|         this.$searchInput.val(`@in=${noteId} @text*=*`); |         this.$searchInput.val(`@in=${noteId} @text*=*`); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -35,8 +35,6 @@ export default class SearchResultsWidget extends BasicWidget { | |||||||
|         this.$searchResultsInner = this.$widget.find(".search-results-list"); |         this.$searchResultsInner = this.$widget.find(".search-results-list"); | ||||||
|  |  | ||||||
|         this.toggleInt(false); |         this.toggleInt(false); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     searchResultsEvent({results}) { |     searchResultsEvent({results}) { | ||||||
|   | |||||||
| @@ -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(".show-left-pane-button").on('click', () => this.toggleAndSave('left', true)); | ||||||
|         this.$widget.find(".hide-left-pane-button").on('click', () => this.toggleAndSave('left', false)); |         this.$widget.find(".hide-left-pane-button").on('click', () => this.toggleAndSave('left', false)); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     toggleSidebar(side, show) { |     toggleSidebar(side, show) { | ||||||
|   | |||||||
| @@ -267,8 +267,6 @@ export default class TabRowWidget extends BasicWidget { | |||||||
|                 } |                 } | ||||||
|             }); |             }); | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     setupStyle() { |     setupStyle() { | ||||||
|   | |||||||
| @@ -63,7 +63,5 @@ export default class TitleBarButtonsWidget extends BasicWidget { | |||||||
|             const {remote} = utils.dynamicRequire('electron'); |             const {remote} = utils.dynamicRequire('electron'); | ||||||
|             remote.BrowserWindow.getFocusedWindow().close(); |             remote.BrowserWindow.getFocusedWindow().close(); | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -170,8 +170,6 @@ export default class BookTypeWidget extends TypeWidget { | |||||||
|  |  | ||||||
|             $card.find('.note-book-children-content').empty(); |             $card.find('.note-book-children-content').empty(); | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     async expandCard($card) { |     async expandCard($card) { | ||||||
|   | |||||||
| @@ -14,7 +14,5 @@ export default class DeletedTypeWidget extends TypeWidget { | |||||||
|  |  | ||||||
|     doRender() { |     doRender() { | ||||||
|         this.$widget = $(TPL); |         this.$widget = $(TPL); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -82,8 +82,6 @@ export default class EditableCodeTypeWidget extends TypeWidget { | |||||||
|         this.$sqlConsoleExecuteButton.on('click', () => this.execute()); |         this.$sqlConsoleExecuteButton.on('click', () => this.execute()); | ||||||
|  |  | ||||||
|         this.initialized = this.initEditor(); |         this.initialized = this.initEditor(); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     async initEditor() { |     async initEditor() { | ||||||
|   | |||||||
| @@ -88,8 +88,6 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget { | |||||||
|         keyboardActionService.setupActionsForElement('text-detail', this.$widget, this); |         keyboardActionService.setupActionsForElement('text-detail', this.$widget, this); | ||||||
|  |  | ||||||
|         super.doRender(); |         super.doRender(); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     async initEditor() { |     async initEditor() { | ||||||
|   | |||||||
| @@ -31,11 +31,9 @@ export default class EmptyTypeWidget extends TypeWidget { | |||||||
|             }); |             }); | ||||||
|  |  | ||||||
|         noteAutocompleteService.showRecentNotes(this.$autoComplete); |         noteAutocompleteService.showRecentNotes(this.$autoComplete); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     doRefresh(note) { |     doRefresh(note) { | ||||||
|         this.$autoComplete.trigger('focus'); |         this.$autoComplete.trigger('focus'); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -116,8 +116,6 @@ export default class FileTypeWidget extends TypeWidget { | |||||||
|                 toastService.showError("Upload of a new file revision failed."); |                 toastService.showError("Upload of a new file revision failed."); | ||||||
|             } |             } | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     async doRefresh(note) { |     async doRefresh(note) { | ||||||
|   | |||||||
| @@ -119,8 +119,6 @@ class ImageTypeWidget extends TypeWidget { | |||||||
|                 toastService.showError("Upload of a new image revision failed: " + result.message); |                 toastService.showError("Upload of a new image revision failed: " + result.message); | ||||||
|             } |             } | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     async doRefresh(note) { |     async doRefresh(note) { | ||||||
|   | |||||||
| @@ -36,7 +36,5 @@ export default class ProtectedSessionTypeWidget extends TypeWidget { | |||||||
|  |  | ||||||
|             return false; |             return false; | ||||||
|         }); |         }); | ||||||
|          |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -32,8 +32,6 @@ export default class ReadOnlyCodeTypeWidget extends TypeWidget { | |||||||
|  |  | ||||||
|             this.triggerEvent('codePreviewDisabled', {tabContext: this.tabContext}); |             this.triggerEvent('codePreviewDisabled', {tabContext: this.tabContext}); | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     async doRefresh(note) { |     async doRefresh(note) { | ||||||
|   | |||||||
| @@ -52,8 +52,6 @@ export default class ReadOnlyTextTypeWidget extends AbstractTextTypeWidget { | |||||||
|         }); |         }); | ||||||
|  |  | ||||||
|         super.doRender(); |         super.doRender(); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     cleanup() { |     cleanup() { | ||||||
|   | |||||||
| @@ -182,8 +182,6 @@ export default class RelationMapTypeWidget extends TypeWidget { | |||||||
|  |  | ||||||
|             jsPlumb.ready(res); |             jsPlumb.ready(res); | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     async contextMenuHandler(command, originalTarget) { |     async contextMenuHandler(command, originalTarget) { | ||||||
| @@ -632,4 +630,4 @@ export default class RelationMapTypeWidget extends TypeWidget { | |||||||
|     getContent() { |     getContent() { | ||||||
|         return JSON.stringify(this.mapData); |         return JSON.stringify(this.mapData); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -25,8 +25,6 @@ export default class RenderTypeWidget extends TypeWidget { | |||||||
|         this.$widget = $(TPL); |         this.$widget = $(TPL); | ||||||
|         this.$noteDetailRenderHelp = this.$widget.find('.note-detail-render-help'); |         this.$noteDetailRenderHelp = this.$widget.find('.note-detail-render-help'); | ||||||
|         this.$noteDetailRenderContent = this.$widget.find('.note-detail-render-content'); |         this.$noteDetailRenderContent = this.$widget.find('.note-detail-render-content'); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     async doRefresh(note) { |     async doRefresh(note) { | ||||||
| @@ -49,4 +47,4 @@ export default class RenderTypeWidget extends TypeWidget { | |||||||
|             this.refresh(); |             this.refresh(); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -20,8 +20,6 @@ export default class SearchTypeWidget extends TypeWidget { | |||||||
|         this.$searchString = this.$widget.find(".search-string"); |         this.$searchString = this.$widget.find(".search-string"); | ||||||
|         this.$component = this.$widget.find('.note-detail-search'); |         this.$component = this.$widget.find('.note-detail-search'); | ||||||
|         this.$help = this.$widget.find(".note-detail-search-help"); |         this.$help = this.$widget.find(".note-detail-search-help"); | ||||||
|  |  | ||||||
|         return this.$widget; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     async doRefresh(note) { |     async doRefresh(note) { | ||||||
| @@ -48,4 +46,4 @@ export default class SearchTypeWidget extends TypeWidget { | |||||||
|             searchString: this.$searchString.val() |             searchString: this.$searchString.val() | ||||||
|         }); |         }); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user