Skip to content

Commit

Permalink
Fix map menu not clickable (kartoza#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimasciput authored Sep 13, 2018
1 parent 580ee73 commit 082b105
Show file tree
Hide file tree
Showing 11 changed files with 67 additions and 51 deletions.
11 changes: 8 additions & 3 deletions bims/static/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ require.config({
chartJs: 'libs/chart/Chart-2.7.2'
},
shim: {
bootstrap: {
deps: [
'jquery'
]
},
ol: {
exports: ['ol']
},
Expand All @@ -21,8 +26,7 @@ require.config({
backbone: {
deps: [
'underscore',
'jquery',
'bootstrap'
'jquery'
],
exports: 'Backbone'
},
Expand All @@ -41,11 +45,12 @@ require.config({
});

require([
'bootstrap',
'router',
'views/olmap',
'shared',
'app'
], function (Router, olmap, Shared, App) {
], function (Bootstrap, Router, olmap, Shared, App) {
// Display the map
Shared.Router = new Router();

Expand Down
83 changes: 46 additions & 37 deletions bims/static/js/optimized.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions bims/static/js/views/biodiversity_legend.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
define([
'backbone',
'underscore',
'shared'
'shared',
'jquery'
], function (
Backbone,
_,
Shared
Shared,
$
) {
return Backbone.View.extend({
template: _.template($('#biodiversity-legend').html()),
Expand Down
2 changes: 1 addition & 1 deletion bims/static/js/views/catchment_area_control.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define(['backbone', 'ol', 'shared'], function (Backbone, ol, Shared) {
define(['backbone', 'ol', 'shared', 'jquery'], function (Backbone, ol, Shared, $) {
return Backbone.View.extend({
catchmentAreaBoundaryUrl: "/api/boundary/geojson?ids=",
initialize: function () {
Expand Down
2 changes: 1 addition & 1 deletion bims/static/js/views/cluster.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define(['backbone', 'models/cluster', 'ol', 'shared'], function (Backbone, Cluster, ol, Shared) {
define(['backbone', 'models/cluster', 'ol', 'shared', 'jquery'], function (Backbone, Cluster, ol, Shared, $) {
return Backbone.View.extend({
initialize: function (options) {
this.render();
Expand Down
2 changes: 1 addition & 1 deletion bims/static/js/views/data_downloader-modal.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define(['shared', 'backbone', 'underscore', 'jqueryUi'], function (Shared, Backbone, _) {
define(['shared', 'backbone', 'underscore', 'jquery', 'jqueryUi'], function (Shared, Backbone, _, $, JqueryUI) {
return Backbone.View.extend({
template: _.template($('#download-control-panel-template').html()),
url: '/api/collection/download/',
Expand Down
2 changes: 1 addition & 1 deletion bims/static/js/views/geocontext.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define(['backbone', 'underscore', 'shared', 'ol'], function (Backbone, _, Shared, ol) {
define(['backbone', 'underscore', 'shared', 'ol', 'jquery'], function (Backbone, _, Shared, ol, $) {
return Backbone.View.extend({
geocontextUrl: _.template(
"<%= geocontextUrl %>/api/v1/geocontext/value/collection/<%= latitude %>/<%= longitude %>/<%= geocontextCollectionKey %>"),
Expand Down
4 changes: 2 additions & 2 deletions bims/static/js/views/search.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
define([
'backbone', 'underscore', 'shared', 'ol', 'noUiSlider', 'collections/search_result', 'views/search_panel'
], function (Backbone, _, Shared, ol, NoUiSlider, SearchResultCollection, SearchPanelView) {
'backbone', 'underscore', 'shared', 'ol', 'noUiSlider', 'collections/search_result', 'views/search_panel', 'jquery'
], function (Backbone, _, Shared, ol, NoUiSlider, SearchResultCollection, SearchPanelView, $) {

return Backbone.View.extend({
template: _.template($('#map-search-container').html()),
Expand Down
2 changes: 1 addition & 1 deletion bims/static/js/views/search_panel.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define(['shared', 'backbone', 'underscore', 'jqueryUi',
'views/catchment_area_control'], function (Shared, Backbone, _, jqueryUi, CatchmentAreaControl) {
'views/catchment_area_control', 'jquery'], function (Shared, Backbone, _, jqueryUi, CatchmentAreaControl, $) {
return Backbone.View.extend({
template: _.template($('#map-search-result-template').html()),
events: {
Expand Down
2 changes: 1 addition & 1 deletion bims/static/js/views/search_result.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define(['backbone', 'models/search_result', 'shared', 'underscore', 'ol'], function (Backbone, SearchResult, Shared, _, ol) {
define(['backbone', 'models/search_result', 'shared', 'underscore', 'ol', 'jquery'], function (Backbone, SearchResult, Shared, _, ol, $) {
return Backbone.View.extend({
id: 0,
data: null,
Expand Down
2 changes: 1 addition & 1 deletion bims/static/js/views/side_panel.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define(['shared', 'backbone', 'underscore', 'jqueryUi'], function (Shared, Backbone, _) {
define(['shared', 'backbone', 'underscore', 'jqueryUi', 'jquery'], function (Shared, Backbone, _, JqueryUI, $) {
return Backbone.View.extend({
template: _.template($('#side-panel-template').html()),
className: 'panel-wrapper',
Expand Down

0 comments on commit 082b105

Please sign in to comment.