Skip to content

Commit

Permalink
bump version 0.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mpneuried committed Jan 27, 2017
1 parent d5c27ec commit 9165580
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 19 deletions.
1 change: 0 additions & 1 deletion _src/js/main.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ class IGGY extends Backbone.Events
return @nonEmptyResults

triggerChange: =>
console.log @nonEmptyResults
setTimeout( =>
@trigger( "change", @nonEmptyResults )
, 0 )
Expand Down
2 changes: 1 addition & 1 deletion css/iggy.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/css/iggy.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions dist/js/iggy.js

Large diffs are not rendered by default.

68 changes: 68 additions & 0 deletions example/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,74 @@ jQuery( function( $ ){
'Last 90 Days': [moment().subtract(89, 'day'), moment()]
}
}
},{
type: "daterange",
name: "issue55",
label: "daterange55",
value: [moment().add( -4, "d" ).valueOf(), moment().add( 4, "d" ).valueOf() ],
},{
type: "daterange",
name: "issue55_frmt_A",
label: "daterange55_frmt moment",
dateformat: "DD [foo] MMM [bar] YY",
value: [moment( moment().subtract(29, 'day').valueOf()), moment( moment().valueOf() )],
opts: {
//format: "DD [foo] MMM [bar] YY",
showWeekNumbers : true,
showDropdowns : true,
timePicker: false,
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'day'), moment().subtract(1, 'day')],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')],
'Last 7 Days': [moment().subtract(6, 'day'), moment()],
'Last 30 Days': [moment().subtract(29, 'day'), moment()],
'Last 90 Days': [moment().subtract(89, 'day'), moment()]
}
}
},{
type: "daterange",
name: "issue55_frmt_B",
label: "daterange55_frmt number",
dateformat: "DD [foo] MMM [bar] YY",
value: [moment().subtract(29, 'day').valueOf(), moment().valueOf()],
opts: {
//format: "DD [foo] MMM [bar] YY",
showWeekNumbers : true,
showDropdowns : true,
timePicker: false,
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'day'), moment().subtract(1, 'day')],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')],
'Last 7 Days': [moment().subtract(6, 'day'), moment()],
'Last 30 Days': [moment().subtract(29, 'day'), moment()],
'Last 90 Days': [moment().subtract(89, 'day'), moment()]
}
}
},{
type: "daterange",
name: "issue55_frmt_C",
label: "daterange55_frmt format",
dateformat: "DD [foo] MMM [bar] YY",
value: [moment().subtract(29, 'day').format("DD [foo] MMM [bar] YY"), moment().format("DD [foo] MMM [bar] YY")],
opts: {
//format: "DD [foo] MMM [bar] YY",
showWeekNumbers : true,
showDropdowns : true,
timePicker: false,
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'day'), moment().subtract(1, 'day')],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')],
'Last 7 Days': [moment().subtract(6, 'day'), moment()],
'Last 30 Days': [moment().subtract(29, 'day'), moment()],
'Last 90 Days': [moment().subtract(89, 'day'), moment()]
}
}
}]
var opts3 = {
searchButton: {
Expand Down
20 changes: 14 additions & 6 deletions js/iggy.debug.js

Large diffs are not rendered by default.

18 changes: 13 additions & 5 deletions js/iggy.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ IGGY = (function(superClass) {
};

IGGY.prototype.triggerChange = function() {
console.log(this.nonEmptyResults);
setTimeout((function(_this) {
return function() {
return _this.trigger("change", _this.nonEmptyResults);
Expand Down Expand Up @@ -1438,7 +1437,7 @@ FacetSubsDateRange = (function(superClass) {
FacetSubsDateRange.prototype.template = require("../../tmpls/daterange.jade");

FacetSubsDateRange.prototype.forcedDateRangeOpts = function() {
var _ed, _opts, _sd, ref, ref1;
var _ed, _opts, _sd, ref, ref1, ref2;
_opts = {
opens: "right"
};
Expand All @@ -1448,13 +1447,22 @@ FacetSubsDateRange = (function(superClass) {
};
}
if (((ref = this.model.get("value")) != null ? ref[0] : void 0) != null) {
_sd = moment(this.model.get("value")[0], this.model.get("dateformat"));
((ref1 = this.model.get("value")) != null ? ref1[1] : void 0) != null;
if (_.isNumber(this.model.get("value")[0])) {
_sd = moment(this.model.get("value")[0]);
} else {
_sd = moment(this.model.get("value")[0], this.model.get("dateformat"));
}
if (_sd.isValid()) {
_opts.startDate = _sd._d;
}
}
if (((ref1 = this.model.get("value")) != null ? ref1[1] : void 0) != null) {
_ed = moment(this.model.get("value")[1], this.model.get("dateformat"));
if (((ref2 = this.model.get("value")) != null ? ref2[1] : void 0) != null) {
if (_.isNumber(this.model.get("value")[1])) {
_ed = moment(this.model.get("value")[1]);
} else {
_ed = moment(this.model.get("value")[1], this.model.get("dateformat"));
}
if (_ed.isValid()) {
_opts.endDate = _ed._d;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iggy",
"version": "0.2.2",
"version": "0.2.3",
"description": "Browser search module to use with Backbone.js",
"keywords": [],
"homepage": "https://github.com/mpneuried/iggy",
Expand Down

0 comments on commit 9165580

Please sign in to comment.