How to use directus - 3 common examples

To help you get started, we’ve selected a few directus examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github directus / api / app / router.js View on Github external
this.insertView('#featureSidebar', tabs);
          this.insertView('#mainSidebar', bookmarks);
        },

        keep: true
      });

      // Holds references to view instances
      this.v = {};

      this.v.main = new Backbone.Layout({

        el: '#main',

        views: {
          '#modal_container': new directus.Modal.Container(),
          '#sidebar': new Navbar({model: app.settings}),
          '#header': new BaseHeaderView()
        }
      });

      this.v.messages = new Backbone.Layout({
        el: '#messages'
      });

      this.routeHistory = {
        stack: [],
        base: '',
        routes: []
      };
      this.bind('route', this.onRoute, this);
github directus / api / app / router.js View on Github external
openUserModal: function (userId) {
      var view = new directus.Modal.User({model: app.users.get(userId)});

      this.openViewInModal(view);
    },
github directus / api / app / router.js View on Github external
openModal: function (options, callback) {
      var containerView = this.v.main.getView('#modal_container');

      if (!containerView) {
        return;
      }

      if (containerView.isOpen()) {
        containerView.close(true);
      }

      var view = new directus.Modal.Prompt(options);

      containerView.show(view);
    },

directus

Directus is a real-time API and App dashboard for managing SQL database content

BUSL-1.1
Latest version published 9 hours ago

Package Health Score

89 / 100
Full package analysis

Popular directus functions