Commit 70fc601f authored by dje's avatar dje
Browse files

un peu de propre + correction du bower.json malformé

parent c653dd65
......@@ -18,7 +18,7 @@
"jquery": "~2.1.4",
"jstree": "~3.2.1",
"jquery-ui": "~1.11.4",
"openseadragon": "~2.1.0",
"openseadragon": "~2.1.0"
},
"devDependencies": {
"jquery": "~2.1.4",
......
......@@ -56,6 +56,7 @@ function max:page($project, $page){
}
}
catch err:config {max:max-error($err:description)}
catch err:FODC0002 {max:max-error("Main configuration file is missing (configuration/configuration.xml).")}
};
......@@ -226,6 +227,7 @@ function max:about(){
then xquery:invoke(request:uri() || "/../"||$id||"/" || "/checkplugins")
else " - "
}
</li>
<li>Parcours/Routes: {
let $type := string($ed/routeList/@type)
return
......@@ -239,7 +241,6 @@ function max:about(){
default
return 'Par défaut (liste des documents XML de la DB)'
}</li>
</li>
</ul>
</li>
}
......
......@@ -31,10 +31,9 @@ declare function max.route:getRouteQueryBindings($project, $routeDoc){
Returns a project route list entries as HTML
:)
declare function max.route:HTMLRouteList($project){
(:gets rotue list type from configuration file:)
(:gets route list type from configuration file:)
let $routeListType := max.config:getRouteListType($project)
let $html :=
switch ($routeListType)
(:Route list collected by xquery:)
......
......@@ -11,9 +11,6 @@ const TEMPLATE_CONFIG_FILE = "./edition_conf_tmpl.xml";
const DEMO_CONFIG_INC = "demo_lorem_config_inc.xml"
//if(process.argv.length == 2)
// new_edition()
//else
if(process.argv[2] == "-demo")
include_baseconf(DEMO_CONFIG_INC)
else if(process.argv[2] == "-new")
......@@ -29,27 +26,24 @@ function new_edition(editionId){
});
/*
Demande l'identifiant, le chemin de DB et la grammaire XML de l'édition à créer
Demande le chemin de DB et la grammaire XML de l'édition à créer
*/
//rl.question('Identifiant du projet? ', function(answer) {
rl.question('Chemin de la collection XML?', function(answer) {
// var id = answer;
rl.question('Chemin de la collection XML?', function(answer) {
var db = answer;
var db = answer;
rl.question('Vocabulaire XML du projet (tei, ead, ...)?', function(answer) {
var type = answer;
rl.close();
create_project_baseconf(editionId, db, type);
rl.question('Vocabulaire XML du projet (tei, ead, ...)?', function(answer) {
var type = answer;
rl.close();
create_project_baseconf(editionId, db, type);
});
});
// });
});
}
/*
......@@ -61,13 +55,13 @@ function create_project_baseconf(id, db, type_env){
var template = fs.readFileSync(TEMPLATE_CONFIG_FILE, {encoding: 'utf-8'})
template = template.replace("%ID%",id).replace("%DB%",db).replace("%ENV%",type_env);
//writes config file
//Écriture du fichier de config.
var filename = id +"_config_inc.xml";
fs.writeFile(filename, template, function(err) {
if(err) {
return console.log(err);
}
//moves created config. file to the configuration's fodler
//Déplacement du ficier créer dans le répertoire de config.
fs.rename(filename, CONFIGURATION_FOLDER_PATH + filename);
console.log( "=== Création du fichier de configuration " + filename + " - OK");
......@@ -105,10 +99,7 @@ function include_baseconf(config_file){
if(err) {
return console.log(err);
}
console.log( "=== Mise à jour de la configuration principale de MaX (inclusion de " + config_file + ") - OK");
console.log( "=== Mise à jour de la configuration principale de MaX (inclusion de " + config_file + ") - OK");
});
}
......@@ -5,7 +5,7 @@
<body>
<div id='content' style='margin: 20px'>
<h1>MaX - About</h1>
<h2>{$nbEditions} éditions</h2>
<h2>{$nbEditions} édition(s)</h2>
<div id='details'>{$details}</div>
</div>
......
Supports Markdown
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