[Mapbender-commits] r9352 - in trunk/mapbender/http: javascripts plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Jan 12 13:20:42 PST 2016


Author: armin11
Date: 2016-01-12 13:20:42 -0800 (Tue, 12 Jan 2016)
New Revision: 9352

Modified:
   trunk/mapbender/http/javascripts/mb_downloadFeedClient.php
   trunk/mapbender/http/plugins/mb_downloadFeedClient.php
Log:
Enhancement of INSPIRE ATOM Feed Client

Modified: trunk/mapbender/http/javascripts/mb_downloadFeedClient.php
===================================================================
--- trunk/mapbender/http/javascripts/mb_downloadFeedClient.php	2016-01-12 18:54:31 UTC (rev 9351)
+++ trunk/mapbender/http/javascripts/mb_downloadFeedClient.php	2016-01-12 21:20:42 UTC (rev 9352)
@@ -176,7 +176,8 @@
 	//$('#dataset_select').remove();
 	$('.selectpicker').remove();
 	$('.selectpicker').selectpicker('refresh');
-		
+	$("#tab_header_number_datasets").text("");
+	$("#tab_header_number_representations").text("");
 }
 
 function showDatasetList(featureCollection,id) {
@@ -226,6 +227,8 @@
 		selectOptions = selectOptions+"<option value='"+featureCollection.features[i].properties.datasetFeedLink+"' url='"+featureCollection.features[i].properties.datasetFeedLink+"' optionid='"+i+"'>"+featureCollection.features[i].properties.title+"</option>";
 	
 	}
+	//add number of datasets to tab header
+	$("#tab_header_number_datasets").text(" "+"("+featureCollection.features.length+")");
 	datasetSelect.append(selectOptions);
 	//datasetSelect.addClass('selectpicker');
 	//datasetSelect.attr({'data-style':'btn-primary'});
@@ -268,6 +271,7 @@
 	for(var i=0; i<featureCollection.features.length; ++i) {
 		selectROptions = selectROptions+"<option value='"+i+"' url='"+featureCollection.features[i].properties.datasetFeedLink+"'>"+featureCollection.features[i].properties.title+"</option>";
 	}
+	$("#tab_header_number_representations").text(" "+"("+featureCollection.features.length+")");
 	datasetEntrySelect.append(selectROptions);
 	//datasetEntrySelect.addClass('selectpicker');
 	//datasetEntrySelect.attr({'data-style':'btn-primary'});

Modified: trunk/mapbender/http/plugins/mb_downloadFeedClient.php
===================================================================
--- trunk/mapbender/http/plugins/mb_downloadFeedClient.php	2016-01-12 18:54:31 UTC (rev 9351)
+++ trunk/mapbender/http/plugins/mb_downloadFeedClient.php	2016-01-12 21:20:42 UTC (rev 9352)
@@ -2,7 +2,6 @@
 //http://localhost/mapbender_trunk/plugins/mb_downloadFeedClient.php
 require_once dirname(__FILE__) . "/../../core/globalSettings.php";
 require_once dirname(__FILE__) . "/../classes/class_user.php";
-
 if (isset($_REQUEST['url']) & $_REQUEST['url'] != "") {
 	//validate
 	$testMatch = $_REQUEST["url"];
@@ -14,7 +13,8 @@
 		die(); 	
 	}
 	$testMatch = NULL;	
-}		
+}	
+//TODO: languageCode support	
 ?>
 <!DOCTYPE html>
 <html>
@@ -43,23 +43,15 @@
 select, textarea {
   font: 0.9em Verdana, Arial, sans-serif;	
 }
-
-#client {
-  <!--width: 850px;-->
-  <!--height: 870px;-->
-}
-
 .inspire_loading {
     -webkit-animation:spin 4s linear infinite;
     -moz-animation:spin 4s linear infinite;
     animation:spin 4s linear infinite;
 
 }
-
 @-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } }
 @-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } }
 @keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }
-
 #mapframe_dataset_list {
   position: absolut;
   top: 0;
