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

Commit bfa3f74

Browse files
jjjj
authored andcommitted
Fixed modals. More GUI tweaks
1 parent d64de52 commit bfa3f74

File tree

15 files changed

+104
-52
lines changed

15 files changed

+104
-52
lines changed

src/main/webapp/css/app.css

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
html, body{
44
height:100%;
55
font: .87em Helvetica, arial, freesans, clean, sans-serif;
6-
overflow-y: scroll;
6+
}
7+
8+
body{
9+
overflow-y: auto;
710
}
811

912
#contents{
@@ -186,12 +189,11 @@ a.accordion-toggle:hover{
186189
}
187190

188191
body.modal-open {
189-
overflow-y: scroll;
190192
margin: 0;
191193
}
192194

193195
.modal {
194-
overflow: auto;
196+
overflow-y: hidden;
195197
}
196198

197199
/* Forms */

src/main/webapp/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
<ul class="nav navbar-nav navbar-right">
4747
<li>
48-
<div class="navbar-form" ng-show="currentAccount.username">
48+
<div ng-show="currentAccount.username">
4949
<span class="strong">You are logged in as <strong>{{currentAccount.username}}</strong></span> <button class="btn-sm btn-success" ng-click="logout()">Logout</button>
5050
</div>
5151
<div ng-hide="loggedIn">

