Subversion Repositories Applications.reseau

Compare Revisions

Ignore whitespace Rev 73 → Rev 74

/trunk/pages/cupp/index.html
New file
0,0 → 1,24
<html>
<head>
<meta charset="utf-8"/>
<title>CUPP - Configurateur d'URLs Par Projet</title>
<link rel="stylesheet" media="screen" type="text/css" href="http://resources.tela-botanica.org/bootstrap/3.1.0/css/bootstrap.min.css"/>
<link rel="stylesheet" media="screen" type="text/css" href="style.css"/>
<script src="http://resources.tela-botanica.org/jquery/1.9.1/jquery.min.js"></script>
<script src="config.js"></script>
<script src="script.js"></script>
</head>
<body>
<h1>CUPP - Trouvez les bonnes URLs pour votre projet Tela Botanica !</h1>
<div id="zone-formulaire">
<label>Mot-clé associé à votre projet : </label>
<input id="mc" placeholder="Ex: sauvages, ouaga2015..." />
<br/>
<a id="ok" class="btn btn-success">Générer les URLs</a>
</div>
<div id="zone-urls">
<ul id="liste">
</ul>
</div>
</body>
</html>
/trunk/pages/cupp/README
New file
0,0 → 1,5
CUPP - Configurateur d'URLs Par Projet
Mathias - 2015-10-16
 
Permet de trouver facilement les URLs des différents outils TB, pour un projet
donné (mot-clef)
/trunk/pages/cupp/script.js
New file
0,0 → 1,37
$(document).ready(function() {
 
// écouteur de clic
$("#ok").click(function() {
genererURLs();
});
 
// écouteur de touche entrée
$("#mc").keypress(function(evt) {
if(evt.which == 13) {
genererURLs();
}
});
 
// génération des URLs
function genererURLs() {
// validation du mot-clef
var mc = $("#mc").val();
if (mc == '') {
alert("Merci de saisir le mot-clef associé à votre projet");
return false;
}
if (mc.indexOf(" ") != -1 || mc.indexOf(",") != -1) {
alert("Merci de ne saisir qu'un seul mot-clef, sans espace");
return false;
}
// création des URLs à partir de la config
var liste = $("#liste");
liste.empty();
$.each(URLs, function(nom, url) {
var urlMc = url.replace('[MC]', mc);
var element = '<li><label>' + nom + ' :</label> <a href="' + urlMc + '">' + urlMc + '</a></li>';
//alert(element);
liste.append(element);
});
}
});
/trunk/pages/cupp/config.js
New file
0,0 → 1,9
var URLs = {
"Carte": "http://www.tela-botanica.org/widget:cel:cartoPoint?projet=[MC]",
//"Carte à la commune": "http://www.tela-botanica.org/widget:cel:carto?projet=[MC]",
"Widget de saisie": "http://www.tela-botanica.org/widget:cel:saisie?projet=[MC]",
"Identiplante": "http://www.tela-botanica.org/appli:identiplante?masque.type=tous&masque.tag=[MC]",
"Pictoflora": "http://www.tela-botanica.org/appli:pictoflora?masque.tag_cel=[MC]",
"Widget photo": "http://www.tela-botanica.org/widget:cel:photo?projet=[MC]",
"Widget export": "http://www.tela-botanica.org/widget:cel:export?projet=[MC]"
}
/trunk/pages/cupp/config.defaut.js
New file
0,0 → 1,9
var URLs = {
"Carte": "http://www.tela-botanica.org/widget:cel:cartoPoint?projet=[MC]",
//"Carte à la commune": "http://www.tela-botanica.org/widget:cel:carto?projet=[MC]",
"Widget de saisie": "http://www.tela-botanica.org/widget:cel:saisie?projet=[MC]",
"Identiplante": "http://www.tela-botanica.org/appli:identiplante?masque.type=tous&masque.tag=[MC]",
"Pictoflora": "http://www.tela-botanica.org/appli:pictoflora?masque.tag_cel=[MC]",
"Widget photo": "http://www.tela-botanica.org/widget:cel:photo?projet=[MC]",
"Widget export": "http://www.tela-botanica.org/widget:cel:export?projet=[MC]"
}
/trunk/pages/cupp/style.css
New file
0,0 → 1,29
body {
padding: 20px;
}
 
#zone-formulaire {
padding: 10px;
margin-top: 20px;
}
 
#zone-urls {
padding: 10px;
margin-top: 20px;
}
 
#liste {
list-style-type: none;
margin: 0;
padding: 0;
}
 
#liste > li {
margin: 0;
padding: 0;
}
 
#liste > li > label {
font-weight: bold;
width: 150px;
}