CINXE.COM
Candidats étrangers de l’extérieur du Canada - Guichet-Emplois
<!DOCTYPE html> <html class="no-js" lang="fr" dir="ltr"><head id="j_id_5"> <meta charset="utf-8" /> <title>Candidats étrangers de l’extérieur du Canada - Guichet-Emplois </title> <meta content="width=device-width,initial-scale=1" name="viewport" /> <meta name="dcterms.language" content="fra" /> <meta name="dcterms.creator" content="Emploi et Développement social Canada" /> <meta name="dcterms.service" content="ESDC-EDSC_JobBank-GuichetEmplois" /> <meta name="dcterms.accessRights" content="2" /><meta name="dcterms.title" content="Candidats étrangers de l’extérieur du Canada - Guichet-Emplois" /> <meta property="og:title" content="Candidats étrangers de l’extérieur du Canada - Guichet-Emplois" /> <meta property="og:description" name="description" content="Obtenez un emploi au Canada depuis l’extérieur du pays. Trouvez des postes ouverts aux candidats étrangers. Apprenez comment immigrer au Canada." /> <meta property="og:url" content="http://www.guichetemplois.gc.ca/landing-immigrants.xhtml" /> <meta property="og:image" content="https://www.jobbank.gc.ca/themes-sat/assets/favicon-mobile.png" /> <meta name="smartbanner:title" content="Guichet-Emplois" /> <meta name="smartbanner:author" content="ESDC – EDSC" /> <meta name="smartbanner:price" content="Gratuit" /> <meta name="smartbanner:price-suffix-apple" content="– dans l’App Store" /> <meta name="smartbanner:price-suffix-google" content="– dans Google Play" /> <meta name="smartbanner:icon-apple" content="/themes-jb/images/icons/mobileapp/icons-512.png" /> <meta name="smartbanner:icon-google" content="/themes-jb/images/icons/mobileapp/icons-512.png" /> <meta name="smartbanner:button" content="Gratuit" /> <meta name="smartbanner:button-url-apple" content="https://itunes.apple.com/ca/app/guichet-emplois/id1351432365?l=fr&mt=8" /> <meta name="smartbanner:button-url-google" content="https://play.google.com/store/apps/details?id=ca.jobbank.mobile&hl=fr" /> <meta name="smartbanner:enabled-platforms" content="android,ios" /> <meta name="smartbanner:exclude-user-agent-regex" content=".*(Tablet|iPad|Windows).*" /> <meta name="smartbanner:hide-ttl" content="86400000" /> <meta name="smartbanner:custom-design-modifier" content="jobbanksb" /> <meta name="smartbanner:tagline" content="Votre carrière commence ici" /> <meta name="smartbanner:download" content="Téléchargez l’application maintenant" /> <meta name="smartbanner:close" content="Fermer" /> <link rel="stylesheet" href="/themes-jb/js/third-party/smartbanner/smartbanner.css" /> <script src="/themes-jb/js/third-party/smartbanner/smartbanner.js"></script> <script> var onLoadHandlerForConflictTesting = function() {}; window.onload = onLoadHandlerForConflictTesting; </script><meta name="smartbanner:page" content="introLandingPage" /><link type="text/css" rel="stylesheet" href="/jakarta.faces.resource/primeicons/primeicons.css.xhtml;jsessionid=F7E7EE667F3B9D23F5E3652031746CC8.jobsearch76?ln=primefaces&v=12.0.0" /><script type="text/javascript">if(window.PrimeFaces){PrimeFaces.settings.locale='fr_CA';PrimeFaces.settings.viewId='/landing-immigrants.xhtml';PrimeFaces.settings.contextPath='';PrimeFaces.settings.cookiesSecure=false;}</script> <link href="/themes-sat/assets/favicon.ico" rel="icon" type="image/x-icon" /> <link rel="stylesheet" href="/themes-sat/css/theme.min.css" /> <link rel="stylesheet" href="/themes-sat/css/cdtsfixes.css" /> <link rel="stylesheet" href="/themes-sat/css/apps.css" /> <link href="/themes-jb/fontawesomepro/css/all.min.css" rel="stylesheet" /> <link href="/themes-jb/fontawesomepro/css/v4-shims.min.css" rel="stylesheet" /> <link rel="stylesheet" href="/themes-jb/js/css/jquery.timepicker.css" /> <link rel="stylesheet" href="/themes-jb/css/theme-jb.css" /> <link rel="stylesheet" href="/themes-jb/js/css/typeahead.css" /> <noscript> <link rel="stylesheet" href="/themes-sat/css/noscript.min.css" /> <link rel="stylesheet" href="/themes-sat/css/appsnoscript.css" /> </noscript> <link rel="stylesheet" href="/themes-jb/css/project-jb-style.css" /> <link rel="stylesheet" href="/themes-jb/css/project-style.css" /> <link rel="stylesheet" href="/themes-jb/css/animate.css" /><!--[if lt IE 9]> <link rel="stylesheet" href="/themes-jb/css/project-style-ie8.css" /><![endif]--> <link rel="stylesheet" href="/invitation-manager/Overlay.css" /> <script> //<![CDATA[ dataLayer1 = []; (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-W625MMN'); //]]> </script> <script src="//assets.adobedtm.com/be5dfd287373/9b9cb7867b5b/launch-59d77766b86a.min.js"></script></head><body vocab="https://schema.org/" typeof="WebPage"> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-W625MMN" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <nav> <ul id="wb-tphp"> <li class="wb-slc"><a class="wb-sl" href="#wb-cont">Passer au contenu principal</a></li> <li class="wb-slc visible-sm visible-md visible-lg"><a class="wb-sl" href="#wb-info">Passer à « À propos de cette application Web »</a></li> </ul> </nav> <header> <div id="wb-bnr" class="container"> <div class="row"> <section id="wb-lng" class="pull-right text-right"> <h2 class="wb-inv">Sélection de la langue</h2> <ul class="list-inline mrgn-bttm-0"> <li><a href="https://www.jobbank.gc.ca/findajob/foreign-candidates" lang="en"> <span class="hidden-xs">English</span> <abbr title="English" class="visible-xs h3 mrgn-tp-sm mrgn-bttm-0 text-uppercase">en</abbr> </a></li> </ul> </section> <div class="brand col-xs-9 col-sm-5 col-md-4" property="publisher" typeof="GovernmentOrganization"> <img src="/themes-sat/assets/sig-blk-en.svg" alt="" property="logo" /><span class="wb-inv" property="name"> Government of Canada / <span lang="fr">Gouvernement du Canada</span></span> <meta property="areaServed" typeof="Country" content="Canada" /> <link property="logo" href="/themes-sat/assets/wmms-blk.svg" /> </div> <section id="wb-srch" class="col-lg-offset-4 col-md-offset-4 col-sm-offset-2 col-xs-12 col-sm-5 col-md-4 visible-md visible-lg"> <h2>Recherche</h2> <form action="#" method="post" name="cse-search-box" role="search" class="form-inline"> <div class="form-group wb-srch-qry"> <label for="wb-srch-q" class="wb-inv">Recherchez le site Web</label> <input id="wb-srch-q" class="wb-srch-q form-control" name="q" type="search" value="" size="34" maxlength="170" placeholder="Recherche" /> </div> <div class="form-group submit"> <button type="submit" id="wb-srch-sub" class="btn btn-primary btn-small" name="wb-srch-sub"><span class="glyphicon-search glyphicon"></span><span class="wb-inv">Recherche</span></button> </div> </form> </section> </div> </div> <div class="app-bar"> <div class="container"> <div class="row"> <section class="col-xs-12 col-sm-7"> <h2 class="wb-inv">Nom de l'application Web</h2> <a class="app-name" href="https://www.guichetemplois.gc.ca/accueil">Guichet-Emplois</a> </section> <nav class="col-sm-5 hidden-xs hidden-print"><form id="j_id_23_4" name="j_id_23_4" method="post" action="/trouverunemploi/candidats-etrangers;jsessionid=F7E7EE667F3B9D23F5E3652031746CC8.jobsearch76" class="dept-nav" enctype="application/x-www-form-urlencoded"> <h2 class="wb-inv">Menu des paramètres du compte</h2> <ul class="app-list-account list-unstyled"> <li class="signon btn-group pull-right "> <button type="button" class="btn dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <span class="title"><span class="in-icon fas fa-user-circle fa-lg" aria-hidden="true"></span> <span class="fullName">Ouvrir une session</span><span class="fa fa-chevron-down" aria-hidden="true"></span></span> </button> <ul class="dropdown-menu"> <li><a href="https://www.guichetemplois.gc.ca/connexion">Chercheurs d’emploi</a></li> <li><a href="https://employeur.guichetemplois.gc.ca/employer/tableau">Employeurs</a></li> </ul> </li> </ul><input type="hidden" name="j_id_23_4_SUBMIT" value="1" /><input type="hidden" name="jakarta.faces.ViewState" id="j_id__v_0:jakarta.faces.ViewState:1" value="stateless" autocomplete="off" /></form> </nav> </div> </div> </div> <div class="app-bar-mb container visible-xs-block hidden-print"> <nav> <h2 class="wb-inv">Menu et recherche</h2> <ul class="app-list-main list-unstyled"> <li class="wb-mb-links" id="wb-glb-mn"><a href="#mb-pnl" aria-controls="mb-pnl" class="btn overlay-lnk" role="button">Menu</a><h2>Menu</h2></li> </ul> <div id="mb-pnl"></div> </nav> <nav> <h2 class="wb-inv">Menu des paramètres du compte</h2><form id="j_id_25_3" name="j_id_25_3" method="post" action="/trouverunemploi/candidats-etrangers;jsessionid=F7E7EE667F3B9D23F5E3652031746CC8.jobsearch76" class="dept-nav" enctype="application/x-www-form-urlencoded"> <ul class="app-list-account list-unstyled"> <li class="signon btn-group pull-right "> <button type="button" class="btn dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <span class="title"><span class="in-icon fas fa-user-circle fa-lg" aria-hidden="true"></span> <span class="fullName">Ouvrir une session</span><span class="fa fa-chevron-down" aria-hidden="true"></span></span> </button> <ul class="dropdown-menu"> <li><a href="https://www.guichetemplois.gc.ca/connexion">Chercheurs d’emploi</a></li> <li><a href="https://employeur.guichetemplois.gc.ca/employer/tableau">Employeurs</a></li> </ul> </li> </ul><input type="hidden" name="j_id_25_3_SUBMIT" value="1" /><input type="hidden" name="jakarta.faces.ViewState" id="j_id__v_0:jakarta.faces.ViewState:2" value="stateless" autocomplete="off" /></form> </nav> </div> <nav id="wb-sm" data-ajax-replace="/themes-sat/ajax/appmenu.xhtml?TF=false" data-trgt="mb-pnl" class="wb-menu visible-md visible-lg" typeof="SiteNavigationElement"> <div class="pnl-strt container nvbar"> <h2 class="wb-inv">Menu de navigation principal</h2> <div class="row"> <ul class="list-inline menu" role="menubar"> <li role="none"><a href="https://www.guichetemplois.gc.ca/trouverunemploi" class="item">Recherche d’emploi</a></li> <li role="none"><a href="https://www.guichetemplois.gc.ca/planification-carriere" class="item">Planification de carrière</a></li> <li role="none"><a href="https://www.guichetemplois.gc.ca/analyse-tendances" class="item">Information sur le marché du travail</a></li> <li role="none"><a href="https://www.guichetemplois.gc.ca/employeurs" class="item">Embauche</a></li> <li role="none"><a href="https://www.guichetemplois.gc.ca/apropos" class="item">Aide</a></li> <li role="none"><a href="https://www.guichetemplois.gc.ca/intro" class="item">À propos</a></li> </ul> </div> </div> </nav> <nav id="wb-bc" property="breadcrumb"> <h2>Vous êtes ici :</h2> <div class="container"> <ol class="breadcrumb"><li><a href="https://www.guichetemplois.gc.ca/" >Guichet-Emplois</a></li> </ol> </div> </nav> </header> <div id="header-search"> </div> <div class="immigrants-A-landing theme-light prm-flpr"> <div class="container"> <div class="row"> <section class="hero-content-wrapper"> <div class="hero-content-wrapper-inner"> <div class="cover-container"> <div id="messageblock-content" tabindex="-1"><div id="messageblock" role="region" aria-live="polite"></div> </div> <div class="inner cover demo-content-head"> <h1 property="name" id="wb-cont" class="cover-heading"><span class="directory">Candidats étrangers de l’extérieur du Canada</span>Vous cherchez du travail au Canada?</h1> <p class="lead">Cherchez des offres d’emploi publiées par des employeurs qui recrutent des candidats étrangers de l’extérieur du Canada.</p> <div id="jobSearchBar" class="search-input-content home-page"> <form id="homePage" class="search-module" action="/jobsearch/jobsearch" accept-charset="UTF-8"> <fieldset> <legend class="wb-inv"> Chercher </legend> <div class="input-wrapper"> <div class="input-group input-dual"> <div class="input-combo col-md-6"> <div class="input-field"> <label class="input-label" for="searchString">Mots-clés :</label> <input name="searchstring" id="searchString" type="text" class="searchString form-control input-lg" value="" placeholder="Titre de poste, employeur" maxlength="1000" /> </div> </div> <div class="input-combo col-md-6"> <div class="ta-cityprovsuggest input-field"><label id="searchLocationLabel" class="input-label" for="locationstring">Emplacement :<span id="error-loc-input-field"></span></label><input id="locationstring" name="locationstring" type="text" value="" class="locationstring form-control input-lg" placeholder="Ville, province ou territoire" /> <span id="ta-citysuggest-suggestioncount" data-name="suggestioncount" role="status" aria-live="polite" class="form-control typeahead-helper-hidden-accessible"></span> <span role="status" id="ta-citysuggest-selected-title" class="form-control ta-jobtitlesuggest-message ta-communitysuggest-selected-title typeahead-helper-hidden-accessible"></span><input type="hidden" id="locationparam" name="locationparam" value="" /> <div id="cityPostalCodeSpecial" class="tt-menu wb-inv"> <div class="tt-dataset tt-dataset-ta-cityprovsuggest"> <ul> <li><a href="#" data-input="canada"><span class="fab fa-canadian-maple-leaf" aria-hidden="true"></span> Tout le Canada</a></li> <li><a href="#" data-input="local"><span class="far fa-bullseye-pointer" aria-hidden="true"></span> Emplacement actuel</a></li> </ul> </div> </div> </div> </div> <input type="hidden" name="fglo" value="1" /> <div class="input-group-btn"> <div id="defaultsubmit" class="hidden"> <button id="searchButtonDefault" type="submit">Recherche</button> </div> <div class="results"> <button id="advanced-search-button" class="secondary-functions btn btn-link nowrap" type="submit" onclick="actiontodataurl(this);" data-url="/jobsearch/rechercheavancee">Avancée</button> </div> <button id="searchButton" class="btn btn-primary" type="submit"><span class="fa-icon far fa-search" aria-hidden="true"></span> Recherche</button> </div> </div> </div> <div class="clearfix"></div> <div class="clearfix"></div> <div id="search-filter" class="row col-md-12"> <div class="sort">Trier par :</div> <div class="sort-group"> <div class="radio"> <input type="radio" name="sort" id="sf_bestmatch" value="M" checked="checked" /> <label for="sf_bestmatch">Pertinence</label> </div> <div class="radio"> <input type="radio" name="sort" id="sf_dateposted" value="D" /> <label for="sf_dateposted">Date</label> </div> <div class="checkbox"> <input id="sf_last30days" type="checkbox" value="30" name="fage" /> <label for="sf_last30days">30 derniers jours</label> </div> <div class="clearfix"></div> </div> </div> <div class="clearfix"></div> </fieldset> </form> </div> <div class="clearfix"></div> <div class="top-pop"> <a href="https://www.guichetemplois.gc.ca/trouverunemploi/nouveaux-arrivants"><span class="fas fa-question-circle"></span> Vous êtes déjà au Canada? </a> </div> <div class="clearfix"></div> </div> </div> </div> </section> </div> </div> </div> <main role="main" property="mainContentOfPage"> <div class="grey bg demo-content-wrapper"> <div class="container"> <section class="header-section col-md-12 demo-content"> <div class="demo-content-details-center"> <div class="col-md-8 col-md-offset-2"> <p><p>Sur cette page, vous trouverez des renseignements généraux et des ressources utiles pour vous guider à travers les options disponibles aux candidats étrangers.</p><p>Si vous voulez venir au Canada mais n’avez pas encore présenté une demande d’immigration ou de permis de travail, <strong>visitez <a href="https://www.canada.ca/fr/services/immigration-citoyennete.html">Immigration, Réfugiés et Citoyenneté Canada (IRCC)</a> pour débuter.</strong></p><p>Si vous avez déjà entamé votre processus d’immigration au Canada ou votre demande de permis de travail, vous pouvez chercher des offres d’emploi publiées par des employeurs qui recrutent des candidats étrangers.</p></p> </div> </div> </section> </div> </div> <div id="toc-nav" class="toc-nav demo-content-wrapper"> <div class="row"> <section class="col-md-12 toc-content demo-content"> <div class="demo-content-details"> <ul class="toc-list text-center"> <li><a href="#sectionTitle1"><span class="fa jb-no">1</span> Confirmez votre admissibilité</a></li> <li><a href="#sectionTitle2"><span class="fa jb-no">2</span> Vérifiez si vos compétences sont reconnues</a></li> <li><a href="#sectionTitle3"><span class="fa jb-no">3</span> Cherchez un emploi et postulez</a></li> </ul> </div> </section> </div> </div> <div id="section1" class="demo-content-wrapper"> <div class="container"> <section class="col-md-12 demo-content"> <div class="demo-content-details"> <div class="col-md-12"> <div class="col-md-6 row"> <h2 class="toc no"><a name="sectionTitle1"></a><span class="title">Étape <span class="digit">1</span></span> Confirmez votre admissibilité</h2> <p>Si vous voulez immigrer au Canada, il y a différents programmes pour lesquels vous pouvez présenter une demande. Les exigences pour la présentation d’une demande et les critères d’admissibilité diffèrent selon le programme d’immigration.</p> <div class="col-md-12 row call-to-action sub mrgn-bttm-lg"> <a href="https://www.canada.ca/fr/immigration-refugies-citoyennete/services/outil-venir-canada.html">Vérifiez pour quels programmes d’immigration vous êtes admissible</a> </div> <div class="clearfix"></div> </div> <div class="col-md-6 service-content-details illustration service-content-image"> <img src="../themes-jb/images/immigrants/people_meeting.svg" class=" full-width" alt="Groupe de personnes" /> </div> <div class="clearfix"></div> <div class="col-md-6 service-content-details illustration service-content-image"> <img src="../themes-jb/images/immigrants/people_collab_online.svg" class="full-width" alt="Groupe de personnes" /> </div> <div class="col-md-6 row mrgn-tp-xl"><p>Si vous avez beaucoup d’expérience de travail ou une formation approfondie dans un domaine particulier, vous pourriez être admissible à présenter une demande dans le cadre d’Entrée express.</p><p>Entrée express permet aux travailleurs hautement qualifiés de présenter une demande pour <a href="https://www.canada.ca/fr/immigration-refugies-citoyennete/services/immigrer-canada/entree-express/admissibilite.html">plusieurs programmes d’immigration</a> à la fois, accélérant ainsi les délais de traitement.</p> <div class="col-md-12 row call-to-action sub"> <a href="https://www.canada.ca/fr/immigration-refugies-citoyennete/services/immigrer-canada/entree-express.html">En savoir plus à propos d’Entrée express</a> </div> <div class="clearfix"></div> </div> <div class="clearfix"></div> <div class="col-md-6 row"><p>Si vous n’êtes pas admissible à immigrer au Canada de manière permanente, vous pourriez tout de même y travailler sur une base temporaire. Dans ce cas, vous avez habituellement besoin d’un permis de travail.</p><p>Avant de postuler à des offres d’emploi au Canada, vous devez vérifier si vous êtes admissible à l’obtention d’un permis de travail.</p> <div class="col-md-12 row call-to-action sub mrgn-bttm-lg"> <a href="https://www.canada.ca/fr/immigration-refugies-citoyennete/services/travailler-canada/permis.html">En savoir plus à propos des permis de travail</a> </div> <div class="clearfix"></div> </div> <div class="col-md-6 service-content-details illustration service-content-image"> <img src="../themes-jb/images/immigrants/people_travel_family.svg" class=" full-width" alt="Groupe de personnes" /> </div> <div class="clearfix"></div> </div> </div> </section> </div> </div> <div id="section2" class="bg grey demo-content-wrapper overflow-visible"> <div class="container"> <section class="col-md-12 demo-content"> <div class="demo-content-details"> <div class="col-md-12"> <div class="col-md-5 service-content-details illustration service-content-image"> <img src="../themes-jb/images/newcomers/people_presentation.svg" class="full-width" alt="Groupe de personnes" /> </div> <div class="col-md-7 row"> <h2 class="toc no"><a name="sectionTitle2"></a><span class="title">Étape <span class="digit">2</span></span> Vérifiez si vos compétences sont reconnues</h2><p>Avant de chercher un emploi au Canada, vous devriez vérifier si le type de travail que vous souhaitez effectuer <a href="https://www.canada.ca/fr/emploi-developpement-social/programmes/reconnaissance-titres.html">nécessite un permis ou un certificat professionnel</a>.</p> </div> <div class="clearfix"></div> <div class="col-md-6 "><p>Vous pouvez utiliser l’outil pour la reconnaissance des titres de compétences étrangers pour vérifier :</p><ul><li>Si votre profession est réglementée.</li><li>La durée et le coût pour faire reconnaître vos titres de compétences.</li><li>S’il y a des emplois disponibles dans votre domaine, ou des emplois connexes que vous pourriez exercer en attendant que vos titres de compétences soient reconnus.</li></ul> </div> <div class="col-md-6 mrgn-bttm-xl"> <div class="demo-content-setbox"> <h3>Outil pour la reconnaissance des titres de compétences étrangers au Canada</h3><form id="jmr-search" name="jmr-search" method="post" action="/trouverunemploi/candidats-etrangers;jsessionid=F7E7EE667F3B9D23F5E3652031746CC8.jobsearch76" enctype="application/x-www-form-urlencoded" target="_blank"><input type="hidden" id="jmr-search:source" name="jmr-search:source" value="" /> <div id="widget-occ-input"> <div class="ta-jobtitlesuggest"><label for="jmr-search:occupationInput">Quelle est votre profession? <span id="jmr-search:error-occupationInput"></span> <span class="req">(obligatoire)</span></label> <div class="related-group"><input id="jmr-search:occupationInput" name="jmr-search:occupationInput" type="text" value="" class="form-control" placeholder="Appellation d’emploi" /><input type="hidden" id="jmr-search:id" name="jmr-search:id" value="" /><input type="hidden" id="jmr-search:noc_code" name="jmr-search:noc_code" value="" /> <span role="status" class="ta-jobtitlesuggest-message wb-inv"></span> <span id="suggestioncount" data-name="suggestioncount" role="status" aria-live="polite" class="typeahead-helper-hidden-accessible"></span> </div> </div> </div> <div id="widget-loc-input"> <div class="ta-cityprovsuggest"><label for="jmr-search:cityPostalCodeInput">Sélectionnez une ville, une province, un territoire ou code postal<span id="jmr-search:error-loc-input-field"></span></label> <div class="related-group input-group"><input id="jmr-search:cityPostalCodeInput" name="jmr-search:cityPostalCodeInput" type="text" value="" class="form-control" placeholder="Ville, province ou territoire" /><input type="hidden" id="jmr-search:locationparam" name="jmr-search:locationparam" value="" /> <span id="ta-communitysuggest-suggestioncount" data-name="suggestioncount" role="status" aria-live="polite" class="typeahead-helper-hidden-accessible"></span> <span role="status" class="ta-jobtitlesuggest-message ta-communitysuggest-selected-title typeahead-helper-hidden-accessible"></span> <span class="input-group-btn"><button name="jmr-search:j_id_53_1_13" type="submit" id="jmr-submit" class="btn btn-primary">Chercher</button> </span> </div> </div> </div> <div> </div> <div class="clearfix"></div><input type="hidden" name="jmr-search_SUBMIT" value="1" /><input type="hidden" name="jakarta.faces.ViewState" id="j_id__v_0:jakarta.faces.ViewState:3" value="stateless" autocomplete="off" /></form> </div> </div> <div class="clearfix"></div> <div class="col-md-12 row text-center"><p>Si vous avez obtenu un diplôme dans un autre pays, vous devrez le faire évaluer pour déterminer si vos études sont reconnues au Canada.</p> <div class="col-md-6 col-md-offset-3 row call-to-action sub mrgn-bttm-lg text-center"> <a href="https://www.canada.ca/fr/immigration-refugies-citoyennete/services/immigrer-canada/entree-express/documents/evaluer-diplomes-etudes.html">En savoir plus sur l’évaluation des diplômes d’études</a> </div> <div class="clearfix"></div> </div> </div> </div> <div class="clearfix"></div> </section> </div> </div> <div id="section3" class="demo-content-wrapper"> <div class="container"> <section class="demo-content"> <div class="demo-content-details"> <div class="col-md-12"> <div class="col-md-7"> <h2 class="toc no"><a name="sectionTitle3"></a><span class="title">Étape <span class="digit">3</span></span> Cherchez un emploi et postulez</h2><p>En commençant un processus d’immigration ou une demande de permis de travail, vous devriez seulement postuler pour les offres d’emploi publiées par des employeurs qui recrutent les candidats internationaux.</p><p>Sur le Guichet-Emplois, ces offres d’emploi sont clairement identifiées.</p> <div class="col-md-12 row call-to-action sub mrgn-bttm-xl"> <a href="https://www.guichetemplois.gc.ca/jobsearch/rechercheemplois?fglo=1&page=1&sort=M">Chercher les offres d’emploi ouvertes aux candidats internationaux</a> </div> <div class="clearfix"></div> </div> <div class="col-md-5"> <div class="demo-content-setbox vert-middle col-md-12 nowrap"> <p><span class="sample-job-audience"><span class="fa-stack fa-2x" aria-hidden="true"> <span class="fal fa-circle fa-stack-2x"></span> <span class="far fa-globe fa-stack-1x"></span> </span><span class="wb-inv">Symbole indiquant qu’une offre d’emploi est ouverte aux candidats internationaux.</span></span>veut dire que vous <strong>pouvez</strong> postuler</p> <p><span class="sample-job-audience"><span class="fa-stack fa-2x" aria-hidden="true"> <span class="fal fa-hexagon fa-stack-2x"></span> <span class="fas fa-exclamation fa-stack-1x"></span> </span><span class="wb-inv">Symbole indiquant qu’une offre d’emploi est ouverte aux citoyens canadiens, aux résidents permanents du Canada et aux détenteurs d’un permis de travail.</span></span>veut dire que vous <strong>ne pouvez pas</strong> postuler.</p> </div> </div> <div class="clearfix"></div> <div class="col-md-6"><p>Quand vous postulez pour des offres d’emploi, vous devriez envoyer à l’employeur un CV incluant des renseignements comme :</p><div class="demo-content-setbox"><ul class="fa-ul fa-right"><li><span class="fa-li" aria-hidden="true"><span class="fas fa-check"></span></span>Votre nom</li><li><span class="fa-li" aria-hidden="true"><span class="fas fa-check"></span></span>Où vous habitez en ce moment</li><li><span class="fa-li" aria-hidden="true"><span class="fas fa-check"></span></span>Quelle est votre expérience de travail</li><li><span class="fa-li" aria-hidden="true"><span class="fas fa-check"></span></span>Si vous détenez un permis de travail Canadien valide</li></ul></div> <div class="col-md-12 row call-to-action sub mrgn-bttm-lg"> <a href="https://www.guichetemplois.gc.ca/trouverunemploi/ressources/rediger-bon-cv">Apprenez comment rédiger un bon CV</a> </div> <div class="clearfix"></div> </div> <div class="col-md-6 service-content-details illustration service-content-image"> <img src="../themes-jb/images/newcomers/people_travel_world.svg" class="full-width" alt="Groupe de personnes" /> </div> <div class="clearfix"></div> </div> </div> <div class="clearfix"></div> </section> </div> </div> <div class="grey bg demo-content-wrapper"> <div class="container"> <section class="demo-content"> <div class="demo-content-details-center"> <h2 class="text-center">Toujours besoin d’aide ?</h2> <div class="col-md-8 col-md-offset-2"> <p>Visitez <a href="https://www.canada.ca/fr/services/immigration-citoyennete.html">Immigration, Réfugiés et Citoyenneté Canada (IRCC)</a> pour obtenir plus d’information à propos des processus d’immigration et des permis de travail.</p> </div> </div> <div class="clearfix"></div> </section> </div> </div> <div class="container pagedetails"> <div class="row"> <div class="col-sm-6 col-lg-4 mrgn-tp-sm hidden"> <a href="https://www.canada.ca/en/report-problem.html" class="btn btn-default btn-block">Report a problem or mistake on this page</a> </div> <div class="col-sm-3 mrgn-tp-sm pull-right hidden"> <div class="wb-share" data-wb-share="{"lnkClass": "btn btn-default btn-block"}"></div> </div> </div> <div id="feedback-tool-div"> <div class="wb-disable-allow" data-ajax-replace="https://www.canada.ca/etc/designs/canada/wet-boew/assets/feedback/page-feedback-fr.html" data-feedback-section="Job bank" data-feedback-theme="Jobs"> </div> </div> <dl id="wb-dtmd"> <dt>Date de modification : </dt> <dd><time property="dateModified">2024-11-19</time></dd> </dl> </div> </main> <footer id="wb-info"> <div class="gc-contextual"> <div class="container"> <nav> <h2 class="wb-inv">Liens connexes</h2> <ul class="list-col-xs-1 list-col-sm-2 list-col-md-3"> <li><a href="/aidesoutien">Soutien du Guichet-Emplois</a></li> <li><a href="/apropos">À propos</a></li> <li><a href="https://www.guichetemplois.gc.ca/intro">Introduction au Guichet-Emplois</a></li> <li><a href="https://www.guichetemplois.gc.ca/reseau">Notre réseau</a></li> <li> <a href="/conditionsutilisationchercheur">Conditions d'utilisation - Chercheurs d'emploi</a> </li> <li> <a href="/conditionsutilisationemployeur">Conditions d’utilisation - Employeurs</a> </li> </ul> </nav> </div> </div> <div class="gc-sub-footer"> <div class="container d-flex align-items-center"> <nav aria-labelledby="aboutWebApp"> <h3 class="wb-inv" id="aboutWebApp">À propos de cette application Web</h3> <ul> <li><a href="https://www.canada.ca/fr/transparence/avis.html" target="_blank" rel="noopener">Avis<span class="wb-inv"> Ce lien ouvrira dans une nouvelle fenêtre</span></a></li> <li><a href="https://www.canada.ca/fr/transparence/confidentialite.html" target="_blank" rel="noopener">Confidentialité<span class="wb-inv"> Ce lien ouvrira dans une nouvelle fenêtre</span></a></li> </ul> </nav> <div class="col-xs-6 visible-sm visible-xs tofpg"> <a href="#wb-cont">Haut de la page <span class="glyphicon glyphicon-chevron-up"></span></a> </div> <div class="wtrmrk align-self-end"> <img src="/themes-sat/assets/wmms-blk.svg" alt="Symbole du gouvernement du Canada" /> <meta property="areaServed" typeOf="Country" content="Canada" /> <link property="logo" href="/themes-sat/assets/wmms-blk.svg" /> </div> </div> </div> </footer> <script src="/themes-sat/js/jquery/2.2.4/jquery.min.js"></script> <script src="/themes-sat/js/wet-boew.min.js"></script> <script src="/themes-sat/js/theme.min.js"></script> <script src="/themes-jb/js/settings/site-settings-gtie8.js"></script> <script src="/themes-sat/js/cdtscustom.js"></script> <script src="/themes-jb/js/third-party/jquery.timepicker.min.js"></script> <script src="/themes-jb/js/third-party/jquery.capslockstate.js"></script> <script src="/themes-jb/js/third-party/typeahead.bundle.min.js"></script> <script type="text/javascript"> //<![CDATA[ //Dropdown function dropdownToggle = function() { $('button.dropdown-toggle, a.signInUserAccount').removeClass('disabled'); $(document).on('click', 'button.dropdown-toggle', function(e) { $('button.dropdown-toggle').not(this).each( function(e) { $(this).parent('.btn-group').removeClass('open'); }); if ($(this).parent().is('.btn-group')) { //console.log('OPEN dropdown'); $(this).attr('aria-expanded', function (i, attr) { return attr == 'true' ? 'false' : 'true' }); $(this).parent('.btn-group').toggleClass('open'); if ($(this).hasClass('btn-func-filter')) { if ($(this).parent('.filter-group').hasClass('open')) { $('.dropdown-menu, .dropdown-group').parent('.btn-group').find('.btn-func-filter').children('.fa-icon').removeClass('fa-chevron-up').addClass('fa-chevron-down'); $(this).find('.fa-icon').toggleClass('fa-chevron-down fa-chevron-up'); } else { $(this).find('.fa-icon').toggleClass('fa-chevron-up fa-chevron-down'); $('.dropdown-menu, .dropdown-group').parent('.btn-group').find('.btn-func-filter').children('.fa-icon').removeClass('fa-chevron-up').addClass('fa-chevron-down'); } } } return false; }); } //Initiate Dropdown once document has been loaded dropdownToggle(); //Remove Dropdown function removeDropdownToggle = function(e) { $(document).on('click', function(e) { var dropdownToggle = $('.dropdown-menu, .dropdown-group').parent('.btn-group, .filter-group'); /* if (!$(this).parent().is('.btn-group')) { console.log('click outside'); $('button.dropdown-toggle').attr('aria-expanded','false'); $(dropdownToggle).removeClass('open'); if ($(dropdownToggle)) { $(dropdownToggle).find('.btn-func-filter').children('.fa-icon').removeClass('fa-chevron-up').addClass('fa-chevron-down'); } } */ var $trigger = $(".dropdown-toggle, .dropdown-menu"); if($trigger !== e.target && !$trigger.has(e.target).length){ //console.log('REMOVE dropdown outside'); $(dropdownToggle).removeClass('open'); if ($(dropdownToggle)) { $(dropdownToggle).find('.btn-func-filter').children('.fa-icon').removeClass('fa-chevron-up').addClass('fa-chevron-down'); } } }); escRemoveDropdownToggle(); } hideDropdownToggle = function() { $('ul.dropdown-menu li a').on('focus focusin', function() { var $signonbutton = $(this).parents('li.btn-group'); $signonbutton.addClass("open"); $signonbutton.find('button.dropdown-toggle').attr('aria-expanded','true'); }).on('focusout', function() { var $signonbutton = $(this).parents('li.btn-group'); var $parent = $(this).parents('ul.dropdown-menu'); setTimeout(function() { if (!$.contains($parent[0], document.activeElement)) { $signonbutton.removeClass("open"); $signonbutton.find('button.dropdown-toggle').attr('aria-expanded','false'); } }, 0); //console.log('HIDE dropdown'); }); escRemoveDropdownToggle(); } escRemoveDropdownToggle = function(e) { $(document).on('keydown', 'button.dropdown-toggle', function(e) { // Escape key if(event.which == 27) { //console.log('ESCAPE KEY from main button'); var dropdownToggle = $('.dropdown-menu, .dropdown-group').parent('.btn-group, .filter-group'); /* if (!$(this).parent().is('.btn-group')) { console.log('click outside'); $('button.dropdown-toggle').attr('aria-expanded','false'); $(dropdownToggle).removeClass('open'); if ($(dropdownToggle)) { $(dropdownToggle).find('.btn-func-filter').children('.fa-icon').removeClass('fa-chevron-up').addClass('fa-chevron-down'); } } */ var $trigger = $(".dropdown-toggle, .dropdown-menu"); if($trigger !== e.target && !$trigger.has(e.target).length){ //console.log('REMOVE dropdown outside'); $(dropdownToggle).removeClass('open'); if ($(dropdownToggle)) { $(dropdownToggle).find('.btn-func-filter').children('.fa-icon').removeClass('fa-chevron-up').addClass('fa-chevron-down'); } } event.preventDefault(); } }); $(document).on('keydown', '.dropdown-menu input, .dropdown-menu h3, .dropdown-menu .list-group, .dropdown-menu button, .dropdown-menu a', function(e) { // Escape key if(event.which == 27) { var dropdownToggle = $('.dropdown-menu, .dropdown-group').parent('.btn-group, .filter-group'); var $trigger = $("input[type=checkbox]"); if($trigger !== e.target && !$trigger.has(e.target).length){ $(dropdownToggle).removeClass('open'); if ($(dropdownToggle)) { $(dropdownToggle).find('.btn-func-filter').children('.fa-icon').removeClass('fa-chevron-up').addClass('fa-chevron-down'); $(this).parents('.dropdown-menu').prev('.dropdown-toggle').focus(); } } event.preventDefault(); } }); } //Initiate Remove Dropdown once document has been loaded removeDropdownToggle(); hideDropdownToggle(); $(document).ready(function(){ //$('.jbservices').removeClass('disabled'); //Form required field input label indicators and disclaimer formRequired = function() { var formRequiredAsteriskClass = 'formRequiredAsterisk'; var formRequiredAsteriskGroup = $("form."+formRequiredAsteriskClass); var asteriskSymbol = '<span class="symbol-required">*</span>' var asteriskDisclaimer = '<div class="col-md-12 row"><p class="tip-required"><span class="fa fa-info-circle fa-lg"></span> Tous les champs identifiés d’un astérisque (<span>*</span>) sont obligatoires.</p></div><div class="clearfix"></div>' var formRequiredWordClass = 'formRequiredWord'; var formRequiredWordGroup = $("form."+formRequiredWordClass); var requiredWord = "<span class='req'>(obligatoire)</span>"; //Insert asterisk symbol if ($(formRequiredAsteriskGroup)) { $(formRequiredAsteriskGroup).find('label.required').prepend(asteriskSymbol); $(formRequiredAsteriskGroup).find('legend.required').prepend(asteriskSymbol); $(formRequiredAsteriskGroup).find('h1.required').prepend(asteriskSymbol); $(formRequiredAsteriskGroup).find('h2.required').prepend(asteriskSymbol); $(formRequiredAsteriskGroup).find('h3.required').prepend(asteriskSymbol); //Insert asterisk disclaimer if ($(formRequiredAsteriskGroup).find('.module-stepbar').length !== 0) { $(formRequiredAsteriskGroup).find('.module-stepbar').after(asteriskDisclaimer); } else { $(formRequiredAsteriskGroup).prepend(asteriskDisclaimer); } } //Insert word required if ($(formRequiredWordGroup)) { $(formRequiredWordGroup).find('label.required').append(requiredWord); $(formRequiredWordGroup).find('legend.required').append(requiredWord); $(formRequiredWordGroup).find('h1.required').append(requiredWord); $(formRequiredWordGroup).find('h2.required').append(requiredWord); $(formRequiredWordGroup).find('h3.required').append(requiredWord); } } formRequired(); }); $(document).on("wb-ready.wb", function(event) { //Initiate script after WET Plugins are done loading... var formErrorValidation = false; var formErrorValidationGuest = true; var runFormErrorValidation = false if (localStorage.getItem('signInPopUp') === 'true') { var signInPopUp = true; } //console.log('Error?'+formErrorValidation+' Dashboard page? '+runFormErrorValidation); //console.log('Alert: '+formErrorValidationGuest); if (signInPopUp && formErrorValidation && !runFormErrorValidation && formErrorValidationGuest || signInPopUp && formErrorValidation && runFormErrorValidation && formErrorValidationGuest) { //console.log('Open Standard/Plus login popup!'); openSignInUserAccount(); } else if (!formErrorValidationGuest) { //console.log('Open Guest login popup!'); openSignInGuestUserAccount(); } else if (!formErrorValidation) { //console.log('No error validation!'); localStorage.removeItem('signInPopUp'); } else { //console.log('Not opened login popup'); } function openSignInUserAccount() { //console.log('opensigninuseraccoun'); $.magnificPopup.open({ prependTo: '#loginForm', items: [ { src: '#user-signin', type: 'inline', } ], callbacks: { open: function() { }, close: function() { //console.log('Close sign in popup!'); localStorage.removeItem('signInPopUp'); } } }); if (signInPopUp && !formErrorValidation) { localStorage.removeItem('signInPopUp'); } } function openSignInGuestUserAccount() { $.magnificPopup.open({ prependTo: '#loginModalFormViewJobAlerts', items: [ { src: '#guestmode-signin-view', type: 'inline', } ], }); } //$(document).on("wb-ready.wb", function() { $(document).on('click', '.signInRegisterJobAlerts', function(e) { //Event for actual link action e.preventDefault(); //Run WET plugin $.magnificPopup.open({ prependTo: '#loginModalFormRegisterJobAlerts', //modal: true, items: [ { src: '#guestmode-signin-register', type: 'inline', } ], //closeBtnInside: true }); }); $(document).on('click', '.signInViewJobAlerts', function(e) { //Event for actual link action e.preventDefault(); //Run WET plugin $.magnificPopup.open({ prependTo: '#loginModalFormViewJobAlerts', //modal: true, items: [ { src: '#guestmode-signin-view', type: 'inline', } ], //closeBtnInside: true }); }); $(document).on('click', '.signInUserAccount', function(e) { var title = $(this).find('.title').text(); //console.log(title); $('#loginForm').find('.modal-title').text(title); //Event for actual link action e.preventDefault(); //Run WET plugin $.magnificPopup.open({ prependTo: '#loginForm', //modal: true, items: [ { src: '#user-signin', type: 'inline', } ], callbacks: { open: function() { }, close: function() { //console.log('Close sign in popup!'); localStorage.removeItem('signInPopUp'); } } //closeBtnInside: true }); $('#submitUserSignInPopUp').click( function() { //console.log('signInPopUp'); localStorage.setItem('signInPopUp', 'true'); }); }); $('#submitUserSignIn').click( function() { //console.log('signIn normal'); localStorage.removeItem('signInPopUp'); }); }); //]]> </script> <script src="/themes-jb/js/settings/site-settings-all.js"></script> <script> //<![CDATA[ var _gaq = _gaq || []; var lang = 'fr'; if (lang === 'en') { domain = 'jobbank.gc.ca'; } if (lang === 'fr') { domain = 'guichetemplois.gc.ca'; } //jobbank account tracking _gaq.push(['_setAccount', 'UA-10101722-1']); _gaq.push(['_setAllowLinker', true]); _gaq.push(['_setDomainName', domain]); _gaq.push(['_gat._anonymizeIp']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; //ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/u/ga_debug.js'; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); //GA for Mega Menu $(document).on('click', '#wb-sm ul li.active.sm-open > ul.open > li > a', function(event) { var tablabel = $(this).parents('ul.open').prev().text(); var itemlabel = $(this).text(); //alert('Clicked on '+tablabel+' Mega Menu - '+itemlabel); _gaq.push(['_trackEvent', 'MegaMenu', 'action: click', 'label: '+itemlabel]); }); // Device detection for Google Analytics Smart Banner if ($("meta[name='smartbanner:page']").length) { var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; var Android = /Android/i.test(window.navigator.userAgent) && !window.MSStream; var pageName = $("meta[name='smartbanner:page']").attr("content"); if (iOS) { platform = 'iOS'; } else if (Android) { platform = 'Android'; } var onLoadHandlerForConflictTesting = function() { $('.js_smartbanner__exit').on('click', function() { //console.log('SmartBannerClose '+pageName+' '+platform); _gaq.push(['_trackEvent', 'SmartBannerClose', pageName, platform]); }); $('.smartbanner__button').on('click', function() { //console.log('SmartBannerClick '+pageName+' '+platform); _gaq.push(['_trackEvent', 'SmartBannerClick', pageName, platform]); }); if ($('.js_smartbanner').length) { //console.log('SmartBannerView '+pageName+' '+platform); _gaq.push(['_trackEvent', 'SmartBannerView', pageName, platform]); } }; window.onload = onLoadHandlerForConflictTesting; } //]]> </script> <script type="text/javascript"> //console.log('Google Analytics code'); var TFWMode; // Google Analytics - Job Search //<![CDATA[ var sourcePage; function checkThisPage() { if (false) { //console.log('This is homePage'); sourcePage = 'homePage'; } else if (false) { //console.log('This is findAJobLandingPage'); sourcePage = 'findAJobLandingPage'; } else if (false) { //console.log('This is searchResultsPage'); sourcePage = 'searchResultsPage'; } else if (false) { //console.log('This is jobPostingPage'); sourcePage = 'jobPostingPage'; } else if (false) { //console.log('This is dashboardPage'); sourcePage = 'dashboardPage'; } else if (false) { //console.log('This is alertsPages'); sourcePage = 'alertsPages'; } else if (false) { //console.log('This is matchPages'); sourcePage = 'matchPages'; } else if (false) { //console.log('This is favouritesPages'); sourcePage = 'favouritesPages'; } else if (false) { //console.log('This is browsePages'); sourcePage = 'browsePages'; } else if (false) { //console.log('This is youthHomePage'); sourcePage = 'youthHomePage'; } else if (false) { //console.log('This is TFWHomePage'); sourcePage = 'TFWHomePage'; } else { sourcePage = '/landing-immigrants.xhtml'; } } checkThisPage(); $('form.search-module').submit(function(){ //alert('GA '+sourcePage); var searchString = $("#searchString").val(); var locationString = $("#locationstring").val(); if ($("input[name=fsrc]").val() == "21") { var fsrc21 = true; //alert('CSJ fsrc 21'); } if ($("input[name=fsrc]").val() == "32") { var fsrc32 = true; //alert('TFW fsrc 32'); } if (_gaq != undefined) { if ((!fsrc21 && !fsrc32)) { //alert('General GA - Job Search Mode'); if (searchString.length && locationString.length) { //alert('searchString: '+searchString+ ' and locationString: '+locationString+'\nSource page: '+sourcePage); _gaq.push(['_trackEvent', 'jobSearchTitle', 'source : '+sourcePage, searchString]); _gaq.push(['_trackEvent', 'jobSearchLocation', 'source : '+sourcePage, locationString]); _gaq.push(['_trackEvent', 'jobSearch', 'source : '+sourcePage, searchString+' '+locationString]); } if (searchString.length && !locationString.length) { //alert('searchString: '+searchString+'\nSource page: '+sourcePage); _gaq.push(['_trackEvent', 'jobSearchTitle', 'source : '+sourcePage, searchString]); _gaq.push(['_trackEvent', 'jobSearch', 'source : '+sourcePage, searchString]); } if (!searchString.length && locationString.length) { //alert('locationString: '+locationString+'\nSource page: '+sourcePage); _gaq.push(['_trackEvent', 'jobSearchLocation', 'source : '+sourcePage, locationString]); _gaq.push(['_trackEvent', 'jobSearch', 'source : '+sourcePage, locationString]); } if (!searchString.length && !locationString.length) { //alert('No search!'+'\nSource page: '+sourcePage); _gaq.push(['_trackEvent', 'jobSearchTitle', 'source : '+sourcePage, '']); _gaq.push(['_trackEvent', 'jobSearchLocation', 'source : '+sourcePage, '']); _gaq.push(['_trackEvent', 'jobSearch', 'source : '+sourcePage, '']); } } else { //alert('GA else search'); if (fsrc21) { //alert('General GA - CSJ Mode!'); if (searchString.length && !locationString.length) { _gaq.push(['_trackEvent', 'CSJjobSearchTitle', 'source : '+sourcePage, searchString]); _gaq.push(['_trackEvent', 'CSJjobSearchLocation', 'source : '+sourcePage, locationString]); _gaq.push(['_trackEvent', 'CSJjobSearch', 'source : '+sourcePage, searchString+' '+locationString]); //alert('GAQ title: '+searchString+'\nSource page: '+sourcePage); } if (locationString.length && !searchString.length) { _gaq.push(['_trackEvent', 'CSJjobSearchTitle', 'source : '+sourcePage, searchString]); _gaq.push(['_trackEvent', 'CSJjobSearchLocation', 'source : '+sourcePage, locationString]); _gaq.push(['_trackEvent', 'CSJjobSearch', 'source : '+sourcePage, searchString+' '+locationString]); //alert('GAQ location: '+locationString+'\nSource page: '+sourcePage); } if (searchString.length && locationString.length) { _gaq.push(['_trackEvent', 'CSJjobSearchTitle', 'source : '+sourcePage, searchString]); _gaq.push(['_trackEvent', 'CSJjobSearchLocation', 'source : '+sourcePage, locationString]); _gaq.push(['_trackEvent', 'CSJjobSearch', 'source : '+sourcePage, searchString+' '+locationString]); //alert('GAQ title: '+searchString+'\nGAQ location: '+locationString+'\nSource page: '+sourcePage); } if (!searchString.length && !locationString.length) { _gaq.push(['_trackEvent', 'CSJjobSearchTitle', 'source : '+sourcePage, searchString]); _gaq.push(['_trackEvent', 'CSJjobSearchLocation', 'source : '+sourcePage, locationString]); _gaq.push(['_trackEvent', 'CSJjobSearch', 'source : '+sourcePage, searchString+' '+locationString]); //alert('BOTH EMPTY!'+'\nGAQ title: '+searchString+'\nGAQ location: '+locationString+'\nSource page: '+sourcePage); } } if (fsrc32) { //alert('General GA - TFW Mode!'); if (searchString.length && !locationString.length) { _gaq.push(['_trackEvent', 'TFWjobSearchTitle', 'source : '+sourcePage, searchString]); _gaq.push(['_trackEvent', 'TFWjobSearchLocation', 'source : '+sourcePage, locationString]); _gaq.push(['_trackEvent', 'TFWjobSearch', 'source : '+sourcePage, searchString+' '+locationString]); //alert('TFW GAQ title: '+searchString+'\nSource page: '+sourcePage); } if (locationString.length && !searchString.length) { _gaq.push(['_trackEvent', 'TFWjobSearchTitle', 'source : '+sourcePage, searchString]); _gaq.push(['_trackEvent', 'TFWjobSearchLocation', 'source : '+sourcePage, locationString]); _gaq.push(['_trackEvent', 'TFWjobSearch', 'source : '+sourcePage, searchString+' '+locationString]); //alert('TFW GAQ location: '+locationString+'\nSource page: '+sourcePage); } if (searchString.length && locationString.length) { _gaq.push(['_trackEvent', 'TFWjobSearchTitle', 'source : '+sourcePage, searchString]); _gaq.push(['_trackEvent', 'TFWjobSearchLocation', 'source : '+sourcePage, locationString]); _gaq.push(['_trackEvent', 'TFWjobSearch', 'source : '+sourcePage, searchString+' '+locationString]); //alert('TFW GAQ title: '+searchString+'\nTFW GAQ location: '+locationString+'\nSource page: '+sourcePage); } if (!searchString.length && !locationString.length) { _gaq.push(['_trackEvent', 'TFWjobSearchTitle', 'source : '+sourcePage, searchString]); _gaq.push(['_trackEvent', 'TFWjobSearchLocation', 'source : '+sourcePage, locationString]); _gaq.push(['_trackEvent', 'TFWjobSearch', 'source : '+sourcePage, searchString+' '+locationString]); //alert('TFW BOTH EMPTY!'+'\nTFW GAQ title: '+searchString+'\nTFW GAQ location: '+locationString+'\nSource page: '+sourcePage); } } } } }); //]]> </script> <script type="text/javascript" src="/themes-sat/js/deps/jquery.validate.min.js"></script> <script type="text/javascript" src="/themes-sat/js/deps/additional-methods.min.js"></script> <script type="text/javascript" src="/themes-jb/js/settings/custom-validation-methods.js"></script> <script type="text/javascript" src="/themes-jb/js/third-party/animate.js"></script> <script type="text/javascript"> //<![CDATA[ /* * example code <div class="ta-jobtitlesuggest"> <input type="text" /> <h:inputHidden id="id_en" name="id_en" /> <h:inputHidden id="id_fr" name="id_fr" /> <h:inputHidden id="noc_code" name="noc_code" /> <span id="suggestioncount" data-name="suggestioncount" role="status" aria-live="polite" class="typeahead-helper-hidden-accessible"></span> <span class="input-group-btn"> <input id="searchSubmit" class="btn btn-primary pull-right" value="Search" type="submit" name="action">Search</button> </span> </div> */ taJobtitleSuggestFunctionsV2 = function(element) { String.prototype.format = function() { var args = arguments; return this.replace(/\{(\d+)\}/g, function() { return args[arguments[1]]; }); }; var inputObject = $(element).find("input:text:first").not(':hidden'); var inputlang = document.documentElement.lang; if (inputObject.attr('lang') !== undefined) inputlang = inputObject.attr('lang'); if (inputlang === undefined) inputlang = "en"; var selectedObjectText; var messageObject = $(element).find("[data-name='suggestioncount']"); var errorLabelMessageObject = $(element).find("label").find(".message"); var idenObject = $(element).find("[name$='id_en']"); var idfrObject = $(element).find("[name$='id_fr']"); var titleidObject = $(element).find("[name$='\\:id']"); var titleObject = $(element).find("[name$='term']"); var titleenObject = $(element).find("[name$='title_en']"); var titlefrObject = $(element).find("[name$='title_fr']"); var nocCodeObject = $(element).find("[name$='noc_code']"); var filterSkilltypeObject = $(element).find("[name$='filterskilltype']"); var buttonObject = $(element).find("input:submit, button").not(':hidden'); if (buttonObject.length == 0) { buttonObject = $(element).find("button:submit").not(':hidden'); } //clearinputNOCTitle(); if (titleidObject.val() == '' ) { clearinputNOCTitle(); }; messageObject.text("Entrez du texte pour obtenir des suggestions"); function displaykeyNOCTitle(item) { return item.title+" ("+item.noc21_code+")"; } function displayoptionNOCTitle(value,item) { return value; } function clearinputNOCTitle() { idenObject.val(""); idfrObject.val(""); titleidObject.val(""); titleenObject.val(""); titlefrObject.val(""); titleObject.val(""); nocCodeObject.val(""); buttonObject.attr('disabled', 'disabled'); selectedObjectText = ""; // trigger event change nocCodeObject.change(); inputObject.trigger("unselect",["Custom","Event"]); } function noValidSelection() { errorLabelMessageObject.show().addClass("ui-message-error").attr({"role":"status","aria-live":"polite"}).text("Aucune suggestion pour ce mot. Entrez une autre expression."); } function validSelection() { errorLabelMessageObject.text("").hide(); } function populateinputNOCTitle(item) { idenObject.val(item.id_en); idfrObject.val(item.id_fr); titleidObject.val(item.id); titleenObject.val(item.title_en); titlefrObject.val(item.title_fr); if (inputlang=="en") { titleObject.val(item.title_en); } else { titleObject.val(item.title_fr); } validSelection(); nocCodeObject.val(item.noc21_code); buttonObject.removeAttr('disabled'); selectedObjectText = displaykeyNOCTitle(item); // trigger event change nocCodeObject.change(); inputObject.trigger("select",["Custom","Event"]); } $(element).on('keypress', function(evt, item) { var t1 = $(inputObject).val(); if (evt.which == 13 ) { if (t1!=selectedObjectText) { $(buttonObject).prop("disabled", true); messageObject.text(""); clearinputNOCTitle(); return false; } else { $(buttonObject).prop("disabled", false); $(buttonObject).click(); return true; } return false; } $(buttonObject).prop("disabled", true); }); //- json transform on solr var bloodhoundNOCTitle = new Bloodhound({ datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.fos_name); }, queryTokenizer: Bloodhound.tokenizers.whitespace, remote: { url:"/core/ta-jobtitle_"+inputlang+"/select?q=%QUERY&wt=json&rows=25", wildcard: "%QUERY", replace: function (url, query) { var q = encodeURIComponent(inputObject.val()); q2 = url.replace("%QUERY",q); if ( typeof(filterSkilltypeObject) != 'undefined' && filterSkilltypeObject.val() !== "" && filterSkilltypeObject.val() !== undefined) { q2 += "&fq="+filterSkilltypeObject.val(); } else { q2 += "&fq=noc_job_title_type_id:1"; } return q2; } , filter: function(response) { return $.map(response.response.docs, function(doc){ return { title:doc.title, noc_code:doc.noc_code, noc21_code:doc.noc21_code, id_en:doc.noc_job_english_title_id, id_fr:doc.noc_job_french_title_id, id:doc.noc_job_title_concordance_id, title_en:doc.english_title, title_fr:doc.title, }; }); } }, limit: 25 }); bloodhoundNOCTitle.initialize(); inputObject.typeahead( { minLength: 2 }, { name: "jobtitlesearch", displayKey: function(item) { return displaykeyNOCTitle(item) } , limit: 20, templates: { suggestion: function(data) { var inputtext = inputObject.val(); inputtext = inputtext.replace(/^[^\w]+|[^\w]+$/g, "").replace(/[^\w'-]+/g, "|"); pattern = new RegExp(inputtext,'gi'); highlighted = displaykeyNOCTitle(data).replace(pattern,function(matched){ return '<span class="tt-highlight">'+matched+'</span>'; }); return '<p>'+displayoptionNOCTitle(highlighted,data)+'</p>'; }, notFound: function(data) { messageObject.text("Aucune suggestion pour ce mot. Entrez une autre expression."); noValidSelection(); return '<p class="tt-suggestion tt-selectable">'+displayoptionNOCTitle("<span class='tt-highlight'>Aucune suggestion pour ce mot. Entrez une autre expression.</span>")+'</p>'; }, footer: function(data) { messageObject.text("Des suggestions ont été trouvées, utilisez les flèches pour les consulter."); } }, source: bloodhoundNOCTitle.ttAdapter() }).on('typeahead:open', function(evt) { messageObject.text("Entrez du texte pour obtenir des suggestions"); }).on('typeahead:select', function(evt, item) { populateinputNOCTitle(item); messageObject.text( "Vous avez choisi « {0} »".format( displaykeyNOCTitle(item) ) ); }).on('typeahead:change', function(evt, item) { t1 = inputObject.val(); if (t1!=selectedObjectText) { messageObject.text(""); clearinputNOCTitle(); //console.log('clear title'); } }).on('typeahead:autocomplete', function(evt, item) { populateinputNOCTitle(item); messageObject.text( "Vous avez choisi « {0} »".format( displaykeyNOCTitle(item) ) ); }).on('typeahead:render', function(evt, item,c,d) { if (typeof(item) != 'undefined') { messageObject.text("Des suggestions ont été trouvées, utilisez les flèches pour les consulter."); } }).on('typeahead:close', function(evt) { var inputvalue = inputObject.typeahead('val'); if (bloodhoundNOCTitle.remote.transport._cache.list.head) { var firstdoc = bloodhoundNOCTitle.remote.transport._cache.list.head.val.response.docs[0]; } //if ( typeof(selectedObjectText) != 'undefined' && selectedObjectText.length > 0 ) { if ( typeof(selectedObjectText) != 'undefined' && selectedObjectText.length > 0 && inputObject.val() != "" ) { //console.log('Selected: '+selectedObjectText); messageObject.text( "Vous avez choisi « {0} »".format(selectedObjectText) ); } else if ( typeof(inputvalue) != 'undefined' && inputvalue.length > 0 && typeof(firstdoc) != 'undefined' && typeof(firstdoc) !== null) { //console.log('No selection then select the first docs: '+inputvalue); // no selection then select the first docs var firstitem = { title:firstdoc.title, noc_code:firstdoc.noc_code, noc21_code:firstdoc.noc21_code, id_en:firstdoc.noc_job_english_title_id, id_fr:firstdoc.noc_job_french_title_id, id:firstdoc.noc_job_title_concordance_id, title_en:firstdoc.english_title, title_fr:firstdoc.title }; inputObject.val(displaykeyNOCTitle(firstitem)); inputObject.typeahead('val',firstitem.title); populateinputNOCTitle(firstitem); messageObject.text( "Vous avez choisi « {0} »".format(displaykeyNOCTitle(firstitem)) ); } else { messageObject.text(""); validSelection(); } }); }; function initJobTitleSuggestObject() { $('div.ta-jobtitlesuggest').each( function(i,obj) { new taJobtitleSuggestFunctionsV2(obj); }); } if ($(".modify-job-wb-tabs").length) { $(document).on("wb-ready.wb", initJobTitleSuggestObject); } else { $(document).ready(initJobTitleSuggestObject); } //]]> </script> <script type="text/javascript"> //<![CDATA[ taCityprovSuggestFunctionsV2 = function(element) { String.prototype.format = function() { var args = arguments; return this.replace(/\{(\d+)\}/g, function() { return args[arguments[1]]; }); }; if (!String.prototype.startsWith) { String.prototype.startsWith = function(searchString, position) { position = position || 0; return this.indexOf(searchString, position) === position; }; } var inputObject = $(element).find("input:text:first"); var inputlang = document.documentElement.lang; if (inputObject.attr('lang') !== undefined) inputlang = inputObject.attr('lang'); if (inputlang === undefined) inputlang = "en"; var selectedObjectText; var messageObject = $(element).find("[data-name='suggestioncount']"); var errorLabelMessageObject = $(element).find("label").find(".message"); var idObject = $(element).find("[name$='locationparam']"); var specialObject = $(element).find("[name$='cityPostalCodeSpecial']"); var buttonObject = $(element).find("input:submit, button"); if (buttonObject.length == 0) { buttonObject = $(element).find("button:submit"); } if (idObject.val() == '' ) { clearinput(); }; messageObject.text("Entrez du texte pour obtenir des suggestions"); function displaykey(item) { if (item.docid.startsWith('PR')) { return item.name; } if (item.docid.startsWith('P')) { return item.name+", "+item.prov_cd+" "+item.postalcode; } return item.name+", "+item.prov_cd; } function displayvalue(item) { if (item.docid.startsWith('PR')) { return item.prov_name; } if (item.docid.startsWith('P')) { return item.postalcode; } return item.name+", "+item.prov_cd; } function displayoption(value,item) { return value; } /* if the button is inside the ta-cityprovsuggest block, it will be controlled by this script to avoid that behaviour, move the button onside the block */ function clearinput() { idObject.val(""); // DO NOT COMMENT OUT THIS LINE buttonObject.attr('disabled', 'disabled'); selectedObjectText = ""; inputObject.trigger("unselect",["Custom","Event"]); } function noValidSelection() { errorLabelMessageObject.show().addClass("ui-message-error").attr({"role":"status","aria-live":"polite"}).text("Aucune suggestion pour ce mot. Entrez une autre expression."); } function validSelection() { errorLabelMessageObject.text("").hide(); } function populateinput(item) { if (item.docid.startsWith('PR')) { idObject.val(item.prov_cd); } else if (item.docid.startsWith('P')) { idObject.val(item.postalcode); } else { idObject.val(item.city_id); } validSelection(); // DO NOT COMMENT OUT THIS LINE buttonObject.removeAttr('disabled', 'disabled'); selectedObjectText = displayvalue(item); inputObject.trigger("select",["Custom","Event"]); } var bloodhound = new Bloodhound({ datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.name); }, queryTokenizer: Bloodhound.tokenizers.whitespace, remote: { url:"/core/ta-cityprovsuggest_"+inputlang+"/select?q=%QUERY&fq=NOT postalcode_cnt:0&wt=json&rows=25", wildcard: "%QUERY", filter: function(response) { return $.map(response.response.docs, function(doc){ return { docid:doc.docid, name:doc.name, city_id:doc.city_id, prov_cd:doc.province_cd, prov_name:doc.province_name, postalcode:doc.postalcode}; }); } }, limit: 25 }); bloodhound.initialize(); inputObject.typeahead( { minLength: 2 }, { name: "ta-cityprovsuggest", displayKey: function(item) { if (item.docid.startsWith('PR')) { return item.prov_name; } if (item.docid.startsWith('P')) { return item.postalcode; } return item.name+", "+item.prov_cd; //return displaykey(item) }, limit: 20, templates: { suggestion: function(data) { var inputtext = inputObject.val(); inputtext = inputtext.replace(/^[^\w]+|[^\w]+$/g, "").replace(/[^\wéèêë'-]+/g, "|").replace(/[eéèêë]+/g, "[eéèêë]"); pattern = new RegExp(inputtext,'gi'); highlighted = displaykey(data).replace(pattern,function(matched){ return '<span class="tt-highlight">'+matched+'</span>'; }); return '<p>'+displayoption(highlighted,data)+'</p>'; }, notFound: function(data) { messageObject.text("Aucune suggestion pour ce mot. Entrez une autre expression."); noValidSelection(); return '<p class="tt-suggestion tt-selectable">'+displayoption("<span class='tt-highlight'>Aucune suggestion pour ce mot. Entrez une autre expression.</span>")+'</p>'; }, footer: function(data) { messageObject.text("Des suggestions ont été trouvées, utilisez les flèches pour les consulter."); } }, source: bloodhound.ttAdapter() }).on('typeahead:open', function(evt) { messageObject.text("Entrez du texte pour obtenir des suggestions"); }).on('typeahead:select', function(evt, item) { populateinput(item); messageObject.text( "Vous avez choisi « {0} »".format( displaykey(item) ) ); }).on('typeahead:change', function(evt, item) { t1 = inputObject.val(); if (t1!=selectedObjectText) { messageObject.text(""); clearinput(); } }).on('typeahead:autocomplete', function(evt, item) { populateinput(item); messageObject.text( "Vous avez choisi « {0} »".format( displaykey(item) ) ); }).on('typeahead:render', function(evt, item,c,d) { if (typeof(item) != 'undefined') { messageObject.text("Des suggestions ont été trouvées, utilisez les flèches pour les consulter."); } }).on('typeahead:close', function(evt) { var inputvalue = inputObject.typeahead('val'); if (bloodhound.remote.transport._cache.list.head) { var firstdoc = bloodhound.remote.transport._cache.list.head.val.response.docs[0]; } if ( typeof(selectedObjectText) != 'undefined' && selectedObjectText.length > 0 ) { messageObject.text( "Vous avez choisi « {0} »".format(selectedObjectText) ); } else if ( typeof(inputvalue) != 'undefined' && inputvalue.length > 0 && typeof(firstdoc) != 'undefined') { // no selection then select the first docs var firstitem = { docid:firstdoc.docid, name:firstdoc.name, city_id:firstdoc.city_id, prov_cd:firstdoc.province_cd, prov_name:firstdoc.province_name, postalcode:firstdoc.postalcode }; //inputObject.val(displaykey(firstitem)); if (firstitem.docid.startsWith('PR')) { inputObject.typeahead('val',firstitem.prov_name); inputObject.val(firstitem.prov_name); } else if (firstitem.docid.startsWith('P')) { inputObject.typeahead('val',firstitem.postalcode); inputObject.val(firstitem.postalcode); } else { inputObject.typeahead('val',firstitem.name+", "+firstitem.prov_cd); inputObject.val(firstitem.name+", "+firstitem.prov_cd); } //inputObject.typeahead('val',firstitem.name); populateinput(firstitem); messageObject.text( "Vous avez choisi « {0} »".format(displaykey(firstitem)) ); } else { messageObject.text(""); validSelection(); } }); // special object action if ( typeof specialObject !== 'undefined' ) { // When the user type, we hide div inputObject.on("keyup focus", function () { var search = this.value; if (search) { specialObject.addClass('wb-inv'); } else { specialObject.removeClass('wb-inv'); } }); inputObject.on('blur', function() { specialObject.addClass('wb-inv'); }); specialObject.on("focus blur", "a", function() { //window.clearTimeout(timeoutHandler); specialObject.removeClass("wb-inv"); }); specialObject.on("click", "a", function() { //console.log('#cityPostalCodeSpecial option - Activated'); var text = $(this).attr("data-input"); //var inputObject = $(this).parent(".ta-cityprovsuggest").find("input:text:first"); switch(text) { case "canada": updateLocationParam(); updateResultWithUrl($(this)); break; case "local": if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(pos) { var latlng = pos.coords; // ajax call to solr for name of city inputObject.addClass('working'); // pt: '45.558958,-75.628912' // pt: latlng.lat+','+latlng.lng, $.ajax({ url: '/core/ta-postalcode/select', dataType: 'JSONP', async: false, data: { q: '*:*', wt: 'json', fl: '*,_dist_:geodist()', sfield:'geolocation', pt: latlng.latitude+','+latlng.longitude, sort: 'geodist() asc', rows:'1' }, jsonp: 'json.wrf', success: function(data,status) { $(this).data("url",$(this).data("url")+"&pst="+data.response.docs[0].postalcode); updateResultWithUrl($(this)); }, complete: function(jqXHR,status) { inputObject.removeClass('working'); } }); }); } else { inputObject.val(" "); $("#messageblock").html('<div class="alert alert-info"> Nous ne pouvons pas détecter votre emplacement actuel</div>'); } break; case "profile": updateResultWithUrl($(this)); break; } return false; }); } }; function initCityprovSuggestObject() { $('div.ta-cityprovsuggest').each( function(i,obj) { new taCityprovSuggestFunctionsV2(obj); }); } if ($(".modify-job-wb-tabs").length) { $(document).on("wb-ready.wb", initCityprovSuggestObject); } else { $(document).ready(initCityprovSuggestObject); } //]]> </script><script type="text/javascript"> //<![CDATA[ //Remove WET GC Theme Loupe Icon $('#wb-glb-mn .overlay-lnk span.glyphicon.glyphicon-search').removeClass('glyphicon-search'); $('#results-filter-wrapper, .results-filter-content .list-group').addClass('noanim'); $('#results-filter-wrapper, .results-filter-content .list-group').each(function(i) { var elm=$(this); setTimeout(function() { elm.removeClass('noanim'); }, i * 500); }); //Initialize localstorage var reload; initlocalstorageFunctions = function() { if (localStorage) { if (localStorage.getItem('functionResultFilter') === 'active' ) { //console.log('#Localstorage: filter is active'); if (!$('.results-content').hasClass('filter-hide')) { $('.skip-to-filters').show(); if ($('.results-filter-wrapper').length) { //console.log('Search results!'); if ($('.results-filter-wrapper').css('visibility') === 'visible') { reload = true; //console.log('.results-filter-wrapper is VISIBLE'); //showFilter(); if ($('.search-input-content').css('display') === 'none') { //console.log('display none - Mobile!'); hideFilter(); } else { //console.log('display block - Desktop!'); showFilter(); } } else { reload = true; //console.log('.results-filter-wrapper is HIDDEN'); hideFilter(); } } if ($('#results-list-wrapper').hasClass("col-md-12:not(:has(.courses))")) { $('#results-list-wrapper').removeClass('col-md-12').addClass('col-md-9'); } } } else if (localStorage.getItem('functionResultFilter') === 'disabled' ) { //console.log('#Localstorage: filter is disabled'); reload = true; $('.skip-to-filters').hide(); hideFilter(); } else { //console.log('#Localstorage: filter is N/A'); reload = true; //showFilter(); //hideFilter(); $('.results-list-wrapper').each(function(i) { var elm=$(this); setTimeout(function() { elm.removeClass('noanim'); }, i * 500); }); } // Sort By if (localStorage.getItem('functionSortBy') === 'active') { //console.log('Sort By - Active'); resetSearchOverlay(); activateSortBy(); if ($('.results-sortby-group').css('visibility') === 'hidden') { //Mobile if ($('.results-filter-button-overlay').css('position') === 'fixed') { //console.log('Sort By - Mobile!'); if (!$('.results-sortby-group').hasClass('sortby-group-visible')) { $('.results-filter-button-overlay').addClass('noBorder'); $('.results-sortby-group').addClass('sortby-group-visible'); } } //Desktop if ($('.results-filter-button-overlay').css('position') === 'relative') { //console.log('Sort By - Desktop!'); if ($('.results-sortby-group').hasClass('sortby-group-visible')) { $('.results-filter-button-overlay').removeClass('noBorder'); $('.results-sortby-group').removeClass('sortby-group-visible'); resetDynamicFilter(); } } } else if ($('.results-sortby-group').css('visibility') === 'visible') { //Mobile if ($('.results-filter-button-overlay').css('position') === 'fixed') { //console.log('Sort By - Mobile!'); if (!$('.results-sortby-group').hasClass('sortby-group-visible')) { $('.results-filter-button-overlay').addClass('noBorder'); $('.results-sortby-group').addClass('sortby-group-visible'); } } //Desktop if ($('.results-filter-button-overlay').css('position') === 'relative') { //console.log('Sort By - Desktop!'); $('main').removeClass('sortby-visible'); if ($('.results-sortby-group').hasClass('sortby-group-visible')) { $('.results-filter-button-overlay').removeClass('noBorder'); $('.results-sortby-group').removeClass('sortby-group-visible'); } } } } else if (localStorage.getItem('functionSortBy') === 'disabled' ) { //console.log('Sort By - Disabled'); $('main').removeClass('sortby-visible'); $('.command-result-sortby-overlay').removeClass('active'); //Mobile if ($('.results-filter-button-overlay').css('position') === 'fixed') { if ($('.results-sortby-group').hasClass('sortby-group-visible')) { $('.results-filter-button-overlay').removeClass('noBorder'); $('.results-sortby-group').removeClass('sortby-group-visible'); } } //Desktop if ($('.results-filter-button-overlay').css('position') === 'relative') { if ($('.results-sortby-group').hasClass('sortby-group-visible')) { $('.results-filter-button-overlay').removeClass('noBorder'); $('.results-sortby-group').removeClass('sortby-group-visible'); } } } else { localStorage.setItem('functionSortBy', 'disabled'); $('.results-filter-button-overlay').removeClass('noBorder'); $('.results-sortby-group').removeClass('sortby-group-visible'); } if ($('.results-content').hasClass('filter-hide')) { $("#results-filter-wrapper").addClass("invisible"); } else if ($('.results-content').hasClass('filter-visible')) { $("#results-filter-wrapper").removeClass("invisible"); } } } function resetSearchOverlay() { //console.log('Reset Search Overlay'); $('#header-search').removeClass('search-visible'); $('.search-input-content').removeClass('noBorder'); $('main').removeClass('search-visible'); $('.command-search-overlay').removeClass('active'); $('.command-search-overlay').removeClass('btn-default'); $('.command-search-overlay').addClass('btn-primary'); $('.command-search-overlay').find('.text').text("Chercher"); $('.command-search-overlay').find('.far').removeClass('fa-times').addClass('fa-search'); $('.results-filter-button-overlay').removeClass('noBorder'); } function resetDynamicFilter() { //console.log('Course resetDynamicFilter'); //Mobile if ($('.results-filter-button-overlay').css('position') === 'fixed') { checkToggleFilterList(); } //Desktop if ($('.results-filter-button-overlay').css('position') === 'relative') { $('.results-filter-content section').find('.list-group').not('.stay-open').removeClass('close'); $('.results-filter-content section h3').not('.nonActive').attr({"tabindex":"0", "aria-expanded": "true", "aria-haspopup":"false", "data-toggle":"dropdown"}).find('.toggleFilterList').remove(); } } function activateSortBy() { //console.log('Activate Sort By Overlay'); $('main').addClass('sortby-visible'); localStorage.setItem('functionSortBy', 'active'); $('.command-result-sortby-overlay').addClass('active'); $('.results-sortby-group').addClass('sortby-group-visible'); $('.results-filter-button-overlay').addClass('noBorder'); } function resetSortBy() { //console.log('Reset Sort By Overlay'); $('main').removeClass('sortby-visible'); localStorage.setItem('functionSortBy', 'disabled'); $('.command-result-sortby-overlay').removeClass('active'); $('.results-sortby-group').removeClass('sortby-group-visible'); $('.results-filter-button-overlay').removeClass('noBorder'); } function hideFilter() { //console.log('#Hide Filter'); $('.command-result-filter-overlay').removeClass('active').attr('aria-expanded','false'); $('.results-content').addClass('filter-hide').removeClass('filter-visible'); if (reload) { //console.log('reload hide filter'); //console.log('reload: '+reload); reload = false; $('.results-list-wrapper').removeClass('col-md-9').addClass('col-md-12 noanim'); } else { //console.log('not reload hide filter'); $('.results-list-wrapper').removeClass('noanim'); $('.results-list-wrapper').removeClass('col-md-9').addClass('col-md-12'); } if (localStorage) { localStorage.setItem('functionResultFilter', 'disabled'); } } function showFilter() { //console.log('#Show Filter'); $('.command-result-filter-overlay').addClass('active').attr('aria-expanded','true'); $('.results-content').addClass('filter-visible').removeClass('filter-hide'); if (reload) { //console.log('reload show filter'); reload = false; //$('.results-list-wrapper').removeClass('col-md-12').addClass('col-md-9 noanim'); if ($('.results-list-wrapper').hasClass("col-md-12")) { $('.results-list-wrapper').removeClass('col-md-12').addClass('col-md-9 noanim'); } } else { //console.log('not reload show filter'); $('.results-list-wrapper').removeClass('noanim'); //$('.results-list-wrapper').removeClass('col-md-12').addClass('col-md-9'); if ($('.results-list-wrapper').hasClass("col-md-12")) { $('.results-list-wrapper').removeClass('col-md-12').addClass('col-md-9'); } } if (localStorage) { localStorage.setItem('functionResultFilter', 'active'); } } //On load - CSJ check - For mobile app compatibility if (localStorage) { localStorage.removeItem('youthSearchLocation'); //localStorage.removeItem('volunteerSearchLocation'); //var fromYouthPage = JSON.parse(localStorage.getItem('fromYouthPage')); var fromVolunteerPage = JSON.parse(localStorage.getItem('fromVolunteerPage')); //var youthSearchLocation = localStorage.getItem('youthSearchLocation'); var volunteerSearchLocation = localStorage.getItem('volunteerSearchLocation'); var currentSearchString = $('.searchString').val(); //Volunteer if ($("#volunteerPage, #jobSearchResultsJobSearchForm.volunteer").length) { //console.log('Volunteer page'); if ($("#cityPostalCodeInput").length) { //console.log('Volunteer search page!'); var newSearchString = currentSearchString.replace(volunteerSearchLocation, ''); if (fromVolunteerPage) { //console.log('From volunteer page!'); //$("#searchStringPseudo").val($.trim(newSearchString)); $("#cityPostalCodeInput").val($.trim(volunteerSearchLocation)); //localStorage.removeItem('volunteerSearchLocation'); localStorage.setItem('fromVolunteerPage', JSON.stringify(false)); } else { //console.log('not from volunteer page'); $("#cityPostalCodeInput").val($.trim(volunteerSearchLocation)); //localStorage.removeItem('volunteerSearchLocation'); } if ($("#volunteerPage").length) { localStorage.removeItem('volunteerSearchLocation'); } } } } //$(document).on("ready", saveLoginRedirectURIListener); $(document).ready(function(){ //Initiate localstorage functions once document have been loaded initlocalstorageFunctions(); //Restore infinite scroll position on reload if ($('.command-search-overlay').length){ if (sessionStorage.scrollTop != "undefined") { $(window).scrollTop(sessionStorage.scrollTop); //console.log('Old scroll position: '+$(window).scrollTop()); //Resets scroll position $(document).on('click', '.results-filter-content .list-group-item a', function() { sessionStorage.scrollTop = ''; return true; }); } } /* Mobile menu functionality */ $(document).on('click', '.search-apps li.mobile-menu > a', function() { $('.search-apps li ul').toggleClass('show'); if ($('.search-apps li ul').hasClass('show')) { $(this).attr('aria-expanded','true'); $(this).addClass('active'); $(this).find('.fas').removeClass('fa-chevron-circle-right').addClass('fa-chevron-circle-down'); } else { $(this).attr('aria-expanded','false'); $(this).removeClass('active'); $(this).find('.fas').removeClass('fa-chevron-circle-down').addClass('fa-chevron-circle-right'); } return false; }); /* Side menu */ $('.search-apps li a').keydown( function(event) { // Up key if (event.keyCode == 38) { if ($(document.activeElement).closest('li').is('.mobile-menu')) { $(document.activeElement).closest('li').find('ul').children('li:visible:last').find('a').focus(); } else if ($(document.activeElement).closest('li').is(':nth-child(1)')) { $(document.activeElement).closest('li').siblings(':visible:last').find('a').focus(); } else if (!$(document.activeElement).closest('li').is(':nth-child(1)')) { if ($(document.activeElement).closest('li').prev().is('.search-apps li:visible')) { $(document.activeElement).closest('li').prev('.search-apps li:visible').find('a').focus(); } else if ($(document.activeElement).closest('li').prev('.search-apps li:hidden')) { $(document.activeElement).closest('li').siblings(':visible:last').find('a').focus(); } } event.preventDefault(); } // Down key if (event.keyCode == 40) { if ($(document.activeElement).closest('li').is('.mobile-menu')) { $(document.activeElement).closest('li').find('ul').children('li:nth-child(1)').find('a').focus(); } else if ($(document.activeElement).closest('li').is('.search-apps li:visible:last')) { $(document.activeElement).closest('li').siblings(':nth-child(1)').find('a').focus(); } else if (!$(document.activeElement).closest('li').is('.search-apps li:visible:last')) { if ($(document.activeElement).closest('li').next().is('.search-apps li:visible')) { $(document.activeElement).closest('li').next().find('a').focus(); } else if ($(document.activeElement).closest('li').next('.search-apps li:hidden')) { $(document.activeElement).closest('li').siblings(':visible:last').find('a').focus(); } } event.preventDefault(); } // Escape key if(event.which == 27) { if ($('.search-apps li ul').hasClass('show')) { $('.search-apps li ul').removeClass('show'); $('.mobile-menu a').attr('aria-expanded','false'); } event.preventDefault(); } }); $('.searchString, .locationstring').on('focus', function(){ $('.input-wrapper').addClass('focus'); if ($(".searchString").val() == "") { } }); $('.searchString, .locationstring').on('blur', function(){ $('.input-wrapper').removeClass('focus'); }); /* $("#searchString").on("keyup", function () { var search = this.value; if (!search) { //console.log('#searchString has no value!'); $("#searchString").val(""); } }); */ $('.searchString, .locationstring').change(); // Hide location options with timer var timeoutHideLocationOptionTimer; function hideLocationOptionTimer() { timeoutHideLocationOptionTimer = setTimeout(function(){ //console.log('hideLocationOptionTimer!!!!!'); $('#cityPostalCodeSpecial').addClass('wb-inv'); //$('#advanced-search-button').focus(); }, 200); } $(".locationstring").on('focus', function() { //console.log('#locationstring focus'); clearTimeout(timeoutHideLocationOptionTimer); //if (!$('#header-search').hasClass("search-visible")) { $('#cityPostalCodeSpecial').removeClass('wb-inv'); //} $('.search-input-content').addClass('focus'); //console.log('focus'); var search = this.value; if (search) { //console.log('Has value!'); //if (!$('#header-search').hasClass("search-visible")) { $('#cityPostalCodeSpecial').addClass('wb-inv'); //} } else { //console.log('No value!'); //if (!$('#header-search').hasClass("search-visible")) { $('#cityPostalCodeSpecial').removeClass('wb-inv'); //} } }); // When the user type, we hide div $(".locationstring").on("keyup", function () { var search = this.value; $('#cityPostalCodeSpecial').removeClass('wb-inv'); if (search) { //console.log('#locationstring - Has value'); //if (!$('#header-search').hasClass("search-visible")) { $('#cityPostalCodeSpecial').addClass('wb-inv'); //} } else { //$("#locationstring").val(""); //console.log('#locationstring - Has NO value'); //if (!$('#header-search').hasClass("search-visible")) { $('#cityPostalCodeSpecial').removeClass('wb-inv'); //} } }); $(".locationstring").on('blur', function() { hideLocationOptionTimer(); $('#jobSearchBar').removeClass('focus'); }); $(".locationstring").keydown( function(event) { if(event.which == 27) { hideLocationOptionTimer(); event.preventDefault(); } }); $('#cityPostalCodeSpecial a').on('focus', function() { //console.log('#cityPostalCodeSpecial options - Focus ON'); clearTimeout(timeoutHideLocationOptionTimer); $('#cityPostalCodeSpecial').removeClass("wb-inv"); $('.search-input-content').addClass('focus'); }); $("#advanced-search-button").on("click", "a", function() { var text = $(this).attr("data-input"); var form = $(this).form; console.log("form found"); form.action = '?'+text; return false; }); $("#cityPostalCodeSpecial").on("click", "a", function() { //console.log('#cityPostalCodeSpecial option - Activated'); var text = $(this).attr("data-input"); var inputObject = $(this).parent(".ta-cityprovsuggest").find("input:text:first"); switch(text) { case "canada": $(".locationstring").val("Canada"); $(".locationstring").typeahead('val',"Canada"); break; case "local": if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(pos) { const latitude = pos.coords.latitude; const longitude = pos.coords.longitude; const accuracy = pos.coords.accuracy; const coordinatesString = "Latitude: " + latitude + ", Longitude: " + longitude + ", Accuracy: " + accuracy + " meters"; console.log("Coords: " + coordinatesString); var latlng = pos.coords; // ajax call to solr for name of city $('.locationstring').addClass('working'); // pt: '45.558958,-75.628912' // pt: latlng.lat+','+latlng.lng, $.ajax({ url: '/core/ta-postalcode/select', dataType: 'JSONP', async: false, data: { q: '*:*', wt: 'json', fl: '*,_dist_:geodist()', sfield:'geolocation', pt: latlng.latitude+','+latlng.longitude, sort: 'geodist() asc', rows:'1' }, jsonp: 'json.wrf', success: function(data,status) { $(".locationstring").val(data.response.docs[0].postalcode); $(".locationstring").typeahead('val',data.response.docs[0].postalcode); }, complete: function(jqXHR,status) { $('.locationstring').removeClass('working'); } }); }, function(error) { switch(error.code) { case error.PERMISSION_DENIED: console.log("User denied the request for Geolocation."); $(".locationstring").val(""); $("#messageblock").html('<div class="alert alert-info"><p>Nous ne pouvons pas détecter votre emplacement actuel</p></div>'); break; case error.POSITION_UNAVAILABLE: console.log("Location information is unavailable."); $(".locationstring").val(""); $("#messageblock").html('<div class="alert alert-info"><p>Nous ne pouvons pas détecter votre emplacement actuel</p></div>'); break; case error.TIMEOUT: console.log("The request to get user location timed out."); $(".locationstring").val(""); $("#messageblock").html('<div class="alert alert-info"><p>Nous ne pouvons pas détecter votre emplacement actuel</p></div>'); break; case error.UNKNOWN_ERROR: console.log("An unknown error occurred."); $(".locationstring").val(""); $("#messageblock").html('<div class="alert alert-info"><p>Nous ne pouvons pas détecter votre emplacement actuel</p></div>'); break; } }); } else { $(".locationstring").val(""); $("#messageblock").html('<div class="alert alert-info"><p>Nous ne pouvons pas détecter votre emplacement actuel</p></div>'); } break; case "profile": $(".locationstring").val("@profile"); $(".locationstring").typeahead('val',"@profile"); break; } return false; }); $("#cityPostalCodeSpecial").on("blur", "a", function() { //console.log('Link out!'); $('#jobSearchBar').removeClass('focus'); hideLocationOptionTimer(); }); $("#cityPostalCodeSpecial").keydown( function(event) { if(event.which == 27) { hideLocationOptionTimer(); event.preventDefault(); } }); $('.results-content.filter-visible .results-filter-button-overlay').css('display', 'inline-block'); $('.results-filter-button-overlay').show(); $('.command-result-filter-overlay').addClass('active').attr('aria-expanded','false');; if (localStorage) { if ($('.hero-content-wrapper').length) { //console.log("#Landing page so filter is active"); localStorage.setItem('functionResultFilter', 'active'); } } //Advance search - language filter always associated with Job Bank jobs /* $('input[name="jobSearchForm:flg"]').change( function() { var langFlag = $('input[name="jobSearchForm:flg"]'); if ($(langFlag).is(':checked')) { $('#jobSearchForm\\:fsrc\\:0').prop('checked',true); } else { $('#jobSearchForm\\:fsrc\\:0').prop('checked',false); } }); */ $('input[name="jobSearchForm:flg"]').change(); $(document).on('click', '#searchButton', function() { if ($(this).parents("section#search-input-content").hasClass("show-advance-search")) { //console.log('advance search'); //alert('advance search'); $('#searchButtonAdvance').click(); } else { //console.log('normal search'); //alert('normal search'); if ($(this).parents("#jobSearchBar")) { //console.log('jobsearch form'); adobeDataLayer.push({ "event": "customclick", "link": { "customCall":"ESDC:EDSC:JobBank Job Search Click" } }); //return false; } sessionStorage.scrollTop = ''; return true; } return false; }); //Toggle checkbox for fper $(document).on('click', '#jobSearchForm\\:fper input:checkbox', function() { var fper = $('#jobSearchForm\\:fper input:checkbox'); var checked = $(this).is(':checked'); fper.prop('checked',false); if(checked) { $(this).prop('checked',true); } }); /* $('.tt-input').blur(function(event) { let menuLength = $('.tt-dataset-ta-communitysuggest > p').length if(event.keyCode == 13 && menuLength == 1) { $('.tt-dataset-ta-communitysuggest p:first-child').first()[0].click() } }); */ $('button.command-advance-search-clear').click( function(){ $('#search-module').get(0).reset(); $('#search-module input[type=checkbox]').removeAttr('checked'); $('#search-module input[type=radio]').removeAttr('checked'); $('#search-module select').val(""); $('#search-module input[name=pcode').val(""); }); //GA $('#homePage').submit(function(){ if (_gaq != undefined) { _gaq.push(['_trackEvent', 'jobSearch', 'source : homePage', $(".searchString").val()]); } }); $('#jobSeekersPage').submit(function(){ if (_gaq != undefined) { _gaq.push(['_trackEvent', 'jobSearch', 'source : jobSeekersPage', $(".searchString").val()]); } }); /* $('#jobSearchResultsJobSearchForm').submit(function(){ if (typeof _gaq !== 'undefined') if (!$("#cityPostalCodeInput").length) { //alert('GAQ title: '+$("#searchString").val()); _gaq.push(['_trackEvent', 'jobSearch', 'source : jobSearchResultsPage', $("#searchString").val()]); } }); */ $('#jobPostingPage').submit(function(){ if (typeof _gaq !== 'undefined') { _gaq.push(['_trackEvent', 'jobSearch', 'source : jobPostingPage', $(".searchString").val()]); } }); // Advanced search $('#search-module').submit(function(){ var advancedSearchTitle = $("#dkw").val(); var advancedSearchLocation = $("#cityPostalCodeInput").val(); var advancedSearchEmployer = $("#empl").val(); //alert('GAQ title: '+advancedSearchTitle+'\nGAQ location: '+advancedSearchLocation+'\nGAQ employer: '+advancedSearchEmployer); if (_gaq != undefined) { _gaq.push(['_trackEvent', 'advancedSearchTitle', 'source : advancedSearchPage', advancedSearchTitle]); _gaq.push(['_trackEvent', 'advancedSearchLocation', 'source : advancedSearchPage', advancedSearchLocation]); _gaq.push(['_trackEvent', 'advancedSearchEmployer', 'source : advancedSearchPage', advancedSearchEmployer]); } }); // Modified CSJ search - For mobile app compatibility /* $('#youthPage, #jobSearchResultsJobSearchForm.csj').submit(function(){ var jobTitle = $("#searchString").val(); var jobTitlePseudo = $("#searchStringPseudo").val(); var location = $("#cityPostalCodeInput").val(); if (localStorage) { if ($("#cityPostalCodeInput").length) { //alert('CSJ search!'); var replaceDuplicateLocation = location; var replaceDuplicateLocationString = new RegExp(replaceDuplicateLocation,"g"); var newSearchStringPseudo = jobTitlePseudo.replace(replaceDuplicateLocationString, ''); var newSearchString = jobTitle.replace(location, ''); if ($(this).attr('id') === 'youthPage') { //alert('This is Youth Page CSJ search!'); localStorage.removeItem('youthSearchLocation'); localStorage.setItem('youthSearchLocation', location); localStorage.setItem('fromYouthPage', JSON.stringify(true)); } if ($(this).attr('id') === 'jobSearchResultsJobSearchForm') { //alert('This is search results CSJ!'); localStorage.removeItem('youthSearchLocation'); localStorage.setItem('youthSearchLocation', location); localStorage.setItem('fromYouthPage', JSON.stringify(false)); } $('#searchString').val($.trim(newSearchStringPseudo+' '+location)); $("#cityPostalCodeInput").attr("disabled", "disabled"); $("#searchStringPseudo").attr("disabled", "disabled"); } } }); */ // Modified Volunteer search - For mobile app compatibility $('#volunteerPage, #jobSearchResultsJobSearchForm.volunteer').submit(function(){ //alert('Volunteer job - Submit'); var jobTitle = $(".searchString").val(); //var jobTitlePseudo = $("#searchStringPseudo").val(); var location = $("#cityPostalCodeInput").val(); if (localStorage) { if ($("#cityPostalCodeInput").length) { //alert('Volunteer search!'); //var replaceDuplicateLocation = location; //var replaceDuplicateLocationString = new RegExp(replaceDuplicateLocation,"g"); //var newSearchStringPseudo = jobTitlePseudo.replace(replaceDuplicateLocationString, ''); //var newSearchString = jobTitle.replace(location, ''); if ($(this).attr('id') === 'volunteerPage') { //alert('This is Volunteer Landing Page search!'); localStorage.removeItem('volunteerSearchLocation'); localStorage.setItem('volunteerSearchLocation', location); localStorage.setItem('fromVolunteerPage', JSON.stringify(true)); } if ($(this).attr('id') === 'jobSearchResultsJobSearchForm') { //alert('This is search results Volunteer!'); localStorage.removeItem('volunteerSearchLocation'); localStorage.setItem('volunteerSearchLocation', location); localStorage.setItem('fromVolunteerPage', JSON.stringify(false)); } $('.searchString').val(location); $("#cityPostalCodeInput").attr("disabled", "disabled"); //$("#searchStringPseudo").attr("disabled", "disabled"); } } }); /* Store the window width */ var windowWidth = $(window).width(); var resizeUI; /* Resize Event */ $(window).resize(function(){ // Check window width has actually changed and it's not just iOS triggering a resize event on scroll if ($(window).width() != windowWidth) { //console.log('Resize UI updated'); // Update the window width for next time windowWidth = $(window).width(); clearTimeout(resizeUI); resizeUI = setTimeout(resetUI, 400); } }); function resetUI() { //Mobile if ($('.results-filter-button-overlay').css('position') === 'fixed') { //console.log('#Mobile mode on!'); //resetSearchOverlay(); if (!$('#header-search').hasClass('search-visible')) { resetSearchOverlay(); resetDynamicFilter(); //$('#cityPostalCodeSpecial').removeClass('wb-inv'); } if (localStorage) { //Reset Filters no matter what if (localStorage.getItem('functionResultFilter') === 'active' ) { //console.log('#ResetUI: functionResultFilter ACTIVE'); $('.command-result-filter-overlay').removeClass('active').attr('aria-expanded','true');; $('.results-content').removeClass('filter-visible').addClass('filter-hide'); //$('.command-result-filter-overlay').html('<span class="fal fa-sliders-h" aria-hidden="true"></span> Filtres'); if (!$('.command-result-filter-overlay').hasClass('options')) { $(this).html('<span class="fal fa-sliders-h" aria-hidden="true"></span> Filtres'); } else { $(this).html('<span class="fal fa-sliders-h" aria-hidden="true"></span> Options'); } localStorage.setItem('functionResultFilter', 'disabled'); } else if (localStorage.getItem('functionResultFilter') === 'disabled' ) { //console.log('#ResetUI: functionResultFilter DISABLED'); $('.command-result-filter-overlay').removeClass('active').attr('aria-expanded','true');; $('.results-content').addClass('filter-hide').removeClass('filter-visible'); //$('.command-result-filter-overlay').html('<span class="fal fa-sliders-h" aria-hidden="true"></span> Filtres'); /* if (!$('.command-result-filter-overlay').hasClass('options')) { $(this).html('<span class="fal fa-sliders-h" aria-hidden="true"></span> Filtres'); } else { $(this).html('<span class="fal fa-sliders-h" aria-hidden="true"></span> Options'); } */ } // Sort by if (localStorage.getItem('functionSortBy') === null) { //First time user //console.log('sort null'); resetSortBy(); } else { if (localStorage.getItem('functionSortBy') === 'active' ) { activateSortBy(); //console.log('sort active'); } else if (localStorage.getItem('functionSortBy') === 'disabled' ) { if (!$('#header-search').hasClass('search-visible')) { resetSortBy(); //$('#cityPostalCodeSpecial').removeClass('wb-inv'); } //console.log('sort disabled'); } } } setTimeout(filterTaller, 300); } //Desktop if ($('.results-filter-button-overlay').css('position') === 'relative') { //console.log('#Desktop mode on!'); if (localStorage) { if (localStorage.getItem('functionResultFilter') === null) { //First time user localStorage.setItem('functionResultFilter', 'active'); showFilter(); } else { if (localStorage.getItem('functionResultFilter') === 'active' ) { //console.log('filter active!'); showFilter(); } else if (localStorage.getItem('functionResultFilter') === 'disabled' ) { //console.log('filter inactive!'); showFilter(); } } // Sort by if (localStorage.getItem('functionSortBy') === null) { //First time user resetSortBy(); } else { if (localStorage.getItem('functionSortBy') === 'active' ) { resetSortBy(); } else if (localStorage.getItem('functionSortBy') === 'disabled' ) { resetSortBy(); } } if (!$('#header-search').hasClass('search-visible')) { //console.log('ok header offf'); //$('#cityPostalCodeSpecial').addClass('wb-inv'); } } else { $('.results-content').addClass('filter-visible').removeClass('filter-hide'); if ($('.results-list-wrapper').hasClass("col-md-12")) { $('.results-list-wrapper').removeClass('col-md-12').addClass('col-md-9'); } // Sort by resetSortBy(); } resetSortBy(); resetSearchOverlay(); resetDynamicFilter(); setTimeout(filterTaller, 300); //showFilter(); } if ($('.results-content').hasClass('filter-hide')) { //console.log('#Desktop mode: filter-hide'); $("#results-filter-wrapper").addClass("invisible"); } else if ($('.results-content').hasClass('filter-visible')) { //console.log('#Desktop mode: filter-visible'); $("#results-filter-wrapper").removeClass("invisible"); } } //Mobile - Search Overlay Button $(document).on('click', '.command-search-overlay', function(event) { //console.log('search mobile CLICK'); hideFilter(); $("body").toggleClass("noScroll"); $('#header-search').toggleClass('search-visible'); $('main').toggleClass('search-visible'); $('.command-search-overlay').toggleClass('active'); $('.command-search-overlay').toggleClass('btn-primary btn-default'); resetSortBy(); if ($('#header-search').hasClass("search-visible")) { //$('#cityPostalCodeSpecial').removeClass('wb-inv'); if ($('.searchString').length) { $('.searchString').focus(); } /* if ($('#searchStringPseudo').length) { $('#searchStringPseudo').focus(); } */ $('.results-filter-button-overlay, .search-input-content').addClass('noBorder'); //console.log('search mobile SHOW!'); $(this).find('.text').text("Fermer"); $(this).find('.far').removeClass('fa-search').addClass('fa-times'); } else { if (!$('#cityPostalCodeSpecial').hasClass('wb-inv')) { //console.log('huh'); $('#cityPostalCodeSpecial').addClass('wb-inv'); } $('.results-filter-button-overlay, .search-input-content').removeClass('noBorder'); //console.log('search mobile HIDE!'); $(this).find('.text').text("Chercher"); $(this).find('.far').removeClass('fa-times').addClass('fa-search'); } //$('html, body').animate({ scrollTop: $('#jobSearchBar').offset().top }, '500'); return false; //e.preventDefault(); }); //Activate Filter $(document).on('click', '.command-result-filter-overlay', function(event) { var filterButton = $(this); resetSearchOverlay(); resetSortBy(); var courseSearch = false; if (courseSearch) { checkSelectedFilter(); } $("body").removeClass("noScroll"); $(this).toggleClass('active'); if ($(this).hasClass('active')) { sessionStorage.scrollTop = $(window).scrollTop(); //console.log('Scroll position: '+$(window).scrollTop()); } $('.results-content').toggleClass('filter-visible filter-hide'); if ($('.command-result-sortby-overlay').hasClass("active")) { $('.results-filter-button-overlay').addClass('noBorder'); } else { $('.results-filter-button-overlay').removeClass('noBorder'); } if ($('.results-content').hasClass('filter-visible')) { $(this).attr('aria-expanded','true'); //console.log('Display Filter!'); $('.skip-to-filters').show(); if ($('.results-filter-button-overlay').css('position') === 'fixed') { if ($(this).parent('.results-filter-button-overlay')) { //console.log('mobile go to filter top'); $('html, body').animate({ scrollTop: $('#results-filter-wrapper').offset().top }, 'fast'); } } if (localStorage) { //console.log('#Activate filter button: functionResultFilter active'); localStorage.setItem('functionResultFilter', 'active'); } } else if ($('.results-content').hasClass('filter-hide')) { $(this).attr('aria-expanded','false'); $('.skip-to-filters').hide(); if ($('.results-filter-button-overlay').css('position') === 'fixed') { if ($(this).parent('.results-filter-button-overlay')) { //console.log('!No filter - mobile go to result top'); if (sessionStorage.scrollTop != "undefined") { $(window).scrollTop(sessionStorage.scrollTop); //console.log('Old scroll position: '+$(window).scrollTop()); } //$('html, body').animate({ scrollTop: $('#results-list-content').offset().top }, 'fast'); } } if (localStorage) { //console.log('#Activate filter button: functionResultFilter disabled'); localStorage.setItem('functionResultFilter', 'disabled'); } } setTimeout(function(){ if ($('.results-content').hasClass('filter-hide')) { $("#results-filter-wrapper").addClass("invisible"); } else if ($('.results-content').hasClass('filter-visible')) { $("#results-filter-wrapper").removeClass("invisible"); } }, 200); $('.results-list-wrapper').removeClass('noanim'); $('.results-list-wrapper').toggleClass('col-md-12 col-md-9'); setTimeout(filterTaller, 300); }); //Activate Sort By $(document).on('click', '.command-result-sortby-overlay', function(event) { resetSearchOverlay(); hideFilter(); $("body").removeClass("noScroll"); $('main').toggleClass('sortby-visible'); $('.command-result-sortby-overlay').toggleClass('active'); if ($('.command-result-sortby-overlay').hasClass("active")) { if ($('.results-sortby-group').css('display') === 'none') { //console.log('.results-sortby-group is currently hidden'); //console.log('.results-sortby-group SHOW!'); localStorage.setItem('functionSortBy', 'active'); $('.results-filter-button-overlay').addClass('noBorder'); $('.results-sortby-group').addClass('sortby-group-visible'); } } else { if ($('.results-sortby-group').css('display') === 'block') { //console.log('.results-sortby-group HIDE!'); localStorage.setItem('functionSortBy', 'disabled'); $('.results-filter-button-overlay').removeClass('noBorder'); $('.results-sortby-group').removeClass('sortby-group-visible'); } } }); $(document).on('click', '.results-sortby-group a.btn', function(event) { localStorage.setItem('functionSortBy', 'disabled'); }); $(document).on('click', '.overlay', function(event) { if ($(this).css('visibility') === 'visible') { resetSearchOverlay(); resetSortBy(); } }); setTimeout(filterTaller, 300); //Reset for Input Ranger Slider $('#jobSearchResultsJobSearchForm').submit( function(){ if (localStorage) { localStorage.setItem('functionSearchSubmit', 'true'); } }); //Input Ranger Slider Ouput Events if (localStorage) { if(!localStorage.getItem("functionRangeSliderOuputValue")){ var id,val; } else { if(!localStorage.getItem("functionSearchSubmit")){ //var id = localStorage.getItem('functionRangeSliderOuputID'); //var val = localStorage.getItem('functionRangeSliderOuputValue'); //$('#'+id).val(val); //Rely on JSF param var id,val; } else { if(localStorage.getItem("functionSearchSubmit") === 'true'){ localStorage.removeItem("functionRangeSliderOuputValue"); localStorage.removeItem("functionSearchSubmit"); } } } } //Input Range event var timeoutHandler = window.setTimeout(function() {;},1); activateRangeSlider(); //Floating label $('.float-input').on('focus blur change', function (e) { $(this).parents('.related-group').prev('label.control-label').find('.label').removeClass('focus-error').toggleClass('focus', (e.type === 'focus' || this.value.length > 0 )); if($(this).val()!=""){ //console.log('value'); $(this).parents('.related-group').prev('label.control-label').find('.label').removeClass('focus-error').addClass('focus', (e.type === 'focus' || this.value.length > 0 )); } else { //console.log('empty'); } }).trigger('focus blur change'); $('.float-input').on('focus blur change'); //event tracking for search $('#search-module').submit(function(e){ var label = []; //console.log(label); //check what the advanced search is about if($(".searchString").val()) label.push("Keyword"); if($("#pcode").val()) label.push("Job Number"); var flg = document.getElementsByName('flg'); for (var i = 0, length = flg.length; i < length; i++) { if (flg[i].checked) { label.push("Language"); break; } } var fper = document.getElementsByName("fper"); for (var i = 0, length = fper.length; i < length; i++) { if (fper[i].checked) { label.push("Period of Employment"); break; } } var fter = document.getElementsByName("fter"); for (var i = 0, length = fter.length; i < length; i++) { if (fter[i].checked) { label.push("Job Type"); break; } } var fss = document.getElementsByName("fss"); for (var i = 0, length = fss.length; i < length; i++) { if (fss[i].checked) { label.push("Education Level"); break; } } var fsrc = document.getElementsByName('fsrc'); for (var i = 0, length = fsrc.length; i < length; i++) { if (fsrc[i].checked) { label.push("Federal Jobs Filter"); break; } } var fjsf = document.getElementsByName('fjsf'); if(fjsf[0].checked) label.push("Student Job Filter"); var fet = document.getElementsByName('fet'); if(fet[0].checked) label.push("Non-Placement Agency Filter"); //var fgff = document.getElementsByName('fgff'); //if(fgff[0].checked) label.push("Government Funded Jobs Filter"); var fprov = document.getElementsByName("fprov"); for (var i = 0, length = fprov.length; i < length; i++) { if (fprov[i].checked) { label.push("PTs and Regions"); break; } } var fcat = document.getElementsByName("fcat"); for (var i = 0, length = fcat.length; i < length; i++) { if (fcat[i].checked) { label.push("Job Categories"); break; } } if($("select[name=fn]").val()) label.push("Job Titles"); //format result (always +',' to keep things as they are since the error was made at the begining...) var results = ''; for(var i=0,len=label.length;i<len;i++){ results+=label[i]+', '; } //push event _gaq.push(['_trackEvent', 'jobSearch', 'source : advancedSearchPage', results]); //console.log(results); }); // Economic Regions list is hidden by default $(".geoarea_list").hide(); // Show Economic Regions belonging to a P/T when this P/T is select $('input.select-pt').change(function() { if($(this).is(':checked')) { //console.log('Checked Province'); $(this).parent().find('.geoarea_list').show(); $(this).next('label').children('i').addClass('fa-minus-square').removeClass('fa-plus-square'); if ($(this).parent().find('.geoarea_list').find('input[id^="box-fgeo-"]').is(':checked')) { $(this).prop('checked', true); $(this).parent().find('.geoarea_list').find('input[id^="box-fgeo-"]').prop('checked', false); } } else { //console.log('Unchecked Province'); $(this).parent().find('.geoarea_list').hide(); $(this).next('label').children('i').addClass('fa-plus-square').removeClass('fa-minus-square'); if ($(this).parent().find('.geoarea_list').find('input[id^="box-fgeo-"]').is(':checked')) { //console.log('Cities are already checked!'); $(this).prop('checked', false); //console.log('Uncheck province!'); } } }); // Uncheck P/T when a Economic Region inside the P/T is selected $('input[id^="box-fgeo-"]').change(function() { //console.log('Cities Checked then Unchecked Province'); $(this).parents('.geoarea_list').parent().find('input.select-pt').prop('checked', false); }); var itself; $('.btn-apply').click( function() { externalJobLink(); $('#external-job-show').addClass('hide'); //var itself = false; }); //Apply $('#external-job-show').click( function(){ var itself = true; externalJobLink(); $('#external-job-show').addClass('hide'); return false; }); /* function externalJobLink() { if (!itself == true) { $('#external-job-details').attr('open',''); } $('#externalJobLink').animate({opacity:1}, 0, function(){ $(this).addClass('animated bounceIn'); setTimeout(function(){ $('#externalJobLink').focus(); }, 900); }); } */ /* Uh new Firefox supports details :O */ $('details summary').click( function() { setTimeout(filterTaller, 10); }); //Adjust height of the result page on hover $(".resultJobItem.jobSearchItem .results-nav").hover(function() { setTimeout(filterTaller, 10); }); $(document).on('click', '.resultJobItem', function() { sessionStorage.scrollTop = $(window).scrollTop(); //console.log('Open job - scroll position: '+$(window).scrollTop()); //$(this).trigger('click'); //return false; }); //Favourites button on search results page /* $('a.favourite').not('.jobposting').click( function(e) { if (!$(this).hasClass('saved')) { var removeUrl = $(this).attr('href').replace('addfavourite', 'removefavourite'); $(this).attr('href', removeUrl); $(this).addClass('saved'); $(this).find('.wb-inv').text("Offres favorites"); } else { var addUrl = $(this).attr('href').replace('removefavourite', 'addfavourite'); $(this).attr('href', addUrl); $(this).removeClass('saved'); $(this).find('.wb-inv').text("Sauvegarder l’offre d’emploi"); } //e.preventDefault(); //Comment this line if default action needs to go through }); */ setTimeout(filterTaller, 300); /* $("[name='problem']").change( function() { var problemValue = $(this).val(); var redirectFormValue; if (problemValue === 'problem_employer') { redirectFormValue = "/support/reportproblemform" } else { redirectFormValue = "../jobsearch/" } $('#reportProblemJobPosting').attr('action', redirectFormValue); }); $('#reportProblemJobPosting .command-submit-pjp').click(function(){ $('#reportProblemJobPosting').submit(); }); */ //Report a problem with this job posting $(document).on('click', '.btn-report', function() { $('.job-posting-detail-common .gc-rprt-prblm-frm .options').removeClass('show').addClass('hide'); $('.job-posting-detail-common .gc-rprt-prblm-frm input[type=radio]').prop('checked', false); $('.job-posting-detail-common .gc-rprt-prblm-frm .options input[type=checkbox]').prop('checked', false); $('.job-posting-detail-common .gc-rprt-prblm-frm .options input[type=text]').val(''); ///$('.job-posting-detail-common .gc-rprt-prblm-frm .btn-submit').addClass('disabled').prop("disabled", true); }); //Radio options $('.job-posting-detail-common .gc-rprt-prblm-frm input[type=radio]').change( function() { var toggleOptions = $(this).data('reveal'); if($(this).is(':checked')) { $('.job-posting-detail-common .gc-rprt-prblm-frm .options').not(this).removeClass('show').addClass('hide'); $('.job-posting-detail-common .gc-rprt-prblm-frm .options input[type=checkbox]').prop('checked', false); $('.job-posting-detail-common .gc-rprt-prblm-frm .options input[type=text]').val(''); $('.job-posting-detail-common .gc-rprt-prblm-frm fieldset .form-group.options .other-textbox').val(''); $(toggleOptions).removeClass('hide').addClass('show'); if (!$(this).hasClass('hasOptions')) { //console.log('Radio selected'); //console.log('Enable submit button'); $('.job-posting-detail-common .gc-rprt-prblm-frm .btn-submit').prop("value", "Signaler"); ///$('.job-posting-detail-common .gc-rprt-prblm-frm .btn-submit').removeClass('disabled').prop("disabled", false); } else { //console.log('Radio selected with reveal more'); //console.log('Disable submit button'); $('.job-posting-detail-common .gc-rprt-prblm-frm .btn-submit').prop("value", "Soumettre"); ///$('.job-posting-detail-common .gc-rprt-prblm-frm .btn-submit').addClass('disabled').prop("disabled", true); } } }); //Checkbox options $('.job-posting-detail-common .gc-rprt-prblm-frm .options input[type="checkbox"]').change( function() { //console.log('checkboxes function!'); //var checkedBoxes = $('.job-posting-detail-common .gc-rprt-prblm-frm .options input[type="checkbox"]').is(':checked'); var checkedBoxes = $('.job-posting-detail-common .gc-rprt-prblm-frm .options input[type="checkbox"]').is(':checked'); var checkedBoxesReveal = $('.job-posting-detail-common .gc-rprt-prblm-frm .options input.reveal[type="checkbox"]').is(':checked'); if ($(this).data('reveal')) { //console.log('@@@@@@@@@@@@@@@@@@@@@@@@@@'); //console.log('Checkbox with reveal more'); var toggleOptions = $(this).data('reveal'); // Check other checked boxes if ($(checkedBoxes)) { //console.log('1 - OTHER checkboxes are checked'); //console.log('OTHER checkboxes are checked & enable submit'); //$('.job-posting-detail-common .gc-rprt-prblm-frm .btn-submit').removeClass('disabled').prop("disabled", false); ///$('.job-posting-detail-common .gc-rprt-prblm-frm .btn-submit').removeClass('disabled').prop("disabled", false); } else { //console.log('No other checkboxes are checked'); //$('.job-posting-detail-common .gc-rprt-prblm-frm .btn-submit').addClass('disabled').prop("disabled", true); ///$('.job-posting-detail-common .gc-rprt-prblm-frm .btn-submit').removeClass('disabled').prop("disabled", false); } // Checkbox with reveal is checked if ($(this).is(':checked')) { //console.log('Checkbox checked with text input & disabled submit'); $(toggleOptions).removeClass('hide').addClass('show'); $('.job-posting-detail-common .gc-rprt-prblm-frm .btn-submit').addClass('disabled').prop("disabled", true); $(this).parents('.checkbox').next('.options').find('.other-textbox').focus(); $(this).parents('.checkbox').next('.options').find('.other-textbox').on('keyup blur focus changes', function() { if (!$(this).val()) { ///$('.job-posting-detail-common .gc-rprt-prblm-frm .btn-submit').addClass('disabled').prop("disabled", true); //console.log('Textarea is empty & disable submit'); } else { //console.log('Textarea has text & enable submit'); ///$('.job-posting-detail-common .gc-rprt-prblm-frm .btn-submit').removeClass('disabled').prop("disabled", false); } }); } else { //console.log('Checkbox reveal UNchecked'); $(this).parents('.checkbox').next('.options').find('.other-textbox').val(''); $(toggleOptions).removeClass('show').addClass('hide'); //$('.job-posting-detail-common .gc-rprt-prblm-frm .btn-submit').addClass('disabled').prop("disabled", true); } } else { //console.log('============================='); //console.log('Solo Checkbox'); if ($('.job-posting-detail-common .gc-rprt-prblm-frm .options input[type="checkbox"]').is(':checked')) { //console.log('OTHER checkboxes are checked'); if ($('.job-posting-detail-common .gc-rprt-prblm-frm .options input.reveal[type="checkbox"]').is(':checked')) { //console.log('reveal is checked'); if (!$(this).parents('.options').find('.options').find('.other-textbox').val() == '') { //console.log('Text!'); ///$('.job-posting-detail-common .gc-rprt-prblm-frm .btn-submit').removeClass('disabled').prop("disabled", false); } else { //console.log('NO Text!'); ///$('.job-posting-detail-common .gc-rprt-prblm-frm .btn-submit').addClass('disabled').prop("disabled", true); } } else { //console.log('No reveal is checked'); ///$('.job-posting-detail-common .gc-rprt-prblm-frm .btn-submit').removeClass('disabled').prop("disabled", false); } } else { //console.log('NO Checkboxes AT ALL!'); ///$('.job-posting-detail-common .gc-rprt-prblm-frm .btn-submit').addClass('disabled').prop("disabled", true); } if ($("#topic_20").is(':checked')){ if( (!checkedBoxes) || $('.other-textbox-20').val().length < 5){ ///$('.job-posting-detail-common .gc-rprt-prblm-frm .btn-submit').addClass('disabled').prop("disabled", true); } else { ///$('.job-posting-detail-common .gc-rprt-prblm-frm .btn-submit').removeClass('disabled').prop("disabled", false); } } } }).change(); //$('.job-posting-detail-common .gc-rprt-prblm-frm .options input[type="checkbox"]').change(); $('.other-textbox-20').on('keyup', function(){ var checkedBoxes = $('.job-posting-detail-common .gc-rprt-prblm-frm .options input[type="checkbox"]').is(':checked'); if ((!checkedBoxes) || ($('.other-textbox-20').val().length < 5)) { ///$('.job-posting-detail-common .gc-rprt-prblm-frm .btn-submit').addClass('disabled').prop("disabled", true); } else { ///$('.job-posting-detail-common .gc-rprt-prblm-frm .btn-submit').removeClass('disabled').prop("disabled", false); } }); $(document).on('click', '#toggleRecentSearch', function(event) { if ($(this).parent().is('#recent-search')) { $(this).parent().toggleClass('show'); $(this).toggleClass('active'); } if ($(this).parent().hasClass('show')) { $('.listRecentSearch li a').first()[0].focus(); } return false; }); }); function saveLoginRedirectURIListener(e) { var jobid = $(e).data("jobid"); var redirect = '/jobsearch/addfavourite/'+jobid; sessionStorage.removeItem('loginRedirectURI'); sessionStorage.setItem('loginRedirectURI', redirect); //alert('redirect is: '+redirect); //console.log('favourite - non-logged in and guest'+ redirect); //return false; } function saveLoginRedirectURIListenerGeneric(e) { var redirect = ''+$(e).data("redirect"); sessionStorage.removeItem('loginRedirectURI'); sessionStorage.setItem('loginRedirectURI', redirect); //alert('redirect is: '+redirect); //console.log('favourite - non-logged in and guest'+ redirect); //return false; } function filterTaller() { //console.log('filterTaller'); var filterBox = $('.results-filter-wrapper').height(); var resultBox = $('.results-list-wrapper').height(); if ($('.search-input-content').css('display') === 'none') { //console.log('filterTaller display none - Mobile!'); $('section.results-content').css('height','auto'); } else { //console.log('filterTaller display block - Desktop!'); if ($('section.results-content').hasClass('filter-visible')) { if ($('.results-filter-button-overlay').css('position') === 'relative') { if (filterBox > resultBox) { //console.log('filter box is taller: '+filterBox+' result box is: '+resultBox); $('section.results-content').height(filterBox); } } if (resultBox > filterBox) { //console.log('result box is taller: '+resultBox+' filter box is: '+filterBox); $('section.results-content').css('height','auto'); } } else if ($('section.results-content').hasClass('filter-hide')) { //console.log('no filter box'); $('section.results-content').css('height','auto'); } } } //}); $(document).on( "wb-ready.wb-details", "summary", function( event ) { $(document).on('click', 'details summary', function() { setTimeout(filterTaller, 0); }); function filterTaller() { var filterBox = $('.results-filter-wrapper').height(); var resultBox = $('.results-list-content').height(); if ($('section.results-content').hasClass('filter-visible')) { if ($('.results-filter-button-overlay').css('position') === 'relative') { if (filterBox > resultBox) { //console.log('filter box is taller: '+filterBox); $('section.results-content').height(filterBox); } } if (resultBox > filterBox) { //console.log('result box is taller: '+resultBox); $('section.results-content').css('height','auto'); } } else if ($('section.results-content').hasClass('filter-hide')) { //console.log('no filter box'); $('section.results-content').css('height','auto'); } } setTimeout(filterTaller, 300); }); function saveJob(data,jobid) { //console.log('fetch'); var thisJobID = $("input[name='jobid'][value="+jobid+"]"); var thisJobIDfav = thisJobID.nextAll('.favourite'); //console.log('element ID: '+thisJobIDfav); if (data.status === 'begin') { //Start loading animation //console.log('begin'); $(thisJobIDfav).addClass('working'); } else if (data.status === 'complete') { //console.log('complete'); //End loading animation $(thisJobIDfav).removeClass('working'); /* $(thisJobIDfav).addClass('done').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){ $(thisJobIDfav).removeClass('done'); console.log('finito!'); }); */ } else if (data.status === 'success') { //console.log('Done!'); } } // favourite actions function setLoginRedirectURIFavourite(e) { //var form = $('#loginForm'); var jobid = $(e).attr("data-jobid"); var redirect = '/jobsearch/addfavourite/'+jobid; //var inputredirectURI = form.find('#loginForm\\:input-redirectURI'); //inputredirectURI.val(redirect); // Save data to sessionStorage sessionStorage.removeItem('loginRedirectURI'); sessionStorage.setItem('loginRedirectURI', redirect); //console.log('Redirect: '+redirect); } function removeArticle(e) { var article = $(e).parents('article'); article.remove(); } function toggleFavourite(e) { $(e).addClass('working'); var callingmethod = 'PUT'; if ( $(e).hasClass('saved') ) { callingmethod = 'DELETE'; } //requestObject.lang = document.documentElement.lang; $.ajax({ url: '/jbaction/FavouriteJob/'+$(e).data('jobid'), type: callingmethod, dataType: 'json', success: function(data,status) { if ($(e).hasClass('saved')) { $(e).removeClass('saved'); $(e).html('<span class="wb-inv">Ajouter aux favoris</span>'); } else { $(e).addClass('saved'); $(e).html('<span class="wb-inv">Ajoutée aux favoris</span>'); } // $(e).removeClass('working'); }, error: function( jqXHR,status) { $(e).removeClass('working'); if (jqXHR.status==401) { setLoginRedirectURIFavourite(e); var redirect = '/connexion'; window.location.href = redirect; } else if (jqXHR.status==403) { // redirect intructions var redirect = window.location.pathname; setLoginRedirectURI(redirect); // redirect var redirect = '/reg/instructions'; window.location.href = parenturl; } }, complete: function(jqXHR,status) { $(e).removeClass('working'); } }); } function recordApply(e) { $(e).addClass('working'); var callingmethod = 'PUT'; $.ajax({ url: '/jbaction/recordApply/'+$(e).data('jsjobid'), type: callingmethod, dataType: 'json', complete: function(jqXHR,status) { $(e).removeClass('working'); } }); } function actiontodataurl(e) { var dataurl = $(e).data("url"); var form = $(e).closest('form'); form.attr('action', dataurl); form.submit(); } $(document).click(function(event) { if($('#recent-search').hasClass("show")) { $('#recent-search').removeClass('show'); $("#toggleRecentSearch").removeClass('active'); //console.log('remove show'); } }); function activateRangeSlider() { $("input[type='range']").on('input change',function(e) { /* var as1 = $(e.target).attr('data-sign1'); var as2 = $(e.target).attr('data-sign2'); */ var id = $(e.target).attr('id'); var form = $(e.target).parents('form:first'); var output = form.find('.output'); var value = parseFloat($(e.target).val()); updateRangeSliderOuput(output,id,value); //console.log('range input change!'); //alert('range input change!'); }); $("input[type='range']").change(); /* $("input[type='range']").on('keypress',function(e) { var id1 = $(e.target).attr('id'); var val1 = $(e.target).val(); //alert(val1); updateRangeSliderOuput(id1,val1); }); $("input[type='range']").change(); */ $(document).on('click', '#decrease-slider-button', function(e) { var form = $(e.target).parents('form:first'); var output = form.find('.output'); var slider = form.find("input[type='range']"); var step = parseFloat(slider.attr('step')); var minvalue = parseInt(slider.attr('min')); var value = parseFloat(slider.val()); value = value-step if (value<minvalue) { value=minvalue; } slider.val(value); updateRangeSliderOuput(output,slider.attr('id'),value); //slider.change(); var querystring = form.find("#locationstring-querystring"); if ( typeof querystring !== 'undefined') { var formaction = form.attr('action'); var posQuest = formaction.indexOf("?"); if (posQuest>=0) { formaction = formaction.substring(0,posQuest); } var qstringval = querystring.val(); var newqstringval = qstringval.replace(/(^|&)d=[0-9]+(&|$)/g,'$1d='+value+'$2'); console.log("newqstringval:"+newqstringval); form.attr('action',formaction+'?'+newqstringval); } window.clearTimeout(timeoutHandler); timeoutHandler = setTimeout(function(){ form.submit(); //slider.focus(); }, 2000); }); $(document).on('click', '#increase-slider-button', function(e) { var form = $(e.target).parents('form:first'); var output = form.find('.output'); var slider = form.find("input[type='range']"); var step = parseFloat(slider.attr('step')); var maxvalue = parseInt(slider.attr('max')); var value = parseFloat(slider.val()); value = value+step if (value>maxvalue) { value=maxvalue; } slider.val(value); updateRangeSliderOuput(output,slider.attr('id'),value); //slider.change(); var querystring = form.find("#locationstring-querystring"); if ( typeof querystring !== 'undefined') { var formaction = form.attr('action'); var posQuest = formaction.indexOf("?"); if (posQuest>=0) { formaction = formaction.substring(0,posQuest); } var qstringval = querystring.val(); var newqstringval = qstringval.replace(/(^|&)d=[0-9]+(&|$)/g,'$1d='+value+'$2'); console.log("newqstringval:"+newqstringval); form.attr('action',formaction+'?'+newqstringval); } window.clearTimeout(timeoutHandler); timeoutHandler = setTimeout(function(){ form.submit(); //slider.focus(); }, 2000); }); $('input[type=range]').on('mouseup touchend', function(e) { var form = $(e.target).parents('form'); var querystring = form.find("#locationstring-querystring"); if ( typeof querystring !== 'undefined') { var slider = form.find("input[type='range']"); var value = parseFloat(slider.val()); var formaction = form.attr('action'); var posQuest = formaction.indexOf("?"); if (posQuest>=0) { formaction = formaction.substring(0,posQuest); } var qstringval = querystring.val(); var newqstringval = qstringval.replace(/(^|&)d=[0-9]+(&|$)/g,'$1d='+value+'$2'); form.attr('action',formaction+'?'+newqstringval); } window.clearTimeout(timeoutHandler); timeoutHandler = setTimeout(function(){ form.submit(); }, 1000); }); $('input[type=range]').on('keyup', function(e) { var key = e.which; // Enter key if( (key == 13) ) { var form = $(e.target).parents('form'); var querystring = form.find("#locationstring-querystring"); if ( typeof querystring !== 'undefined') { var slider = form.find("input[type='range']"); var value = parseFloat(slider.val()); var formaction = form.attr('action'); var posQuest = formaction.indexOf("?"); if (posQuest>=0) { formaction = formaction.substring(0,posQuest); } var qstringval = querystring.val(); var newqstringval = qstringval.replace(/(^|&)d=[0-9]+(&|$)/g,'$1d='+value+'$2'); form.attr('action',formaction+'?'+newqstringval); } form.submit(); return false; } return false; }); } //Input Range Slider function function updateRangeSliderOuput(output,id,val) { //console.log('slider function'); var value,label,details; //alert("ID " + id + " Value " + val); //Distance radius control if (id === "dist") { var details = '<span class="wb-inv">kilomètres : distance sélectionnée</span>'; var label = '<span class="wb-inv">Distance actuelle</span>'; var value = '<span>'+val.toLocaleString('fr-CA')+'</span>'; //var display_value = '<span aria-hidden=\'true\'>'+val+'</span>'; } /* else if (id === "salary") { var details = '<span class="wb-inv">thousand dollars is chosen</span>'; var label = '<span class="wb-inv">Current annual salary of</span>'; } */ if (localStorage) { //console.log('Function SAVED the values!'); localStorage.setItem('functionRangeSliderOuputValue', val); localStorage.setItem('functionRangeSliderOuputID', id); } //console.log('value: '+val); //Update display label //$('span[class="output amount-dist"]').html(value); output.text(val.toLocaleString('fr-CA')); } /* function toggleFavourite(e) { $(e).addClass('working'); var requestObject = new Object(); requestObject.job2Id = $(e).data("jobid"); requestObject.jsJobId = $(e).data("jobid"); requestObject.applied = 'false'; if ( $(e).hasClass('saved') ) { requestObject.methodName = 'removeFavoriteJob'; } else { requestObject.methodName = 'addFavoriteJob'; } requestObject.lang = document.documentElement.lang; $.ajax({ url: '/jobbankservlet', type: 'POST', dataType: 'json', data: { methodName : requestObject.methodName, jsJobId: $(e).data('jobid') }, success: function(data,status) { if ($(e).hasClass('saved')) { $(e).removeClass('saved'); $(e).html('<span class="wb-inv">Ajouter aux favoris</span>'); } else { $(e).addClass('saved'); $(e).html('<span class="wb-inv">Ajoutée aux favoris</span>'); } $(e).removeClass('working'); }, error: function( jqXHR,status) { $(e).removeClass('working'); if (jqXHR.status==401) { setLoginRedirectURIFavourite(e); var redirect = '/connexion'; window.location.href = redirect; } else if (jqXHR.status==403) { // redirect intructions var redirect = window.location.pathname; setLoginRedirectURI(redirect); // redirect var redirect = '/reg/instructions'; window.location.href = parenturl; } }, complete: function(jqXHR,status) { jqXHR; } }); } */ $(document).ready(function() { $('.select-and-go').on('click', function(e) { var form = $(this).parents('form:first'); var selectElement = form.find('select:first'); if (selectElement[0].value) { window.location = selectElement[0].value; } return false; }); }); //]]> </script> <script type="text/javascript"> //<![CDATA[ jQuery.extend(jQuery.easing, { easeInOutCubic: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t + b; return c/2*((t-=2)*t*t + 2) + b; } }); $(document).ready(function () { window.onscroll = function() { fixedNav() }; $window = $(window); var navbar = $(".toc-nav"); var distance = navbar.offset().top; function fixedNav() { $window.scroll(function() { if ( $window.scrollTop() >= distance ) { navbar.addClass("fixed") } else { navbar.removeClass("fixed"); } }); } function scrollToAnchor(section){ var aTag = $("a[name='"+ section +"']"); $('html,body').animate({scrollTop: aTag.offset().top - 150},'slow'); } $(".toc-list a").click(function(e) { e.preventDefault; var sID = $(this).attr("href").replace('#', ''); scrollToAnchor(sID); }); $('#jmr-search\\:source').val('fcr'); //occupation and location clear search keywords $('input#jmr-search\\:occupationInput').val(''); $('input#jmr-search\\:cityPostalCodeInput').val(''); // activate/deactive ec-occupation search button var ec_occupation_inputObject = $('#jmr-search\\:occupationInput'); if ($('#jmr-search\\:id').val() == '' ) { $('#jmr-search #jmr-submit').attr('disabled', 'disabled'); }; ec_occupation_inputObject.on('select', function() { $('#jmr-search #jmr-submit').removeAttr('disabled'); }); ec_occupation_inputObject.on('unselect', function() { $('#jmr-search #jmr-submit').attr('disabled', 'disabled'); }); }); //]]> </script> <script src="/invitation-manager/Overlay.js"></script> <script src="/invitation-manager/InvitationManager.js"></script> <script type="text/javascript">_satellite.pageBottom();</script></body> </html>