Skip to content

Commit

Permalink
- MapLoom GIS client hooksets
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed Jul 20, 2018
1 parent 2af6c07 commit cf6965b
Show file tree
Hide file tree
Showing 43 changed files with 416,126 additions and 4,585 deletions.
22 changes: 22 additions & 0 deletions geonode/client/hooksets.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,25 @@ def map_embed_template(self, context=None):

def map_download_template(self, context=None):
return 'geonode-client/map_view.html'


class MaploomHookSet(GeoExtHookSet):

# Maps
def map_new_template(self, context=None):
return 'maploom/maps/maploom.html'

def map_view_template(self, context=None):
return 'maploom/maps/maploom.html'

def map_edit_template(self, context=None):
return 'maploom/maps/map_edit.html'

def map_update_template(self, context=None):
return 'maploom/maps/map_edit.html'

def map_embed_template(self, context=None):
return 'maploom/maps/map_view.html'

def map_download_template(self, context=None):
return 'maploom/maps/map_view.html'
4 changes: 4 additions & 0 deletions geonode/client/static/crossdomain.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*"/>
</cross-domain-policy>
23 changes: 23 additions & 0 deletions geonode/client/static/maploom/assets/MapLoom-1.5.135.css

Large diffs are not rendered by default.

411,420 changes: 411,420 additions & 0 deletions geonode/client/static/maploom/assets/MapLoom-1.5.135.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions geonode/client/static/maploom/assets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# The `src/assets` Directory

There's really not much to say here. Every file in this directory is recursively transferred to `dist/assets/`.

Binary file added geonode/client/static/maploom/assets/error.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions geonode/client/static/maploom/assets/error.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added geonode/client/static/maploom/assets/loading.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added geonode/client/static/maploom/assets/play-pause.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions geonode/client/static/maploom/assets/play-pause.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions geonode/client/static/maploom/assets/video-play.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
685 changes: 685 additions & 0 deletions geonode/client/static/maploom/fonts/fontawesome-webfont.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
228 changes: 228 additions & 0 deletions geonode/client/static/maploom/fonts/glyphicons-halflings-regular.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions geonode/client/templates/maploom/maploom/_maploom_js.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% load i18n static %}
<link rel="stylesheet" type="text/css" href="{% static 'maploom/assets/MapLoom-1.5.135.css' %}"/>
<script type="text/javascript" src="{% static 'maploom/assets/MapLoom-1.5.135.js' %}"></script>"
271 changes: 271 additions & 0 deletions geonode/client/templates/maploom/maploom/_maploom_map.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,271 @@
{% load staticfiles i18n %}{% verbatim %}
<body class="maploom-body">

<div id="map" class="map">
<div class="map-shadow"></div>
<div id="pulldown" ng-controller="LoomPulldownController">
<div id="pulldown-shadow">
<div class="panel flat" id="map-title">
<div class="panel-heading">
<em id="map-name">
<div class="map-title-text ellipsis">{{ mapService.getTitle() }}</div>
<i id="saveButton" class="glyphicon pull-right" data-target="#saveMap"
tooltip-placement="bottom" tooltip="{{'save_this_map' | translate}}" tooltip-append-to-body="true"
ng-class="{'hide': !configService.username}" data-toggle="modal"></i>
<i id="refreshButton" class="glyphicon pull-right" ng-click="refreshService.refreshLayers()"
tooltip-placement="bottom" tooltip="{{'refresh_layers' | translate}}" tooltip-append-to-body="true"></i>
</em>
<!--<span ng-class="{'hidden': !notificationsPanel}" class="loom-notification-badge pull-right"></span>-->
</div>
</div>
<div ng-show="searchEnabled" class="loom-search"></div>
<div id="pulldown-menu" class="panel-group in">
<div id="pulldown-content">
<div class="panel" ng-show="notificationsPanel" ng-controller="LoomNotificationController">
<div class="tooltip-mask" tooltip="{{notificationStartTime}}"
tooltip-append-to-body="true" tooltip-placement="right" data-toggle="collapse"
data-parent="#pulldown-content" data-target="#notification-panel"></div>
<div class="panel-heading">
<span translate="notifications_tab" >Notifications</span>
<div ng-show="addLayers" stop-event='click' ng-controller="modalToggle"
ng-click="toggleModal('#generate-notification-dialog')"
tooltip-placement="top" tooltip="{{'generate_notification' | translate}}" tooltip-append-to-body="true"
class="glyphicon glyphicon-time panel-header-button pull-right"></div>
<span class="loom-notification-badge pull-right" tooltip="{{'unread_notifications' | translate}}"
tooltip-append-to-body="true"
tooltip-placement="top"></span>
</div>
<div id="notification-panel" class="panel-collapse collapse pulldown-panel">
<div notification-empty-text="'no_notifications' | translate"
class="loom-notifications">
</div>
</div>
</div>


