"use strict";

const _ = require( 'underscore' );
const Backbone = require( 'backbone' );
Backbone.LocalStorage = require( "backbone.localstorage" );
//require( 'backbone-event-logger' );

const VariableRowModel = require( '../models/dirPickerVariableRow' );

//noinspection JSUnusedGlobalSymbols
/**
 * @class
 * @extends {Backbone.Collection}
 */
const CollectionsDirPickerVariableList = Backbone.Collection.extend( {
  initialize: function () {
    //this.debugEvents('CollectionsVariableList');
  },
  model     : VariableRowModel,
  comparator: 'sort'
} );
_.extend( CollectionsDirPickerVariableList.prototype, require( './mixin' ) );

module.exports = CollectionsDirPickerVariableList;

@@ -12,186 +12,78 @@
 %22;%0A%0A
-const _ = require( 'underscore' );%0Aconst Backbone = require( 'backbone' );%0ABackbone.LocalStorage = require( %22backbone.localstorage%22 );%0A//require( 'backbone-event-logger' );%0A%0Acons
+import DirPickerCollectionBase from './dirPickerCollectionBase';%0Aimpor
 t Va
@@ -101,18 +101,12 @@
 del 
-= require(
+from
  '..
@@ -138,205 +138,197 @@
 Row'
- );%0A%0A//noinspection JSUnusedGlobalSymbols%0A/**%0A * @class%0A * @extends %7BBackbone.Collection%7D%0A */%0Aconst CollectionsDirPickerVariableList = Backbone.Collection.extend( %7B%0A  initialize: func
+%0A%0Aexport default class DirPickerVariableList extends DirPickerCollectionBase %7B%0A%0A  /**%0A   * @param %7Bobject%7D %5Battr%5D%0A   * @param %7Bobject%7D %5Boptions%5D%0A   */%0A  constructor ( attr, op
 tion
+s
  
-(
 ) %7B%0A    
 //th
@@ -327,73 +327,104 @@
     
-//this.debugEvents('CollectionsVariableList');%0A  %7D,%0A  
+super( attr, options );%0A%0A    /**%0A     *%0A     * @type %7BVariableRowModel%7D%0A     */%0A    this.
 model 
-    :
+=
  Var
@@ -440,12 +440,106 @@
 odel
-,%0A  
+;%0A%0A    //noinspection JSUnusedGlobalSymbols%0A    /**%0A     *%0A     * @type %7Bstring%7D%0A     */%0A    this.
 comp
@@ -548,17 +548,18 @@
 ator
-:
+ =
  'sort'%0A
 %7D );
@@ -558,109 +558,227 @@
 rt'%0A
-%7D );%0A_.extend( CollectionsDirPickerVariableList.prototype, require( './mixin' ) );%0A%0Amodule.exports = 
+%0A  %7D%0A%0A  //noinspection JSUnusedGlobalSymbols,JSUnusedLocalSymbols,JSUnusedLocalSymbols%0A  /**%0A   *%0A   * @param %7Bobject%7D %5Battr%5D%0A   * @param %7Bobject%7D %5Boptions%5D%0A   */%0A  initialize ( attr, options ) %7B%0A    this.debugEvents( '
 Coll
@@ -784,25 +784,16 @@
 lections
-DirPicker
 Variable
@@ -796,10 +796,20 @@
 ableList
-;
+' );%0A  %7D%0A%0A%7D
 %0A

Refactor to ES6