Sha256: add25bc3ce2d95ba32715dcb8489afb3ba8ea5c3fc0bc682b946d35d896804d4

Contents?: true

Size: 1.19 KB

Versions: 32

Compression:

Stored size: 1.19 KB

Contents

!(angular => {
  'use strict';

  function DirtyAwareCollectionModelImports(CollectionDirtyAwareness, CollectionModelBase) {

    return class DirtyAwareCollectionModel extends CollectionModelBase {

      constructor(resource, Model) {
        super(resource, Model);
        this._collectionDirtyAwareness = new CollectionDirtyAwareness(() => this.collection);

        // delegated methods

        this.dirtyItems     = this._collectionDirtyAwareness.dirtyItems.bind(this._collectionDirtyAwareness);
        this.isDirty        = this._collectionDirtyAwareness.isDirty.bind(this._collectionDirtyAwareness);
        this.isPristine     = this._collectionDirtyAwareness.isPristine.bind(this._collectionDirtyAwareness);
        this.revert         = this._collectionDirtyAwareness.revert.bind(this._collectionDirtyAwareness);
      }

      save(saveParams, initParams) {
        return this._saveCollection(saveParams, initParams, this.dirtyItems());
      }
    };
  }

  DirtyAwareCollectionModelImports.$inject = ['CollectionDirtyAwareness', 'CollectionModelBase'];

  angular.module('models.dirtyAwareCollectionModel', [])
    .service('DirtyAwareCollectionModel', DirtyAwareCollectionModelImports);

}(angular));

Version data entries

32 entries across 16 versions & 1 rubygems

Version Path
aleph_analytics-0.4.9.pre.dev public/assets/angular/services/model/dirty_aware_collection_model.js-6f4d2b409a033f5ffc6bd5a747df2046.es6
aleph_analytics-0.4.9.pre.dev app/assets/javascripts/angular/services/model/dirty_aware_collection_model.js.es6
aleph_analytics-0.4.8 public/assets/angular/services/model/dirty_aware_collection_model.js-6f4d2b409a033f5ffc6bd5a747df2046.es6
aleph_analytics-0.4.8 app/assets/javascripts/angular/services/model/dirty_aware_collection_model.js.es6
aleph_analytics-0.4.7 app/assets/javascripts/angular/services/model/dirty_aware_collection_model.js.es6
aleph_analytics-0.4.7 public/assets/angular/services/model/dirty_aware_collection_model.js-6f4d2b409a033f5ffc6bd5a747df2046.es6
aleph_analytics-0.4.4 public/assets/angular/services/model/dirty_aware_collection_model.js-6f4d2b409a033f5ffc6bd5a747df2046.es6
aleph_analytics-0.4.4 app/assets/javascripts/angular/services/model/dirty_aware_collection_model.js.es6
aleph_analytics-0.4.2 public/assets/angular/services/model/dirty_aware_collection_model.js-6f4d2b409a033f5ffc6bd5a747df2046.es6
aleph_analytics-0.4.2 app/assets/javascripts/angular/services/model/dirty_aware_collection_model.js.es6
aleph_analytics-0.4.1 public/assets/angular/services/model/dirty_aware_collection_model.js-6f4d2b409a033f5ffc6bd5a747df2046.es6
aleph_analytics-0.4.1 app/assets/javascripts/angular/services/model/dirty_aware_collection_model.js.es6
aleph_analytics-0.3.0 public/assets/angular/services/model/dirty_aware_collection_model.js-6f4d2b409a033f5ffc6bd5a747df2046.es6
aleph_analytics-0.3.0 app/assets/javascripts/angular/services/model/dirty_aware_collection_model.js.es6
aleph_analytics-0.2.0 app/assets/javascripts/angular/services/model/dirty_aware_collection_model.js.es6
aleph_analytics-0.2.0 public/assets/angular/services/model/dirty_aware_collection_model.js-6f4d2b409a033f5ffc6bd5a747df2046.es6
aleph_analytics-0.1.0 public/assets/angular/services/model/dirty_aware_collection_model.js-6f4d2b409a033f5ffc6bd5a747df2046.es6
aleph_analytics-0.1.0 app/assets/javascripts/angular/services/model/dirty_aware_collection_model.js.es6
aleph_analytics-0.0.6 public/assets/angular/services/model/dirty_aware_collection_model.js-6f4d2b409a033f5ffc6bd5a747df2046.es6
aleph_analytics-0.0.6 app/assets/javascripts/angular/services/model/dirty_aware_collection_model.js.es6