Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions src/coffee/phrasebook/views/BreadCrumbsView.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ class phrasebook.views.BreadCrumbsView extends Backbone.View
.css('opacity', 0)
.css('height', 0)
.animate({ height: expectedHeight}, 'fast', 'swing', ->
$(this).animate({ opacity: '1.0'}, 'fast')
$(this).animate({ opacity: '1.0'}, 'fast', ->
# window.location.hash = null
# window.location.hash = "CurrentOptionsView"
$('html, body').animate({
scrollTop: $('#CurrentOptionsView').offset().top
}, 1000);
)
)


Expand All @@ -59,4 +65,11 @@ class phrasebook.views.BreadCrumbsView extends Backbone.View
@presentationModel.get('previouslyVisitedOptions').length

onGoBackClick: (event) ->
@presentationModel.goBack()
event.preventDefault()
breadcrumb = $(event.currentTarget).parents('.breadcrumb')

breadcrumb.animate({ opacity: '0'}, 'fast', =>
breadcrumb.animate({ height: '0' }, 'fast', =>
@presentationModel.goBack()
)
)
3 changes: 2 additions & 1 deletion src/coffee/phrasebook/views/CurrentOptionsView.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ class phrasebook.views.CurrentOptionsView extends Backbone.View
else
options = $('<ul id="options"></ul>')
@presentationModel.get('currentlyVisibleOptions').each (option) ->
optionElement = $('<li><a class="option btn" href="#">' + option.get('name') + '</a></li>')
optionElement = $('<li><a class="option btn" href="#CurrentOptionsView">' + option.get('name') + '</a></li>')
options.append(optionElement)
optionElement.children('a').data({ option: option })
@$el.html(options)

return this

onOptionClick: (event) ->
event.preventDefault()
@presentationModel.chooseOption($(event.target).data().option)
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<head>
<meta charset="utf-8" />

<title>Visual Phrasebook</title>
<title>Pictotalk</title>
<meta name="description" content="">

<!-- Mobile viewport optimization h5bp.com/ad -->
Expand Down
Loading