This commit is contained in:
Nick Winter 2014-05-01 17:41:10 -07:00
commit ae31f90a25
4 changed files with 12 additions and 6 deletions

View file

@ -94,6 +94,7 @@ block content
- var notes = user.get('jobProfileNotes') || '';
if me.isAdmin()
textarea#job-profile-notes!= notes
button.btn.btn-primary#save-notes-button Save Notes
else
div!= marked(notes)

View file

@ -36,10 +36,10 @@ block content
for candidate, index in candidates
- var profile = candidate.get('jobProfile');
- var authorized = candidate.id; // If we have the id, then we are authorized.
tr(data-candidate-id=candidate.id)
tr(data-candidate-id=candidate.id, id=candidate.id)
td
if authorized
img(src=candidate.getPhotoURL(50), alt=profile.name, title=profile.name, width=50)
img(src=candidate.getPhotoURL(50), alt=profile.name, title=profile.name, height=50)
p= profile.name
else
img(src="/images/pages/contribute/archmage.png", alt="", title="Sign up as an employer to see our candidates", width=50)

View file

@ -9,7 +9,7 @@ module.exports = class ProfileView extends View
events:
'click #toggle-job-profile-approved': 'toggleJobProfileApproved'
'keyup #job-profile-notes': 'onJobProfileNotesChanged'
'click save-notes-button': 'onJobProfileNotesChanged'
'click #contact-candidate': 'onContactCandidate'
'click #enter-espionage-mode': 'enterEspionageMode'

View file

@ -20,8 +20,6 @@ module.exports = class EmployersView extends View
constructor: (options) ->
super options
@getCandidates()
checkForEmployerSignupHash: =>
if window.location.hash is "#employerSignupLoggingIn" and not ("employer" in me.get("permissions"))
@openModalView application.router.getView("modal/employer_signup","_modal")
@ -47,7 +45,13 @@ module.exports = class EmployersView extends View
@candidates = new CandidatesCollection()
@candidates.fetch()
# Re-render when we have fetched them, but don't wait and show a progress bar while loading.
@listenToOnce @candidates, 'all', @render
@listenToOnce @candidates, 'all', @renderCandidatesAndSetupScrolling
renderCandidatesAndSetupScrolling: =>
@render()
$(".nano").nanoScroller()
if window.location.hash.length is 25
$(".nano").nanoScroller({scrollTo:$(window.location.hash)})
sortTable: ->
# http://mottie.github.io/tablesorter/docs/example-widget-bootstrap-theme.html
@ -171,6 +175,7 @@ module.exports = class EmployersView extends View
onCandidateClicked: (e) ->
id = $(e.target).closest('tr').data('candidate-id')
window.location.hash = id
if id
url = "/account/profile/#{id}"
app.router.navigate url, {trigger: true}