Commit a3ff1803 authored by Xavier Guimard's avatar Xavier Guimard

* "Delete Virtual Host" button (closes: #306771)

git-svn-id: svn://svn.forge.objectweb.org/svnroot/lemonldap/trunk@68 1dbb9719-a921-0410-b57f-c3a383c2c641
parent e00a6f7d
......@@ -47,6 +47,7 @@ example/imgs/tombs_mag.gif
example/lemonldap-ng-manager.js
example/lmConfig.mysql
example/index.pl
example/scripts/lmSessionDump
example/soapserver.pl
lib/Lemonldap/NG/Manager.pm
lib/Lemonldap/NG/Manager/Apache/Session/SOAP.pm
......
test.example.com http://test.example.com/reload
#!/usr/bin/perl
# Set here the session storage you use
$sessionStorage = 'Apache::Session::File';
$sessionStorageOptions = {
Directory => '/tmp',
};
############
usage() unless($ARGV[0]);
eval "use $sessionStorage";
die $@ if($@);
tie %h, $sessionStorage, $ARGV[0], $sessionStorageOptions;
print "Attributes and macros :\n";
my @t = sort keys(%h);
print "$_ " foreach(@t);
print "\n";
foreach my $k ( sort keys(%h) ) {
next if($k eq 'groups');
print "\t$k\t=> $h{$k}\n";
}
if( $h{groups} ) {
print "Groups :\n";
print "\t$_\n" foreach( sort split /\s+/, $h{groups} );
}
......@@ -77,7 +77,8 @@ sub javascript {
deleteNode locationRules unableToSave confSaved saveFailure
newRule newHeader httpHeaders waitingResult unknownError
configurationWasChanged configLoaded warningConfNotApplied
applyConf prevConf lastConf nextConf)) {
applyConf prevConf lastConf nextConf deleteVirtualHost
areYouSure)) {
$text{$_} = &{"txt_$_"};
$text{$_} =~s/'/\\'/g;
}
......@@ -145,6 +146,7 @@ function onNodeSelect(nodeId) {
if(nodeIs(nodeId,"virtualHosts")){
but+=button('$text{newVirtualHost}','newVirtualHost',nodeId);
if(nodeIs(nodeId,"virtualHost")){
but+=button('$text{deleteVirtualHost}','deleteVirtualHost',nodeId);
but+=button('$text{newRule}','newRule',nodeId);
but+=button('$text{newHeader}','newHeader',nodeId);
}
......@@ -234,6 +236,11 @@ function newVirtualHost() {
}
}
function deleteVirtualHost(id) {
var vh=vhostId(id);
if(confirm('$text{areYouSure}')) tree.deleteItem(vh);
}
function newValue(id,text,type,value){
indice--;
insertNewChild(id,'j_'+indice,text);
......
......@@ -57,7 +57,7 @@ sub fr {
httpHeaders => 'En-têtes HTTP',
locationRules => 'Règles',
# Warning: here, é wil not be understood by Firefox (msgBox)
# Attention: ici, é ne sera pas interprt par Firefox (msgBox)
newVirtualHost => 'Nouvel hote virtuel',
newMacro => 'Nouvelle macro',
newGroup => 'Nouveau groupe',
......@@ -84,6 +84,10 @@ sub fr {
prevConf => 'Précédente',
nextConf => 'Suivante',
lastConf => 'Dernière',
deleteVirtualHost => "Supprimer l'hôte virtuel",
# Attention: ici, Ê ne sera pas interprt par Firefox (msgBox)
areYouSure => 'Etes vous sur ?',
};
}
......@@ -139,5 +143,7 @@ sub en {
prevConf => 'Previous',
nextConf => 'Next',
lastConf => 'Last',
deleteVirtualHost => 'Delete virtual host',
areYouSure => 'Are you sure ?',
};
}
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