How to use the dojo/_base/lang.hitch function in dojo

To help you get started, we’ve selected a few dojo 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 Esri / storymap-cascade / src / app / storymaps / tpl / view / media / WebMapBuilder.jsx View on Github external
postCreate(params) {
    super.postCreate(params);

    this._onToggleMediaConfig = params.onToggleMediaConfig;
    this._sectionType = params.sectionType;

    if (! params.delayBuilderInit) {
      this._initConfigPanel();
    }

    // listen to when THIS SPECIFIC map gets scanned
    this._scanListener = topic.subscribe('scan/maps/' + this._instanceID, lang.hitch(this, this.checkErrors));

    this.initBuilderUI();

    this._node.find('.media-media').attr('data-builder-invite', i18n.builder.mediaConfig.appearance.mapExtentPrompt);
  }
github Esri / storymap-cascade / src / app / storymaps / tpl / view / media / ImageBuilder.jsx View on Github external
else {
      this._initConfigPanel();

      //
      // Image gallery invite
      //
      this._node.find('.img-gallery-invite').click(this._onCreateImageGallery.bind(this));

      this._node.find('.img-gallery-add').tooltip({
        container: 'body',
        title: text.imageGallery.addImage
      });
    }

    // we subscribe to the scan change for this SPECIFIC image only (hence the scan/image/imageID pattern).
    this._scanListener = topic.subscribe('scan/images/' + this._instanceID, lang.hitch(this, this.checkErrors));

    this.initBuilderUI();
  }
github hpcc-systems / HPCC-Platform / esp / src / src / GraphTreeWidget.ts View on Github external
init(params) {
        if (this.inherited(arguments))
            return;

        if (this.global._plugin) {
            this.doInit(params);
        } else {
            this.global.on("ready", lang.hitch(this, function (evt) {
                this.doInit(params);
            }));
        }
    }
github Saleslogix / argos-saleslogix / src / Views / Ticket / Edit.js View on Github external
requestCodeData: function requestCodeData(picklistName, code, field, entry, name) {
    const request = this.createPicklistRequest(picklistName);
    request.read({
      success: lang.hitch(this, this.onRequestCodeDataSuccess, code, field, entry, name),
      failure: this.onRequestCodeDataFailure,
      scope: this,
    });
  },
  onRequestCodeDataSuccess: function onRequestCodeDataSuccess(code, field, entry, name, feed) {
github Saleslogix / argos-saleslogix / src / Views / MetricWidget.js View on Github external
_getData: function _getData() {
    const queryOptions = this._buildQueryOptions();
    const queryExpression = this._buildQueryExpression();
    const store = this.get('store');
    const queryResults = store.query(queryExpression, queryOptions);
    when(queryResults, lang.hitch(this, this._onQuerySuccess, queryResults), lang.hitch(this, this._onQueryError));
  },
  _onQuerySuccess: function _onQuerySuccess(queryResults) {
github Saleslogix / argos-saleslogix / src / Views / _SpeedSearchRightDrawerListMixin.js View on Github external
setupRightDrawer: function setupRightDrawer() {
    const drawer = App.getView('right_drawer');
    if (drawer) {
      lang.mixin(drawer, this._createActions());
      drawer.setLayout(this.createRightDrawerLayout());
      drawer.getGroupForEntry = lang.hitch(this, function getGroupForRightDrawerEntry(entry) {
        return this.getGroupForRightDrawerEntry(entry);
      });

      if (this.rebuildWidgets) {
        App.viewSettingsModal.element.on('close', () => {
          if (this._hasChangedIndexPrefs) {
            this.rebuildWidgets();
            this._hasChangedIndexPrefs = false;
          }
        });
      }
    }
  },
  unloadRightDrawer: function unloadRightDrawer() {
github Saleslogix / argos-saleslogix / src / Views / RecentlyViewed / TotalMetricWidget.js View on Github external
_getData: function _getData() {
    const queryOptions = this._buildQueryOptions();
    const queryExpression = this._buildQueryExpression();
    const model = App.ModelManager.getModel('RecentlyViewed', MODEL_TYPES.OFFLINE);
    const queryResults = model.getEntries(queryExpression, queryOptions);
    when(queryResults, lang.hitch(this, this._onQuerySuccessCount, queryResults), lang.hitch(this, this._onQueryError));
  },
  _onQuerySuccessCount: function _onQuerySuccessCount(results) {
github hpcc-systems / HPCC-Platform / esp / src / src / WsDfu.ts View on Github external
query: function (query, options) {
        switch (query.CountBy) {
            case "Year":
            case "Quarter":
            case "Month":
            case "Day":
                query.Interval = query.CountBy;
                query.CountBy = "Date";
                break;
        }
        var deferredResults = new Deferred();
        deferredResults.total = new Deferred();
        DFUSpace({
            request: query
        }).then(lang.hitch(this, function (response) {
            var data = [];
            if (lang.exists("DFUSpaceResponse.DFUSpaceItems.DFUSpaceItem", response)) {
                arrayUtil.forEach(response.DFUSpaceResponse.DFUSpaceItems.DFUSpaceItem, function (item, idx) {
                    data.push(lang.mixin(item, {
                        __hpcc_id: item.Name
                    }));
                }, this);
            }
            if (options.sort && options.sort.length) {
                data.sort(function (_l, _r) {
                    var l = _l[options.sort[0].attribute];
                    var r = _r[options.sort[0].attribute];
                    if (l === r) {
                        return 0;
                    }
                    switch (options.sort[0].attribute) {
github Saleslogix / argos-saleslogix / src / Views / SpeedSearchList.js View on Github external
requestData: function requestData() {
    $(this.domNode).addClass('list-loading');

    const request = this.createRequest();
    const entry = this.createSearchEntry();

    request.execute(entry, {
      success: lang.hitch(this, this.onRequestDataSuccess),
      failture: lang.hitch(this, this.onRequestDataFailure),
    });
  },
  navigateToDetailView: function navigateToDetailView(key, type) {

dojo

Dojo core is a powerful, lightweight library that makes common tasks quicker and easier. Animate elements, manipulate the DOM, and query with easy CSS syntax, all without sacrificing performance.

BSD-3-Clause OR AFL-2.1
Latest version published 2 years ago

Package Health Score

59 / 100
Full package analysis