Difference between revisions of "Dev: Memento wiki authoring templates"

From Memento Database Wiki
Jump to: navigation, search
m
m
Line 64: Line 64:
 
=== Display Options ===
 
=== Display Options ===
 
<hr>
 
<hr>
;FieldTypeReturnValues:
+
;FieldTypeReturnValues: displays a table showing for each field type, the JavaScript object returned & examples of returned values, as follows:
 +
{{FieldTypeReturnValues}}
 
<hr>
 
<hr>
;FieldWhereEdit:
+
;FieldWhereEdit: provides the following standard ''Where the field can be edited'' text, as follows:<pre>{{FieldWhereEdit}}</pre><small>
 +
{{FieldWhereEdit}}</small>
  
 
=== Linking sheets ===
 
=== Linking sheets ===

Revision as of 09:14, 10 April 2021

« Page as of 2021-04-10, editions Mobile 4.10.0, Desktop 1.9.6 »

From the beginning, the Memento wiki was developed and continues to be developed with the assistance of wiki templates developed by ourselves.

To access these templates, go to Main Page > Special Pages > Uncategorized templates.

This page documents each of the templates, how they are used, and I'm some cases, how they are used together.

Template documentation

Note annotations

BeginNote
Initiate a note being taken in a wiki page
EndNote
Finish a note being taken in a wiki page
NoteLine
A single-line independent note

Memento editions & their documentation in the wiki

EditionA
Info on all editions of Memento follows
EditionD
Info specific to the desktop edition follows
EditionM
Info specific to the mobile edition follows

Field type spec support

Standard or default language for field type definition parameters & options

Advanced parameters


Field Data Validation
Documentation is shown in 3 segments: the base (the initial text), the text specific to the field type being documented, and the wrap (the closing text). For example, documentation for a text field is done as follows:
{{FieldDataValidationBase}}
{{FieldDataValidationText}}
{{FieldDataValidationWrap}}

Such threesomes provide the following standard language:
(Initial text for all data validation fields) FieldDataValidationBase:

Data validation
The value of a field may be validated against user-specified criteria. If the validation fails, an error message is displayed on the screen by the field, and the user must take action to resolve the situation before saving the entry.

(For date fields) FieldDataValidationDate:

After selecting Data Validation, a pop-up will appear for entering validation criteria. For Date & DateTime fields, the input will be deemed valid if:
Today
the date is today.
Yesterday
the date is yesterday.
This week
the date is some time last week.
This month
the date is some time this month.
Last week
the date is some time left week.
Last month
the date is some time last month.
Custom
the date falls between the two dates entered below.
Is empty
the field is empty.
Is not empty
the field is not empty.
This year
the date is some time this year.

(For numeric fields) FieldDataValidationNumeric:

After selecting Data Validation, a pop-up will appear for entering validation criteria. For numeric fields, the input will be deemed valid if:
Less than (default)
its value is less than the value entered below.
Less than (default)
its value is less than the value entered below.
Greater than
its value is greater than the value entered below.
Equal to
its value is equal to the value entered below.
Not equal to
its value is not equal to the value entered below.
Empty
the field is empty.
Not empty
the field is not empty.
Between
its value is between the two numbers entered below.

(For text fields) FieldDataValidationText:

After selecting Data Validation, a pop-up will appear for entering validation criteria. The input will be deemed valid if:
Contains (default)
it contains a string (a sequence of characters) as entered below.
Not contains
it does not contain the string entered below.
Is equal to
it matches the string entered below.
Is not equal to
it does not match the string entered below.
Is empty
it is empty (contains nothing).
Is not empty
it is not empty (contains any characters).

(Closing text for all data validation fields) FieldDataValidationWrap:

If the checkbox is unchecked (default), a standard error message will be displayed when the input is invalid.
If the checkbox is checked, a custom error message will be displayed when the input is invalid.
If the Clear button is pressed, the criteria settings will be cleared.
If the Cancel button is pressed, the criteria settings will not be affected, and the criteria pop-up will be dismissed.
If the OK button is pressed, the input data will be accepted and displayed on the screen after the pop-up disappears.

FieldDepend
provides the following standard language:

