From 40fce0aae1c27db9eb621464eea359539bf7aaaa Mon Sep 17 00:00:00 2001 From: Anthony Borghi <anthony.borghi@veremes.com> Date: Fri, 2 Nov 2018 12:30:04 +0100 Subject: [PATCH] =?UTF-8?q?Retouche=20pour=20s=C3=A9parer=20la=20vue=20pri?= =?UTF-8?q?ncipale=20en=20deux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/module_vmap/module/css/vmap.less | 34 ++++++++++++++++--- .../app/vmap/tools/infocontainer.js | 1 + .../javascript/app/vmap/tools/toolsmanager.js | 11 ++++-- .../module/javascript/app/vmap/vmap.js | 1 + src/module_vmap/module/template/vmap.html | 29 +++++++++------- 5 files changed, 56 insertions(+), 20 deletions(-) diff --git a/src/module_vmap/module/css/vmap.less b/src/module_vmap/module/css/vmap.less index 0afd13f1..9d931968 100644 --- a/src/module_vmap/module/css/vmap.less +++ b/src/module_vmap/module/css/vmap.less @@ -380,7 +380,7 @@ input[readonly] { display: -ms-flex !important; display: flex !important; } -#map-container{ +#map-container, #map-container-compare{ -webkit-transition: all 300ms ease-out 0s; -o-transition: all 300ms ease-out 0s; transition: all 300ms ease-out 0s; @@ -389,8 +389,34 @@ input[readonly] { height: ~"-webkit-calc(100% - 32px)"; height: ~"-o-calc(100% - 32px)"; height: ~"calc(100% - 32px)"; + width : 100%; } -#map-container.minus{ +#map-container.half,#map-container-compare.half{ + width : calc(50% ~"-" @right-sidebar-width/2); + float: left; +} +/*#map-container.right-module-bar-present{ + width : calc(100% ~"-" @right-sidebar-width); +}*/ +/*#map-container.left-map-manager-open{ + width : calc(100% ~"-" @right-sidebar-width ~"-" @left-sidebar-content-width); +}*/ +#map-container.half.left-map-manager-open, #map-container-compare.half.left-map-manager-open{ + width : calc(50% ~"-" @right-sidebar-width/2 ~"-" @left-sidebar-content-width/2); +} +#map-container.half.right-module-bar-present,#map-container-compare.half.right-module-bar-present{ + width : calc(50% ~"-" @right-sidebar-width/2 ~"-" @left-sidebar-width/2); +} +#map-container.half.right-module-bar-present.left-map-manager-open,#map-container-compare.half.right-module-bar-present.left-map-manager-open{ + width : calc(50% ~"-" @right-sidebar-width/2 ~"-" @left-sidebar-width/2 ~"-" @left-sidebar-content-width/2); +} +#map-container.half.right-module-bar-present.right-module-manager-open,#map-container-compare.half.right-module-bar-present.right-module-manager-open{ + width : calc(50% ~"-" @right-sidebar-width/2 ~"-" @left-sidebar-width/2 ~"-" @right-sidebar-content-width/2); +} +#map-container.half.right-module-bar-present.left-map-manager-open.right-module-manager-open,#map-container-compare.half.right-module-bar-present.left-map-manager-open.right-module-manager-open{ + width : calc(50% ~"-" @right-sidebar-width/2 ~"-" @left-sidebar-width/2 ~"-" @left-sidebar-content-width/2 ~"-" @right-sidebar-content-width/2); +} +#map-container.minus,#map-container-compare.minus{ height: 95%; height: ~"-moz-calc(100% - 47px)"; height: ~"-webkit-calc(100% - 47px)"; @@ -399,13 +425,13 @@ input[readonly] { font-size: 12px; padding: 0px 0px; } -#map-container.open{ +#map-container.open, #map-container-compare.open{ height: -moz-calc(100% ~"-" @botom-open-height ~"-" 47px); height: -webkit-calc(100% ~"-" @botom-open-height ~"-" 47px); height: -o-calc(100% ~"-" @botom-open-height ~"-" 47px); height: calc(100% ~"-" @botom-open-height ~"-" 47px); } -#map-container.open2{ +#map-container.open2, #map-container-compare.open2{ height: -moz-calc(100% ~"-" @botom-open2-height ~"-" 47px); height: -webkit-calc(100% ~"-" @botom-open2-height ~"-" 47px); height: -o-calc(100% ~"-" @botom-open2-height ~"-" 47px); diff --git a/src/module_vmap/module/javascript/app/vmap/tools/infocontainer.js b/src/module_vmap/module/javascript/app/vmap/tools/infocontainer.js index e04b0496..e499814f 100644 --- a/src/module_vmap/module/javascript/app/vmap/tools/infocontainer.js +++ b/src/module_vmap/module/javascript/app/vmap/tools/infocontainer.js @@ -662,6 +662,7 @@ nsVmap.nsToolsManager.InfoContainer.prototype.infocontainerController.prototype. $("#opener-bottombar").css("visibility", "visible"); } $("#map-container").addClass('minus'); + $("#map-container-compare").addClass('minus'); // Ouvre la barre this.$timeout(function () { diff --git a/src/module_vmap/module/javascript/app/vmap/tools/toolsmanager.js b/src/module_vmap/module/javascript/app/vmap/tools/toolsmanager.js index ba4c644a..1b6a247c 100755 --- a/src/module_vmap/module/javascript/app/vmap/tools/toolsmanager.js +++ b/src/module_vmap/module/javascript/app/vmap/tools/toolsmanager.js @@ -143,13 +143,18 @@ nsVmap.nsToolsManager.ToolsManager.prototype.vmapToolsContainerDirective = funct /** * Basic tools Controller + * @param {object} $scope * @export + * @ngInject * @constructor */ -nsVmap.nsToolsManager.ToolsManager.prototype.vmapToolsController = function () { +nsVmap.nsToolsManager.ToolsManager.prototype.vmapToolsController = function ($scope) { oVmap.log("nsVmap.nsToolsManager.BasicTools.prototype.vmapToolsController"); this['oToolsTree'] = oVmap.getToolsManager().getToolsTree(); + + $scope.$root["bLoadVmapModule"] = goog.isDefAndNotNull(this['oToolsTree']); + this['openedTool'] = '_'; }; @@ -176,7 +181,7 @@ nsVmap.nsToolsManager.ToolsManager.prototype.loadSyncToolsTree = function () { oToolsTree = data['usermodules']; } }); - + return oToolsTree; }; @@ -225,4 +230,4 @@ nsVmap.nsToolsManager.ToolsManager.prototype.getTool = function (tool) { // Définit la directive et le controller oVmap.module.directive('appVmaptools', nsVmap.nsToolsManager.ToolsManager.prototype.vmapToolsDirective); oVmap.module.directive('toolsContainer', nsVmap.nsToolsManager.ToolsManager.prototype.vmapToolsContainerDirective); -oVmap.module.controller('AppVmaptoolsController', nsVmap.nsToolsManager.ToolsManager.prototype.vmapToolsController); \ No newline at end of file +oVmap.module.controller('AppVmaptoolsController', nsVmap.nsToolsManager.ToolsManager.prototype.vmapToolsController); diff --git a/src/module_vmap/module/javascript/app/vmap/vmap.js b/src/module_vmap/module/javascript/app/vmap/vmap.js index 48dbc1ba..e1fb655d 100644 --- a/src/module_vmap/module/javascript/app/vmap/vmap.js +++ b/src/module_vmap/module/javascript/app/vmap/vmap.js @@ -876,6 +876,7 @@ oVmap.minResizeBottomBar = function () { $(".open-more-selection-info").removeClass("reverse"); } else if ($("#map-container").hasClass("open")) { $("#map-container").addClass("minus"); + $("#map-container-compare").addClass("minus"); } }; diff --git a/src/module_vmap/module/template/vmap.html b/src/module_vmap/module/template/vmap.html index 358cdd8b..ec84d8e5 100755 --- a/src/module_vmap/module/template/vmap.html +++ b/src/module_vmap/module/template/vmap.html @@ -4,7 +4,7 @@ <div ng-if="!$root.is_mobile" id="left-sidebar" ng-class="vmapCtrl.left_open ? 'open' : ''"> <div id="maplistlitle-container" class="dropdown"> <!--voir dans maplistlitle.js pour l'evenement de fermeture de la dropdown--> - <button id="maplistlitle-button" class="btn btn-success dropdown-toggle btn-map-manager" + <button id="maplistlitle-button" class="btn btn-success dropdown-toggle btn-map-manager" type="button" onclick="$('#maplistlitle-container').toggleClass('open')"> <span class="icon-map left" style="font-size: 30px"></span> @@ -13,19 +13,19 @@ <span class="caret"></span> </span> </button> - - + + <div id="dropdownMenuMaps" class="dropdown-menu map-list-litle-panel"> <app-maplistlitle app-lang="ctrl.lang" app-maplistlitle-map="ctrl.map"></app-maplistlitle> <div id="map-manager-button-container" style="text-align: center"> - <button id="map-manager-button" - type="button" + <button id="map-manager-button" + type="button" class="btn btn-success btn-sm btn-modal margin-10" onclick="oVmap.simuleClick('btn-reload-myMap'); $('#mapModalManager').modal('show'); $('#dropdownMenuMaps').dropdown('toggle')"> GESTION DES CARTES - </button> + </button> </div> </div> </div> @@ -33,7 +33,7 @@ <div app-layertree app-map="vmapCtrl.map" app-proj="vmapCtrl.proj" app-lang="vmapCtrl.lang" id="app-layertree"></div> <div app-layersorder app-map="vmapCtrl.map" app-proj="vmapCtrl.proj" app-lang="vmapCtrl.lang" id="app-layersorder"></div> <div app-maplegend app-map="vmapCtrl.map" app-proj="vmapCtrl.proj" app-lang="vmapCtrl.lang" id="app-maplegend"></div> - <div id="LayersDiv"></div> + <div id="LayersDiv"></div> <!-- Map Modal --> <div class="modal fade" id="mapModalManager" role="dialog"> @@ -48,12 +48,19 @@ <div ng-if="!$root.is_mobile" id="opener-sidebar" ng-click="vmapCtrl.left_open = !vmapCtrl.left_open" onclick="oVmap.resizeLayerTools(false); oVmap.getToolsManager().getBasicTools().toggleOutTools();"> <div class="layer-tools-btn shadow-hover icon-tree" ng-class="vmapCtrl.left_open ? 'open' : ''" data-original-title="Couches et cartes"></div> </div> - + <!-- Carte --> - <div id="map-container" ng-class="ctrl.bottom_open ? 'open' : ''"> + <div id="map-container" + ng-class="{'open' : ctrl.bottom_open,'half' : compare_enabled, 'right-module-bar-present' : bLoadVmapModule, 'left-map-manager-open' : vmapCtrl.left_open, 'right-module-manager-open' : vmapCtrl.right_open}"> <app-map app-map="vmapCtrl.map" app-action="vmapCtrl.currentAction"></app-map> </div> + <!-- Carte Compare --> + <div ng-show="compare_enabled" id="map-container-compare" style="background-color:black;" + ng-class="{'open' : ctrl.bottom_open,'half' : compare_enabled, 'right-module-bar-present' : bLoadVmapModule, 'left-map-manager-open' : vmapCtrl.left_open, 'right-module-manager-open' : vmapCtrl.right_open}"> + <!--<app-map ng-show="compare_enabled" app-map="vmapCtrl.map" app-action="vmapCtrl.currentAction" ng-class="{'half' : compare_enabled}"></app-map>--> + </div> + <!-- Bandeau de selection --> <div id="opener-bottombar" class="list-group-item active"> <div id="opener-bottombar-1" class="open-selection-info" ng-click="ctrl.bottom_open = !ctrl.bottom_open" onclick="oVmap.minResizeBottomBar()"></div> @@ -63,7 +70,3 @@ <div id="info-container" app-infocontainer app-infocontainer-lang="vmapCtrl.lang" app-infos="vmapCtrl.infos"></div> </div> </div> - - - - -- GitLab