@@ -68,9 +60,6 @@
   height: 250px;
   border: 1px solid #ccc;
 }
-#mapframe {
-}
-
 #mapframe_file_list {
   width: 325px;
   height: 225px;
@@ -92,9 +81,8 @@
   width: 100%;
   height: 10em;
 }
-
 </style>
-<!--<script src="../extensions/OpenLayers-2.13.1/OpenLayers.js"></script>-->
+<!--<script src="../extensions/OpenLayers-2.13.1/OpenLayers.mobile.js"></script>//TODO: bugs with control panels-->
 <script src="../extensions/OpenLayers-2.13.1/OpenLayers.js"></script>
 <script src="../extensions/jquery-1.12.0.min.js"></script>
 <script src="../extensions/bootstrap-3.3.6-dist/js/bootstrap.min.js"></script>
@@ -115,9 +103,8 @@
         <span class="icon-bar"></span>
       </button>
       <a class="navbar-brand" href="#"><?php echo _mb("INSPIRE ATOM Feed Client");?></a>
-      <img alt="Titel" src="../img/inspire_tr_36.png">
+      <img  alt="INSPIRE symbol" src="../img/inspire_tr_36.png" title="INSPIRE"><img title="<?php echo _mb("Implements European Standards");?>" alt="European Union symbol" src="../img/misc/flag_yellow_low.jpg" width="48" height="25" >
     </div>
-
     <!-- Alle Navigationslinks, Formulare und anderer Inhalt werden hier zusammengefasst und können dann ein- und ausgeblendet werden -->
     <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
       <ul class="nav navbar-nav">   
@@ -128,7 +115,7 @@
     </div><!-- /.navbar-collapse -->
   </div><!-- /.container-fluid -->
 </nav>
-<!-- Modal Meldungen -->
+<!-- Modal Meldungen TODO: maybe usefull for input dialog - service feed url?-->
 <!--<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="title" id="parse_service_feed_modal">
   <div class="modal-dialog modal-sm">
     <div class="modal-content">
@@ -144,14 +131,13 @@
   </div>
 </div>-->
 <div id="loading_image_service" style="display: none;"><p><img class="inspire_loading" src="../img/inspire_tr_36.png" style="margin-left: auto; margin-right: auto;"/><?php echo _mb("Loading Service Feed ...");?></p></div>
-<!-- <button class="btn btn-primary" type="button" id="stop_parsing"><?php echo _mb("reset");?></button> -->
+<!-- <button class="btn btn-primary" type="button" id="stop_parsing"><?php echo _mb("reset");?></button> TODO: check if it is possible to use it if some error orccurs or if it possible to interrupt a ajax call / timeout handling? -->
 <div id="loading_image_dataset" style="display: none;"><p><img class="inspire_loading" src="../img/inspire_tr_36.png" style="margin-left: auto; margin-right: auto;"/><?php echo _mb("Loading Dataset Feed ...");?></p></div>
-
 <!-- Tabs-Navs -->
 <ul class="nav nav-tabs" role="tablist" id="mytabs">
   <li role="presentation" class="active"><a href="#input_feed_url" role="tab" data-toggle="tab"><?php echo _mb("Url to feed");?></a></li>
-  <li role="presentation"><a href="#dataset_info" role="tab" data-toggle="tab"><?php echo _mb("Datasets");?></a></li>
-  <li role="presentation"><a href="#representations" role="tab" data-toggle="tab"><?php echo _mb("Access to representations");?></a></li>
+  <li role="presentation"><a href="#dataset_info" role="tab" data-toggle="tab" id="tab_header_datasets"><?php echo _mb("Datasets");?><span id="tab_header_number_datasets"></span></a></li>
+  <li role="presentation"><a href="#representations" role="tab" data-toggle="tab" id="tab_header_representations"><?php echo _mb("Representations");?><span id="tab_header_number_representations"></span></a></li>
 </ul>
 <!-- Tab-Inhalte -->
 <div class="tab-content" style="height:100%">



More information about the Mapbender_commits mailing list