-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
188 lines (170 loc) · 7.04 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<!DOCTYPE html>
<html lang="en">
<head>
<title>(Bibliographic Framework Initiative Technical Site - BIBFRAME.ORG)</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" type="image/png" href="/static/images/favicon.ico">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="/css/bootstrap-theme.min.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="//oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.js"></script>
<!--<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>-->
<script type="text/javascript" src="/static/js/bootstrap.min.js"></script>
<script src="//cdn.datatables.net/1.10.9/js/jquery.dataTables.js"></script>
<link rel="stylesheet" href="//cdn.datatables.net/1.10.9/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="bfe/builds/bfe.css">
<style>
@media screen {
body {
padding-top: 50px;
padding-bottom: 20px;
}
}
@media print {
a[href]:after {
content: none;
}
}
</style>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">BIBFRAME Editor Demo</a>
</div>
</div>
</nav>
<!-- Breadcrumbs -->
<ol class="breadcrumb">
<li><a href="/">Home</a></li>
</ol>
<ul class="nav flex-column">
<li class="nav-item"><a class="nav-link" href="bfe/index.html">Editor</a></li>
<li class="nav-item"><a class="nav-link" href="profile-edit/">Profile Editor</a></li>
<li class="nav-item"><a class="nav-link" href="http://bibframe.org/bibliomata/bibframe/index-en.html">BIBFRAME ontology (local)</a></li>
<li class="nav-item"><a class="nav-link" href="http://bibframe.org/bibliomata/mads/index-en.html">MADS ontology (local)</a></li>
</ul>
<!--
<div class="modal fade" id="up-modal" tabindex="-1" role="dialog" aria-labelledby="up-title">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="up-title">Enter Credentials</h4>
</div>
<div class="modal-body">
<form id="authForm">
<div class="form-group">
<label for="username" class="control-label">Username:</label>
<input type="text" class="form-control" id="username" name="username">
</div>
<div class="form-group">
<label for="password" class="control-label">Password:</label>
<input type="password" class="form-control" id="password" name="password">
</div>
<input type="hidden" id="auth-type" name="auth-type" value="">
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary" id="up-login">Login</button>
</div>
</div>
</div>
</div>
<script>
var $login = '<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#up-modal" data-ltype="Local Login">Local Login</button> \
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#up-modal" data-ltype="LDAP Login">LDAP Login</button>';
var $logout = '<button type="button" class="btn btn-primary" id="up-logout">Logout</button>';
$('.container-fluid').append('<span id="up-buttons" class="pull-right"></span>');
$(function () {
var cooks = document.cookie;
if (cooks.match(/access_token=|current_user=/)) {
$('#up-buttons').html($logout);
} else {
$('#up-buttons').html($login);
}
});
$('#up-modal').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
var type = button.data('ltype');
var modal = $(this);
modal.find('.modal-title').text(type);
var authType = (type.match(/LDAP/i)) ? 'ldap' : 'local';
modal.find('#auth-type').val(authType);
})
$(document).on("click", "#up-login", function (e) {
e.preventDefault();
var authUrl = ($("#auth-type").val() == "ldap") ? "/verso/auth/ldap" : "/verso/api/Users/login";
$.ajax ({
url: authUrl,
type: "POST",
data: JSON.stringify({
username: $("#username").val(),
password: $("#password").val()
}),
contentType: "application/json; charset=utf-8",
error: function(x) {
alert(JSON.parse(x.responseText).error.message);
// alert('Login failed');
$("#username").val("");
$("#password").val("");
},
success: function() {
if (!document.cookie.match(/access_token=|current_user=/)) {
alert('Login failed');
$("#username").val("");
$("#password").val("");
} else {
$("#up-modal").modal('hide');
$('#up-buttons').html($logout);
}
},
});
});
$(document).on("click", "#up-logout", function (e) {
e.preventDefault();
$.ajax ({
url: "/verso/api/Users/logout",
type: "POST",
contentType: "application/json; charset=utf-8",
error: function() {
alert('Logout failed');
},
success: function() {
$('#up-buttons').html($login);
},
});
});
</script>
<iframe src="http://localhost:5601/goto/c47c547d125a13d53824b701ec8dc03d?embed=true" height="600" width="800"></iframe>
-->
<div id="bfeditor" class="container-fluid">
<div id="iealert"></div>
</div>
<script type="text/javascript" src="/recto/bfe/js/config-dev.js"></script>
<br/><br/><br/>
<hr>
<footer class="bs-footer" role="contentinfo">
<div class="container">
<p>This is a development view of the Bibliographic Framework Initiative project's editor. For more information, go to <a href="http://www.loc.gov/bibframe/">www.loc.gov/bibframe</a>.</p>
</div>
</footer>
</body>
</html>