Skip to content

Commit

Permalink
Merge pull request #43 from mariusfilipowski/master
Browse files Browse the repository at this point in the history
Knockout.Activity: defaultOptions can now be set from outside
  • Loading branch information
Hans Fjällemark committed Feb 5, 2014
2 parents 7652e12 + 34640b9 commit f3b9b61
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions knockout.activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,8 @@
throw 'Knockout is required, please ensure it is loaded before loading the activity plug-in';
}

var defaultOptions = {
activityClass: 'fa fa-spinner fa-spin',
container: 'i',
inactiveClass: ''
};

function getOptions(overrides) {
var options = ko.utils.extend({}, defaultOptions);
var options = ko.utils.extend({}, ko.bindingHandlers.activity.defaultOptions);

return ko.utils.extend(options, overrides);
}
Expand Down Expand Up @@ -55,4 +49,10 @@
}
}
};

ko.bindingHandlers.activity.defaultOptions = {
activityClass: 'fa fa-spinner fa-spin',
container: 'i',
inactiveClass: ''
};
}));

0 comments on commit f3b9b61

Please sign in to comment.