/** * XDate v0.8.2 * Docs & Licensing: http://arshaw.com/xdate/ */ var XDate=function(t,e,n,r){var u=0,i=1,o=2,s=3,a=4,c=5,f=6,g=7,d=864e5,h=["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds","Day","Year"],l=["Years","Months","Days"],T=[12,31,24,60,60,1e3,1],m=new RegExp("(([a-zA-Z])\\2*)|(\\((('.*?'|\\(.*?\\)|.)*?)\\))|('(.*?)')"),y=t.UTC,M=t.prototype.toUTCString,p=C.prototype;function C(){return function(e,n){var r,u=n.length;R(n[u-1])&&(r=n[--u],n=E(n,0,u));if(u)if(1==u){var i=n[0];i instanceof t?e[0]=new t(i.getTime()):!function(t){return"number"==typeof t}(i)?i instanceof C?e[0]=function(e){var n=new t(e[0].getTime());v(e)&&(n.toString=M);return n}(i):P(i)&&(e[0]=new t(0),e=function(e,n,r){for(var u,i=C.parsers,o=0;o=r;a--)s/=T[a],s+=L(n,!1,a)-L(t,!1,a);r==i&&(s+=12*(n.getFullYear()-t.getFullYear()))}else if(r==o){var c=t.toDate().setUTCHours(0,0,0,0),g=n.toDate().setUTCHours(0,0,0,0);s=e.round((g-c)/d)+(n-g-(t-c))/d}else s=(n-t)/[36e5,6e4,1e3,1][r-3];return s}function D(n){return r=n(u),s=n(i),a=n(o),c=new t(y(r,s,a)),f=z(b(r,s,a)),e.floor(e.round((c-f)/d)/7)+1;var r,s,a,c,f}function b(e,n,r){var u=new t(y(e,n,r));return u=z(e+1)?e+1:e}function z(e){var n=new t(y(e,0,4));return n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+6)%7),n}function N(t,e,n,s){var a=Z(L,t,s),c=Z(Y,t,s);n===r&&(n=b(a(u),a(i),a(o)));var f=z(n);s||(f=k(f)),t.setTime(f.getTime()),c(o,[a(o)+7*(e-1)])}function H(t,e,n,r,u){var i=C.locales,s=i[C.defaultLocale]||{},a=Z(L,t,u);return n=(P(n)?i[n]:n)||{},F(t,e,function(t){if(r)for(var e=(t==g?o:t)-1;e>=0;e--)r.push(a(e));return a(t)},function(t){return n[t]||s[t]},u)}function F(t,e,n,r,u){for(var i,o,s="";i=e.match(m);)s+=e.substr(0,i.index),i[1]?s+=O(t,i[1],n,r,u):i[3]?(o=F(t,i[4],n,r,u),parseInt(o.replace(/\D/g,""),10)&&(s+=o)):s+=i[7]||"'",e=e.substr(i.index+i[0].length);return s+e}function O(t,e,n,u,i){for(var o,s=e.length,a="";s>0;)(o=W(t,e.substr(0,s),n,u,i))!==r?(a+=o,s=(e=e.substr(s)).length):s--;return a+e}function W(t,n,r,d,h){var l=C.formatters[n];if(P(l))return F(t,l,r,d,h);if("function"==typeof l)return l(t,h||!1,d);switch(n){case"fff":return X(r(f),3);case"s":return r(c);case"ss":return X(r(c));case"m":return r(a);case"mm":return X(r(a));case"h":return r(s)%12||12;case"hh":return X(r(s)%12||12);case"H":return r(s);case"HH":return X(r(s));case"d":return r(o);case"dd":return X(r(o));case"ddd":return d("dayNamesShort")[r(g)]||"";case"dddd":return d("dayNames")[r(g)]||"";case"M":return r(i)+1;case"MM":return X(r(i)+1);case"MMM":return d("monthNamesShort")[r(i)]||"";case"MMMM":return d("monthNames")[r(i)]||"";case"yy":return(r(u)+"").substring(2);case"yyyy":return r(u);case"t":return A(r,d).substr(0,1).toLowerCase();case"tt":return A(r,d).toLowerCase();case"T":return A(r,d).substr(0,1);case"TT":return A(r,d);case"z":case"zz":case"zzz":return h?"Z":function(t,n){var r=t.getTimezoneOffset(),u=r<0?"+":"-",i=e.floor(e.abs(r)/60),o=e.abs(r)%60,s=i;"zz"==n?s=X(i):"zzz"==n&&(s=X(i)+":"+X(o));return u+s}(t,n);case"w":return D(r);case"ww":return X(D(r));case"S":var T=r(o);return T>10&&T<20?"th":["st","nd","rd"][T%10-1]||"th"}}function A(t,e){return t(s)<12?e("amDesignator"):e("pmDesignator")}function J(t){return!isNaN(t[0].getTime())}function L(t,e,n){return t["get"+(e?"UTC":"")+h[n]]()}function Y(t,e,n,r){t["set"+(e?"UTC":"")+h[n]].apply(t,r)}function k(e){return new t(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())}function x(e,n){return 32-new t(y(e,n,32)).getUTCDate()}function I(t){return function(){return t.apply(r,[this].concat(E(arguments)))}}function Z(t){var e=E(arguments,1);return function(){return t.apply(r,e.concat(E(arguments)))}}function E(t,e,u){return n.prototype.slice.call(t,e||0,u===r?t.length:u)}function G(t,e){for(var n=0;n RUN Code Specific to orga ['+ _fng_orga +']'); if ( _fng_orga == 'fes' ) { $fng('#page-footer .brandbox').html(' \

FORMATION EVOLUTION ET SYNERGIE

\
    \
  • https://www.fesformation.com
  • \
  • info@fesformation.com
  • \
  • 04 90 16 04 16
  • \
\ '); } else if ( _fng_orga == 'ca-argence' ) { $fng('#page-footer .brandbox').html(' \

Argence Développement
Groupe Crédit Agricole

\
    \
  • \
  • \
  • \
\ '); } else if ( _fng_orga == 'leaseplan' ) { $fng('#page-footer .brandbox').html(' \

Leaseplan

\
    \
  • https://www.leaseplan.com/
  • \
  • \
  • \
\ '); } else if ( _fng_orga == 'iparticuliers' ) { $fng('#page-footer .brandbox').html(' \

i-Particuliers

\
    \
  • https://i-particuliers.fr/
  • \
  • https://i-particuliers.fr/contact/
  • \
  • 04 76 95 15 63
  • \
\ '); } else if ( _fng_orga == 'allowa' ) { $fng('#page-footer .brandbox').html(' \

Allowa

\
    \
  • https://www.allowa.com/
  • \
  • contact@allowa.com
  • \
  • 09 70 82 35 54
  • \
\ '); } else // Tous les squarehabitat (orga = sqh-*) if ( _fng_orga.startsWith('sqh-') ) { $fng('#page-footer .brandbox').html(' \

SQUARE HABITAT

\
    \
  • https://www.squarehabitat.fr/
  • \
  • contact@squarehabitat.fr
  • \
  • \
\ '); } else if ( _fng_orga == 'carrefour' ) { $fng('#page-footer .brandbox').html(' \

Carrefour

\
    \
  • \
  • \
  • \
\ '); } else if ( _fng_orga == 'pozzo' ) { $fng('#page-footer .brandbox').html(' \

Pozzo Immobilier

\
    \
  • https://www.pozzo-immobilier.fr
  • \
  • i.pagny@pozzo.immo
  • \
  • 02 33 89 18 93
  • \
\ '); } else if ( _fng_orga == 'ca-centre-loire-immo' ) { $fng('#page-footer .brandbox').html(' \

Crédit Agricole Centre-Loire Immo

\
    \
  • \
  • \
  • \
\ '); } else if ( _fng_orga == 'fifconseil' ) { $fng('#page-footer .brandbox').html(' \

FIF Conseil

\
    \
  • https://fifconseil.fr/
  • \
  • contact@fifconseil.fr
  • \
  • 0 820 69 02 51
  • \
\ '); } else if ( _fng_orga == 'arthurimmo_com' ) { $fng('#page-footer .brandbox').html(' \

ARTHURIMMO.COM

\ \ '); } else if ( _fng_orga == 'institut_paoli_calmettes' ) { $fng('#page-footer .brandbox').html(' \

Institut Paoli-Calmettes

\
    \
  • https://www.institutpaolicalmettes.fr/
  • \
  • contact@institutpaolicalmettes.fr
  • \
  • 04 91 22 30 30
  • \
\ '); } }, 500 ); // setInterval( function () { console.log($fng.ui); }, 100); function _fng_docReady(fn) { // see if DOM is already available if (document.readyState === "complete" || document.readyState === "interactive") { // call on next available tick setTimeout(fn, 10); } else { document.addEventListener("DOMContentLoaded", fn); } } /* function _fng_loadjQueryUIAndExecute(callback) { // $fng('head').append($fng('').attr('href', '/_fng/jquery-ui/jquery-ui.min.css')); if ($fng.ui != undefined && $fng.fn.tooltip != undefined) { console.log( (new Date().getTime()-_fng_zerotime) + ' JM: jQueryUI already LOADED' ); return callback(); } // console.log( (new Date().getTime()-_fng_zerotime) + ' JM: INJECTING LOADER FOR jQuery UI' ); // $fng.getScript('/_fng/jquery-ui/jquery-ui.min.js', callback); console.log( (new Date().getTime()-_fng_zerotim) + ' JM: jQuery UI not yet loaded, wait and retry...' ); setTimeout( function () { _fng_loadjQueryUIAndExecute(callback) }, 100 ); } */ /* var g_FNG_whenjQueryUIReady_count = 0; function _fng_whenjQueryUIReady(fn) { g_FNG_whenjQueryUIReady_count++; if (g_FNG_whenjQueryUIReady_count>100) { console.log( (new Date().getTime()-_fng_zerotime) + ' JM: Too many iterations of _fng_whenjQueryUIReady. exiting...' ); return; } // see if jQueryUI is already available if ( $fng.ui != undefined && $fng.fn.tooltip != undefined ) { console.log( (new Date().getTime()-_fng_zerotime) + ' JM: jQueryUI LOADED !!!!' ); // call on next available tick setTimeout(fn, 10); } else { console.log( new Date().getTime() + ' JM: WAIT FOR jQuery UI to be loaded !!!!' ); // call on next available tick setTimeout( function() { _fng_whenjQueryUIReady(fn) }, 100 ); } } */ // DOM is loaded and ready for manipulation here _fng_docReady(function() { //alert( "DOM Loaded!\nJM a injecté du JavaScript globalement sur le site" ); console.log((new Date().getTime()-_fng_zerotime) + ' JM: in _fng_main_inject.js => DOC READY !!!!'); console.log((new Date().getTime()-_fng_zerotime) + ' JM: Do some DOM manipulation with jQuery'); // Add two useful functions to jQuery : https://stackoverflow.com/questions/11098257/jquery-move-dom-element-inside-parent $fng.fn.moveUp = function() { $fng.each(this, function() { $fng(this).after($fng(this).prev()); }); }; $fng.fn.moveDown = function() { $fng.each(this, function() { $fng(this).before($fng(this).next()); }); }; // Add changeElementType function to jQuery : https://stackoverflow.com/questions/8584098/how-to-change-an-element-type-using-jquery/8584217 $fng.fn.changeElementType = function(newType) { var attrs = {}; $fng.each(this[0].attributes, function(idx, attr) { attrs[attr.nodeName] = attr.nodeValue; }); this.replaceWith(function() { return $fng("<" + newType + "/>", attrs).append($fng(this).contents()); }); }; // Extend jQuery.fn with our new method : https://stackoverflow.com/questions/2389540/jquery-hasparent $fng.extend( $fng.fn, { // Name of our method & one argument (the parent selector) within: function( pSelector ) { // Returns a subset of items using jQuery.filter return this.filter(function(){ // Return truthy/falsey based on presence in parent return $fng(this).closest( pSelector ).length; }); } }); // ------------------ // LOGIN PAGE (START) // ------------------ if ( _fng_isLoginPage() ) { console.log((new Date().getTime()-_fng_zerotime) + ' JM: LOGIN PAGE: $session_has_timed_out='); console.log((new Date().getTime()-_fng_zerotime) + ' JM: LOGIN PAGE: $errormsg='); if ( _fngIsIE() ) { $fng('body').append("

Plateforme e-learning

Internet Explorer ne permet pas l'utilisation de votre espace formation.

Ce navigateur n'étant plus compatible avec la plupart des technologies actuelles, merci d'utiliser l'une des nombreuses alternatives disponibles parmi : Google Chrome, Microsoft Edge, Mozilla Firefox, Safari, etc...
"); } var abortLoginProcessBlock = false; // Determine if an orga, different from the current is requested for this login page. // If it is the case, we immediatly redirect to the proper orga login page before going further // It may come: // - from an '_fng_user_orga' cookie (set from within the user's space or from // the login page that was in logout confirm mode when a login with orga url param // was requested while an active session was going on), // - from Moodle's $SESSION->wantsurl session variable (when a direct course link including // an orga url param was requested and we were redirected to login to sign in before accessing to the target course ) /* // If the login page is a step before accessing a course page, // attempts a capture eventual orga and username info from target course page if ( $_fng_wantsurl.indexOf('/course/view.php')!=0 && $_fng_wantsurl.indexOf('orga=')!=0 ) { wantsOrga = ''; // TODO getorga from wantsurl document.location.search = '?orga='+wantsOrga; abortLoginProcessBlock = true; } */ if ( !abortLoginProcessBlock ) { // Already active session : in logout confirm mode if ( _fng_isLoginPageWithActiveSessionLogoutConfirmation() ) { // Set the orga coming from url param _fng_Cookies.set('_fng_user_orga', _fng_orga ); } /* // expired session mode (session échue) else if ( _fng_isLoginPageWithExpiredSessionNotice() ) { // TODO : PERFORM en AUTO LOGIN using username an pwd from cookie // PREREQUIRISITE TODO : username an pwd must be saved in cookie at initial login page access // ............... // EN FAIT on ne peut rien faire car quand la session est échue, Moodle fait immédiatement un // HTTP 303 redirect sans response coté client (donc aucune moyen d'executer du javascript) // et donc pas de moyen de stocker username et pwd depuis les url params vers des cookies. } */ else { var orgaFromCookie = _fng_Cookies.get('_fng_user_orga'); if ( orgaFromCookie != undefined ) { if ( orgaFromCookie != _fng_orga ) { console.log((new Date().getTime()-_fng_zerotime) + ' JM: LOGIN PAGE: Different orga "'+orgaFromCookie+'" detected in cookie => redirecting to orga\'s login page'); _fng_Cookies.remove('_fng_user_orga'); document.location.search = '?orga='+orgaFromCookie; abortLoginProcessBlock = true; } } } } if ( !abortLoginProcessBlock ) { // Change logo image // Cas spécial pour Square Habitat sqh.. all sqh-XYZ orga will use the same logo var logo_login_img_suffix = _fng_orga.startsWith('sqh-') ? 'sqh-' : _fng_orga; $fng('#page-login-index [role="main"] .row.justify-content-center .card-header .img-fluid').attr('src', '/_fng/img/logo_login_orga_'+logo_login_img_suffix+'.png' ); // Inject a DIV to used to display graphics/image to the left of the login form $fng('
').insertBefore('#page-login-index [role="main"] .row.justify-content-center:first'); if ( _fng_orga == 'racine' ) { $fng( '.col-sm-8 .card-header').html( 'Identification pour l\'accès à vos formations en e-learning' ); } if ( _fng_orga == 'racine-loginfng' ) { // Inject the 3 image buttons $fng('#page-login-index [role="main"]') .prepend($fng(' \
\ \
\ ')); $fng('#_fng-login-img-area') .prepend($fng(' \
\ \
\ ')); } // Trim password value in case user selected extra spaces with copy-paste $fng('#password').on( 'change', function() { console.log((new Date().getTime()-_fng_zerotime) + ' JM: Password field value changed => trimming it in case user selected extra spaces with copy-paste'); $fng(this).val( $fng(this).val().trim() ); } ); // AUTO-LOGIN if url params are specified if ( _fng_UrlParamsHasValue( 'username' ) ) { $fng('#username').val( _fng_gURL_PARAMS.username ); } if ( _fng_UrlParamsHasValue( 'pwd' ) ) { $fng('#password').val( _fng_gURL_PARAMS.pwd ); // SUBMIT login form $fng('form#login').submit(); } else if ( _fng_UrlParamsHasValue( 'otp' ) ) { $fng('#password').val( _fng_gURL_PARAMS.otp ); // Save OTP in cookie for later retrieval in change passwordpage _fng_Cookies.set( '_fng_otp', _fng_gURL_PARAMS.otp ); // SUBMIT login form $fng('form#login').submit(); } else { setTimeout( function() { $fng('#username').focus(); }, 500 ); } } } // ---------------- // LOGIN PAGE (END) // ---------------- // ---------------------------- // CHANGE PASSWORD PAGE (START) // ---------------------------- if ( _fng_isLoginPageChangePassword() ) { console.log((new Date().getTime()-_fng_zerotime) + ' JM: IN LOGIN-CHANGE-PASSWORD-PAGE'); console.log((new Date().getTime()-_fng_zerotime) + ' JM: Check if OTP password in cookie...'); var otp = _fng_Cookies.get( '_fng_otp' ); if ( otp != undefined ) { console.log((new Date().getTime()-_fng_zerotime) + ' JM: ...Yes => prefill current password field + focus on new password field...'); $fng('#id_password').val( otp ); setTimeout( function() { $fng('#id_newpassword1').focus(); }, 1000 ); _fng_Cookies.remove( '_fng_otp' ); } else { console.log((new Date().getTime()-_fng_zerotime) + ' JM: ...No => focus on current password field...'); setTimeout( function() { $fng('#id_password').focus(); }, 1000 ); } } // -------------------------- // CHANGE PASSWORD PAGE (END) // -------------------------- // ---------------------------- // FORGOT PASSWORD PAGE (START) // ---------------------------- if ( _fng_isForgotPasswordPage() ) { // Insert le mot "OU" entre les deux champs $fng( '

OU

' ).insertBefore( $fng('form.mform fieldset:eq(1)') ); // Déplace les bouton submit à droite de leur champs correspondants $fng( '#id_submitbuttonusername' ).insertAfter( '#id_username' ); $fng( '#id_submitbuttonemail' ).insertAfter( '#id_email' ); // Vide l'autre champ que valeur d'un champ change $fng('#id_username').on( 'change', function() { $fng( '#id_email' ).val( '' ); } ); $fng('#id_email').on( 'change', function() { $fng( '#id_username' ).val( '' ); } ); // Vide l'autre champ que on clique sur un des bouton submit $fng( '#id_submitbuttonemail').on( 'click', function() { $fng( '#id_username' ).val( '' ); } ); $fng( '#id_submitbuttonusername').on( 'click', function() { $fng( '#id_email' ).val( '' ); } ); $fng('#page-login-forgot_password fieldset#id_searchbyemail legend') .prepend('
Important : si cela concerne votre compte "MANAGER", veuillez faire votre demande de mot de passe "par identifiant" ➜ en cliquant ici...
'); $fng('#page-login-forgot_password fieldset#id_searchbyusername label[for="id_username"]').text('Veuillez renseigner votre identifiant'); } // -------------------------- // FORGOT PASSWORD PAGE (END) // -------------------------- // ------------------------------------------ // GLOBAL ALL PAGES (EXCEPT LOGIN!!) (START) // ------------------------------------------ if ( ! _fng_isLoginPage() ) { _fng_g_scrollBarWidth = _fng_scrollBarWidth(); // $fng( window ).resize(function() { // console.log( $fng( window ).width() + _fng_g_scrollBarWidth ); var mediaWidth = $fng( window ).width() + _fng_g_scrollBarWidth; // Si la largeur de la fenetre est inférieure ou égale à 1000px, on replie le menu if ( mediaWidth <= 1000 && _fng_isLeftMenuOpen() ) { $fng('button[data-action="toggle-drawer"]').click(); } }); // Do the following in all pages except course pages if ( ! _fng_isCoursePages() ) { // LEFT MENU: Put Accueil (Catalogue des cours) after Tableau de bord var $catalogECommerceMenuItemEl = $fng('.list-group-item[data-key="home"]').parents('li'); $catalogECommerceMenuItemEl.addClass('_fng-access-catalog'); $catalogECommerceMenuItemEl.insertAfter($fng('.list-group-item[data-key="myhome"]').parents('li')); $fng('.list-group-item[data-key="home"] .media-left .icon').removeClass('fa-home').addClass('fa-book'); // Clone menu item "tous les cours" to create an item pointing to moodle's internal catalog var $catalogMoodleMenuItemEl = $catalogECommerceMenuItemEl.clone(); $catalogMoodleMenuItemEl.find('.list-group-item[data-key="home"]').attr('data-key','_fng-moodlecatalog').attr('href','/course'); $catalogMoodleMenuItemEl.find('.media .media-body').html('Catalogue des formations en IMMOBILIER'); $catalogMoodleMenuItemEl.insertAfter($catalogECommerceMenuItemEl); $catalogECommerceMenuItemEl.addClass('_fng-catalog-type-ecommerce'); $catalogMoodleMenuItemEl.addClass('_fng-catalog-type-moodle'); } // While in course pages, hide the catalog menu item. else { var $catalogECommerceMenuItemEl = $fng('.list-group-item[data-key="home"]').parents('li'); $catalogECommerceMenuItemEl.hide(); } // TOP MENU: Insert a TOGGLE FULLSCREEN button $fng(' \ \ ').insertAfter($fng('.navbar-fhs [data-region="drawer-toggle"]')); // TOP MENU: Insert un bouton "Visite guidée" UNIQUEMENT SUR LES PAGES QUI ONT DES VISITES GUIDEES $fng(' \
\ \
\ ').insertAfter($fng('#page-my-index #toggleFullscreen')); // "BACK TO TOP" button: change chevron type $fng('#back-to-top i.fa').removeClass('fa-chevron-circle-up').addClass('fa-chevron-up'); // WONDERBOX Grosses icones en haut de page (START) // fix label of button of type "slider" $fng('.fpwonderbox .iconset a[href="#fpslider"]').contents().filter(function() { return (this.nodeType === 3 && ($fng(this).text().trim().length != 0)); }).wrap('