From 2f887f1ea738c47c6f21340669ee77f58dbc5698 Mon Sep 17 00:00:00 2001 From: azivner Date: Tue, 6 Nov 2018 14:16:38 +0100 Subject: [PATCH] split dialog templates into separate files --- src/views/dialogs/add_link.ejs | 47 ++ src/views/dialogs/attributes.ejs | 114 +++++ src/views/dialogs/edit_tree_prefix.ejs | 16 + src/views/dialogs/event_log.ejs | 3 + src/views/dialogs/jump_to_note.ejs | 14 + src/views/dialogs/markdown_import.ejs | 7 + src/views/dialogs/note_revisions.ejs | 20 + src/views/dialogs/note_source.ejs | 3 + src/views/dialogs/options.ejs | 198 ++++++++ .../dialogs/protected_session_password.ejs | 16 + src/views/dialogs/recent_changes.ejs | 2 + src/views/dialogs/sql_console.ejs | 12 + src/views/index.ejs | 475 +----------------- 13 files changed, 464 insertions(+), 463 deletions(-) create mode 100644 src/views/dialogs/add_link.ejs create mode 100644 src/views/dialogs/attributes.ejs create mode 100644 src/views/dialogs/edit_tree_prefix.ejs create mode 100644 src/views/dialogs/event_log.ejs create mode 100644 src/views/dialogs/jump_to_note.ejs create mode 100644 src/views/dialogs/markdown_import.ejs create mode 100644 src/views/dialogs/note_revisions.ejs create mode 100644 src/views/dialogs/note_source.ejs create mode 100644 src/views/dialogs/options.ejs create mode 100644 src/views/dialogs/protected_session_password.ejs create mode 100644 src/views/dialogs/recent_changes.ejs create mode 100644 src/views/dialogs/sql_console.ejs diff --git a/src/views/dialogs/add_link.ejs b/src/views/dialogs/add_link.ejs new file mode 100644 index 000000000..78e4b7437 --- /dev/null +++ b/src/views/dialogs/add_link.ejs @@ -0,0 +1,47 @@ + \ No newline at end of file diff --git a/src/views/dialogs/attributes.ejs b/src/views/dialogs/attributes.ejs new file mode 100644 index 000000000..802bfe2b6 --- /dev/null +++ b/src/views/dialogs/attributes.ejs @@ -0,0 +1,114 @@ +
+
+
+ + + +
+ +
+ + + + + + + + + + + + + + + + + + + +
TypeNameValueInheritable
+ + + + + + + +
Attribute name can't be empty.
+
+ + +
+ +
+ +
+ + + + + +
+ +
+ + + +
+
+ + + +
+ +
+

Inherited attributes

+ + + + + + + + + + + + + + + + + + +
TypeNameValueOwning note
+ + + + + + + + + + promoted: + + + + promoted: + +
+
+
+
+
diff --git a/src/views/dialogs/edit_tree_prefix.ejs b/src/views/dialogs/edit_tree_prefix.ejs new file mode 100644 index 000000000..b57dfa313 --- /dev/null +++ b/src/views/dialogs/edit_tree_prefix.ejs @@ -0,0 +1,16 @@ +
+
+
+   + - +
+ +
+ + + +
+
+
\ No newline at end of file diff --git a/src/views/dialogs/event_log.ejs b/src/views/dialogs/event_log.ejs new file mode 100644 index 000000000..2af2af829 --- /dev/null +++ b/src/views/dialogs/event_log.ejs @@ -0,0 +1,3 @@ +
+ +
\ No newline at end of file diff --git a/src/views/dialogs/jump_to_note.ejs b/src/views/dialogs/jump_to_note.ejs new file mode 100644 index 000000000..39a288a31 --- /dev/null +++ b/src/views/dialogs/jump_to_note.ejs @@ -0,0 +1,14 @@ +
+
+ +
+ + +
+ +
+
+
+ + +
\ No newline at end of file diff --git a/src/views/dialogs/markdown_import.ejs b/src/views/dialogs/markdown_import.ejs new file mode 100644 index 000000000..f1db43656 --- /dev/null +++ b/src/views/dialogs/markdown_import.ejs @@ -0,0 +1,7 @@ +
+

Because of browser sandbox it's not possible to directly read clipboard from JavaScript. Please paste the Markdown to import to textarea below and click on Import button

+ + + + +
diff --git a/src/views/dialogs/note_revisions.ejs b/src/views/dialogs/note_revisions.ejs new file mode 100644 index 000000000..dea5558d4 --- /dev/null +++ b/src/views/dialogs/note_revisions.ejs @@ -0,0 +1,20 @@ +
+
+ + +
+
+

+ +
+ +
+
+ +
+
+
+
\ No newline at end of file diff --git a/src/views/dialogs/note_source.ejs b/src/views/dialogs/note_source.ejs new file mode 100644 index 000000000..666bc543f --- /dev/null +++ b/src/views/dialogs/note_source.ejs @@ -0,0 +1,3 @@ +
+ +
diff --git a/src/views/dialogs/options.ejs b/src/views/dialogs/options.ejs new file mode 100644 index 000000000..9e963998e --- /dev/null +++ b/src/views/dialogs/options.ejs @@ -0,0 +1,198 @@ +
+
+ +
+

Settings on this options tab are saved automatically after each change.

+ +
+
+ + +
+ +
+ + + +
+ +

Zooming can be controlled with CTRL-+ and CTRL-= shortcuts as well.

+ +

Left pane sizing

+ +
+ + + +
+ +
+ + + +
+ +

Left pane width is calculated from the percent of window size, if this is smaller than minimum width, then minimum width is used. If you want to have fixed width left pane, set minimum width to the desired width and set percent to 0.

