Skip to content

Commit

Permalink
remove unused parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
shiftkey committed Jan 22, 2019
1 parent 4613432 commit 05ca813
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
14 changes: 7 additions & 7 deletions javascripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
})
.val(tags)
.trigger("chosen:updated")
.change(function(e) {
.change(function() {
location.href = updateQueryStringParameter(
getFilterUrl(),
"tags",
Expand All @@ -48,7 +48,7 @@
})
.val(names)
.trigger("chosen:updated")
.change(function(e) {
.change(function() {
location.href = updateQueryStringParameter(
getFilterUrl(),
"names",
Expand All @@ -64,7 +64,7 @@
})
.val(labels)
.trigger("chosen:updated")
.change(function(e) {
.change(function() {
location.href = updateQueryStringParameter(
getFilterUrl(),
"labels",
Expand Down Expand Up @@ -110,9 +110,9 @@
var separator = uri.indexOf("?") !== -1 ? "&" : "?";
if (uri.match(re)) {
return uri.replace(re, "$1" + key + "=" + value + "$2");
} else {
return uri + separator + key + "=" + value;
}

return uri + separator + key + "=" + value;
};

/**
Expand Down Expand Up @@ -176,7 +176,7 @@
renderProjects(tags, names, labels);
});

this.get("#/", function(context) {
this.get("#/", function() {
renderProjects();
});
});
Expand Down Expand Up @@ -246,7 +246,7 @@
}

$.ajax(url)
.done(function(data, textStatus, jqXHR) {
.done(function(data) {
var resultCount =
data && typeof data.length === "number"
? data.length.toString()
Expand Down
14 changes: 8 additions & 6 deletions javascripts/projectsService.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
* are returned. If none of the names was added to the filter.
* Then it fallsback to show all the projects.
* @param Array projects : An array having all the Projects in _data
* @param Array projectsNameSorted : This is another array showing all the projects in a sorted order
* @param Array projectsNameSorted : This is another array showing all the
* projects in a sorted order
* @param Array names : This is an array with the given name filters.
*/
var applyNamesFilter = function(projects, projectNamesSorted, names) {
Expand Down Expand Up @@ -67,7 +68,8 @@
* are returned. If none of the labels was added to the filter,
* it fallsback to show all the projects.
* @param Array projects : An array having all the Projects in _data
* @param Array projectLabelsSorted : This is another array showing all the labels in a sorted order
* @param Array projectLabelsSorted : This is another array showing all the
* labels in a sorted order
* @param Array labels : This is an array with the given label filters.
*/
var applyLabelsFilter = function(projects, projectLabelsSorted, labels) {
Expand Down Expand Up @@ -140,7 +142,7 @@
.sortBy(function(tag, key) {
return key;
})
.sortBy(function(tag, key) {
.sortBy(function(tag) {
return tag.frequency * -1;
})
.value());
Expand Down Expand Up @@ -240,19 +242,19 @@
};

this.getTags = function() {
return _.sortBy(tagsMap, function(entry, key) {
return _.sortBy(tagsMap, function(entry) {
return entry.name.toLowerCase();
});
};

this.getNames = function() {
return _.sortBy(namesMap, function(entry, key) {
return _.sortBy(namesMap, function(entry) {
return entry.name.toLowerCase();
});
};

this.getLabels = function() {
return _.sortBy(labelsMap, function(entry, key) {
return _.sortBy(labelsMap, function(entry) {
return entry.name.toLowerCase();
});
};
Expand Down
1 change: 1 addition & 0 deletions tests/src/sampleProjects.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable-next-line no-unused-vars */
var sampleProjects = [
{
name: "Glimpse",
Expand Down

0 comments on commit 05ca813

Please sign in to comment.