How to use the backbone.wreqr.radio 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 MeoMix / StreamusChromeExtension / src / js / background / application.js View on Github external
import Wreqr from 'backbone.wreqr';
import BackgroundArea from 'background/model/backgroundArea';
import BackgroundAreaView from 'background/view/backgroundAreaView';

var BackgroundApplication = Application.extend({
  // Set this flag to true to enable localhost server communication.
  localDebug: false,
  // The URL to which AJAX requests are sent. localhost for debugging or cloud server in production.
  serverUrl: '',
  // A unique identifier for this Streamus instance. Useful for telling logs apart without a signed in user.
  instanceId: '',
  backgroundArea: null,

  // All the channels used for global event communication across the page
  channels: {
    tab: Wreqr.radio.channel('tab'),
    error: Wreqr.radio.channel('error'),
    backgroundNotification: Wreqr.radio.channel('backgroundNotification'),
    notification: Wreqr.radio.channel('notification'),
    backgroundArea: Wreqr.radio.channel('backgroundArea'),
    clipboard: Wreqr.radio.channel('clipboard'),
    foreground: Wreqr.radio.channel('foreground'),
    player: Wreqr.radio.channel('player'),
    activePlaylist: Wreqr.radio.channel('activePlaylist')
  },

  initialize: function() {
    this._setServerUrl();
    this._setInstanceId();
    this.on('start', this._onStart);
  },
github mapcontrib / mapcontrib / src / public / js / view / themeTitle.js View on Github external
initialize: function () {

        this._radio = Wreqr.radio.channel('global');

        this._currentTitleColor = this.model.get('color');

        this.listenTo(this.model, 'change:name', this.setTitle);
        this.listenTo(this.model, 'change:description', this.setDescription);

        this._radio.commands.setHandler('ui:setTitleColor', this.commandSetTitleColor, this);
    },
github mapcontrib / mapcontrib / public / js / view / tempLayer / editGpxColumn.js View on Github external
initialize() {
        this._radio = Wreqr.radio.channel('global');

        this._oldModel = this.model.clone();

        this._colorSelector = new ColorSelectorView({
            color: this.model.get('color'),
        });
    },
github mapcontrib / mapcontrib / public / js / view / gpxErrorNotification.js View on Github external
initialize() {
        this._radio = Wreqr.radio.channel('global');

        return this.render();
    },
github mapcontrib / mapcontrib / public / js / view / deleteThemeModal.js View on Github external
initialize() {
    this._radio = Wreqr.radio.channel('global');
  },
github mapcontrib / mapcontrib / public / js / view / admin / locale / tagColumn.js View on Github external
initialize() {
    this._radio = Wreqr.radio.channel('global');
  },
github mapcontrib / mapcontrib / public / js / view / geocodeWidget.js View on Github external
initialize() {
    this._radio = Wreqr.radio.channel('global');

    this.on('open', this.onOpen);
  },
github mapcontrib / mapcontrib / public / js / router / home.js View on Github external
initialize(app) {
        this._app = app;
        this._config = app.getConfig();
        this._theme = app.getTheme();
        this._user = app.getUser();
        this._iDPresetsHelper = app.getIDPresetsHelper();
        this._nonOsmData = this._app.getNonOsmData();
        this._osmCache = this._app.getOsmCache();
        this._tempLayerCollection = this._app.getTempLayerCollection();
        this._radio = Wreqr.radio.channel('global');
        this._previousRoute = '';

        this._app.getRegion('root').show(
            new HomeRootView({ app: this._app })
        );

        this.on('route', this._setPreviousRoute);
    },
github mapcontrib / mapcontrib / public / js / view / admin / preset / presetCategoryEditColumn.js View on Github external
initialize() {
    this._radio = Wreqr.radio.channel('global');

    this._oldModel = this.model.clone();
  },
github mapcontrib / mapcontrib / public / js / behavior / column.js View on Github external
initialize() {
        this._radio = Wreqr.radio.channel('global');

        this.listenTo(this._radio.vent, 'column:closeAll', this.onCloseAll);

        this._isOpened = false;
    },