mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-30 01:36:24 +01:00 
			
		
		
		
	Compare commits
	
		
			37 Commits
		
	
	
		
			v0.49.1-be
			...
			v0.49.4
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | d04d356429 | ||
|  | be59f248e8 | ||
|  | 1995b54770 | ||
|  | f2732bcab7 | ||
|  | 0e9d76890b | ||
|  | 9df521109b | ||
|  | 75b65c396e | ||
|  | d4d48f3834 | ||
|  | b90ba3d1a9 | ||
|  | 82ba0d5b1d | ||
|  | 590eea1183 | ||
|  | e6f3cc7988 | ||
|  | 7a650c605c | ||
|  | dfa7c64b1f | ||
|  | 2b10023055 | ||
|  | 168645cce9 | ||
|  | f4c81ecefb | ||
|  | 5a85fe92aa | ||
|  | feffd57f24 | ||
|  | faf81ae056 | ||
|  | 003fec4b11 | ||
|  | 5ecb603e86 | ||
|  | 1fed71a92e | ||
|  | dad82ea4e8 | ||
|  | 067251861d | ||
|  | 6bc8773d5f | ||
|  | a910034c96 | ||
|  | 257cc66f62 | ||
|  | 00f24bdb63 | ||
|  | fada3fe623 | ||
|  | d97e454463 | ||
|  | 3128a7d62f | ||
|  | b8fe9a41db | ||
|  | 8366a94bde | ||
|  | f56123b864 | ||
|  | ae951bfe23 | ||
|  | 265401775b | 
| @@ -44,7 +44,7 @@ find $DIR/node_modules -name demo -exec rm -rf {} \; | ||||
|  | ||||
| find $DIR/libraries -name "*.map" -type f -delete | ||||
|  | ||||
| rm -r $DIR/src/public/app | ||||
| rm -rf $DIR/src/public/app | ||||
|  | ||||
| sed -i -e 's/app\/desktop.js/app-dist\/desktop.js/g' $DIR/src/views/desktop.ejs | ||||
| sed -i -e 's/app\/mobile.js/app-dist\/mobile.js/g' $DIR/src/views/mobile.ejs | ||||
|   | ||||
							
								
								
									
										1
									
								
								db/migrations/0184__NOOP.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								db/migrations/0184__NOOP.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| module.exports = () => console.log("NOOP, moved to migration 0189"); | ||||
