Changes

Jump to navigation Jump to search
m
Line 45: Line 45:  
{{NoteLine|Insert here announcement of indices to follow}}
 
{{NoteLine|Insert here announcement of indices to follow}}
   −
== The Memento application ''User-interface'' layer ==
+
== The Memento application user-interface layer ==
Yada
+
{{NoteLine|Replace the following line with a corrected version}}
{{NoteLine|Insert here the code}}
+
This provides links to access information about topics within the Memento [[About:UiLayer|the user-interface application layer]]
 +
{{NoteLine|Create glossary entries for user interface, user-interface application layer, application structure, application layer, database application layer, scripting application layer, etc}}
 +
{{NoteLine|Insert here the UI index wikitext}}
 +
 
 +
=== User interface examples ===
 +
{{NoteLine|Move this section to the right place if necessary}}
 +
{{NoteLine|Move the following code to the scripting layer}}
 +
To open WhatsApp on the desired contact, the model to use is this:
 +
{{NoteLine|Edit the following script as needed, then move to the scripting layer}}
 +
 
 +
To insert library content, simply define the desired variables.
 +
 
 +
var w ="https://wa.me/phone_number"
 +
 
 +
var i = intent("android.intent.action.VIEW")
 +
 
 +
i.date(w)
 +
 
 +
i.send()
 +
 
 +
The difficulty may be in concatenating https://wa.me/ to the contact number, which is achieved with three variables:
 +
 
 +
var w1 = "https://wa.me/"
 +
 
 +
var t = entry().field ("Phone")
 +
 
 +
var w = w1 + t;
 +
 
 +
'''Example'''
 +
 
 +
var name = entry().field("Name")
 +
 
 +
// Now you will need one more variable to concatenate with the previous ones:
 +
 
 +
var d="?text="
 +
 
 +
which results:
 +
 
 +
var w = w1 + t + d // respect this order for the sake of nomenclature
 +
 
 +
The data now follows:
 +
 
 +
var w = w1 + t + d + name
 +
 
 +
// Line breaks, if necessary in view of the data to be sent, are achieved with \n to insert into a variable and then join.
 +
 
 +
Ex.:
 +
var ml = "\n"
 +
var w = w1 + t + d + name + ml
    
== The Memento application ''Scripting'' layer ==
 
== The Memento application ''Scripting'' layer ==

Navigation menu