current note as in note loaded into right pane is now called "active note" in frontend API

This commit is contained in:
zadam 2019-03-12 21:52:19 +01:00
parent 65684550a8
commit 0144dc12df
3 changed files with 222 additions and 222 deletions

View file

@ -1244,6 +1244,214 @@
<h4 class="name" id="getActiveNote"><span class="type-signature"></span>getActiveNote<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="NoteFull.html">NoteFull</a>}</span></h4>
<dl class="details">
<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#line211">line 211</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
active note (loaded into right pane)
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="NoteFull.html">NoteFull</a></span>
</dd>
</dl>
<h4 class="name" id="getActiveNoteContent"><span class="type-signature"></span>getActiveNoteContent<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>
<dl class="details">
<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#line205">line 205</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
content of active note (loaded into right pane)
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
<h4 class="name" id="getCodeMimeTypes"><span class="type-signature"></span>getCodeMimeTypes<span class="signature">()</span><span class="type-signature"> &rarr; {array}</span></h4> <h4 class="name" id="getCodeMimeTypes"><span class="type-signature"></span>getCodeMimeTypes<span class="signature">()</span><span class="type-signature"> &rarr; {array}</span></h4>
@ -1348,214 +1556,6 @@
<h4 class="name" id="getCurrentNote"><span class="type-signature"></span>getCurrentNote<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="NoteFull.html">NoteFull</a>}</span></h4>
<dl class="details">
<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#line211">line 211</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
currently loaded note in the editor (HTML, code etc.)
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="NoteFull.html">NoteFull</a></span>
</dd>
</dl>
<h4 class="name" id="getCurrentNoteContent"><span class="type-signature"></span>getCurrentNoteContent<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>
<dl class="details">
<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#line205">line 205</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
content of currently loaded note in the editor (HTML, code etc.)
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
<h4 class="name" id="getDefaultCodeMimeTypes"><span class="type-signature"></span>getDefaultCodeMimeTypes<span class="signature">()</span><span class="type-signature"> &rarr; {array}</span></h4> <h4 class="name" id="getDefaultCodeMimeTypes"><span class="type-signature"></span>getDefaultCodeMimeTypes<span class="signature">()</span><span class="type-signature"> &rarr; {array}</span></h4>
@ -1964,7 +1964,7 @@ otherwise (by e.g. createNoteLink())
<h4 class="name" id="isNoteStillLoaded"><span class="type-signature"></span>isNoteStillLoaded<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4> <h4 class="name" id="isNoteStillActive"><span class="type-signature"></span>isNoteStillActive<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4>
@ -2359,7 +2359,7 @@ note.
<h4 class="name" id="protectCurrentNote"><span class="type-signature"></span>protectCurrentNote<span class="signature">()</span><span class="type-signature"></span></h4> <h4 class="name" id="protectActiveNote"><span class="type-signature"></span>protectActiveNote<span class="signature">()</span><span class="type-signature"></span></h4>

View file

@ -228,15 +228,15 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) {
/** /**
* @method * @method
* @returns {string} content of currently loaded note in the editor (HTML, code etc.) * @returns {string} content of active note (loaded into right pane)
*/ */
this.getCurrentNoteContent = noteDetailService.getCurrentNoteContent; this.getActiveNoteContent = noteDetailService.getCurrentNoteContent;
/** /**
* @method * @method
* @returns {NoteFull} currently loaded note in the editor (HTML, code etc.) * @returns {NoteFull} active note (loaded into right pane)
*/ */
this.getCurrentNote = noteDetailService.getCurrentNote; this.getActiveNote = noteDetailService.getCurrentNote;
/** /**
* This method checks whether user navigated away from the note from which the scripts has been started. * This method checks whether user navigated away from the note from which the scripts has been started.
@ -247,7 +247,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) {
* @method * @method
* @return {boolean} returns true if the original note is still loaded, false if user switched to another * @return {boolean} returns true if the original note is still loaded, false if user switched to another
*/ */
this.isNoteStillLoaded = () => { this.isNoteStillActive = () => {
return this.originEntity.noteId === noteDetailService.getCurrentNoteId(); return this.originEntity.noteId === noteDetailService.getCurrentNoteId();
}; };
@ -284,7 +284,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) {
/** /**
* @method * @method
*/ */
this.protectCurrentNote = protectedSessionService.protectNoteAndSendToServer; this.protectActiveNote = protectedSessionService.protectNoteAndSendToServer;
} }
export default FrontendScriptApi;</code></pre> export default FrontendScriptApi;</code></pre>

View file

@ -200,15 +200,15 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) {
/** /**
* @method * @method
* @returns {string} content of currently loaded note in the editor (HTML, code etc.) * @returns {string} content of active note (loaded into right pane)
*/ */
this.getCurrentNoteContent = noteDetailService.getCurrentNoteContent; this.getActiveNoteContent = noteDetailService.getCurrentNoteContent;
/** /**
* @method * @method
* @returns {NoteFull} currently loaded note in the editor (HTML, code etc.) * @returns {NoteFull} active note (loaded into right pane)
*/ */
this.getCurrentNote = noteDetailService.getCurrentNote; this.getActiveNote = noteDetailService.getCurrentNote;
/** /**
* This method checks whether user navigated away from the note from which the scripts has been started. * This method checks whether user navigated away from the note from which the scripts has been started.
@ -219,7 +219,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) {
* @method * @method
* @return {boolean} returns true if the original note is still loaded, false if user switched to another * @return {boolean} returns true if the original note is still loaded, false if user switched to another
*/ */
this.isNoteStillLoaded = () => { this.isNoteStillActive = () => {
return this.originEntity.noteId === noteDetailService.getCurrentNoteId(); return this.originEntity.noteId === noteDetailService.getCurrentNoteId();
}; };
@ -256,7 +256,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) {
/** /**
* @method * @method
*/ */
this.protectCurrentNote = protectedSessionService.protectNoteAndSendToServer; this.protectActiveNote = protectedSessionService.protectNoteAndSendToServer;
} }
export default FrontendScriptApi; export default FrontendScriptApi;