Commit 4bec18d0 authored by Bertrand  NÉRON's avatar Bertrand NÉRON

replace secreton by txssdb

parent cc6f6b8a
[
// filenames matching these regexps will not be pushed to the database
// uncomment to activate; separate entries with ","
// ".*~$"
// ".*\\.swp$"
// ".*\\.bak$"
"\\.project" ,
"\\.couchapprc",
".*\\.swp$",
"\\.svn"
]
## Generated CouchApp
This is meant to be an example CouchApp and to ship with most of the CouchApp goodies.
Clone with git:
git clone git://github.com/couchapp/example.git
cd example
Install with
couchapp push . http://localhost:5984/example
or (if you have security turned on)
couchapp push . http://adminname:adminpass@localhost:5984/example
You can also create this app by running
couchapp generate example && cd example
couchapp push . http://localhost:5984/example
Deprecated: *couchapp generate proto && cd proto*
## Todo
* factor CouchApp Commonjs to jquery.couch.require.js
* use $.couch.app in app.js
## License
Apache 2.0
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
// Apache 2.0 J Chris Anderson 2011
$(function() {
// friendly helper http://tinyurl.com/6aow6yn
$.fn.serializeObject = function() {
var o = {};
var a = this.serializeArray();
$.each(a, function() {
if (o[this.name]) {
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
}
o[this.name].push(this.value || '');
} else {
o[this.name] = this.value || '';
}
});
return o;
};
var path = unescape(document.location.pathname).split('/'),
design = path[3],
db = $.couch.db(path[1]);
function drawItems() {
db.view(design + "/recent-items", {
descending : "true",
limit : 50,
update_seq : true,
success : function(data) {
setupChanges(data.update_seq);
var them = $.mustache($("#recent-messages").html(), {
items : data.rows.map(function(r) {return r.value;})
});
$("#content").html(them);
}
});
};
drawItems();
var changesRunning = false;
function setupChanges(since) {
if (!changesRunning) {
var changeHandler = db.changes(since);
changesRunning = true;
changeHandler.onChange(drawItems);
}
}
$.couchProfile.templates.profileReady = $("#new-message").html();
$("#account").couchLogin({
loggedIn : function(r) {
$("#profile").couchProfile(r, {
profileReady : function(profile) {
$("#create-message").submit(function(e){
e.preventDefault();
var form = this, doc = $(form).serializeObject();
doc.created_at = new Date();
doc.profile = profile;
db.saveDoc(doc, {success : function() {form.reset();}});
return false;
}).find("input").focus();
}
});
},
loggedOut : function() {
$("#profile").html('<p>Please log in to see your profile.</p>');
}
});
});
\ No newline at end of file
/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
* Licensed under the MIT License (LICENSE.txt).
*
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
* Thanks to: Seamus Leahy for adding deltaX and deltaY
*
* Version: 3.0.6
*
* Requires: 1.2.2+
*/
(function($) {
var types = ['DOMMouseScroll', 'mousewheel'];
if ($.event.fixHooks) {
for ( var i=types.length; i; ) {
$.event.fixHooks[ types[--i] ] = $.event.mouseHooks;
}
}
$.event.special.mousewheel = {
setup: function() {
if ( this.addEventListener ) {
for ( var i=types.length; i; ) {
this.addEventListener( types[--i], handler, false );
}
} else {
this.onmousewheel = handler;
}
},
teardown: function() {
if ( this.removeEventListener ) {
for ( var i=types.length; i; ) {
this.removeEventListener( types[--i], handler, false );
}
} else {
this.onmousewheel = null;
}
}
};
$.fn.extend({
mousewheel: function(fn) {
return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
},
unmousewheel: function(fn) {
return this.unbind("mousewheel", fn);
}
});
function handler(event) {
var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0;
event = $.event.fix(orgEvent);
event.type = "mousewheel";
// Old school scrollwheel delta
if ( orgEvent.wheelDelta ) { delta = orgEvent.wheelDelta/120; }
if ( orgEvent.detail ) { delta = -orgEvent.detail/3; }
// New school multidimensional scroll (touchpads) deltas
deltaY = delta;
// Gecko
if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
deltaY = 0;
deltaX = -1*delta;
}
// Webkit
if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; }
if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; }
// Add event and delta to the front of the arguments
args.unshift(event, delta, deltaX, deltaY);
return ($.event.dispatch || $.event.handle).apply(this, args);
}
})(jQuery);
(function () {
var tokenRegex = /\{([^\}]+)\}/g,
objNotationRegex = /(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g, // matches .xxxxx or ["xxxxx"] to run over object properties
replacer = function (all, key, obj) {
var res = obj;
key.replace(objNotationRegex, function (all, name, quote, quotedName, isFunc) {
name = name || quotedName;
if (res) {
if (name in res) {
res = res[name];
}
typeof res == "function" && isFunc && (res = res());
}
});
res = (res == null || res == obj ? all : res) + "";
return res;
},
fill = function (str, obj) {
return String(str).replace(tokenRegex, function (all, key) {
return replacer(all, key, obj);
});
};
Raphael.fn.popup = function (X, Y, set, pos, ret) {
pos = String(pos || "top-middle").split("-");
pos[1] = pos[1] || "middle";
var r = 5,
bb = set.getBBox(),
w = Math.round(bb.width),
h = Math.round(bb.height),
x = Math.round(bb.x) - r,
y = Math.round(bb.y) - r,
gap = Math.min(h / 2, w / 2, 10),
shapes = {
top: "M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}l-{right},0-{gap},{gap}-{gap}-{gap}-{left},0a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z",
bottom: "M{x},{y}l{left},0,{gap}-{gap},{gap},{gap},{right},0a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z",
right: "M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}l0-{bottom}-{gap}-{gap},{gap}-{gap},0-{top}a{r},{r},0,0,1,{r}-{r}z",
left: "M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}l0,{top},{gap},{gap}-{gap},{gap},0,{bottom}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z"
},
offset = {
hx0: X - (x + r + w - gap * 2),
hx1: X - (x + r + w / 2 - gap),
hx2: X - (x + r + gap),
vhy: Y - (y + r + h + r + gap),
"^hy": Y - (y - gap)
},
mask = [{
x: x + r,
y: y,
w: w,
w4: w / 4,
h4: h / 4,
right: 0,
left: w - gap * 2,
bottom: 0,
top: h - gap * 2,
r: r,
h: h,
gap: gap
}, {
x: x + r,
y: y,
w: w,
w4: w / 4,
h4: h / 4,
left: w / 2 - gap,
right: w / 2 - gap,
top: h / 2 - gap,
bottom: h / 2 - gap,
r: r,
h: h,
gap: gap
}, {
x: x + r,
y: y,
w: w,
w4: w / 4,
h4: h / 4,
left: 0,
right: w - gap * 2,
top: 0,
bottom: h - gap * 2,
r: r,
h: h,
gap: gap
}][pos[1] == "middle" ? 1 : (pos[1] == "top" || pos[1] == "left") * 2];
var dx = 0,
dy = 0,
out = this.path(fill(shapes[pos[0]], mask)).insertBefore(set);
switch (pos[0]) {
case "top":
dx = X - (x + r + mask.left + gap);
dy = Y - (y + r + h + r + gap);
break;
case "bottom":
dx = X - (x + r + mask.left + gap);
dy = Y - (y - gap);
break;
case "left":
dx = X - (x + r + w + r + gap);
dy = Y - (y + r + mask.top + gap);
break;
case "right":
dx = X - (x - gap);
dy = Y - (y + r + mask.top + gap);
break;
}
out.translate(dx, dy);
if (ret) {
ret = out.attr("path");
out.remove();
return {
path: ret,
dx: dx,
dy: dy
};
}
set.translate(dx, dy);
return out;
};
})();
\ No newline at end of file
This diff is collapsed.
.gene_SctC { background-color: #f0de2f };
.gene_SctD { background-color: #550000}
.gene_SctF { background-color: #4D4D4D}
.gene_SctI { background-color: #808080}
.gene_SctJ { background-color: #da0000}
.gene_SctL { background-color: #0000FF}
.gene_SctK { background-color: #0000FF}
.gene_SctN { background-color: #00ff00}
.gene_SctO { background-color: LimeGreen}
.gene_SctQ { background-color: #0000FF}
.gene_SctR { background-color: #8800AA}
.gene_SctS { background-color: #8800AA}
.gene_SctT { background-color: #8800AA}
.gene_SctU { background-color: #8800AA}
.gene_SctV { background-color: #8800AA}
.gene_SycD { background-color: DarkGreen}
.gene_SycN { background-color: lightGreen}
.gene_YopB { background-color: #333333}
.gene_YopD { background-color: #333333}
.gene_YopN { background-color: Chartreuse}
.gene_LcrV { background-color: #333333}
/* style for the home page */
body {
font-family:Verdana,Arial,sans-serif;
font-size: 0.9em;
}
h1 {
font-size:3em;
text-align:center;
}
h2 {
text-align:center;
}
#head {
font:Verdana,Arial,sans-serif;
font-size: 1.1em;
}
#head img{
display: block;
margin: 0 auto;
width:459px;
}
.citation{
margin-right:5%;
margin-left:5%;
border: 1px solid #CCCCCC;
background-color: #EFEFEF;
color: #000000;
padding: 5px;
font-size: 0.9em;
#line-height: 1.8em;
}
.citation_author{}
.citation_date{}
.citation_article_title{}
.citation_journal_title{}
.citation_issue{}
.citation_start_page{}
.citation_doi{}
.gene_name{
font-style:italic;
}
#request form label{
display: block;
padding: 2px;
margin: 0.5em;
}
#request form{
margin: 1em;
background-color: #F9F9F9;
}
#results{
margin-bottom:2em;
}
#head p{
text-indent:1em;
margin-right:0.5em;
margin-left:0.5em;
padding-right:0.5em;
padding-left:0.5em;
}
#head p:first-letter{
font-weight:bold;
}
#footer{
text-align:center;
margin: 2em;
}
\ No newline at end of file
/*
* jQuery UI Accordion 1.8.17
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Accordion#theming
*/
/* IE/Win - Fix animation bug - #4615 */
.ui-accordion { width: 100%; }
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
.ui-accordion .ui-accordion-li-fix { display: inline; }
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
.ui-accordion .ui-accordion-content-active { display: block; }
/*
* jQuery UI CSS Framework 1.8.17
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Theming
*/
@import "jquery.ui.base.css";
@import "jquery.ui.theme.css";
/*
* jQuery UI Autocomplete 1.8.17
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Autocomplete#theming
*/
.ui-autocomplete { position: absolute; cursor: default; }
/* workarounds */
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
/*
* jQuery UI Menu 1.8.17
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Menu#theming
*/
.ui-menu {
list-style:none;
padding: 2px;
margin: 0;
display:block;
float: left;
}
.ui-menu .ui-menu {
margin-top: -3px;
}
.ui-menu .ui-menu-item {
margin:0;
padding: 0;
zoom: 1;
float: left;
clear: left;
width: 100%;
}
.ui-menu .ui-menu-item a {
text-decoration:none;
display:block;
padding:.2em .4em;
line-height:1.5;
zoom:1;
font-size: 12px;
}
.ui-menu .ui-menu-item a.ui-state-hover,
.ui-menu .ui-menu-item a.ui-state-active {
font-weight: normal;
margin: -1px;
}
@import url("jquery.ui.core.css");
@import url("jquery.ui.resizable.css");
@import url("jquery.ui.selectable.css");
@import url("jquery.ui.accordion.css");
@import url("jquery.ui.autocomplete.css");
@import url("jquery.ui.button.css");
@import url("jquery.ui.dialog.css");
@import url("jquery.ui.slider.css");
@import url("jquery.ui.tabs.css");
@import url("jquery.ui.datepicker.css");
@import url("jquery.ui.progressbar.css");
\ No newline at end of file
/*
* jQuery UI Button 1.8.17
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*