+ +
+
+
+
+
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+
+
+

Protected session timeout is a time period after which the protected session is wiped out from + browser's memory. This is measured from the last interaction with protected notes.

+ +
+
+ + +
+ +
+ + + +
+
+
+
+

Note revision snapshot time interval is time in seconds after which new note revision will be created for the note.

+ +
+
+ + +
+ +
+ + + +
+
+
+
+

Sync configuration

+ +
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + + +
+
+ +

Sync test

+ +

This will test connection and handshake to the sync server. If sync server isn't initialized, this will set it up to sync with local document.

+ + +
+
+

Sync

+ + +
+
+ + + +

Debugging

+ +

+ +

This action will create a new copy of the database and anonymise it (remove all note content and leave only structure and metadata) + for sharing online for debugging purposes without fear of leaking your personal data.

+ +

Image cleanup

+ +

This will remove all image data of images not used in any current version of note from the database (metadata will remain). + + This means that some images can disappear from note revisions.

+ + + +

Vacuum database

+ +

This will rebuild database which will typically result in smaller database file. No data will be actually changed.

+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + +
App version:
DB version:
Sync version:
Build date:
Build revision:
+
+
+
\ No newline at end of file diff --git a/src/views/dialogs/protected_session_password.ejs b/src/views/dialogs/protected_session_password.ejs new file mode 100644 index 000000000..d881e1a3b --- /dev/null +++ b/src/views/dialogs/protected_session_password.ejs @@ -0,0 +1,16 @@ +
+
+
+ + +
+ +
+ + + +
+
+
\ No newline at end of file diff --git a/src/views/dialogs/recent_changes.ejs b/src/views/dialogs/recent_changes.ejs new file mode 100644 index 000000000..3e265f631 --- /dev/null +++ b/src/views/dialogs/recent_changes.ejs @@ -0,0 +1,2 @@ +
+
\ No newline at end of file diff --git a/src/views/dialogs/sql_console.ejs b/src/views/dialogs/sql_console.ejs new file mode 100644 index 000000000..f2615c6c1 --- /dev/null +++ b/src/views/dialogs/sql_console.ejs @@ -0,0 +1,12 @@ +
+
+ +
+ +
+ + + + +
+
\ No newline at end of file diff --git a/src/views/index.ejs b/src/views/index.ejs index 87caab8f3..effb9549e 100644 --- a/src/views/index.ejs +++ b/src/views/index.ejs @@ -298,475 +298,24 @@ - - -
-
- -
- - -
- -
-
-
- - -
- -
-
-
- - -
- -
- - - -
-
-
- -
-
- -
-

Settings on this options tab are saved automatically after each change.

- -
-
- - -
- -
- - - -
- -

Zooming can be controlled with CTRL-+ and CTRL-= shortcuts as well.

- -

Left pane sizing

- -
- - - -
- -
- - - -
- -

Left pane width is calculated from the percent of window size, if this is smaller than minimum width, then minimum width is used. If you want to have fixed width left pane, set minimum width to the desired width and set percent to 0.

- -
-
-
-
-
- - -
- -
- - -
- -
- - -
- - -
-
-
-

Protected session timeout is a time period after which the protected session is wiped out from - browser's memory. This is measured from the last interaction with protected notes.

- -
-
- - -
- -
- - - -
-
-
-
-

Note revision snapshot time interval is time in seconds after which new note revision will be created for the note.

- -
-
- - -
- -
- - - -
-
-
-
-

Sync configuration

- -
-
- - -
- -
- - -
- -
- - -
- -
- - - -
-
- -

Sync test

- -

This will test connection and handshake to the sync server. If sync server isn't initialized, this will set it up to sync with local document.

- - -
-
-

Sync

- - -
-
- - - -

Debugging

- -

- -

This action will create a new copy of the database and anonymise it (remove all note content and leave only structure and metadata) - for sharing online for debugging purposes without fear of leaking your personal data.

- -

Image cleanup

- -

This will remove all image data of images not used in any current version of note from the database (metadata will remain). - - This means that some images can disappear from note revisions.

- - - -

Vacuum database

- -

This will rebuild database which will typically result in smaller database file. No data will be actually changed.

- - -
-
- - - - - - - - - - - - - - - - - - - - - - -
App version:
DB version:
Sync version:
Build date:
Build revision:
-
-
-
- -
-
- - -
-
-

- -
- -
-
- -
-
-
-
- -
-
- -
- -
- -
-
-
-   - - -
- -
- - - -
-
-
- -
-
- -
- -
- - - - -
-
- -
- -
- -
-
-
- - - -
- -
- - - - - - - - - - - - - - - - - - - -
TypeNameValueInheritable
- - - - - - - -
Attribute name can't be empty.
-
- - -
- -
- -
- - - - - -
- -
- - - -
-
- - - -
- -
-

Inherited attributes

- - - - - - - - - - - - - - - - - - -
TypeNameValueOwning note
- - - - - - - - - - promoted: - - - - promoted: - -
-
-
-
-
- -
-

Because of browser sandbox it's not possible to directly read clipboard from JavaScript. Please paste the Markdown to import to textarea below and click on Import button

- - - - -
+ <% include dialogs/add_link.ejs %> + <% include dialogs/attributes.ejs %> + <% include dialogs/edit_tree_prefix.ejs %> + <% include dialogs/event_log.ejs %> + <% include dialogs/jump_to_note.ejs %> + <% include dialogs/markdown_import.ejs %> + <% include dialogs/note_revisions.ejs %> + <% include dialogs/note_source.ejs %> + <% include dialogs/options.ejs %> + <% include dialogs/protected_session_password.ejs %> + <% include dialogs/recent_changes.ejs %> + <% include dialogs/sql_console.ejs %>