function startVersionChecking() {
        var oneMinute = 1 * 60 * 1000;
        var timeInterval = oneMinute;
        function versionSet() {
            function thisIsTheInitialVersion(response, err) {
                if (response && response['version']) {
                    currentVersion = response.version;
                    Y.log('Project got initial version ' + currentVersion[0] + '.' + currentVersion[1]);
                }
            }
            getClientProfile(thisIsTheInitialVersion);
        }
        function versionCheck() {
            function thisIsTheLatestVersion(response, err) {
                if (response && response['version']) {
                    var version = response.version;
                    function reloadProject(arg) {
                        window.location.reload(true);
                    }
                    if (currentVersion[0] !== version[0]) {
                        // statusMessage( 'New version required - please reload', 2*timeInterval ) ;	// display twice as long
                        Y.fire('postmile:confirm', 'Reload?', 'A new version is available and required.', reloadProject, null);
                        Y.log('Project new major version required ' + version[0] + '.' + version[1]);
                    } else if (currentVersion[1] !== version[1]) {
                        // statusMessage( 'New version available' ) ;
                        // Y.fire( 'postmile:suggest', 'New version available: ' + 'Reload Now', reloadProject, null);
                        statusMessage('New version available - click this message to reload', 2 * 100 * timeInterval, reloadProject); // display twice as long
                        Y.log('Project new major version required ' + version[0] + '.' + version[1]);
                    }
                }
            }
            getClientProfile(thisIsTheLatestVersion);
        }
        versionSet();
        setInterval(versionCheck, timeInterval);
    }
// check to see if there's a new version available (minor) or required (major)
check to see if there's a new version available (minor) or required (major)
check to see if there ' s a new version available ( minor ) or required ( major )
function startVersionChecking() {
        var oneMinute = 1 * 60 * 1000;
        var timeInterval = oneMinute;
        function versionSet() {
            function thisIsTheInitialVersion(response, err) {
                if (response && response['version']) {
                    currentVersion = response.version;
                    Y.log('Project got initial version ' + currentVersion[0] + '.' + currentVersion[1]);
                }
            }
            getClientProfile(thisIsTheInitialVersion);
        }
        function versionCheck() {
            function thisIsTheLatestVersion(response, err) {
                if (response && response['version']) {
                    var version = response.version;
                    function reloadProject(arg) {
                        window.location.reload(true);
                    }
                    if (currentVersion[0] !== version[0]) {
                        Y.fire('postmile:confirm', 'Reload?', 'A new version is available and required.', reloadProject, null);
                        Y.log('Project new major version required ' + version[0] + '.' + version[1]);
                    } else if (currentVersion[1] !== version[1]) {
                        statusMessage('New version available - click this message to reload', 2 * 100 * timeInterval, reloadProject); 
                        Y.log('Project new major version required ' + version[0] + '.' + version[1]);
                    }
                }
            }
            getClientProfile(thisIsTheLatestVersion);
        }
        versionSet();
        setInterval(versionCheck, timeInterval);
    }
function startVersionChecking ( ) { var oneMinute = 1 * 60 * 1000 ; var timeInterval = oneMinute ; function versionSet ( ) { function thisIsTheInitialVersion ( response , err ) { if ( response && response [ 'version' ] ) { currentVersion = response . version ; Y . log ( 'Project got initial version ' + currentVersion [ 0 ] + '.' + currentVersion [ 1 ] ) ; } } getClientProfile ( thisIsTheInitialVersion ) ; } function versionCheck ( ) { function thisIsTheLatestVersion ( response , err ) { if ( response && response [ 'version' ] ) { var version = response . version ; function reloadProject ( arg ) { window . location . reload ( true ) ; } if ( currentVersion [ 0 ] !== version [ 0 ] ) { Y . fire ( 'postmile:confirm' , 'Reload?' , 'A new version is available and required.' , reloadProject , null ) ; Y . log ( 'Project new major version required ' + version [ 0 ] + '.' + version [ 1 ] ) ; } else if ( currentVersion [ 1 ] !== version [ 1 ] ) { statusMessage ( 'New version available - click this message to reload' , 2 * 100 * timeInterval , reloadProject ) ; Y . log ( 'Project new major version required ' + version [ 0 ] + '.' + version [ 1 ] ) ; } } } getClientProfile ( thisIsTheLatestVersion ) ; } versionSet ( ) ; setInterval ( versionCheck , timeInterval ) ; }
check to see if there's a new version available (minor) or required (major)
check to see if there ' s a new version available ( minor ) or required ( major )
// statusMessage( 'New version required - please reload', 2*timeInterval ) ;	// display twice as long // statusMessage( 'New version available' ) ; // Y.fire( 'postmile:suggest', 'New version available: ' + 'Reload Now', reloadProject, null); // display twice as long