<div ng-show="true" class="panel">
<div class="panel-heading" data-toggle="collapse" data-parent="#pulldown-content" data-target="#measure-panel-content">
<span translate="measure">Measure</span>
</div>
<div id="measure-panel-content" class="panel-collapse collapse pulldown-panel">
<div loom-measurepanel></div>
</div>
</div>

<div class="panel" ng-show="layersPanel">
<div ng-show="registryEnabled && !unifiedLayerDialog" class="panel-heading" data-parent="#pulldown-content">
<span translate="registry">Registry</span>
<div ng-show="addLayers" stop-event='click' ng-controller="modalToggle" ng-click="toggleModal('#registry-layer-dialog')"
tooltip-placement="top" tooltip="{{'registry_layer_btn' | translate}}" tooltip-append-to-body="true"
class="glyphicon glyphicon-plus-sign panel-header-button pull-right"></div>
<div id="server-loading" class="loom-loading pull-right" spinner-radius="20" spinner-width="3" spinner-hidden="!serversLoading"></div>
</div>

<div ng-show="!unifiedLayerDialog" class="panel-heading" data-toggle="collapse" data-parent="#pulldown-content"
data-target="#layer-manager-panel">
<span translate="map_layers">Map Layers</span>
<div ng-show="addLayers" stop-event='click' ng-controller="modalToggle" ng-click="toggleModal('#add-layer-dialog')"
tooltip-placement="top" tooltip="{{'add_layer_btn' | translate}}" tooltip-append-to-body="true"
class="glyphicon glyphicon-plus-sign panel-header-button pull-right"></div>

<div id="server-loading" class="loom-loading pull-right" spinner-radius="20" spinner-width="3" spinner-hidden="!serversLoading"></div>
</div>

<div ng-show="unifiedLayerDialog" class="panel-heading" data-toggle="collapse" data-parent="#pulldown-content"
data-target="#layer-manager-panel">
<span translate="map_layers">Map Layers</span>
<div ng-show="addLayers" stop-event='click' ng-controller="modalToggle" ng-click="toggleModal('#unified-layer-dialog')"
tooltip-placement="top" tooltip="{{'add_layer_btn' | translate}}" tooltip-append-to-body="true"
class="glyphicon glyphicon-plus-sign panel-header-button pull-right"></div>

<div id="server-loading" class="loom-loading pull-right" spinner-radius="20" spinner-width="3" spinner-hidden="!serversLoading"></div>
</div>

<div id="layer-manager-panel" class="panel-collapse collapse pulldown-panel">
<div class="loom-layers"></div>
</div>
</div>

<div class="panel" ng-show="syncPanel">
<div class="panel-heading" data-toggle="collapse" data-parent="#pulldown-content"
data-target="#syncronization-panel">
<span translate="synchronization">Synchronization</span>

<div stop-event='click' ng-controller="modalToggle" ng-click="toggleModal('#configWindow')"
tooltip-placement="top" tooltip="{{'remote_options' | translate}}" tooltip-append-to-body="true"
class="glyphicon glyphicon-cog panel-header-button pull-right"></div>
</div>
<div id="syncronization-panel" class="panel-collapse collapse">
<div class="loom-synclinks"></div>
</div>
</div>
<div class="panel" ng-show="historyPanel" ng-controller="LoomHistoryController">
<div class="panel-heading fixed-height-header" data-toggle="collapse" data-parent="#pulldown-content"
data-target="#history-panel">
<span class="ellipsis pulldown-menu-title">{{title}}</span>

