Skip to content

Commit

Permalink
Merge pull request #144 from hslayers/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
raitisbe authored Nov 24, 2018
2 parents 140c9c9 + 473df1c commit cb7c76b
Show file tree
Hide file tree
Showing 79 changed files with 2,539 additions and 1,988 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ hooks/
package-lock.json
*.min.js
bundle.js
docs
docs
po/cs_CZ.mo
9 changes: 6 additions & 3 deletions common_paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ exports.paths = [
__dirname + '/components/toolbar',
__dirname + '/node_modules',
__dirname + '/node_modules/openlayers/dist',
__dirname + '/node_modules/requirejs',
__dirname + '/node_modules/cesium/Build/Cesium',
__dirname + '/node_modules/angular-cookies/angular-cookies',
__dirname + '/node_modules/angular-socialshare/dist/angular-socialshare',
__dirname + '/node_modules/angular-material',
__dirname + '/node_modules/moment-interval/node_modules/moment',
__dirname + '/node_modules/angular-gettext/dist/angular-gettext',
__dirname + '/node_modules/angular-drag-and-drop-lists/angular-drag-and-drop-lists',
__dirname + '/components/api',
__dirname + '/node_modules/angular-material-bottom-sheet-collapsible',
__dirname + '/components/cesium',
__dirname + '/components/hscesium',
__dirname + '/components/compositions',
__dirname + '/components/core',
__dirname + '/components/customhtml',
Expand All @@ -21,6 +24,7 @@ exports.paths = [
__dirname + '/components/format',
__dirname + '/components/geolocation',
__dirname + '/components/info',
__dirname + '/components/language',
__dirname + '/components/layermanager',
__dirname + '/components/layers',
__dirname + '/components/layout',
Expand All @@ -44,6 +48,5 @@ exports.paths = [
__dirname + '/components/tracking',
__dirname + '/components/translations/js',
__dirname + '/components/trip_planner',
__dirname + '/components/wirecloud',
__dirname + '/examples/olu_spoi/'
__dirname + '/components/wirecloud'
];
16 changes: 16 additions & 0 deletions components/core/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ if (require.config) require.config({
proj4: requirejs.s.contexts._.config.paths.proj4 || nm_path + 'proj4/dist/proj4',
api: requirejs.s.contexts._.config.paths.api || hsl_path + 'components/api/api' + hslMin,
compositions: hsl_path + 'components/compositions/compositions' + hslMin,
Cesium: nm_path + 'cesium/Build/Cesium/Cesium',
datasource_selector: hsl_path + 'components/datasource_selector/datasource_selector' + hslMin,
drag: hsl_path + 'components/drag/drag' + hslMin,
feature_filter: hsl_path + 'components/feature_filter/feature_filter' + hslMin,
Expand All @@ -55,6 +56,7 @@ if (require.config) require.config({
lodexplorer: hsl_path + 'components/lodexplorer/lodexplorer' + hslMin,
map: hsl_path + 'components/map/map' + hslMin,
measure: hsl_path + 'components/measure/measure' + hslMin,
language: hsl_path + 'components/language/language' + hslMin,
mobile_toolbar: requirejs.s.contexts._.config.paths.mobile_toolbar || hsl_path + 'components/mobile_toolbar/mobile_toolbar',
mobile_settings: requirejs.s.contexts._.config.paths.mobile_settings || hsl_path + 'components/mobile_settings/mobile_settings',
moment: nm_path + 'moment/min/moment.min',
Expand All @@ -69,6 +71,7 @@ if (require.config) require.config({
permalink: requirejs.s.contexts._.config.paths.permalink || hsl_path + 'components/permalink/permalink' + hslMin,
print: hsl_path + 'components/print/print' + hslMin,
query: hsl_path + 'components/query/query' + hslMin,
require: nm_path +'requirejs/requirejs/require',
sidebar: requirejs.s.contexts._.config.paths.sidebar || hsl_path + 'components/sidebar/sidebar' + hslMin,
search: hsl_path + 'components/search/search' + hslMin,
'hs.source.SparqlJson': requirejs.s.contexts._.config.paths.SparqlJson || hsl_path + 'components/layers/hs.source.SparqlJson' + hslMin,
Expand Down Expand Up @@ -132,6 +135,9 @@ if (require.config) require.config({
},
translations: {
deps: ['angular-gettext'],
},
translations_extended: {
deps: ['angular-gettext'],
}
},
priority: [
Expand Down Expand Up @@ -603,6 +609,16 @@ define(['angular', 'angular-gettext', 'translations', 'ol', 'map', 'drag', 'api'
},
/**
* @ngdoc method
* @name Core#getCurrentLanguagePrefix
* @public
* @description Get code of current language
*/
getCurrentLanguageCode: function(){
if(typeof me.language == 'undefined' || me.language == '') return 'EN';
return me.language.substr(0, 2).toUpperCase();
},
/**
* @ngdoc method
* @name Core#openStatusCreator
* @public
* @description Open status creator panel
Expand Down
4 changes: 3 additions & 1 deletion components/datasource_selector/datasource_selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -613,13 +613,15 @@ define(['angular', 'ol', 'map'],
$scope.wms_connecting = false;
$scope.config = config;
$scope.advancedSearch = false;
$scope.id_selected = Core.exists('hs.ows.controller') ? 'OWS' : '';

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

$scope.datasetSelect = function () {
$scope.datasetSelect = function (id_selected) {
$scope.wms_connecting = false;
$scope.id_selected = id_selected;
}

$http({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
</div>
</div>-->

<ul class="nav nav-pills dss-tabs" role="tablist">
<ul class="nav nav-stacked dss-tabs" role="tablist">
<li ng-class="{'active hs-tab-singleDS': Core.singleDatasources && !wms_connecting}" ng-repeat="ds in data.datasets">
<a data-target="{{'#ds'+$index}}" aria-controls="context" role="tab" data-toggle="tab" ng-click="datasetSelect(ds)">
<a data-target="{{'#ds'+$index}}" aria-controls="context" role="tab" data-toggle="tab" ng-click="datasetSelect('ds'+$index)">
{{ds.title}}
<span ng-show='ds.matched>0'>({{ds.matched}})</span>
<span class="glyphicon glyphicon-refresh glyphicon-spin" ng-show="ds.ajaxReq.readyState != 4"></span>
Expand All @@ -29,7 +29,7 @@
</li>
</ul><!-- Tab panes -->
<div class="tab-content">
<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">
<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">
<div class="panel">
<div class="panel-body">
<div ng-if="Core.singleDatasources">
Expand Down Expand Up @@ -79,7 +79,7 @@
</div>
</div>
</div>
<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>
<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>
</div>
</div>
</div>
Loading

0 comments on commit cb7c76b

Please sign in to comment.