-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Converting dos spaces and CRLFs to unix spaces & LFs
- Loading branch information
bcochran
committed
Nov 6, 2012
1 parent
0404035
commit bd4858f
Showing
30 changed files
with
1,323 additions
and
1,322 deletions.
There are no files selected for viewing
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
|
@@ -14,3 +14,4 @@ src/build.log | ||
src/out | src/out | ||
node_modules | node_modules | ||
api-js/ | api-js/ | ||
/*.project |
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 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
10 changes: 5 additions & 5 deletions
10
src/app/docs/app/partials/app-contributors-js-contributor.mustache
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,5 +1,5 @@ | |||
Contributor = Y.Base.create('contributor', User, [], {}, { | Contributor = Y.Base.create('contributor', User, [], {}, { | ||
ATTRS: { | ATTRS: { | ||
contributions: {value: 0} | contributions: {value: 0} | ||
} | } | ||
}); | }); |
70 changes: 35 additions & 35 deletions
70
src/app/docs/app/partials/app-contributors-js-contributorlist-view.mustache
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,35 +1,35 @@ | |||
ContributorListView = Y.Base.create('contributorListView', Y.View, [], { | ContributorListView = Y.Base.create('contributorListView', Y.View, [], { | ||
// Compiles the ContributorList Template into a reusable Handlebars template. | // Compiles the ContributorList Template into a reusable Handlebars template. | ||
template: Y.Handlebars.compile(Y.one('#t-contributor-list').getHTML()), | template: Y.Handlebars.compile(Y.one('#t-contributor-list').getHTML()), | ||
render: function () { | render: function () { | ||
var contributors = this.get('modelList'), | var contributors = this.get('modelList'), | ||
contributorsData, content; | contributorsData, content; | ||
// Iterates over all `Contributor` models in the list and retrieves a | // Iterates over all `Contributor` models in the list and retrieves a | ||
// sub-set of each model instance's data as a simple JSON structs and | // sub-set of each model instance's data as a simple JSON structs and | ||
// collects it in an array. | // collects it in an array. | ||
contributorsData = contributors.map(function (contributor) { | contributorsData = contributors.map(function (contributor) { | ||
// Only a few of the `Contributor` data attributes are needed. | // Only a few of the `Contributor` data attributes are needed. | ||
var data = contributor.getAttrs(['login', 'avatar_url', 'contributions']); | var data = contributor.getAttrs(['login', 'avatar_url', 'contributions']); | ||
// Add proper pluralized labels for numerical data fields. | // Add proper pluralized labels for numerical data fields. | ||
addLabel(data, 'contributions', 'Contribution'); | addLabel(data, 'contributions', 'Contribution'); | ||
return data; | return data; | ||
}); | }); | ||
// Applies the `ContributorList` data to the ContributorList Template | // Applies the `ContributorList` data to the ContributorList Template | ||
// along with the total number of contributors for the repo. | // along with the total number of contributors for the repo. | ||
content = this.template({ | content = this.template({ | ||
num : contributors.size(), | num : contributors.size(), | ||
contributors: contributorsData | contributors: contributorsData | ||
}); | }); | ||
// Sets the resulting HTML from apply the data to the template as the | // Sets the resulting HTML from apply the data to the template as the | ||
// contents of this view's container. | // contents of this view's container. | ||
this.get('container').setHTML(content); | this.get('container').setHTML(content); | ||
return this; | return this; | ||
} | } | ||
}); | }); |
54 changes: 27 additions & 27 deletions
54
src/app/docs/app/partials/app-contributors-js-contributorlist.mustache
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,27 +1,27 @@ | |||
ContributorList = Y.Base.create('contributorList', Y.ModelList, [GithubSync], { | ContributorList = Y.Base.create('contributorList', Y.ModelList, [GithubSync], { | ||
model : Contributor, | model : Contributor, | ||
githubURL: '/repos/{user}/{repo}/contributors', | githubURL: '/repos/{user}/{repo}/contributors', | ||
buildURL: function () { | buildURL: function () { | ||
// This list's `repo` is used to build the API URL. | // This list's `repo` is used to build the API URL. | ||
var repo = this.get('repo'); | var repo = this.get('repo'); | ||
return Y.Lang.sub(this.githubURL, { | return Y.Lang.sub(this.githubURL, { | ||
user: repo.getAsURL('owner.login'), | user: repo.getAsURL('owner.login'), | ||
repo: repo.getAsURL('name') | repo: repo.getAsURL('name') | ||
}); | }); | ||
}, | }, | ||
// Override the default `comparator()` so items are sorted by most number of | // Override the default `comparator()` so items are sorted by most number of | ||
// contributors to least number of contributors. | // contributors to least number of contributors. | ||
comparator: function (contributor) { | comparator: function (contributor) { | ||
// Note the minus sign. | // Note the minus sign. | ||
return -contributor.get('contributions'); | return -contributor.get('contributions'); | ||
} | } | ||
}, { | }, { | ||
ATTRS: { | ATTRS: { | ||
// A `ContributorList` has a `Repo` associated with it, this allows for | // A `ContributorList` has a `Repo` associated with it, this allows for | ||
// a loose-coupling between a repo and set of contributors. | // a loose-coupling between a repo and set of contributors. | ||
repo: {value: null} | repo: {value: null} | ||
} | } | ||
}); | }); |
Oops, something went wrong.