Commit d9d6142f authored by Mathieu Giraud's avatar Mathieu Giraud

js/segmenter.js: no align button when there is no cgi_address

Moreover, there is no need to duplicate the default address in main.js
parent 835f70a8
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
var config = { var config = {
/* Used for the 'align' script */ /* Used for the 'align' script
* If this is not defined, the 'align' button is not available
*/
"cgi_address" : "http://127.0.1.1/cgi-bin/", "cgi_address" : "http://127.0.1.1/cgi-bin/",
/* The following options control how the user may have access to .vidjil files. /* The following options control how the user may have access to .vidjil files.
......
var DB_ADDRESS = "" var DB_ADDRESS = ""
var CGI_ADDRESS = "http://127.0.1.1/cgi-bin/"; var CGI_ADDRESS = ""
/*tools /*tools
......
...@@ -87,6 +87,7 @@ Segment.prototype = { ...@@ -87,6 +87,7 @@ Segment.prototype = {
div_menu.appendChild(span) div_menu.appendChild(span)
//align button //align button
if (this.cgi_address) {
span = document.createElement('span'); span = document.createElement('span');
span.id = "align" span.id = "align"
this.updateAlignmentButton(); this.updateAlignmentButton();
...@@ -96,7 +97,8 @@ Segment.prototype = { ...@@ -96,7 +97,8 @@ Segment.prototype = {
} }
span.appendChild(document.createTextNode("align")); span.appendChild(document.createTextNode("align"));
div_menu.appendChild(span) div_menu.appendChild(span)
}
//toIMGT button //toIMGT button
span = document.createElement('span'); span = document.createElement('span');
span.id = "toIMGT" span.id = "toIMGT"
......
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