src/main/webapp/js/controllers.js

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,15 @@ function StackMenuCtrl($scope) {
7575

7676
function LoginCtrl($scope, flash, AccountService, LoginService, ServerErrorResponse, Base64) {
7777
$scope.currentAccount = angular.copy(AccountService.getAccount());
78+
$scope.loggedIn = false;
7879
if($scope.currentAccount.user != null){
7980
LoginService.login($scope.currentAccount.user, $scope.currentAccount.pass)
8081
.then(function(data) {
8182
$scope.currentAccount = angular.copy(AccountService.getAccount());
83+
$scope.close('#modalLogin');
8284
$scope.login.username = null;
8385
$scope.login.password = null;
86+
$scope.loggedIn = true;
8487
}, function(response) {
8588
flash.error = ServerErrorResponse.getMessage(response.status);
8689
$scope.login.username = null;
@@ -97,12 +100,17 @@ function LoginCtrl($scope, flash, AccountService, LoginService, ServerErrorRespo
97100
LoginService.login(Base64.encode($scope.login.username), Base64.encode($scope.login.password))
98101
.then(function(data) {
99102
$scope.currentAccount = angular.copy(AccountService.getAccount());
103+
$scope.close('#modalLogin');
100104
$scope.login.username = null;
101105
$scope.login.password = null;
106+
if($scope.currentAccount.user != null){
107+
$scope.loggedIn = true;
108+
}
102109
}, function(response) {
103110
flash.error = ServerErrorResponse.getMessage(response.status);
104111
$scope.login.username = null;
105112
$scope.login.password = null;
113+
$scope.loggedIn = false;
106114
});
107115
};
108116

@@ -117,6 +125,7 @@ function LoginCtrl($scope, flash, AccountService, LoginService, ServerErrorRespo
117125
LoginService.logout()
118126
.then(function(data) {
119127
$scope.currentAccount = angular.copy(AccountService.getAccount());
128+
$scope.loggedIn = false;
120129
});
121130
};
122131

@@ -316,34 +325,30 @@ app.controller('VirtuosoCtrl', function($scope, ConfigurationService, AccountSer
316325
*
317326
***************************************************************************************************/
318327

319-
app.controller('FaceteFormCtrl', function($scope, ConfigurationService, GraphService) {
328+
app.controller('FaceteFormCtrl', function($scope, ConfigurationService, GraphService, AccountService) {
320329
//Settings for Facete
321330

322331
$scope.namedGraphs = [];
323332
$scope.component = ConfigurationService.getComponent(":Facete");
324333
var services = ConfigurationService.getComponentServices(":Facete");
325-
$scope.facete = {
326-
service : ConfigurationService.getSPARQLEndpoint(),
327-
dataset : "",
328-
};
329334

330335
$scope.refreshGraphList = function() {
331336
GraphService.getAccessibleGraphs(false, false, true).then(function(graphs) {
332337
$scope.namedGraphs = graphs;
333-
$scope.facete.dataset = $scope.namedGraphs[0];
338+
$scope.facete = {
339+
service : ConfigurationService.getSPARQLEndpoint(),
340+
dataset : $scope.namedGraphs[0].name,
341+
};
334342
});
335343
};
336344

337345
$scope.refreshGraphList();
338-
339346
$scope.url = "";
340347

341348
$scope.setUrl = function(){
342349
$scope.url= services[0].serviceUrl +
343350
'?service-uri='+ $scope.facete.service+
344-
'&default-graph-uri=' + $scope.facete.dataset.replace(':',ConfigurationService.getUriBase());
345-
346-
351+
'&default-graph-uri=' + $scope.facete.dataset.name.replace(':',ConfigurationService.getUriBase());
347352
};
348353

349354
$scope.$watch( function () { return AccountService.getUsername(); }, function () {

src/main/webapp/js/services.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ module.factory("LoginService", function($http, $location, $cookieStore, AccountS
719719
$http.defaults.headers.common.Authorization = 'User ' + encodedUser + ' Pass ' + encodedPass;
720720
$cookieStore.put('User', encodedUser);
721721
$cookieStore.put('Pass', encodedPass);
722-
console.log($http.defaults.headers.common);
722+
//console.log($http.defaults.headers.common);
723723

724724
}, function(response) {
725725
//todo

src/main/webapp/partials/account.html

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,24 @@ <h2>Account activity</h2>
3434
<dt>Last access:</dt><dd>Today at 9:55 AM</dd>
3535
<dt>From countries:</dt><dd>Switzerland, France</dd>
3636
</dl-->
37-
38-
<dl class="dl-horizontal" ng-if="currentAccount.username">
39-
<dt>Name:</dt><dd>{{currentAccount.username}}</dd>
40-
<dt>E-mail:</dt><dd>{{currentAccount.email}}</dd>
41-
</dl>
37+
<div class="col-lg-8">
38+
<table class="table table-bordered" ng-if="currentAccount.username">
39+
<tr>
40+
<td>Username:</td><td>{{currentAccount.username}}</td>
41+
</tr>
42+
<tr>
43+
<td>E-mail address:</td><td>{{currentAccount.email}}</td>
44+
</tr>
45+
</table>
4246

4347
<button type="button" class="btn-sm btn-success" data-toggle="modal" data-target="#modalChangePassword" ng-if="currentAccount.username">Change password</button>
44-
48+
</div>
4549
<div class="modal fade" id="modalChangePassword">
50+
<div class="modal-dialog">
51+
<div class="modal-content">
4652
<form name="changePasswordForm" class="form-horizontal InputForm" role="form">
4753
<div class="modal-header">
48-
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
54+
<button type="button" class="close" ng-click="close('#modalLogin')" aria-hidden="true">&times;</button>
4955
<h5 class="modal-title green bold">Change password</h5>
5056
</div>
5157
<div class="modal-body">
@@ -70,11 +76,13 @@ <h5 class="modal-title green bold">Change password</h5>
7076
</div>
7177
<div class="modal-footer">
7278
<button type="submit" class="btn-sm btn-success" ng-click="changePassword();" ng-disabled="changePasswordForm.$invalid">Change</button>
73-
<button type="button" class="btn-sm btn-default" data-dismiss="modal">Cancel</button>
79+
<button type="button" class="btn-sm btn-default" ng-click="close('#modalLogin')">Cancel</button>
7480
</div>
7581
</form>
7682
</div>
7783

7884
</div>
7985
</div>
86+
</div>
87+
</div>
8088

src/main/webapp/partials/admin/users.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ <h3 class="green bold">Users Management</h3>
66
<div class="modal fade" id="modalUser">
77
<form name="userForm" class="form-horizontal InputForm" role="form">
88
<div class="modal-header">
9-
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
9+
<button type="button" class="close" ng-click="close('#modalLogin')" aria-hidden="true">&times;</button>
1010
<h5 class="modal-title green bold">{{modaltitle}}</h5>
1111
</div>
1212
<div class="modal-body">
@@ -55,7 +55,7 @@ <h5 class="modal-title green bold">{{modaltitle}}</h5>
5555
</div>
5656
<div class="modal-footer">
5757
<button type="submit" class="btn-sm btn-success" ng-click="save();" ng-disabled="userForm.$invalid">Save</button>
58-
<button type="button" class="btn-sm btn-default" data-dismiss="modal">Cancel</button>
58+
<button type="button" class="btn-sm btn-default" ng-click="close('#modalLogin')">Cancel</button>
5959
</div>
6060
</form>
6161
</div>

src/main/webapp/partials/authoring/ontowiki.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ <h3 class="green bold">{{component.label}}</h3>
1414
</div>
1515
<!-- Modal -->
1616
<div class="modal fade" id="fullModal" >
17+
<div class="modal-content">
1718
<div class="modal-header">
18-
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
19+
<button type="button" class="close" ng-click="close('#modalLogin')" aria-hidden="true">&times;</button>
1920
<h5 class="modal-title green bold">{{component.label}}</h5>
2021
</div>
2122
<div class="modal-body">
2223
<modal-iframe></modal-iframe>
23-
</div>
24+
</div>
25+
</div>
2426
</div><!-- /.modal -->
2527
</div>
2628

src/main/webapp/partials/default.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ <h6><a class="list-group-item" target="{{item.target}}" href="{{item.route}}">{{
2525
<h3 class="green bold">Welcome to the GeoKnow Generator</h3>
2626
<br>
2727
</div>
28+
<!-- Subscribe to all flash messages. -->
29+
<div flash-alert active-class="in alert" class="fade" duration="0">
30+
<button type="button" class="close" ng-click="hide()">&times;</button>
31+
<span class="alert-message">{{flash.message}}</span>
32+
</div>
2833
</div>
2934
</div>
3035

src/main/webapp/partials/extraction-and-loading/sparqlify.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,16 @@ <h3 class="green bold">{{component.label}}</h3>
2626
</form>
2727

2828
<!-- Modal -->
29-
<div class="modal fade" id="fullModal" >
29+
<div class="modal fade" id="fullModal">
30+
<div class="modal-content">
3031
<div class="modal-header">
31-
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
32+
<button type="button" class="close" ng-click="close('#modalLogin')" aria-hidden="true">&times;</button>
3233
<h5 class="modal-title green bold">Sparqlify</h5>
3334
</div>
3435
<div class="modal-body">
3536
<modal-iframe></modal-iframe>
3637
</div>
38+
</div>
3739
</div><!-- /.modal -->
3840
</div>
3941

src/main/webapp/partials/querying-and-exploration/facete.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ <h3 class="green bold">{{component.label}}</h3>
99
</dl>
1010

1111
<p>A tool for exploring (geographical) Linked Data datasets on the Web. To get started select a data set from the drop down menu.</p>
12-
<form class="form-horizontal InputForm" role="form" >
12+
<form class="form-horizontal InputForm" role="form">
1313
<div class="form-group">
1414
<label for="Endpoint">Endpoint</label>
1515
<input type="url" class="form-control" id="Endpoint" disabled="disabled" ng-model="facete.service"></input>
@@ -31,14 +31,16 @@ <h3 class="green bold">{{component.label}}</h3>
3131
</form>
3232

3333
<!-- Modal -->
34-
<div class="modal fade" id="fullModal" >
34+
<div class="modal fade" id="fullModal">
35+
<div class="modal-content">
3536
<div class="modal-header">
36-
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
37+
<button type="button" class="close" ng-click="close('#modalLogin')" aria-hidden="true">&times;</button>
3738
<h5 class="modal-title green bold">Facete</h5>
3839
</div>
3940
<div class="modal-body">
4041
<modal-iframe></modal-iframe>
41-
</div>
42-
</div><!-- /.modal -->
42+
</div>
43+
</div>
44+
</div><!-- /.modal -->
4345
</div>
4446

0 commit comments

Comments
 (0)