-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
147 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,8 @@ | |
<!-- <link rel="stylesheet" href="{{ url_for('static', filename='css/personal.css') }}"> --> | ||
<link rel="stylesheet" href="/melody/static/css/templates.css"> | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" | ||
integrity="sha512-hoalWLoI8r4UszCkZ5kL8vayOGVae1oxXe/2A4AO6J9+580uKHDO3JdHb7NzwwzK5xr/Fs0W40kiNHxM9vyTtQ==" | ||
crossorigin=""/> | ||
integrity="sha512-hoalWLoI8r4UszCkZ5kL8vayOGVae1oxXe/2A4AO6J9+580uKHDO3JdHb7NzwwzK5xr/Fs0W40kiNHxM9vyTtQ==" | ||
crossorigin="" /> | ||
<link rel="stylesheet" href="/melody/static/css/MarkerCluster.css"> | ||
<link rel="stylesheet" href="/melody/static/css/MarkerCluster.Default.css"> | ||
<link rel="stylesheet" href="/melody/static/css/leaflet-sidebar.css"> | ||
|
@@ -92,40 +92,40 @@ <h5 class="text-white op-7 pb-2"> | |
<div class="card-body nopaddingleft" id="sortable"> | ||
<span id='loader' class='lds-dual-ring hidden overlay'></span> | ||
{% for dict in datastory_data.dynamic_elements %} | ||
{% if dict.type == 'map' %} | ||
<div id="{{dict.position}}__block_field"> | ||
<h4 class="block_title">Add map</h4> | ||
<a href="#" class="trash" id="{{dict.position}}__trash" name="{{dict.position}}__trash"> | ||
<i class="far fa-trash-alt" id="{{dict.position}}__bin"></i> | ||
</a> | ||
<br> | ||
<!-- map title --> | ||
<input class='map_title' id='{{dict.position}}__map_title' type='text' | ||
name='{{dict.position}}__map_title' value='{{dict.map_title}}' | ||
placeholder='The title of the map'> | ||
<!-- data points --> | ||
<textarea class='addplaceholder_points' oninput='auto_grow(this)' | ||
name='{{dict.position}}__map_points_query' type='text' | ||
id='{{dict.position}}__map_points_query' rows='10' | ||
required>{{dict.map_points_query}}</textarea> | ||
<a onclick='rerunQuery({{dict.position}})' | ||
data-id='{{dict.position}}_rerun_query' | ||
data-run='true' href="#{{dict.position}}__map_points_query">Rerun the query</a> | ||
<!-- map preview --> | ||
<div class="map_preview_container" id="{{dict.position}}__map_preview_container"> | ||
</div> | ||
<h4 id='{{dict.position}}__addmapfilter' class='text-white'>Do you want to add a filter to the map?</h4> | ||
<p>Filters appear on the left side of the map and allow you | ||
{% if dict.type == 'map' %} | ||
<div id="{{dict.position}}__block_field"> | ||
<h4 class="block_title">Add map</h4> | ||
<a href="#" class="trash" id="{{dict.position}}__trash" name="{{dict.position}}__trash"> | ||
<i class="far fa-trash-alt" id="{{dict.position}}__bin"></i> | ||
</a> | ||
<br> | ||
<!-- map title --> | ||
<input class='map_title' id='{{dict.position}}__map_title' type='text' | ||
name='{{dict.position}}__map_title' value='{{dict.map_title}}' | ||
placeholder='The title of the map'> | ||
<!-- data points --> | ||
<textarea class='addplaceholder_points' oninput='auto_grow(this)' | ||
name='{{dict.position}}__map_points_query' type='text' | ||
id='{{dict.position}}__map_points_query' rows='10' | ||
required>{{dict.map_points_query}}</textarea> | ||
<a onclick='rerunQuery({{dict.position}})' data-id='{{dict.position}}_rerun_query' | ||
data-run='true' href="#{{dict.position}}__map_points_query">Rerun the query</a> | ||
<!-- map preview --> | ||
<div class="map_preview_container" id="{{dict.position}}__map_preview_container"> | ||
</div> | ||
<h4 id='{{dict.position}}__addmapfilter' class='text-white'>Do you want to add a filter to the | ||
map?</h4> | ||
<p>Filters appear on the left side of the map and allow you | ||
to filter out points on the map based on a SPARQL query.</p> | ||
<a class='btn btn-primary btn-border' | ||
onclick='add_field(name,"{{dict.position}}__map_points_query")' | ||
name='map_filter'>Add filter</a> | ||
<a class='btn btn-primary btn-border' | ||
onclick='add_field(name,"{{dict.position}}__map_points_query")' name='map_filter'>Add | ||
filter</a> | ||
|
||
</div> | ||
</div> | ||
|
||
{% endif %} | ||
{% if dict.type == 'map_filter' %} | ||
<div id="{{dict.position}}__block_field"> | ||
{% endif %} | ||
{% if dict.type == 'map_filter' %} | ||
<div id="{{dict.position}}__block_field"> | ||
<h4 class="block_title">Add map filter</h4> | ||
<a href="#" class="up" id="{{dict.position}}__up" name="{{dict.position}}__up"> | ||
<i class="fas fa-arrow-up" id="{{dict.position}}__arrow-up"></i> | ||
|
@@ -137,31 +137,26 @@ <h4 class="block_title">Add map filter</h4> | |
<i class="far fa-trash-alt" id="{{dict.position}}__bin"></i> | ||
</a> | ||
<br> | ||
<input class='map_filter_title' | ||
id='{{dict.position}}__map_filter_title' type='text' | ||
name='{{dict.position}}__map_filter_title' | ||
placeholder='The title of the filter' | ||
<input class='map_filter_title' id='{{dict.position}}__map_filter_title' type='text' | ||
name='{{dict.position}}__map_filter_title' placeholder='The title of the filter' | ||
value="{{dict.map_filter_title}}"> | ||
<input class='map_filter_bind_query' | ||
id='{{dict.position}}__map_filter_bind_query' | ||
type='hidden' | ||
name='{{dict.position}}__map_filter_bind_query' | ||
value='{{dict.map_filter_bind_query}}'> | ||
<input class='map_filter_bind_query' id='{{dict.position}}__map_filter_bind_query' type='hidden' | ||
name='{{dict.position}}__map_filter_bind_query' value='{{dict.map_filter_bind_query}}'> | ||
<textarea class='addplaceholder_mapfilter' oninput='auto_grow(this)' | ||
name='{{dict.position}}__map_filter_query' type='text' | ||
id='{{dict.position}}__map_filter_query' rows='6' | ||
data-bind-query='{{dict.map_filter_bind_query}}' | ||
required>{{dict.map_filter_query}}</textarea> | ||
</div> | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
|
||
|
||
{% endfor %} | ||
|
||
</div> | ||
<!-- ADD buttons --> | ||
<section class="addfieldssection col-md-12 col-lg-12 col-sm-12"> | ||
<a class="btn btn-primary btn-border" onclick="add_field(name)" name="mapWithFilters">Add | ||
<a class="btn btn-primary btn-border" onclick="add_field(name)" name="map">Add | ||
a map with filters</a> | ||
</section> | ||
</div> | ||
|
@@ -219,11 +214,11 @@ <h4 class="block_title">Add map filter</h4> | |
{% endif %} | ||
|
||
{% for dict in datastory_data.dynamic_elements %} | ||
{% if dict.type == 'map' %} | ||
<script type="text/javascript"> | ||
{% if dict.type == 'map' %} | ||
<script type="text/javascript"> | ||
var map = initMap("{{dict.position}}"); | ||
</script> | ||
{% endif %} | ||
</script> | ||
{% endif %} | ||
{% endfor %} | ||
|
||
{% endblock javascripts %} | ||
{% endblock javascripts %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters