Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass configuration through the DOM rather than relying on ERB renderi…
…ng, removing the coupling between rendered assets and the backend application configuration in place at time of rendering.
- Loading branch information
Showing
9 changed files
with
29 additions
and
23 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
.../backbone/broadcasters/faye.js.coffee.erb → ...ipts/backbone/broadcasters/faye.js.coffee
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
class Kandan.Helpers.Avatars | ||
@urlFor: (a, options) -> | ||
size = options.size || 30 | ||
fallback = options.fallback || Kandan.options.avatarFallback || 'mm' | ||
fallback = options.fallback || Kandan.options().avatar_fallback || 'mm' | ||
avatarHash = a.gravatar_hash || a.get('user').gravatar_hash || a.get('gravatarHash') | ||
Kandan.options.avatarUrl.replace(/%{hash}/, avatarHash). | ||
Kandan.options().avatar_url.replace(/%{hash}/, avatarHash). | ||
replace(/%{size}/, size). | ||
replace(/%{fallback}/, fallback) |
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
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
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
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