Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #5034 from cezaraugusto/bug/5010
Browse files Browse the repository at this point in the history
Disable option to add a bookmark without location and a folder without a title.
  • Loading branch information
bsclifton authored Oct 21, 2016
2 parents ccf4a67 + bfaf98b commit b68625a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions js/components/addEditBookmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ class AddEditBookmark extends ImmutableComponent {
const title = this.props.currentDetail.get('title') || this.props.currentDetail.get('customTitle')
const location = this.props.currentDetail.get('location')

return (typeof title === 'string' && title.trim().length > 0) ||
(!this.isFolder && typeof location === 'string' && location.trim().length > 0)
return this.isFolder
? (typeof title === 'string' && title.trim().length > 0)
: (typeof title === 'string' && location.trim().length > 0)
}

get isFolder () {
Expand Down
4 changes: 3 additions & 1 deletion less/button.less
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ span.browserButton,
}

&[disabled] {
opacity: .25;
pointer-events: none;
// prevent titleMode animation from overriding opacity
animation: none !important;
opacity: .25 !important;
}

&.smallButton {
Expand Down

0 comments on commit b68625a

Please sign in to comment.