Dependencies 
Ability to add one or more visibility dependencies upon fields with qualifying types.
FieldFont
provides the following standard language:
Font 
Choices are:
  • Family: Regular, Light, Condensed, Thin, Medium. By default, Regular.
  • Style: Normal, Bold, Italic, Bold Italic. By default, Normal.
  • Size: By default, 18. Direct entry to change.
  • Color: By default, White. Palette of 20 colors, backed up by a continuously variable color chooser.
FieldFontCard
provides the following standard language:
The card for specification of the details of the font is displayed.
The FAMILY may be Regular, Condensed, Light, Thin, or Medium; the default is {{{1}}}.
The STYLE may be Normal, Bold, Italic, or Bold Italic; the default is {{{2}}}.
The SIZE may be entered as an integer number of type points; the default is {{{3}}}.
The COLOR may be chosen, in place of the DEFAULT, from a palette of 20 preselected colors. Alternatively, the PALETTE button opens a card from which a specific hue may be constructed.
A SAMPLE sentence illustrates the result for the user.
A DEFAULT button slows the user to reset all the settings for this font to their default values with one button press.
FieldNameHint
provides the following standard language:

Name
Textual, case-insensitive field identifier that can include spaces; it's best to avoid characters that can be used as operators, though (standard across all field types)
Hint
Textual, case-insensitive field identifier that can include spaces
FieldOnCard
provides the following standard language:

The field name
Display the name of the field in the card entry (By default, On). By this, it is meant that the field name will or will not be displayed on either the Entry View card or the Entry Edit card.
FieldRequired
provides the following standard language:

Required 
Make entry of a value mandatory before saving an entry
FieldRoleRND
provides the following standard language:

Display in the list as 
Select among the following roles for the current field:
  • As a Regular field
  • As an Entry Name
  • As an Entry Description
FieldRoleRNDS
provides the following standard language:

Display in the list as 
Select among the following roles for the current field:
  • As a Regular field
  • As an Entry Name
  • As an Entry Description
  • As an Entry Status
FieldRoleRT
provides the following standard language:

Display in the list as 
Select among the following roles for the current field:
  • As a Regular field
  • As an Entry Thumbnail

Display Options


FieldTypeReturnValues
displays a table showing for each field type, the JavaScript object returned & examples of returned values, as follows:
Field Type Return Values
Field type JavaScript object Examples
Text , Hyperlink, Password, Phone, Email, Barcode, Radio buttons, Single-choice list, Calculation (string result) String "abc"
Integer, Real number, Integer values, Rating, Currency, Calculation (number result) Number 42, 42.1
Date , DateTime, Time Date
Checkbox (Boolean) Boolean true, false
Checkboxes, Multiple-choice list Array of strings ["Shirts", "Pants", "Socks"]
Image Array of strings ["file:///storage/emulated/0/DCIM/image01.png", "file:///storage/emulated/0/DCIM/image02.png"]
Link to entry Array of entries
Each array element has a method field() for access to values of fields of entries of the linked library. Example:
field("localField")[i].field("remoteField")
[e1, e2, e3, ...]

FieldWhereEdit
provides the following standard Where the field can be edited text, as follows:
{{FieldWhereEdit}}
Where you can edit 
Unlike most field types, choice field types such as this one can be displayed and edited (changed, checked/unchecked) in the list directly, though by default, a field will be displayed in the Entry View and Entry Edit cards and may be edited in the Entry Edit Card.

Linking sheets


JavaScriptLinks

LinkSyncSheets

MenuOptionLinkSyncSheets

MenuOptionProtection

MenuOptionUploadToCloud

Specific

Time & version stamping of wiki pages

Stamp
Pages that apply to all editions of Memento

Example Stamp
{{stamp|21-04-10|4.10.0|1.9.6}
« Page as of 21-04-10, editions Mobile 4.10.0, Desktop 1.9.6 »

StampD
Pages that apply only to the Desktop edition

Example StampD
{{stamp|21-04-10|4.10.0|1.9.6}}
« Page as of 21-04-10, Desktop edition 1.9.6 »

StampM
Pages that apply only to the Mobile edition

Example StampM
{{stampM|21-04-10|4.10.0}}
« Page as of 21-04-10, Mobile edition 4.10.0 »

Miscellaneous

TBD above TBD below