<div stop-event='click' ng-click="clearHistory()"
class="glyphicon glyphicon-remove pull-right panel-header-button"></div>
<div stop-event='click' ng-controller="modalToggle" ng-click="toggleModal('#historyDiffWindow')"
tooltip-placement="top" tooltip="{{'history_summary' | translate}}" tooltip-append-to-body="true"
class="glyphicon glyphicon-list-alt pull-right panel-header-button"></div>
</div>
<div id="history-panel" class="panel-collapse collapse pulldown-panel">
<div loom-history-panel></div>
</div>
</div>
<div class="panel" ng-show="diffPanel" ng-controller="LoomDiffController">
<div class="panel-heading fixed-height-header" data-toggle="collapse" data-parent="#pulldown-content"
data-target="#diff-panel">
<span class="ellipsis pulldown-menu-title">{{title}}</span>

<div ng-if="!isMerge" stop-event='click' ng-click="clearDiff()"
class="glyphicon glyphicon-remove panel-header-button pull-right"></div>
<span ng-class="{'hidden': !(numConflicts > 0)}" class="badge pull-right">{{numConflicts}}</span>
</div>
<div id="diff-panel" class="loom-diff-panel panel-collapse collapse pulldown-panel">Diffs go here.</div>
</div>
</div>
</div>
</div>
<button ng-disabled="!toggleEnabled" type="button" data-toggle="collapse" data-target="#pulldown-menu" translate="toggle_menu"
class="toggle-menu toggle btn btn-default flat-top">Toggle Menu
</button>
</div>
<div class="loom-notification-poster"></div>
<div class="loom-legend"></div>
<div class="loom-exclusive-mode"></div>
<div id="zoom-to-world-border" class="map-btn-border" tooltip-append-to-body="true"
tooltip-placement="left" tooltip="{{'zoom_world' | translate}}">
<div id="zoom-to-world" ng-click="mapService.zoomToExtent()">
<i class="glyphicon glyphicon-globe"></i>
</div>
</div>
<div id="switch-coords-border" class="map-btn-border" tooltip-append-to-body="true"
tooltip-placement="right" tooltip="{{'switch_coords' | translate}}">
<div id="switch-coords" ng-click="mapService.switchMousePosCoordFormat()">
<i class="glyphicon glyphicon-map-marker"></i>
</div>
</div>
<div id="toggle-fullscreen-border" class="map-btn-border" tooltip-append-to-body="true"
tooltip-placement="left" tooltip="{{'toggle_fullscreen' | translate}}">
<div id="toggle-fullscreen" ng-click="mapService.toggleFullscreen()">
<i class="glyphicon glyphicon-fullscreen"></i>
</div>
</div>
<div class="loom-timeline"></div>
</div>
<!--modal titles are in a lower case underscore separated format so that they can be translated-->
<div loom-modal id="unified-layer-dialog" modal-title="add_layers">
<div loom-unifiedlayers></div>
</div>
<div loom-modal id="registry-layer-dialog" modal-title="search_layers">
<div loom-registrylayers id="registry-layers"></div>
</div>
<div loom-modal id="add-layer-dialog" modal-title="add_layers">
<div loom-addlayers></div>
</div>
<div loom-modal id="add-server-dialog" modal-title="add_server">
<div loom-add-server id="add-server">
</div>
</div>
<div loom-modal id="mergeWindow" modal-title="{{'merge' | translate}}" close-button="false">
<div loom-merge id="merge">
</div>
</div>
<div loom-modal id="historyDiffWindow" modal-title="{{'select_date_range' | translate}}" close-button="false">
<div loom-history-diff id="historyDiff">
</div>
</div>
<div loom-modal id="generate-notification-dialog" modal-title="{{'select_start_time' | translate}}" close-button="false">
<div loom-generate-notification id="generateNotification">
</div>
</div>
<div loom-modal id="addSyncWindow" modal-title="{{'add_sync' | translate}}">
<div loom-addsync id="add-sync">
</div>
</div>
<div loom-modal id="configWindow" modal-title="config">
<div loom-syncconfig id="sync-config">
</div>
</div>
<div loom-modal id="remoteSelectDialog" close-button="false" modal-title="remote">
<div loom-remoteselect id="remote-select">
</div>
</div>
<div loom-modal id="drawSelectDialog" close-button="false" modal-title="draw">
<div loom-drawselect id="draw-select">
</div>
</div>
<div loom-modal id="feature-diff-dialog" ng-controller="LoomFeatureDiffController" modal-title="{{title}}">
<div class="loom-feature-diff" id="feature-diff">
</div>
</div>
<div loom-modal id="attribute-edit-dialog" modal-title="{{'edit_attributes' | translate}}">
<div class="loom-attribute-edit" id="edit-feature">
</div>
</div>
<div loom-modal id="table-view-window" modal-title="{{'table_view' | translate}}" close-button="true">
<div class="loom-table-view" id="table-view">
</div>
</div>
<div loom-modal id="statistics-view-window" modal-title="{{'statistics_view' | translate}}" close-button="true">
<div class="loom-statistics-view" id="statistics-view">
</div>
</div>
<div loom-modal id="layerInfoDialog" modal-title="layerinfo">
<div loom-layer-info id="layer-info">
</div>
</div>
<div loom-modal id="layerInfoDialog" modal-title="layerattributevisibility">
<div loom-layer-attribute-visibility id="layer-attribute-visibility">
</div>
</div>
<div loom-feature-info-box id="info-box" ng-show="featureManagerService.getSelectedItem() && featureManagerService.getEnabled()"
class="feature-info-box-popup">
</div>
<div loom-modal id="saveMap" modal-title="{{ 'save_this_map' | translate}}">
<div loom-save-map id="save-map">
</div>
</div>
<div loom-modal id="enter-spatial-filter-radius-dialog" modal-title="{{'enter_radius' | translate}}">
<div loom-enterspatialfilterradius class="loom-enter-spatial-filter-radius">
</div>
</div>

