Namespace

trash

kiss.data.trash

Trash / Recycle bin

This module manage the deletion and restoration of records. It provides a default UI (a datatable) to see the deleted records and restore them.

View Source client/core/modules/dataTrash.js, line 11

Methods

# static empty(modelId)

Empty the trash

Parameters:
Name Type Description
modelId string

View Source client/core/modules/dataTrash.js, line 229

# static getRecords(modelIdopt) → {Array.<object>}

Get the records that have been sent to trash

Parameters:
Name Type Attributes Description
modelId string <optional>

Optional modelId to filter the deleted records of a single model

View Source client/core/modules/dataTrash.js, line 18

The deleted records

Array.<object>

# static restoreRecord(recordId) → {boolean}

Restore a given record to its original collection

Parameters:
Name Type Description
recordId string

View Source client/core/modules/dataTrash.js, line 194

true if the record could be restored

boolean

# static showRecords(config)

Show the deleted records for a given model

Parameters:
Name Type Attributes Description
config object
modelId string

Mandatory model id

filter object <optional>

Optional filter

filterSyntax object <optional>

"mongo" (default) | "normalized"

sort object <optional>

Optional sort

sortSyntax object <optional>

"mongo" | "normalized" (default)

View Source client/core/modules/dataTrash.js, line 45