Commit 23467369 authored by Marc Duez's avatar Marc Duez

Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/vidjil/vidjil

Conflicts:
	browser/css/dark.css
	browser/css/light.css
	browser/css/vidjil.less
parents 2a7ea921 e646cd57
......@@ -438,7 +438,7 @@ line {
text-align: center;
border: solid;
border-width: 1px;
border-color: #FFF;
border-color: #000000;
border-radius: 5px;
margin: 0px 1px;
}
......@@ -446,6 +446,11 @@ line {
background: #073642;
}
.infoBox-open {
margin: -1px;
border: solid;
border-width: 1px;
border-color: #000000;
border-radius: 5px;
background: #333333;
}
.systemBox,
......@@ -1364,7 +1369,8 @@ text.alert {
}
.flash_0,
.flash_1,
.flash_2 {
.flash_2,
.flash_3 {
width: 350px;
min-height: 20px;
border: solid;
......@@ -1383,7 +1389,8 @@ text.alert {
}
.log_0,
.log_1,
.log_2 {
.log_2,
.log_3 {
width: auto;
min-height: 20px;
display: block;
......@@ -1401,6 +1408,11 @@ text.alert {
}
.flash_2,
.log_2 {
font-weight: bold;
background-color: #F2DEAE;
}
.flash_3,
.log_3 {
font-weight: bold;
border-color: darkred;
background-color: #F2DEDE;
......
......@@ -438,7 +438,7 @@ line {
text-align: center;
border: solid;
border-width: 1px;
border-color: #FFF;
border-color: #ffffff;
border-radius: 5px;
margin: 0px 1px;
}
......@@ -446,6 +446,11 @@ line {
background: #fdf6e3;
}
.infoBox-open {
margin: -1px;
border: solid;
border-width: 1px;
border-color: #ffffff;
border-radius: 5px;
background: #cccccc;
}
.systemBox,
......@@ -1364,7 +1369,8 @@ text.alert {
}
.flash_0,
.flash_1,
.flash_2 {
.flash_2,
.flash_3 {
width: 350px;
min-height: 20px;
border: solid;
......@@ -1383,7 +1389,8 @@ text.alert {
}
.log_0,
.log_1,
.log_2 {
.log_2,
.log_3 {
width: auto;
min-height: 20px;
display: block;
......@@ -1401,6 +1408,11 @@ text.alert {
}
.flash_2,
.log_2 {
font-weight: bold;
background-color: #F2DEAE;
}
.flash_3,
.log_3 {
font-weight: bold;
border-color: darkred;
background-color: #F2DEDE;
......
......@@ -550,7 +550,7 @@ line {
text-align: center;
border: solid;
border-width: 1px;
border-color: #FFF;
border-color: @background;
border-radius: 5px;
margin: 0px 1px;
}
......@@ -558,6 +558,11 @@ line {
background: @highlight;
}
.infoBox-open{
margin: -1px;
border: solid;
border-width: 1px;
border-color: @background;
border-radius: 5px;
background: @border;
}
......@@ -1552,7 +1557,7 @@ text.alert { fill: red; }
display: none;
}
.flash_0, .flash_1, .flash_2 {
.flash_0, .flash_1, .flash_2, .flash_3 {
width: 350px;
min-height: 20px;
border: solid;
......@@ -1570,7 +1575,7 @@ text.alert { fill: red; }
transition: background 1s linear;
}
.log_0, .log_1, .log_2 {
.log_0, .log_1, .log_2, .log_3 {
width: auto;
min-height: 20px;
display: block;
......@@ -1588,6 +1593,11 @@ text.alert { fill: red; }
}
.flash_2, .log_2 {
font-weight: bold;
background-color: #F2DEAE;
}
.flash_3, .log_3 {
font-weight: bold;
border-color: darkred;
background-color: #F2DEDE;
......
......@@ -212,7 +212,7 @@ Clone.prototype = {
getFasta: function() {
fasta = ''
fasta += '>' + this.getCode() + ' ' + this.getPrintableSize() + '\n'
fasta += this.getSequence() + '\n'
fasta += this.getPrintableSegSequence() + '\n'
return fasta
},
......@@ -338,6 +338,22 @@ Clone.prototype = {
}
},
getPrintableSegSequence: function () {
if (typeof this.seg == 'undefined' || typeof this.seg['5end'] == 'undefined' || typeof this.seg['3start'] == 'undefined') {
return this.getSequence()
}
var s = ''
s += this.sequence.substring(0, this.seg['5end'])
s += '\n'
if (this.seg['5end'] < this.seg['3start'] - 1) {
s += this.sequence.substring(this.seg['5end'], this.seg['3start'] - 1)
s += '\n'
}
s += this.sequence.substring(this.seg['3start'] - 1)
return s
},
computeGCContent: function () {
if (typeof (this.sequence) == 'undefined') {
this.GCContent = '?'
......
......@@ -27,9 +27,14 @@
function Com(default_console) {
this.data_id = "data-container"; //TODO
this.default = default_console;
this.DEBUG = 0
this.INFO = 1
this.WARN = 2
this.ERROR = 3
this.min_priority = 1; // minimum required to display message
this.min_priority_console = 0;
this.min_priority = this.INFO // minimum required to display message
this.min_priority_console = this.DEBUG
this.build()
BUTTON_CLOSE_POPUP = "</br></br> <div class='center' > <button onclick='console.closePopupMsg()'>ok</button></div> ",
......@@ -181,7 +186,7 @@ Com.prototype = {
}).appendTo(this.flash_container)
.slideDown(200);
if (priority !=2){
if (priority < this.ERROR){
setTimeout(function(){
div.fadeOut('slow', function() { div.remove();});
}, 8000);
......
......@@ -188,10 +188,11 @@ Database.prototype = {
m.parseJsonAnalysis(result)
m.initClones()
}
//TODO server need to return message priority too ( 0=console, 1=ok, 2=error)
if (res.message) console.log({"type": "flash", "msg": "database : " + res.message , "priority": 1})
// server message
if (res.message) console.log({"type": "flash",
"msg": "database : " + res.message,
"priority": res.success == "false" ? 2 : 1}) // res.success can be 'undefined'
return res
if (this.url.length == 1) $("#db_back").addClass("inactive");
......@@ -425,7 +426,7 @@ Database.prototype = {
},
error: function (request, status, error) {
if (status === "timeout") {
console.log({"type": "flash", "default" : "database_timeout", "msg" : " - unable to access patient data" , "priority": 1});
console.log({"type": "flash", "default" : "database_timeout", "msg" : " - unable to access patient data" , "priority": 2});
} else {
console.log({"type": "popup", "msg": request.responseText});
}
......@@ -482,7 +483,7 @@ Database.prototype = {
error: function (request, status, error) {
self.m.resume()
if (status === "timeout") {
console.log({"type": "flash", "default" : "database_timeout", "msg": " - unable to access patient data" , "priority": 1});
console.log({"type": "flash", "default" : "database_timeout", "msg": " - unable to access patient data" , "priority": 2});
} else {
console.log({"type": "popup", "msg": request.responseText});
}
......@@ -505,7 +506,7 @@ Database.prototype = {
},
error: function (request, status, error) {
if (status === "timeout") {
console.log({"type": "flash", "default" : "database_timeout", "msg": " - unable to access patient data" , "priority": 1});
console.log({"type": "flash", "default" : "database_timeout", "msg": " - unable to access patient data" , "priority": 2});
} else {
console.log({"type": "popup", "msg": request.responseText});
}
......
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