<!-- The Bootstrap Image Gallery lightbox, should be a child element of the document body -->
<div id="blueimp-gallery" class="blueimp-gallery">
<!-- The container for the modal slides -->
<div class="slides"></div>
<!-- Controls for the borderless lightbox -->
<h3 class="title"></h3>
<a class="prev"></a>
<a class="next"></a>
<a class="close">×</a>
<a class="play-pause"></a>
<ol class="indicator"></ol>
<!-- The modal dialog, which will be used to wrap the lightbox content -->
<div class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" aria-hidden="true">&times;</button>
<h4 class="modal-title"></h4>
</div>
<div class="modal-body next"></div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left prev">
<i class="glyphicon glyphicon-chevron-left"></i>
Previous
</button>
<button type="button" class="btn btn-primary next">
Next
<i class="glyphicon glyphicon-chevron-right"></i>
</button>
</div>
</div>
</div>
</div>
</div>

{% endverbatim %}
1 change: 1 addition & 0 deletions geonode/client/templates/maploom/maps/map_edit.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% include "maploom/maps/map_view.html" %}
1 change: 1 addition & 0 deletions geonode/client/templates/maploom/maps/map_new.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% include "maploom/maps/map_view.html" %}
51 changes: 51 additions & 0 deletions geonode/client/templates/maploom/maps/map_view.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{% extends "geonode_base.html" %}

{% load i18n %}

{% block title %} {% trans "Explorer" %} - {{map.title}} - {{ block.super }} {% endblock %}

{% block head %}
{{ block.super }}
<style>

body{
padding-bottom: 0px;
overflow: hidden;
}

.maploom{
width: 100%;
border:0px;

}

</style>
{% endblock %}

{% block extra_script %}
<script type="text/javascript">
$(document).ready(function() {

var setHeight = function(){
return $('.maploom').css({height:$(window).height()-($('.navbar').height()+$('.classification-banner-text').height())});
}

$('#wrap').css({'padding-top':0});
$('body').css({'padding-top':$('.classification-banner-text').height()+$('.navbar').height()});
setHeight();

$(window).resize(function(){
setHeight();
});

});
</script>
{% endblock %}

{% block header %}{{ block.super }} {% endblock %}

{% block middle %}
<iframe src="{% if map %}{% url 'map_view' map.id %}{% else %}{% url 'map_new' %}{% if request.GET.urlencode %}?{{ request.GET.urlencode }}{% endif %}{% endif %}" allowFullScreen="true" scrolling="auto" class="maploom"></iframe>
{% endblock %}

{% block footer %}{% endblock %}

0 comments on commit cf6965b

Please sign in to comment.