Commit 5301b501 authored by Clément OUDOT's avatar Clément OUDOT
Browse files

Manager graphical work

parent 08eb1f86
......@@ -46,6 +46,7 @@ example/skins/default/folder_delete.png
example/skins/default/folder_edit.png
example/skins/default/hframe.png
example/skins/default/jquery-1.3.2.min.js
example/skins/default/jquery-ui-1.7.2.custom.css
example/skins/default/jquery-ui-1.7.2.custom.min.js
example/skins/default/leaf-last.gif
example/skins/default/leaf.gif
......
......@@ -27,48 +27,90 @@ body
display:none;
}
a, a:link, a:visited
{
text-decoration:none;
}
/* Buttons and inputs*/
button, input
{
font-weight:bold;
border:1px solid #bbb;
padding:5px 10px;
margin:5px;
}
/* Divs */
#header a, #header a:link, #header a:visited
{
color:#fff;
}
#header img, #header p
{
float:left;
}
#header p
{
margin:5px 20px;
padding:5px;
border-style:dotted;
border-color:#bbb;
border-width:3px 0;
}
#page
{
background:#eee;
-moz-border-radius:10px;
-webkit-border-radius:10px;
clear:both;
margin-top:50px;
}
#menu
{
float:left;
padding:10px;
width:30%;
width:300px;
border-right:2px solid #bbb;
}
#menu img.logo
#data
{
margin:0 0 10px 0;
margin:0 0 0 320px;
padding:10px;
border-left:2px solid #bbb;
}
#data
#buttons, #edition
{
margin:0 0 0 30%;
padding:10px;
text-align:center;
margin:10px 50px;
padding:0 0 5px 0;
border:solid #bbb 1px;
}
#help
{
border:3px solid #bbb;
padding:0;
width:80%;
width:600px;
padding:5px 10px;
background:#eee;
margin:10px auto;
border:3px solid #bbb;
-moz-border-radius:10px;
-webkit-border-radius:10px;
}
#help h1
#help h1, #buttons h1, #edition h1
{
text-align:center;
font-size:12pt;
padding:2px;
margin:0;
padding:5px 10px;
margin:5px 10px;
background:#ddd;
cursor:move;
}
#help_content
......@@ -77,6 +119,12 @@ body
overflow:auto;
}
/* jQuery UI */
.ui-draggable h1
{
cursor:move;
}
/* jQuery Simple Tree */
.simpleTree
{
......
......@@ -6,9 +6,9 @@ var simpleTreeCollection;
$(document).ready(function(){
/* Drag Help (require jQuery UI)*/
/* Drag and resize divs (require jQuery UI)*/
$("#help").draggable({ handle: 'h1' });
$("#help").resizable();
$("#help").resizable({ handles: 'all'});
/* Simple Tree */
simpleTreeCollection = $(".simpleTree").simpleTree({
......@@ -69,14 +69,14 @@ function none(id) {
function hashRoot(){
currentId=simpleTreeCollection[0].getSelected().attr('id');
display('default','Lemonldap::NG Manager');
$('#newkbr').css('display','block');
$('#newkbr').css('display','');
}
function btext(id) {
currentId=id;
$('#btextKey').attr('value',lmtext(id));
$('#btextValue').attr('value',lmdata(id));
display('btext','Clef');
$('#newkb,#delkb').css('display','block');
$('#newkb,#delkb').css('display','');
}
function int(id) {
currentId=id;
......@@ -102,13 +102,13 @@ function rules(id){
if(t=='default'){$('#rulKey').attr('readonly','readonly')}
else{
$('#rulKey').attr('readonly','');
$('#delkb').css('display','block')
$('#delkb').css('display','')
}
$('#newrb').css('display','block');
$('#newrb').css('display','');
}
function rulesRoot(id){
display('default','Lemonldap::NG Manager');
$('#newrbr').css('display','block');
$('#newrbr').css('display','');
}
var count=0;
var text4newKey='Key';
......
......@@ -5,6 +5,7 @@
<head>
<title>Lemonldap::NG Manager</title>
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="DIR">/manager.css" />
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="DIR">/jquery-ui-1.7.2.custom.css" />
<script src="<TMPL_VAR NAME="DIR">/jquery-1.3.2.min.js" type="text/JavaScript"></script>
<script src="<TMPL_VAR NAME="DIR">/jquery-ui-1.7.2.custom.min.js" type="text/JavaScript"></script>
<script src="<TMPL_VAR NAME="DIR">/tree.js" type="text/JavaScript"></script>
......@@ -16,22 +17,31 @@ var scriptname='<TMPL_VAR NAME="SCRIPT_NAME">';var imagepath='<TMPL_VAR NAME="DI
</head>
<body>
<!-- Header -->
<div id="header">
<img alt="Lemonldap::NG" src="<TMPL_VAR NAME="DIR">/logo_lemonldap-ng.png" class="logo" />
<p><a href="index.pl"><lang en="Configuration management" fr="Gestion de la configuration"/></a></p>
<p><a href="sessions.pl"><lang en="Sessions explorer" fr="Explorateur de sessions"/></a></p>
</div>
<!-- Main -->
<div id="page">
<!-- Menu (tree) -->
<div id="menu">
<img alt="Lemonldap::NG" src="<TMPL_VAR NAME="DIR">/logo_lemonldap-ng.png" class="logo" />
<TMPL_VAR NAME="MENU">
</div>
<!-- Data -->
<div id="data">
<h1>Lemonldap::NG Manager</h1>
<!-- All buttons -->
<div id="buttons">
<h1>
<lang en="Available actions" fr="Actions disponibles" />
</h1>
<button id="bsave" onclick="uploadConf()" >
<lang en="Save" fr="Sauver" />
</button>
......@@ -62,60 +72,62 @@ var scriptname='<TMPL_VAR NAME="SCRIPT_NAME">';var imagepath='<TMPL_VAR NAME="DI
</div>
<form action="#" onsubmit="return false">
<form id="edition" action="#" onsubmit="return false">
<h1>
<lang en="Values to edit" fr="Valeurs à éditer" />
</h1>
<!-- Form content -->
<div id="content">
<!-- Default text -->
<div id="content_default" class="content">
<lang en="Click on the configuration tree to edit parameters" fr="Cliquer sur l'arbre de configuration pour éditer les paramètres" />
<lang en="No value" fr="Pas de valeur" />
</div>
<!-- Contextual text -->
<div id="content_text" class="hidden">
<input type="text" id="text" onchange="setlmdata(currentId,this.value)"/>
<input type="text" id="text" onchange="setlmdata(currentId,this.value)"/>
</div>
<!-- Specific to securedCookie (TODO push in _Struct.pm -->
<!-- Specific to securedCookie (TODO push in _Struct.pm) -->
<div id="content_securedCookie" class="hidden">
<input id="securedCookie0" type="radio" name="securedCookie" value="0" onclick="setlmdata('li_bGlfL3NlY3VyZWRDb29raWU1','0')" /> <lang en="Non secured cookie" fr="Cookie non sécurisé"/><br/>
<input id="securedCookie1" type="radio" name="securedCookie" value="1" onclick="setlmdata('li_bGlfL3NlY3VyZWRDb29raWU1','1')" /> <lang en="Secured cookie (HTTPS)" fr="Cookie sécurisé (HTTPS)"/><br/>
<input id="securedCookie2" type="radio" name="securedCookie" value="2" onclick="setlmdata('li_bGlfL3NlY3VyZWRDb29raWU1','2')" /> Double cookie (HTTP and HTTPS)<br/>
<button onclick="return false"><lang en="Submit" fr="Valider"/></button>
</div>
<div id="content_int" class="hidden">
<input type="text" id="int" onchange="setlmdata(currentId,this.value)"/>
<button onclick="return false"><lang en="Submit" fr="Valider"/></button>
</div>
<div id="content_btext" class="hidden">
<input type="text" id="btextKey" onchange="setlmtext(currentId,this.value)"/> <input type="text" id="btextValue" onchange="setlmdata(currentId,this.value)"/>
<button onclick="return false"><lang en="Submit" fr="Valider"/></button>
</div>
<div id="content_rules" class="hidden">
<textarea id="rulKey" cols="30" rows="2" onchange="setlmtext(currentId,this.value)"></textarea>&nbsp;<textarea id="rulValue" cols="50" rows="2" onchange="setlmdata(currentId,this.value)"></textarea>
<button onclick="return false"><lang en="Submit" fr="Valider"/></button>
</div>
</div>
</form>
</form>
</div>
<hr style="width:0px;clear:both" />
</div>
<div id="help">
<h1><lang en="Help" fr="Aide"/></h1>
<div id="help_content">
<!-- AJAX content -->
<lang en="Click on the configuration tree to edit parameters" fr="Cliquer sur l'arbre de configuration pour éditer les paramètres" />
</div>
</div>
</div>
<hr style="color:transparent;clear:both;" />
</div>
</body>
</html>
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