This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Recurse object and stringify any arrays. This helps when passing paremeters | |
* to a server since some servers may limit the number of distinct items in http requests. | |
* @param {Object} obj Object to parse | |
* @return {Object} Return the parsed object | |
*/ | |
function jsonDeepStringify(obj) { | |
if (Object.prototype.toString.call(obj) == '[object Array]') { | |
obj = obj.join(','); | |
} else if (typeof (obj) == 'object') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Routine to compare numbers or strings and combinations thereof in terms | |
* of string1 < string2 | |
* | |
* @param {Number|String} string1 First item to compare | |
* @param {Number|String} string2 Second item to compare | |
* @return {Boolean} True if string1 < string2, else false. | |
*/ | |
var lessThan = function(string1, string2) { | |
// handle generic numbers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is my atom editor sync gist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This function toggles the filter on campaigns with no clicks. | |
* @param {bool} toggle Boolean value of the toggled checkbox. | |
*/ | |
$scope.toggleShowCampsNoClicks = function(toggle) { | |
// filter the table to show the appropriate entries | |
localStorage.setItem('thrivetracker_showCampsNoClicks', toggle); | |
$scope.showCampsNoClicks = toggle; | |
// custom filter extension for hiding columns with 0 |