Skip to content
Snippets Groups Projects
Commit 0d2148dd authored by cramakri's avatar cramakri
Browse files

SP-259 : Added a core-plugin that implements the crud-demo

SVN: 26460
parent 7981d48e
No related branches found
No related tags found
No related merge requests found
Showing
with 7693 additions and 0 deletions
body { font: 14px "Trebuchet MS", sans-serif; }
h1 { font: 16px; }
h3 { font: 12px; }
div#vis { padding-top: 10px;}
div#vis div { padding-top: 2px;}
table td {
padding: 0px 10px;
}
thead {
font-weight: bold ;
font-size: 120%;
}
span.hovering.action {
color: #05F;
cursor: pointer;
}
#add-edit-form {
position: relative;
top: 20px;
}
button {
font: 14px "Trebuchet MS";
background-color: #222;
background-image: -moz-linear-gradient(top, rgba(255,255,255,.25), rgba(255,255,255,.11));
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, rgba(255,255,255,.25)),color-stop(1, rgba(255,255,255,.11)));
background-image: -webkit-linear-gradient(rgba(255,255,255,.25), rgba(255,255,255,.11));
color: #fff;
text-rendering: optimizeLegibility;
text-shadow: 0 -1px 1px #222;
padding: 3px 5px 3px 5px;
border: 0;
border-radius: 0;
border-bottom: 1px solid #222;
margin: 0;
-moz-box-shadow: 0 1px 3px #999;
-webkit-box-shadow: 0 1px 3px #999;
box-shadow: 0 1px 3px #999;
}
button.first {
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}
button.last {
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
}
button.active {
background-color: rgb(65,102,133);
}
button:hover {
background-color: steelblue;
}
input {
font: 14px "Trebuchet MS";
background-image: -moz-linear-gradient(top, rgba(255,255,255,.25), rgba(255,255,255,.11));
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, rgba(255,255,255,.25)),color-stop(1, rgba(255,255,255,.11)));
background-image: -webkit-linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,.1));
color: #000;
text-rendering: optimizeLegibility;
padding: 3px 5px 3px 5px;
border: 0;
border-radius: 0;
margin: 0;
-moz-box-shadow: 0 1px 3px #999;
-webkit-box-shadow: 0 1px 3px #999;
box-shadow: 0 1px 3px #999;
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
openbis/resource/examples/crud-demo/1/as/webapps/crud-demo/html/images/openBIS_Logo.png

