From cefeb1df1445584225d6ada93ae4bfc98d8317e7 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Sat, 7 Jun 2014 19:58:06 -0600 Subject: [PATCH] Fixed backwards Approved button and candidate time sort. --- app/templates/account/profile.jade | 2 +- app/views/employers_view.coffee | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/templates/account/profile.jade b/app/templates/account/profile.jade index cc6bc59dd..9577e4b1e 100644 --- a/app/templates/account/profile.jade +++ b/app/templates/account/profile.jade @@ -27,7 +27,7 @@ block content i.icon-eye-close span(data-i18n="account_profile.inactive") Not looking for offers right now if profile && (profile.active || me.isAdmin()) - if !profileApproved + if profileApproved button.btn.btn-success#toggle-job-profile-approved(disabled=!me.isAdmin()) i.icon-eye-open span(data-i18n='account_profile.approved') Approved diff --git a/app/views/employers_view.coffee b/app/views/employers_view.coffee index 757675cf2..f7cddaa4e 100644 --- a/app/views/employers_view.coffee +++ b/app/views/employers_view.coffee @@ -94,6 +94,7 @@ module.exports = class EmployersView extends View for s in [a, b] n = parseInt s n = 0 unless _.isNumber n + n = 1 if /^a/.test s for [duration, factor] in [ [/second/i, 1 / (86400 * 1000)] [/minute/i, 1 / 1440] @@ -182,7 +183,7 @@ module.exports = class EmployersView extends View oldState = _.cloneDeep window.history.state ? {} oldState["lastViewedCandidateID"] = id window.history.replaceState(oldState,"") - else + else window.location.hash = id url = "/account/profile/#{id}" window.open url,"_blank"