Skip to content

Commit

Permalink
Fix gitsha querying in all examples
Browse files Browse the repository at this point in the history
  • Loading branch information
raitisbe committed Jan 29, 2019
1 parent dac420d commit f321c3e
Show file tree
Hide file tree
Showing 21 changed files with 152 additions and 46 deletions.
5 changes: 3 additions & 2 deletions components/core/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @ngdoc module
* @module hs.core
* @name hs.core
* @description Core module for whole HSLayers-NG. Contain paths to all other HS modules and dependencies (therefore it is not needed to specify them in hslayers.js file). Core module consists of Core service which keeps some app-level settings and mantain app size and panel statuses.
* @description Core module for whole HSLayers-NG. Contains paths to all other HS modules and dependencies (therefore it is not needed to specify them in hslayers.js file). Core module consists of Core service which keeps some app-level settings and mantain app size and panel statuses.
*/

if (typeof window.hslMin != 'undefined') {
Expand All @@ -25,6 +25,7 @@ if (require.config) require.config({
'ngAria': nm_path + 'angular-aria/angular-aria' + hslMin,
'ngMessages': nm_path + 'angular-messages/angular-messages' + hslMin,
'angular-material': nm_path + 'angular-material/angular-material' + hslMin,
'jquery': nm_path + 'jquery/dist/jquery' + hslMin,
ol: requirejs.s.contexts._.config.paths.ol || ((hslMin == '.min') ? nm_path + 'openlayers/dist/ol' : nm_path + 'openlayers/dist/ol-debug'),
angular: nm_path + 'angular/angular' + hslMin,
'angular-sanitize': nm_path + 'angular-sanitize/angular-sanitize' + hslMin,
Expand All @@ -37,7 +38,7 @@ if (require.config) require.config({
'angular-socialshare': nm_path +'angular-socialshare/dist/angular-socialshare' + hslMin,
'bottomSheetCollapsible': nm_path + 'angular-material-bottom-sheet-collapsible/bottomSheetCollapsible',
hammer: nm_path +'hammerjs/hammer' + hslMin,
bootstrap: requirejs.s.contexts._.config.paths.bootstrap || nm_path +'bootstrap/dist/js/bootstrap' + hslMin,
bootstrap: requirejs.s.contexts._.config.paths.bootstrap || nm_path +'bootstrap/dist/js/bootstrap.bundle' + hslMin,
draw: hsl_path + 'components/draw/draw',
d3: requirejs.s.contexts._.config.paths.d3 || nm_path + 'd3/build/d3' + hslMin,
'angular-cookies': nm_path + 'angular-cookies/angular-cookies' + hslMin,
Expand Down
9 changes: 7 additions & 2 deletions examples/3d-kml/hslayers.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
'use strict';

var hsl_path = '../../';
var gitsha = $.ajax({
var gitsha;
$.ajax({
type: "GET",
url: hsl_path + 'gitsha.js',
async: false
}).responseText;
}).done(function (response) {
gitsha = response
}).fail(function () {
gitsha = Math.random();
});

require.config({
urlArgs: 'bust=' + gitsha,
Expand Down
9 changes: 7 additions & 2 deletions examples/add-projection/hslayers.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
'use strict';

var hsl_path = '../../';
var gitsha = $.ajax({
var gitsha;
$.ajax({
type: "GET",
url: hsl_path + 'gitsha.js',
async: false
}).responseText;
}).done(function (response) {
gitsha = response
}).fail(function () {
gitsha = Math.random();
});

require.config({
urlArgs: 'bust=' + gitsha,
Expand Down
9 changes: 7 additions & 2 deletions examples/compositions/hslayers.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
'use strict';

var hsl_path = '../../';
var gitsha = $.ajax({
var gitsha;
$.ajax({
type: "GET",
url: hsl_path + 'gitsha.js',
async: false
}).responseText;
}).done(function (response) {
gitsha = response
}).fail(function () {
gitsha = Math.random();
})

require.config({
urlArgs: 'bust=' + gitsha,
Expand Down
9 changes: 7 additions & 2 deletions examples/datasources/hslayers.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
'use strict';

var hsl_path = '../../';
var gitsha = $.ajax({
var gitsha;
$.ajax({
type: "GET",
url: hsl_path + 'gitsha.js',
async: false
}).responseText;
}).done(function (response) {
gitsha = response
}).fail(function () {
gitsha = Math.random();
})

require.config({
urlArgs: 'bust=' + gitsha,
Expand Down
9 changes: 7 additions & 2 deletions examples/elf/hslayers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@

var hsl_path = '../../';
var allowWFS2 = true;
var gitsha = $.ajax({
var gitsha;
$.ajax({
type: "GET",
url: hsl_path + 'gitsha.js',
async: false
}).responseText;
}).done(function (response) {
gitsha = response
}).fail(function () {
gitsha = Math.random();
});

require.config({
paths: {
Expand Down
9 changes: 7 additions & 2 deletions examples/featureFilter/hslayers.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
'use strict';

var hsl_path = '../../';
var gitsha = $.ajax({
var gitsha;
$.ajax({
type: "GET",
url: hsl_path + 'gitsha.js',
async: false
}).responseText;
}).done(function (response) {
gitsha = response
}).fail(function () {
gitsha = Math.random();
});

require.config({
urlArgs: 'bust=' + gitsha,
Expand Down
9 changes: 7 additions & 2 deletions examples/full/hslayers.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
'use strict';

var hsl_path = '../../';
var gitsha = $.ajax({
var gitsha;
$.ajax({
type: "GET",
url: hsl_path + 'gitsha.js',
async: false
}).responseText;
}).done(function (response) {
gitsha = response
}).fail(function () {
gitsha = Math.random();
});

require.config({
urlArgs: 'bust=' + gitsha,
Expand Down
9 changes: 7 additions & 2 deletions examples/game_test/hslayers.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
'use strict';

var hsl_path = '../../';
var gitsha = $.ajax({
var gitsha;
$.ajax({
type: "GET",
url: hsl_path + 'gitsha.js',
async: false
}).responseText;
}).done(function (response) {
gitsha = response
}).fail(function () {
gitsha = Math.random();
});

require.config({
urlArgs: 'bust=' + gitsha,
Expand Down
9 changes: 7 additions & 2 deletions examples/liberecMaterial/hslayers.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
'use strict';

var hsl_path = '../../';
var gitsha = $.ajax({
var gitsha;
$.ajax({
type: "GET",
url: hsl_path + 'gitsha.js',
async: false
}).responseText;
}).done(function (response) {
gitsha = response
}).fail(function () {
gitsha = Math.random();
});

require.config({
urlArgs: 'bust=' + gitsha,
Expand Down
11 changes: 7 additions & 4 deletions examples/pilsen_traffic/hslayers.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ var hslMin = false;
var pilsenSite = false;
if(window.location.hostname.indexOf('intenzitadopravy.plzen.eu')>-1) pilsenSite = true;

var gitsha = Math.random(); $.ajax({
var gitsha;
$.ajax({
type: "GET",
dataType: 'text',
url: hsl_path + 'gitsha.js',
async: false,
success: function(r){gitsha = r}
async: false
}).done(function (response) {
gitsha = response
}).fail(function () {
gitsha = Math.random();
});

require.config({
Expand Down
9 changes: 7 additions & 2 deletions examples/routing/hslayers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@

var hsl_path = '../../';

var gitsha = $.ajax({
var gitsha;
$.ajax({
type: "GET",
url: hsl_path + 'gitsha.js',
async: false
}).responseText;
}).done(function (response) {
gitsha = response
}).fail(function () {
gitsha = Math.random();
});

require.config({
urlArgs: 'bust=' + gitsha,
Expand Down
11 changes: 8 additions & 3 deletions examples/senslog/hslayers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@

var hsl_path = '../../';

var gitsha = $.ajax({
var gitsha;
$.ajax({
type: "GET",
url: hsl_path + 'gitsha.js?t=' + Date.now(),
url: hsl_path + 'gitsha.js',
async: false
}).responseText;
}).done(function (response) {
gitsha = response
}).fail(function () {
gitsha = Math.random();
});

require.config({
urlArgs: 'bust=' + gitsha,
Expand Down
11 changes: 8 additions & 3 deletions examples/socketio/hslayers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@

var hsl_path = '../../';

var gitsha = $.ajax({
var gitsha;
$.ajax({
type: "GET",
url: hsl_path + 'gitsha.js?t=' + Date.now(),
url: hsl_path + 'gitsha.js',
async: false
}).responseText;
}).done(function (response) {
gitsha = response
}).fail(function () {
gitsha = Math.random();
});

require.config({
urlArgs: 'bust=' + gitsha,
Expand Down
11 changes: 8 additions & 3 deletions examples/split_map/hslayers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@

var hsl_path = '../../';

var gitsha = $.ajax({
var gitsha;
$.ajax({
type: "GET",
url: hsl_path + 'gitsha.js?t=' + Date.now(),
url: hsl_path + 'gitsha.js',
async: false
}).responseText;
}).done(function (response) {
gitsha = response
}).fail(function () {
gitsha = Math.random();
});

require.config({
urlArgs: 'bust=' + gitsha,
Expand Down
11 changes: 8 additions & 3 deletions examples/tracking/hslayers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@

var hsl_path = '../../';

var gitsha = $.ajax({
var gitsha;
$.ajax({
type: "GET",
url: hsl_path + 'gitsha.js?t=' + Date.now(),
url: hsl_path + 'gitsha.js',
async: false
}).responseText;
}).done(function (response) {
gitsha = response
}).fail(function () {
gitsha = Math.random();
});

require.config({
urlArgs: 'bust=' + gitsha,
Expand Down
10 changes: 8 additions & 2 deletions examples/webgl_viz/hslayers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@

var hsl_path = '../../';

var gitsha = $.ajax({
var gitsha;
$.ajax({
type: "GET",
url: hsl_path + 'gitsha.js',
async: false
}).responseText;
}).done(function (response) {
gitsha = response
}).fail(function () {
gitsha = Math.random();
});

var jans_path = 'http://home.zcu.cz/~jezekjan/webglayer-snaphsot1_1/js/'; //http://localhost:9999/js/webglayer/js/
// var jans_path = 'http://localhost:9999/js/webglayer/js/'

Expand Down
10 changes: 8 additions & 2 deletions examples/webgl_viz2/hslayers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@

var hsl_path = '../../';

var gitsha = $.ajax({
var gitsha;
$.ajax({
type: "GET",
url: hsl_path + 'gitsha.js',
async: false
}).responseText;
}).done(function (response) {
gitsha = response
}).fail(function () {
gitsha = Math.random();
});

//var jans_path = 'http://home.zcu.cz/~jezekjan/webglayer-snaphsot1_1/js/'; //http://localhost:9999/js/webglayer/js/
var jans_path = 'http://home.zcu.cz/~jezekjan/webglayer_git/js/'

Expand Down
9 changes: 7 additions & 2 deletions examples/wfs/hslayers.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
'use strict';

var hsl_path = '../../';
var gitsha = $.ajax({
var gitsha;
$.ajax({
type: "GET",
url: hsl_path + 'gitsha.js',
async: false
}).responseText;
}).done(function (response) {
gitsha = response
}).fail(function () {
gitsha = Math.random();
});

//https://github.com/tnajdek/angular-requirejs-seed
require.config({
Expand Down
10 changes: 8 additions & 2 deletions examples/wirecloud/hslayers.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
'use strict';

var hsl_path = './';
var gitsha = $.ajax({
var gitsha;
$.ajax({
type: "GET",
url: hsl_path + 'gitsha.js',
async: false
}).responseText;
}).done(function (response) {
gitsha = response
}).fail(function () {
gitsha = Math.random();
});

//https://github.com/tnajdek/angular-requirejs-seed
require.config({
urlArgs: 'bust=' + gitsha,
Expand Down
Loading

0 comments on commit f321c3e

Please sign in to comment.