How to use the dojo/_base/lang.mixin 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 Saleslogix / argos-saleslogix / src / Views / Offline / List.js View on Github external
const view = this.getDetailView();
    let options = {
      descriptor: entry.description || desc, // keep for backwards compat
      title: entry.description || desc,
      key,
      fromContext: this,
      offlineContext: {
        entityId: this._model.getEntityId(entry),
        entityName: this._model.entityName,
        viewId: this._model.detailViewId,
        offlineDate: entry.$offlineDate,
        source: entry,
      },
    };
    if (additionalOptions) {
      options = lang.mixin(options, additionalOptions);
    }

    // Ensure we have a valid offline detail view and the
    // entity has a detail view that it can use for layout.
    const modelDetailView = this._model.detailViewId;
    const impliedDetailView = `${this._model.entityName.toLowerCase()}_detail`;
    if (view && App.getView(modelDetailView || impliedDetailView)) {
      view.show(options);
    }
  },
  getDetailView: function getDetailView() {
github Saleslogix / argos-saleslogix / src / Views / RecentlyViewed / List.js View on Github external
navigateToOfflineDetailView: function navigateToOfflineDetailView(entry, additionalOptions) {
    const view = this.getDetailView(entry.entityName);
    let options = {
      descriptor: entry.description, // keep for backwards compat
      title: entry.description,
      key: entry.entityId,
      fromContext: this,
      offlineContext: {
        entityId: entry.entityId,
        entityName: entry.entityName,
        viewId: entry.viewId,
        source: entry,
      },
    };
    if (additionalOptions) {
      options = lang.mixin(options, additionalOptions);
    }

    if (view) {
      view.show(options);
    }
  },
  getDetailView: function getDetailView(entityName) {
github dojo / dojo-oldmirror / tests / _base / loader / modules / idFactoryArityExports.js View on Github external
define("dojo/tests/_base/loader/modules/idFactoryArityExports", function(require, exports, module){
	var impliedDep = require("./impliedDep4");
	require("dojo/_base/lang").mixin(exports, {
		module:module,
		id:"idFactoryArityExports",
		impliedDep:impliedDep.id
	});
});
github dojo / dojo / testsDOH / _base / loader / modules / idFactoryArityExports.js View on Github external
define("dojo/testsDOH/_base/loader/modules/idFactoryArityExports", function(require, exports, module){
	var impliedDep = require("./impliedDep4");
	require("dojo/_base/lang").mixin(exports, {
		module:module,
		id:"idFactoryArityExports",
		impliedDep:impliedDep.id
	});
});
github hpcc-systems / HPCC-Platform / esp / src / src / GraphTreeWidget.ts View on Github external
}

        if (params.SafeMode && params.SafeMode !== "false") {
            this.main.depth.set("value", 1);
            var dotAttrs = this.global.getDotMetaAttributes();
            dotAttrs = dotAttrs.replace("\n//graph[splines=\"line\"];", "\ngraph[splines=\"line\"];");
            this.global.setDotMetaAttributes(dotAttrs);
        } else {
            var dotAttrs = this.global.getDotMetaAttributes();
            dotAttrs = dotAttrs.replace("\ngraph[splines=\"line\"];", "\n//graph[splines=\"line\"];");
            this.global.setDotMetaAttributes(dotAttrs);
        }

        this.graphName = params.GraphName;
        this.subGraphId = params.SubGraphId;
        this.widget.TimingsTreeMap.init(lang.mixin({
            query: {
                graphsOnly: true,
                graphName: this.graphName,
                subGraphId: "*"
            },
            hideHelp: true
        }, params));

        this.widget.ActivitiesTreeMap.init(lang.mixin({
            query: {
                activitiesOnly: true,
                graphName: this.graphName,
                subGraphId: "*"
            },
            hideHelp: true
        }, params));
github hpcc-systems / HPCC-Platform / esp / src / src / ws_access.ts View on Github external
arrayUtil.forEach(response.BasednsResponse.Basedns.Basedn, function (item, idx) {
                    data.push(lang.mixin(item, {
                        __hpcc_type: "Permission",
                        __hpcc_id: item.basedn,
                        DisplayName: item.name,
                        children: lang.mixin(CreateResourcesStore(this.groupname, this.username, item.basedn), {
                            parent: this,
                            parentRow: item
                        })
                    }));
                }, this);
            }
github Saleslogix / argos-saleslogix / src / Views / RecentlyViewed / _RightDrawerListMixin.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);
      });

      App.viewSettingsModal.element.on('close', () => {
        if (this._hasChangedEntityPrefs) {
          this.clear();
          this.refreshRequired = true;
          this.refresh();
          this._hasChangedEntityPrefs = false;
          this._hasChangedKPIPrefs = false;
        }

        if (this._hasChangedKPIPrefs && this.rebuildWidgets) {
          this.destroyWidgets();
github hpcc-systems / HPCC-Platform / esp / src / src / ESPWorkunit.ts View on Github external
_TimersSetter: function (Timers) {
        var timers = [];
        for (var i = 0; i < Timers.ECLTimer.length; ++i) {
            var secs = Utility.espTime2Seconds(Timers.ECLTimer[i].Value);
            timers.push(lang.mixin(Timers.ECLTimer[i], {
                __hpcc_id: i + 1,
                Seconds: Math.round(secs * 1000) / 1000,
                HasSubGraphId: Timers.ECLTimer[i].SubGraphId && Timers.ECLTimer[i].SubGraphId !== "" ? true : false
            }));
        }
        this.set("timers", timers);
    },
    _ResourceURLCountSetter: function (ResourceURLCount) {
github hpcc-systems / HPCC-Platform / esp / src / src / ESPLogicalFile.ts View on Github external
copy: function (params) {
        lang.mixin(params.request, {
            sourceLogicalName: this.Name
        });
        return FileSpray.Copy(params);
    },
    rename: function (params) {
github hpcc-systems / HPCC-Platform / esp / src / src / ws_access.ts View on Github external
put: ESPUtil.override(function (inherited, row) {
        this.get(row.__hpcc_id);
        var retVal = inherited(arguments);
        var request = {
            account_name: this.groupname ? this.groupname : this.username,
            account_type: this.groupname ? 1 : 0,
            basedn: row.__hpcc_parent.basedn,
            rtitle: row.__hpcc_parent.rtitle,
            rtype: row.__hpcc_parent.rtype,
            rname: row.name,
            action: "update"
        };
        lang.mixin(request, row);
        delete request['__hpcc_parent'];
        PermissionAction({
            request: request
        });
        return retVal;
    }),

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