Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
2e2df751
Commit
2e2df751
authored
Oct 06, 2014
by
Marc Duez
Browse files
model.js : replace some function
alignementButton > segmenter.js get_cgi > database.js
parent
f8620889
Changes
5
Hide whitespace changes
Inline
Side-by-side
browser/js/clone.js
View file @
2e2df751
...
...
@@ -358,7 +358,6 @@ Clone.prototype = {
}
this
.
m
.
removeClonesSelected
(
this
.
hash
);
this
.
m
.
updateElemStyle
([
this
.
hash
]);
this
.
m
.
updateAlignmentButton
();
},
isSelected
:
function
()
{
...
...
browser/js/database.js
View file @
2e2df751
...
...
@@ -15,6 +15,12 @@ function Database(id, db_address) {
}
}
function
return_URL_CGI
()
{
if
(
typeof
config
!=
"
undefined
"
)
return
config
.
cgi_address
;
else
return
"
No_CGI_found
"
;
}
Database
.
prototype
=
{
/*appel une page générée a partir des données du serveur
...
...
browser/js/main.js
View file @
2e2df751
...
...
@@ -7,8 +7,6 @@ var CGI_ADDRESS = "http://127.0.1.1/cgi-bin/";
* */
var
myConsole
=
new
Com
(
"
flash_container
"
,
"
log_container
"
,
"
popup-container
"
,
"
data-container
"
)
/*load user config if exist
*
* */
...
...
@@ -71,23 +69,22 @@ if (typeof config != 'undefined') {
/* Model
*
* */
*/
var
m
=
new
Model
();
/*appel a chaque changement de taille du navigateur*/
window
.
onresize
=
function
()
{
m
.
resize
();
};
/* views
*
* */
*/
var
graph
=
new
Graph
(
"
visu2
"
,
m
);
var
list
=
new
List
(
"
list
"
,
m
);
var
sp
=
new
ScatterPlot
(
"
visu
"
,
m
,
graph
,
stats
);
var
segment
=
new
Segment
(
"
bot-container
"
,
m
,
CGI_ADDRESS
);
var
builder
=
new
Builder
(
m
);
var
pdf
=
new
PDF
(
m
,
"
visu2_svg
"
)
if
(
config
.
use_database
)
var
db
=
new
Database
(
"
plop!
"
,
DB_ADDRESS
);
/* Stat object
*
*/
var
stats
=
new
Stats
(
sp
);
...
...
@@ -95,11 +92,6 @@ var stats = new Stats(sp);
*/
m
.
addSegment
(
segment
);
/*
*
* */
if
(
config
.
use_database
)
var
db
=
new
Database
(
"
plop!
"
,
DB_ADDRESS
);
if
(
location
.
search
!=
''
){
var
tmp
=
location
.
search
.
substring
(
1
).
split
(
'
&
'
)
for
(
var
i
=
0
;
i
<
tmp
.
length
;
i
++
){
...
...
browser/js/model.js
View file @
2e2df751
...
...
@@ -1090,23 +1090,6 @@ Model.prototype = {
return
this
.
getName
(
edge
.
source
)
+
"
--
"
+
this
.
getName
(
edge
.
target
)
+
"
==
"
+
edge
.
len
;
},
/* Fonction permettant de recharger le bouton 'align' en fonction de ce qui a été selectionné dans le model
*/
updateAlignmentButton
:
function
()
{
var
self
=
this
;
var
align
=
document
.
getElementById
(
"
align
"
);
if
(
align
!=
null
)
{
if
(
this
.
clonesSelected
.
length
>
1
)
{
align
.
className
=
"
button
"
;
align
.
onclick
=
function
()
{
self
.
segment
.
align
();};
}
else
{
align
.
className
=
""
;
align
.
onclick
=
function
()
{};
}
}
},
/* return clones currently in the selection
*
* */
...
...
@@ -1161,7 +1144,6 @@ Model.prototype = {
this
.
lastCloneSelected
=
cloneID
;
this
.
updateElemStyle
([
cloneID
]);
this
.
updateAlignmentButton
();
},
multiSelect
:
function
(
list
)
{
...
...
@@ -1175,7 +1157,6 @@ Model.prototype = {
this
.
lastCloneSelected
=
list
[
0
];
this
.
updateElemStyle
(
list
);
this
.
updateAlignmentButton
();
},
/* kick all clones out of the selection
...
...
@@ -1188,7 +1169,6 @@ Model.prototype = {
this
.
clone
(
list
[
i
]).
select
=
false
;
}
this
.
removeAllClones
();
this
.
updateAlignmentButton
();
this
.
updateElemStyle
(
list
);
},
...
...
@@ -1859,17 +1839,3 @@ Model.prototype = {
function
return_URL_CGI
()
{
if
(
typeof
config
!=
"
undefined
"
)
return
config
.
cgi_address
;
else
return
"
No_CGI_found
"
;
}
/*appel a chaque changement de taille du navigateur*/
window
.
onresize
=
function
()
{
m
.
resize
();
};
browser/js/segmenter.js
View file @
2e2df751
...
...
@@ -85,7 +85,7 @@ Segment.prototype = {
//align button
span
=
document
.
createElement
(
'
span
'
);
span
.
id
=
"
align
"
this
.
m
.
updateAlignmentButton
();
this
.
updateAlignmentButton
();
span
.
className
=
"
button
"
span
.
onclick
=
function
()
{
self
.
align
()
...
...
@@ -236,9 +236,28 @@ Segment.prototype = {
}
}
}
this
.
updateAlignmentButton
()
},
/* Fonction permettant de recharger le bouton 'align'
*/
updateAlignmentButton
:
function
()
{
var
self
=
this
;
var
align
=
document
.
getElementById
(
"
align
"
);
if
(
align
!=
null
)
{
if
(
this
.
m
.
clonesSelected
.
length
>
1
)
{
align
.
className
=
"
button
"
;
align
.
onclick
=
function
()
{
self
.
align
();};
}
else
{
align
.
className
=
""
;
align
.
className
=
"
button inactive
"
;
align
.
onclick
=
function
()
{};
}
}
},
/* genere le code HTML des infos d'un clone
* @div_elem : element HTML a remplir
* @cloneID : identifiant du clone a décrire
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment