Initializing help system before first use

Editing Attachment Properties

The Attachment.openProperties() method opens the attachments dialog and automatically navigates to the given attachment so that it can be reviewed or edited.

If the name of an attachment field is passed in as an argument to this method, the dialog will start out in edit mode on that field.

The following attachment fields are supported in edit mode:
  • filename: Edit the filename of the attachment.
  • description: Edit the description of the attachment.
  • Tags: Edit the tags of the attachment.
For example, the following code sets up a button which when clicked allows the user to edit the description of a particular attachment:
...
.notify(function (scenario) {
    var inputSheet =
        scenario.getTaggedScenarioAttachments('input-sheet');
    if (inputSheet.length) {
        $('button#download-readme').off('click')
            .prop('disabled', false);
        $('button#download-readme').click(function () {
            inputSheet[0].openProperties('description');
        });
    } else {
        // No input sheet available.
        $('button#download-readme').prop('disabled', true);
    }
})
...