-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- removed 'var' on global variables - changed __meteor_bootstrap__.require() to Npm.require() - 1 change to CryptoJS (removed first 'or' clause)--(review this one in particular, Tom)
- Loading branch information
1 parent
f77bc8e
commit 3ca378d
Showing
6 changed files
with
21 additions
and
21 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
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,36 +1,36 @@ | ||
// OPEN | ||
var isOpen = function(post) { | ||
isOpen = function(post) { | ||
var opened = Session.equals('post-opened-' + post.slug, true); | ||
|
||
return (isSelected(post) || opened) && ! post._isPrev && ! post._isNext; | ||
} | ||
|
||
var setOpen = function(post, value) { | ||
setOpen = function(post, value) { | ||
Session.set('post-opened-' + post.slug, value);; | ||
} | ||
|
||
// SELECTED | ||
var isSelected = function(post) { | ||
isSelected = function(post) { | ||
return Session.equals('selected-post-slug', post.slug); | ||
} | ||
|
||
var anySelected = function() { | ||
anySelected = function() { | ||
return !! Session.get('selected-post-slug') || Session.get('creating-post'); | ||
} | ||
|
||
var setSelected = function(post) { | ||
setSelected = function(post) { | ||
Session.set('selected-post-slug', post.slug); | ||
} | ||
|
||
var getSelected = function(post) { | ||
getSelected = function(post) { | ||
return Posts.findOne({slug: Session.get('selected-post-slug')}); | ||
} | ||
|
||
// EDITING / NEW | ||
var inEditMode = function() { | ||
inEditMode = function() { | ||
return Session.get('editing-post') || Session.get('creating-post'); | ||
} | ||
|
||
var isEditing = function(post) { | ||
isEditing = function(post) { | ||
return isSelected(post) && inEditMode(); | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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