7.06 KiB

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 15.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="400.023px" height="174.566px" viewBox="0 0 400.023 174.566" enable-background="new 0 0 400.023 174.566"
xml:space="preserve">
<g id="Layer_1">
<g>
<text transform="matrix(1 0 0 1 46.4854 154.2764)"><tspan x="0" y="0" fill="#010101" font-family="'HelveticaNeue-Bold'" font-size="93.505" letter-spacing="-4">open</tspan><tspan x="204.679" y="0" fill="#231F20" font-family="'HelveticaNeue'" font-size="93.505">BIS</tspan></text>
<rect x="204.234" y="158.748" fill="none" width="192.64" height="14.936"/>
<text transform="matrix(1 0 0 1 204.2329 169.876)" fill="#010101" font-family="'HelveticaNeue'" font-size="15.5842">Biology Information System</text>
<g>
<g>
<g>
<g>
<polygon fill="#068172" points="125.213,81.967 141.416,98.167 147.252,92.333 131.053,76.132 125.213,76.132 "/>
</g>
<g>
<g>
<polygon fill="#068172" points="120.206,81.967 104.005,98.167 98.168,92.333 114.368,76.132 120.206,76.132 "/>
</g>
<g>
<polygon fill="#068172" points="120.206,65.286 104.005,49.084 98.168,54.92 114.368,71.12 120.206,71.12 "/>
</g>
</g>
</g>
<g>
<polygon fill="#068172" points="125.213,65.286 141.416,49.084 147.252,54.92 131.053,71.12 125.213,71.12 "/>
</g>
</g>
<g>
<g>
<polygon fill="#A4A4A4" points="76.131,16.201 92.331,0 98.168,5.836 81.969,22.036 76.13,22.036 "/>
</g>
<g>
<g>
<polygon fill="#ADACAF" points="76.131,32.882 92.331,49.084 98.168,43.247 81.969,27.048 76.13,27.048 "/>
</g>
<g>
<g>
<polygon fill="#ADACAF" points="71.122,32.882 54.921,49.084 49.084,43.247 65.283,27.048 71.123,27.048 "/>
</g>
<g>
<polygon fill="#ADACAF" points="71.122,16.201 54.921,0 49.084,5.836 65.283,22.036 71.123,22.036 "/>
</g>
</g>
</g>
</g>
<g>
<g>
<polygon fill="#ADACAF" points="27.046,65.286 43.247,49.084 49.083,54.92 32.884,71.12 27.045,71.12 "/>
</g>
<g>
<polygon fill="#ADACAF" points="27.046,81.967 43.247,98.167 49.083,92.333 32.884,76.132 27.045,76.132 "/>
</g>
<g>
<polygon fill="#ADACAF" points="22.038,81.967 5.837,98.167 0,92.333 16.199,76.132 22.038,76.132 "/>
</g>
<g>
<polygon fill="#ADACAF" points="22.038,65.286 5.837,49.084 0,54.92 16.199,71.12 22.038,71.12 "/>
</g>
</g>
</g>
</g>
</g>
<g id="Layer_2">
</g>
</svg>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<!--
This is a simple Test app for openBIS. It strives to be the simplest non-trivial app. It logs into the sprint server and retrieves all samples of a particular type, and shows the first 50 of them.
-->
<title>OpenBIS Simple Test</title>
<link type="text/css" rel="stylesheet" href="body-style.css" />
<link type="text/css" rel="stylesheet" href="button.css" />
<script type="text/javascript" src="/openbis/resources/js/jquery.js"></script>
<script type="text/javascript" src="openbis.js"></script>
<script type="text/javascript" src="d3.js"></script>
<script type="text/javascript" src="d3.layout.js"></script>
<script type="text/javascript" src="d3.time.js"></script>
<script type="text/javascript" src="openbis-login.js"></script>
<script type="text/javascript" src="webapp.js"></script>
<!-- To speed development, cache the requests -->
<!-- <script type="text/javascript" src="openbis-request-cache.js"></script> -->
<script>
$(document).ready(function() {
configureLoginPage(openbisServer, enterApp);
});
</script>
</head>
<body>
<img id="openbis-logo" src="images/openBIS_Logo.png" alt="openBIS" style="position: absolute; right: 10px; height: 100px;"/>
<div id="login-form-div">
<h1>openBIS My Installation</h1>
<form id="login-form" action="javascript:">
<input id="username" type="text" required="required">
<input id="password" type="password" required="required">
<button class="login-button" id="login-button" type="submit">Login</button>
</form>
</div>
<div id="main">
<div id="button-group">
<button id="logout-button">Logout</button>
</div>
<form id="add-edit-form" action="javascript:">
<input id="identifier" type="text" size="3" readonly>
<input id="info" type="text" required="required">
<button id="insert-update-button" type="submit">Add</button>
<button id="clear-button" type="button">Clear</button>
</form>
</div>
</body>
</html>
/**
* A module for configuring the login page to openBIS. It hides and shows
* the login form and main content as necessary. It invokes a specified
* function on successful login.
*
* This module assumes that the page follows the structure of our standard
* login page. This means that the Following elements are defined :
*
* div#login-form-div
* form#login-form
* input#username
* input#password
* button#login-button
* div#main
* button#logout-button
*
* Assuming these elements are defined, this module configures their appeareance
* and behavior.The div#main element is initially hidden until the user logs in.
* Once logged in, the div#login-form-div element is hidden and the div#main
* element is made visible.
*
* @module openbis-login
* @requires jquery
*/
/**
* Configure the login page to hide and show the login form and main content
* as appropriate
*
* @param openbis The openbis facade object
* @param onLogin The function to be called when login succeeds.
* @function
*/
function configureLoginPage(openbis, onLogin)
{
$('#main').hide();
var username = $("#username").value;
if(username == null || username.length==0) {
$("#username").focus();
} else {
$("#login-button").focus();
}
$('#logout-button').click(function() {
openbis.logout(function(data) {
$("#login-form-div").show();
$("#main").hide();
$("#username").focus();
});
});
$('#login-form').submit(function() {
openbis.login( $.trim($('#username').val()), $.trim($('#password').val()), function(data) { onLogin(data) })
});
openbis.ifRestoredSessionActive(function(data) { onLogin(data) });
// Make the ENTER key the default button
$("login-form input").keypress(function (e) {
if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) {
$('button[type=submit].default').click();
return false;
} else {
return true;
}
});
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
# The properties file for an example webapps plugin
# This file has no properties defined because none need to be defined.
webapp-folder = html
File added
CREATE TABLE EXAMPLEDATA (ID SERIAL PRIMARY KEY, INFO VARCHAR);
\ No newline at end of file
#
# Data source for the database storing crud example data.
#
version-holder-class=ch.ethz.cisd.cruddemo.db.CrudDemoDbVersionHolder
databaseEngineCode=postgresql
basicDatabaseName=cruddemo
databaseKind=dev
scriptFolder=cruddb/sql
#scriptFolder=sql
# owner =
# password =
# Credentials of a database user which is able to create a new database or roles in it.
# Leave empty to use the db engines defaults.
# Used only during the first start of the server or when server is upgraded to a new version.
# adminUser =
# adminPassword =
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment