Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

Commit

Permalink
Merge pull request #469 from gem/irv-version-number
Browse files Browse the repository at this point in the history
Allow the application to use the new JSON naming convention
  • Loading branch information
ben committed Sep 22, 2015
2 parents 7c845da + f69e02a commit 24f6e42
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion openquakeplatform/openquakeplatform/static/js/irv_viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,23 @@ function projDefJSONRequest(selectedLayer) {
$('#alert').remove();

// Check the svir plugin version
var versionCheck = versionCompare(data.svir_plugin_version, COMPATIBILITY_VERSION);
// Provide some backwards compatibility for old naming convention
var thisVersion = null;
if (data.hasOwnProperty('svir_plugin_version')) {
thisVersion = data.svir_plugin_version
} else if (data.hasOwnProperty('irmt_plugin_version')) {
thisVersion = data.irmt_plugin_version
} else {
$('#projectDef-spinner').hide();
$('#project-def').append(
'<div id="alert" class="alert alert-danger" role="alert">' +
'The project you are trying to load was created with a version of the SVIR QGIS tool kit that is not compatible with this application' +
'</div>'
);
return
}

var versionCheck = versionCompare(thisVersion, COMPATIBILITY_VERSION);

if (versionCheck < 0 || versionCheck == 1 ) {
// Warn the user and stop the application
Expand Down

0 comments on commit 24f6e42

Please sign in to comment.