| @@ -1,3 +1,13 @@ | ||||
| -- delete duplicates https://github.com/zadam/trilium/issues/2534 | ||||
| DELETE FROM entity_changes WHERE isErased = 0 AND id IN ( | ||||
|     SELECT id FROM entity_changes ec | ||||
|     WHERE ( | ||||
|               SELECT COUNT(*) FROM entity_changes | ||||
|               WHERE ec.entityName = entity_changes.entityName | ||||
|                 AND ec.entityId = entity_changes.entityId | ||||
|           ) > 1 | ||||
| ); | ||||
|  | ||||
| CREATE TABLE IF NOT EXISTS "mig_entity_changes" ( | ||||
|                                                 `id`	INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, | ||||
|                                                 `entityName`	TEXT NOT NULL, | ||||
| @@ -10,8 +20,8 @@ CREATE TABLE IF NOT EXISTS "mig_entity_changes" ( | ||||
|                                                 `utcDateChanged` TEXT NOT NULL | ||||
| ); | ||||
|  | ||||
| INSERT INTO mig_entity_changes (entityName, entityId, hash, isErased, changeId, sourceId, isSynced, utcDateChanged) | ||||
|     SELECT entityName, entityId, hash, isErased, '', sourceId, isSynced, utcDateChanged FROM entity_changes; | ||||
| INSERT INTO mig_entity_changes (id, entityName, entityId, hash, isErased, changeId, sourceId, isSynced, utcDateChanged) | ||||
|     SELECT id, entityName, entityId, hash, isErased, '', sourceId, isSynced, utcDateChanged FROM entity_changes; | ||||
|  | ||||
| DROP TABLE  entity_changes; | ||||
|  | ||||
|   | ||||
| @@ -363,7 +363,9 @@ | ||||
| </div> | ||||
|  | ||||
| <nav> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="sql%250A%250ATODO_%2520some%2520methods%2520(like%2520getValue())%2520could%2520use%2520raw%2520rowsmodule_.html">sql | ||||
|  | ||||
| TODO: some methods (like getValue()) could use raw rows</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
| </nav> | ||||
|  | ||||
| <br class="clear"> | ||||
|   | ||||
| @@ -1020,7 +1020,9 @@ and relation (representing named relationship between source and target note)</d | ||||
| </div> | ||||
|  | ||||
| <nav> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="sql%250A%250ATODO_%2520some%2520methods%2520(like%2520getValue())%2520could%2520use%2520raw%2520rowsmodule_.html">sql | ||||
|  | ||||
| TODO: some methods (like getValue()) could use raw rows</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
| </nav> | ||||
|  | ||||
| <br class="clear"> | ||||
|   | ||||
| @@ -614,7 +614,7 @@ | ||||
|             <td class="type"> | ||||
|              | ||||
|                  | ||||
| <span class="param-type"><a href="module-sql.html">module:sql</a></span> | ||||
| <span class="param-type">module:sql</span> | ||||
|  | ||||
|  | ||||
|              | ||||
| @@ -5493,7 +5493,7 @@ This method looks similar to toggleNoteInParent() but differs because we're look | ||||
|  | ||||
|              | ||||
|  | ||||
|             <td class="description last">if branch will be create between note and parent note, set this prefix</td> | ||||
|             <td class="description last">if branch will be created between note and parent note, set this prefix</td> | ||||
|         </tr> | ||||
|  | ||||
|      | ||||
| @@ -5913,7 +5913,9 @@ exists, then we'll use that transaction. | ||||
| </div> | ||||
|  | ||||
| <nav> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="sql%250A%250ATODO_%2520some%2520methods%2520(like%2520getValue())%2520could%2520use%2520raw%2520rowsmodule_.html">sql | ||||
|  | ||||
| TODO: some methods (like getValue()) could use raw rows</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
| </nav> | ||||
|  | ||||
| <br class="clear"> | ||||
|   | ||||
| @@ -252,7 +252,7 @@ parents.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line85">line 85</a> | ||||
|         <a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line88">line 88</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -514,7 +514,7 @@ parents.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line99">line 99</a> | ||||
|         <a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line102">line 102</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -752,7 +752,9 @@ parents.</div> | ||||
| </div> | ||||
|  | ||||
| <nav> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="sql%250A%250ATODO_%2520some%2520methods%2520(like%2520getValue())%2520could%2520use%2520raw%2520rowsmodule_.html">sql | ||||
|  | ||||
| TODO: some methods (like getValue()) could use raw rows</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
| </nav> | ||||
|  | ||||
| <br class="clear"> | ||||
|   | ||||
| @@ -1517,7 +1517,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line395">line 395</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line398">line 398</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -1619,7 +1619,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1011">line 1011</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1014">line 1014</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -1721,7 +1721,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line933">line 933</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line936">line 936</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -1827,7 +1827,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line855">line 855</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line858">line 858</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -2001,7 +2001,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line513">line 513</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line516">line 516</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -2201,7 +2201,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line326">line 326</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line329">line 329</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -2379,7 +2379,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line524">line 524</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line527">line 527</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -2476,6 +2476,8 @@ | ||||
|      | ||||
|  | ||||
|      | ||||
|         <dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>use getParentBranches() instead</li></ul></dd> | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
| @@ -2488,7 +2490,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line140">line 140</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line143">line 143</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -2590,7 +2592,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line160">line 160</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line163">line 163</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -2692,7 +2694,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line150">line 150</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line153">line 153</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -2794,7 +2796,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line174">line 174</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line177">line 177</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -2896,7 +2898,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line208">line 208</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line211">line 211</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -3004,7 +3006,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line650">line 650</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line653">line 653</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -3110,7 +3112,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line219">line 219</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line222">line 222</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -3261,7 +3263,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line455">line 455</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line458">line 458</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -3431,7 +3433,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line545">line 545</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line548">line 548</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -3586,7 +3588,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line479">line 479</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line482">line 482</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -3756,7 +3758,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line553">line 553</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line556">line 556</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -3862,7 +3864,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line619">line 619</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line622">line 622</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -4064,7 +4066,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line594">line 594</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line597">line 597</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -4242,7 +4244,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line535">line 535</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line538">line 538</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -4400,7 +4402,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line461">line 461</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line464">line 464</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -4570,7 +4572,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line561">line 561</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line564">line 564</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -4725,7 +4727,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line485">line 485</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line488">line 488</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -4895,7 +4897,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line569">line 569</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line572">line 572</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -5050,7 +5052,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line473">line 473</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line476">line 476</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -5220,7 +5222,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line585">line 585</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line588">line 588</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -5375,7 +5377,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line497">line 497</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line500">line 500</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -5586,7 +5588,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line145">line 145</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line148">line 148</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -5737,7 +5739,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line467">line 467</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line470">line 470</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -5907,7 +5909,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line577">line 577</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line580">line 580</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -6062,7 +6064,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line491">line 491</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line494">line 494</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -6171,7 +6173,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line305">line 305</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line308">line 308</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -6280,7 +6282,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line798">line 798</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line801">line 801</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -6382,7 +6384,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line777">line 777</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line780">line 780</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -6484,7 +6486,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line746">line 746</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line749">line 749</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -6586,7 +6588,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line895">line 895</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line898">line 898</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -6693,7 +6695,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line879">line 879</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line882">line 882</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -6795,7 +6797,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line155">line 155</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line158">line 158</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -6946,7 +6948,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line431">line 431</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line434">line 434</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -7124,7 +7126,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line504">line 504</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line507">line 507</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -7279,7 +7281,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line437">line 437</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line440">line 440</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -7434,7 +7436,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line449">line 449</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line452">line 452</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -7589,7 +7591,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line443">line 443</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line446">line 446</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -7739,7 +7741,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line954">line 954</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line957">line 957</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -7845,7 +7847,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line294">line 294</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line297">line 297</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -7951,7 +7953,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line286">line 286</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line289">line 289</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -8057,7 +8059,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line281">line 281</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line284">line 284</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -8163,7 +8165,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line276">line 276</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line279">line 279</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -8269,7 +8271,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line300">line 300</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line303">line 303</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -8502,7 +8504,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line998">line 998</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1001">line 1001</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -8682,7 +8684,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1089">line 1089</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1092">line 1092</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -8862,7 +8864,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1097">line 1097</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1100">line 1100</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -9073,7 +9075,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line967">line 967</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line970">line 970</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -9253,7 +9255,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1073">line 1073</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1076">line 1076</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -9413,7 +9415,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1081">line 1081</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1084">line 1084</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -9655,7 +9657,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1040">line 1040</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1043">line 1043</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -9866,7 +9868,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1056">line 1056</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1059">line 1059</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -10077,7 +10079,7 @@ This method can be significantly faster than the getAttribute() | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1065">line 1065</a> | ||||
|         <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1068">line 1068</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -10123,7 +10125,9 @@ This method can be significantly faster than the getAttribute() | ||||
| </div> | ||||
|  | ||||
| <nav> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="sql%250A%250ATODO_%2520some%2520methods%2520(like%2520getValue())%2520could%2520use%2520raw%2520rowsmodule_.html">sql | ||||
|  | ||||
| TODO: some methods (like getValue()) could use raw rows</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
| </nav> | ||||
|  | ||||
| <br class="clear"> | ||||
|   | ||||
| @@ -1290,7 +1290,9 @@ It's used for seamless note versioning.</div> | ||||
| </div> | ||||
|  | ||||
| <nav> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="sql%250A%250ATODO_%2520some%2520methods%2520(like%2520getValue())%2520could%2520use%2520raw%2520rowsmodule_.html">sql | ||||
|  | ||||
| TODO: some methods (like getValue()) could use raw rows</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
| </nav> | ||||
|  | ||||
| <br class="clear"> | ||||
|   | ||||
| @@ -431,7 +431,9 @@ | ||||
| </div> | ||||
|  | ||||
| <nav> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="sql%250A%250ATODO_%2520some%2520methods%2520(like%2520getValue())%2520could%2520use%2520raw%2520rowsmodule_.html">sql | ||||
|  | ||||
| TODO: some methods (like getValue()) could use raw rows</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
| </nav> | ||||
|  | ||||
| <br class="clear"> | ||||
|   | ||||
| @@ -363,7 +363,9 @@ | ||||
| </div> | ||||
|  | ||||
| <nav> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="sql%250A%250ATODO_%2520some%2520methods%2520(like%2520getValue())%2520could%2520use%2520raw%2520rowsmodule_.html">sql | ||||
|  | ||||
| TODO: some methods (like getValue()) could use raw rows</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
| </nav> | ||||
|  | ||||
| <br class="clear"> | ||||
|   | ||||
| @@ -70,7 +70,9 @@ module.exports = ApiToken; | ||||
| </div> | ||||
|  | ||||
| <nav> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="sql%250A%250ATODO_%2520some%2520methods%2520(like%2520getValue())%2520could%2520use%2520raw%2520rowsmodule_.html">sql | ||||
|  | ||||
| TODO: some methods (like getValue()) could use raw rows</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
| </nav> | ||||
|  | ||||
| <br class="clear"> | ||||
|   | ||||
| @@ -245,7 +245,9 @@ module.exports = Attribute; | ||||
| </div> | ||||
|  | ||||
| <nav> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="sql%250A%250ATODO_%2520some%2520methods%2520(like%2520getValue())%2520could%2520use%2520raw%2520rowsmodule_.html">sql | ||||
|  | ||||
| TODO: some methods (like getValue()) could use raw rows</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
| </nav> | ||||
|  | ||||
| <br class="clear"> | ||||
|   | ||||
| @@ -86,6 +86,12 @@ class Branch extends AbstractEntity { | ||||
|     } | ||||
|  | ||||
|     init() { | ||||
|         if (this.branchId) { | ||||
|             this.becca.branches[this.branchId] = this; | ||||
|         } | ||||
|  | ||||
|         this.becca.childParentToBranch[`${this.noteId}-${this.parentNoteId}`] = this; | ||||
|  | ||||
|         if (this.branchId === 'root') { | ||||
|             return; | ||||
|         } | ||||
| @@ -104,15 +110,12 @@ class Branch extends AbstractEntity { | ||||
|         if (!parentNote.children.includes(childNote)) { | ||||
|             parentNote.children.push(childNote); | ||||
|         } | ||||
|  | ||||
|         this.becca.branches[this.branchId] = this; | ||||
|         this.becca.childParentToBranch[`${this.noteId}-${this.parentNoteId}`] = this; | ||||
|     } | ||||
|  | ||||
|     /** @returns {Note} */ | ||||
|     get childNote() { | ||||
|         if (!(this.noteId in this.becca.notes)) { | ||||
|             // entities can come out of order in sync, create skeleton which will be filled later | ||||
|             // entities can come out of order in sync/import, create skeleton which will be filled later | ||||
|             this.becca.addNote(this.noteId, new Note({noteId: this.noteId})); | ||||
|         } | ||||
|  | ||||
| @@ -126,7 +129,7 @@ class Branch extends AbstractEntity { | ||||
|     /** @returns {Note} */ | ||||
|     get parentNote() { | ||||
|         if (!(this.parentNoteId in this.becca.notes)) { | ||||
|             // entities can come out of order in sync, create skeleton which will be filled later | ||||
|             // entities can come out of order in sync/import, create skeleton which will be filled later | ||||
|             this.becca.addNote(this.parentNoteId, new Note({noteId: this.parentNoteId})); | ||||
|         } | ||||
|  | ||||
| @@ -164,9 +167,7 @@ class Branch extends AbstractEntity { | ||||
|             notePosition: this.notePosition, | ||||
|             isExpanded: this.isExpanded, | ||||
|             isDeleted: false, | ||||
|             utcDateModified: this.utcDateModified, | ||||
|             // not used for anything, will be later dropped | ||||
|             utcDateCreated: dateUtils.utcNowDateTime() | ||||
|             utcDateModified: this.utcDateModified | ||||
|         }; | ||||
|     } | ||||
|  | ||||
| @@ -192,7 +193,9 @@ module.exports = Branch; | ||||
| </div> | ||||
|  | ||||
| <nav> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="sql%250A%250ATODO_%2520some%2520methods%2520(like%2520getValue())%2520could%2520use%2520raw%2520rowsmodule_.html">sql | ||||
|  | ||||
| TODO: some methods (like getValue()) could use raw rows</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
| </nav> | ||||
|  | ||||
| <br class="clear"> | ||||
|   | ||||
| @@ -164,7 +164,10 @@ class Note extends AbstractEntity { | ||||
|         return this.parentBranches; | ||||
|     } | ||||
|  | ||||
|     /** @returns {Branch[]} */ | ||||
|     /** | ||||
|      * @returns {Branch[]} | ||||
|      * @deprecated use getParentBranches() instead | ||||
|      */ | ||||
|     getBranches() { | ||||
|         return this.parentBranches; | ||||
|     } | ||||
| @@ -1139,7 +1142,7 @@ class Note extends AbstractEntity { | ||||
|  | ||||
|         const branch = this.becca.getNote(parentNoteId).getParentBranches()[0]; | ||||
|  | ||||
|         return cloningService.cloneNoteToParent(this.noteId, branch.branchId); | ||||
|         return cloningService.cloneNoteToBranch(this.noteId, branch.branchId); | ||||
|     } | ||||
|  | ||||
|     decrypt() { | ||||
| @@ -1211,7 +1214,9 @@ module.exports = Note; | ||||
| </div> | ||||
|  | ||||
| <nav> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="sql%250A%250ATODO_%2520some%2520methods%2520(like%2520getValue())%2520could%2520use%2520raw%2520rowsmodule_.html">sql | ||||
|  | ||||
| TODO: some methods (like getValue()) could use raw rows</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
| </nav> | ||||
|  | ||||
| <br class="clear"> | ||||
|   | ||||
| @@ -230,7 +230,9 @@ module.exports = NoteRevision; | ||||
| </div> | ||||
|  | ||||
| <nav> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="sql%250A%250ATODO_%2520some%2520methods%2520(like%2520getValue())%2520could%2520use%2520raw%2520rowsmodule_.html">sql | ||||
|  | ||||
| TODO: some methods (like getValue()) could use raw rows</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
| </nav> | ||||
|  | ||||
| <br class="clear"> | ||||
|   | ||||
| @@ -65,9 +65,7 @@ class Option extends AbstractEntity { | ||||
|             name: this.name, | ||||
|             value: this.value, | ||||
|             isSynced: this.isSynced, | ||||
|             utcDateModified: this.utcDateModified, | ||||
|             // utcDateCreated is scheduled for removal so the value does not matter | ||||
|             utcDateCreated: dateUtils.utcNowDateTime() | ||||
|             utcDateModified: this.utcDateModified | ||||
|         } | ||||
|     } | ||||
| } | ||||
| @@ -83,7 +81,9 @@ module.exports = Option; | ||||
| </div> | ||||
|  | ||||
| <nav> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="sql%250A%250ATODO_%2520some%2520methods%2520(like%2520getValue())%2520could%2520use%2520raw%2520rowsmodule_.html">sql | ||||
|  | ||||
| TODO: some methods (like getValue()) could use raw rows</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
| </nav> | ||||
|  | ||||
| <br class="clear"> | ||||
|   | ||||
| @@ -69,7 +69,9 @@ module.exports = RecentNote; | ||||
| </div> | ||||
|  | ||||
| <nav> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="sql%250A%250ATODO_%2520some%2520methods%2520(like%2520getValue())%2520could%2520use%2520raw%2520rowsmodule_.html">sql | ||||
|  | ||||
| TODO: some methods (like getValue()) could use raw rows</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
| </nav> | ||||
|  | ||||
| <br class="clear"> | ||||
|   | ||||
| @@ -1083,7 +1083,9 @@ | ||||
| </div> | ||||
|  | ||||
| <nav> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="sql%250A%250ATODO_%2520some%2520methods%2520(like%2520getValue())%2520could%2520use%2520raw%2520rowsmodule_.html">sql | ||||
|  | ||||
| TODO: some methods (like getValue()) could use raw rows</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
| </nav> | ||||
|  | ||||
| <br class="clear"> | ||||
|   | ||||
| @@ -50,7 +50,9 @@ | ||||
| </div> | ||||
|  | ||||
| <nav> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="sql%250A%250ATODO_%2520some%2520methods%2520(like%2520getValue())%2520could%2520use%2520raw%2520rowsmodule_.html">sql | ||||
|  | ||||
| TODO: some methods (like getValue()) could use raw rows</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
| </nav> | ||||
|  | ||||
| <br class="clear"> | ||||
|   | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -189,7 +189,7 @@ function BackendScriptApi(currentNote, apiParams) { | ||||
|      * @param {boolean} present - true if we want the branch to exist, false if we want it gone | ||||
|      * @param {string} noteId | ||||
|      * @param {string} parentNoteId | ||||
|      * @param {string} prefix - if branch will be create between note and parent note, set this prefix | ||||
|      * @param {string} prefix - if branch will be created between note and parent note, set this prefix | ||||
|      * @returns {void} | ||||
|      */ | ||||
|     this.toggleNoteInParent = cloningService.toggleNoteInParent; | ||||
| @@ -457,7 +457,9 @@ module.exports = BackendScriptApi; | ||||
| </div> | ||||
|  | ||||
| <nav> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="sql%250A%250ATODO_%2520some%2520methods%2520(like%2520getValue())%2520could%2520use%2520raw%2520rowsmodule_.html">sql | ||||
|  | ||||
| TODO: some methods (like getValue()) could use raw rows</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
| </nav> | ||||
|  | ||||
| <br class="clear"> | ||||
|   | ||||
| @@ -30,6 +30,8 @@ | ||||
|  | ||||
| /** | ||||
|  * @module sql | ||||
|  * | ||||
|  * TODO: some methods (like getValue()) could use raw rows | ||||
|  */ | ||||
|  | ||||
| const log = require('./log'); | ||||
| @@ -117,13 +119,7 @@ function getRowOrNull(query, params = []) { | ||||
| } | ||||
|  | ||||
| function getValue(query, params = []) { | ||||
|     const row = getRowOrNull(query, params); | ||||
|  | ||||
|     if (!row) { | ||||
|         return null; | ||||
|     } | ||||
|  | ||||
|     return row[Object.keys(row)[0]]; | ||||
|     return wrap(query, s => s.pluck().get(params)); | ||||
| } | ||||
|  | ||||
| // smaller values can result in better performance due to better usage of statement cache | ||||
| @@ -172,32 +168,17 @@ function iterateRows(query, params = []) { | ||||
|  | ||||
| function getMap(query, params = []) { | ||||
|     const map = {}; | ||||
|     const results = getRows(query, params); | ||||
|     const results = getRawRows(query, params); | ||||
|  | ||||
|     for (const row of results) { | ||||
|         const keys = Object.keys(row); | ||||
|  | ||||
|         map[row[keys[0]]] = row[keys[1]]; | ||||
|         map[row[0]] = row[1]; | ||||
|     } | ||||
|  | ||||
|     return map; | ||||
| } | ||||
|  | ||||
| function getColumn(query, params = []) { | ||||
|     const list = []; | ||||
|     const result = getRows(query, params); | ||||
|  | ||||
|     if (result.length === 0) { | ||||
|         return list; | ||||
|     } | ||||
|  | ||||
|     const key = Object.keys(result[0])[0]; | ||||
|  | ||||
|     for (const row of result) { | ||||
|         list.push(row[key]); | ||||
|     } | ||||
|  | ||||
|     return list; | ||||
|     return wrap(query, s => s.pluck().all(params)); | ||||
| } | ||||
|  | ||||
| function execute(query, params = []) { | ||||
| @@ -395,7 +376,9 @@ module.exports = { | ||||
| </div> | ||||
|  | ||||
| <nav> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
|     <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="sql%250A%250ATODO_%2520some%2520methods%2520(like%2520getValue())%2520could%2520use%2520raw%2520rowsmodule_.html">sql | ||||
|  | ||||
| TODO: some methods (like getValue()) could use raw rows</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
| </nav> | ||||
|  | ||||
| <br class="clear"> | ||||
|   | ||||
| @@ -1772,7 +1772,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line326">line 326</a> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line327">line 327</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -1928,7 +1928,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line446">line 446</a> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line447">line 447</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -2172,6 +2172,45 @@ | ||||
|         </tr> | ||||
|  | ||||
|      | ||||
|  | ||||
|         <tr> | ||||
|              | ||||
|                 <td class="name"><code>showNoteIcon</code></td> | ||||
|              | ||||
|  | ||||
|             <td class="type"> | ||||
|              | ||||
|                  | ||||
| <span class="param-type">boolean</span> | ||||
|  | ||||
|  | ||||
|              | ||||
|             </td> | ||||
|  | ||||
|              | ||||
|                 <td class="attributes"> | ||||
|                  | ||||
|                     <optional><br> | ||||
|                  | ||||
|  | ||||
|                  | ||||
|  | ||||
|                  | ||||
|                 </td> | ||||
|              | ||||
|  | ||||
|              | ||||
|                 <td class="default"> | ||||
|                  | ||||
|                     false | ||||
|                  | ||||
|                 </td> | ||||
|              | ||||
|  | ||||
|             <td class="description last">show also note icon before the title</td> | ||||
|         </tr> | ||||
|  | ||||
|      | ||||
|     </tbody> | ||||
| </table> | ||||
|  | ||||
| @@ -2249,7 +2288,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line318">line 318</a> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line319">line 319</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -2488,7 +2527,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line332">line 332</a> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line333">line 333</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -2594,7 +2633,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line346">line 346</a> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line347">line 347</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -2748,7 +2787,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line340">line 340</a> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line341">line 341</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -2885,7 +2924,7 @@ | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line397">line 397</a> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line398">line 398</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -3147,7 +3186,7 @@ if some action needs to happen on only one specific instance. | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line415">line 415</a> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line416">line 416</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -3610,7 +3649,7 @@ otherwise (by e.g. createNoteLink()) | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line388">line 388</a> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line389">line 389</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -3765,7 +3804,7 @@ otherwise (by e.g. createNoteLink()) | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line406">line 406</a> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line407">line 407</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -3920,7 +3959,7 @@ otherwise (by e.g. createNoteLink()) | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line424">line 424</a> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line425">line 425</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -4357,7 +4396,7 @@ otherwise (by e.g. createNoteLink()) | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line358">line 358</a> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line359">line 359</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -4513,7 +4552,7 @@ otherwise (by e.g. createNoteLink()) | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line369">line 369</a> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line370">line 370</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -4669,7 +4708,7 @@ otherwise (by e.g. createNoteLink()) | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line378">line 378</a> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line379">line 379</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -4806,7 +4845,7 @@ otherwise (by e.g. createNoteLink()) | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line473">line 473</a> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line474">line 474</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -4960,7 +4999,7 @@ otherwise (by e.g. createNoteLink()) | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line464">line 464</a> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line465">line 465</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -5901,7 +5940,7 @@ Internally this serializes the anonymous function into string and sends it to ba | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line433">line 433</a> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line434">line 434</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -6052,7 +6091,7 @@ Internally this serializes the anonymous function into string and sends it to ba | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line352">line 352</a> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line353">line 353</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -6418,7 +6457,7 @@ Typical use case is when new note has been created, we should wait until it is s | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line457">line 457</a> | ||||
|         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line458">line 458</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
|   | ||||
| @@ -1103,7 +1103,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line475">line 475</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line498">line 498</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -1303,7 +1303,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line216">line 216</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line236">line 236</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -1481,7 +1481,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line497">line 497</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line520">line 520</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -1575,6 +1575,8 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|  | ||||
|      | ||||
|         <dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>use getParentBranches() instead</li></ul></dd> | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
| @@ -1587,7 +1589,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line139">line 139</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line161">line 161</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -1677,6 +1679,8 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|  | ||||
|      | ||||
|         <dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>use getParentBranchIds() instead</li></ul></dd> | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
| @@ -1689,7 +1693,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line134">line 134</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line144">line 144</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -1791,7 +1795,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line151">line 151</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line171">line 171</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -1893,7 +1897,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line189">line 189</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line209">line 209</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -1995,7 +1999,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line194">line 194</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line214">line 214</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -2146,7 +2150,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line537">line 537</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line560">line 560</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -2313,7 +2317,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line364">line 364</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line384">line 384</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -2468,7 +2472,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line561">line 561</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line584">line 584</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -2578,7 +2582,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line683">line 683</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line706">line 706</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -2752,7 +2756,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line464">line 464</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line487">line 487</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -2952,7 +2956,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line203">line 203</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line223">line 223</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -3130,7 +3134,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line486">line 486</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line509">line 509</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -3285,7 +3289,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line531">line 531</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line554">line 554</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -3452,7 +3456,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line356">line 356</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line376">line 376</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -3607,7 +3611,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line555">line 555</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line578">line 578</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -3762,7 +3766,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line543">line 543</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line566">line 566</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -3929,7 +3933,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line429">line 429</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line452">line 452</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -4084,7 +4088,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line567">line 567</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line590">line 590</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -4142,6 +4146,210 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|  | ||||
|      | ||||
|     <h4 class="name" id="getParentBranches"><span class="type-signature"></span>getParentBranches<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Branch.html">Branch</a>>}</span></h4> | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| <dl class="details"> | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line151">line 151</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
| </dl> | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| <h5>Returns:</h5> | ||||
|  | ||||
|          | ||||
|  | ||||
|  | ||||
| <dl> | ||||
|     <dt> | ||||
|         Type | ||||
|     </dt> | ||||
|     <dd> | ||||
|          | ||||
| <span class="param-type">Array.<<a href="Branch.html">Branch</a>></span> | ||||
|  | ||||
|  | ||||
|     </dd> | ||||
| </dl> | ||||
|  | ||||
|      | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|          | ||||
|              | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|     <h4 class="name" id="getParentBranchIds"><span class="type-signature"></span>getParentBranchIds<span class="signature">()</span><span class="type-signature"> → {Array.<string>}</span></h4> | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| <dl class="details"> | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line136">line 136</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
| </dl> | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| <h5>Returns:</h5> | ||||
|  | ||||
|          | ||||
|  | ||||
|  | ||||
| <dl> | ||||
|     <dt> | ||||
|         Type | ||||
|     </dt> | ||||
|     <dd> | ||||
|          | ||||
| <span class="param-type">Array.<string></span> | ||||
|  | ||||
|  | ||||
|     </dd> | ||||
| </dl> | ||||
|  | ||||
|      | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|          | ||||
|              | ||||
|  | ||||
|      | ||||
|  | ||||
|      | ||||
|     <h4 class="name" id="getParentNoteIds"><span class="type-signature"></span>getParentNoteIds<span class="signature">()</span><span class="type-signature"> → {Array.<string>}</span></h4> | ||||
|      | ||||
|  | ||||
| @@ -4190,7 +4398,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line159">line 159</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line179">line 179</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -4292,7 +4500,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line164">line 164</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line184">line 184</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -4443,7 +4651,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line549">line 549</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line572">line 572</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -4610,7 +4818,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line437">line 437</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line460">line 460</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -4765,7 +4973,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line579">line 579</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line602">line 602</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -4935,7 +5143,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line589">line 589</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line612">line 612</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -5086,7 +5294,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line573">line 573</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line596">line 596</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -5192,7 +5400,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line727">line 727</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line750">line 750</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -5305,7 +5513,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line662">line 662</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line685">line 685</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -5411,7 +5619,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line672">line 672</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line695">line 695</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -5513,7 +5721,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line603">line 603</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line626">line 626</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -5687,7 +5895,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line446">line 446</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line469">line 469</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -5793,7 +6001,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line146">line 146</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line166">line 166</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -5944,7 +6152,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line513">line 513</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line536">line 536</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -6122,7 +6330,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line455">line 455</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line478">line 478</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -6277,7 +6485,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line507">line 507</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line530">line 530</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -6432,7 +6640,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line519">line 519</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line542">line 542</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -6587,7 +6795,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line525">line 525</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line548">line 548</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -6695,7 +6903,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line655">line 655</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line678">line 678</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -6779,7 +6987,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line722">line 722</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line745">line 745</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
| @@ -6885,7 +7093,7 @@ This note's representation is used in note tree and is kept in Froca.</div> | ||||
|      | ||||
|     <dt class="tag-source">Source:</dt> | ||||
|     <dd class="tag-source"><ul class="dummy"><li> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line714">line 714</a> | ||||
|         <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line737">line 737</a> | ||||
|     </li></ul></dd> | ||||
|      | ||||
|  | ||||
|   | ||||
| @@ -158,18 +158,38 @@ class NoteShort { | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     /** @returns {string[]} */ | ||||
|     getBranchIds() { | ||||
|     /** | ||||
|      * @returns {string[]} | ||||
|      */ | ||||
|     getParentBranchIds() { | ||||
|         return Object.values(this.parentToBranch); | ||||
|     } | ||||
|  | ||||
|     /** @returns {Branch[]} */ | ||||
|     getBranches() { | ||||
|     /** | ||||
|      * @returns {string[]} | ||||
|      * @deprecated use getParentBranchIds() instead | ||||
|      */ | ||||
|     getBranchIds() { | ||||
|         return this.getParentBranchIds(); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @returns {Branch[]} | ||||
|      */ | ||||
|     getParentBranches() { | ||||
|         const branchIds = Object.values(this.parentToBranch); | ||||
|  | ||||
|         return this.froca.getBranches(branchIds); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @returns {Branch[]} | ||||
|      * @deprecated use getParentBranches() instead | ||||
|      */ | ||||
|     getBranches() { | ||||
|         return this.getParentBranches(); | ||||
|     } | ||||
|  | ||||
|     /** @returns {boolean} */ | ||||
|     hasChildren() { | ||||
|         return this.children.length > 0; | ||||
| @@ -406,6 +426,9 @@ class NoteShort { | ||||
|         else if (this.noteId === 'root') { | ||||
|             return "bx bx-chevrons-right"; | ||||
|         } | ||||
|         if (this.noteId === 'share') { | ||||
|             return "bx bx-share-alt"; | ||||
|         } | ||||
|         else if (this.type === 'text') { | ||||
|             if (this.isFolder()) { | ||||
|                 return "bx bx-folder"; | ||||
| @@ -648,8 +671,8 @@ class NoteShort { | ||||
|             }); | ||||
|     } | ||||
|  | ||||
|     hasAncestor(ancestorNote, visitedNoteIds = null) { | ||||
|         if (this.noteId === ancestorNote.noteId) { | ||||
|     hasAncestor(ancestorNoteId, visitedNoteIds = null) { | ||||
|         if (this.noteId === ancestorNoteId) { | ||||
|             return true; | ||||
|         } | ||||
|  | ||||
| @@ -663,13 +686,13 @@ class NoteShort { | ||||
|         visitedNoteIds.add(this.noteId); | ||||
|  | ||||
|         for (const templateNote of this.getTemplateNotes()) { | ||||
|             if (templateNote.hasAncestor(ancestorNote, visitedNoteIds)) { | ||||
|             if (templateNote.hasAncestor(ancestorNoteId, visitedNoteIds)) { | ||||
|                 return true; | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         for (const parentNote of this.getParentNotes()) { | ||||
|             if (parentNote.hasAncestor(ancestorNote, visitedNoteIds)) { | ||||
|             if (parentNote.hasAncestor(ancestorNoteId, visitedNoteIds)) { | ||||
|                 return true; | ||||
|             } | ||||
|         } | ||||
| @@ -786,6 +809,26 @@ class NoteShort { | ||||
|             throw new Error(`Unrecognized env type ${env} for note ${this.noteId}`); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     isShared() { | ||||
|         for (const parentNoteId of this.parents) { | ||||
|             if (parentNoteId === 'root' || parentNoteId === 'none') { | ||||
|                 continue; | ||||
|             } | ||||
|  | ||||
|             const parentNote = froca.notes[parentNoteId]; | ||||
|  | ||||
|             if (!parentNote) { | ||||
|                 continue; | ||||
|             } | ||||
|  | ||||
|             if (parentNote.noteId === 'share' || parentNote.isShared()) { | ||||
|                 return true; | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         return false; | ||||
|     } | ||||
| } | ||||
|  | ||||
| export default NoteShort; | ||||
|   | ||||
| @@ -341,6 +341,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain | ||||
|      * @param {object} [params] | ||||
|      * @param {boolean} [params.showTooltip=true] - enable/disable tooltip on the link | ||||
|      * @param {boolean} [params.showNotePath=false] - show also whole note's path as part of the link | ||||
|      * @param {boolean} [params.showNoteIcon=false] - show also note icon before the title | ||||
|      * @param {string} [title=] - custom link tile with note's title as default | ||||
|      */ | ||||
|     this.createNoteLink = linkService.createNoteLink; | ||||
|   | ||||
							
								
								
									
										5734
									
								
								libraries/codemirror/keymap/vim.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										5734
									
								
								libraries/codemirror/keymap/vim.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										18
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										18
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -1,12 +1,12 @@ | ||||
| { | ||||
|   "name": "trilium", | ||||
|   "version": "0.48.8", | ||||
|   "version": "0.49.2-beta", | ||||
|   "lockfileVersion": 2, | ||||
|   "requires": true, | ||||
|   "packages": { | ||||
|     "": { | ||||
|       "name": "trilium", | ||||
|       "version": "0.48.8", | ||||
|       "version": "0.49.2-beta", | ||||
|       "license": "AGPL-3.0-only", | ||||
|       "dependencies": { | ||||
|         "@electron/remote": "2.0.1", | ||||
| @@ -71,7 +71,7 @@ | ||||
|       }, | ||||
|       "devDependencies": { | ||||
|         "cross-env": "7.0.3", | ||||
|         "electron": "16.0.5", | ||||
|         "electron": "16.0.6", | ||||
|         "electron-builder": "22.14.5", | ||||
|         "electron-packager": "15.4.0", | ||||
|         "electron-rebuild": "3.2.5", | ||||
| @@ -3713,9 +3713,9 @@ | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/electron": { | ||||
|       "version": "16.0.5", | ||||
|       "resolved": "https://registry.npmjs.org/electron/-/electron-16.0.5.tgz", | ||||
|       "integrity": "sha512-TgQXWmEGQ3uH2P2JDq5GyJDEu/fimRgqp1iNisARtGreU1k3630PqWlR+4SPnSEHN9NuSv92ng6NWxtefeFzxg==", | ||||
|       "version": "16.0.6", | ||||
|       "resolved": "https://registry.npmjs.org/electron/-/electron-16.0.6.tgz", | ||||
|       "integrity": "sha512-Xs9dYLYhcJf3wXn8m2gDqFTb1L862KEhMxOx9swfFBHj6NoUPPtUgw/RyPQ0tXN1XPxG9vnBkoI0BdcKwrLKuQ==", | ||||
|       "hasInstallScript": true, | ||||
|       "dependencies": { | ||||
|         "@electron/get": "^1.13.0", | ||||
| @@ -14169,9 +14169,9 @@ | ||||
|       } | ||||
|     }, | ||||
|     "electron": { | ||||
|       "version": "16.0.5", | ||||
|       "resolved": "https://registry.npmjs.org/electron/-/electron-16.0.5.tgz", | ||||
|       "integrity": "sha512-TgQXWmEGQ3uH2P2JDq5GyJDEu/fimRgqp1iNisARtGreU1k3630PqWlR+4SPnSEHN9NuSv92ng6NWxtefeFzxg==", | ||||
|       "version": "16.0.6", | ||||
|       "resolved": "https://registry.npmjs.org/electron/-/electron-16.0.6.tgz", | ||||
|       "integrity": "sha512-Xs9dYLYhcJf3wXn8m2gDqFTb1L862KEhMxOx9swfFBHj6NoUPPtUgw/RyPQ0tXN1XPxG9vnBkoI0BdcKwrLKuQ==", | ||||
|       "requires": { | ||||
|         "@electron/get": "^1.13.0", | ||||
|         "@types/node": "^14.6.2", | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|   "name": "trilium", | ||||
|   "productName": "Trilium Notes", | ||||
|   "description": "Trilium Notes", | ||||
|   "version": "0.49.1-beta", | ||||
|   "version": "0.49.4", | ||||
|   "license": "AGPL-3.0-only", | ||||
|   "main": "electron.js", | ||||
|   "bin": { | ||||
| @@ -83,7 +83,7 @@ | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "cross-env": "7.0.3", | ||||
|     "electron": "16.0.5", | ||||
|     "electron": "16.0.6", | ||||
|     "electron-builder": "22.14.5", | ||||
|     "electron-packager": "15.4.0", | ||||
|     "electron-rebuild": "3.2.5", | ||||
|   | ||||
| @@ -71,14 +71,7 @@ function getNoteTitle(childNoteId, parentNoteId) { | ||||
|         return "[error fetching title]"; | ||||
|     } | ||||
|  | ||||
|     let title; | ||||
|  | ||||
|     if (childNote.isProtected) { | ||||
|         title = protectedSessionService.isProtectedSessionAvailable() ? childNote.title : '[protected]'; | ||||
|     } | ||||
|     else { | ||||
|         title = childNote.title; | ||||
|     } | ||||
|     const title = childNote.getTitleOrProtected(); | ||||
|  | ||||
|     const branch = parentNote ? becca.getBranchFromChildAndParent(childNote.noteId, parentNote.noteId) : null; | ||||
|  | ||||
|   | ||||
| @@ -131,6 +131,10 @@ class Note extends AbstractEntity { | ||||
|             || protectedSessionService.isProtectedSessionAvailable() | ||||
|     } | ||||
|  | ||||
|     getTitleOrProtected() { | ||||
|         return this.isContentAvailable() ? this.title : '[protected]'; | ||||
|     } | ||||
|  | ||||
|     /** @returns {Branch[]} */ | ||||
|     getParentBranches() { | ||||
|         return this.parentBranches; | ||||
| @@ -1114,7 +1118,7 @@ class Note extends AbstractEntity { | ||||
|  | ||||
|         const branch = this.becca.getNote(parentNoteId).getParentBranches()[0]; | ||||
|  | ||||
|         return cloningService.cloneNoteToParent(this.noteId, branch.branchId); | ||||
|         return cloningService.cloneNoteToBranch(this.noteId, branch.branchId); | ||||
|     } | ||||
|  | ||||
|     decrypt() { | ||||
|   | ||||
| @@ -48,7 +48,7 @@ async function cloneNotesTo(notePath) { | ||||
|     const targetBranchId = await froca.getBranchId(parentNoteId, noteId); | ||||
|  | ||||
|     for (const cloneNoteId of clonedNoteIds) { | ||||
|         await branchService.cloneNoteTo(cloneNoteId, targetBranchId, $clonePrefix.val()); | ||||
|         await branchService.cloneNoteToBranch(cloneNoteId, targetBranchId, $clonePrefix.val()); | ||||
|  | ||||
|         const clonedNote = await froca.getNote(cloneNoteId); | ||||
|         const targetNote = await froca.getBranch(targetBranchId).getNote(); | ||||
|   | ||||
| @@ -1,7 +1,15 @@ | ||||
| import mimeTypesService from "../../services/mime_types.js"; | ||||
| import options from "../../services/options.js"; | ||||
| import server from "../../services/server.js"; | ||||
| import toastService from "../../services/toast.js"; | ||||
| import utils from "../../services/utils.js"; | ||||
|  | ||||
| const TPL = ` | ||||
| <h4>Use vim keybindings in CodeNotes (no ex mode)</h4> | ||||
| <div class="custom-control custom-checkbox"> | ||||
|     <input type="checkbox" class="custom-control-input" id="vim-keymap-enabled"> | ||||
|     <label class="custom-control-label" for="vim-keymap-enabled">Enable Vim Keybindings</label> | ||||
| </div> | ||||
| <h4>Available MIME types in the dropdown</h4> | ||||
|  | ||||
| <ul id="options-mime-types" style="max-height: 500px; overflow: auto; list-style-type: none;"></ul>`; | ||||
| @@ -10,12 +18,18 @@ export default class CodeNotesOptions { | ||||
|     constructor() { | ||||
|         $("#options-code-notes").html(TPL); | ||||
|  | ||||
|         this.$vimKeymapEnabled = $("#vim-keymap-enabled"); | ||||
|         this.$vimKeymapEnabled.on('change', () => { | ||||
|             const opts = { 'vimKeymapEnabled': this.$vimKeymapEnabled.is(":checked") ? "true" : "false" }; | ||||
|             server.put('options', opts).then(() => toastService.showMessage("Options change have been saved.")); | ||||
|             return false; | ||||
|         }); | ||||
|         this.$mimeTypes = $("#options-mime-types"); | ||||
|     } | ||||
|  | ||||
|     async optionsLoaded() { | ||||
|     async optionsLoaded(options) { | ||||
|         this.$mimeTypes.empty(); | ||||
|  | ||||
|         this.$vimKeymapEnabled.prop("checked", options['vimKeymapEnabled'] === 'true'); | ||||
|         let idCtr = 1; | ||||
|  | ||||
|         for (const mimeType of await mimeTypesService.getMimeTypes()) { | ||||
|   | ||||
| @@ -196,8 +196,18 @@ ws.subscribeToMessages(async message => { | ||||
|     } | ||||
| }); | ||||
|  | ||||
| async function cloneNoteTo(childNoteId, parentBranchId, prefix) { | ||||
|     const resp = await server.put(`notes/${childNoteId}/clone-to/${parentBranchId}`, { | ||||
| async function cloneNoteToBranch(childNoteId, parentBranchId, prefix) { | ||||
|     const resp = await server.put(`notes/${childNoteId}/clone-to-branch/${parentBranchId}`, { | ||||
|         prefix: prefix | ||||
|     }); | ||||
|  | ||||
|     if (!resp.success) { | ||||
|         alert(resp.message); | ||||
|     } | ||||
| } | ||||
|  | ||||
| async function cloneNoteToNote(childNoteId, parentNoteId, prefix) { | ||||
|     const resp = await server.put(`notes/${childNoteId}/clone-to-note/${parentNoteId}`, { | ||||
|         prefix: prefix | ||||
|     }); | ||||
|  | ||||
| @@ -222,5 +232,6 @@ export default { | ||||
|     deleteNotes, | ||||
|     moveNodeUpInHierarchy, | ||||
|     cloneNoteAfter, | ||||
|     cloneNoteTo | ||||
|     cloneNoteToBranch, | ||||
|     cloneNoteToNote, | ||||
| }; | ||||
|   | ||||
| @@ -51,7 +51,7 @@ async function pasteInto(parentBranchId) { | ||||
|         for (const clipboardBranch of clipboardBranches) { | ||||
|             const clipboardNote = await clipboardBranch.getNote(); | ||||
|  | ||||
|             await branchService.cloneNoteTo(clipboardNote.noteId, parentBranchId); | ||||
|             await branchService.cloneNoteToBranch(clipboardNote.noteId, parentBranchId); | ||||
|         } | ||||
|  | ||||
|         // copy will keep clipboardBranchIds and clipboardMode so it's possible to paste into multiple places | ||||
|   | ||||
| @@ -10,6 +10,7 @@ const CODE_MIRROR = { | ||||
|         "libraries/codemirror/addon/edit/matchtags.js", | ||||
|         "libraries/codemirror/addon/search/match-highlighter.js", | ||||
|         "libraries/codemirror/mode/meta.js", | ||||
|         "libraries/codemirror/keymap/vim.js", | ||||
|         "libraries/codemirror/addon/lint/lint.js", | ||||
|         "libraries/codemirror/addon/lint/eslint.js" | ||||
|     ], | ||||
|   | ||||
| @@ -129,12 +129,7 @@ export default class TabManager extends Component { | ||||
|             window.history.pushState(null, "", url); | ||||
|         } | ||||
|  | ||||
|         const titleFragments = [ | ||||
|             // it helps navigating in history if note title is included in the title | ||||
|             activeNoteContext.note?.title, | ||||
|             "Trilium Notes" | ||||
|         ].filter(Boolean); | ||||
|         document.title = titleFragments.join(" - "); | ||||
|         this.updateDocumentTitle(activeNoteContext); | ||||
|  | ||||
|         this.triggerEvent('activeNoteChanged'); // trigger this even in on popstate event | ||||
|     } | ||||
| @@ -453,4 +448,22 @@ export default class TabManager extends Component { | ||||
|     hoistedNoteChangedEvent() { | ||||
|         this.tabsUpdate.scheduleUpdate(); | ||||
|     } | ||||
|  | ||||
|     updateDocumentTitle(activeNoteContext) { | ||||
|         const titleFragments = [ | ||||
|             // it helps navigating in history if note title is included in the title | ||||
|             activeNoteContext.note?.title, | ||||
|             "Trilium Notes" | ||||
|         ].filter(Boolean); | ||||
|  | ||||
|         document.title = titleFragments.join(" - "); | ||||
|     } | ||||
|  | ||||
|     entitiesReloadedEvent({loadResults}) { | ||||
|         const activeContext = this.getActiveContext(); | ||||
|  | ||||
|         if (activeContext && loadResults.isNoteReloaded(activeContext.noteId)) { | ||||
|             this.updateDocumentTitle(activeContext); | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
							
								
								
									
										21
									
								
								src/public/app/share.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								src/public/app/share.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,21 @@ | ||||
| /** | ||||
|  * Fetch note with given ID from backend | ||||
|  * | ||||
|  * @param noteId of the given note to be fetched. If falsy, fetches current note. | ||||
|  */ | ||||
| async function fetchNote(noteId = null) { | ||||
|     if (!noteId) { | ||||
|         noteId = document.body.getAttribute("data-note-id"); | ||||
|     } | ||||
|  | ||||
|     const resp = await fetch(`api/notes/${noteId}`); | ||||
|  | ||||
|     return await resp.json(); | ||||
| } | ||||
|  | ||||
| document.addEventListener('DOMContentLoaded', () => { | ||||
|     const toggleMenuButton = document.getElementById('toggleMenuButton'); | ||||
|     const layout = document.getElementById('layout'); | ||||
|  | ||||
|     toggleMenuButton.addEventListener('click', () => layout.classList.toggle('showMenu')); | ||||
| }, false); | ||||
| @@ -226,6 +226,8 @@ const ATTR_HELP = { | ||||
|         "renderNote": 'notes of type "render HTML note" will be rendered using a code note (HTML or script) and it is necessary to point using this relation to which note should be rendered', | ||||
|         "widget": "target of this relation will be executed and rendered as a widget in the sidebar", | ||||
|         "shareCss": "CSS note which will be injected into the share page. CSS note must be in the shared sub-tree as well. Consider using 'shareHiddenFromTree' and 'shareOmitDefaultCss' as well.", | ||||
|         "shareJs": "JavaScript note which will be injected into the share page. JS note must be in the shared sub-tree as well. Consider using 'shareHiddenFromTree'.", | ||||
|         "shareFavicon": "Favicon note to be set in the shared page. Typically you want to set it to share root and make it inheritable. Favicon note must be in the shared sub-tree as well. Consider using 'shareHiddenFromTree'.", | ||||
|     } | ||||
| }; | ||||
|  | ||||
|   | ||||
| @@ -36,7 +36,11 @@ export default class RootContainer extends FlexContainer { | ||||
|         this.refresh(); | ||||
|     } | ||||
|  | ||||
|     noteTypeMimeChangedEvent() { | ||||
|     entitiesReloadedEvent({loadResults}) { | ||||
|         const note = appContext.tabManager.getActiveContextNote(); | ||||
|  | ||||
|         if (note && loadResults.isNoteReloaded(note.noteId)) { | ||||
|             this.refresh(); | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -22,7 +22,7 @@ export default class SharedSwitchWidget extends SwitchWidget { | ||||
|     } | ||||
|  | ||||
|     switchOn() { | ||||
|         branchService.cloneNoteTo(this.noteId, 'share'); | ||||
|         branchService.cloneNoteToNote(this.noteId, 'share'); | ||||
|     } | ||||
|  | ||||
|     async switchOff() { | ||||
|   | ||||
| @@ -1,5 +1,4 @@ | ||||
| import BasicWidget from "./basic_widget.js"; | ||||
| import toastService from "../services/toast.js"; | ||||
| import ws from "../services/ws.js"; | ||||
| import options from "../services/options.js"; | ||||
| import syncService from "../services/sync.js"; | ||||
|   | ||||
| @@ -6,6 +6,7 @@ import ws from "../../services/ws.js"; | ||||
| import appContext from "../../services/app_context.js"; | ||||
| import toastService from "../../services/toast.js"; | ||||
| import treeService from "../../services/tree.js"; | ||||
| import options from "../../services/options.js"; | ||||
|  | ||||
| const TPL = ` | ||||
| <div class="note-detail-code note-detail-printable"> | ||||
| @@ -94,6 +95,7 @@ export default class EditableCodeTypeWidget extends TypeWidget { | ||||
|             viewportMargin: Infinity, | ||||
|             indentUnit: 4, | ||||
|             matchBrackets: true, | ||||
|             keyMap: options.is('vimKeymapEnabled') ? "vim": "default", | ||||
|             matchTags: {bothTags: true}, | ||||
|             highlightSelectionMatches: {showToken: /\w/, annotateScrollbar: false}, | ||||
|             lint: true, | ||||
|   | ||||
| @@ -32,15 +32,18 @@ body { | ||||
| #main { | ||||
|     flex-basis: 0; | ||||
|     flex-grow: 3; | ||||
|     overflow: auto; | ||||
|     padding: 10px 20px 20px 20px; | ||||
| } | ||||
|  | ||||
| #parentLink { | ||||
|     float: right; | ||||
|     margin-top: 20px; | ||||
| } | ||||
|  | ||||
| #title { | ||||
|     margin: 0; | ||||
|     padding: 20px 20px 0 20px; | ||||
| } | ||||
|  | ||||
| #content { | ||||
|     padding: 20px; | ||||
|     padding-top: 10px; | ||||
| } | ||||
|  | ||||
| img { | ||||
| @@ -57,7 +60,7 @@ iframe.pdf-view { | ||||
|     height: 800px; | ||||
| } | ||||
|  | ||||
| #menuButton { | ||||
| #toggleMenuButton { | ||||
|     display: none; | ||||
|     position: fixed; | ||||
|     top: 8px; | ||||
| @@ -72,23 +75,74 @@ iframe.pdf-view { | ||||
|     cursor: pointer; | ||||
| } | ||||
|  | ||||
| #menuButton::after { | ||||
| #childLinks.grid ul { | ||||
|     list-style-type: none; | ||||
|     display: flex; | ||||
|     flex-wrap: wrap; | ||||
|     padding: 0; | ||||
| } | ||||
|  | ||||
| #childLinks.grid ul li { | ||||
|     width: 180px; | ||||
|     height: 140px; | ||||
|     padding: 10px; | ||||
| } | ||||
|  | ||||
| #childLinks.grid ul li a { | ||||
|     display: flex; | ||||
|     flex-direction: column; | ||||
|     height: 100%; | ||||
|     width: 100%; | ||||
|     border: 1px solid #ddd; | ||||
|     border-radius: 5px; | ||||
|     justify-content: center; | ||||
|     align-content: center; | ||||
|     text-align: center; | ||||
|     font-size: large; | ||||
| } | ||||
|  | ||||
| #childLinks.grid ul li a:hover { | ||||
|     background: #eee; | ||||
| } | ||||
|  | ||||
| #childLinks.list ul { | ||||
|     list-style-type: none; | ||||
|     display: inline-flex; | ||||
|     flex-wrap: wrap; | ||||
|     padding: 0; | ||||
|     margin-top: 5px; | ||||
| } | ||||
|  | ||||
| #childLinks.list ul li { | ||||
|     margin-right: 20px; | ||||
| } | ||||
|  | ||||
| #noteClippedFrom { | ||||
|     padding: 10px 0 10px 0; | ||||
|     margin: 20px 0 20px 0; | ||||
|     color: #666; | ||||
|     border: 1px solid #ddd; | ||||
|     border-left: 0; | ||||
|     border-right: 0; | ||||
| } | ||||
|  | ||||
| #toggleMenuButton::after { | ||||
|     position: relative; | ||||
|     top: -2px; | ||||
|     left: 1px; | ||||
| } | ||||
|  | ||||
| @media (max-width: 48em) { | ||||
|     #layout.navMenu #menu { | ||||
|     #layout.showMenu #menu { | ||||
|         display: block; | ||||
|         margin-top: 40px; | ||||
|     } | ||||
|  | ||||
|     #menuButton { | ||||
|     #toggleMenuButton { | ||||
|         display: block; | ||||
|     } | ||||
|  | ||||
|     #layout.navMenu #main { | ||||
|     #layout.showMenu #main { | ||||
|         display: none; | ||||
|     } | ||||
|  | ||||
| @@ -96,11 +150,11 @@ iframe.pdf-view { | ||||
|         padding-left: 60px; | ||||
|     } | ||||
|  | ||||
|     #layout.navMenu #menuButton::after { | ||||
|     #layout.showMenu #toggleMenuButton::after { | ||||
|         content: "«"; | ||||
|     } | ||||
|  | ||||
|     #menuButton::after { | ||||
|     #toggleMenuButton::after { | ||||
|         content: "»"; | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -2,11 +2,18 @@ | ||||
|  | ||||
| const cloningService = require('../../services/cloning'); | ||||
|  | ||||
| function cloneNoteToParent(req) { | ||||
| function cloneNoteToBranch(req) { | ||||
|     const {noteId, parentBranchId} = req.params; | ||||
|     const {prefix} = req.body; | ||||
|  | ||||
|     return cloningService.cloneNoteToParent(noteId, parentBranchId, prefix); | ||||
|     return cloningService.cloneNoteToBranch(noteId, parentBranchId, prefix); | ||||
| } | ||||
|  | ||||
| function cloneNoteToNote(req) { | ||||
|     const {noteId, parentNoteId} = req.params; | ||||
|     const {prefix} = req.body; | ||||
|  | ||||
|     return cloningService.cloneNoteToNote(noteId, parentNoteId, prefix); | ||||
| } | ||||
|  | ||||
| function cloneNoteAfter(req) { | ||||
| @@ -16,6 +23,7 @@ function cloneNoteAfter(req) { | ||||
| } | ||||
|  | ||||
| module.exports = { | ||||
|     cloneNoteToParent, | ||||
|     cloneNoteToBranch, | ||||
|     cloneNoteToNote, | ||||
|     cloneNoteAfter | ||||
| }; | ||||
|   | ||||
| @@ -98,7 +98,7 @@ function getLinkMap(req) { | ||||
|  | ||||
|         return [ | ||||
|             note.noteId, | ||||
|             note.isContentAvailable() ? note.title : '[protected]', | ||||
|             note.getTitleOrProtected(), | ||||
|             note.type | ||||
|         ]; | ||||
|     }); | ||||
| @@ -158,7 +158,7 @@ function getTreeMap(req) { | ||||
|         .concat(...mapRootNote.getParentNotes()) | ||||
|         .map(note => [ | ||||
|             note.noteId, | ||||
|             note.isContentAvailable() ? note.title : '[protected]', | ||||
|             note.getTitleOrProtected(), | ||||
|             note.type | ||||
|         ]); | ||||
|  | ||||
|   | ||||
| @@ -33,6 +33,7 @@ const ALLOWED_OPTIONS = new Set([ | ||||
|     'similarNotesWidget', | ||||
|     'editedNotesWidget', | ||||
|     'calendarWidget', | ||||
|     'vimKeymapEnabled', | ||||
|     'codeNotesMimeTypes', | ||||
|     'spellCheckEnabled', | ||||
|     'spellCheckLanguageCode', | ||||
|   | ||||
| @@ -54,7 +54,7 @@ function getNotesAndBranchesAndAttributes(noteIds) { | ||||
|  | ||||
|         notes.push({ | ||||
|             noteId: note.noteId, | ||||
|             title: note.isDecrypted ? note.title : '[protected]', | ||||
|             title: note.getTitleOrProtected(), | ||||
|             isProtected: note.isProtected, | ||||
|             type: note.type, | ||||
|             mime: note.mime | ||||
|   | ||||
| @@ -229,7 +229,8 @@ function register(app) { | ||||
|  | ||||
|     apiRoute(GET, '/api/edited-notes/:date', noteRevisionsApiRoute.getEditedNotesOnDate); | ||||
|  | ||||
|     apiRoute(PUT, '/api/notes/:noteId/clone-to/:parentBranchId', cloningApiRoute.cloneNoteToParent); | ||||
|     apiRoute(PUT, '/api/notes/:noteId/clone-to-branch/:parentBranchId', cloningApiRoute.cloneNoteToBranch); | ||||
|     apiRoute(PUT, '/api/notes/:noteId/clone-to-note/:parentNoteId', cloningApiRoute.cloneNoteToNote); | ||||
|     apiRoute(PUT, '/api/notes/:noteId/clone-after/:afterBranchId', cloningApiRoute.cloneNoteAfter); | ||||
|  | ||||
|     route(GET, '/api/notes/:branchId/export/:type/:format/:version/:taskId', [auth.checkApiAuthOrElectron], exportRoute.exportBranch); | ||||
|   | ||||
| @@ -4,7 +4,7 @@ const build = require('./build'); | ||||
| const packageJson = require('../../package'); | ||||
| const {TRILIUM_DATA_DIR} = require('./data_dir'); | ||||
|  | ||||
| const APP_DB_VERSION = 188; | ||||
| const APP_DB_VERSION = 189; | ||||
| const SYNC_VERSION = 23; | ||||
| const CLIPPER_PROTOCOL_VERSION = "1.0"; | ||||
|  | ||||
|   | ||||
| @@ -67,6 +67,8 @@ const BUILTIN_ATTRIBUTES = [ | ||||
|     { type: 'relation', name: 'widget', isDangerous: true }, | ||||
|     { type: 'relation', name: 'renderNote', isDangerous: true }, | ||||
|     { type: 'relation', name: 'shareCss', isDangerous: false }, | ||||
|     { type: 'relation', name: 'shareJs', isDangerous: false }, | ||||
|     { type: 'relation', name: 'shareFavicon', isDangerous: false }, | ||||
| ]; | ||||
|  | ||||
| /** @returns {Note[]} */ | ||||
|   | ||||
| @@ -161,7 +161,7 @@ function BackendScriptApi(currentNote, apiParams) { | ||||
|      * @param {boolean} present - true if we want the branch to exist, false if we want it gone | ||||
|      * @param {string} noteId | ||||
|      * @param {string} parentNoteId | ||||
|      * @param {string} prefix - if branch will be create between note and parent note, set this prefix | ||||
|      * @param {string} prefix - if branch will be created between note and parent note, set this prefix | ||||
|      * @returns {void} | ||||
|      */ | ||||
|     this.toggleNoteInParent = cloningService.toggleNoteInParent; | ||||
|   | ||||
| @@ -1 +1 @@ | ||||
| module.exports = { buildDate:"2021-12-24T23:05:10+01:00", buildRevision: "0217b1c85de9a2824e7f07d07a357064c5803383" }; | ||||
| module.exports = { buildDate:"2022-01-09T22:32:13+01:00", buildRevision: "be59f248e8387c268471946da99979939c8d2c1d" }; | ||||
|   | ||||
| @@ -10,20 +10,18 @@ const utils = require('./utils'); | ||||
| const becca = require("../becca/becca"); | ||||
| const beccaService = require("../becca/becca_service"); | ||||
|  | ||||
| function cloneNoteToParent(noteId, parentBranchId, prefix) { | ||||
|     if (parentBranchId === 'share') { | ||||
| function cloneNoteToNote(noteId, parentNoteId, prefix) { | ||||
|     if (parentNoteId === 'share') { | ||||
|         const specialNotesService = require('./special_notes'); | ||||
|         // share root note is created lazily | ||||
|         specialNotesService.getShareRoot(); | ||||
|     } | ||||
|  | ||||
|     const parentBranch = becca.getBranch(parentBranchId); | ||||
|  | ||||
|     if (isNoteDeleted(noteId) || isNoteDeleted(parentBranch.noteId)) { | ||||
|     if (isNoteDeleted(noteId) || isNoteDeleted(parentNoteId)) { | ||||
|         return { success: false, message: 'Note is deleted.' }; | ||||
|     } | ||||
|  | ||||
|     const validationResult = treeService.validateParentChild(parentBranch.noteId, noteId); | ||||
|     const validationResult = treeService.validateParentChild(parentNoteId, noteId); | ||||
|  | ||||
|     if (!validationResult.success) { | ||||
|         return validationResult; | ||||
| @@ -31,21 +29,33 @@ function cloneNoteToParent(noteId, parentBranchId, prefix) { | ||||
|  | ||||
|     const branch = new Branch({ | ||||
|         noteId: noteId, | ||||
|         parentNoteId: parentBranch.noteId, | ||||
|         parentNoteId: parentNoteId, | ||||
|         prefix: prefix, | ||||
|         isExpanded: 0 | ||||
|     }).save(); | ||||
|  | ||||
|     parentBranch.isExpanded = true; // the new target should be expanded so it immediately shows up to the user | ||||
|     parentBranch.save(); | ||||
|  | ||||
|     return { | ||||
|         success: true, | ||||
|         branchId: branch.branchId, | ||||
|         notePath: beccaService.getNotePath(parentBranch.noteId).path + "/" + noteId | ||||
|         notePath: beccaService.getNotePath(parentNoteId).path + "/" + noteId | ||||
|     }; | ||||
| } | ||||
|  | ||||
| function cloneNoteToBranch(noteId, parentBranchId, prefix) { | ||||
|     const parentBranch = becca.getBranch(parentBranchId); | ||||
|  | ||||
|     if (!parentBranch) { | ||||
|         return { success: false, message: `Parent branch ${parentBranchId} does not exist.` }; | ||||
|     } | ||||
|  | ||||
|     const ret = cloneNoteToNote(noteId, parentBranch.noteId, prefix); | ||||
|  | ||||
|     parentBranch.isExpanded = true; // the new target should be expanded so it immediately shows up to the user | ||||
|     parentBranch.save(); | ||||
|  | ||||
|     return ret; | ||||
| } | ||||
|  | ||||
| function ensureNoteIsPresentInParent(noteId, parentNoteId, prefix) { | ||||
|     if (isNoteDeleted(noteId) || isNoteDeleted(parentNoteId)) { | ||||
|         return { success: false, message: 'Note is deleted.' }; | ||||
| @@ -121,7 +131,8 @@ function isNoteDeleted(noteId) { | ||||
| } | ||||
|  | ||||
| module.exports = { | ||||
|     cloneNoteToParent, | ||||
|     cloneNoteToBranch, | ||||
|     cloneNoteToNote, | ||||
|     ensureNoteIsPresentInParent, | ||||
|     ensureNoteIsAbsentFromParent, | ||||
|     toggleNoteInParent, | ||||
|   | ||||
| @@ -259,7 +259,7 @@ class ConsistencyChecks { | ||||
|                              WHERE noteId = ? | ||||
|                                and parentNoteId = ? | ||||
|                                and isDeleted = 0 | ||||
|                              ORDER BY utcDateCreated`, [noteId, parentNoteId]); | ||||
|                              ORDER BY utcDateModified`, [noteId, parentNoteId]); | ||||
|  | ||||
|                     const branches = branchIds.map(branchId => becca.getBranch(branchId)); | ||||
|  | ||||
|   | ||||
| @@ -54,7 +54,7 @@ function getYearNote(dateStr, rootNote) { | ||||
|         rootNote = getRootCalendarNote(); | ||||
|     } | ||||
|  | ||||
|     const yearStr = dateStr.substr(0, 4); | ||||
|     const yearStr = dateStr.trim().substr(0, 4); | ||||
|  | ||||
|     let yearNote = attributeService.getNoteWithLabel(YEAR_LABEL, yearStr); | ||||
|  | ||||
| @@ -138,6 +138,8 @@ function getDateNoteTitle(rootNote, dayNumber, dateObj) { | ||||
|  | ||||
| /** @returns {Note} */ | ||||
| function getDateNote(dateStr) { | ||||
|     dateStr = dateStr.trim().substr(0, 10); | ||||
|  | ||||
|     let dateNote = attributeService.getNoteWithLabel(DATE_LABEL, dateStr); | ||||
|  | ||||
|     if (dateNote) { | ||||
|   | ||||
| @@ -97,7 +97,8 @@ function exportToZip(taskContext, branch, format, res) { | ||||
|             return; | ||||
|         } | ||||
|  | ||||
|         const completeTitle = branch.prefix ? (branch.prefix + ' - ' + note.title) : note.title; | ||||
|         const title = note.getTitleOrProtected(); | ||||
|         const completeTitle = branch.prefix ? (branch.prefix + ' - ' + title) : title; | ||||
|         let baseFileName = sanitize(completeTitle); | ||||
|  | ||||
|         if (baseFileName.length > 200) { // actual limit is 256 bytes(!) but let's be conservative | ||||
| @@ -113,7 +114,7 @@ function exportToZip(taskContext, branch, format, res) { | ||||
|                 isClone: true, | ||||
|                 noteId: note.noteId, | ||||
|                 notePath: notePath, | ||||
|                 title: note.title, | ||||
|                 title: note.getTitleOrProtected(), | ||||
|                 prefix: branch.prefix, | ||||
|                 dataFileName: fileName, | ||||
|                 type: 'text', // export will have text description, | ||||
| @@ -125,7 +126,7 @@ function exportToZip(taskContext, branch, format, res) { | ||||
|             isClone: false, | ||||
|             noteId: note.noteId, | ||||
|             notePath: notePath, | ||||
|             title: note.title, | ||||
|             title: note.getTitleOrProtected(), | ||||
|             notePosition: branch.notePosition, | ||||
|             prefix: branch.prefix, | ||||
|             isExpanded: branch.isExpanded, | ||||
| @@ -445,7 +446,7 @@ ${content} | ||||
|     } | ||||
|  | ||||
|     const note = branch.getNote(); | ||||
|     const zipFileName = (branch.prefix ? `${branch.prefix} - ` : "") + note.title + ".zip"; | ||||
|     const zipFileName = (branch.prefix ? `${branch.prefix} - ` : "") + note.getTitleOrProtected() + ".zip"; | ||||
|  | ||||
|     res.setHeader('Content-Disposition', utils.getContentDisposition(zipFileName)); | ||||
|     res.setHeader('Content-Type', 'application/zip'); | ||||
|   | ||||
| @@ -3,6 +3,10 @@ const sanitizeHtml = require('sanitize-html'); | ||||
| // intended mainly as protection against XSS via import | ||||
| // secondarily it (partly) protects against "CSS takeover" | ||||
| function sanitize(dirtyHtml) { | ||||
|     if (!dirtyHtml) { | ||||
|         return dirtyHtml; | ||||
|     } | ||||
|  | ||||
|     // avoid H1 per https://github.com/zadam/trilium/issues/1552 | ||||
|     // demote H1, and if that conflicts with existing H2, demote that, etc | ||||
|     const transformTags = {}; | ||||
|   | ||||
| @@ -51,7 +51,7 @@ async function importOpml(taskContext, fileBuffer, parentNote) { | ||||
|             throw new Error("Unrecognized OPML version " + opmlVersion); | ||||
|         } | ||||
|  | ||||
|         content = htmlSanitizer.sanitize(content); | ||||
|         content = htmlSanitizer.sanitize(content || ""); | ||||
|  | ||||
|         const {note} = noteService.createNewNote({ | ||||
|             parentNoteId, | ||||
|   | ||||
| @@ -240,6 +240,7 @@ async function importZip(taskContext, fileBuffer, importRootNote) { | ||||
|         } | ||||
|  | ||||
|         if (noteMeta && noteMeta.isClone) { | ||||
|             if (!becca.getBranchFromChildAndParent(noteId, parentNoteId)) { | ||||
|                 new Branch({ | ||||
|                     noteId, | ||||
|                     parentNoteId, | ||||
| @@ -247,6 +248,7 @@ async function importZip(taskContext, fileBuffer, importRootNote) { | ||||
|                     prefix: noteMeta.prefix, | ||||
|                     notePosition: noteMeta.notePosition | ||||
|                 }).save(); | ||||
|             } | ||||
|  | ||||
|             return; | ||||
|         } | ||||
| @@ -365,6 +367,16 @@ async function importZip(taskContext, fileBuffer, importRootNote) { | ||||
|             } | ||||
|  | ||||
|             note.setContent(content); | ||||
|  | ||||
|             if (!becca.getBranchFromChildAndParent(noteId, parentNoteId)) { | ||||
|                 new Branch({ | ||||
|                     noteId, | ||||
|                     parentNoteId, | ||||
|                     isExpanded: noteMeta.isExpanded, | ||||
|                     prefix: noteMeta.prefix, | ||||
|                     notePosition: noteMeta.notePosition | ||||
|                 }).save(); | ||||
|             } | ||||
|         } | ||||
|         else { | ||||
|             ({note} = noteService.createNewNote({ | ||||
|   | ||||
| @@ -102,8 +102,9 @@ function createNewNote(params) { | ||||
|         throw new Error(`Parent note "${params.parentNoteId}" not found.`); | ||||
|     } | ||||
|  | ||||
|     if (!params.title || params.title.trim().length === 0) { | ||||
|         throw new Error(`Note title must not be empty`); | ||||
|     if (params.title === null || params.title === undefined) { | ||||
|         // empty title is allowed since it's possible to create such in the UI | ||||
|         throw new Error(`Note title must be set`); | ||||
|     } | ||||
|  | ||||
|     return sql.transactional(() => { | ||||
| @@ -360,7 +361,7 @@ function downloadImages(noteId, content) { | ||||
|             // which upon the download of all the images will update the note if the links have not been fixed before | ||||
|  | ||||
|             sql.transactional(() => { | ||||
|                 const imageNotes = becca.getNotes(Object.values(imageUrlToNoteIdMapping)); | ||||
|                 const imageNotes = becca.getNotes(Object.values(imageUrlToNoteIdMapping), true); | ||||
|  | ||||
|                 const origNote = becca.getNote(noteId); | ||||
|  | ||||
|   | ||||
| @@ -1,7 +1,16 @@ | ||||
| const becca = require('../becca/becca'); | ||||
| const sql = require("./sql.js"); | ||||
|  | ||||
| function getOption(name) { | ||||
|     const option = require('../becca/becca').getOption(name); | ||||
|     let option; | ||||
|  | ||||
|     if (becca.loaded) { | ||||
|         option = becca.getOption(name); | ||||
|     } | ||||
|     else { | ||||
|         // e.g. in initial sync becca is not loaded because DB is not initialized | ||||
|         option = sql.getRow("SELECT * FROM options WHERE name = ?", name); | ||||
|     } | ||||
|  | ||||
|     if (!option) { | ||||
|         throw new Error(`Option "${name}" doesn't exist`); | ||||
| @@ -39,12 +48,12 @@ function getOptionBool(name) { | ||||
| } | ||||
|  | ||||
| function setOption(name, value) { | ||||
|     const option = becca.getOption(name); | ||||
|  | ||||
|     if (value === true || value === false) { | ||||
|         value = value.toString(); | ||||
|     } | ||||
|  | ||||
|     const option = becca.getOption(name); | ||||
|  | ||||
|     if (option) { | ||||
|         option.value = value; | ||||
|  | ||||
|   | ||||
| @@ -55,7 +55,7 @@ function initNotSyncedOptions(initialized, opts = {}) { | ||||
| const defaultOptions = [ | ||||
|     { name: 'noteRevisionSnapshotTimeInterval', value: '600', isSynced: true }, | ||||
|     { name: 'protectedSessionTimeout', value: '600', isSynced: true }, | ||||
|     { name: 'zoomFactor', value: '1.0', isSynced: false }, | ||||
|     { name: 'zoomFactor', value: process.platform === "win32" ? '0.9' : '1.0', isSynced: false }, | ||||
|     { name: 'overrideThemeFonts', value: 'false', isSynced: false }, | ||||
|     { name: 'mainFontFamily', value: 'theme', isSynced: false }, | ||||
|     { name: 'mainFontSize', value: '100', isSynced: false }, | ||||
| @@ -70,6 +70,7 @@ const defaultOptions = [ | ||||
|     { name: 'imageMaxWidthHeight', value: '2000', isSynced: true }, | ||||
|     { name: 'imageJpegQuality', value: '75', isSynced: true }, | ||||
|     { name: 'autoFixConsistencyIssues', value: 'true', isSynced: false }, | ||||
|     { name: 'vimKeymapEnabled', value: 'false', isSynced: false }, | ||||
|     { name: 'codeNotesMimeTypes', value: '["text/x-csrc","text/x-c++src","text/x-csharp","text/css","text/x-go","text/x-groovy","text/x-haskell","text/html","message/http","text/x-java","application/javascript;env=frontend","application/javascript;env=backend","application/json","text/x-kotlin","text/x-markdown","text/x-perl","text/x-php","text/x-python","text/x-ruby",null,"text/x-sql","text/x-sqlite;schema=trilium","text/x-swift","text/xml","text/x-yaml"]', isSynced: true }, | ||||
|     { name: 'leftPaneWidth', value: '25', isSynced: false }, | ||||
|     { name: 'leftPaneVisible', value: 'true', isSynced: false }, | ||||
|   | ||||
| @@ -5,7 +5,7 @@ const becca = require("../becca/becca"); | ||||
|  | ||||
| function executeNote(note, apiParams) { | ||||
|     if (!note.isJavaScript() || note.getScriptEnv() !== 'backend' || !note.isContentAvailable()) { | ||||
|         log.info(`Cannot execute note ${note.noteId} "${note.title}", note must be of type "Code: JS frontend"`); | ||||
|         log.info(`Cannot execute note ${note.noteId} "${note.title}", note must be of type "Code: JS backend"`); | ||||
|  | ||||
|         return; | ||||
|     } | ||||
|   | ||||
| @@ -149,8 +149,8 @@ async function pullChanges(syncContext) { | ||||
|  | ||||
|         sql.transactional(() => { | ||||
|             for (const {entityChange, entity} of entityChanges) { | ||||
|                 const changeAppliedAlready = !entityChange.changeId | ||||
|                     || !!sql.getValue("SELECT id FROM entity_changes WHERE changeId = ?", [entityChange.changeId]); | ||||
|                 const changeAppliedAlready = entityChange.changeId | ||||
|                     && !!sql.getValue("SELECT id FROM entity_changes WHERE changeId = ?", [entityChange.changeId]); | ||||
|  | ||||
|                 if (!changeAppliedAlready && !sourceIdService.isLocalSourceId(entityChange.sourceId)) { | ||||
|                     if (!atLeastOnePullApplied) { // send only for first | ||||
| @@ -371,7 +371,10 @@ function getLastSyncedPull() { | ||||
|  | ||||
| function setLastSyncedPull(entityChangeId) { | ||||
|     const lastSyncedPullOption = becca.getOption('lastSyncedPull'); | ||||
|  | ||||
|     if (lastSyncedPullOption) { // might be null in initial sync when becca is not loaded | ||||
|         lastSyncedPullOption.value = entityChangeId + ''; | ||||
|     } | ||||
|  | ||||
|     // this way we avoid updating entity_changes which otherwise means that we've never pushed all entity_changes | ||||
|     sql.execute("UPDATE options SET value = ? WHERE name = ?", [entityChangeId, 'lastSyncedPull']); | ||||
| @@ -389,7 +392,10 @@ function setLastSyncedPush(entityChangeId) { | ||||
|     ws.setLastSyncedPush(entityChangeId); | ||||
|  | ||||
|     const lastSyncedPushOption = becca.getOption('lastSyncedPush'); | ||||
|  | ||||
|     if (lastSyncedPushOption) { // might be null in initial sync when becca is not loaded | ||||
|         lastSyncedPushOption.value = entityChangeId + ''; | ||||
|     } | ||||
|  | ||||
|     // this way we avoid updating entity_changes which otherwise means that we've never pushed all entity_changes | ||||
|     sql.execute("UPDATE options SET value = ? WHERE name = ?", [entityChangeId, 'lastSyncedPush']); | ||||
|   | ||||
| @@ -16,7 +16,10 @@ let mainWindow; | ||||
| let setupWindow; | ||||
|  | ||||
| async function createExtraWindow(notePath, hoistedNoteId = 'root') { | ||||
|     const spellcheckEnabled = optionService.getOptionBool('spellCheckEnabled'); | ||||
|  | ||||
|     const {BrowserWindow} = require('electron'); | ||||
|  | ||||
|     const win = new BrowserWindow({ | ||||
|         width: 1000, | ||||
|         height: 800, | ||||
| @@ -25,7 +28,7 @@ async function createExtraWindow(notePath, hoistedNoteId = 'root') { | ||||
|             enableRemoteModule: true, | ||||
|             nodeIntegration: true, | ||||
|             contextIsolation: false, | ||||
|             spellcheck: optionService.getOptionBool('spellCheckEnabled') | ||||
|             spellcheck: spellcheckEnabled | ||||
|         }, | ||||
|         frame: optionService.getOptionBool('nativeTitleBarVisible'), | ||||
|         icon: getIcon() | ||||
| @@ -33,6 +36,8 @@ async function createExtraWindow(notePath, hoistedNoteId = 'root') { | ||||
|  | ||||
|     win.setMenuBarVisibility(false); | ||||
|     win.loadURL('http://127.0.0.1:' + await port + '/?extra=1&extraHoistedNoteId=' + hoistedNoteId + '#' + notePath); | ||||
|  | ||||
|     configureWebContents(win.webContents, spellcheckEnabled); | ||||
| } | ||||
|  | ||||
| ipcMain.on('create-extra-window', (event, arg) => { | ||||
| @@ -74,8 +79,10 @@ async function createMainWindow() { | ||||
|     mainWindow.loadURL('http://127.0.0.1:' + await port); | ||||
|     mainWindow.on('closed', () => mainWindow = null); | ||||
|  | ||||
|     const {webContents} = mainWindow; | ||||
|     configureWebContents(mainWindow.webContents, spellcheckEnabled); | ||||
| } | ||||
|  | ||||
| function configureWebContents(webContents, spellcheckEnabled) { | ||||
|     require("@electron/remote/main").enable(webContents); | ||||
|  | ||||
|     webContents.on('new-window', (e, url) => { | ||||
|   | ||||
| @@ -1,43 +1,18 @@ | ||||
| const {JSDOM} = require("jsdom"); | ||||
| const NO_CONTENT = '<p>This note has no content.</p>'; | ||||
| const shaca = require("./shaca/shaca"); | ||||
|  | ||||
| function getChildrenList(note) { | ||||
|     if (note.hasChildren()) { | ||||
|         const document = new JSDOM().window.document; | ||||
|  | ||||
|         const ulEl = document.createElement("ul"); | ||||
|  | ||||
|         for (const childNote of note.getChildNotes()) { | ||||
|             const li = document.createElement("li"); | ||||
|             const link = document.createElement("a"); | ||||
|             link.appendChild(document.createTextNode(childNote.title)); | ||||
|             link.setAttribute("href", childNote.noteId); | ||||
|  | ||||
|             li.appendChild(link); | ||||
|             ulEl.appendChild(li); | ||||
|         } | ||||
|  | ||||
|         return '<p>Child notes:</p>' + ulEl.outerHTML; | ||||
|     } | ||||
|     else { | ||||
|         return ''; | ||||
|     } | ||||
| } | ||||
|  | ||||
| function getContent(note) { | ||||
|     let content = note.getContent(); | ||||
|     let header = ''; | ||||
|     let isEmpty = false; | ||||
|  | ||||
|     if (note.type === 'text') { | ||||
|         const document = new JSDOM(content || "").window.document; | ||||
|  | ||||
|         const isEmpty = document.body.textContent.trim().length === 0 | ||||
|         isEmpty = document.body.textContent.trim().length === 0 | ||||
|             && document.querySelectorAll("img").length === 0; | ||||
|  | ||||
|         if (isEmpty) { | ||||
|             content = NO_CONTENT + getChildrenList(note); | ||||
|         } | ||||
|         else { | ||||
|         if (!isEmpty) { | ||||
|             for (const linkEl of document.querySelectorAll("a")) { | ||||
|                 const href = linkEl.getAttribute("href"); | ||||
|  | ||||
| @@ -49,6 +24,7 @@ function getContent(note) { | ||||
|  | ||||
|                     if (linkedNote) { | ||||
|                         linkEl.setAttribute("href", linkedNote.shareId); | ||||
|                         linkEl.classList.add("type-" + linkedNote.type); | ||||
|                     } | ||||
|                     else { | ||||
|                         linkEl.removeAttribute("href"); | ||||
| @@ -57,11 +33,24 @@ function getContent(note) { | ||||
|             } | ||||
|  | ||||
|             content = document.body.innerHTML; | ||||
|  | ||||
|             if (content.includes(`<span class="math-tex">`)) { | ||||
|                 header += ` | ||||
| <script src="../../libraries/katex/katex.min.js"></script> | ||||
| <link rel="stylesheet" href="../../libraries/katex/katex.min.css"> | ||||
| <script src="../../libraries/katex/auto-render.min.js"></script> | ||||
| <script src="../../libraries/katex/mhchem.min.js"></script> | ||||
| <script> | ||||
| document.addEventListener("DOMContentLoaded", function() { | ||||
|     renderMathInElement(document.getElementById('content')); | ||||
| }); | ||||
| </script>`; | ||||
|             } | ||||
|         } | ||||
|     else if (note.type === 'code' || note.type === 'mermaid') { | ||||
|     } | ||||
|     else if (note.type === 'code') { | ||||
|         if (!content?.trim()) { | ||||
|             content = NO_CONTENT + getChildrenList(note); | ||||
|             isEmpty = true; | ||||
|         } | ||||
|         else { | ||||
|             const document = new JSDOM().window.document; | ||||
| @@ -72,6 +61,16 @@ function getContent(note) { | ||||
|             content = preEl.outerHTML; | ||||
|         } | ||||
|     } | ||||
|     else if (note.type === 'mermaid') { | ||||
|         content = ` | ||||
| <div class="mermaid">${content}</div> | ||||
| <hr> | ||||
| <details> | ||||
|     <summary>Chart source</summary> | ||||
|     <pre>${content}</pre> | ||||
| </details>` | ||||
|         header += `<script src="../../libraries/mermaid.min.js"></script>`; | ||||
|     } | ||||
|     else if (note.type === 'image') { | ||||
|         content = `<img src="api/images/${note.noteId}/${note.title}?${note.utcDateModified}">`; | ||||
|     } | ||||
| @@ -84,15 +83,23 @@ function getContent(note) { | ||||
|         } | ||||
|     } | ||||
|     else if (note.type === 'book') { | ||||
|         content = getChildrenList(note); | ||||
|         isEmpty = true; | ||||
|     } | ||||
|     else { | ||||
|         content = '<p>This note type cannot be displayed.</p>' + getChildrenList(note); | ||||
|         content = '<p>This note type cannot be displayed.</p>'; | ||||
|     } | ||||
|  | ||||
|     return content; | ||||
|     return { | ||||
|         header, | ||||
|         content, | ||||
|         isEmpty | ||||
|     }; | ||||
| } | ||||
|  | ||||
| module.exports = { | ||||
|     getContent | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -29,13 +29,15 @@ function register(router) { | ||||
|         const note = shaca.aliasToNote[shareId] || shaca.notes[shareId]; | ||||
|  | ||||
|         if (note) { | ||||
|             const content = contentRenderer.getContent(note); | ||||
|             const {header, content, isEmpty} = contentRenderer.getContent(note); | ||||
|  | ||||
|             const subRoot = getSharedSubTreeRoot(note); | ||||
|  | ||||
|             res.render("share/page", { | ||||
|                 note, | ||||
|                 header, | ||||
|                 content, | ||||
|                 isEmpty, | ||||
|                 subRoot | ||||
|             }); | ||||
|         } | ||||
| @@ -44,19 +46,15 @@ function register(router) { | ||||
|         } | ||||
|     }); | ||||
|  | ||||
|     router.get('/share/api/images/:noteId/:filename', (req, res, next) => { | ||||
|         const image = shaca.getNote(req.params.noteId); | ||||
|     router.get('/share/api/notes/:noteId', (req, res, next) => { | ||||
|         const {noteId} = req.params; | ||||
|         const note = shaca.getNote(noteId); | ||||
|  | ||||
|         if (!image) { | ||||
|             return res.status(404).send("Not found"); | ||||
|         } | ||||
|         else if (image.type !== 'image') { | ||||
|             return res.status(400).send("Requested note is not an image"); | ||||
|         if (!note) { | ||||
|             return res.status(404).send(`Note ${noteId} not found`); | ||||
|         } | ||||
|  | ||||
|         res.set('Content-Type', image.mime); | ||||
|  | ||||
|         res.send(image.getContent()); | ||||
|         res.json(note.getPojoWithAttributes()); | ||||
|     }); | ||||
|  | ||||
|     router.get('/share/api/notes/:noteId/download', (req, res, next) => { | ||||
| @@ -64,7 +62,7 @@ function register(router) { | ||||
|         const note = shaca.getNote(noteId); | ||||
|  | ||||
|         if (!note) { | ||||
|             return res.status(404).send(`Not found`); | ||||
|             return res.status(404).send(`Note ${noteId} not found`); | ||||
|         } | ||||
|  | ||||
|         const utils = require("../services/utils"); | ||||
| @@ -79,20 +77,30 @@ function register(router) { | ||||
|         res.send(note.getContent()); | ||||
|     }); | ||||
|  | ||||
|     router.get('/share/api/images/:noteId/:filename', (req, res, next) => { | ||||
|         const image = shaca.getNote(req.params.noteId); | ||||
|  | ||||
|         if (!image) { | ||||
|             return res.status(404).send(`Note ${noteId} not found`); | ||||
|         } | ||||
|         else if (image.type !== 'image') { | ||||
|             return res.status(400).send("Requested note is not an image"); | ||||
|         } | ||||
|  | ||||
|         res.set('Content-Type', image.mime); | ||||
|  | ||||
|         res.send(image.getContent()); | ||||
|     }); | ||||
|  | ||||
|     // used for PDF viewing | ||||
|     router.get('/share/api/notes/:noteId/view', (req, res, next) => { | ||||
|         const {noteId} = req.params; | ||||
|         const note = shaca.getNote(noteId); | ||||
|  | ||||
|         if (!note) { | ||||
|             return res.status(404).send(`Not found`); | ||||
|             return res.status(404).send(`Note ${noteId} not found`); | ||||
|         } | ||||
|  | ||||
|         const utils = require("../services/utils"); | ||||
|  | ||||
|         const filename = utils.formatDownloadTitle(note.title, note.type, note.mime); | ||||
|  | ||||
|         // res.setHeader('Content-Disposition', utils.getContentDisposition(filename)); | ||||
|  | ||||
|         res.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); | ||||
|         res.setHeader('Content-Type', note.mime); | ||||
|  | ||||
|   | ||||
| @@ -89,6 +89,18 @@ class Attribute extends AbstractEntity { | ||||
|  | ||||
|         return this.shaca.getNote(this.value); | ||||
|     } | ||||
|  | ||||
|     getPojo() { | ||||
|         return { | ||||
|             attributeId: this.attributeId, | ||||
|             noteId: this.noteId, | ||||
|             type: this.type, | ||||
|             name: this.name, | ||||
|             position: this.position, | ||||
|             value: this.value, | ||||
|             isInheritable: this.isInheritable | ||||
|         }; | ||||
|     } | ||||
| } | ||||
|  | ||||
| module.exports = Attribute; | ||||
|   | ||||
| @@ -410,6 +410,19 @@ class Note extends AbstractEntity { | ||||
|  | ||||
|         return sharedAlias || this.noteId; | ||||
|     } | ||||
|  | ||||
|     getPojoWithAttributes() { | ||||
|         return { | ||||
|             noteId: this.noteId, | ||||
|             title: this.title, | ||||
|             type: this.type, | ||||
|             mime: this.mime, | ||||
|             utcDateModified: this.utcDateModified, | ||||
|             attributes: this.getAttributes().map(attr => attr.getPojo()), | ||||
|             parentNoteIds: this.parents.map(parentNote => parentNote.noteId), | ||||
|             childNoteIds: this.children.map(child => child.noteId) | ||||
|         }; | ||||
|     } | ||||
| } | ||||
|  | ||||
| module.exports = Note; | ||||
|   | ||||
| @@ -59,11 +59,7 @@ function load() { | ||||
|         SELECT attributeId, noteId, type, name, value, isInheritable, position, utcDateModified  | ||||
|         FROM attributes  | ||||
|         WHERE isDeleted = 0  | ||||
|           AND noteId IN (${noteIdStr}) | ||||
|           AND ( | ||||
|               (type = 'label' AND name IN ('archived', 'shareHiddenFromTree', 'shareAlias', 'shareOmitDefaultCss'))  | ||||
|               OR (type = 'relation' AND name IN ('imageLink', 'template', 'shareCss')) | ||||
|           )`, []); | ||||
|           AND noteId IN (${noteIdStr})`); | ||||
|  | ||||
|     for (const row of rawAttributeRows) { | ||||
|         new Attribute(row); | ||||
|   | ||||
| @@ -61,7 +61,7 @@ async function start() { | ||||
|             const parentNoteId = getRandomNoteId(); | ||||
|             const prefix = Math.random() > 0.8 ? "prefix" : null; | ||||
|  | ||||
|             const result = await cloningService.cloneNoteToParent(noteIdToClone, parentNoteId, prefix); | ||||
|             const result = await cloningService.cloneNoteToBranch(noteIdToClone, parentNoteId, prefix); | ||||
|  | ||||
|             console.log(`Cloning ${i}:`, result.success ? "succeeded" : "FAILED"); | ||||
|         } | ||||
|   | ||||
| @@ -2,7 +2,12 @@ | ||||
| <html lang="en"> | ||||
| <head> | ||||
|     <meta charset="utf-8"> | ||||
|     <% if (note.hasRelation("shareFavicon")) { %> | ||||
|     <link rel="shortcut icon" href="api/notes/<%= note.getRelation("shareFavicon").value %>/download"> | ||||
|     <% } else { %> | ||||
|     <link rel="shortcut icon" href="../favicon.ico"> | ||||
|     <% } %> | ||||
|     <script src="../app/share.js"></script> | ||||
|     <% if (!note.hasLabel("shareOmitDefaultCss")) { %> | ||||
|         <link href="../libraries/normalize.min.css" rel="stylesheet"> | ||||
|         <link href="../stylesheets/share.css" rel="stylesheet"> | ||||
| @@ -13,34 +18,62 @@ | ||||
|     <% for (const cssRelation of note.getRelations("shareCss")) { %> | ||||
|         <link href="api/notes/<%= cssRelation.value %>/download" rel="stylesheet"> | ||||
|     <% } %> | ||||
|     <% for (const jsRelation of note.getRelations("shareJs")) { %> | ||||
|         <script type="module" src="api/notes/<%= jsRelation.value %>/download"></script> | ||||
|     <% } %> | ||||
|     <%- header %> | ||||
|     <title><%= note.title %></title> | ||||
| </head> | ||||
| <body> | ||||
| <body data-note-id="<%= note.noteId %>"> | ||||
| <div id="layout"> | ||||
|     <div id="main"> | ||||
|         <% if (note.parents[0].noteId !== 'share' && note.parents.length !== 0) { %> | ||||
|             <nav id="parentLink"> | ||||
|                 parent: <a href="<%= note.parents[0].shareId %>" | ||||
|                            class="type-<%= note.parents[0].type %>"><%= note.parents[0].title %></a> | ||||
|             </nav> | ||||
|         <% } %> | ||||
|  | ||||
|         <h1 id="title"><%= note.title %></h1> | ||||
|  | ||||
|             <div id="content" class="note-<%= note.type %> <% if (note.type === 'text') { %>ck-content<% } %>"> | ||||
|         <% if (note.hasLabel("pageUrl")) { %> | ||||
|             <div id="noteClippedFrom">This note was originally clipped from <a href="<%= note.getLabelValue("pageUrl") %>"><%= note.getLabelValue("pageUrl") %></a></div> | ||||
|         <% } %> | ||||
|  | ||||
|         <% if (!isEmpty) { %> | ||||
|             <div id="content" class="type-<%= note.type %><% if (note.type === 'text') { %> ck-content<% } %>"> | ||||
|                 <%- content %> | ||||
|             </div> | ||||
|         <% } %> | ||||
|  | ||||
|         <% if (note.hasChildren()) { %> | ||||
|             <nav id="childLinks" class="<% if (isEmpty) { %>grid<% } else { %>list<% } %>"> | ||||
|                 <% if (!isEmpty) { %> | ||||
|                     <hr> | ||||
|                     <span>Child notes: </span> | ||||
|                 <% } %> | ||||
|  | ||||
|                 <ul> | ||||
|                     <% for (const childNote of note.getChildNotes()) { %> | ||||
|                         <li> | ||||
|                             <a href="<%= childNote.shareId %>" | ||||
|                                class="type-<%= childNote.type %>"><%= childNote.title %></a> | ||||
|                         </li> | ||||
|                     <% } %> | ||||
|                 </ul> | ||||
|             </nav> | ||||
|         <% } else if (isEmpty) { %> | ||||
|             <p>This note has no content.</p> | ||||
|         <% } %> | ||||
|     </div> | ||||
|  | ||||
|     <% if (subRoot.hasChildren()) { %> | ||||
|         <button id="menuButton"></button> | ||||
|         <button id="toggleMenuButton"></button> | ||||
|  | ||||
|         <nav id="menu"> | ||||
|             <%- include('tree_item', {note: subRoot, activeNote: note}) %> | ||||
|         </nav> | ||||
|     <% } %> | ||||
| </div> | ||||
|  | ||||
|     <script> | ||||
|         (function () { | ||||
|             const menuButton = document.getElementById('menuButton'); | ||||
|             const layout = document.getElementById('layout'); | ||||
|  | ||||
|             menuButton.addEventListener('click', () => layout.classList.toggle('navMenu')); | ||||
|         }()); | ||||
|     </script> | ||||
| </body> | ||||
| </html> | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|     <% if (activeNote.noteId === note.noteId) { %> | ||||
|     <strong><%= note.title %></strong> | ||||
|     <% } else { %> | ||||
|     <a href="./<%= note.shareId %>"><%= note.title %></a> | ||||
|     <a class="type-<%= note.type %>" href="./<%= note.shareId %>"><%= note.title %></a> | ||||
|     <% } %> | ||||
| </p> | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user