Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
Fix shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewKirkovski committed Jun 5, 2017
1 parent 4622f2e commit 13ec401
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion dist/sf.listing.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/sf.listing.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/sf.listing.nostyles.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/sf.listing.nostyles.js.map

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions js-source/listing.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ Listing.prototype._construct = function (sf, node, options) {
this.options = Object.assign(this.options, options);
}

// Few shortcuts for syntax sugar purposes
this._config = this.options.config;
this._namespace = this._config.namespace;
this._orderQuery = this._namespace + '[order]';
this._sortByQuery = this._namespace + '[sortBy]';
this._limitQuery = this._namespace + '[limit]';
this._pageQuery = this._namespace + '[page]';
this._filtersQuery = this._namespace + '[filters]';
this._valuesQuery = this._namespace + '[values]';

this.listingId = node.id;

this.els = {
Expand All @@ -31,16 +41,6 @@ Listing.prototype._construct = function (sf, node, options) {

this.updateControls();
this.addEventListeners();

// Few shortcuts for syntax sugar purposes
this._config = this.options.config;
this._namespace = this._config.namespace;
this._orderQuery = this._namespace + '[order]';
this._sortByQuery = this._namespace + '[sortBy]';
this._limitQuery = this._namespace + '[limit]';
this._pageQuery = this._namespace + '[page]';
this._filtersQuery = this._namespace + '[filters]';
this._valuesQuery = this._namespace + '[values]';
};

Listing.prototype.optionsToGrab =
Expand Down

0 comments on commit 13ec401

Please sign in to comment.