How to use the framework/events.Events.emit function in framework

To help you get started, we’ve selected a few framework 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 keeweb / keeweb / app / scripts / auto-type / index.js View on Github external
this.selectEntryView.on('show-open-files', () => {
            this.selectEntryView.hide();
            Events.emit('open-file');
        });
    },
github keeweb / keeweb / app / scripts / models / app-model.js View on Github external
setFilter(filter) {
        this.filter = this.prepareFilter(filter);
        this.filter.subGroups = this.settings.expandGroups;
        if (!this.filter.advanced && this.advancedSearch) {
            this.filter.advanced = this.advancedSearch;
        }
        const entries = this.getEntries();
        if (!this.activeEntryId || !entries.get(this.activeEntryId)) {
            const firstEntry = entries[0];
            this.activeEntryId = firstEntry ? firstEntry.id : null;
        }
        Events.emit('filter', { filter: this.filter, sort: this.sort, entries });
        Events.emit('entry-selected', entries.get(this.activeEntryId));
    }
github keeweb / keeweb / app / scripts / views / app-view.js View on Github external
windowResize() {
        Events.emit('page-geometry', { source: 'window' });
    }
github keeweb / keeweb / app / scripts / comp / launcher / launcher-electron.js View on Github external
Events.on('launcher-minimize', () => setTimeout(() => Events.emit('app-minimized'), 0));
Events.on('launcher-started-minimized', () => setTimeout(() => Launcher.minimizeApp(), 0));
github keeweb / keeweb / app / scripts / views / footer-view.js View on Github external
toggleHelp() {
        Events.emit('toggle-settings', 'help');
    }
github keeweb / keeweb / app / scripts / models / file-model.js View on Github external
removeKeyFile() {
        this.db.credentials.keyFileHash = null;
        const changed = !!this.oldKeyFileHash;
        if (!changed && this.db.credentials.passwordHash === this.oldPasswordHash) {
            this.db.meta.keyChanged = this.oldKeyChangeDate;
        }
        this.set({ keyFileName: '', keyFilePath: '', keyFileChanged: changed });
        Events.emit('unset-keyfile', this.id);
        this.setModified();
    }
github keeweb / keeweb / app / scripts / models / app-model.js View on Github external
        file.on('change', () => Events.emit('file-changed', file));
        return true;
github keeweb / keeweb / app / scripts / views / grp-view.js View on Github external
returnToApp() {
        Events.emit('edit-group');
    }
}
github keeweb / keeweb / app / scripts / views / details / details-view.js View on Github external
autoType() {
        Events.emit('auto-type', { entry: this.model });
    }