Commit 7aaf4807 authored by jmz-b's avatar jmz-b
Browse files

initial commit

import js from Asclepios-Client and prototype interface
parents
{
"presets": [["es2015", { "modules": false }]]
}
# Files
.DS_Store
.ruby-version
npm-debug.log
# Folders
.idea/
.jekyll-cache/
.sass-cache
_gh_pages
_site
node_modules
\ No newline at end of file
The MIT License (MIT)
Copyright (c) 2017 Jeremy Thomas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
# snet-xnat-asclepios-search
Search the ASCLEPIOS symmetric searchable encryption service for XNAT subjects
## Usage
```command
npm install
npm start
```
\ No newline at end of file
This diff is collapsed.
document.addEventListener('DOMContentLoaded', () => {
const Result = (id, label) => `
<a class="panel-block result" href="/xnat/data/archive/subjects/${id}">
<span class="panel-icon">
<i class="fa fa-user" aria-hidden="true"></i>
</span>
${label}
</a>
`;
const input = document.querySelector('#input');
const panel = document.querySelector('#panel');
input.addEventListener("keyup", (event) => {
if (event.key === "Enter") {
panel.querySelectorAll('.result').forEach((result) => {
result.remove();
})
let response = search({ 'keyword': input.value }, '123', '123');
response.objects.forEach((obj) => {
let container = document.createElement("div");
container.innerHTML = Result(obj.ID, obj.label);
panel.appendChild(container);
})
}
});
});
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
@charset "utf-8";
// Customization
// You can easily customize Bulma with your own variables.
// Just uncomment the following block to see the result.
/*
// 1. Import the initial variables
@import "../node_modules/bulma/sass/utilities/initial-variables";
// 2. Set your own initial variables
// Update the blue shade, used for links
$blue: #06bcef;
// Add pink and its invert
$pink: #ff8080;
$pink-invert: #fff;
// Update the sans-serif font family
$family-sans-serif: "Helvetica", "Arial", sans-serif;
// 3. Set the derived variables
// Use the new pink as the primary color
$primary: $pink;
$primary-invert: $pink-invert;
// 4. Import the rest of Bulma
*/
@import "../node_modules/bulma/bulma";
.panel-heading img {
max-height: 4rem;
}
\ No newline at end of file
This diff is collapsed.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Search XNAT with the ASCLEPIOS symmetric searchable encryption service</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<section class="section">
<div class="container">
<nav id="panel" class="panel">
<div class="panel-heading">
<img src="./asclepios.png" alt="ASCLEPIOS">
</div>
<div class="panel-block">
<p class="control has-icons-left">
<input id="input" class="input is-medium" type="text" placeholder="Search">
<span class="icon is-left">
<i class="fa fa-search" aria-hidden="true"></i>
</span>
</p>
</div>
</nav>
</div>
</section>
<script type="text/javascript" src="lib/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src="lib/sjcl.js"></script>
<script type="text/javascript" src="lib/sse.js"></script>
<script type="text/javascript" src="lib/main.js"></script>
</body>
</html>
This diff is collapsed.
document.addEventListener('DOMContentLoaded', function () {
var Result = function Result(id, label) {
return '\n <a class="panel-block result" href="/xnat/data/archive/subjects/' + id + '">\n <span class="panel-icon">\n <i class="fa fa-user" aria-hidden="true"></i>\n </span>\n ' + label + '\n </a>\n ';
};
var input = document.querySelector('#input');
var panel = document.querySelector('#panel');
input.addEventListener("keyup", function (event) {
if (event.key === "Enter") {
panel.querySelectorAll('.result').forEach(function (result) {
result.remove();
});
var response = search({ 'keyword': input.value }, '123', '123');
response.objects.forEach(function (obj) {
var container = document.createElement("div");
container.innerHTML = Result(obj.ID, obj.label);
panel.appendChild(container);
});
}
});
});
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{
"_from": "bulma-start@0.0.4",
"_id": "bulma-start@0.0.4",
"_inBundle": false,
"_integrity": "sha512-/PbhZBs1tIqnU75eh1SVWKC2DeW+xtQaaKITRksvmlCSTp8BH88JJk+gML3XCGE2LhSWyHTT+AIh6mwtUyjlxQ==",
"_location": "/bulma-start",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "bulma-start@0.0.4",
"name": "bulma-start",
"escapedName": "bulma-start",
"rawSpec": "0.0.4",
"saveSpec": null,
"fetchSpec": "0.0.4"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/bulma-start/-/bulma-start-0.0.4.tgz",
"_shasum": "19a0783cd8f55d8f5b3d771c984ab56f72e75cb7",
"_spec": "bulma-start@0.0.4",
"_where": "/Users/jthomas/Desktop",
"author": {
"name": "Jeremy Thomas",
"email": "bbxdesign@gmail.com",
"url": "http://jgthms.com"
},
"bugs": {
"url": "https://github.com/jgthms/bulma-start/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Start package for Bulma",
"devDependencies": {
"autoprefixer": "^9.7.6",
"babel-cli": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-preset-es2015-ie": "^6.7.0",
"bulma": "^0.8.2",
"node-sass": "^4.13.1",
"npm-run-all": "^4.1.5",
"postcss-cli": "^7.1.0"
},
"homepage": "https://github.com/jgthms/bulma-start#readme",
"keywords": [
"sass",
"bulma",
"css",
"start"
],
"license": "MIT",
"name": "bulma-start",
"repository": {
"type": "git",
"url": "git+https://github.com/jgthms/bulma-start.git"
},
"scripts": {
"css-build": "node-sass _sass/main.scss css/main.css",
"css-deploy": "npm run css-build && npm run css-postcss",
"css-postcss": "postcss --use autoprefixer --output css/main.css css/main.css",
"css-watch": "npm run css-build -- --watch",
"deploy": "npm run css-deploy && npm run js-build",
"js-build": "babel _javascript --out-dir lib",
"js-watch": "npm run js-build -- --watch",
"start": "npm-run-all --parallel css-watch js-watch"
},
"version": "0.0.4",
"dependencies": {
"babel-preset-es2015": "^6.24.1"
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment