This function inserts a stamp in the tool bar of the JobViewer 2. It returns a stamp object, which can be used for removing.
Parameter |
Type |
Description |
|---|---|---|
text |
string |
Text displayed on the stamp (between 1 and 20 characters) |
options |
object |
Optional object with the following key pairs: •includeTime (boolean): Indicates whether the time should be displayed when the stamp is placed •includeDate (boolean): Indicates whether the date should be displayed when the stamp is placed •color (string): Indicates the color of the stamp (format: #RRGGBB) •onStamp (function): Callback function, invoked when the stamp is saved |
Example:
// Create a stamp with default properties:
// {
// includeTime: false,
// includeDate: false,
// color: '#ff0000'
// }
jr_viewer_stamp_create('rejected');
// Create a stamp with self-defined properties:
jr_viewer_stamp_create('checked', {
includeTime: false,
includeDate: true,
color: '#00ff00',
onStamp: function(stamp) {
jr_enable_send();
jr_viewer_stamp_remove(stamp);
}
});