How to use the vendors/lodash/lodash.isUndefined function in vendors

To help you get started, we’ve selected a few vendors 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 CERNDocumentServer / cds-videos / cds / modules / personal_collection / static / js / personal_collection / ui / box.js View on Github external
this.deleteBoxAction = function(ev, args) {
      ev.preventDefault();
      // Get box ID from event.target element
      var id = args.id || this._getIDFromTarget(ev.target);
      // Get box jQuery element by id
      var $box = this._getBoxElement(id);
      // get the box settings
      var box = this.attr.storage.get(id);
      var isNew = (_.isUndefined(box.dummy)) ? false : true;
      this.attr.storage.destroy(id);
      // Destroy it from DOM
      $box.remove();
      if (!isNew) {
        this.trigger(document, 'personal.boxes.data.delete', {
          id: id,
        });
      }
      this.trigger(document, 'personal.wrapper.check.button.limits');
    };
github CERNDocumentServer / cds-videos / cds / modules / personal_collection / static / js / personal_collection / component / boxes.js View on Github external
this.update = function(ev, args) {
      var that = this;
      that.trigger(document, 'personal.wrapper.loader.show');
      var id = args.id;
      var box = that.attr.boxStorage.get(id);
      var isNew = _.isUndefined(box.dummy) ? false : true;
      var data = args.data;
      box._settings = data;
      that.attr.boxStorage.save(box);
      var sendingData = {}
      if (!isNew) {
        sendingData.index = id - 1;
        sendingData.data = that._prepareSettings();
      } else {
        delete box.dummy;
        that.attr.boxStorage.save(box);
        sendingData.data = that._prepareSettings();
      }
      console.log('Sendingdata', sendingData);
      $.when(
        that._request({
          url: that.attr.api.boxes,
github CERNDocumentServer / cds-videos / cds / modules / personal_collection / static / js / personal_collection / ui / box.js View on Github external
this._addBoxSkeleton = function(args) {
      var isNew = _.isUndefined(args);
      var box = !isNew ? args : this._getDefaultBox();
      var html = wrapperTemplate(box, {
        nav: navTemplate.template,
        header: headerTemplate.template,
        footer: footerTemplate.template,
      });
      if (isNew) {
        this.attr.storage.save(box)
      }
      this.$node.append(html);
      return box.id;
    };
github CERNDocumentServer / cds-videos / cds / modules / personal_collection / static / js / personal_collection / component / boxes.js View on Github external
var boxes = this.attr.boxStorage.find(function(box){
        return (_.isUndefined(box.dummy) || !box.dummy) && box._settings.title;
      });
      var settings = _.pluck(boxes, '_settings');