Skip to content
This repository was archived by the owner on Apr 22, 2022. It is now read-only.

Commit a5245e5

Browse files
author
taleksashina
committed
embedded iframe for search; show/hide workbench menu button
1 parent f2952d8 commit a5245e5

File tree

7 files changed

+55
-11
lines changed

7 files changed

+55
-11
lines changed

src/main/webapp/i18n/resources-locale_en.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1974,5 +1974,17 @@
19741974
"key":"_thesaurus-manager-warning_",
19751975
"value":"Do only touch the functionality if you are knowing what you are doing.",
19761976
"description":"message shown on thesaurus management page (warning - only for advanced users)"
1977+
},
1978+
1979+
1980+
{
1981+
"key":"_show-stack-menu_",
1982+
"value":"Show Menu",
1983+
"description":"show stack menu button name"
1984+
},
1985+
{
1986+
"key":"_hide-stack-menu_",
1987+
"value":"Hide Menu",
1988+
"description":"hide stack menu button name"
19771989
}
19781990
]

src/main/webapp/i18n/resources-locale_ru.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1972,6 +1972,18 @@
19721972
"key":"_thesaurus-manager-warning_",
19731973
"value":"Используйте данные функции только если знаете, что вы делаете.",
19741974
"description":"message shown on thesaurus management page (warning - only for advanced users)"
1975+
},
1976+
1977+
1978+
{
1979+
"key":"_show-stack-menu_",
1980+
"value":"Показать меню",
1981+
"description":"show stack menu button name"
1982+
},
1983+
{
1984+
"key":"_hide-stack-menu_",
1985+
"value":"Скрыть меню",
1986+
"description":"hide stack menu button name"
19751987
}
19761988

19771989
]

src/main/webapp/js/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ app.config(function($routeSegmentProvider, $routeProvider)
6262
/* .when('/home/search-querying-and-exploration/googlemap', 'default.googlemap') */
6363
// .when('/home/search-querying-and-exploration/facete', 'default.facete')
6464
// .when('/home/search-querying-and-exploration/mappify', 'default.mappify')
65-
// .when('/home/querying-and-exploration/search', 'default.search')
65+
.when('/home/search-querying-and-exploration/search', 'default.search')
6666
// .when('/home/manual-revision-and-authoring/ontowiki', 'default.ontowiki')
6767
.when('/home/manual-revision-and-authoring/edit-uploads', 'default.edit-uploads')
6868
// .when('/home/linking-and-fusing/limes', 'default.limes')

src/main/webapp/js/controllers.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,24 @@ function AccountMenuCtrl($scope) {
88
{ name: "_user-pref_", route:'#/account/preferences', url:'/account/preferences' }];
99
}
1010

11+
function WorkbenchCtrl($scope) {
12+
$scope.showStackMenu = true;
13+
$scope.toggleButtonName = "_hide-stack-menu_";
14+
15+
$scope.toggleStackMenu = function() {
16+
$scope.showStackMenu = !$scope.showStackMenu;
17+
if ($scope.showStackMenu) {
18+
$('#segment1').removeClass('col-xs-12');
19+
$('#segment1').addClass('col-xs-10');
20+
$scope.toggleButtonName = "_hide-stack-menu_";
21+
} else {
22+
$('#segment1').removeClass('col-xs-10');
23+
$('#segment1').addClass('col-xs-12');
24+
$scope.toggleButtonName = "_show-stack-menu_";
25+
}
26+
};
27+
}
28+
1129
function StackMenuCtrl($scope, ConfigurationService, localize, AccountService, $window, flash, DocumentsService) {
1230
var services = ConfigurationService.getComponentServices(":Solr");
1331
var searchServiceUrl = services[0].serviceUrl;
@@ -37,7 +55,8 @@ function StackMenuCtrl($scope, ConfigurationService, localize, AccountService, $
3755
// {name: 'Virtuoso', route:'#/home/search-querying-and-exploration/virtuoso', url:'/home/search-querying-and-exploration/virtuoso' },
3856
// {name: 'Facete', route:'#/home/search-querying-and-exploration/facete', url:'/home/search-querying-and-exploration/facete' },
3957
// {name: 'Mappify', route:'#/home/search-querying-and-exploration/mappify', url:'/home/search-querying-and-exploration/mappify' },
40-
{name: '_search_', route:null, url:searchServiceUrl, modaltitle:'_faceted-search_', requiredServices:[":SearchService"] }]
58+
// {name: '_search_', route:null, url:searchServiceUrl, modaltitle:'_faceted-search_', requiredServices:[":SearchService"] },
59+
{name: '_search_', route:'#/home/search-querying-and-exploration/search', url:'/home/search-querying-and-exploration/search', requiredServices:[":SearchService"] }]
4160
},
4261
{
4362
title: "_man-revision-authoring_",

src/main/webapp/js/workbench/default.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
<div class="contents">
2-
<div class="col-xs-2 sidebar">
1+
<div class="contents" ng-controller="WorkbenchCtrl">
2+
<button class="btn btn-primary btn-large" ng-click="toggleStackMenu()" data-i18n="{{toggleButtonName}}"></button>
3+
<div class="col-xs-2 sidebar" ng-show="showStackMenu">
34

45
<div class="panel-group" id="accordion" ng-controller="StackMenuCtrl">
56
<div class="panel panel-default" ng-repeat="group in groups | filter:showGroup">
@@ -37,7 +38,7 @@ <h5 class="modal-title green bold" data-i18n="{{modaltitle}}"></h5>
3738

3839
</div>
3940

40-
<div class="col-xs-10 contents" app-view-segment="1">
41+
<div id="segment1" class="col-xs-10 contents" app-view-segment="1">
4142
<div class="col-xs-8">
4243
<h3 class="green bold" data-i18n="_home-title_"></h3>
4344
<br>

src/main/webapp/js/workbench/search-querying-and-exploration/search-controller.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ var SearchCtrl = function($scope, ConfigurationService) {
44
var services = ConfigurationService.getComponentServices(":Solr");
55
var searchServiceUrl = services[0].serviceUrl;
66

7-
$scope.url = "";
8-
$scope.setUrl = function(){
9-
$scope.url= searchServiceUrl;
10-
};
7+
$scope.url = searchServiceUrl;
118

129
$scope.close = function(modalID) {
1310
$(modalID).modal('hide');

src/main/webapp/js/workbench/search-querying-and-exploration/search.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<div ng-controller="SearchCtrl">
22
<h3 class="green bold" data-i18n="_search_"></h3>
3-
<button type="button" class="btn btn-primary btn-large" data-toggle="modal" ng-click="setUrl(); openModal();">Open Solr</button>
3+
4+
<iframe id="searchFrame" frameborder="0" style="width:100%; height:1400px" src="{{url}}"></iframe>
5+
6+
<!--button type="button" class="btn btn-primary btn-large" data-toggle="modal" ng-click="openModal();">Open Solr</button>
47
58
<div class="modal" id="fullModal">
69
<div class="modal-content">
@@ -12,5 +15,5 @@ <h5 class="modal-title green bold" data-i18n="_faceted-search_"></h5>
1215
<modal-iframe></modal-iframe>
1316
</div>
1417
</div>
15-
</div>
18+
</div-->
1619
</div>

0 commit comments

Comments
 (0)