Skip to content

Commit cb7c76b

Browse files
authored
Merge pull request #144 from hslayers/develop
Develop
2 parents 140c9c9 + 473df1c commit cb7c76b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+2539
-1988
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ hooks/
99
package-lock.json
1010
*.min.js
1111
bundle.js
12-
docs
12+
docs
13+
po/cs_CZ.mo

common_paths.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@ exports.paths = [
22
__dirname + '/components/toolbar',
33
__dirname + '/node_modules',
44
__dirname + '/node_modules/openlayers/dist',
5+
__dirname + '/node_modules/requirejs',
6+
__dirname + '/node_modules/cesium/Build/Cesium',
57
__dirname + '/node_modules/angular-cookies/angular-cookies',
68
__dirname + '/node_modules/angular-socialshare/dist/angular-socialshare',
79
__dirname + '/node_modules/angular-material',
10+
__dirname + '/node_modules/moment-interval/node_modules/moment',
811
__dirname + '/node_modules/angular-gettext/dist/angular-gettext',
912
__dirname + '/node_modules/angular-drag-and-drop-lists/angular-drag-and-drop-lists',
1013
__dirname + '/components/api',
1114
__dirname + '/node_modules/angular-material-bottom-sheet-collapsible',
12-
__dirname + '/components/cesium',
15+
__dirname + '/components/hscesium',
1316
__dirname + '/components/compositions',
1417
__dirname + '/components/core',
1518
__dirname + '/components/customhtml',
@@ -21,6 +24,7 @@ exports.paths = [
2124
__dirname + '/components/format',
2225
__dirname + '/components/geolocation',
2326
__dirname + '/components/info',
27+
__dirname + '/components/language',
2428
__dirname + '/components/layermanager',
2529
__dirname + '/components/layers',
2630
__dirname + '/components/layout',
@@ -44,6 +48,5 @@ exports.paths = [
4448
__dirname + '/components/tracking',
4549
__dirname + '/components/translations/js',
4650
__dirname + '/components/trip_planner',
47-
__dirname + '/components/wirecloud',
48-
__dirname + '/examples/olu_spoi/'
51+
__dirname + '/components/wirecloud'
4952
];

components/core/core.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ if (require.config) require.config({
4444
proj4: requirejs.s.contexts._.config.paths.proj4 || nm_path + 'proj4/dist/proj4',
4545
api: requirejs.s.contexts._.config.paths.api || hsl_path + 'components/api/api' + hslMin,
4646
compositions: hsl_path + 'components/compositions/compositions' + hslMin,
47+
Cesium: nm_path + 'cesium/Build/Cesium/Cesium',
4748
datasource_selector: hsl_path + 'components/datasource_selector/datasource_selector' + hslMin,
4849
drag: hsl_path + 'components/drag/drag' + hslMin,
4950
feature_filter: hsl_path + 'components/feature_filter/feature_filter' + hslMin,
@@ -55,6 +56,7 @@ if (require.config) require.config({
5556
lodexplorer: hsl_path + 'components/lodexplorer/lodexplorer' + hslMin,
5657
map: hsl_path + 'components/map/map' + hslMin,
5758
measure: hsl_path + 'components/measure/measure' + hslMin,
59+
language: hsl_path + 'components/language/language' + hslMin,
5860
mobile_toolbar: requirejs.s.contexts._.config.paths.mobile_toolbar || hsl_path + 'components/mobile_toolbar/mobile_toolbar',
5961
mobile_settings: requirejs.s.contexts._.config.paths.mobile_settings || hsl_path + 'components/mobile_settings/mobile_settings',
6062
moment: nm_path + 'moment/min/moment.min',
@@ -69,6 +71,7 @@ if (require.config) require.config({
6971
permalink: requirejs.s.contexts._.config.paths.permalink || hsl_path + 'components/permalink/permalink' + hslMin,
7072
print: hsl_path + 'components/print/print' + hslMin,
7173
query: hsl_path + 'components/query/query' + hslMin,
74+
require: nm_path +'requirejs/requirejs/require',
7275
sidebar: requirejs.s.contexts._.config.paths.sidebar || hsl_path + 'components/sidebar/sidebar' + hslMin,
7376
search: hsl_path + 'components/search/search' + hslMin,
7477
'hs.source.SparqlJson': requirejs.s.contexts._.config.paths.SparqlJson || hsl_path + 'components/layers/hs.source.SparqlJson' + hslMin,
@@ -132,6 +135,9 @@ if (require.config) require.config({
132135
},
133136
translations: {
134137
deps: ['angular-gettext'],
138+
},
139+
translations_extended: {
140+
deps: ['angular-gettext'],
135141
}
136142
},
137143
priority: [
@@ -603,6 +609,16 @@ define(['angular', 'angular-gettext', 'translations', 'ol', 'map', 'drag', 'api'
603609
},
604610
/**
605611
* @ngdoc method
612+
* @name Core#getCurrentLanguagePrefix
613+
* @public
614+
* @description Get code of current language
615+
*/
616+
getCurrentLanguageCode: function(){
617+
if(typeof me.language == 'undefined' || me.language == '') return 'EN';
618+
return me.language.substr(0, 2).toUpperCase();
619+
},
620+
/**
621+
* @ngdoc method
606622
* @name Core#openStatusCreator
607623
* @public
608624
* @description Open status creator panel

components/datasource_selector/datasource_selector.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,13 +613,15 @@ define(['angular', 'ol', 'map'],
613613
$scope.wms_connecting = false;
614614
$scope.config = config;
615615
$scope.advancedSearch = false;
616+
$scope.id_selected = Core.exists('hs.ows.controller') ? 'OWS' : '';
616617

617618
$scope.$on('ows.wms_connecting', function () {
618619
$scope.wms_connecting = true;
619620
});
620621

621-
$scope.datasetSelect = function () {
622+
$scope.datasetSelect = function (id_selected) {
622623
$scope.wms_connecting = false;
624+
$scope.id_selected = id_selected;
623625
}
624626

625627
$http({

components/datasource_selector/partials/datasource_selector.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
</div>
1717
</div>-->
1818

19-
<ul class="nav nav-pills dss-tabs" role="tablist">
19+
<ul class="nav nav-stacked dss-tabs" role="tablist">
2020
<li ng-class="{'active hs-tab-singleDS': Core.singleDatasources && !wms_connecting}" ng-repeat="ds in data.datasets">
21-
<a data-target="{{'#ds'+$index}}" aria-controls="context" role="tab" data-toggle="tab" ng-click="datasetSelect(ds)">
21+
<a data-target="{{'#ds'+$index}}" aria-controls="context" role="tab" data-toggle="tab" ng-click="datasetSelect('ds'+$index)">
2222
{{ds.title}}
2323
<span ng-show='ds.matched>0'>({{ds.matched}})</span>
2424
<span class="glyphicon glyphicon-refresh glyphicon-spin" ng-show="ds.ajaxReq.readyState != 4"></span>
@@ -29,7 +29,7 @@
2929
</li>
3030
</ul><!-- Tab panes -->
3131
<div class="tab-content">
32-
<div role="tabpanel" class="hs-dataset-panel tab-pane" ng-class="{'active': Core.singleDatasources && !wms_connecting}" id="{{'ds'+$index}}" ng-repeat="ds in data.datasets">
32+
<div role="tabpanel" class="hs-dataset-panel tab-pane" ng-class="{'active': 'ds'+$index == id_selected && Core.singleDatasources && !wms_connecting}" id="{{'ds'+$index}}" ng-repeat="ds in data.datasets">
3333
<div class="panel">
3434
<div class="panel-body">
3535
<div ng-if="Core.singleDatasources">
@@ -79,7 +79,7 @@
7979
</div>
8080
</div>
8181
</div>
82-
<div role="tabpanel" ng-class="{'tab-pane': true, 'active': wms_connecting || data.datasources.length==0}" hs.ows.directive ng-controller="hs.ows.controller" ng-if="Core.exists('hs.ows.controller') && Core.singleDatasources" id="OWS"></div>
82+
<div role="tabpanel" ng-class="{'tab-pane': true, 'active': wms_connecting || data.datasources.length==0 || id_selected == 'OWS'}" hs.ows.directive ng-controller="hs.ows.controller" ng-if="Core.exists('hs.ows.controller') && Core.singleDatasources" id="OWS"></div>
8383
</div>
8484
</div>
8585
</div>

0 commit comments

Comments
 (0)