PageSourceSearch

https://www.wilbursmithbooks.com/modules/apostrophe-pieces/js/batch-permissions-modal.js

js wilbursmithbooks.com collected 2026-10-02 10:52:50 UTC 822 bytes, 30 lines download raw bytes

1// A modal for selecting permissions to be applied to a batch of pieces
2
3apos.define('apostrophe-pieces-batch-permissions-modal', {
4
5  extend: 'apostrophe-modal',
6
7  source: 'batch-permissions-modal',
8
9  verb: 'permissions',
10
11  construct: function(self, options) {
12    self.beforeShow = function(callback) {
13      _.assign(options.body, apos.schemas.newInstance(options.schema));
14      return apos.schemas.populate(self.$el, options.schema, options.body, callback);
15    };
16
17    self.saveContent = function(callback) {
18      return apos.schemas.convert(self.$el, options.schema, options.body, {}, function(err) {
19        if (!err) {
20          self.ok = true;
21        }
22        return callback(err);
23      });
24    };
25
26    self.afterHide = function() {
27      return options.after(self.ok ? null : 'Canceled');
28    };
29  }
30});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.