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
24 changes: 12 additions & 12 deletions blackboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h2 class="bb-editable" data-bbedit="roundgroups/{{_id}}/title">
{{#if editing "roundgroups" _id "title"}}
<input type="text" id="roundgroups-{{_id}}-title"
value="{{name}}"
class="input-block-level" autofocus />
class="input-block-level" />
{{else}}
{{#if canEdit}}
<i class="bb-delete-icon icon-remove pull-left"
Expand Down Expand Up @@ -187,7 +187,7 @@ <h3 class="bb-editable" data-bbedit="rounds/{{round._id}}/title">
{{#if editing "rounds" round._id "title"}}
<input type="text" id="rounds-{{round._id}}-title"
value="{{round.name}}"
class="input-block-level" autofocus />
class="input-block-level" />
{{else}}
{{#if canEdit}}
<i class="bb-delete-icon icon-remove pull-left"
Expand Down Expand Up @@ -229,7 +229,7 @@ <h3 class="bb-editable" data-bbedit="rounds/{{round._id}}/title">
{{#if editing "tags" round._id "answer" "value"}}
<input type="text" id="tags-{{round._id}}-answer-value"
value="{{tag "answer"}}"
class="input-block-level" autofocus />
class="input-block-level" />
{{else}}
{{#if canEdit}}
<i class="bb-edit-icon icon-pencil pull-right"
Expand All @@ -248,7 +248,7 @@ <h3 class="bb-editable" data-bbedit="rounds/{{round._id}}/title">
{{#if editing "tags" round._id "status" "value"}}
<input type="text" id="tags-{{round._id}}-status-value"
value="{{tag "status"}}"
class="input-block-level" autofocus />
class="input-block-level" />
{{else}}
{{#if canEdit}}
<i class="bb-edit-icon icon-pencil pull-right"
Expand Down Expand Up @@ -323,7 +323,7 @@ <h3 class="bb-editable" data-bbedit="rounds/{{round._id}}/title">
{{#if editing "puzzles" puzzle._id "title"}}
<input type="text" id="puzzles-{{puzzle._id}}-title"
value="{{puzzle.name}}"
class="input-block-level" autofocus />
class="input-block-level" />
{{else}}
{{#if canEdit}}
<i class="bb-delete-icon icon-remove pull-left"
Expand Down Expand Up @@ -359,7 +359,7 @@ <h3 class="bb-editable" data-bbedit="rounds/{{round._id}}/title">
{{#if editing "tags" puzzle._id "answer" "value"}}
<input type="text" id="tags-{{puzzle._id}}-answer-value"
value="{{tag "answer"}}"
class="input-block-level" autofocus />
class="input-block-level" />
{{else}}
{{#if canEdit}}
<i class="bb-edit-icon icon-pencil pull-right"
Expand All @@ -380,7 +380,7 @@ <h3 class="bb-editable" data-bbedit="rounds/{{round._id}}/title">
{{#if editing "tags" puzzle._id "status" "value"}}
<input type="text" id="tags-{{puzzle._id}}-status-value"
value="{{tag "status"}}"
class="input-block-level" autofocus />
class="input-block-level" />
{{else}}
{{#if canEdit}}
<i class="bb-edit-icon icon-pencil pull-right"
Expand Down Expand Up @@ -422,7 +422,7 @@ <h3 class="bb-editable" data-bbedit="rounds/{{round._id}}/title">
{{#if editing "tags" id canon "name"}}
<input type="text" id="tags-{{id}}-{{canon}}-name"
value="{{name}}"
class="input-block-level" autofocus />
class="input-block-level" />
{{else}}
{{#if canEdit}}
<i class="bb-edit-icon icon-pencil pull-left"
Expand All @@ -436,7 +436,7 @@ <h3 class="bb-editable" data-bbedit="rounds/{{round._id}}/title">
{{#if editing "tags" id canon "value"}}
<input type="text" id="tags-{{id}}-{{canon}}-value"
value="{{value}}"
class="input-block-level" autofocus />
class="input-block-level" />
{{else if canEdit}}
<i class="bb-delete-icon icon-remove pull-left"
title="Delete this tag and value"></i>
Expand All @@ -460,7 +460,7 @@ <h3 class="bb-editable" data-bbedit="rounds/{{round._id}}/title">
{{#if editing "tags" id canon "name"}}
<input type="text" id="tags-{{id}}-{{canon}}-name"
value="{{name}}"
class="input-block-level" autofocus />
class="input-block-level" />
{{else}}
{{#if canEdit}}
<i class="bb-edit-icon icon-pencil pull-left"
Expand All @@ -474,7 +474,7 @@ <h3 class="bb-editable" data-bbedit="rounds/{{round._id}}/title">
{{#if editing "tags" id canon "value"}}
<input type="text" id="tags-{{id}}-{{canon}}-value"
value="{{value}}"
class="input-block-level" autofocus />
class="input-block-level" />
{{else if canEdit}}
<i class="bb-delete-icon icon-remove pull-left"
title="Delete this tag and value"></i>
Expand All @@ -499,7 +499,7 @@ <h3 class="bb-editable" data-bbedit="rounds/{{round._id}}/title">
{{#if editing "link" _id}}
<input type="text" id="link-{{_id}}"
value="{{./link}}"
class="input-block-level" autofocus />
class="input-block-level" />
{{else if canEdit}}
<i class="bb-edit-icon icon-pencil pull-right"
title="Change the value of the hunt site link"></i>
Expand Down
6 changes: 6 additions & 0 deletions client/blackboard.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@ Template.blackboard.onRendered ->
$('#bb-tables .bb-puzzle .puzzle-name > a').tooltip placement: 'left'
# see the global 'updateScrollSpy' helper for details on how
# we update scrollspy when the rounds list changes
@autorun ->
editing = Session.get 'editing'
return unless editing?
Meteor.defer ->
$("##{editing.split('/').join '-'}").focus()

doBoolean = (name, newVal) ->
Session.set name, newVal
$.cookie name, (newVal or ''), {expires: 365, path: '/'}
Expand Down