How to use the backbone.radio.request function in backbone

To help you get started, we’ve selected a few backbone 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 encryptic-team / encryptic / src / scripts / components / settings / show / sync / remotestorage / View.js View on Github external
onRSAuth() {
        Radio.request('collections/Configs', 'saveConfigs', {
            configs: [
                {name: 'remotestorageAddress', value: this.ui.address.val().trim()},
                {name: 'cloudStorage'        , value: 'remotestorage'},
            ],
        });
    }
github Laverna / laverna / app / scripts / components / notes / remove / Controller.js View on Github external
async removeModel(options) {
        const {model} = options;

        const res = await (options.force ?  'confirm' : this.showConfirm(model));
        if (res !== 'confirm') {
            return;
        }

        return Radio.request('collections/Notes', 'remove', {model});
    }
github Laverna / laverna / app / scripts / models / Peer.js View on Github external
async fetchUsers() {
        this.users = await Radio.request('collections/Users', 'find');
    }
github kilbot / WooCommerce-POS / assets / js / src / apps / pos / receipt / route.js View on Github external
print: function(btn){
    if(!btn){
      btn = this.layout.getRegion('actions').currentView.$('[data-action=print]');
    }

    btn.trigger('state', [ 'loading', '' ]);
    Radio.request('print', 'receipt', {
      model: this.order
    })
    .then(function(){
      btn.trigger('state', [ 'success', null ]);
    })
    .catch(function(error){
      Radio.request('modal', 'error', error);
      btn.trigger('state', [ 'error', null ]);
    });
  },
github encryptic-team / encryptic / src / scripts / components / notes / form / Controller.js View on Github external
async redirect(preRedirect = true) {
        if (preRedirect) {
            await this.preRedirect();
            Radio.request('utils/Url', 'navigateBack');
        }
        else {
            const url = Radio.request('utils/Url', 'getNoteLink', this.model);
            Radio.request('utils/Url', 'navigate', {url});
        }

        this.view.destroy();
    }
github Laverna / laverna / app / scripts / components / notes / form / Controller.js View on Github external
get configs() {
        return Radio.request('collections/Configs', 'findConfigs');
    }
github encryptic-team / encryptic / src / scripts / components / encryption / encrypt / Controller.js View on Github external
show() {
        this.view = new View({configs: this.configs});
        Radio.request('Layout', 'show', {
            region : 'brand',
            view   : this.view,
        });
    }
github Laverna / laverna / app / scripts / components / codemirror / Editor.js View on Github external
linkAction() {
        const dialog = Radio.request('components/linkDialog', 'show');

        if (!dialog) {
            return;
        }

        return dialog.then(link => {
            if (!link || !link.length) {
                return;
            }

            const cursor = this.instance.getCursor('start');
            const text   = this.instance.getSelection() || 'Link';

            this.instance.replaceSelection(`[${text}](${link})`);
            this.instance.setSelection(
                {line: cursor.line, ch: cursor.ch + 1},